Wednesday, February 29, 2012

VFW: 視訊參數對話盒 Video Dialog Box

一般來說, 硬體製造廠商會提供驅動程式(driver)供使用者將硬體裝置安裝到電腦。視訊裝置也是一樣, 所安裝的驅動程式還會提供一些預先寫好的視訊參數對話盒, 供程式設計師直接呼叫, 以修改視訊裝置的相關參數。不同的廠商所提供的視訊參數對話盒不一定相同, 甚至有些廠商並不一定有提供視訊參數對話盒, 因此, 程式設計師在呼叫視訊參數對話盒之前, 可以先透過 capDriverGetCaps 函式, 先取得視訊裝置驅動程式的效能, 確認之後再進行呼叫。

視訊參數對話盒一共有四種, 分別是:
 1. 視訊來源對話盒 (Video Source Dialog)
 2. 視訊格式對話盒 (Video Format Dialog)
 3. 視訊顯示對話盒 (Video Display Dialog)
 4. 視訊壓縮對話盒 (Video Compression Dialog)

接下來我們將分別介紹各種視訊參數對話盒的呼叫函式。

 1. 視訊來源對話盒 (Video Source Dialog Box)

 capDlgVideoSource

The capDlgVideoSource macro displays a dialog box in which the user can control the video source. The Video Source dialog box might contain controls that select input sources; alter the hue, contrast, brightness of the image; and modify the video quality before digitizing the images into the frame buffer. You can use this macro or explicitly send the WM_CAP_DLG_VIDEOSOURCE message.

BOOL capDlgVideoSource(
hwnd
);

Parameters

 hwnd

  Handle to a capture window.

Return Values

 Returns TRUE if successful or FALSE otherwise.

Remarks

The Video Source dialog box is unique for each capture driver. Some capture drivers might not support a Video Source dialog box. Applications can determine if the capture driver supports this message by checking the fHasDlgVideoSource member of the CAPDRIVERCAPS structure.

No comments:

Post a Comment