diff --git a/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp b/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp index 1cb561e..c056e95 100644 --- a/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp +++ b/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp @@ -87,6 +87,9 @@ bool GStreamerGWorld::enterFullscreen() GOwnPtr videoSink; g_object_get(m_pipeline, "video-sink", &videoSink.outPtr(), NULL); GstElement* tee = gst_bin_get_by_name(GST_BIN(videoSink.get()), "videoTee"); + GstElement* identity = gst_bin_get_by_name(GST_BIN(videoSink.get()), "wkvideosinkidentity"); + + g_object_set(identity, "drop-probability", 1.0, NULL); // Add and link a queue, ffmpegcolorspace and sink in the bin. gst_bin_add_many(GST_BIN(videoSink.get()), platformVideoSink, videoScale, colorspace, queue, NULL); @@ -158,6 +161,10 @@ void GStreamerGWorld::exitFullscreen() GstElement* colorspace = gst_bin_get_by_name(GST_BIN(videoSink.get()), "colorspace"); GstElement* videoScale = gst_bin_get_by_name(GST_BIN(videoSink.get()), "videoScale"); + GstElement* identity = gst_bin_get_by_name(GST_BIN(videoSink.get()), "wkvideosinkidentity"); + + g_object_set(identity, "drop-probability", 0.0, NULL); + // Get pads to unlink and remove. GstPad* srcPad = gst_element_get_static_pad(tee, m_dynamicPadName); GstPad* sinkPad = gst_element_get_static_pad(queue, "sink"); diff --git a/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp index 7012c9f..8c34a1c 100644 --- a/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp +++ b/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp @@ -1412,6 +1412,7 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin() m_videoSinkBin = gst_bin_new("sink"); GstElement* videoTee = gst_element_factory_make("tee", "videoTee"); GstElement* queue = gst_element_factory_make("queue", 0); + GstElement* identity = gst_element_factory_make("identity", "wkvideosinkidentity"); // Take ownership. g_object_ref_sink(m_videoSinkBin); @@ -1421,7 +1422,7 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin() // internal video sink. For fullscreen we create an autovideosink // and initially block the data flow towards it and configure it - gst_bin_add_many(GST_BIN(m_videoSinkBin), videoTee, queue, NULL); + gst_bin_add_many(GST_BIN(m_videoSinkBin), videoTee, queue, identity, NULL); // Link a new src pad from tee to queue1. GstPad* srcPad = gst_element_get_request_pad(videoTee, "src%d"); @@ -1445,7 +1446,7 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin() } } else { gst_bin_add(GST_BIN(m_videoSinkBin), m_webkitVideoSink); - gst_element_link(queue, m_webkitVideoSink); + gst_element_link_many(queue, identity, m_webkitVideoSink, NULL); } // Add a ghostpad to the bin so it can proxy to tee.