mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 13:18:52 +00:00
basecamerasrc: don't use class offsets for start/stop-capture signal handlers
This commit is contained in:
parent
2d17cd3350
commit
28df77b7b0
2 changed files with 4 additions and 13 deletions
|
@ -591,26 +591,19 @@ gst_base_camera_src_class_init (GstBaseCameraSrcClass * klass)
|
||||||
|
|
||||||
/* Signals */
|
/* Signals */
|
||||||
basecamerasrc_signals[START_CAPTURE_SIGNAL] =
|
basecamerasrc_signals[START_CAPTURE_SIGNAL] =
|
||||||
g_signal_new ("start-capture",
|
g_signal_new_class_handler ("start-capture",
|
||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
||||||
G_STRUCT_OFFSET (GstBaseCameraSrcClass, private_start_capture),
|
G_CALLBACK (gst_base_camera_src_start_capture),
|
||||||
NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
|
NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
|
||||||
|
|
||||||
basecamerasrc_signals[STOP_CAPTURE_SIGNAL] =
|
basecamerasrc_signals[STOP_CAPTURE_SIGNAL] =
|
||||||
g_signal_new ("stop-capture",
|
g_signal_new_class_handler ("stop-capture",
|
||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
||||||
G_STRUCT_OFFSET (GstBaseCameraSrcClass, private_stop_capture),
|
G_CALLBACK (gst_base_camera_src_stop_capture),
|
||||||
NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
|
NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
|
||||||
|
|
||||||
/* TODO these should be moved to a private struct
|
|
||||||
* that is allocated sequentially to the main struct as said at:
|
|
||||||
* http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#g-type-add-class-private
|
|
||||||
*/
|
|
||||||
klass->private_start_capture = gst_base_camera_src_start_capture;
|
|
||||||
klass->private_stop_capture = gst_base_camera_src_stop_capture;
|
|
||||||
|
|
||||||
gstelement_class->change_state = gst_base_camera_src_change_state;
|
gstelement_class->change_state = gst_base_camera_src_change_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -121,8 +121,6 @@ struct _GstBaseCameraSrcClass
|
||||||
/* unused */
|
/* unused */
|
||||||
GstCaps * (*get_allowed_input_caps) (GstBaseCameraSrc * self);
|
GstCaps * (*get_allowed_input_caps) (GstBaseCameraSrc * self);
|
||||||
|
|
||||||
void (*private_start_capture) (GstBaseCameraSrc * src);
|
|
||||||
void (*private_stop_capture) (GstBaseCameraSrc * src);
|
|
||||||
/* Called by the handler for 'start-capture'. Mandatory. */
|
/* Called by the handler for 'start-capture'. Mandatory. */
|
||||||
gboolean (*start_capture) (GstBaseCameraSrc * src);
|
gboolean (*start_capture) (GstBaseCameraSrc * src);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue