mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-13 09:45:27 +00:00
dtmfsrc: Make the dtmfsrc accept events sent with gst_element_send_event
The doc says to use gst_element_send_event on the pipeline, but if we are to call it on the element itself, it's a noop. This should make it handle the event properly before delegating it to basesrc.
This commit is contained in:
parent
b2ce3aab96
commit
9823b9358e
1 changed files with 13 additions and 0 deletions
|
@ -223,6 +223,7 @@ static void gst_dtmf_src_set_property (GObject * object, guint prop_id,
|
||||||
static void gst_dtmf_src_get_property (GObject * object, guint prop_id,
|
static void gst_dtmf_src_get_property (GObject * object, guint prop_id,
|
||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
static gboolean gst_dtmf_src_handle_event (GstBaseSrc * src, GstEvent * event);
|
static gboolean gst_dtmf_src_handle_event (GstBaseSrc * src, GstEvent * event);
|
||||||
|
static gboolean gst_dtmf_src_send_event (GstElement * src, GstEvent * event);
|
||||||
static GstStateChangeReturn gst_dtmf_src_change_state (GstElement * element,
|
static GstStateChangeReturn gst_dtmf_src_change_state (GstElement * element,
|
||||||
GstStateChange transition);
|
GstStateChange transition);
|
||||||
static GstFlowReturn gst_dtmf_src_create (GstBaseSrc * basesrc,
|
static GstFlowReturn gst_dtmf_src_create (GstBaseSrc * basesrc,
|
||||||
|
@ -275,6 +276,7 @@ gst_dtmf_src_class_init (GstDTMFSrcClass * klass)
|
||||||
|
|
||||||
gstelement_class->change_state =
|
gstelement_class->change_state =
|
||||||
GST_DEBUG_FUNCPTR (gst_dtmf_src_change_state);
|
GST_DEBUG_FUNCPTR (gst_dtmf_src_change_state);
|
||||||
|
gstelement_class->send_event = GST_DEBUG_FUNCPTR (gst_dtmf_src_send_event);
|
||||||
gstbasesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_dtmf_src_unlock);
|
gstbasesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_dtmf_src_unlock);
|
||||||
gstbasesrc_class->unlock_stop = GST_DEBUG_FUNCPTR (gst_dtmf_src_unlock_stop);
|
gstbasesrc_class->unlock_stop = GST_DEBUG_FUNCPTR (gst_dtmf_src_unlock_stop);
|
||||||
|
|
||||||
|
@ -403,6 +405,17 @@ gst_dtmf_src_handle_event (GstBaseSrc * src, GstEvent * event)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gst_dtmf_src_send_event (GstElement * element, GstEvent * event)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (gst_dtmf_src_handle_event (GST_BASE_SRC (element), event))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
return GST_ELEMENT_CLASS (parent_class)->send_event (element, event);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_dtmf_src_set_property (GObject * object, guint prop_id,
|
gst_dtmf_src_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec)
|
const GValue * value, GParamSpec * pspec)
|
||||||
|
|
Loading…
Reference in a new issue