Closed Bug 1155433 Opened 9 years ago Closed 6 years ago

Provide mechanism for MediaTaskQueue/AbstractThread tasks to be cancelable

Categories

(Core :: Audio/Video: Playback, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: cpearce, Unassigned)

References

(Blocks 1 open bug)

Details

In the MediaDataDecoder::Input implementations, it's common to dispatch a task to another task queue (the "video" or "audio" task queue owned by the MP4Reader) to process the input on the other task queue using synchronous platform APIs. This is so that we don't block the decode task queue when we make a platform's synchronous decoder conform to the async MediaDataDecoder API.

The problem here is that when we want to implement MediaDataDecoder::Flush(), we want to cancel any pending tasks to process the input samples, as we don't want to waste time processing input samples that we don't need to output.

(A side problem is that MediaDataDecoder::Flush() is supposed to be synchronous, i.e. block until the flush is complete and we can guarantee that no more output will be returned. Really MediaDataDecoder::Flush() should return a promise, but that's a bigger change.)
Bobby volunteered to apply his mental superpowers to this issue.
Flags: needinfo?(bobbyholley)
Note - we should convert the use-case from bug 1145052 to this infrastructure.
This is on my list, but no particular reason to leave it NI.
Flags: needinfo?(bobbyholley)
Component: Audio/Video → Audio/Video: Playback
Mass closing do to inactivity.
Feel free to re-open if still needed.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.