Bug 89314

Summary: [GStreamer] optimize ::naturalSize()
Product: WebKit Reporter: Philippe Normand <pnormand>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, feature-media-reviews, gustavo, menard, mrobinson, pnormand, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mrobinson: review+

Philippe Normand
Reported 2012-06-17 12:28:53 PDT
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).
Attachments
Patch (5.13 KB, patch)
2012-06-17 12:39 PDT, Philippe Normand
mrobinson: review+
Philippe Normand
Comment 1 2012-06-17 12:39:12 PDT
Martin Robinson
Comment 2 2012-06-17 19:19:38 PDT
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?
Philippe Normand
Comment 3 2012-06-17 19:23:21 PDT
(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!
Philippe Normand
Comment 4 2012-06-17 19:41:18 PDT
(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
Philippe Normand
Comment 5 2012-06-17 19:43:48 PDT
Note You need to log in before you can comment on or make changes to this bug.