Changeset 52727 in webkit


Ignore:
Timestamp:
Jan 4, 2010 3:04:46 AM (14 years ago)
Author:
Philippe Normand
Message:

2009-12-22 Philippe Normand <pnormand@igalia.com>

Reviewed by Eric Seidel.

[GTK] G_OBJECT() cast is not necessary for signals connection and properties access
https://bugs.webkit.org/show_bug.cgi?id=32661

Reverted the SENTINEL / NULL crap :) Hopefully the style-bot won't
complain about NULL usage in g_object_{get,set} anymore.

  • platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivate::hasVideo): (WebCore::MediaPlayerPrivate::hasAudio): (WebCore::MediaPlayerPrivate::setVolume): (WebCore::MediaPlayerPrivate::setRate): (WebCore::MediaPlayerPrivate::updateStates): (WebCore::MediaPlayerPrivate::createGSTPlayBin):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r52721 r52727  
     12009-12-22  Philippe Normand  <pnormand@igalia.com>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [GTK] G_OBJECT() cast is not necessary for signals connection and properties access
     6        https://bugs.webkit.org/show_bug.cgi?id=32661
     7
     8        Reverted the SENTINEL / NULL crap :) Hopefully the style-bot won't
     9        complain about NULL usage in g_object_{get,set} anymore.
     10
     11        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
     12        (WebCore::MediaPlayerPrivate::hasVideo):
     13        (WebCore::MediaPlayerPrivate::hasAudio):
     14        (WebCore::MediaPlayerPrivate::setVolume):
     15        (WebCore::MediaPlayerPrivate::setRate):
     16        (WebCore::MediaPlayerPrivate::updateStates):
     17        (WebCore::MediaPlayerPrivate::createGSTPlayBin):
     18
    1192010-01-04  Alex Milowski  <alex@milowski.com>
    220
  • trunk/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp

    r52447 r52727  
    4848#include <math.h>
    4949#include <wtf/gtk/GOwnPtr.h>
    50 
    51 #define SENTINEL (void*) 0
    5250
    5351using namespace std;
     
    415413    gint currentVideo = -1;
    416414    if (m_playBin)
    417         g_object_get(m_playBin, "current-video", &currentVideo, SENTINEL);
     415        g_object_get(m_playBin, "current-video", &currentVideo, NULL);
    418416    return currentVideo > -1;
    419417}
     
    423421    gint currentAudio = -1;
    424422    if (m_playBin)
    425         g_object_get(m_playBin, "current-audio", &currentAudio, SENTINEL);
     423        g_object_get(m_playBin, "current-audio", &currentAudio, NULL);
    426424    return currentAudio > -1;
    427425}
     
    432430        return;
    433431
    434     g_object_set(m_playBin, "volume", static_cast<double>(volume), SENTINEL);
     432    g_object_set(m_playBin, "volume", static_cast<double>(volume), NULL);
    435433}
    436434
     
    490488        LOG_VERBOSE(Media, "Set rate to %f failed", rate);
    491489    else
    492         g_object_set(m_playBin, "mute", mute, SENTINEL);
     490        g_object_set(m_playBin, "mute", mute, NULL);
    493491}
    494492
     
    637635        m_networkState = MediaPlayer::Loaded;
    638636
    639         g_object_get(m_playBin, "source", &m_source, SENTINEL);
     637        g_object_get(m_playBin, "source", &m_source, NULL);
    640638        if (!m_source)
    641639            LOG_VERBOSE(Media, "m_source is 0");
     
    928926    gst_object_unref(bus);
    929927
    930     g_object_set(m_playBin, "uri", url.utf8().data(), SENTINEL);
     928    g_object_set(m_playBin, "uri", url.utf8().data(), NULL);
    931929
    932930    g_signal_connect(m_playBin, "notify::volume", G_CALLBACK(mediaPlayerPrivateVolumeChangedCallback), this);
     
    940938        m_fpsSink = gst_element_factory_make("fpsdisplaysink", "sink");
    941939        if (g_object_class_find_property(G_OBJECT_GET_CLASS(m_fpsSink), "video-sink")) {
    942             g_object_set(m_fpsSink, "video-sink", m_videoSink, SENTINEL);
     940            g_object_set(m_fpsSink, "video-sink", m_videoSink, NULL);
    943941            g_object_ref_sink(m_fpsSink);
    944             g_object_set(m_playBin, "video-sink", m_fpsSink, SENTINEL);
     942            g_object_set(m_playBin, "video-sink", m_fpsSink, NULL);
    945943        } else {
    946944            m_fpsSink = 0;
    947             g_object_set(m_playBin, "video-sink", m_videoSink, SENTINEL);
     945            g_object_set(m_playBin, "video-sink", m_videoSink, NULL);
    948946            LOG(Media, "Can't display FPS statistics, you need gst-plugins-bad >= 0.10.18");
    949947        }
    950948    } else
    951         g_object_set(m_playBin, "video-sink", m_videoSink, SENTINEL);
     949        g_object_set(m_playBin, "video-sink", m_videoSink, NULL);
    952950
    953951    g_signal_connect(m_videoSink, "repaint-requested", G_CALLBACK(mediaPlayerPrivateRepaintCallback), this);
Note: See TracChangeset for help on using the changeset viewer.