[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

philn at webkit.org philn at webkit.org
Wed Dec 22 12:25:10 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit b4a32ccc34c4577ab0bb5f2e300abc5b3a883b1a
Author: philn at webkit.org <philn at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Aug 23 06:11:47 2010 +0000

    2010-08-23  Philippe Normand  <pnormand at igalia.com>
    
            Reviewed by Xan Lopez.
    
            [GStreamer] don't expose the private player in GStreamerGWorld
            https://bugs.webkit.org/show_bug.cgi?id=44332
    
            Only a pointer to our playbin2 element instance is required
            instead of the whole MediaPlayerPrivateGStreamer instance.
    
            * platform/graphics/gstreamer/GStreamerGWorld.cpp:
            (WebCore::GStreamerGWorld::createGWorld):
            (WebCore::GStreamerGWorld::GStreamerGWorld):
            (WebCore::GStreamerGWorld::~GStreamerGWorld):
            (WebCore::GStreamerGWorld::enterFullscreen):
            (WebCore::GStreamerGWorld::exitFullscreen):
            * platform/graphics/gstreamer/GStreamerGWorld.h:
            (WebCore::GStreamerGWorld::pipeline):
            * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
            (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65793 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9ad6749..b61bc8f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2010-08-23  Philippe Normand  <pnormand at igalia.com>
+
+        Reviewed by Xan Lopez.
+
+        [GStreamer] don't expose the private player in GStreamerGWorld
+        https://bugs.webkit.org/show_bug.cgi?id=44332
+
+        Only a pointer to our playbin2 element instance is required
+        instead of the whole MediaPlayerPrivateGStreamer instance.
+
+        * platform/graphics/gstreamer/GStreamerGWorld.cpp:
+        (WebCore::GStreamerGWorld::createGWorld):
+        (WebCore::GStreamerGWorld::GStreamerGWorld):
+        (WebCore::GStreamerGWorld::~GStreamerGWorld):
+        (WebCore::GStreamerGWorld::enterFullscreen):
+        (WebCore::GStreamerGWorld::exitFullscreen):
+        * platform/graphics/gstreamer/GStreamerGWorld.h:
+        (WebCore::GStreamerGWorld::pipeline):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
+
 2010-08-22  Andreas Kling  <andreas.kling at nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp b/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp
index b29479d..96a639b 100644
--- a/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp
+++ b/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp
@@ -48,17 +48,17 @@ gboolean gstGWorldSyncMessageCallback(GstBus* bus, GstMessage* message, gpointer
     return TRUE;
 }
 
-PassRefPtr<GStreamerGWorld> GStreamerGWorld::createGWorld(MediaPlayerPrivateGStreamer* player)
+PassRefPtr<GStreamerGWorld> GStreamerGWorld::createGWorld(GstElement* pipeline)
 {
-    return adoptRef(new GStreamerGWorld(player));
+    return adoptRef(new GStreamerGWorld(pipeline));
 }
 
-GStreamerGWorld::GStreamerGWorld(MediaPlayerPrivateGStreamer* player)
-    : m_player(player)
+GStreamerGWorld::GStreamerGWorld(GstElement* pipeline)
+    : m_pipeline(pipeline)
     , m_dynamicPadName(0)
 {
     // XOverlay messages need to be handled synchronously.
-    GstBus* bus = gst_pipeline_get_bus(GST_PIPELINE(m_player->pipeline()));
+    GstBus* bus = gst_pipeline_get_bus(GST_PIPELINE(m_pipeline));
     gst_bus_set_sync_handler(bus, gst_bus_sync_signal_handler, this);
     g_signal_connect(bus, "sync-message::element", G_CALLBACK(gstGWorldSyncMessageCallback), this);
     gst_object_unref(bus);
@@ -67,6 +67,8 @@ GStreamerGWorld::GStreamerGWorld(MediaPlayerPrivateGStreamer* player)
 GStreamerGWorld::~GStreamerGWorld()
 {
     exitFullscreen();
+
+    m_pipeline = 0;
 }
 
 bool GStreamerGWorld::enterFullscreen()
@@ -77,7 +79,6 @@ bool GStreamerGWorld::enterFullscreen()
     if (!m_videoWindow)
         m_videoWindow = PlatformVideoWindow::createWindow();
 
-    GstElement* pipeline = m_player->pipeline();
     GstElement* platformVideoSink = gst_element_factory_make("autovideosink", "platformVideoSink");
     GstElement* colorspace = gst_element_factory_make("ffmpegcolorspace", "colorspace");
     GstElement* queue = gst_element_factory_make("queue", "queue");
@@ -85,7 +86,7 @@ bool GStreamerGWorld::enterFullscreen()
 
     // Get video sink bin and the tee inside.
     GOwnPtr<GstElement> videoSink;
-    g_object_get(pipeline, "video-sink", &videoSink.outPtr(), NULL);
+    g_object_get(m_pipeline, "video-sink", &videoSink.outPtr(), NULL);
     GstElement* tee = gst_bin_get_by_name(GST_BIN(videoSink.get()), "videoTee");
 
     // Add and link a queue, ffmpegcolorspace and sink in the bin.
@@ -112,7 +113,7 @@ bool GStreamerGWorld::enterFullscreen()
     // the new tee branch downstream.
 
     GstQuery* query = gst_query_new_segment(GST_FORMAT_TIME);
-    gboolean queryResult = gst_element_query(pipeline, query);
+    gboolean queryResult = gst_element_query(m_pipeline, query);
 
     // See https://bugzilla.gnome.org/show_bug.cgi?id=620490.
 #if GST_CHECK_VERSION(0, 10, 30)
@@ -125,7 +126,7 @@ bool GStreamerGWorld::enterFullscreen()
 
     GstFormat format;
     gint64 position;
-    if (!gst_element_query_position(pipeline, &format, &position))
+    if (!gst_element_query_position(m_pipeline, &format, &position))
         position = 0;
 
     gdouble rate;
@@ -145,11 +146,9 @@ void GStreamerGWorld::exitFullscreen()
     if (!m_dynamicPadName)
         return;
 
-    GstElement* pipeline = m_player->pipeline();
-
     // Get video sink bin and the elements to remove.
     GOwnPtr<GstElement> videoSink;
-    g_object_get(pipeline, "video-sink", &videoSink.outPtr(), NULL);
+    g_object_get(m_pipeline, "video-sink", &videoSink.outPtr(), NULL);
     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");
diff --git a/WebCore/platform/graphics/gstreamer/GStreamerGWorld.h b/WebCore/platform/graphics/gstreamer/GStreamerGWorld.h
index 0358b01..659052a 100644
--- a/WebCore/platform/graphics/gstreamer/GStreamerGWorld.h
+++ b/WebCore/platform/graphics/gstreamer/GStreamerGWorld.h
@@ -23,7 +23,6 @@
 
 #if ENABLE(VIDEO)
 
-#include "MediaPlayerPrivateGStreamer.h"
 #include "PlatformVideoWindow.h"
 #include "RefCounted.h"
 #include "RefPtr.h"
@@ -44,10 +43,10 @@ class GStreamerGWorld : public RefCounted<GStreamerGWorld> {
     friend gboolean gstGWorldSyncMessageCallback(GstBus* bus, GstMessage* message, gpointer data);
 
 public:
-    static PassRefPtr<GStreamerGWorld> createGWorld(MediaPlayerPrivateGStreamer*);
+    static PassRefPtr<GStreamerGWorld> createGWorld(GstElement*);
     ~GStreamerGWorld();
 
-    GstElement* pipeline() const { return m_player->pipeline(); }
+    GstElement* pipeline() const { return m_pipeline; }
 
     // Returns the full-screen window created
     bool enterFullscreen();
@@ -57,8 +56,8 @@ public:
     PlatformVideoWindow* platformVideoWindow() const { return m_videoWindow.get(); }
 
 private:
-    GStreamerGWorld(MediaPlayerPrivateGStreamer*);
-    MediaPlayerPrivateGStreamer* m_player;
+    GStreamerGWorld(GstElement*);
+    GstElement* m_pipeline;
     RefPtr<PlatformVideoWindow> m_videoWindow;
     gchar* m_dynamicPadName;
 };
diff --git a/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
index 9fff984..d9d2d97 100644
--- a/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
+++ b/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
@@ -1384,7 +1384,7 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin()
     ASSERT(!m_playBin);
     m_playBin = gst_element_factory_make("playbin2", "play");
 
-    m_gstGWorld = GStreamerGWorld::createGWorld(this);
+    m_gstGWorld = GStreamerGWorld::createGWorld(m_playBin);
 
     GstBus* bus = gst_pipeline_get_bus(GST_PIPELINE(m_playBin));
     gst_bus_add_signal_watch(bus);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list