SourceForge RSS feed   

Overview

Documentation

Examples

VideoJack Plugin

Download

Compatibility

 

Project
Supporters:

The Imaging Source logo

 

 

 

Impressum

 

 

 

Previous:
Video Display
  Next:
Video Format Selection

The unicapgtk_device_selection widget provides functionality to list and display the currently connected video display. The following code will add the device selection to the previous example:

Download example file 'tut_3_3.c'

Remarks:

  1. unicapgtk_device_selection_new creates a new selection widget. We pass TRUE as the first parameter which means that the combo box will include an entry to trigger device rescan.

  2. Since the combo box will be initially empty, we call unicapgtk_device_selection_rescan to fill it with the currently available devices.

  3. The unicapgtk_device_selection_changed signal will be emitted when the user selects a device.

  4. unicap_void_device will initialize a unicap_device_t structure.

  5. The first parameter to unicap_enumerate_devices acts like a filter. After the device structure is initialized with unicap_void_device you can set any field of the structure and get only video devices matching this field when you enumerate the devices. Here we matched on the device_id which means that we should get either exactly one device or none ( if the device got disconnected ).

  6. Set the handle on the video display and start it.

Previous:
Video Display
  Next:
Video Format Selection
  SourceForge.net Logo