Closed Bug 1184874 Opened 10 years ago Closed 10 years ago

Remove dependency on MediaDecoderStateMachine::DispatchOnPlaybackOffsetUpdate from AudioSink

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

Details

Attachments

(3 files)

This bug reduces bi-directional dependency between MDSM and AudioSink and makes it easier to unify AudioSink and DecodedStream.
Assignee: nobody → jwwang
Fix indentation.
Attachment #8636930 - Flags: review?(cpearce)
Part 2 - add the ability to know which item is popped from the MediaQueue.
Attachment #8636931 - Flags: review?(cpearce)
Part 3 - call mDecoder->UpdatePlaybackOffset in On{Audio,Video}Popped and remove MediaDecoderStateMachine::DispatchOnPlaybackOffsetUpdate.
Attachment #8636932 - Flags: review?(cpearce)
Attachment #8636930 - Flags: review?(cpearce) → review+
Attachment #8636931 - Flags: review?(cpearce) → review+
Comment on attachment 8636932 [details] [diff] [review] 1184874_part3_remove_DispatchOnPlaybackOffsetUpdate-v1.patch Review of attachment 8636932 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/media/MediaDecoderStateMachine.cpp @@ +688,5 @@ > MediaDecoderStateMachine::OnAudioPopped(const AudioData* aSample) > { > MOZ_ASSERT(OnTaskQueue()); > ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor()); > + // TODO: could mOffset be -1? It mOffset should not be < 0. You could assert that. Or even do: mDecoder->UpdatePlaybackOffset(std::max(0, aSample->mOffset));
Attachment #8636932 - Flags: review?(cpearce) → review+
Comment on attachment 8636932 [details] [diff] [review] 1184874_part3_remove_DispatchOnPlaybackOffsetUpdate-v1.patch Review of attachment 8636932 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/media/MediaDecoderStateMachine.cpp @@ +688,5 @@ > MediaDecoderStateMachine::OnAudioPopped(const AudioData* aSample) > { > MOZ_ASSERT(OnTaskQueue()); > ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor()); > + // TODO: could mOffset be -1? The code is moved from AudioSink. Sure, I will adjust the value to be non-negative.
Thanks for the review.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: