Closed
Bug 830172
Opened 11 years ago
Closed 11 years ago
Change WMFByteStream to use an nsThreadPool for async I/O operations
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: cpearce, Assigned: cpearce)
References
Details
Attachments
(1 file)
22.00 KB,
patch
|
padenot
:
review+
|
Details | Diff | Splinter Review |
WMFByteStream's async read implementation simply creates one WMF work queue per WMFByteStream. If we open too many WMFByteStreams at once (like test_too_many_elements does), the creation of work queues fails, and we fail to playback media. We can just use an nsThreadPool to perform the MediaResource I/O operations instead. We use the byte stream's work queue to call the WMF "I/O complete" callbacks, we'll need to move these calls to a shared work queue.
Is this related to Bug 823646 ?
Comment 2•11 years ago
|
||
Nope.
Assignee | ||
Comment 3•11 years ago
|
||
* Use shared nsIThreadPool instead of MFWorkQueues for processing WMFByteStream async read requests. * We use an nsIThreadPoolListener to ensure MSCOM is initialized and uninitialized on the work pool threads. * Manage thread pool lifetime on the main thread. * Fail reads if the byte stream has been shutdown. * test_too_many_elements passes with MP3 and MP4 files.
Attachment #708825 -
Flags: review?(paul)
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to Chris Pearce (:cpearce) from comment #3) > * test_too_many_elements passes with MP3 and MP4 files. (It didn't before).
Comment 5•11 years ago
|
||
Comment on attachment 708825 [details] [diff] [review] Patch v1: Use nsIThreadPool instead of MFWorkQueues. Review of attachment 708825 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/media/wmf/WMFByteStream.cpp @@ +128,5 @@ > + if (!sThreadPool) { > + nsresult rv; > + nsCOMPtr<nsIThreadPool> pool = do_CreateInstance(NS_THREADPOOL_CONTRACTID, &rv); > + NS_ENSURE_SUCCESS(rv, rv); > + nit: trailing space.
Attachment #708825 -
Flags: review?(paul) → review+
Assignee | ||
Comment 6•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/8d404fcb334b
Comment 7•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/8d404fcb334b
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in
before you can comment on or make changes to this bug.
Description
•