Changeset 96940 in webkit


Ignore:
Timestamp:
Oct 7, 2011 8:47:54 AM (13 years ago)
Author:
Philippe Normand
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):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r96939 r96940  
     12011-10-07  Philippe Normand  <pnormand@igalia.com>
     2
     3        [GStreamer] avoid direct access to GstMessage structure field
     4        https://bugs.webkit.org/show_bug.cgi?id=69629
     5
     6        Reviewed by Martin Robinson.
     7
     8        Use gst_message_get_structure() instead of direct access to the
     9        structure field. No direct benefit apart from compatibility with
     10        GStreamer 0.11.
     11
     12        * platform/graphics/gstreamer/GStreamerGWorld.cpp:
     13        (WebCore::gstGWorldSyncMessageCallback):
     14        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     15        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
     16        (WebCore::MediaPlayerPrivateGStreamer::mediaLocationChanged):
     17
    1182011-10-07  Pavel Feldman  <pfeldman@google.com>
    219
  • trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerGWorld.cpp

    r96310 r96940  
    4343
    4444    GStreamerGWorld* gstGWorld = static_cast<GStreamerGWorld*>(data);
    45 
    46     if (gst_structure_has_name(message->structure, "prepare-xwindow-id")
    47         || gst_structure_has_name(message->structure, "have-ns-view"))
     45    const GstStructure* structure = gst_message_get_structure(message);
     46
     47    if (gst_structure_has_name(structure, "prepare-xwindow-id")
     48        || gst_structure_has_name(structure, "have-ns-view"))
    4849        gstGWorld->setWindowOverlay(message);
    4950    return TRUE;
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r96311 r96940  
    724724    bool issueError = true;
    725725    bool attemptNextLocation = false;
    726 
    727     if (message->structure) {
    728         const gchar* messageTypeName = gst_structure_get_name(message->structure);
     726    const GstStructure* structure = gst_message_get_structure(message);
     727
     728    if (structure) {
     729        const gchar* messageTypeName = gst_structure_get_name(structure);
    729730
    730731        // Redirect messages are sent from elements, like qtdemux, to
     
    12141215        gst_structure_free(m_mediaLocations);
    12151216
    1216     if (message->structure) {
     1217    const GstStructure* structure = gst_message_get_structure(message);
     1218    if (structure) {
    12171219        // This structure can contain:
    12181220        // - both a new-location string and embedded locations structure
    12191221        // - or only a new-location string.
    1220         m_mediaLocations = gst_structure_copy(message->structure);
     1222        m_mediaLocations = gst_structure_copy(structure);
    12211223        const GValue* locations = gst_structure_get_value(m_mediaLocations, "locations");
    12221224
Note: See TracChangeset for help on using the changeset viewer.