Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.02 KB | None | 0 0
  1. diff --git a/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp b/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp
  2. index d861042..8c91180 100644
  3. --- a/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp
  4. +++ b/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp
  5. @@ -87,6 +87,9 @@ bool GStreamerGWorld::enterFullscreen()
  6. GOwnPtr<GstElement> videoSink;
  7. g_object_get(m_pipeline, "video-sink", &videoSink.outPtr(), NULL);
  8. GstElement* tee = gst_bin_get_by_name(GST_BIN(videoSink.get()), "videoTee");
  9. + GstElement* identity = gst_bin_get_by_name(GST_BIN(videoSink.get()), "wkvideosinkidentity");
  10. +
  11. + g_object_set(identity, "drop-probability", 1.0, NULL);
  12.  
  13. // Add and link a queue, ffmpegcolorspace and sink in the bin.
  14. gst_bin_add_many(GST_BIN(videoSink.get()), platformVideoSink, videoScale, colorspace, queue, NULL);
  15. @@ -158,6 +161,10 @@ void GStreamerGWorld::exitFullscreen()
  16. GstElement* colorspace = gst_bin_get_by_name(GST_BIN(videoSink.get()), "colorspace");
  17. GstElement* videoScale = gst_bin_get_by_name(GST_BIN(videoSink.get()), "videoScale");
  18.  
  19. + GstElement* identity = gst_bin_get_by_name(GST_BIN(videoSink.get()), "wkvideosinkidentity");
  20. +
  21. + g_object_set(identity, "drop-probability", 0.0, NULL);
  22. +
  23. // Get pads to unlink and remove.
  24. GstPad* srcPad = gst_element_get_static_pad(tee, m_dynamicPadName);
  25. GstPad* sinkPad = gst_element_get_static_pad(queue, "sink");
  26. diff --git a/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
  27. index 7012c9f..8c34a1c 100644
  28. --- a/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
  29. +++ b/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
  30. @@ -1412,6 +1412,7 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin()
  31. m_videoSinkBin = gst_bin_new("sink");
  32. GstElement* videoTee = gst_element_factory_make("tee", "videoTee");
  33. GstElement* queue = gst_element_factory_make("queue", 0);
  34. + GstElement* identity = gst_element_factory_make("identity", "wkvideosinkidentity");
  35.  
  36. // Take ownership.
  37. g_object_ref_sink(m_videoSinkBin);
  38. @@ -1421,7 +1422,7 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin()
  39. // internal video sink. For fullscreen we create an autovideosink
  40. // and initially block the data flow towards it and configure it
  41.  
  42. - gst_bin_add_many(GST_BIN(m_videoSinkBin), videoTee, queue, NULL);
  43. + gst_bin_add_many(GST_BIN(m_videoSinkBin), videoTee, queue, identity, NULL);
  44.  
  45. // Link a new src pad from tee to queue1.
  46. GstPad* srcPad = gst_element_get_request_pad(videoTee, "src%d");
  47. @@ -1445,7 +1446,7 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin()
  48. }
  49. } else {
  50. gst_bin_add(GST_BIN(m_videoSinkBin), m_webkitVideoSink);
  51. - gst_element_link(queue, m_webkitVideoSink);
  52. + gst_element_link_many(queue, identity, m_webkitVideoSink, NULL);
  53. }
  54.  
  55. // Add a ghostpad to the bin so it can proxy to tee.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement