⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 140414 in webkit


Ignore:
Timestamp:
Jan 22, 2013, 4:55:22 AM (14 years ago)
Author:
Christophe Dumez
Message:

[gstreamer] MediaPlayerPrivateGStreamer should take ownership of the playbin
https://bugs.webkit.org/show_bug.cgi?id=107445

Reviewed by Philippe Normand.

In gstreamer 1.0, gst_element_factory_make() now returns a floating reference.
MediaPlayerPrivateGStreamer calls gst_element_factory_make() to create the
playbin object but does not take ownership of the object. As a consequence,
the object keeps floating until it is unref'd in the
MediaPlayerPrivateGStreamer destructor.

This patch uses a GRefPtr<GstElement> to store the playbin object and only
adopt the object returned by gst_element_factory_make() if gstreamer 0.10
is used. When gstreamer 1.0 is used, the returned object will not be adopted,
which will remove the floating reference. This way, we ensure that the
playbin object is owned by MediaPlayerPrivateGStreamer.

No new tests, no behavior change for layout tests.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::load):
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
(WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
(WebCore::MediaPlayerPrivateGStreamer::duration):
(WebCore::MediaPlayerPrivateGStreamer::seek):
(WebCore::MediaPlayerPrivateGStreamer::paused):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
(WebCore::MediaPlayerPrivateGStreamer::setVolume):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVolumeChange):
(WebCore::MediaPlayerPrivateGStreamer::setRate):
(WebCore::MediaPlayerPrivateGStreamer::buffered):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

(MediaPlayerPrivateGStreamer):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r140413 r140414  
     12013-01-22  Christophe Dumez  <christophe.dumez@intel.com>
     2
     3        [gstreamer] MediaPlayerPrivateGStreamer should take ownership of the playbin
     4        https://bugs.webkit.org/show_bug.cgi?id=107445
     5
     6        Reviewed by Philippe Normand.
     7
     8        In gstreamer 1.0, gst_element_factory_make() now returns a floating reference.
     9        MediaPlayerPrivateGStreamer calls gst_element_factory_make() to create the
     10        playbin object but does not take ownership of the object. As a consequence,
     11        the object keeps floating until it is unref'd in the
     12        MediaPlayerPrivateGStreamer destructor.
     13
     14        This patch uses a GRefPtr<GstElement> to store the playbin object and only
     15        adopt the object returned by gst_element_factory_make() if gstreamer 0.10
     16        is used. When gstreamer 1.0 is used, the returned object will not be adopted,
     17        which will remove the floating reference. This way, we ensure that the
     18        playbin object is owned by MediaPlayerPrivateGStreamer.
     19
     20        No new tests, no behavior change for layout tests.
     21
     22        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     23        (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
     24        (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
     25        (WebCore::MediaPlayerPrivateGStreamer::load):
     26        (WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
     27        (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
     28        (WebCore::MediaPlayerPrivateGStreamer::duration):
     29        (WebCore::MediaPlayerPrivateGStreamer::seek):
     30        (WebCore::MediaPlayerPrivateGStreamer::paused):
     31        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
     32        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
     33        (WebCore::MediaPlayerPrivateGStreamer::setVolume):
     34        (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVolumeChange):
     35        (WebCore::MediaPlayerPrivateGStreamer::setRate):
     36        (WebCore::MediaPlayerPrivateGStreamer::buffered):
     37        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
     38        (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
     39        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
     40        (MediaPlayerPrivateGStreamer):
     41
    1422013-01-22  Yury Semikhatsky  <yurys@chromium.org>
    243
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r139650 r140414  
    213213MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer(MediaPlayer* player)
    214214    : m_player(player)
    215     , m_playBin(0)
    216215    , m_webkitVideoSink(0)
    217216    , m_fpsSink(0)
     
    277276
    278277    if (m_playBin) {
    279         gst_element_set_state(m_playBin, GST_STATE_NULL);
    280         gst_object_unref(GST_OBJECT(m_playBin));
     278        gst_element_set_state(m_playBin.get(), GST_STATE_NULL);
    281279        m_playBin = 0;
    282280    }
     
    317315
    318316    m_url = KURL(KURL(), cleanUrl);
    319     g_object_set(m_playBin, "uri", cleanUrl.utf8().data(), NULL);
     317    g_object_set(m_playBin.get(), "uri", cleanUrl.utf8().data(), NULL);
    320318
    321319    LOG_MEDIA_MESSAGE("Load %s", cleanUrl.utf8().data());
     
    336334    // GStreamer needs to have the pipeline set to a paused state to
    337335    // start providing anything useful.
    338     gst_element_set_state(m_playBin, GST_STATE_PAUSED);
     336    gst_element_set_state(m_playBin.get(), GST_STATE_PAUSED);
    339337
    340338    if (!m_delayingLoad)
     
    365363
    366364    GstQuery* query = gst_query_new_position(GST_FORMAT_TIME);
    367     if (!gst_element_query(m_playBin, query)) {
     365    if (!gst_element_query(m_playBin.get(), query)) {
    368366        LOG_MEDIA_MESSAGE("Position query failed...");
    369367        gst_query_unref(query);
     
    393391    GstState pending;
    394392
    395     gst_element_get_state(m_playBin, &currentState, &pending, 0);
     393    gst_element_get_state(m_playBin.get(), &currentState, &pending, 0);
    396394    LOG_MEDIA_MESSAGE("Current state: %s, pending: %s", gst_element_state_get_name(currentState), gst_element_state_get_name(pending));
    397395    if (currentState == newState || pending == newState)
    398396        return true;
    399397
    400     GstStateChangeReturn setStateResult = gst_element_set_state(m_playBin, newState);
     398    GstStateChangeReturn setStateResult = gst_element_set_state(m_playBin.get(), newState);
    401399    GstState pausedOrPlaying = newState == GST_STATE_PLAYING ? GST_STATE_PAUSED : GST_STATE_PLAYING;
    402400    if (currentState != pausedOrPlaying && setStateResult == GST_STATE_CHANGE_FAILURE) {
     
    454452
    455453#ifdef GST_API_VERSION_1
    456     bool failure = !gst_element_query_duration(m_playBin, timeFormat, &timeLength) || static_cast<guint64>(timeLength) == GST_CLOCK_TIME_NONE;
     454    bool failure = !gst_element_query_duration(m_playBin.get(), timeFormat, &timeLength) || static_cast<guint64>(timeLength) == GST_CLOCK_TIME_NONE;
    457455#else
    458     bool failure = !gst_element_query_duration(m_playBin, &timeFormat, &timeLength) || timeFormat != GST_FORMAT_TIME || static_cast<guint64>(timeLength) == GST_CLOCK_TIME_NONE;
     456    bool failure = !gst_element_query_duration(m_playBin.get(), &timeFormat, &timeLength) || timeFormat != GST_FORMAT_TIME || static_cast<guint64>(timeLength) == GST_CLOCK_TIME_NONE;
    459457#endif
    460458    if (failure) {
     
    519517    LOG_MEDIA_MESSAGE("Seek: %" GST_TIME_FORMAT, GST_TIME_ARGS(clockTime));
    520518
    521     if (!gst_element_seek(m_playBin, m_player->rate(),
     519    if (!gst_element_seek(m_playBin.get(), m_player->rate(),
    522520            GST_FORMAT_TIME,
    523521            (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE),
     
    539537
    540538    GstState state;
    541     gst_element_get_state(m_playBin, &state, 0, 0);
     539    gst_element_get_state(m_playBin.get(), &state, 0, 0);
    542540    return state == GST_STATE_PAUSED;
    543541}
     
    621619    gint videoTracks = 0;
    622620    if (m_playBin)
    623         g_object_get(m_playBin, "n-video", &videoTracks, NULL);
     621        g_object_get(m_playBin.get(), "n-video", &videoTracks, NULL);
    624622
    625623    m_hasVideo = videoTracks > 0;
     
    643641    gint audioTracks = 0;
    644642    if (m_playBin)
    645         g_object_get(m_playBin, "n-audio", &audioTracks, NULL);
     643        g_object_get(m_playBin.get(), "n-audio", &audioTracks, NULL);
    646644    m_hasAudio = audioTracks > 0;
    647645    m_player->mediaPlayerClient()->mediaPlayerEngineUpdated(m_player);
     
    653651        return;
    654652
    655     gst_stream_volume_set_volume(GST_STREAM_VOLUME(m_playBin), GST_STREAM_VOLUME_FORMAT_CUBIC,
     653    gst_stream_volume_set_volume(GST_STREAM_VOLUME(m_playBin.get()), GST_STREAM_VOLUME_FORMAT_CUBIC,
    656654                                 static_cast<double>(volume));
    657655}
     
    664662        return;
    665663    double volume;
    666     volume = gst_stream_volume_get_volume(GST_STREAM_VOLUME(m_playBin), GST_STREAM_VOLUME_FORMAT_CUBIC);
     664    volume = gst_stream_volume_get_volume(GST_STREAM_VOLUME(m_playBin.get()), GST_STREAM_VOLUME_FORMAT_CUBIC);
    667665    // get_volume() can return values superior to 1.0 if the user
    668666    // applies software user gain via third party application (GNOME
     
    688686    GstState pending;
    689687
    690     gst_element_get_state(m_playBin, &state, &pending, 0);
     688    gst_element_get_state(m_playBin.get(), &state, &pending, 0);
    691689    if ((state != GST_STATE_PLAYING && state != GST_STATE_PAUSED)
    692690        || (pending == GST_STATE_PAUSED))
     
    700698
    701699    if (!rate) {
    702         gst_element_set_state(m_playBin, GST_STATE_PAUSED);
     700        gst_element_set_state(m_playBin.get(), GST_STATE_PAUSED);
    703701        return;
    704702    }
     
    730728    LOG_MEDIA_MESSAGE("Need to mute audio: %d", (int) mute);
    731729
    732     if (!gst_element_seek(m_playBin, rate, GST_FORMAT_TIME, flags,
     730    if (!gst_element_seek(m_playBin.get(), rate, GST_FORMAT_TIME, flags,
    733731                          GST_SEEK_TYPE_SET, start,
    734732                          GST_SEEK_TYPE_SET, end))
    735733        LOG_MEDIA_MESSAGE("Set rate to %f failed", rate);
    736734    else
    737         g_object_set(m_playBin, "mute", mute, NULL);
     735        g_object_set(m_playBin.get(), "mute", mute, NULL);
    738736}
    739737
     
    761759    GstQuery* query = gst_query_new_buffering(GST_FORMAT_PERCENT);
    762760
    763     if (!gst_element_query(m_playBin, query)) {
     761    if (!gst_element_query(m_playBin.get(), query)) {
    764762        gst_query_unref(query);
    765763        return timeRanges.release();
     
    816814        LOG_MEDIA_MESSAGE("Error %d: %s (url=%s)", err->code, err->message, m_url.string().utf8().data());
    817815
    818         GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(m_playBin), GST_DEBUG_GRAPH_SHOW_ALL, "webkit-video.error");
     816        GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(m_playBin.get()), GST_DEBUG_GRAPH_SHOW_ALL, "webkit-video.error");
    819817
    820818        error = MediaPlayer::Empty;
     
    857855        // Ignore state changes from internal elements. They are
    858856        // forwarded to playbin2 anyway.
    859         if (GST_MESSAGE_SRC(message) == reinterpret_cast<GstObject*>(m_playBin)) {
     857        if (GST_MESSAGE_SRC(message) == reinterpret_cast<GstObject*>(m_playBin.get())) {
    860858            updateStates();
    861859
     
    868866                                                 gst_element_state_get_name(newState)).utf8();
    869867
    870             GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(m_playBin), GST_DEBUG_GRAPH_SHOW_ALL, dotFileName.data());
     868            GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(m_playBin.get()), GST_DEBUG_GRAPH_SHOW_ALL, dotFileName.data());
    871869        }
    872870        break;
     
    925923    GstQuery* query = gst_query_new_buffering(GST_FORMAT_PERCENT);
    926924
    927     if (!gst_element_query(m_playBin, query)) {
     925    if (!gst_element_query(m_playBin.get(), query)) {
    928926        gst_query_unref(query);
    929927        return;
     
    11241122    GstElement* sinkPtr = 0;
    11251123
    1126     g_object_get(m_playBin, "audio-sink", &sinkPtr, NULL);
     1124    g_object_get(m_playBin.get(), "audio-sink", &sinkPtr, NULL);
    11271125    m_webkitAudioSink = adoptGRef(sinkPtr);
    11281126
     
    11341132    GstElement* srcPtr = 0;
    11351133
    1136     g_object_get(m_playBin, "source", &srcPtr, NULL);
     1134    g_object_get(m_playBin.get(), "source", &srcPtr, NULL);
    11371135    m_source = adoptGRef(srcPtr);
    11381136
     
    11471145
    11481146    if (m_playBin)
    1149         gst_element_set_state(m_playBin, GST_STATE_NULL);
     1147        gst_element_set_state(m_playBin.get(), GST_STATE_NULL);
    11501148}
    11511149
     
    11631161    GstState pending;
    11641162
    1165     GstStateChangeReturn ret = gst_element_get_state(m_playBin,
     1163    GstStateChangeReturn ret = gst_element_get_state(m_playBin.get(),
    11661164        &state, &pending, 250 * GST_NSECOND);
    11671165
     
    12191217                if (!m_paused) {
    12201218                    LOG_MEDIA_MESSAGE("[Buffering] Restarting playback.");
    1221                     gst_element_set_state(m_playBin, GST_STATE_PLAYING);
     1219                    gst_element_set_state(m_playBin.get(), GST_STATE_PLAYING);
    12221220                }
    12231221            } else if (!m_buffering && (currentTime() < duration())) {
     
    12341232                LOG_MEDIA_MESSAGE("[Buffering] Pausing stream for buffering.");
    12351233
    1236                 gst_element_set_state(m_playBin, GST_STATE_PAUSED);
     1234                gst_element_set_state(m_playBin.get(), GST_STATE_PAUSED);
    12371235            }
    12381236        } else
     
    12651263        if (state == GST_STATE_READY && isLiveStream() && m_preload == MediaPlayer::Auto) {
    12661264            setPreload(MediaPlayer::None);
    1267             gst_element_set_state(m_playBin, GST_STATE_NULL);
    1268             gst_element_set_state(m_playBin, GST_STATE_PAUSED);
     1265            gst_element_set_state(m_playBin.get(), GST_STATE_NULL);
     1266            gst_element_set_state(m_playBin.get(), GST_STATE_PAUSED);
    12691267        }
    12701268
    12711269        // A live stream was paused, reset the pipeline.
    12721270        if (state == GST_STATE_PAUSED && pending == GST_STATE_PLAYING && isLiveStream()) {
    1273             gst_element_set_state(m_playBin, GST_STATE_NULL);
    1274             gst_element_set_state(m_playBin, GST_STATE_PLAYING);
     1271            gst_element_set_state(m_playBin.get(), GST_STATE_NULL);
     1272            gst_element_set_state(m_playBin.get(), GST_STATE_PLAYING);
    12751273        }
    12761274
     
    13081306            m_seeking = false;
    13091307            if (!m_paused)
    1310                 gst_element_set_state(m_playBin, GST_STATE_PLAYING);
     1308                gst_element_set_state(m_playBin.get(), GST_STATE_PLAYING);
    13111309        } else if (!m_paused)
    1312             gst_element_set_state(m_playBin, GST_STATE_PLAYING);
     1310            gst_element_set_state(m_playBin.get(), GST_STATE_PLAYING);
    13131311
    13141312        m_networkState = MediaPlayer::Loading;
     
    13961394
    13971395        gchar* currentLocation = 0;
    1398         g_object_get(m_playBin, "uri", &currentLocation, NULL);
     1396        g_object_get(m_playBin.get(), "uri", &currentLocation, NULL);
    13991397
    14001398        KURL currentUrl(KURL(), currentLocation);
     
    14201418            // Reset pipeline state.
    14211419            m_resetPipeline = true;
    1422             gst_element_set_state(m_playBin, GST_STATE_READY);
     1420            gst_element_set_state(m_playBin.get(), GST_STATE_READY);
    14231421
    14241422            GstState state;
    1425             gst_element_get_state(m_playBin, &state, 0, 0);
     1423            gst_element_get_state(m_playBin.get(), &state, 0, 0);
    14261424            if (state <= GST_STATE_READY) {
    14271425                // Set the new uri and start playing.
    1428                 g_object_set(m_playBin, "uri", newUrl.string().utf8().data(), NULL);
    1429                 gst_element_set_state(m_playBin, GST_STATE_PLAYING);
     1426                g_object_set(m_playBin.get(), "uri", newUrl.string().utf8().data(), NULL);
     1427                gst_element_set_state(m_playBin.get(), GST_STATE_PLAYING);
    14301428                return true;
    14311429            }
     
    14701468    if (!m_player->mediaPlayerClient()->mediaPlayerIsLooping()) {
    14711469        m_paused = true;
    1472         gst_element_set_state(m_playBin, GST_STATE_NULL);
     1470        gst_element_set_state(m_playBin.get(), GST_STATE_NULL);
    14731471    }
    14741472}
     
    14811479    // And re-cache it if possible.
    14821480    GstState state;
    1483     gst_element_get_state(m_playBin, &state, 0, 0);
     1481    gst_element_get_state(m_playBin.get(), &state, 0, 0);
    14841482    float newDuration = duration();
    14851483
     
    15151513        if (totalBytes() && !isLiveStream()) {
    15161514            setPreload(MediaPlayer::Auto);
    1517             gst_element_set_state(m_playBin, GST_STATE_NULL);
    1518             gst_element_set_state(m_playBin, GST_STATE_PAUSED);
     1515            gst_element_set_state(m_playBin.get(), GST_STATE_NULL);
     1516            gst_element_set_state(m_playBin.get(), GST_STATE_PAUSED);
    15191517        }
    15201518    }
     
    15311529        return;
    15321530
    1533     g_object_set(m_playBin, "mute", muted, NULL);
     1531    g_object_set(m_playBin.get(), "mute", muted, NULL);
    15341532}
    15351533
     
    15421540
    15431541    gboolean muted;
    1544     g_object_get(m_playBin, "mute", &muted, NULL);
     1542    g_object_get(m_playBin.get(), "mute", &muted, NULL);
    15451543    m_player->muteChanged(static_cast<bool>(muted));
    15461544}
     
    17681766
    17691767    GstPlayFlags flags;
    1770     g_object_get(m_playBin, "flags", &flags, NULL);
     1768    g_object_get(m_playBin.get(), "flags", &flags, NULL);
    17711769    if (m_preload == MediaPlayer::Auto) {
    17721770        LOG_MEDIA_MESSAGE("Enabling on-disk buffering");
    1773         g_object_set(m_playBin, "flags", flags | GST_PLAY_FLAG_DOWNLOAD, NULL);
     1771        g_object_set(m_playBin.get(), "flags", flags | GST_PLAY_FLAG_DOWNLOAD, NULL);
    17741772    } else {
    17751773        LOG_MEDIA_MESSAGE("Disabling on-disk buffering");
    1776         g_object_set(m_playBin, "flags", flags & ~GST_PLAY_FLAG_DOWNLOAD, NULL);
     1774        g_object_set(m_playBin.get(), "flags", flags & ~GST_PLAY_FLAG_DOWNLOAD, NULL);
    17771775    }
    17781776}
     
    17951793{
    17961794    ASSERT(!m_playBin);
     1795
     1796#ifdef GST_API_VERSION_1
     1797    // In gstreamer 1.0, gst_element_factory_make returns a floating
     1798    // reference so we should not adopt.
    17971799    m_playBin = gst_element_factory_make(gPlaybinName, "play");
    1798 
    1799 #ifndef GST_API_VERSION_1
    1800     m_gstGWorld = GStreamerGWorld::createGWorld(m_playBin);
     1800#else
     1801    m_playBin = adoptGRef(gst_element_factory_make(gPlaybinName, "play"));
     1802    m_gstGWorld = GStreamerGWorld::createGWorld(m_playBin.get());
    18011803#endif
    18021804
    1803     GstBus* bus = gst_pipeline_get_bus(GST_PIPELINE(m_playBin));
     1805    GstBus* bus = gst_pipeline_get_bus(GST_PIPELINE(m_playBin.get()));
    18041806    gst_bus_add_signal_watch(bus);
    18051807    g_signal_connect(bus, "message", G_CALLBACK(mediaPlayerPrivateMessageCallback), this);
    18061808    gst_object_unref(bus);
    18071809
    1808     g_object_set(m_playBin, "mute", m_player->muted(), NULL);
    1809 
    1810     g_signal_connect(m_playBin, "notify::volume", G_CALLBACK(mediaPlayerPrivateVolumeChangedCallback), this);
    1811     g_signal_connect(m_playBin, "notify::source", G_CALLBACK(mediaPlayerPrivateSourceChangedCallback), this);
    1812     g_signal_connect(m_playBin, "notify::mute", G_CALLBACK(mediaPlayerPrivateMuteChangedCallback), this);
    1813     g_signal_connect(m_playBin, "video-changed", G_CALLBACK(mediaPlayerPrivateVideoChangedCallback), this);
    1814     g_signal_connect(m_playBin, "audio-changed", G_CALLBACK(mediaPlayerPrivateAudioChangedCallback), this);
     1810    g_object_set(m_playBin.get(), "mute", m_player->muted(), NULL);
     1811
     1812    g_signal_connect(m_playBin.get(), "notify::volume", G_CALLBACK(mediaPlayerPrivateVolumeChangedCallback), this);
     1813    g_signal_connect(m_playBin.get(), "notify::source", G_CALLBACK(mediaPlayerPrivateSourceChangedCallback), this);
     1814    g_signal_connect(m_playBin.get(), "notify::mute", G_CALLBACK(mediaPlayerPrivateMuteChangedCallback), this);
     1815    g_signal_connect(m_playBin.get(), "video-changed", G_CALLBACK(mediaPlayerPrivateVideoChangedCallback), this);
     1816    g_signal_connect(m_playBin.get(), "audio-changed", G_CALLBACK(mediaPlayerPrivateAudioChangedCallback), this);
    18151817
    18161818#ifndef GST_API_VERSION_1
     
    18931895
    18941896    // Set the bin as video sink of playbin.
    1895     g_object_set(m_playBin, "video-sink", m_videoSinkBin, NULL);
     1897    g_object_set(m_playBin.get(), "video-sink", m_videoSinkBin, NULL);
    18961898#else
    1897     g_object_set(m_playBin, "video-sink", actualVideoSink, NULL);
     1899    g_object_set(m_playBin.get(), "video-sink", actualVideoSink, NULL);
    18981900#endif
    18991901
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h

    r137838 r140414  
    159159        private:
    160160            MediaPlayer* m_player;
    161             GstElement* m_playBin;
     161            GRefPtr<GstElement> m_playBin;
    162162            GstElement* m_webkitVideoSink;
    163163            GstElement* m_videoSinkBin;
Note: See TracChangeset for help on using the changeset viewer.