Top | ![]() |
![]() |
![]() |
![]() |
gchar * | backend | Read / Write |
guint | backend-fourcc | Read / Write |
gboolean | scale-to-fit | Read / Write |
gboolean | store-original | Read / Write |
GObject ╰── GInitiallyUnowned ╰── GtkObject ╰── GtkWidget ╰── GtkContainer ╰── GtkBin ╰── GtkFrame ╰── GtkAspectFrame ╰── UnicapgtkVideoDisplay
GtkWidget *
unicapgtk_video_display_new (void
);
Creates a new UnicapgtkVideoDisplay
GtkWidget *
unicapgtk_video_display_new_by_device (unicap_device_t *device_spec
);
Creates a new UnicapgtkVideoDisplay and opens the given device to operate with.
GtkWidget *
unicapgtk_video_display_new_by_handle (unicap_handle_t handle
);
Creates a new UnicapgtkVideoDisplay and uses the handle to control the video device. The handle gets cloned by this call.
gboolean
unicapgtk_video_display_start (UnicapgtkVideoDisplay *ugtk
);
Calls unicap_start_capture on the device and starts displaying the live video stream.
void
unicapgtk_video_display_stop (UnicapgtkVideoDisplay *ugtk
);
Calls unicap_stop_capture on the device and stops displaying the live video image.
unicap_device_t *
unicapgtk_video_display_get_device (UnicapgtkVideoDisplay *ugtk
);
Returns the device currently used by the video display. The returned data is owned by the library and should not be freed by the application.
unicap_handle_t
unicapgtk_video_display_get_handle (UnicapgtkVideoDisplay *ugkt
);
Returns a handle to the device currently used by the display. This is a clone of the handle used by the display so unicap_close must be called on this handle by the calling application.
gboolean unicapgtk_video_display_set_format (UnicapgtkVideoDisplay *ugtk
,unicap_format_t *format_spec
);
Sets the video format used by the display. If a handle is set on the display ( ie. the display controls a device ), the video format is also changed and only video formats supported by the device can be set.
void unicapgtk_video_display_get_format (UnicapgtkVideoDisplay *ugtk
,unicap_format_t *format
);
void unicapgtk_video_display_set_pause (UnicapgtkVideoDisplay *ugtk
,gboolean state
);
Pauses or unpauses the video display. If the display is controling a device, the device is not stopped or paused by this call. When the video display is paused, no new frames are retrieved from the device and the display is constantly updated with the last image retrieved from the device.
Buffer display events are still called. This way an application can still draw an overlay onto the image.
gboolean
unicapgtk_video_display_get_pause (UnicapgtkVideoDisplay *ugtk
);
Retrieve current pause state
gboolean unicapgtk_video_display_set_device (UnicapgtkVideoDisplay *ugtk
,unicap_device_t *device_spec
);
Set a new device on the display.
gboolean unicapgtk_video_display_set_handle (UnicapgtkVideoDisplay *ugtk
,unicap_handle_t handle
);
Set a new device on the display, specified by a handle. The handle gets cloned by this call.
GdkPixbuf *
unicapgtk_video_display_get_still_image
(UnicapgtkVideoDisplay *ugtk
);
Retrieves a still image from the live video stream.
void unicapgtk_video_display_set_still_image (UnicapgtkVideoDisplay *ugtk
,unicap_data_buffer_t *buffer
);
Sets a still image. If the video display is currently running, it is put to pause state by this call.
void unicapgtk_video_display_get_data_buffer (UnicapgtkVideoDisplay *ugtk
,unicap_data_buffer_t **dest_buffer
);
Retrieves a still image from the live video stream.
void unicapgtk_video_display_set_crop (UnicapgtkVideoDisplay *ugtk
,UnicapgtkVideoDisplayCropping *crop
);
Set a cropping window. The video display will only display the region specified in the cropping window.
void unicapgtk_video_display_get_crop (UnicapgtkVideoDisplay *ugtk
,UnicapgtkVideoDisplayCropping *crop
);
Retrieves the current cropping window.
void unicapgtk_video_display_set_size (UnicapgtkVideoDisplay *ugtk
,gint width
,gint height
);
Sets the output size of the display. Video data that is to be displayed will be scaled to this size.
void unicapgtk_video_display_set_scale_to_fit (UnicapgtkVideoDisplay *ugtk
,gboolean scale
);
If scale_to_fit is set, the video display will get scaled to the size allocated to the widget.
unicap_new_frame_callback_t unicapgtk_video_display_set_new_frame_callback (UnicapgtkVideoDisplay *ugtk
,UnicapgtkCallbackFlags flags
,unicap_new_frame_callback_t cb
,void *data
);
Registers a callback function which is called in the unicap capture thread context.
typedef struct { int crop_x; int crop_y; int crop_width; int crop_height; } UnicapgtkVideoDisplayCropping;
“backend”
property “backend” gchar *
Owner: UnicapgtkVideoDisplay
Flags: Read / Write
Default value: NULL
“backend-fourcc”
property “backend-fourcc” guint
Owner: UnicapgtkVideoDisplay
Flags: Read / Write
Default value: 0
“scale-to-fit”
property “scale-to-fit” gboolean
Owner: UnicapgtkVideoDisplay
Flags: Read / Write
Default value: FALSE
“unicapgtk-video-display-predisplay”
signalvoid user_function (UnicapgtkVideoDisplay *unicapgtkvideodisplay, gpointer arg1, gpointer user_data)
Flags: Action