Closed
Bug 786924
Opened 12 years ago
Closed 12 years ago
Estimate Ogg buffered ranges on B2G
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: cpearce, Assigned: cpearce)
Details
Attachments
(1 file)
8.71 KB,
patch
|
kinetik
:
review+
|
Details | Diff | Splinter Review |
On B2G we can't do I/O on the main thread, but the Ogg buffered implementation does just that.
So as suggested by Matthew in bug 785909 comment 8, we can reuse the buffered ranges estimation code from nsMediaPluginReader on B2G to avoid main thread I/O.
Ideally we'd rewrite the nsOggReader to parse incoming pages in NotifyDataArrived, similar to how nsWebMReader does things (bug 737745), but that's a bigger piece of work. Whereas estimating based on offset/length is less accurate, but it's quick and easy to implement.
An alternative would be to use the OMX decoder on B2G for Ogg decoding, but we don't know whether that's been fuzzed.
Assignee | ||
Comment 1•12 years ago
|
||
Tests pass locally with buffered estimation forced on.
Attachment #656751 -
Flags: review?(kinetik)
Comment 2•12 years ago
|
||
Comment on attachment 656751 [details] [diff] [review]
Patch v1
Review of attachment 656751 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/media/VideoUtils.cpp
@@ +41,5 @@
> }
> }
> +
> +static uint64_t BytesToTime(int64_t offset, uint64_t length, uint64_t durationUs) {
> + double perc = double(offset) / double(length);
Rename this to r or ratio, or at least percent. Also, assert that offset is >= 0, and maybe handle length being zero (not sure if this can happen, but the caller only checks for -1).
Attachment #656751 -
Flags: review?(kinetik) → review+
Assignee | ||
Comment 3•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/476d122c82a6
Try push from last week, greenish:
https://tbpl.mozilla.org/?tree=Try&rev=8ac067f06a37
Comment 4•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in
before you can comment on or make changes to this bug.
Description
•