Tuesday, April 24, 2012

capCaptureStop macro

結束連續視訊串流擷取。
The capCaptureStop macro stops the capture operation. You can use this macro or explicitly send the WM_CAP_STOP message.

In step frame capture, the image data that was collected before this message was sent is retained in the capture file. An equivalent duration of audio data is also retained in the capture file if audio capture was enabled.

BOOL capCaptureStop(
hwnd
);
Parameters

hwnd

Handle to a capture window.

Return Values

Returns TRUE if successful or FALSE otherwise.

Remarks

The capture operation must yield to use this message. Use the capCaptureAbort macro to abandon the current capture operation.

capCaptureAbort macro

中止錄影動作。
The capCaptureAbort macro stops the capture operation. You can use this macro or explictly send the WM_CAP_ABORT message.

BOOL capCaptureAbort(
hwnd
);

Parameters

hwnd

Handle to a capture window.

Return Values

Returns TRUE if successful or FALSE otherwise.

Remarks

The capture operation must yield to use this macro.

In the case of step capture, the image data collected up to the point of the capCaptureAbort macro will be retained in the capture file, but audio will not be captured.

Use the capCaptureStop macro to halt step capture at the current position, and then capture audio.

Monday, April 23, 2012

capFileAlloc macro

預先從硬碟配置固定大小的空間存放錄影檔案。
The capFileAlloc macro creates (preallocates) a capture file of a specified size. You can use this macro or explicitly send the WM_CAP_FILE_ALLOCATE message.

BOOL capFileAlloc(
hwnd,
dwSize
);

Parameters

hwnd

Handle to a capture window.

dwSize

Size, in bytes, to create the capture file.

Return Values

Returns TRUE if successful or FALSE otherwise.

If an error occurs and an error callback function is set using the capSetCallbackOnError macro, the error callback function is called.

Remarks

You can improve streaming capture performance significantly by preallocating a capture file large enough to store an entire video clip and by defragmenting the capture file before capturing the clip.

capFileSetCaptureFile macro

若要將視訊擷取視窗的視訊、音訊內容儲存成檔案, 可以先使用 capFileSetCaptureFile macro 設定所要儲存的檔案名稱。若沒有預先設定, 檔案名稱則內定為 C:\CAPTURE.AVI。
The capFileSetCaptureFile macro names the file used for video capture. You can use this macro or explicitly call the WM_CAP_FILE_SET_CAPTURE_FILE message.

BOOL capFileSetCaptureFile(
hwnd,
szName
);

Parameters

hwnd

Handle to a capture window.

szName

Pointer to the null-terminated string that contains the name of the capture file to use.

Return Values

Returns TRUE if successful or FALSE if the filename is invalid or if streaming or single-frame capture is in progress.

Remarks

This message stores the filename in an internal structure. It does not create, allocate, or open the specified file. The default capture filename is C:\CAPTURE.AVI.

capFileGetCaptureFile macro

透過 capFileGetCaptureFile macro, 可以得知所錄影的視訊內容, 將會被儲存的檔案名稱。如果使用者沒有透過 capFileSetCaptureFile macro 重新設定過, 內定的名稱為 C:\CAPTURE.AVI。
The capFileGetCaptureFile macro returns the name of the current capture file. You can use this macro or explicitly call the WM_CAP_FILE_GET_CAPTURE_FILE message.

BOOL capFileGetCaptureFile(
hwnd,
szName,
wSize
);

Parameters

hwnd

Handle to a capture window.

szName

Pointer to an application-defined buffer used to return the name of the capture file as a null-terminated string.

wSize

Size, in bytes, of the application-defined buffer referenced by szName.

Return Values

Returns TRUE if successful or FALSE otherwise.

Remarks

The default capture filename is C:\CAPTURE.AVI.

Tuesday, April 17, 2012

capCaptureSequence macro

使用 capCaptureSequence macro 可以將視訊擷取視窗中的視訊與音訊內容儲存成一個 AVI 檔案, 檔案名稱則可以是透過 capFileSetCaptureFile macro 事先設定, 若沒有設定檔案名稱, 則內定為 C:\CAPTURE.AVI。
The capCaptureSequence macro initiates streaming video and audio capture to a file. You can use this macro or explicitly send the WM_CAP_SEQUENCE message.

BOOL capCaptureSequence(
hwnd
);


Parameters

hwnd

Handle of a capture window.

Return Values

Returns TRUE if successful or FALSE otherwise.
If an error occurs and an error callback function is set using the capSetCallbackOnError macro, the error callback function is called.

Remarks

If you want to alter the parameters controlling streaming capture, use the capCaptureSetSetup macro prior to starting the capture.
By default, the capture window does not allow other applications to continue running during capture. To override this, either set the fYield member of the CAPTUREPARMS structure to TRUE, or install a yield callback function.
During streaming capture, the capture window can optionally issue notifications to your application of specific types of conditions. To install callback procedures for these notifications, use the following macros:

capSetCallbackOnError
capSetCallbackOnStatus
capSetCallbackOnVideoStream
capSetCallbackOnWaveStream
capSetCallbackOnYield

Wednesday, April 04, 2012

openGL 的範例程式

C++ Builder 提供了一個關於如何使用 openGL 的範例程式, 在媒體櫃文件目錄中的

RAD Studio\9.0\Sample\CPP\VCL\OpenGL\Drawing\

內有 glskeleton.cppproj 及其相關檔案。

至於 openGL 的標頭檔則是放置於

Embarcadero\RAD Studio\9.0\include\windows\sdk\gl\

內有 gl.h, glaux.h, glu.h 等三個檔案。