Closed Bug 1350837 Opened 8 years ago Closed 8 years ago

Change the type of AMPLE_AUDIO_USECS to TimeUnit in MDSM

Categories

(Core :: Audio/Video: Playback, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

No description provided.
Assignee: nobody → jwwang
Blocks: 1245019
Priority: -- → P3
Attachment #8852734 - Flags: review?(kaku)
Attachment #8852735 - Flags: review?(kaku)
Attachment #8852736 - Flags: review?(kaku)
Comment on attachment 8852734 [details] Bug 1350837. P1 - add AMPLE_AUDIO_THRESHOLD and use it to replace AMPLE_AUDIO_USECS. https://reviewboard.mozilla.org/r/124894/#review127458
Attachment #8852734 - Flags: review?(kaku) → review+
Comment on attachment 8852735 [details] Bug 1350837. P2 - change the type of mAmpleAudioThresholdUsecs to TimeUnit. https://reviewboard.mozilla.org/r/124896/#review127456 ::: dom/media/MediaDecoderStateMachine.h:605 (Diff revision 1) > // decoded. These two fields store how many video frames and audio > // samples we must consume before are considered to be finished prerolling. > uint32_t AudioPrerollUsecs() const > { > MOZ_ASSERT(OnTaskQueue()); > - return mAmpleAudioThresholdUsecs / 2; > + return mAmpleAudioThresholdUsecs.ToMicroseconds() / 2; Would it be better to do the opration first and then call .ToMicroseconds()? ::: dom/media/MediaDecoderStateMachine.cpp:2759 (Diff revision 1) > > bool > MediaDecoderStateMachine::HaveEnoughDecodedAudio() > { > MOZ_ASSERT(OnTaskQueue()); > - auto ampleAudioUSecs = mAmpleAudioThresholdUsecs * mPlaybackRate; > + auto ampleAudioUSecs = mAmpleAudioThresholdUsecs.ToMicroseconds() * mPlaybackRate; Would it be better to do the opration first and then call .ToMicroseconds()?
Attachment #8852735 - Flags: review?(kaku) → review+
Attachment #8852736 - Flags: review?(kaku) → review+
Comment on attachment 8852735 [details] Bug 1350837. P2 - change the type of mAmpleAudioThresholdUsecs to TimeUnit. https://reviewboard.mozilla.org/r/124896/#review127456 > Would it be better to do the opration first and then call .ToMicroseconds()? It doesn't really matter. In addition, we will let AudioPrerollUsecs() return a TimeUnit in future bugs. > Would it be better to do the opration first and then call .ToMicroseconds()? No, we can't do that. See bug 1351160 for the detail.
Pushed by jwwang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cade02d0d47f P1 - add AMPLE_AUDIO_THRESHOLD and use it to replace AMPLE_AUDIO_USECS. r=kaku https://hg.mozilla.org/integration/autoland/rev/53f3febc7452 P2 - change the type of mAmpleAudioThresholdUsecs to TimeUnit. r=kaku https://hg.mozilla.org/integration/autoland/rev/e9374f4264a5 P3 - rename the variable and fix comments. r=kaku
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: