[gst-cvs] gst-plugins-base: playsink: If a custom text sink is used, send events to it too
Sebastian Dröge
slomo at kemper.freedesktop.org
Mon Aug 17 23:41:31 PDT 2009
Module: gst-plugins-base
Branch: master
Commit: b5f84c0637accead6ad2ccda84b7aae7ddeb87b7
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=b5f84c0637accead6ad2ccda84b7aae7ddeb87b7
Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date: Tue Aug 18 08:39:02 2009 +0200
playsink: If a custom text sink is used, send events to it too
Before, SEEK events would be sent to the video sink, which wouldn't
be linked in any way to the subtitle part of the pipeline and
subparse would never see the SEEK event. This would then seek
the audio/video but the subtitles would continue from the old
position instead.
Fixes bug #591664.
---
gst/playback/gstplaysink.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c
index 0a65a4f..fcf83da 100644
--- a/gst/playback/gstplaysink.c
+++ b/gst/playback/gstplaysink.c
@@ -2385,6 +2385,15 @@ gst_play_sink_send_event_to_sink (GstPlaySink * playsink, GstEvent * event)
{
gboolean res = TRUE;
+ if (playsink->textchain && playsink->textchain->sink) {
+ gst_event_ref (event);
+ if ((res = gst_element_send_event (playsink->textchain->chain.bin, event))) {
+ GST_DEBUG_OBJECT (playsink, "Sent event succesfully to text sink");
+ } else {
+ GST_DEBUG_OBJECT (playsink, "Event failed when sent to text sink");
+ }
+ }
+
if (playsink->videochain) {
gst_event_ref (event);
if ((res = gst_element_send_event (playsink->videochain->chain.bin, event))) {
@@ -2401,6 +2410,7 @@ gst_play_sink_send_event_to_sink (GstPlaySink * playsink, GstEvent * event)
}
GST_DEBUG_OBJECT (playsink, "Event failed when sent to audio sink");
}
+
done:
gst_event_unref (event);
return res;
More information about the Gstreamer-commits
mailing list