Identifying Valid DVD Operations

 
Microsoft DirectShow 9.0

Identifying Valid DVD Operations

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 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.

See Also