basecamerasrc: don't use class offsets for start/stop-capture signal handlers

This commit is contained in:
Raluca Elena Podiuc 2011-07-26 05:59:09 +03:00 committed by Thiago Santos
parent 2d17cd3350
commit 28df77b7b0
2 changed files with 4 additions and 13 deletions

View file

@ -591,26 +591,19 @@ gst_base_camera_src_class_init (GstBaseCameraSrcClass * klass)
/* Signals */
basecamerasrc_signals[START_CAPTURE_SIGNAL] =
g_signal_new ("start-capture",
g_signal_new_class_handler ("start-capture",
G_TYPE_FROM_CLASS (klass),
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);
basecamerasrc_signals[STOP_CAPTURE_SIGNAL] =
g_signal_new ("stop-capture",
g_signal_new_class_handler ("stop-capture",
G_TYPE_FROM_CLASS (klass),
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);
/* 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;
}

View file

@ -121,8 +121,6 @@ struct _GstBaseCameraSrcClass
/* unused */
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. */
gboolean (*start_capture) (GstBaseCameraSrc * src);