Closed
Bug 1283020
Opened 8 years ago
Closed 8 years ago
Change the various latency API to use frames instead of milliseconds
Categories
(Core :: Audio/Video: cubeb, defect, P2)
Core
Audio/Video: cubeb
Tracking
()
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: padenot, Assigned: padenot)
References
Details
Attachments
(1 file)
Bug 1283020 - Update Gecko to reflect cubeb changes: use frames instead of milliseconds for latency.
(deleted),
text/x-review-board-request
|
achronop
:
review+
|
Details |
The latency situation has evolved a lot since the early days, and now we need a tighter control over the latency numbers, both when getting the minimum latency supported on the current configuration and passing it when initializing a new stream.
Platform APIs usually use frames, and using milliseconds in Gecko forces conversion and unnecessary rounding.
Considering that having the wrong buffer size can make us not go into a mixer fast-path (for example, android is very picky about that), we should switch to using frames in:
- cubeb_device_info
- cubeb_get_min_latency
- cubeb_stream_init
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → padenot
Updated•8 years ago
|
Rank: 25
Priority: -- → P2
Assignee | ||
Comment 1•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/65518/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/65518/
Attachment #8772781 -
Flags: review?(achronop)
Comment 2•8 years ago
|
||
Comment on attachment 8772781 [details]
Bug 1283020 - Update Gecko to reflect cubeb changes: use frames instead of milliseconds for latency.
https://reviewboard.mozilla.org/r/65518/#review62504
Looks good, thanks!
::: dom/media/AudioStream.cpp:366
(Diff revision 1)
> return NS_ERROR_FAILURE;
> }
>
> cubeb_stream* stream = nullptr;
> + /* Convert from milliseconds to frames. */
> + uint32_t latency_frames = CubebUtils::GetCubebLatency() * aParams.rate / 1000;
We could add the trsform from ms to frames inside CubebUtils::GetCubebLatency method
Attachment #8772781 -
Flags: review?(achronop) → review+
Pushed by paul@paul.cx:
https://hg.mozilla.org/integration/mozilla-inbound/rev/344300260f4c
Update cubeb consumers to pass in latency in frames and not in ms. r=achronop
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/d2ba56fc82b6 because it (or bug 1285541) seems to have caused a frequent mochitest(gl) failure: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&fromchange=9f4b5bd8af0c54daafd5e19358e7871f2bd6c2c3&bugfiler&filter-searchStr=10.%20(gl
Flags: needinfo?(padenot)
Pushed by paul@paul.cx:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7ba223fde0e0
Update cubeb consumers to pass in latency in frames and not in ms. r=achronop
Assignee | ||
Updated•8 years ago
|
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(padenot)
Resolution: --- → FIXED
Assignee | ||
Comment 6•8 years ago
|
||
oops, still not merged.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 7•8 years ago
|
||
bugherder |
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in
before you can comment on or make changes to this bug.
Description
•