Changeset 135705 in webkit
- Timestamp:
- Nov 26, 2012 4:10:28 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r135703 r135705 1 2012-11-26 Thiago Santos <thiago.sousa.santos@collabora.com> 2 3 [GStreamer] Floating reference handling fix 4 https://bugs.webkit.org/show_bug.cgi?id=101349 5 6 Reviewed by Philippe Normand. 7 8 GStreamer 0.10 and 1.0 differ when creating GstGhostPad from pad 9 templates, the 1.0 doesn't take ownership on the passed 10 GstPadTemplate, while 0.10 does. So this patch adds a 11 GStreamerVersioning function to handle this different approach 12 transparently in Webkit gstreamer elements. 13 14 Existing media tests cover this change. 15 16 * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp: 17 (webkit_web_audio_src_init): 18 * platform/graphics/gstreamer/GStreamerVersioning.cpp: 19 (webkitGstGhostPadFromStaticTemplate): 20 * platform/graphics/gstreamer/GStreamerVersioning.h: 21 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: 22 (webkit_web_src_init): 23 1 24 2012-11-26 Kentaro Hara <haraken@chromium.org> 2 25 -
trunk/Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
r131478 r135705 27 27 #include <wtf/gobject/GOwnPtr.h> 28 28 #include "GRefPtrGStreamer.h" 29 #include "GStreamerVersioning.h" 29 30 #include <gst/audio/multichannel.h> 30 31 #include <gst/pbutils/pbutils.h> … … 179 180 new (priv) WebKitWebAudioSourcePrivate(); 180 181 181 GRefPtr<GstPadTemplate> padTemplate = adoptGRef(gst_static_pad_template_get(&srcTemplate)); 182 priv->sourcePad = gst_ghost_pad_new_no_target_from_template("src", padTemplate.get()); 182 priv->sourcePad = webkitGstGhostPadFromStaticTemplate(&srcTemplate, "src", 0); 183 183 gst_element_add_pad(GST_ELEMENT(src), priv->sourcePad); 184 184 -
trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.cpp
r132081 r135705 33 33 gst_object_sink(gstObject); 34 34 #endif 35 } 36 37 GstPad* webkitGstGhostPadFromStaticTemplate(GstStaticPadTemplate* staticPadTemplate, const gchar* name, GstPad* target) 38 { 39 GstPad* pad; 40 GstPadTemplate* padTemplate = gst_static_pad_template_get(staticPadTemplate); 41 42 if (target) 43 pad = gst_ghost_pad_new_from_template(name, target, padTemplate); 44 else 45 pad = gst_ghost_pad_new_no_target_from_template(name, padTemplate); 46 47 #ifdef GST_API_VERSION_1 48 gst_object_unref(padTemplate); 49 #endif 50 51 return pad; 35 52 } 36 53 -
trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.h
r131387 r135705 30 30 31 31 void webkitGstObjectRefSink(GstObject*); 32 GstPad* webkitGstGhostPadFromStaticTemplate(GstStaticPadTemplate*, const gchar* name, GstPad* target); 32 33 GRefPtr<GstCaps> webkitGstGetPadCaps(GstPad*); 33 34 bool getVideoSizeAndFormatFromCaps(GstCaps*, WebCore::IntSize&, GstVideoFormat&, int& pixelAspectRatioNumerator, int& pixelAspectRatioDenominator, int& stride); -
trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
r128572 r135705 218 218 static void webkit_web_src_init(WebKitWebSrc* src) 219 219 { 220 GRefPtr<GstPadTemplate> padTemplate = adoptGRef(gst_static_pad_template_get(&srcTemplate));221 220 WebKitWebSrcPrivate* priv = WEBKIT_WEB_SRC_GET_PRIVATE(src); 222 221 … … 238 237 239 238 GRefPtr<GstPad> targetPad = adoptGRef(gst_element_get_static_pad(GST_ELEMENT(priv->appsrc), "src")); 240 priv->srcpad = gst_ghost_pad_new_from_template("src", targetPad.get(), padTemplate.get());239 priv->srcpad = webkitGstGhostPadFromStaticTemplate(&srcTemplate, "src", targetPad.get()); 241 240 242 241 gst_element_add_pad(GST_ELEMENT(src), priv->srcpad);
Note: See TracChangeset
for help on using the changeset viewer.