Supported Browsers Home   
Using the Buffer Manager Previous   
Stereoscopic Liquid Crystal Shutter Glasses Next   
Programming with SNAP Graphics Up   

Hardware Video Overlay Functions

Hardware video playback with multiple, independent overlay windows can be implemented on compatible devices using the hardware video playback functions. The functions provided by the GA_videoFuncs function group provide a simple interface to hardware video playback. The application software does all of the decoding of video frames, and the graphics driver can be used to display the video data with hardware stretching and color space conversion. The steps to use hardware video playback are as follows:

1.    Determine the hardware video playback capabilities for the graphics mode with the GetVideoModeInfo function and examining the VideoWindows member of the GA_modeInfo structure. There is one structure in theVideoWindows list for each available hardware overlay window. Each video window may have different capabilities, so be sure to look for the one that supports what you need (generally the first one in the list is the most capable).

2.    Allocate an offscreen video buffer of the correct dimensions and pixel format for the source video image you wish to display using the AllocVideoBuffer function. This function might fail if there is not enough video memory available, or you request an input pixel format that is not supported.

3.    Set the video window output rectangle on the screen with the SetVideoOutput function. This function also lets you specify what features are used for displaying the video, such as interpolation and color keying.

4.    Set the hardware video color key, if applicable, using the SetVideoColorKey function.

5.    Call StartVideoFrame to set up for decoding the next frame of data. Calling this function effectively makes a call to LockBuffer for the video buffer, such that the video memory is locked down for direct memory access.

6.    Decode the frame of data into the buffer returned by AllocVideoBuffer above.

7.    Call EndVideoFrame to complete the decoding of the video data and display it on the screen.

8.    Repeat steps 4-6 until the video playback is complete.

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com