Closed
Bug 598242
Opened 14 years ago
Closed 14 years ago
WebM buffered TimeRanges are not normalized
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | final+ |
People
(Reporter: cpearce, Assigned: cpearce)
References
Details
Attachments
(1 file, 2 obsolete files)
147.56 KB,
patch
|
kinetik
:
review+
|
Details | Diff | Splinter Review |
The WebM buffered implementation returns TimeRanges which are in the range [startTime, endTime], but all our other timestamps which we expose to HTML are in the range [0, duration]. We should normalize the WebM buffered timecodes just as we normalize the other media types' TimeRanges, at least until we update our implementation to the current startTime and duration specification.
Assignee | ||
Comment 1•14 years ago
|
||
Assignee | ||
Comment 2•14 years ago
|
||
(In reply to comment #1) > Created attachment 477028 [details] [diff] [review] > Patch This is based on top of bug 598217.
Depends on: 598217
Comment 3•14 years ago
|
||
It's kind of a shame the reader's can't deal with time in the media stream's timeline and leave the normalization up to the caller. aBuffered->Add(aStartTime / MS_PER_S, duration / NS_PER_S); This case needs to be fixed too. Add a mochitest for this case please?
Assignee | ||
Updated•14 years ago
|
blocking2.0: --- → ?
Assignee | ||
Comment 4•14 years ago
|
||
* With review comments addressed, includes test. Fixed some issues test showed up: * nsWebMReader wasn't timestamping decoded audio chunks correctly, the total_samples variable in nsWebMReader::DecodeAudioPacket() which was used to calculate the timestamps of ogg_packets inside a nestegg_packet was not being carried over between packets, meaning every ogg_packet in a nestegg_packet would have the same start time. * Handle case in nsWebMReader::DecodeVideoFrame() when we assume the last packet ends at the end of the file. * Renamed nsBuiltinDecoderStateMachine::mGotDurationFromHeader to mGotDurationFromMetaData, and set moved its initalization up into nsBuiltinDecoderStateMachine::LoadMetadata() (from nsOggDecoderStateMachine::LoadMetadata()). This is needed because the *duration* is stored in the WebM metadata (not the end time), and we need to adjust the mEndTime field for WebM in nsBuiltinDecoderStateMachine::FindStartTime() in the same way that the Ogg backend does for a chopped media.
Attachment #477028 -
Attachment is obsolete: true
Attachment #477832 -
Flags: review?(kinetik)
Attachment #477028 -
Flags: review?(kinetik)
Comment 5•14 years ago
|
||
- { name:"r11025_s16_c1.wav", type:"audio/x-wav", duration:1.0 }, + { name:"r11025_s16_c1.wav", type:"audio/x-wav", duration:1.0}, Oops? + next_tstamp = s->GetEndMediaTime() * NS_PER_MS; If the WebM file doesn't have a duration, mEndTime is going to be -1 (at least, before UpdatePlaybackPosition is called), so this will compute an invalid next_tstamp, right?
Assignee | ||
Comment 6•14 years ago
|
||
Now with less oops.
Attachment #477832 -
Attachment is obsolete: true
Attachment #477836 -
Flags: review?(kinetik)
Attachment #477832 -
Flags: review?(kinetik)
Updated•14 years ago
|
Attachment #477836 -
Flags: review?(kinetik) → review+
blocking2.0: ? → final+
Whiteboard: [needs landing]
Assignee | ||
Comment 7•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/5f0b56b5b3b3
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing]
You need to log in
before you can comment on or make changes to this bug.
Description
•