Title: [98924] trunk/Source/WebCore
Revision
98924
Author
[email protected]
Date
2011-10-31 17:29:08 -0700 (Mon, 31 Oct 2011)

Log Message

[GStreamer] Don't use GOwnPtr for ref-counted objects
https://bugs.webkit.org/show_bug.cgi?id=71042

Patch by Jonathon Jongsma <[email protected]> on 2011-10-31
Reviewed by Martin Robinson.

* CMakeListsEfl.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* WebCore.pro:
* platform/graphics/gstreamer/GOwnPtrGStreamer.cpp: Removed.
* platform/graphics/gstreamer/GOwnPtrGStreamer.h: Removed.
* platform/graphics/gstreamer/GStreamerGWorld.cpp:
(WebCore::GStreamerGWorld::enterFullscreen):
(WebCore::GStreamerGWorld::exitFullscreen):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::updateAudioSink):
(WebCore::MediaPlayerPrivateGStreamer::sourceChanged):

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/CMakeListsEfl.txt (98923 => 98924)


--- trunk/Source/WebCore/CMakeListsEfl.txt	2011-11-01 00:29:03 UTC (rev 98923)
+++ trunk/Source/WebCore/CMakeListsEfl.txt	2011-11-01 00:29:08 UTC (rev 98924)
@@ -192,7 +192,6 @@
     "${WEBCORE_DIR}/platform/graphics/gstreamer"
   )
   LIST(APPEND WebCore_SOURCES
-    platform/graphics/gstreamer/GOwnPtrGStreamer.cpp
     platform/graphics/gstreamer/GRefPtrGStreamer.cpp
     platform/graphics/gstreamer/GStreamerGWorld.cpp
     platform/graphics/gstreamer/ImageGStreamerCairo.cpp

Modified: trunk/Source/WebCore/ChangeLog (98923 => 98924)


--- trunk/Source/WebCore/ChangeLog	2011-11-01 00:29:03 UTC (rev 98923)
+++ trunk/Source/WebCore/ChangeLog	2011-11-01 00:29:08 UTC (rev 98924)
@@ -1,3 +1,23 @@
+2011-10-31  Jonathon Jongsma  <[email protected]>
+
+        [GStreamer] Don't use GOwnPtr for ref-counted objects
+        https://bugs.webkit.org/show_bug.cgi?id=71042
+
+        Reviewed by Martin Robinson.
+
+        * CMakeListsEfl.txt:
+        * GNUmakefile.list.am:
+        * WebCore.gypi:
+        * WebCore.pro:
+        * platform/graphics/gstreamer/GOwnPtrGStreamer.cpp: Removed.
+        * platform/graphics/gstreamer/GOwnPtrGStreamer.h: Removed.
+        * platform/graphics/gstreamer/GStreamerGWorld.cpp:
+        (WebCore::GStreamerGWorld::enterFullscreen):
+        (WebCore::GStreamerGWorld::exitFullscreen):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::updateAudioSink):
+        (WebCore::MediaPlayerPrivateGStreamer::sourceChanged):
+
 2011-10-28  Nat Duca  <[email protected]>
 
         [chromium] Connect CCThreadProxy to FrameRateController and SchedulerStateMachine via CCScheduler

Modified: trunk/Source/WebCore/GNUmakefile.list.am (98923 => 98924)


--- trunk/Source/WebCore/GNUmakefile.list.am	2011-11-01 00:29:03 UTC (rev 98923)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2011-11-01 00:29:08 UTC (rev 98924)
@@ -4022,8 +4022,6 @@
 	Source/WebCore/platform/cairo/WidgetBackingStore.h \
 	Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp \
 	Source/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h \
-	Source/WebCore/platform/graphics/gstreamer/GOwnPtrGStreamer.cpp \
-	Source/WebCore/platform/graphics/gstreamer/GOwnPtrGStreamer.h \
 	Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp \
 	Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h \
 	Source/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp \

Modified: trunk/Source/WebCore/WebCore.gypi (98923 => 98924)


--- trunk/Source/WebCore/WebCore.gypi	2011-11-01 00:29:03 UTC (rev 98923)
+++ trunk/Source/WebCore/WebCore.gypi	2011-11-01 00:29:08 UTC (rev 98924)
@@ -3662,8 +3662,6 @@
             'platform/graphics/gpu/TilingData.h',
             'platform/graphics/gpu/mac/DrawingBufferMac.mm',
             'platform/graphics/gpu/qt/DrawingBufferQt.cpp',
-            'platform/graphics/gstreamer/GOwnPtrGStreamer.cpp',
-            'platform/graphics/gstreamer/GOwnPtrGStreamer.h',
             'platform/graphics/gstreamer/GRefPtrGStreamer.cpp',
             'platform/graphics/gstreamer/GRefPtrGStreamer.h',
             'platform/graphics/gstreamer/GStreamerGWorld.cpp',

Modified: trunk/Source/WebCore/WebCore.pro (98923 => 98924)


--- trunk/Source/WebCore/WebCore.pro	2011-11-01 00:29:03 UTC (rev 98923)
+++ trunk/Source/WebCore/WebCore.pro	2011-11-01 00:29:08 UTC (rev 98924)
@@ -3127,7 +3127,6 @@
 
     } else: contains(DEFINES, WTF_USE_GSTREAMER=1) {
         HEADERS += \
-            platform/graphics/gstreamer/GOwnPtrGStreamer.h \
             platform/graphics/gstreamer/GRefPtrGStreamer.h \
             platform/graphics/gstreamer/GStreamerGWorld.h \
             platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h \
@@ -3137,7 +3136,6 @@
             platform/graphics/gstreamer/PlatformVideoWindowPrivate.h \
             platform/graphics/gstreamer/ImageGStreamer.h
         SOURCES += \
-            platform/graphics/gstreamer/GOwnPtrGStreamer.cpp \
             platform/graphics/gstreamer/GRefPtrGStreamer.cpp \
             platform/graphics/gstreamer/GStreamerGWorld.cpp \
             platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp \

Deleted: trunk/Source/WebCore/platform/graphics/gstreamer/GOwnPtrGStreamer.cpp (98923 => 98924)


--- trunk/Source/WebCore/platform/graphics/gstreamer/GOwnPtrGStreamer.cpp	2011-11-01 00:29:03 UTC (rev 98923)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GOwnPtrGStreamer.cpp	2011-11-01 00:29:08 UTC (rev 98924)
@@ -1,35 +0,0 @@
-/*
- *  Copyright (C) 2010 Igalia S.L
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-
-#include "config.h"
-#include "GOwnPtrGStreamer.h"
-
-#if USE(GSTREAMER)
-#include <gst/gstelement.h>
-
-namespace WTF {
-
-template <> void freeOwnedGPtr<GstElement>(GstElement* ptr)
-{
-    if (ptr)
-        gst_object_unref(ptr);
-}
-
-}
-#endif // USE(GSTREAMER)

Deleted: trunk/Source/WebCore/platform/graphics/gstreamer/GOwnPtrGStreamer.h (98923 => 98924)


--- trunk/Source/WebCore/platform/graphics/gstreamer/GOwnPtrGStreamer.h	2011-11-01 00:29:03 UTC (rev 98923)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GOwnPtrGStreamer.h	2011-11-01 00:29:08 UTC (rev 98924)
@@ -1,35 +0,0 @@
-/*
- *  Copyright (C) 2010 Igalia S.L
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public
- *  License as published by the Free Software Foundation; either
- *  version 2 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public License
- *  along with this library; see the file COPYING.LIB.  If not, write to
- *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- *  Boston, MA 02110-1301, USA.
- */
-
-#ifndef GOwnPtrGStreamer_h
-#define GOwnPtrGStreamer_h
-#if USE(GSTREAMER)
-
-#include "GOwnPtr.h"
-
-typedef struct _GstElement GstElement;
-
-namespace WTF {
-
-template<> void freeOwnedGPtr<GstElement>(GstElement* ptr);
-
-}
-
-#endif // USE(GSTREAMER)
-#endif

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp (98923 => 98924)


--- trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp	2011-11-01 00:29:03 UTC (rev 98923)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp	2011-11-01 00:29:08 UTC (rev 98924)
@@ -21,7 +21,7 @@
 #include "GStreamerGWorld.h"
 #if ENABLE(VIDEO) && USE(GSTREAMER)
 
-#include "GOwnPtrGStreamer.h"
+#include "GRefPtrGStreamer.h"
 #include <gst/gst.h>
 #include <gst/interfaces/xoverlay.h>
 #include <gst/pbutils/pbutils.h>
@@ -86,8 +86,12 @@
     GstElement* videoScale = gst_element_factory_make("videoscale", "videoScale");
 
     // Get video sink bin and the tee inside.
-    GOwnPtr<GstElement> videoSink;
-    g_object_get(m_pipeline, "video-sink", &videoSink.outPtr(), NULL);
+    GRefPtr<GstElement> videoSink;
+    GstElement* sinkPtr = 0;
+
+    g_object_get(m_pipeline, "video-sink", &sinkPtr, NULL);
+    videoSink = adoptGRef(sinkPtr);
+
     GstElement* tee = gst_bin_get_by_name(GST_BIN(videoSink.get()), "videoTee");
 
     // Add and link a queue, ffmpegcolorspace, videoscale and sink in the bin.
@@ -154,8 +158,12 @@
         return;
 
     // Get video sink bin and the elements to remove.
-    GOwnPtr<GstElement> videoSink;
-    g_object_get(m_pipeline, "video-sink", &videoSink.outPtr(), NULL);
+    GRefPtr<GstElement> videoSink;
+    GstElement* sinkPtr = 0;
+
+    g_object_get(m_pipeline, "video-sink", &sinkPtr, NULL);
+    videoSink = adoptGRef(sinkPtr);
+
     GstElement* tee = gst_bin_get_by_name(GST_BIN(videoSink.get()), "videoTee");
     GstElement* platformVideoSink = gst_bin_get_by_name(GST_BIN(videoSink.get()), "platformVideoSink");
     GstElement* queue = gst_bin_get_by_name(GST_BIN(videoSink.get()), "queue");

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (98923 => 98924)


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2011-11-01 00:29:03 UTC (rev 98923)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2011-11-01 00:29:08 UTC (rev 98924)
@@ -30,7 +30,7 @@
 #include "Document.h"
 #include "Frame.h"
 #include "FrameView.h"
-#include "GOwnPtrGStreamer.h"
+#include "GRefPtrGStreamer.h"
 #include "GStreamerGWorld.h"
 #include "GraphicsContext.h"
 #include "GraphicsTypes.h"
@@ -1009,9 +1009,12 @@
     if (!m_playBin)
         return;
 
-    GOwnPtr<GstElement> element;
+    GRefPtr<GstElement> element;
+    GstElement* sinkPtr = 0;
 
-    g_object_get(m_playBin, "audio-sink", &element.outPtr(), NULL);
+    g_object_get(m_playBin, "audio-sink", &sinkPtr, NULL);
+    element = adoptGRef(sinkPtr);
+
     gst_object_replace(reinterpret_cast<GstObject**>(&m_webkitAudioSink),
                        reinterpret_cast<GstObject*>(element.get()));
 }
@@ -1019,9 +1022,12 @@
 
 void MediaPlayerPrivateGStreamer::sourceChanged()
 {
-    GOwnPtr<GstElement> element;
+    GRefPtr<GstElement> element;
+    GstElement* srcPtr = 0;
 
-    g_object_get(m_playBin, "source", &element.outPtr(), NULL);
+    g_object_get(m_playBin, "source", &srcPtr, NULL);
+    element = adoptGRef(srcPtr);
+
     gst_object_replace(reinterpret_cast<GstObject**>(&m_source),
                        reinterpret_cast<GstObject*>(element.get()));
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to