[Webkit-unassigned] [Bug 35328] [Qt] Various Fixes to MediaPlayerPrivateQt

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 26 04:45:06 PST 2010


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





--- Comment #20 from Tor Arne Vestbø <vestbo at webkit.org>  2010-02-26 04:45:06 PST ---
(In reply to comment #14)
> (In reply to comment #9)
> 
> > Doing this makes loading the Transformers trailer go from instantaneous to 5-10
> > seconds before the first loadedmetadata, and even then it does not seem to load
> > fully to be able to play.
> 
> It works for me. Also if you look at the code, I never set the MediaPlayer in
> to the HAVE_METADATA state, and I can not see anywhere in WebKit where
> HAVE_METADATA would be returned instead of the media player's state. This seems
> to be inconsistent with the data in your second attachment.

Sorry, my bad, we don't go to HAVE_METADATA but to HAVE_ENOUGH_DATA, see
updated screenshot.

The loading is still very slow though (15 seconds). We go to HAVE_ENOUGH_DATA
as a result of the QMediaPlayer::mediaStatusChanged() signal when the status
changes to QMediaPlayer::LoadedMedia, but we never end up in the
UnknownMediaStatus which would be the code-path to replace the old code from
bytesLoaded().

> > Presumably because we have the buffer filled to 100%, which with the old code
> > would dump us into Idle and HaveEnoughData, but now we don't update our states
> > anymore on bytesLoaded() (a good thing per se).
> 
> As I understand it, bytesLoaded() should never be called. It is not used by
> webkit currently, it is only provided to have a complete interface.

MediaPlayerPrivate::bytesLoaded() is called from
HTMLMediaElement::progressEventTimerFired() through MediaPlayer::bytesLoaded().

In the 15 second timeframe above when waiting for mediaStatusChanged(), we've
received numerous calls to bytesLoaded(), where the call to
m_mediaPlayer->bufferStatus() returns 100, so as far as the QtMultimedia
backend is concerned we've buffered 100%, but we never receive any signals
where we can react to that by setting HAVE_ENOUGH_DATA (see below).

> > I tried doing updateStates() on the bufferStateChange() signal, which I would
> > assume would be the right fix, but that didn't change anything as we don't seem
> > to receive this signal :/
> 
> bufferStateChange() is only emitted when the media status is either Buffering
> or Stalled.

Okey, not even at 100%? Do we get some other signal when the buffer is filled
to 100%, for example a media status change? Any idea why we're not getting the
UnknownMediaStatus change?

-- 
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