Title: [96940] trunk/Source/WebCore
Revision
96940
Author
[email protected]
Date
2011-10-07 08:47:54 -0700 (Fri, 07 Oct 2011)

Log Message

[GStreamer] avoid direct access to GstMessage structure field
https://bugs.webkit.org/show_bug.cgi?id=69629

Reviewed by Martin Robinson.

Use gst_message_get_structure() instead of direct access to the
structure field. No direct benefit apart from compatibility with
GStreamer 0.11.

* platform/graphics/gstreamer/GStreamerGWorld.cpp:
(WebCore::gstGWorldSyncMessageCallback):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::mediaLocationChanged):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (96939 => 96940)


--- trunk/Source/WebCore/ChangeLog	2011-10-07 15:36:19 UTC (rev 96939)
+++ trunk/Source/WebCore/ChangeLog	2011-10-07 15:47:54 UTC (rev 96940)
@@ -1,3 +1,20 @@
+2011-10-07  Philippe Normand  <[email protected]>
+
+        [GStreamer] avoid direct access to GstMessage structure field
+        https://bugs.webkit.org/show_bug.cgi?id=69629
+
+        Reviewed by Martin Robinson.
+
+        Use gst_message_get_structure() instead of direct access to the
+        structure field. No direct benefit apart from compatibility with
+        GStreamer 0.11.
+
+        * platform/graphics/gstreamer/GStreamerGWorld.cpp:
+        (WebCore::gstGWorldSyncMessageCallback):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
+        (WebCore::MediaPlayerPrivateGStreamer::mediaLocationChanged):
+
 2011-10-07  Pavel Feldman  <[email protected]>
 
         Web Inspector: add timeline panel to the compilation.

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


--- trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp	2011-10-07 15:36:19 UTC (rev 96939)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp	2011-10-07 15:47:54 UTC (rev 96940)
@@ -42,9 +42,10 @@
     ASSERT(GST_MESSAGE_TYPE(message) == GST_MESSAGE_ELEMENT);
 
     GStreamerGWorld* gstGWorld = static_cast<GStreamerGWorld*>(data);
+    const GstStructure* structure = gst_message_get_structure(message);
 
-    if (gst_structure_has_name(message->structure, "prepare-xwindow-id")
-        || gst_structure_has_name(message->structure, "have-ns-view"))
+    if (gst_structure_has_name(structure, "prepare-xwindow-id")
+        || gst_structure_has_name(structure, "have-ns-view"))
         gstGWorld->setWindowOverlay(message);
     return TRUE;
 }

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


--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2011-10-07 15:36:19 UTC (rev 96939)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2011-10-07 15:47:54 UTC (rev 96940)
@@ -723,9 +723,10 @@
     MediaPlayer::NetworkState error;
     bool issueError = true;
     bool attemptNextLocation = false;
+    const GstStructure* structure = gst_message_get_structure(message);
 
-    if (message->structure) {
-        const gchar* messageTypeName = gst_structure_get_name(message->structure);
+    if (structure) {
+        const gchar* messageTypeName = gst_structure_get_name(structure);
 
         // Redirect messages are sent from elements, like qtdemux, to
         // notify of the new location(s) of the media.
@@ -1213,11 +1214,12 @@
     if (m_mediaLocations)
         gst_structure_free(m_mediaLocations);
 
-    if (message->structure) {
+    const GstStructure* structure = gst_message_get_structure(message);
+    if (structure) {
         // This structure can contain:
         // - both a new-location string and embedded locations structure
         // - or only a new-location string.
-        m_mediaLocations = gst_structure_copy(message->structure);
+        m_mediaLocations = gst_structure_copy(structure);
         const GValue* locations = gst_structure_get_value(m_mediaLocations, "locations");
 
         if (locations)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to