Changeset 55717 in webkit


Ignore:
Timestamp:
Mar 9, 2010 1:01:54 AM (14 years ago)
Author:
Philippe Normand
Message:

2010-03-09 Philippe Normand <pnormand@igalia.com>

Reviewed by Gustavo Noronha Silva.

[GStreamer] player code cleanups
https://bugs.webkit.org/show_bug.cgi?id=35868

Cleaned up the private instance variables of the player.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): (WebCore::MediaPlayerPrivate::fillTimerFired): (WebCore::MediaPlayerPrivate::mediaLocationChanged):
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r55716 r55717  
     12010-03-09  Philippe Normand  <pnormand@igalia.com>
     2
     3        Reviewed by Gustavo Noronha Silva.
     4
     5        [GStreamer] player code cleanups
     6        https://bugs.webkit.org/show_bug.cgi?id=35868
     7
     8        Cleaned up the private instance variables of the player.
     9
     10        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     11        (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
     12        (WebCore::MediaPlayerPrivate::fillTimerFired):
     13        (WebCore::MediaPlayerPrivate::mediaLocationChanged):
     14        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
     15
    1162010-03-09  Philippe Normand  <pnormand@igalia.com>
    217
  • trunk/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r55716 r55717  
    292292    , m_fillTimer(this, &MediaPlayerPrivate::fillTimerFired)
    293293    , m_maxTimeLoaded(0)
    294     , m_fillStatus(0)
    295294{
    296295    if (doGstInit())
     
    671670
    672671    gint64 start, stop;
     672    gdouble fillStatus = 100.0;
    673673
    674674    gst_query_parse_buffering_range(query, 0, &start, &stop, 0);
     
    676676
    677677    if (stop != -1)
    678         m_fillStatus = 100.0 * stop / GST_FORMAT_PERCENT_MAX;
    679     else
    680         m_fillStatus = 100.0;
    681 
    682     LOG_VERBOSE(Media, "Download buffer filled up to %f%%", m_fillStatus);
     678        fillStatus = 100.0 * stop / GST_FORMAT_PERCENT_MAX;
     679
     680    LOG_VERBOSE(Media, "Download buffer filled up to %f%%", fillStatus);
    683681
    684682    if (!m_mediaDuration)
     
    688686    // available. Otherwise we can't compute it.
    689687    if (m_mediaDuration) {
    690         m_maxTimeLoaded = static_cast<float>((m_fillStatus * m_mediaDuration) / 100.0);
     688        m_maxTimeLoaded = static_cast<float>((fillStatus * m_mediaDuration) / 100.0);
    691689        LOG_VERBOSE(Media, "Updated maxTimeLoaded: %f", m_maxTimeLoaded);
    692690    }
    693691
    694     if (m_fillStatus != 100.0) {
     692    if (fillStatus != 100.0) {
    695693        updateStates();
    696694        return;
     
    935933
    936934        if (locations)
    937             m_mediaLocationCurrentIndex = gst_value_list_get_size(locations) -1;
     935            m_mediaLocationCurrentIndex = static_cast<int>(gst_value_list_get_size(locations)) -1;
    938936
    939937        loadNextLocation();
  • trunk/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h

    r55657 r55717  
    155155            GstBuffer* m_buffer;
    156156            GstStructure* m_mediaLocations;
    157             gint m_mediaLocationCurrentIndex;
     157            int m_mediaLocationCurrentIndex;
    158158            bool m_resetPipeline;
    159159            bool m_paused;
     
    161161            float m_playbackRate;
    162162            bool m_errorOccured;
    163             gfloat m_mediaDuration;
     163            float m_mediaDuration;
    164164            bool m_startedBuffering;
    165165            Timer<MediaPlayerPrivate> m_fillTimer;
    166166            float m_maxTimeLoaded;
    167             gdouble m_fillStatus;
    168167    };
    169168}
Note: See TracChangeset for help on using the changeset viewer.