CaptureByTimer

Supported Hardware Devices: Pro Capture cards

Contents Demonstrated in the Sample:

  1. Capturing video data from input signals at a specified frame rate
  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. Start video capture: MWStartVideoCapture
  5. Create event: MWCreateEvent
  6. Register timer: MWRegisterTimer
  7. Set time schedule: MWScheduleTimer
  8. Wait for event: MWTryWaitEvent, MWWaitEvent
  9. Capture video data: MWCaptureVideoFrameToVirtualAddressEx
  10. Retrieve current capture status: MWGetVideoCaptureStatus
  11. Repeat steps 7, 8, 9, and 10 until the last frame
  12. Save file
  13. Deregister timer: MWUnregisterTimer
  14. Close event: MWCloseEvent
  15. Stop capture: MWStopVideoCapture
  16. Release resources: MWCloseChannel, MWCaptureExitInstance

Result:

Result

Flowchart:

CaptureByTimer Flowchart

results matching ""

    No results matching ""

    results matching ""

      No results matching ""