Closed
Bug 465458
Opened 16 years ago
Closed 16 years ago
Media selection algorithm changed in r2403 of HTML5 spec
Categories
(Core :: Audio/Video, defect, P2)
Core
Audio/Video
Tracking
()
VERIFIED
FIXED
mozilla1.9.2a1
People
(Reporter: kinetik, Assigned: cpearce)
References
()
Details
(Keywords: verified1.9.1)
Attachments
(1 file, 1 obsolete file)
|
33.73 KB,
patch
|
cajbir
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
We need to update nsHTMLMediaElement to use the new algorithm.
There are also related changes in r2404 that need to be made: http://html5.org/tools/web-apps-tracker?from=2403&to=2404
Flags: blocking1.9.1?
| Reporter | ||
Updated•16 years ago
|
Assignee: nobody → kinetik
Status: NEW → ASSIGNED
Flags: blocking1.9.1? → blocking1.9.1+
Priority: -- → P2
Comment 1•16 years ago
|
||
Progress on this?
Matthew's away. I don't think he's made any progress on this, he's been working on a Wave-specific issue for a while now. I might be able to get Chris Pearce to take it when he gets back, which should be any day now.
| Assignee | ||
Updated•16 years ago
|
Assignee: kinetik → chris
| Assignee | ||
Comment 3•16 years ago
|
||
* Add resource candidate list and iteration to nsMediaLoad.
* AbortExistingLoads() no longer returns false causing bail out of Load().
* Load algorithm made asynchronous. It returns after constructing the candidate list, and the "candidate loop" continues in a callback. This means that networkState changes after a load, but it's only when the JS stack returns that the load/fetch/error events actually run.
* Added nsMediaEvent, which provides functionality to check if we should cancel the event, due to a new load starting. nsAsyncEventRunner now uses that.
* nsOggDecoder::LoadOggHeaders() now takes the nsChannelReader which it's loading from as a parameter. This is because when we're in LoadOggHeaders() we can move into shutdown state which causes the decoders ref to the reader to disappear, causing a null pointer to be returned by mDecoder->GetReader() in LoadOggHeaders().
* Tests adapted to new load() behaviour.
* Built and tested on Windows and Linux.
Attachment #362625 -
Flags: superreview?(roc)
Attachment #362625 -
Flags: review?(chris.double)
class nsMediaLoadListener;
+ class nsLoadNextCandidateEvent;
These don't need the ugly ns prefix.
AbortExistingLoads fires synchronous events. If those handlers do a load(), you need to bail out of the current load. I think you need to save the new load object that AbortExistingLoads creates, and after firing those events, check that it's still the current load. So you probably still want a boolean return value to indicate if the caller should bail out. You'll want a test for this too.
+ if (NS_SUCCEEDED(res))
+ mCurrentLoad->AddCandidate(uri);
{} around the statement
+ if (NS_SUCCEEDED(res))
+ mCurrentLoad->AddCandidate(uri);
Ditto
Can you add a test that verifies that new sources added during an asynchronous load aren't used?
Other than that, this looks really great!
| Assignee | ||
Comment 5•16 years ago
|
||
* Removed "ns" prefix from inner class names in nsHTMLMediaElement.
* AbortExistingLoads() now returns PR_TRUE if the load was aborted in event handlers posted while it was running.
* Added test for "only uses sources added before a load is triggered in an async load" case.
* Added test for "bail out of a load if we do another load in an abort handler" case.
* Made nsMediaLoad::mPosition signed to remove compile warning.
* Compiles and test pass on Windows and Linux.
Attachment #362625 -
Attachment is obsolete: true
Attachment #362785 -
Flags: superreview?(roc)
Attachment #362785 -
Flags: review?(chris.double)
Attachment #362625 -
Flags: superreview?(roc)
Attachment #362625 -
Flags: review?(chris.double)
Attachment #362785 -
Flags: superreview?(roc) → superreview+
Updated•16 years ago
|
Attachment #362785 -
Flags: review?(chris.double) → review+
| Assignee | ||
Updated•16 years ago
|
Keywords: checkin-needed
Whiteboard: [needs landing]
Comment 6•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing] → [needs 191 landing]
Updated•16 years ago
|
Attachment #362785 -
Attachment description: Patch v2 → Patch v2
[Checkin: Comment 6]
Comment 7•16 years ago
|
||
Comment on attachment 362785 [details] [diff] [review]
Patch v2
[Checkin: Comment 6]
Does not apply "at all" to 1.9.1 :-(
Updated•16 years ago
|
Keywords: fixed1.9.1
Whiteboard: [needs 191 landing]
Comment 9•16 years ago
|
||
making verified, code update.
Status: RESOLVED → VERIFIED
Keywords: fixed1.9.1 → verified1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•