Bug 33960 - Restore MediaPlayer totalBytesKnown and totalBytes methods
Summary: Restore MediaPlayer totalBytesKnown and totalBytes methods
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-21 11:09 PST by Eric Carlson
Modified: 2010-01-24 20:31 PST (History)
3 users (show)

See Also:


Attachments
Possible patch (6.27 KB, patch)
2010-01-21 12:53 PST, Eric Carlson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2010-01-21 11:09:03 PST
http://trac.webkit.org/changeset/53625 removed these methods from the MediaPlayer interface because they aren't necessary to implement the HTMLMediaElement interface, but they were used by the default Qt media controller. Using bytes loaded as an indication of the amount loaded in a slider that scrubs though a movie in *time* is probably a bad idea because very few movies have constant bit-rate these days, but the methods should be restored so the controller can function.
Comment 1 Eric Carlson 2010-01-21 12:53:56 PST
Created attachment 47141 [details]
Possible patch

Possible patch. Not flagging r? until Simon and/or Tor Arne chime in about whether or not they want it.
Comment 2 Tor Arne Vestbø 2010-01-22 03:20:11 PST
I'm fine with removing these for the Qt port too, they were implemented just to have a complete overview of the MediaPlayerPrivate interface when I was doing the Phonon port.

For phonon there's actually no way to get these things anyways when the media is loaded by Phonon by passing a URL. I'm hoping we'll will be able to load the media in WebCore in the future, in which case these kind of things would be in platform-independent code.

Eric, do you know anything about the possibly of feeding QuickTime data instead of passing it a URL? I tried poking at NewMovieFromUserProc but didn't get too far.
Comment 3 Eric Carlson 2010-01-22 10:03:01 PST
(In reply to comment #2)
> 
> Eric, do you know anything about the possibly of feeding QuickTime data instead
> of passing it a URL? I tried poking at NewMovieFromUserProc but didn't get too
> far.

The only way to do this is to write a QuickTime datahandler component, which is a PITA but doable. The bigger problems are that it won't work in 64-bit, and WebKit's resource loader isn't ideally suited for loading media data right now - data is loaded sequentially, can't load more than 2GB, all data kept in memory, etc.