Partager via


Querying TV Connector and Copy Protection Hardware

A video miniport driver for an adapter that has a TV connector must process the IOCTL_VIDEO_HANDLE_VIDEOPARAMETERS request in its HwVidStartIO function. When the IOCTL request is IOCTL_VIDEO_HANDLE_VIDEOPARAMETERS, the InputBuffer member of the VIDEO_REQUEST_PACKET structure points to a VIDEOPARAMETERS structure. The dwCommand member of that VIDEOPARAMETERS structure specifies whether the miniport driver must provide information about the TV connector (VP_COMMAND_GET) or apply specified settings to the TV connector (VP_COMMAND_SET).

When the dwCommand member of the VIDEOPARAMETERS structure is VP_COMMAND_GET, the miniport driver must do the following:

  • Verify the Guid member of the VIDEOPARAMETERS structure.

  • For each capability that the TV connector supports, set the corresponding flag in the dwFlags member of the VIDEOPARAMETERS structure.

  • For each flag set in the dwFlags member, assign values to the corresponding members of the VIDEOPARAMETERS structure to indicate the capabilities and current settings associated with that flag. See the VIDEOPARAMETERS reference page for a list of structure members that correspond to a given flag.

The dwMode member of the VIDEOPARAMETERS structure specifies whether the TV output is optimized for video playback or for displaying the Windows desktop. A value of VIDEO_MODE_TV_PLAYBACK specifies that the TV output is optimized for video playback (that is, flicker filter is disabled and overscan is enabled). A value of VIDEO_MODE_WIN_GRAPHICS specifies that the TV output is optimized for Windows graphics (that is, maximum flicker filter is enabled and overscan is disabled).

In response to VP_COMMAND_GET, the miniport driver must set the VP_FLAGS_TV_MODE flag in dwFlags and must set the VP_MODE_WIN_GRAPHICS bit in dwAvailableModes. Setting the VP_MODE_TV_PLAYBACK bit in dwAvailableModes is optional. In addition, the miniport driver must set the VP_FLAGS_MAX_UNSCALED flag in dwFlags and must assign values to the corresponding members of the VIDEOPARAMETERS structure.

In response to VP_COMMAND_GET, if the TV output is currently disabled, the miniport driver should set dwMode to 0, set dwTVStandard to VP_STANDARD_WIN_VGA, and set dwAvailableTVStandard to VP_STANDARD_WIN_VGA.

Example 1: An adapter supports TV output, which is currently disabled. The miniport driver must do the following in response to VP_COMMAND_GET:

  • In dwFlags, set VP_FLAGS_TV_MODE, VP_FLAGS_TV_STANDARD, and all other flags that represent capabilities supported by the TV connector.

  • Set dwMode to 0.

  • In dwAvailableModes, set VP_MODE_WIN_GRAPHICS. If the hardware supports VP_MODE_TV_PLAYBACK, set that bit also.

  • Set dwTVStandard to VP_TV_STANDARD_WIN_VGA.

  • In dwAvailableTVStandard, set all bits that represent TV standards supported by the TV connector.

  • For all flags set in dwFlags (other than VP_FLAGS_TV_MODE and VP_FLAGS_TV_STANDARD, which have already been discussed), assign values to the corresponding members of the VIDEOPARAMETERS structure.

Example 2: To enable TV output, the caller (not the miniport driver) should do the following:

  • In dwFlags, set VP_FLAGS_TV_MODE and VP_FLAGS_TV_STANDARD. Clear all other flags.

  • Set dwMode to either VP_MODE_WIN_GRAPHICS or VP_MODE_TV_PLAYBACK. Do not set both bits.

  • Set dwTvStandard to the desired standard (for example VP_TV_STANDARD_NTSC_M). Do not set any other bits in dwTvStandard.

Example 3: To disable TV output, the caller (not the miniport driver) should do the following:

  • In dwFlags, set VP_FLAGS_TV_MODE and VP_FLAGS_TV_STANDARD. Clear all other flags.

  • Set dwMode to 0.

  • In dwTvStandard, set VP_TV_STANDARD_WIN_VGA. Clear all other bits in dwTvStandard.