Microsoft DirectX 8.0

DVD Event Notification Codes

Note  This introductory material applies only to C++ developers.

Microsoft® DirectShow® supports system-defined events, which filters in the filter graph pass to the filter graph manager. Filters pass these events to the filter graph manager by using the IMediaEventSink::Notify method, and the application retrieves them with the IMediaEvent::GetEvent method.

When you retrieve an event by calling GetEvent, the event can contain interface pointers or pointers to allocated memory. Code that uses GetEvent should, therefore, call IMediaEvent::FreeEventParams to free any resources associated with the event's parameters after it handles the event.

The DVD event notification codes are listed in Dvdevcod.h. See Event Notification Codes for non-DVD event notification codes. The following list shows the available DVD event notification codes in alphabetical order.

DVD event notification codeDescription
EC_DVD_ANGLE_CHANGE Signals that either the number of available angles changed or that the current angle number changed.
EC_DVD_ ANGLES_AVAILABLE Indicates whether an angle block is being played and angle changes can be performed.
EC_DVD_AUDIO_STREAM_CHANGE Signals that the current audio stream number changed for the main title.
EC_DVD_BUTTON_AUTO_ACTIVATED Signals that a menu button has been automatically activated per instructions on the disc.
EC_DVD_BUTTON_CHANGE Signals that either the number of available buttons changed or that the currently selected button number changed.
EC_DVD_CHAPTER_AUTOSTOP Indicates that playback stopped as the result of a call to the IDvdControl2::PlayChaptersAutoStop method.
EC_DVD_CHAPTER_START Signals that the DVD Navigator started playback of a new chapter in the current title.
EC_DVD_CMD_START Signals that a particular command has begun.
EC_DVD_CMD_END Signals that a particular command has completed.
EC_DVD_CURRENT_HMSF_TIME Signals the current time in DVD_HMSF_TIMECODE format at the beginning of every VOBU, which occurs every .4 to 1.0 sec.
EC_DVD_CURRENT_TIME Signals the beginning of every video object unit (VOBU), a video segment which is 0.4 to 1.0 seconds in length.
EC_DVD_DISC_EJECTED Signals that a disc has been ejected from the drive.
EC_DVD_DISC_INSERTED Signals that a disc has been inserted into the drive.
EC_DVD_DOMAIN_CHANGE Indicates the DVD Navigator's new domain.
EC_DVD_ERROR Signals a DVD error condition.
EC_DVD_KARAOKE_MODE Indicates that the Navigator has either begun playing or finished playing karaoke data.
EC_DVD_NO_FP_PGC Indicates that the DVD disc does not have a FP_PGC (First Play Program Chain).
EC_DVD_PARENTAL_LEVEL_CHANGE Signals that the parental level of the authored content is about to change.
EC_DVD_PLAYBACK_RATE_CHANGE Indicates that a playback rate change has been initiated and the new rate is in the parameter.
EC_DVD_PLAYBACK_STOPPED Indicates that playback has been stopped. The DVD Navigator has completed playback of the title and did not find any other branching instruction for subsequent playback.
EC_DVD_PLAYPERIOD_AUTOSTOP Indicates that the Navigator has finished playing the segment specified in a call to PlayPeriodInTitleAutoStop.
EC_DVD_STILL_OFF Signals the end of any still.
EC_DVD_STILL_ON Signals the beginning of any still.
EC_DVD_SUBPICTURE_STREAM_CHANGE Signals that the current subpicture stream number changed for the main title.
EC_DVD_TITLE_CHANGE Indicates when the current title number changes.
EC_DVD_VALID_UOPS_CHANGE Signals that the available set of IDVDControl2 interface methods has changed.
EC_DVD_WARNING Signals a DVD warning condition.

EC_DVD_ANGLE_CHANGE

DVD Event Notification Codes

Signals that either the number of available angles changed or that the current angle number changed.

Parameters

lParam1
DWORD value indicating the number of available angles. When the number of available angles is 1, the current video is not multiangle.
lParam2
DWORD value indicating the current angle number.

Remarks

Angle numbers range from 1 to 9.

The current angle number can change automatically with a navigation command authored on the disc as well as through application control by using the IDVDControl2 interface.

This event is raised in all domains.

EC_DVD_ANGLES_AVAILABLE

DVD Event Notification Codes

Indicates whether an angle block is being played and angle changes can be performed.

Parameters

lParam1
Boolean (BOOL) value that indicates if an angle block is being played back. Zero (0) indicates that playback is not in an angle block and angles are not available, One (1) indicates that an angle block is being played back and angle changes can be performed.
lParam2
Zero.

Remarks

Angle changes are not restricted to angle blocks and the manifestation of the angle change can be seen only in an angle block.

EC_DVD_AUDIO_STREAM_CHANGE

DVD Event Notification Codes

Signals that the current audio stream number changed for the main title.

Parameters

lParam1
DWORD value indicating the new user audio stream number. Audio stream numbers range from 0 to 7. Stream 0xFFFFFFFF indicates that no stream is selected.
lParam2
Zero.

Remarks

The current audio stream can change automatically with a navigation command authored on the disc as well as through application control by using the IDVDControl2 interface.

This event is raised in all domains.

EC_DVD_BUTTON_AUTO_ACTIVATED

DVD Event Notification Codes

Signals that a menu button has been automatically activated per instructions on the disc. This occurs when a menu times out and the disc has specified a button to be automatically activated.

Parameters

lParam1
DWORD value indicating the button that was activated.
lParam2
Zero.

This event is raised in all domains.

EC_DVD_BUTTON_CHANGE

DVD Event Notification Codes

Signals that either the number of available buttons changed or that the currently selected button number changed.

Parameters

lParam1
DWORD value indicating the number of available buttons.
lParam2
DWORD value indicating the currently selected button number. Selected button number zero implies that no button is selected.

Remarks

Button numbers range from 1 to 36.

The currently selected button can change automatically with a navigation command authored on the disc as well as through application control by using IDVDControl2 interface.

This event can signal any of the available button numbers. These numbers do not always correspond to button numbers used for IDvdControl::SelectAndActivateButton because that method can activate only a subset of buttons.

This event is raised in all domains.

EC_DVD_CHAPTER_AUTOSTOP

DVD Event Notification Codes

Indicates that playback stopped as the result of a call to the IDvdControl::PlayChaptersAutoStop method.

Parameters

lParam1
Zero.
lParam2
Zero.

Remarks

This event is raised in the title domain.

EC_DVD_CHAPTER_START

DVD Event Notification Codes

Signals that the DVD player started playback of a new program in the DVD_DOMAIN_Title domain.

Parameters

lParam1
DWORD value indicating the new chapter (program) number.
lParam2
Zero.

Remarks

Only simple linear movies signal this event.

This event is raised in the title domain.

EC_DVD_CMD_START

DVD Event Notification Codes

Signals that a particular command has begun.

Parameters

lParam1
The Command ID and the HRESULT return value.
lParam2
Zero.

Remarks

This event is only fired if your application has expressed interest in it by setting the DVD_CMD_FLAG_SendEvents flag in any of the IDVDControl2::Play... methods. See Synchronizing DVD Commands for more details.

This event is raised in the title domain.

EC_DVD_CMD_END

DVD Event Notification Codes

Signals that a particular command has completed.

Parameters

lParam1
The Command ID and the completion result.
lParam2
Zero.

Remarks

This event is only fired if your application has expressed interest in it by setting the DVD_CMD_FLAG_SendEvents flag in any of the IDVDControl2::Play... methods. See Synchronizing DVD Commands for more details.

This event is raised in the title domain.

EC_DVD_CURRENT_HMSF_TIME

DVD Event Notification Codes

Signals the current time, in DVD_HMSF_TIMECODE format, relative to the start of the title. This event is triggered at the beginning of every VOBU, which occurs every 0.4 to 1.0 seconds.

Parameters

lParam1
A ULONG value that contains the DVD_HMSF_TIMECODE structure. Assign lParam1 to a ULONG variable and then cast that variable to a DVD_HMSF_TIMECODE to access its values.
lParam2
A ULONG value containing a union of DVD_TIMECODE_FLAGS.

Remarks

The DVD_HMSF_TIMECODE format is intended to replace the old BCD format that is returned in EC_DVD_CURRENT_TIME events. The HMSF timecodes are easier to work with. To have the Navigator send EC_DVD_CURRENT_HMSF_TIME events instead of EC_DVD_CURRENT_TIME events, an application must call IDVDControl2::SetOption(DVD_HMSF_TimeCodeEvents, TRUE). When this flag is set, the Navigator will also expect all time parameters in the IDVDControl2 and IDVDInfo2 methods to be passed as DVD_HMSF_TIMECODEs.

This event is raised in the title domains.

EC_DVD_CURRENT_TIME

DVD Event Notification Codes

Signals the beginning of every video object unit (VOBU), a video segment which is 0.4 to 1.0 seconds in length.

Parameters

lParam1
DWORD value indicating the current playback timecode in a binary coded decimal (BCD) hours, minutes, seconds, frames (HH:MM:SS:FF) format. Member of the DVD_TIMECODE structure.
lParam2
Boolean (BOOL) value indicating the timecode. Zero (0) indicates 25 frames per second while 1 indicates 30 frames per second (nondropped). A value of 2 indicates the playback time cannot be determined.

Remarks

Only simple linear movies signal this event.

This event is raised in the title domain.

EC_DVD_DISC_EJECTED

DVD Event Notification Codes

Signals that a disc was ejected.

Parameters

lParam1
Zero.
lParam2
Zero.

Remarks

Playback automatically stops when a disc is ejected. The application does not have to take any special action in response to this event.

This event is raised in all domains.

EC_DVD_DISC_INSERTED

DVD Event Notification Codes

Signals that a disc was inserted into the drive.

Parameters

lParam1
Zero.
lParam2
Zero.

Remarks

Playback automatically begins when a disc is ejected. The application does not have to take any special action in response to this event.

This event is raised in all domains.

EC_DVD_DOMAIN_CHANGE

DVD Event Notification Codes

Indicates the DVD player's new domain.

Parameters

lParam1
DWORD value indicating the new domain. Member of the DVD_DOMAIN enumerated data type.
lParam2
Zero unless lParam1 == DVD_ERROR_LowParentalLevel. In that case lParam2 will be set to the minimum parental level required to play the title, or to DWORD_PTR(-1) if parental controls must be disabled in order to play the title.

Remarks

The DVD player signals this event whenever it changes domains.

This event is raised in all DVD domains.

EC_DVD_ERROR

DVD Event Notification Codes

Signals a DVD error condition.

Parameters

lParam1
DWORD value indicating the error condition. Member of the DVD_ERROR enumerated data type.
lParam2
DWORD value whose HIWORD contains the decoder region as a reversed set of bits and whose LOWORD contains the drive/system region as a reversed set of bits. See Remarks.

Remarks

This event is raised in all domains.

If lParam1 = DVD_ERROR_IncompatibleSystemAndDecoderRegion, it indicates that (1) the decoder has a region specified and (2) the drive and decoder region do not match.

If lParam1 = DVD_ERROR_IncompatibleDiscAndDecoderRegion, it indicates that (1) the decoder has a region specified and (2) the disc and decoder region do not match.

The disc region is encoded exactly as it is on the disc: as a reversed set of bits in the LOWORD of lParam2. If a disc is allowed in a region, that bit will be OFF. For example, for a Region 2 disc the returned value will be 253 (1111 1101) which has the second least significant bit turned off. A multi-region disc will have more than one such bit turned off.

The decoder region in the HIWORD of lParam2 is encoded in the same way.

If

EC_DVD_KARAOKE_MODE

DVD Event Notification Codes

Indicates that the Navigator has either begun playing or finished playing karaoke data.

Parameters

lParam1
BOOL value. TRUE means that a karaoke track is being played and FALSE means that no karaoke data is being played.
lParam2
Reserved.

Remarks

The DVD player signals this event whenever it changes domains.

This event is raised in all DVD domains.

EC_DVD_NO_FP_PGC

DVD Event Notification Codes

Signals that the DVD disc does not have a FP_PGC (First Play Program Chain) and that the DVD Navigator will not automatically load any PGC and start playback.

Remarks

This event is raised from the First Play domain.

EC_DVD_PARENTAL_LEVEL_CHANGE

DVD Event Notification Codes

Signals that the parental level of the authored content is about to change.

Parameters

lParam1
LONG value representing the new parental level set in the player.
lParam2
Zero.

Remarks

The DVD Navigator source filter does not currently support "on the fly" parental level changes in response to SetTmpPML commands on a DVD disc.

EC_DVD_PLAYBACK_RATE_CHANGE

DVD Event Notification Codes

Signals that a rate change in the playback has been initiated; the parameter lParam1 indicates the new playback rate being used.

Parameters

lParam1
LONG indicating the new playback rate. lParam1 < 0 indicates reverse playback mode. lParam1 > 0 indicates forward playback mode. The value of lParam1 is the actual playback rate multiplied by 10,000, that is, lParam1 = playback_rate * 10000.
lParam2
Zero.

Remarks

This event is raised in the title domain.

EC_DVD_PLAYBACK_STOPPED

DVD Event Notification Codes

Indicates that playback has been stopped. The DVD Navigator has completed playback of the title or chapter and did not find any other branching instruction for subsequent playback.

Parameters

lParam1
Zero.
lParam2
Zero.

Remarks

This event is raised in the title domain, but it is not raised on user initiated Stop.

EC_DVD_STILL_OFF

DVD Event Notification Codes

Signals the end of any still (PGC, Cell, or VOBU).

Parameters

lParam1
Zero.
lParam2
Zero.

Remarks

This event indicates that any currently active still has been released.

This event is raised in all domains.

EC_DVD_PLAYPERIOD_AUTOSTOP

DVD Event Notification Codes

Indicates that the Navigator has finished playing the segment specified in a call to PlayPeriodInTitleAutoStop.

Parameters

lParam1
Zero.
lParam2
Zero.

Remarks

This event is raised in in the Title domain.

This event is also sent when playback is cancelled before the Navigator finishes playing the specified segment.

EC_DVD_STILL_ON

DVD Event Notification Codes

Signals the beginning of any still (PGC, Cell, or VOBU).

Parameters

lParam1
Boolean (BOOL) value indicating whether buttons are available. Zero (0) indicates buttons are available so the IDVDControl2::StillOff method won't work. One (1) indicates no buttons are available, so IDVDControl2::StillOff will work.
lParam2
DWORD value indicating the number of seconds the still will last. 0xFFFFFFFF indicates an infinite still, meaning wait until the user presses a button or until the application calls IDVDControl2::StillOff.

Remarks

All combinations of buttons and still are possible (buttons on with still on, buttons on with still off, button off with still on, button off with still off).

This event is raised in all domains.

EC_DVD_SUBPICTURE_STREAM_CHANGE

DVD Event Notification Codes

Signals that the current subpicture stream number changed for the main title.

Parameters

lParam1
DWORD value indicating the new user subpicture stream number. Subpicture stream numbers range from 0 to 31. Stream 0xFFFFFFFF indicates that no stream is selected.
lParam2
Zero.

Remarks

The subpicture can change automatically with a navigation command authored on disc as well as through application control using IDVDControl2.

This event is raised in all domains.

EC_DVD_TITLE_CHANGE

DVD Event Notification Codes

Indicates when the current title number changes.

Parameters

lParam1
DWORD value indicating the new title number.
lParam2
Zero.

Remarks

Title numbers range from 1 to 99. This number indicates the TTN, which is the title number with respect to the whole disc, not the VTS_TTN which is the title number with respect to just a current VTS.

This event is raised in the title domain.

EC_DVD_VALID_UOPS_CHANGE

DVD Event Notification Codes

Signals that the available set of IDVDControl2 interface methods has changed.

Parameters

lParam1
DWORD value representing a ULONG whose bits indicate which IDVDControl2 commands the DVD disc explicitly disabled.
lParam2
Zero.

Remarks

This event indicates only which operations are explicitly disabled by the content on the DVD disc, and does not guarantee that it is valid to call methods that are not disabled. For example, if no buttons are present, the IDvdControl::ActivateButton method won't work, even though the method is not explicitly disabled.

This event is raised in all domains.

EC_DVD_WARNING

DVD Event Notification Codes

Signals a DVD warning condition.

Parameters

lParam1
DWORD value indicating the warning condition. Member of the DVD_WARNING enumerated data type.
lParam2
Zero.

Remarks

This event is raised in all domains.