From 41bf677dbf7f035f7a40211660d095fae2e8d75b Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Wed, 11 May 2011 18:28:43 +0200 Subject: [PATCH] test patch for enterFullscreen --- .../graphics/gstreamer/GStreamerGWorld.cpp | 24 +++++++++++-------- 1 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp b/Source/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp index d5a612a..a58f68c 100644 --- a/Source/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp +++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp @@ -93,31 +93,35 @@ bool GStreamerGWorld::enterFullscreen() g_object_set(valve, "drop-probability", 1.0, NULL); + // Link a new src pad from tee to queue. + GstPad* srcPad = gst_element_get_request_pad(tee, "src%d"); + gst_pad_set_blocked(srcPad, true); + + GstPad* sinkPad = gst_element_get_static_pad(queue, "sink"); + gst_pad_link(srcPad, sinkPad); + gst_object_unref(GST_OBJECT(sinkPad)); + + m_dynamicPadName = gst_pad_get_name(srcPad); + + // Add and link a queue, ffmpegcolorspace, videoscale and sink in the bin. gst_bin_add_many(GST_BIN(videoSink.get()), platformVideoSink, videoScale, colorspace, queue, NULL); #if GST_CHECK_VERSION(0, 10, 30) // Faster elements linking, if possible. - gst_element_link_pads_full(queue, "src", colorspace, "sink", GST_PAD_LINK_CHECK_NOTHING); - gst_element_link_pads_full(colorspace, "src", videoScale, "sink", GST_PAD_LINK_CHECK_NOTHING); gst_element_link_pads_full(videoScale, "src", platformVideoSink, "sink", GST_PAD_LINK_CHECK_NOTHING); + gst_element_link_pads_full(colorspace, "src", videoScale, "sink", GST_PAD_LINK_CHECK_NOTHING); + gst_element_link_pads_full(queue, "src", colorspace, "sink", GST_PAD_LINK_CHECK_NOTHING); #else gst_element_link_many(queue, colorspace, videoScale, platformVideoSink, NULL); #endif - // Link a new src pad from tee to queue. - GstPad* srcPad = gst_element_get_request_pad(tee, "src%d"); - GstPad* sinkPad = gst_element_get_static_pad(queue, "sink"); - gst_pad_link(srcPad, sinkPad); - gst_object_unref(GST_OBJECT(sinkPad)); - - m_dynamicPadName = gst_pad_get_name(srcPad); - // Roll new elements to pipeline state. gst_element_sync_state_with_parent(queue); gst_element_sync_state_with_parent(colorspace); gst_element_sync_state_with_parent(videoScale); gst_element_sync_state_with_parent(platformVideoSink); + gst_pad_set_blocked(srcPad, false); gst_object_unref(tee); // Query the current media segment informations and send them towards -- 1.7.4.4