Closed
Bug 1213764
Opened 9 years ago
Closed 8 years ago
Hide internal thread model of MediaDecoderReader from its client code
Categories
(Core :: Audio/Video: Playback, defect, P2)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: jwwang, Unassigned)
References
Details
MediaDecoderReader::OwnerThread() should be made protected or private so that the client code doesn't know too much about its internal thread model.
Comment 1•9 years ago
|
||
IIRC, there are methods in the PDMs that uses MediaDecoderReader::OwnerThread() in order to get access to a non-flushable task queue (as you can't use promises with flushable task queues).
I believe that the main reason for this is because you can't create a MozTaskQueue outside of the main thread ; and that's only because the MozTaskQueue constructor access a preference to find out the default number of threads to use.
Reporter | ||
Comment 2•9 years ago
|
||
Can you point me to the code?
Comment 3•9 years ago
|
||
Reporter | ||
Comment 4•9 years ago
|
||
We can make DecoderCallback a friend of MediaFormatReader because they are tightly coupled. So OnTaskQueue() doesn't need to be exposed from MediaDecoderReader.
Reporter | ||
Comment 5•9 years ago
|
||
Btw, I just found out:
MediaCodecReader::AsyncReadMetadata
-> MediaCodecReader::ReallocateExtractorResources
-> MediaCodecReader::CreateTaskQueues
-> CreateMediaDecodeTaskQueue
-> GetMediaThreadPool
would access pref off the main thread. However, B2G allows you to access pref off the main thread. This inconsistency is bad and obscure the code.
Updated•9 years ago
|
Priority: -- → P2
Reporter | ||
Comment 6•8 years ago
|
||
This is already done by MediaDecoderReaderWrapper.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•