Above method is called very often. It calls webkitGstElementGetPadCaps() which gets the video sink sinkpad every time. Instead we should simply keep track of that sinkpad in the player and change webkitGstElementGetPadCaps() to webkitGstGetPadCaps(GstPad* pad).
Created attachment 148020 [details] Patch
Comment on attachment 148020 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=148020&action=review > Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.cpp:24 > #include "GStreamerVersioning.h" > > +#include <gst/gst.h> No space necessary here. > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1679 > + m_videoSinkPad = adoptGRef(gst_element_get_static_pad(m_webkitVideoSink, "sink")); Are there any situations where the sink can change?
(In reply to comment #2) > > > Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1679 > > + m_videoSinkPad = adoptGRef(gst_element_get_static_pad(m_webkitVideoSink, "sink")); > > Are there any situations where the sink can change? Not in this pipeline configuration. The video-sink is configured using a property of playbin2, which is set only once, in the ::createGSTPlayBin() method. Thanks for the review!
(In reply to comment #2) > (From update of attachment 148020 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=148020&action=review > > > Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.cpp:24 > > #include "GStreamerVersioning.h" > > > > +#include <gst/gst.h> > > No space necessary here. > Actually it is necessary. Otherwise the style bot complains: Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.cpp:22: You should add a blank line after implementation file's own header. [build/include_order] [4] Total errors found: 1 in 1 files
Committed r120563: <http://trac.webkit.org/changeset/120563>