CaptureByInput

Supported Hardware Devices: Pro Capture cards

Contents Demonstrated in the Sample:

  1. Capturing video data according to the format of input signals
  2. Saving the last frame of video data as a BMP image
  3. Channel selection via command parameters when multiple devices are available

Call Logic:

  1. Obtain version information, initialize, and enumerate devices: MWGetVersion, MWCaptureInitInstance, MWRefreshDevice, MWGetChannelCount
  2. Filter supported devices based on device and interface information: MWGetChannelInfoByIndex
  3. Open the device:
    1. Open the device specified by command parameters: MWOpenChannel
    2. When no device is specified in command parameters, open the first available channel by default: MWGetDevicePath, MWOpenChannelByPath
  4. Retrieve video signal status: MWGetVideoSignalStatus
  5. Start video capture: MWStartVideoCapture
  6. Create event: MWCreateEvent
  7. Register for message notifications: MWRegisterNotify MWCAP_NOTIFY_VIDEO_FRAME_BUFFERED (normal mode), MWCAP_NOTIFY_VIDEO_FRAME_BUFFERING (low-latency mode)
  8. Wait for event: MWTryWaitEvent, MWWaitEvent
  9. Capture video data: MWCaptureVideoFrameToVirtualAddressEx MWCAP_VIDEO_FRAME_ID_NEWEST_BUFFERED (normal mode), MWCAP_VIDEO_FRAME_ID_NEWEST_BUFFERING (low-latency mode)
  10. Retrieve current capture status: MWGetVideoCaptureStatus
  11. Repeat steps 8, 9, and 10 until the last frame
  12. Save file
  13. Deregister message notifications: MWUnregisterNotify
  14. Close event: MWCloseEvent
  15. Stop capture: MWStopVideoCapture
  16. Release resources: MWCloseChannel, MWCaptureExitInstance

Result:

Result

Result

Flowchart:

CaptureByInput Flowchart

results matching ""

    No results matching ""

    results matching ""

      No results matching ""