Identifying Valid DVD Operations
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
Several factors determine whether you can perform a given DVD operation:
- The current domain. Some commands are only valid in certain domains. When the domain changes, the navigator sends an EC_DVD_DOMAIN_CHANGE event. You can also call IDvdInfo2::GetCurrentDomain to get the current domain.
- UOPS flags. These are flags written onto the disc that indicate which operations are permitted. Whenever the flags change, the navigator sends a EC_DVD_VALID_UOPS_CHANGE event with the new flags. You can also call IDvdInfo2::GetCurrentUOPS to get the current UOPS flags.
- DVD content. Some commands may not be relevant based on the content of the DVD. For example, the IDvdControl2::SelectAngle method might be permitted according to the current domain and UOPS flags, yet the video might have only one angle. In that case, the SelectAngle call is permitted but is not a meaningful option.
When in doubt, permit an action. At worst, the IDvdControl2 method will fail and you can give feedback to the user. The feedback should be relatively unobtrusive. For example, you might flash a small red X to alert the user. The DVD Navigator returns VFW_E_DVD_INVALIDDOMAIN when the domain prohibits an operation, and VFW_E_DVD_OPERATION_INHIBITED when the UOPS flags prohibit an operation.
Related topics