playsink: Also send SEEK events directly to a subpicture sink
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 18 Aug 2009 09:15:41 +0000 (11:15 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 18 Aug 2009 09:15:41 +0000 (11:15 +0200)
gst/playback/gstplaysink.c

index fcf83da..2a8a090 100644 (file)
@@ -2379,6 +2379,8 @@ gst_play_sink_handle_message (GstBin * bin, GstMessage * message)
 
 /* Send an event to our sinks until one of them works; don't then send to the
  * remaining sinks (unlike GstBin)
 
 /* Send an event to our sinks until one of them works; don't then send to the
  * remaining sinks (unlike GstBin)
+ * Special case: If a subpicture or text sink is set we need to send the event
+ * to them in case it's source is different from the a/v stream's source.
  */
 static gboolean
 gst_play_sink_send_event_to_sink (GstPlaySink * playsink, GstEvent * event)
  */
 static gboolean
 gst_play_sink_send_event_to_sink (GstPlaySink * playsink, GstEvent * event)
@@ -2394,6 +2396,15 @@ gst_play_sink_send_event_to_sink (GstPlaySink * playsink, GstEvent * event)
     }
   }
 
     }
   }
 
+  if (playsink->subpchain && playsink->subpchain->sink) {
+    gst_event_ref (event);
+    if ((res = gst_element_send_event (playsink->subpchain->chain.bin, event))) {
+      GST_DEBUG_OBJECT (playsink, "Sent event succesfully to subpicture sink");
+    } else {
+      GST_DEBUG_OBJECT (playsink, "Event failed when sent to subpicture sink");
+    }
+  }
+
   if (playsink->videochain) {
     gst_event_ref (event);
     if ((res = gst_element_send_event (playsink->videochain->chain.bin, event))) {
   if (playsink->videochain) {
     gst_event_ref (event);
     if ((res = gst_element_send_event (playsink->videochain->chain.bin, event))) {