[webkit-reviews] review denied: [Bug 39053] [GStreamer] cache media duration in READY instead of PLAYING : [Attachment 55958] proposed patch

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


Eric Carlson <eric.carlson at apple.com> has denied Philippe Normand
<pnormand at igalia.com>'s request for review:
Bug 39053: [GStreamer] cache media duration in READY instead of PLAYING
https://bugs.webkit.org/show_bug.cgi?id=39053

Attachment 55958: proposed patch
https://bugs.webkit.org/attachment.cgi?id=55958&action=review

------- Additional Comments from Eric Carlson <eric.carlson at apple.com>
>  
> +	   // 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.


More information about the webkit-reviews mailing list