|
Obtaining and Setting the Video Format
The BITMAPINFO structure is of variable length to accommodate standard and compressed data
formats. Because this structure is of variable length, applications must always
query the size of the structure and allocate memory before retrieving the
current video format. The following example uses the capGetVideoFormatSize macro to retrieve the buffer size and then calls the capGetVideoFormat macro to retrieve the current video format.
LPBITMAPINFO lpbi;
DWORD dwSize;
dwSize = capGetVideoFormatSize(hWndC);
lpbi = GlobalAllocPtr (GHND, dwSize);
capGetVideoFormat(hWndC, lpbi, dwSize);
// Access the video format and then free the allocated memory.
Applications can use the capSetVideoFormat macro (or the WM_CAP_SET_VIDEOFORMAT message) to send a BITMAPINFO header structure to the capture window. Because video formats are device
specific, your application should check the return value to determine if the format
was accepted.
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Programmer's Reference (win32.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|