[Webkit-unassigned] [Bug 39053] [GStreamer] cache media duration in READY instead of PLAYING

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 20 08:21:12 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=39053


Eric Carlson <eric.carlson at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #55958|review?                     |review-
               Flag|                            |




--- Comment #3 from Eric Carlson <eric.carlson at apple.com>  2010-05-20 08:21:12 PST ---
(From update of attachment 55958)
>  
> +        // Cache the media duration if it's known when the pipeline is
> +        // ready for playback.
> +        if (state >= GST_STATE_READY && !m_mediaDuration) {
> +            float newDuration = duration();
> +            m_mediaDurationKnown = !isinf(newDuration);
> +            if (m_mediaDurationKnown)
> +                m_mediaDuration = newDuration;
> +        }
> +

I don't think this, or the old code actually, will do what you want because duration() always returns inf until m_mediaDurationKnown:

    // Media duration query failed already, don't attempt new useless queries.
    if (!m_mediaDurationKnown)
        return numeric_limits<float>::infinity();

It looks like it will work if you call durationChanged() instead. This will also inform HTMLMediaElement of the duration change, which this change also doesn't do.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list