MWCapture SDK Mac  3.4.62314
Functions
Pro Capture Family Functions

Functions

HCHANNEL LIBMWCAPTURE_API MWOpenChannel (int nBoardValue, int nChannelIndex)
 Opens capture channel by the rotary number and channel number.
 
MW_RESULT LIBMWCAPTURE_API MWGetDeviceTime (HCHANNEL hChannel, LONGLONG *pllTime)
 Gets time of capture channel.
 
MW_RESULT LIBMWCAPTURE_API MWSetDeviceTime (HCHANNEL hChannel, LONGLONG llTime)
 Sets time of capture channel.
 
MW_RESULT LIBMWCAPTURE_API MWRegulateDeviceTime (HCHANNEL hChannel, LONGLONG llTime)
 Adjusts time of capture channel.
 
HTIMER LIBMWCAPTURE_API MWRegisterTimer (HCHANNEL hChannel, MWHANDLE hEvent)
 Registers a time event object.
 
MW_RESULT LIBMWCAPTURE_API MWUnregisterTimer (HCHANNEL hChannel, HTIMER hTimer)
 Unregisters a time event object.
 
MW_RESULT LIBMWCAPTURE_API MWScheduleTimer (HCHANNEL hChannel, HTIMER hTimer, LONGLONG llExpireTime)
 Schedules time event objects.
 
HNOTIFY LIBMWCAPTURE_API MWRegisterNotify (HCHANNEL hChannel, MWHANDLE hEvent, DWORD dwEnableBits)
 Registers an event notification.
 
MW_RESULT LIBMWCAPTURE_API MWUnregisterNotify (HCHANNEL hChannel, HNOTIFY hNotify)
 Unregisters an event notification object.
 
MW_RESULT LIBMWCAPTURE_API MWGetNotifyStatus (HCHANNEL hChannel, HNOTIFY hNotify, ULONGLONG *pullStatus)
 Gets current notification type.
 
MW_RESULT LIBMWCAPTURE_API MWStartVideoCapture (HCHANNEL hChannel, MWHANDLE hEvent)
 Starts video capture.
 
MW_RESULT LIBMWCAPTURE_API MWStopVideoCapture (HCHANNEL hChannel)
 Stops the video capture.
 
MW_RESULT LIBMWCAPTURE_API MWCaptureVideoFrameToVirtualAddress (HCHANNEL hChannel, int iFrame, MWCAP_PTR pbFrame, DWORD cbFrame, DWORD cbStride, BOOLEAN bBottomUp, MWCAP_PTR64 pvContext, DWORD dwFOURCC, int cx, int cy)
 ‍**
 
MW_RESULT LIBMWCAPTURE_API MWCaptureVideoFrameToVirtualAddressEx (HCHANNEL hChannel, int iFrame, LPBYTE pbFrame, DWORD cbFrame, DWORD cbStride, BOOLEAN bBottomUp, MWCAP_PTR64 pvContext, DWORD dwFOURCC, int cx, int cy, DWORD dwProcessSwitchs, int cyParitalNotify, HOSD hOSDImage, const RECT *pOSDRects, int cOSDRects, SHORT sContrast, SHORT sBrightness, SHORT sSaturation, SHORT sHue, MWCAP_VIDEO_DEINTERLACE_MODE deinterlaceMode, MWCAP_VIDEO_ASPECT_RATIO_CONVERT_MODE aspectRatioConvertMode, const RECT *pRectSrc, const RECT *pRectDest, int nAspectX, int nAspectY, MWCAP_VIDEO_COLOR_FORMAT colorFormat, MWCAP_VIDEO_QUANTIZATION_RANGE quantRange, MWCAP_VIDEO_SATURATION_RANGE satRange)
 ‍**
 
MW_RESULT LIBMWCAPTURE_API MWGetVideoBufferInfo (HCHANNEL hChannel, MWCAP_VIDEO_BUFFER_INFO *pVideoBufferInfo)
 ‍**
 
MW_RESULT LIBMWCAPTURE_API MWGetVideoFrameInfo (HCHANNEL hChannel, BYTE i, MWCAP_VIDEO_FRAME_INFO *pVideoFrameInfo)
 Gets video frame information.
 
MW_RESULT LIBMWCAPTURE_API MWGetVideoCaptureStatus (HCHANNEL hChannel, MWCAP_VIDEO_CAPTURE_STATUS *pStatus)
 Gets video capture state, and frees up system storage.
 
MW_RESULT LIBMWCAPTURE_API MWStartAudioCapture (HCHANNEL hChannel)
 Starts audio capturing of specified channel.
 
MW_RESULT LIBMWCAPTURE_API MWStopAudioCapture (HCHANNEL hChannel)
 Stops audio capturing of specified channel.
 
MW_RESULT LIBMWCAPTURE_API MWCaptureAudioFrame (HCHANNEL hChannel, MWCAP_AUDIO_CAPTURE_FRAME *pAudioCaptureFrame)
 Captures an audio frame.
 
MW_RESULT LIBMWCAPTURE_API MWSetPostReconfig (HCHANNEL hChannel, DWORD dwDelayMS)
 Sends instructions for rereading configurations to delay the execution.
 
MW_RESULT LIBMWCAPTURE_API MWGetTemperature (HCHANNEL hChannel, unsigned int *pnTemp)
 ‍**
 
MW_RESULT LIBMWCAPTURE_API MWGetVideoAutoHAlign (HCHANNEL hChannel, BOOLEAN *pbAuto)
 ‍**
 
MW_RESULT LIBMWCAPTURE_API MWSetVideoAutoHAlign (HCHANNEL hChannel, BOOLEAN bAuto)
 Sets whether the horizontal direction of the video is automatically adjusted according to channel handle.
 
MW_RESULT LIBMWCAPTURE_API MWGetVideoSamplingPhase (HCHANNEL hChannel, BYTE *pbyValue)
 Gets the sampling phase according to channel handle.
 
MW_RESULT LIBMWCAPTURE_API MWSetVideoSamplingPhase (HCHANNEL hChannel, BYTE byValue)
 Sets the sampling phase according to channel handle.
 
MW_RESULT LIBMWCAPTURE_API MWGetVideoSamplingPhaseAutoAdjust (HCHANNEL hChannel, BOOLEAN *pbAuto)
 Gets whether the video sampling phase is automatically adjusted according to channel handle.
 
MW_RESULT LIBMWCAPTURE_API MWSetVideoSamplingPhaseAutoAdjust (HCHANNEL hChannel, BOOLEAN bAuto)
 Sets whether the video sampling phase is automatically adjusted according to channel handle.
 
MW_RESULT LIBMWCAPTURE_API MWSetVideoTiming (HCHANNEL hChannel, MWCAP_VIDEO_TIMING videoTiming)
 Sets the video timing according to channel handle.
 
MW_RESULT LIBMWCAPTURE_API MWGetVideoPreferredTimingArray (HCHANNEL hChannel, MWCAP_VIDEO_TIMING *pVideoTiming, long *plCount)
 Gets the preset video timing array according to channel handle.
 
MW_RESULT LIBMWCAPTURE_API MWSetCustomVideoTiming (HCHANNEL hChannel, MWCAP_VIDEO_CUSTOM_TIMING videoTiming)
 Sets the customized video timing according to channel handle.
 
MW_RESULT LIBMWCAPTURE_API MWGetCustomVideoTimingsCount (HCHANNEL hChannel, DWORD *pdwCount)
 Gets the number of customized video timing according to channel handle.
 
MW_RESULT LIBMWCAPTURE_API MWGetCustomVideoTimingsArray (HCHANNEL hChannel, MWCAP_VIDEO_CUSTOM_TIMING *pVideoCustomTiming, DWORD *pdwCount)
 Gets customized video timing array according to channel handle.
 
MW_RESULT LIBMWCAPTURE_API MWSetCustomVideoTimingsArray (HCHANNEL hChannel, MWCAP_VIDEO_CUSTOM_TIMING *pVideoCustomTiming, DWORD dwCount)
 Sets customized video timing array according to channel handle.
 
MW_RESULT LIBMWCAPTURE_API MWGetCustomVideoResolutionsCount (HCHANNEL hChannel, DWORD *pdwCount)
 Gets the number of customized video resolution according to channel handle.
 
MW_RESULT LIBMWCAPTURE_API MWGetCustomVideoResolutionsArray (HCHANNEL hChannel, MWCAP_SIZE *pResolutionSize, DWORD *pdwCount)
 Gets customized video resolution array according to channel handle.
 
MW_RESULT LIBMWCAPTURE_API MWSetCustomVideoResolutionsArray (HCHANNEL hChannel, MWCAP_SIZE *pResolutionSize, DWORD dwCount)
 Sets customized video resolution array according to channel handle.
 
MWCAP_PTR LIBMWCAPTURE_API MWCreateEvent ()
 Creates events.
 
MW_RESULT LIBMWCAPTURE_API MWCloseEvent (MWCAP_PTR hEvent)
 Destroys the event.
 
MW_RESULT LIBMWCAPTURE_API MWSetEvent (MWCAP_PTR hEvent)
 Triggers the event.
 
MW_RESULT LIBMWCAPTURE_API MWClearEvent (MWCAP_PTR hEvent)
 Resets the event.
 
BOOLEAN LIBMWCAPTURE_API MWIsSetEvent (MWCAP_PTR hEvent)
 Querys whether the event is triggered.
 
int LIBMWCAPTURE_API MWTryWaitEvent (MWCAP_PTR hEvent)
 Waits for the event.
 
int LIBMWCAPTURE_API MWWaitEvent (MWCAP_PTR hEvent, int nTimeout)
 Waits for the event.
 
DWORD LIBMWCAPTURE_API MWMultiWaitEvent (MWCAP_PTR *hEvents, int nCount, int nTimeout)
 Waits for the events.
 

Detailed Description

Function Documentation

◆ MWCaptureAudioFrame()

MW_RESULT LIBMWCAPTURE_API MWCaptureAudioFrame ( HCHANNEL  hChannel,
MWCAP_AUDIO_CAPTURE_FRAME pAudioCaptureFrame 
)

Captures an audio frame.

Parameters
[in]hChannelChannel handle of opened audio capture
[out]pAudioCaptureFrameReturns an audio frame
Returns
Function return values are as follows
MW_SUCCEEDED Function call succeeded.
MW_FAILED Function call failed.
MW_INVALID_PARAMS Input invalid value(s).

Usage:
Captures audio frames.
The usage of the API refers to example AudioCapture.
Related function(s): MWStartAudioCapture
For LPCM to capture up to 8 channel data, the channel correspondence are 0L, 1L, 2L, 3L, 0R, 1R, 2R, 3R.

◆ MWCaptureVideoFrameToVirtualAddress()

MW_RESULT LIBMWCAPTURE_API MWCaptureVideoFrameToVirtualAddress ( HCHANNEL  hChannel,
int  iFrame,
MWCAP_PTR  pbFrame,
DWORD  cbFrame,
DWORD  cbStride,
BOOLEAN  bBottomUp,
MWCAP_PTR64  pvContext,
DWORD  dwFOURCC,
int  cx,
int  cy 
)

‍**

‍**

Captures and saves video frames to system memory.

Parameters
[in]hChannelOpened video capture channel handle
[in]iFrameVideo frame number to be captured
[out]pbFrameStores virtual memory pointers for captured data
[in]cbFrameByte length of memory that stores the captured data
[in]cbStrideStep of memory that stores the captured data
[in]bBottomUpWhether to store the captured video frames from bottom to top
[in]pvContextCustom context pointers
[in]dwFOURCCColor format of captured video frames, see MWFOURCC.h.
[in]cxWidth of captured video frames
[in]cyHeight of captured video frames
Returns
Function return values are as follows
MW_SUCCEEDED Function call succeeded.
MW_FAILED Function call failed.
MW_INVALID_PARAMS Input invalid value(s).

Usage:
Detailed usage refers to the related examples: CaptureByInput, CaptureByTimer.
Related function(s): MWRegisterNotify
MWRegisterTimer

◆ MWCaptureVideoFrameToVirtualAddressEx()

MW_RESULT LIBMWCAPTURE_API MWCaptureVideoFrameToVirtualAddressEx ( HCHANNEL  hChannel,
int  iFrame,
LPBYTE  pbFrame,
DWORD  cbFrame,
DWORD  cbStride,
BOOLEAN  bBottomUp,
MWCAP_PTR64  pvContext,
DWORD  dwFOURCC,
int  cx,
int  cy,
DWORD  dwProcessSwitchs,
int  cyParitalNotify,
HOSD  hOSDImage,
const RECT pOSDRects,
int  cOSDRects,
SHORT  sContrast,
SHORT  sBrightness,
SHORT  sSaturation,
SHORT  sHue,
MWCAP_VIDEO_DEINTERLACE_MODE  deinterlaceMode,
MWCAP_VIDEO_ASPECT_RATIO_CONVERT_MODE  aspectRatioConvertMode,
const RECT pRectSrc,
const RECT pRectDest,
int  nAspectX,
int  nAspectY,
MWCAP_VIDEO_COLOR_FORMAT  colorFormat,
MWCAP_VIDEO_QUANTIZATION_RANGE  quantRange,
MWCAP_VIDEO_SATURATION_RANGE  satRange 
)

‍**

‍** ‍**

Save captured video frames to system memory. It is the extended MWCaptureVideoFrameToVirtualAddress.

Parameters
[in]hChannelVideo channel handle that has started video capturing
[in]iFrameVideo frame number to be captured
[out]pbFramePhysical addresses that store the captured video frames
[in]cbFrameByte length of memory that stores the captured data
[in]cbStrideStep of memory that stores the captured data
[in]bBottomUpWhether to store the captured video frames from bottom to top
[in]pvContextCustom context pointers
[in]dwFOURCCColor format of captured video frames, see MWFOURCC.h.
[in]cxwidth of captured video frames
[in]cyHeight of captured video frames
[in]dwProcessSwitchsImage processing mask. Refers to MWCAP_VIDEO_PROCESS_xx
[in]cyParitalNotifyNumber of rows captured by lines
[in]hOSDImageOSD image handle which is geted using MWCreateImage.
[in]pOSDRectsTarget area of OSD image
[in]cOSDRectsNumber of OSD image target areas
[in]sContrastContrast [50,200]
[in]sBrightnessBrightness [-100,100]
[in]sSaturationSaturation [0,200]
[in]sHueHue [-90,90]
[in]deinterlaceModeDeinterlace Mode
[in]aspectRatioConvertModeAspect Ratio Convert Mode
[in]pRectSrcThe source area of the image to capture
[in]pRectDestThe destination area of the image to capture
[in]nAspectXWidth of the aspect ratio
[in]nAspectYHeight of the aspect ratio
[in]colorFormatColor Format
[in]quantRangeQuantization Range
[in]satRangeSaturation Range
Returns
Function return values are as follows
MW_SUCCEEDED Function call succeeded.
MW_FAILED Function call failed.
MW_INVALID_PARAMS Input invalid value(s).

Usage:
Captures video frames and saves the data to system memory. The extended version of MWCaptureVideoFrameToVirtualAddress which has more parameters for controlling.
Related example: AVCapture.

char path[128];
HCHANNEL t_channel=MWOpenChannelByPath(path);
...
HANDLE hNotifyEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
HANDLE hCaptureEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
MW_RESULT xr;
HOSD hOSD = MWCreateImage(t_channel, CAPTURE_WIDTH, CAPTURE_HEIGHT);
...
xr = MWStartVideoCapture(t_channel, hCaptureEvent);
...
HNOTIFY hNotify = MWRegisterNotify(t_channel, hNotifyEvent, MWCAP_NOTIFY_VIDEO_FRAME_BUFFERED);
...
WaitForSingleObject(hNotifyEvent, INFINITE);
xr = MWGetNotifyStatus(t_channel, hNotify, &ullStatusBits);
MWCAP_VIDEO_BUFFER_INFO videoBufferInfo;
xr = MWGetVideoBufferInfo(t_channel, &videoBufferInfo);
MWCAP_VIDEO_FRAME_INFO videoFrameInfo;
xr = MWGetVideoFrameInfo(t_channel, videoBufferInfo.iNewestBufferedFullFrame, &videoFrameInfo);
m_p_buffer,m_cb_buffer,t_n_stride,FALSE,NULL,m_dw_fourcc,t_n_width,t_n_height,
0,0,NULL,NULL,0,100,0,100,0,MWCAP_VIDEO_DEINTERLACE_BLEND,
xr = MWGetVideoCaptureStatus(t_channel, &captureStatus);
...
xr = MWUnregisterNotify(t_channel, hNotify);
xr = MWStopVideoCapture(t_channel);
...
MWCloseChannel(t_channel);
HCHANNEL LIBMWCAPTURE_API MWOpenChannelByPath(const char *pszDevicePath)
Opens capture channel by device instance path.
MW_RESULT LIBMWCAPTURE_API MWGetDevicePath(int nIndex, char *pDevicePath)
Gets the instance path of capture device based on the index.
HNOTIFY LIBMWCAPTURE_API MWRegisterNotify(HCHANNEL hChannel, MWHANDLE hEvent, DWORD dwEnableBits)
Registers an event notification.
MW_RESULT LIBMWCAPTURE_API MWGetVideoBufferInfo(HCHANNEL hChannel, MWCAP_VIDEO_BUFFER_INFO *pVideoBufferInfo)
‍**
MW_RESULT LIBMWCAPTURE_API MWCaptureVideoFrameToVirtualAddressEx(HCHANNEL hChannel, int iFrame, LPBYTE pbFrame, DWORD cbFrame, DWORD cbStride, BOOLEAN bBottomUp, MWCAP_PTR64 pvContext, DWORD dwFOURCC, int cx, int cy, DWORD dwProcessSwitchs, int cyParitalNotify, HOSD hOSDImage, const RECT *pOSDRects, int cOSDRects, SHORT sContrast, SHORT sBrightness, SHORT sSaturation, SHORT sHue, MWCAP_VIDEO_DEINTERLACE_MODE deinterlaceMode, MWCAP_VIDEO_ASPECT_RATIO_CONVERT_MODE aspectRatioConvertMode, const RECT *pRectSrc, const RECT *pRectDest, int nAspectX, int nAspectY, MWCAP_VIDEO_COLOR_FORMAT colorFormat, MWCAP_VIDEO_QUANTIZATION_RANGE quantRange, MWCAP_VIDEO_SATURATION_RANGE satRange)
‍**
MW_RESULT LIBMWCAPTURE_API MWGetNotifyStatus(HCHANNEL hChannel, HNOTIFY hNotify, ULONGLONG *pullStatus)
Gets current notification type.
MW_RESULT LIBMWCAPTURE_API MWGetVideoCaptureStatus(HCHANNEL hChannel, MWCAP_VIDEO_CAPTURE_STATUS *pStatus)
Gets video capture state, and frees up system storage.
MW_RESULT LIBMWCAPTURE_API MWStartVideoCapture(HCHANNEL hChannel, MWHANDLE hEvent)
Starts video capture.
MW_RESULT LIBMWCAPTURE_API MWGetVideoFrameInfo(HCHANNEL hChannel, BYTE i, MWCAP_VIDEO_FRAME_INFO *pVideoFrameInfo)
Gets video frame information.
MW_RESULT LIBMWCAPTURE_API MWStopVideoCapture(HCHANNEL hChannel)
Stops the video capture.
MW_RESULT LIBMWCAPTURE_API MWUnregisterNotify(HCHANNEL hChannel, HNOTIFY hNotify)
Unregisters an event notification object.
@ MWCAP_VIDEO_SATURATION_UNKNOWN
The default saturation range.
Definition: MWCaptureExtension.h:255
@ MWCAP_VIDEO_QUANTIZATION_UNKNOWN
The default quantization range.
Definition: MWCaptureExtension.h:244
@ MWCAP_VIDEO_ASPECT_RATIO_IGNORE
Ignore: Ignores the original aspect ratio and stretches to full-screen.
Definition: MWCaptureExtension.h:292
@ MWCAP_VIDEO_COLOR_FORMAT_UNKNOWN
unknown color format
Definition: MWCaptureExtension.h:230
@ MWCAP_VIDEO_DEINTERLACE_BLEND
Blend mode.
Definition: MWCaptureExtension.h:281
#define MWCAP_NOTIFY_VIDEO_FRAME_BUFFERED
MWCAP_NOTIFY_VIDEO_FRAME_BUFFERED.
Definition: MWCaptureExtension.h:884
#define MWCAP_VIDEO_FRAME_ID_NEWEST_BUFFERED
MWCAP_VIDEO_FRAME_ID_NEWEST_BUFFERED.
Definition: MWCaptureExtension.h:1173
MWCAP_VIDEO_BUFFER_INFO.
Definition: MWCaptureExtension.h:1116
BYTE iNewestBufferedFullFrame
The sequence number of the latest bufferred frame.
Definition: MWCaptureExtension.h:1125
MWCAP_VIDEO_CAPTURE_STATUS.
Definition: MWCaptureExtension.h:1301
MWCAP_VIDEO_FRAME_INFO.
Definition: MWCaptureExtension.h:1136

◆ MWClearEvent()

MW_RESULT LIBMWCAPTURE_API MWClearEvent ( MWCAP_PTR  hEvent)

Resets the event.

Parameters
[in]hEventEvent
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWCloseEvent()

MW_RESULT LIBMWCAPTURE_API MWCloseEvent ( MWCAP_PTR  hEvent)

Destroys the event.

Parameters
[in]hEventEvent handle
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWCreateEvent()

MWCAP_PTR LIBMWCAPTURE_API MWCreateEvent ( )

Creates events.

Returns
Returns event handle if succeeded, otherwise return 0

◆ MWGetCustomVideoResolutionsArray()

MW_RESULT LIBMWCAPTURE_API MWGetCustomVideoResolutionsArray ( HCHANNEL  hChannel,
MWCAP_SIZE pResolutionSize,
DWORD *  pdwCount 
)

Gets customized video resolution array according to channel handle.

Parameters
[in]hChannelChannel handle
[out]pResolutionSizeCustomized video resolution
[out]pdwCountThe number of customized video resolution
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWGetCustomVideoResolutionsCount()

MW_RESULT LIBMWCAPTURE_API MWGetCustomVideoResolutionsCount ( HCHANNEL  hChannel,
DWORD *  pdwCount 
)

Gets the number of customized video resolution according to channel handle.

Parameters
[in]hChannelChannel handle
[out]pdwCountThe number of customized video resolution
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWGetCustomVideoTimingsArray()

MW_RESULT LIBMWCAPTURE_API MWGetCustomVideoTimingsArray ( HCHANNEL  hChannel,
MWCAP_VIDEO_CUSTOM_TIMING pVideoCustomTiming,
DWORD *  pdwCount 
)

Gets customized video timing array according to channel handle.

Parameters
[in]hChannelChannel handle
[out]pVideoCustomTimingCustomized video timing
[out]pdwCountThe number of customized video timing
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWGetCustomVideoTimingsCount()

MW_RESULT LIBMWCAPTURE_API MWGetCustomVideoTimingsCount ( HCHANNEL  hChannel,
DWORD *  pdwCount 
)

Gets the number of customized video timing according to channel handle.

Parameters
[in]hChannelChannel handle
[out]pdwCountThe number of customized video timing
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWGetDeviceTime()

MW_RESULT LIBMWCAPTURE_API MWGetDeviceTime ( HCHANNEL  hChannel,
LONGLONG *  pllTime 
)

Gets time of capture channel.

Parameters
[in]hChannelOpened video channel handle
[out]pllTimeReturns time of capture channel in 100ns
Returns
Returns MW_RESULT values as follows:
MW_SUCCEEDED Function call succeeded.
MW_FAILED Function call failed.
MW_INVALID_PARAMS Input invalid value(s).
Note
Use the same clock for different channels on the same capture device, which plays an important role in audio and video data synchronization and multichannel data synchronization.

Usage:
Gets device time, uses the same clock for different channels on the same capture device.
It is used by most examples.

char path[128];
HCHANNEL t_channel=MWOpenChannelByPath(path);
...
LONGLONG t_time = 0;
MWGetDeviceTime(t_channel, &t_time);
...
MWCloseChannel(t_channel);
MW_RESULT LIBMWCAPTURE_API MWGetDeviceTime(HCHANNEL hChannel, LONGLONG *pllTime)
Gets time of capture channel.

◆ MWGetNotifyStatus()

MW_RESULT LIBMWCAPTURE_API MWGetNotifyStatus ( HCHANNEL  hChannel,
HNOTIFY  hNotify,
ULONGLONG *  pullStatus 
)

Gets current notification type.

Parameters
[in]hChannelOpened video channel handle
[in]hNotifyHandle of registerred notify event object
[out]pullStatusReturns notification type. The value refers to the note of MWRegisterNotify
Returns
Function return values are as follows
MW_SUCCEEDED Function call succeeded.
MW_FAILED Function call failed.
MW_INVALID_PARAMS Input invalid value(s).

Usage:
The function is used for Pro capture cards to capture video clips by notification type.
The detailed usage refers to example CaptureByInput.
Related function(s): MWRegisterNotify

◆ MWGetTemperature()

MW_RESULT LIBMWCAPTURE_API MWGetTemperature ( HCHANNEL  hChannel,
unsigned int *  pnTemp 
)

‍**

‍** ‍** ‍** ‍**

Gets the temperature of capture card.

Parameters
[in]hChannelOpened channel handle
[out]pnTempCapture card temperature
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWGetVideoAutoHAlign()

MW_RESULT LIBMWCAPTURE_API MWGetVideoAutoHAlign ( HCHANNEL  hChannel,
BOOLEAN *  pbAuto 
)

‍**

‍** ‍** ‍** ‍** ‍** ‍** ‍** ‍** ‍**

Gets whether the horizontal direction of the video is automatically adjusted according to channel handle.

Parameters
[in]hChannelChannel handle
[out]pbAutoWhether the horizontal direction of the video is automatically adjusted
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWGetVideoBufferInfo()

MW_RESULT LIBMWCAPTURE_API MWGetVideoBufferInfo ( HCHANNEL  hChannel,
MWCAP_VIDEO_BUFFER_INFO pVideoBufferInfo 
)

‍**

Gets video bufferring information

Parameters
[in]hChannelVideo channel handle that has started video capturing
[out]pVideoBufferInfoVideo bufferring information
Returns
Function return values are as follows
MW_SUCCEEDED Function call succeeded.
MW_FAILED Function call failed.
MW_INVALID_PARAMS Input invalid value(s).

Usage:
Gets video buffer on-board storage information that gives you the current number of video buffer frames and the frame id being cached.
Detailed usage refers to the related examples: CaptureByInput, CaptureByTimer.
Related function(s): MWRegisterNotify
MWRegisterTimer

◆ MWGetVideoCaptureStatus()

MW_RESULT LIBMWCAPTURE_API MWGetVideoCaptureStatus ( HCHANNEL  hChannel,
MWCAP_VIDEO_CAPTURE_STATUS pStatus 
)

Gets video capture state, and frees up system storage.

Parameters
[in]hChannelVideo channel handle that has started video capturing
[out]pStatusReturns video capture state
Returns
Function return values are as follows:
MW_SUCCEEDED Function call succeeded.
MW_FAILED Function call failed.
MW_INVALID_PARAMS Input invalid value(s).

Usage:
Gets video capture state. After the capture function call is completed, call the function, which gets the capture state while cleaning up the occupied system storage.
Detailed usage refers to the related examples: CaptureByInput, CaptureByTimer.
Related function(s): MWRegisterNotify
MWRegisterTimer

◆ MWGetVideoFrameInfo()

MW_RESULT LIBMWCAPTURE_API MWGetVideoFrameInfo ( HCHANNEL  hChannel,
BYTE  i,
MWCAP_VIDEO_FRAME_INFO pVideoFrameInfo 
)

Gets video frame information.

Parameters
[in]hChannelVideo channel handle that has started video capturing
[in]iVideo frame index
[out]pVideoFrameInfoReturns video frame information
Returns
Function return values are as follows
MW_SUCCEEDED Function call succeeded.
MW_FAILED Function call failed.
MW_INVALID_PARAMS Input invalid value(s).

Usage:
Gets video frame information, including bufferring start and end time with time code.
Detailed usage refers to the related examples: CaptureByInput, CaptureByTimer.
Related function(s): MWRegisterNotify
MWRegisterTimer

◆ MWGetVideoPreferredTimingArray()

MW_RESULT LIBMWCAPTURE_API MWGetVideoPreferredTimingArray ( HCHANNEL  hChannel,
MWCAP_VIDEO_TIMING pVideoTiming,
long *  plCount 
)

Gets the preset video timing array according to channel handle.

Parameters
[in]hChannelChannel handle
[out]pVideoTimingPreset video timing array
[out]plCountCount
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWGetVideoSamplingPhase()

MW_RESULT LIBMWCAPTURE_API MWGetVideoSamplingPhase ( HCHANNEL  hChannel,
BYTE *  pbyValue 
)

Gets the sampling phase according to channel handle.

Parameters
[in]hChannelChannel handle
[out]pbyValueSampling phase
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWGetVideoSamplingPhaseAutoAdjust()

MW_RESULT LIBMWCAPTURE_API MWGetVideoSamplingPhaseAutoAdjust ( HCHANNEL  hChannel,
BOOLEAN *  pbAuto 
)

Gets whether the video sampling phase is automatically adjusted according to channel handle.

Parameters
[in]hChannelChannel handle
[out]pbAutoWhether the video sampling phase is automatically adjusted
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWIsSetEvent()

BOOLEAN LIBMWCAPTURE_API MWIsSetEvent ( MWCAP_PTR  hEvent)

Querys whether the event is triggered.

Parameters
[in]hEventEvent
Returns
Returns TRUE if succeeded, otherwise returns FALSE

◆ MWMultiWaitEvent()

DWORD LIBMWCAPTURE_API MWMultiWaitEvent ( MWCAP_PTR *  hEvents,
int  nCount,
int  nTimeout 
)

Waits for the events.

Parameters
[in]hEventsEvents
[in]nCountThe number of event objects
[in]nTimeoutTimeout period
Returns
Returns event flag if succeeded

◆ MWOpenChannel()

HCHANNEL LIBMWCAPTURE_API MWOpenChannel ( int  nBoardValue,
int  nChannelIndex 
)

Opens capture channel by the rotary number and channel number.

Parameters
[in]nBoardValueRotary number on the capture device, 0 to f
[in]nChannelIndexChannel index, starts from 0
Returns
If the call succeeds, which returns the video channel handle; the call fails, which returns the empty value.
Note
If there are 2 devices with the same rotary number, the one with a smaller PCI-e number will be opened.
The same channel can be opened multiple times at the same time, and the handles that open the same channel are independent of each other and do not affect each other.

Usage:
It is used by all examples.

HCHANNEL t_channel=MWOpenChannel(info.byBoardIndex,info.byChannelIndex);
...
MWCloseChannel(t_channel);
MW_RESULT LIBMWCAPTURE_API MWGetChannelInfoByIndex(int nIndex, MWCAP_CHANNEL_INFO *pChannelInfo)
Gets the channel info by its index.
HCHANNEL LIBMWCAPTURE_API MWOpenChannel(int nBoardValue, int nChannelIndex)
Opens capture channel by the rotary number and channel number.
MWCAP_CHANNEL_INFO.
Definition: MWCaptureExtension.h:410
BYTE byBoardIndex
Rotary ID located on the capture card, 0~F.
Definition: MWCaptureExtension.h:421
BYTE byChannelIndex
Channel index of the capture card, which starts from 0.
Definition: MWCaptureExtension.h:422

◆ MWRegisterNotify()

HNOTIFY LIBMWCAPTURE_API MWRegisterNotify ( HCHANNEL  hChannel,
MWHANDLE  hEvent,
DWORD  dwEnableBits 
)

Registers an event notification.

Parameters
[in]hChannelOpened video channel handle
[in]hEventAn event handle, created by the function MWCreateEvent()
[in]dwEnableBitsType mask for notifications
Returns
Returns the handle to the notification event object if succeeded, otherwise returns NULL.
Note
dwEnableBits can be set to one or more of the following notification types.
MWCAP_NOTIFY_xx
When the notification type you set occurs, the event associated with the notification event object will be set to the signaled state.

Usage:
The API is used to trigger Pro capture cards to capture video clips by notification type.
Detailed usage refers to example CaptureByInput.

char path[128];
HCHANNEL t_channel=MWOpenChannelByPath(path);
...
HANDLE hNotifyEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
HANDLE hCaptureEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
MW_RESULT xr;
xr = MWStartVideoCapture(t_channel, hCaptureEvent);
...
HNOTIFY hNotify = MWRegisterNotify(t_channel, hNotifyEvent, MWCAP_NOTIFY_VIDEO_FRAME_BUFFERED);
...
WaitForSingleObject(hNotifyEvent, INFINITE);
xr = MWGetNotifyStatus(t_channel, hNotify, &ullStatusBits);
MWCAP_VIDEO_BUFFER_INFO videoBufferInfo;
xr = MWGetVideoBufferInfo(t_channel, &videoBufferInfo);
MWCAP_VIDEO_FRAME_INFO videoFrameInfo;
xr = MWGetVideoFrameInfo(t_channel, videoBufferInfo.iNewestBufferedFullFrame, &videoFrameInfo);
xr = MWCaptureVideoFrameToVirtualAddress(t_channel, -1, (LPBYTE)bitmapData.Scan0, bitmapData.Stride * cy, bitmapData.Stride, bBottomUp, NULL, MWFOURCC_BGRA, cx, cy);
WaitForSingleObject(hCaptureEvent, INFINITE);
xr = MWGetVideoCaptureStatus(t_channel, &captureStatus);
...
xr = MWUnregisterNotify(t_channel, hNotify);
xr = MWStopVideoCapture(t_channel);
...
MWCloseChannel(t_channel);
#define MWFOURCC_BGRA
32bits B8G8R8A8
Definition: MWFOURCC.h:166
MW_RESULT LIBMWCAPTURE_API MWCaptureVideoFrameToVirtualAddress(HCHANNEL hChannel, int iFrame, MWCAP_PTR pbFrame, DWORD cbFrame, DWORD cbStride, BOOLEAN bBottomUp, MWCAP_PTR64 pvContext, DWORD dwFOURCC, int cx, int cy)
‍**

◆ MWRegisterTimer()

HTIMER LIBMWCAPTURE_API MWRegisterTimer ( HCHANNEL  hChannel,
MWHANDLE  hEvent 
)

Registers a time event object.

Parameters
[in]hChannelOpened video channel handle
[in]hEventEvent handle, creates with MWCreateEvent()
Returns
If the function succeeds, the return value is a handle to the time event object, otherwise it is NULL.

The API is used for pro capture cards to specify the capture interval between adjacent video frames
Detailed usage refers to example CaptureByTimer.

char path[128];
HCHANNEL t_channel=MWOpenChannelByPath(path);
...
HANDLE hNotifyEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
HANDLE hCaptureEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
MW_RESULT xr;
xr = MWStartVideoCapture(t_channel, hCaptureEvent);
HTIMER hTimerEvent = MWRegisterTimer(t_channel, hNotifyEvent);
LONGLONG llBegin = 0LL;
xr = MWGetDeviceTime(t_channel, &llBegin);
...
xr = MWScheduleTimer(t_channel, hTimerEvent, llBegin + i * TIMER_DURATION);
WaitForSingleObject(hNotifyEvent, INFINITE);
MWCAP_VIDEO_BUFFER_INFO videoBufferInfo;
xr = MWGetVideoBufferInfo(t_channel, &videoBufferInfo);
MWCAP_VIDEO_FRAME_INFO videoFrameInfo;
xr = MWGetVideoFrameInfo(t_channel, videoBufferInfo.iNewestBufferedFullFrame, &videoFrameInfo);
xr = MWCaptureVideoFrameToVirtualAddress(t_channel, -1, (LPBYTE)bitmapData.Scan0, bitmapData.Stride * cy, bitmapData.Stride, bBottomUp, NULL, MWFOURCC_BGRA, cx, cy);
WaitForSingleObject(hCaptureEvent, INFINITE);
xr = MWGetVideoCaptureStatus(t_channel, &captureStatus);
...
xr = MWUnregisterTimer(t_channel, hTimerEvent);
xr = MWStopVideoCapture(t_channel);
...
MWCloseChannel(t_channel);
MW_RESULT LIBMWCAPTURE_API MWUnregisterTimer(HCHANNEL hChannel, HTIMER hTimer)
Unregisters a time event object.
MW_RESULT LIBMWCAPTURE_API MWScheduleTimer(HCHANNEL hChannel, HTIMER hTimer, LONGLONG llExpireTime)
Schedules time event objects.
HTIMER LIBMWCAPTURE_API MWRegisterTimer(HCHANNEL hChannel, MWHANDLE hEvent)
Registers a time event object.

◆ MWRegulateDeviceTime()

MW_RESULT LIBMWCAPTURE_API MWRegulateDeviceTime ( HCHANNEL  hChannel,
LONGLONG  llTime 
)

Adjusts time of capture channel.

Parameters
[in]hChannelOpened video channel handle
[in]llTimeAdjusts time in 100ns.
Returns
Function return values are as follows
MW_SUCCEEDED Function call succeeded.
MW_FAILED Function call failed.
MW_INVALID_PARAMS Input invalid value(s).
Note
Synchronizes clocks of different channels.
The difference between this API and MWSetDeviceTime is that the clock value of the capture channel will calibrate to the set value in a gradual manner instead of a sudden change for this API. The clock value of the capture channel becomes the set time value immediately after setting MWSetDeviceTime if you are using MWSetDeviceTime.

Usage:
Adjusts device time.

char path[128];
HCHANNEL t_channel=MWOpenChannelByPath(path);
...
LONGLONG llStandardTime = 0LL;
xr = MWRegulateDeviceTime(t_channel, llStandardTime);
...
MWCloseChannel(t_channel);
MW_RESULT LIBMWCAPTURE_API MWRegulateDeviceTime(HCHANNEL hChannel, LONGLONG llTime)
Adjusts time of capture channel.

◆ MWScheduleTimer()

MW_RESULT LIBMWCAPTURE_API MWScheduleTimer ( HCHANNEL  hChannel,
HTIMER  hTimer,
LONGLONG  llExpireTime 
)

Schedules time event objects.

Parameters
[in]hChannelOpened video channel handle
[in]hTimerScheduled time event objects
[in]llExpireTimeSets the time value of the scheduled time event, which is the absolute value of the capture device's clock.
Returns
Function return values are as follows
MW_SUCCEEDED Function call succeeded.
MW_FAILED Function call failed.
MW_INVALID_PARAMS Input invalid value(s).
Note
When the scheduled time is reached, the event associated with the time event object will be set to be the signaled state.

Usage:
The API is used for pro capture cards to set the time when the time event object is triggered.
Detailed usage refers to example CaptureByTimer.
Related function(s): MWRegisterTimer

◆ MWSetCustomVideoResolutionsArray()

MW_RESULT LIBMWCAPTURE_API MWSetCustomVideoResolutionsArray ( HCHANNEL  hChannel,
MWCAP_SIZE pResolutionSize,
DWORD  dwCount 
)

Sets customized video resolution array according to channel handle.

Parameters
[in]hChannelChannel handle
[in]pResolutionSizeCustomized video resolution
[in]dwCountThe number of customized video resolution
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWSetCustomVideoTiming()

MW_RESULT LIBMWCAPTURE_API MWSetCustomVideoTiming ( HCHANNEL  hChannel,
MWCAP_VIDEO_CUSTOM_TIMING  videoTiming 
)

Sets the customized video timing according to channel handle.

Parameters
[in]hChannelChannel handle
[in]videoTimingCustomized video timing
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWSetCustomVideoTimingsArray()

MW_RESULT LIBMWCAPTURE_API MWSetCustomVideoTimingsArray ( HCHANNEL  hChannel,
MWCAP_VIDEO_CUSTOM_TIMING pVideoCustomTiming,
DWORD  dwCount 
)

Sets customized video timing array according to channel handle.

Parameters
[in]hChannelChannel handle
[in]pVideoCustomTimingCustomized video timing
[in]dwCountThe number of customized video timing
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWSetDeviceTime()

MW_RESULT LIBMWCAPTURE_API MWSetDeviceTime ( HCHANNEL  hChannel,
LONGLONG  llTime 
)

Sets time of capture channel.

Parameters
[in]hChannelOpened video channel handle
[in]llTimeSets the time of the capture channel, which is in 100 nanoseconds
Returns
Function return values are as follows
MW_SUCCEEDED Function call succeeded.
MW_FAILED Function call failed.
MW_INVALID_PARAMS Input invalid value(s).
Note
Synchronizes clocks of different devices.

Usage:
Sets the clock of capture device.

char path[128];
HCHANNEL t_channel=MWOpenChannelByPath(path);
...
LONGLONG t_time = 0;
t_time=...;
...
MWSetDeviceTime(t_channel, t_time);
...
MWCloseChannel(t_channel);

◆ MWSetEvent()

MW_RESULT LIBMWCAPTURE_API MWSetEvent ( MWCAP_PTR  hEvent)

Triggers the event.

Parameters
[in]hEventEvent
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWSetPostReconfig()

MW_RESULT LIBMWCAPTURE_API MWSetPostReconfig ( HCHANNEL  hChannel,
DWORD  dwDelayMS 
)

Sends instructions for rereading configurations to delay the execution.

Parameters
[in]hChannelOpened channel handle
[in]dwDelayMSDelay time in milliseconds
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWSetVideoAutoHAlign()

MW_RESULT LIBMWCAPTURE_API MWSetVideoAutoHAlign ( HCHANNEL  hChannel,
BOOLEAN  bAuto 
)

Sets whether the horizontal direction of the video is automatically adjusted according to channel handle.

Parameters
[in]hChannelChannel handle
[in]bAutoWhether the horizontal direction of the video is automatically adjusted
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWSetVideoSamplingPhase()

MW_RESULT LIBMWCAPTURE_API MWSetVideoSamplingPhase ( HCHANNEL  hChannel,
BYTE  byValue 
)

Sets the sampling phase according to channel handle.

Parameters
[in]hChannelChannel handle
[in]byValueSampling phase
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWSetVideoSamplingPhaseAutoAdjust()

MW_RESULT LIBMWCAPTURE_API MWSetVideoSamplingPhaseAutoAdjust ( HCHANNEL  hChannel,
BOOLEAN  bAuto 
)

Sets whether the video sampling phase is automatically adjusted according to channel handle.

Parameters
[in]hChannelChannel handle
[in]bAutoWhether the video sampling phase is automatically adjusted
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWSetVideoTiming()

MW_RESULT LIBMWCAPTURE_API MWSetVideoTiming ( HCHANNEL  hChannel,
MWCAP_VIDEO_TIMING  videoTiming 
)

Sets the video timing according to channel handle.

Parameters
[in]hChannelChannel handle
[in]videoTimingVideo timing
Returns
Returns MW_SUCCEED if succeeded, otherwise returns MW_FAILED or MW_INVALID_PARAMS

◆ MWStartAudioCapture()

MW_RESULT LIBMWCAPTURE_API MWStartAudioCapture ( HCHANNEL  hChannel)

Starts audio capturing of specified channel.

Parameters
[in]hChannelOpened channel handle
Returns
Function return values are as follows
MW_SUCCEEDED Function call succeeded.
MW_FAILED Function call failed.
MW_INVALID_PARAMS Input invalid value(s).

Usage:
Starts audio capturing of specified channel.
The usage of the API refers to example AudioCapture.

char path[128];
HCHANNEL t_channel=MWOpenChannelByPath(path);
...
HANDLE hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
...
xr = MWStartAudioCapture(t_channel);
...
WaitForSingleObject(hEvent, INFINITE);
ULONGLONG ullStatusBits = 0LL;
MWGetNotifyStatus(t_channel, hNotify, &ullStatusBits);
if (ullStatusBits & MWCAP_NOTIFY_AUDIO_FRAME_BUFFERED) {
xr = MWCaptureAudioFrame(t_channel, &audioFrame);
...
}
...
xr = MWUnregisterNotify(t_channel, hNotify);
xr = MWStopVideoCapture(t_channel);
...
MWCloseChannel(t_channel);
MW_RESULT LIBMWCAPTURE_API MWStartAudioCapture(HCHANNEL hChannel)
Starts audio capturing of specified channel.
MW_RESULT LIBMWCAPTURE_API MWCaptureAudioFrame(HCHANNEL hChannel, MWCAP_AUDIO_CAPTURE_FRAME *pAudioCaptureFrame)
Captures an audio frame.
#define MWCAP_NOTIFY_AUDIO_FRAME_BUFFERED
MWCAP_NOTIFY_AUDIO_FRAME_BUFFERED.
Definition: MWCaptureExtension.h:905
#define MWCAP_NOTIFY_AUDIO_SIGNAL_CHANGE
MWCAP_NOTIFY_AUDIO_SIGNAL_CHANGE.
Definition: MWCaptureExtension.h:843
MWCAP_AUDIO_CAPTURE_FRAME.
Definition: MWCaptureExtension.h:1343

◆ MWStartVideoCapture()

MW_RESULT LIBMWCAPTURE_API MWStartVideoCapture ( HCHANNEL  hChannel,
MWHANDLE  hEvent 
)

Starts video capture.

Parameters
[in]hChannelOpened video channel handle
[in]hEventAn event handle, which is created by MWCreateEvent().
Returns
Function return values are as follows
MW_SUCCEEDED Function call succeeded.
MW_FAILED Function call failed.
MW_INVALID_PARAMS Input invalid value(s).

Usage:
It is uses for Pro capture cards.
Detailed usage refers to the related examples: CaptureByInput, CaptureByTimer.
Related function(s): MWRegisterNotify
MWRegisterTimer

◆ MWStopAudioCapture()

MW_RESULT LIBMWCAPTURE_API MWStopAudioCapture ( HCHANNEL  hChannel)

Stops audio capturing of specified channel.

Parameters
[in]hChannelchannel handle of opened audio capture
Returns
Function return values are as follows
MW_SUCCEEDED Function call succeeded.
MW_FAILED Function call failed.
MW_INVALID_PARAMS Input invalid value(s).

Usage:
Stops audio capturing of specified channel.
Usage:\nRelated example: AudioCapture
The API is used together with MWStartAudioCapture.

◆ MWStopVideoCapture()

MW_RESULT LIBMWCAPTURE_API MWStopVideoCapture ( HCHANNEL  hChannel)

Stops the video capture.

Parameters
[in]hChannelOpened handle of video capture channel
Returns
Function return values are as follows
MW_SUCCEEDED Function call succeeded.
MW_FAILED Function call failed.
MW_INVALID_PARAMS Input invalid value(s).

Usage:
Detailed usage refers to the related examples: CaptureByInput, CaptureByTimer.
Related function(s): MWRegisterNotify
MWRegisterTimer

◆ MWTryWaitEvent()

int LIBMWCAPTURE_API MWTryWaitEvent ( MWCAP_PTR  hEvent)

Waits for the event.

Parameters
[in]hEventEvent
Returns
Returns 1 if succeeded

◆ MWUnregisterNotify()

MW_RESULT LIBMWCAPTURE_API MWUnregisterNotify ( HCHANNEL  hChannel,
HNOTIFY  hNotify 
)

Unregisters an event notification object.

Parameters
[in]hChannelChannel handle
[in]hNotifyEvent notification
Returns
Function return values are as follows
MW_SUCCEEDED Function call succeeded.
MW_FAILED Function call failed.
MW_INVALID_PARAMS Input invalid value(s).

Usage:
The API is used for Pro capture cards to capture by the notification type.
Detailed usage refers to example CaptureByInput.
Related function(s): MWRegisterNotify

◆ MWUnregisterTimer()

MW_RESULT LIBMWCAPTURE_API MWUnregisterTimer ( HCHANNEL  hChannel,
HTIMER  hTimer 
)

Unregisters a time event object.

Parameters
[in]hChannelOpened video channel handle
[in]hTimerHandle of time event object that has been registered
Returns
Returns MW_RESULT, the values are as follows
MW_SUCCEEDED Function call succeeded.
MW_FAILED Function call failed.
MW_INVALID_PARAMS Input invalid value(s).

Usage:
The API is used for pro capture cards that specify the capture interval between adjacent video frames.
Detailed usage refers to example CapturebyTimer.
Related function(s): MWRegisterTimer(HCHANNEL hChannel, HANDLE hEvent)

◆ MWWaitEvent()

int LIBMWCAPTURE_API MWWaitEvent ( MWCAP_PTR  hEvent,
int  nTimeout 
)

Waits for the event.

Parameters
[in]hEventEvent
[in]nTimeoutTimeout period
Returns
Returns 1 if succeeded