[GStreamer] Floating reference handling fix
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Nov 2012 12:10:28 +0000 (12:10 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Nov 2012 12:10:28 +0000 (12:10 +0000)
commite7e854eb320fca663b48d0c3c3bd6063fd373165
tree4f4966823007bab8748a337077aa9892086cc732
parente387763dedc368442b569f7242d92473dc092c3c
[GStreamer] Floating reference handling fix
https://bugs.webkit.org/show_bug.cgi?id=101349

Patch by Thiago Santos <thiago.sousa.santos@collabora.com> on 2012-11-26
Reviewed by Philippe Normand.

GStreamer 0.10 and 1.0 differ when creating GstGhostPad from pad
templates, the 1.0 doesn't take ownership on the passed
GstPadTemplate, while 0.10 does. So this patch adds a
GStreamerVersioning function to handle this different approach
transparently in Webkit gstreamer elements.

Existing media tests cover this change.

* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webkit_web_audio_src_init):
* platform/graphics/gstreamer/GStreamerVersioning.cpp:
(webkitGstGhostPadFromStaticTemplate):
* platform/graphics/gstreamer/GStreamerVersioning.h:
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webkit_web_src_init):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@135705 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.cpp
Source/WebCore/platform/graphics/gstreamer/GStreamerVersioning.h
Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp