diff options
author | Luis de Bethencourt <luis.bg@samsung.com> | 2015-01-21 15:06:21 +0000 |
---|---|---|
committer | Luis de Bethencourt <luis.bg@samsung.com> | 2015-01-21 15:06:21 +0000 |
commit | 6431de32860cc8b0e24f9973081e488fd50bdbff (patch) | |
tree | ab5d3506835472e087d6f4e3ef6bccf150339c3a /gst/audiovisualizers | |
parent | a657ba9f3b172a35a2caaf27639aa9755fe4768a (diff) | |
download | gstreamer-plugins-bad-6431de32860cc8b0e24f9973081e488fd50bdbff.tar.gz |
audiovisualizer: ensure default query/event handlers are used
Sync audiovisualizer class implementation to the one in gst-plugins-base. This
commit matches 9dd0e6cccc971d8a6bcca4e9e4d2ee1dbb20fffa in that module.
https://bugzilla.gnome.org/show_bug.cgi?id=742875
Diffstat (limited to 'gst/audiovisualizers')
-rw-r--r-- | gst/audiovisualizers/gstaudiovisualizer.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/gst/audiovisualizers/gstaudiovisualizer.c b/gst/audiovisualizers/gstaudiovisualizer.c index ef4974773..0e9d52481 100644 --- a/gst/audiovisualizers/gstaudiovisualizer.c +++ b/gst/audiovisualizers/gstaudiovisualizer.c @@ -81,8 +81,6 @@ static gboolean gst_audio_visualizer_sink_event (GstPad * pad, static gboolean gst_audio_visualizer_src_query (GstPad * pad, GstObject * parent, GstQuery * query); -static gboolean gst_audio_visualizer_sink_query (GstPad * pad, - GstObject * parent, GstQuery * query); static GstStateChangeReturn gst_audio_visualizer_change_state (GstElement * element, GstStateChange transition); @@ -586,8 +584,6 @@ gst_audio_visualizer_init (GstAudioVisualizer * scope, GST_DEBUG_FUNCPTR (gst_audio_visualizer_chain)); gst_pad_set_event_function (scope->sinkpad, GST_DEBUG_FUNCPTR (gst_audio_visualizer_sink_event)); - gst_pad_set_query_function (scope->sinkpad, - GST_DEBUG_FUNCPTR (gst_audio_visualizer_sink_query)); gst_element_add_pad (GST_ELEMENT (scope), scope->sinkpad); pad_template = @@ -1265,7 +1261,7 @@ gst_audio_visualizer_src_event (GstPad * pad, GstObject * parent, scope->earliest_time = timestamp + diff; GST_OBJECT_UNLOCK (scope); - res = gst_pad_push_event (scope->sinkpad, event); + res = gst_pad_event_default (pad, parent, event); break; } case GST_EVENT_RECONFIGURE: @@ -1300,9 +1296,6 @@ gst_audio_visualizer_sink_event (GstPad * pad, GstObject * parent, gst_event_unref (event); break; } - case GST_EVENT_FLUSH_START: - res = gst_pad_push_event (scope->srcpad, event); - break; case GST_EVENT_FLUSH_STOP: gst_audio_visualizer_reset (scope); res = gst_pad_push_event (scope->srcpad, event); @@ -1318,7 +1311,7 @@ gst_audio_visualizer_sink_event (GstPad * pad, GstObject * parent, break; } default: - res = gst_pad_push_event (scope->srcpad, event); + res = gst_pad_event_default (pad, parent, event); break; } @@ -1384,20 +1377,6 @@ gst_audio_visualizer_src_query (GstPad * pad, GstObject * parent, return res; } -static gboolean -gst_audio_visualizer_sink_query (GstPad * pad, GstObject * parent, - GstQuery * query) -{ - gboolean res = FALSE; - - switch (GST_QUERY_TYPE (query)) { - default: - res = gst_pad_query_default (pad, parent, query); - break; - } - return res; -} - static GstStateChangeReturn gst_audio_visualizer_change_state (GstElement * element, GstStateChange transition) |