Previous | Contents | Next
3.2.3 IBandiCapture::Start
Start video/audio capture and encoding.
HRESULT Start(LPCWSTR pwszFilePath, HWND hParentWnd, INT nCaptureMode, LONG_PTR lpParam);
-
Parameters
-
LPCWSTR pwszFilePath
-
[in] Path of video file to decode. This path must be full path where the video file will be placed.
-
HWND hParentWnd
-
[in] Specifies window handle which receives capture related events. This parameter is ignored in current version of BCL.
-
INT nCaptureMode
-
[in] Specifies capture mode. allowable value is shown below.
-
BCAP_MODE_GDI
-
Capture GDI device. User specifies which window to be captured by passing windows handle(HWND) to lpParam parameter.
-
BCAP_MODE_D3D9
-
Capture DirectX 9.0 device. User specifies which direct3d device is to be captured by passing (IDirect3DDevice9*) to lpParam parameter. Captured screen may be stretched or shrunken by using CPU if the surface is not same width/height as captured video file.
-
This mode stops capturing when device is changed(ex: toggled to full screen).
-
BCAP_MODE_D3D9_SCALE
-
Capture DirectX 9 device. User specifies which direct3d device to be captured by passing device interface(IDirect3DDevice9*) to lpParam parameter.
-
Captured screen may be stretched or shrunken by calling IDirect3DDevice9::StretchRect() if the surface is not same width, height as captured video file. This mode don't stop capturing though device is changed(ex: toggled to full screen). Though application screen is too big to encode, this mode can process much smaller size video stream.
-
BCAP_MODE_D3D9_SWAPCHAIN
-
Capture DirectX 9 device. User specifies which direct3d swapchain to be captured by passing swapchain interface(IDirect3DSwapChain9*) to lpParam parameter.
-
Captured screen may be stretched or shrunken by calling IDirect3DDevice9::StretchRect() if the surface is not same width, height as captured video file. This mode don't stop capturing though device is changed(ex: toggled to full screen). Though application screen is too big to encode, this mode can process much smaller size video stream.
-
BCAP_MODE_D3D8
-
Capture DirectX 8 device. User specifies which direct3d 8 device to be captured by passing device interface(IDirect3DDevice8*) to lpParam parameter.
-
This mode stops capturing when device is changed(ex: toggled to full screen).
-
BCAP_MODE_D3D10
-
Capture DirectX 10 device. User specifies which direct3d 10.0 device to be captured by passing device interface(IDXGISwapChain*) to lpParam parameter.
-
This mode stops capturing when device is changed(ex: toggled to full screen).
-
BCAP_MODE_GL
-
Capture OpenGL screen. User must pass NULL to lpParam to specify OpenGL screen.
-
This mode stops capturing when device is changed(ex: toggled to full screen).
-
BCAP_MODE_DDRAW7
-
Capture DirectDraw 7 surface. User specifies which ddraw7 surface to be captured by passing backbuffer interface(IDirectDrawSurface7*) to lpParam parameter.
-
This mode stops capturing when device is changed(ex: toggled to full screen).
-
BCAP_MODE_D3D11
-
Capture DirectX 11 device. User specifies which direct3d 11.0 device to be captured by passing device interface(IDXGISwapChain*) to lpParam parameter.
-
This mode stops capturing when device is changed(ex: toggled to full screen).
-
LONG_PTR lpParam
-
[in] As capture data parameter, this parameters must be set different value according to capture mode(nCaptureMode)
-
BCAP_MODE_GDI : Window handle of specific window to be captured (HWND)
-
BCAP_MODE_D3D9 : Pointer of Direct3D9 interface to be captured (IDirect3DDevice9*)
-
BCAP_MODE_D3D9_SCALE : Pointer of Direct3D9 interface to be captured (IDirect3DDevice9*)
-
BCAP_MODE_D3D9_SWAPCHAIN : Pointer of Direct3D9 swapchain interface to be captured (IDirect3DSwapChain9*)
-
BCAP_MODE_D3D8 : Pointer of Direct3D8 interface to be captured (IDirect3DDevice8*)
-
BCAP_MODE_D3D10 : Pointer of IDXGISwapChain interface to be captured (IDXGISwapChain*)
-
BCAP_MODE_GL : If Open GL is captured, No need to set the parameter(NULL)
-
BCAP_MODE_DDRAW7 : Pointer of DDRAW7 Backbuffer interface to be captured (IDirectDrawSurface7*)
-
BCAP_MODE_D3D11 : Pointer of IDXGISwapChain interface to be captured (IDXGISwapChain*)
-
Return Value
-
BC_OK_ONLY_VIDEO
-
Created only video stream.
-
BC_OK_ONLY_AUDIO
-
Created only audio stream.
-
BCERR_INVALIDARG
-
Passed invalid parameters
-
BCERR_VIDEO_CAPTURE
-
An error occurred in video capture module.
-
BCERR_AUDIO_CAPTURE
-
An error occurred in audio capture module.
-
Caution
-
Different capture mode (nCaptureMode) must have different meaning of lpParam value. If don't be given appropriate value according to capture mode, it may cause problems such as system crash, hang, shut down, etc.
-
Windows Vista users should acquire administrator privileged by UAC to save video file in the program folder(e.g. c:\Program Files\OOOOOO\Capture\) If don't acquire administration privilege, capture processing can't start.
Copyright(C) 2008-2019 Bandicam.com, https://www.bandicam.com
Bandi Capture Library 2.1.0.190 created : 2017-02-03 PM 3:34:53