playsink: send navigation event to the sink as a fallback
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 15 Mar 2012 12:59:38 +0000 (12:59 +0000)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 15 Mar 2012 13:02:34 +0000 (13:02 +0000)
When the video sink is a fakesink, which does not implement the
navigation interface, playsink will drop the navigation command.
In this case, send to the video sink as a fallback. It breaks
the interface abstraction, but is better than just dropping the
navigation event.

gst/playback/gstplaysink.c

index 0bc70ac..a68b6ae 100644 (file)
@@ -4295,6 +4295,10 @@ gst_play_sink_navigation_send_event (GstNavigation * navigation,
       gst_navigation_send_event (GST_NAVIGATION (nav), structure);
       structure = NULL;
       gst_object_unref (nav);
+    } else {
+      GstEvent *event = gst_event_new_navigation (structure);
+      structure = NULL;
+      gst_element_send_event (GST_ELEMENT (bin), event);
     }
 
     gst_object_unref (bin);