Closed
Bug 1183007
Opened 10 years ago
Closed 10 years ago
Remove MediaDecoderStateMachine::mAudioEndTime - first
Categories
(Core :: Audio/Video, defect)
Core
Audio/Video
Tracking
()
RESOLVED
FIXED
mozilla42
| Tracking | Status | |
|---|---|---|
| firefox42 | --- | fixed |
People
(Reporter: jwwang, Assigned: jwwang)
References
Details
Attachments
(3 files, 1 obsolete file)
As bug 1182738, we will be able to remove MediaDecoderStateMachine::mAudioEndTime after bug 1182738 is landed.
This also removes the need for MediaDecoderStateMachine::OnAudioEndTimeUpdate() and reduces the bi-directional dependency between MDSM and AudioSink.
Another step forward to unify AudioSink and DecodedStream which are both consumers of media data.
| Assignee | ||
Comment 1•10 years ago
|
||
| Assignee | ||
Comment 2•10 years ago
|
||
Try looks green.
| Assignee | ||
Comment 3•10 years ago
|
||
Bug 1183007. Part 1 - provide a wrapper function so that all read from mAudioEndTime must be through MDSM::AudioEndTime().
Attachment #8633373 -
Flags: review?(kinetik)
| Assignee | ||
Comment 4•10 years ago
|
||
Bug 1183007. Part 2 - remove dependency on MDSM::OnAudioEndTimeUpdate from AudioSink.
Attachment #8633374 -
Flags: review?(kinetik)
| Assignee | ||
Comment 5•10 years ago
|
||
Bug 1183007. Part 3 - remove dependency on MDSM::OnAudioEndTimeUpdate from DecodedStream.
Attachment #8633375 -
Flags: review?(roc)
| Assignee | ||
Comment 6•10 years ago
|
||
Bug 1183007. Part 4 - remove code that is not used anymore.
Attachment #8633376 -
Flags: review?(roc)
| Assignee | ||
Comment 7•10 years ago
|
||
https://reviewboard.mozilla.org/r/13209/#review11811
::: dom/media/DecodedStream.h:114
(Diff revision 1)
> - CheckedInt64 AudioEndTime() const;
> + int64_t AudioEndTime() const;
Return int64_t so it is consistent with AudioSink::GetEndTime().
::: dom/media/DecodedStream.cpp:635
(Diff revision 1)
> - MOZ_ASSERT(mStartTime.isSome(), "Must be called after StartPlayback()");
> + if (mStartTime.isSome() && mInfo.HasAudio()) {
Now this could be called before StartPlayback(). Return -1 to indicate there is no audio end time.
Comment 8•10 years ago
|
||
Comment on attachment 8633373 [details]
MozReview Request: Bug 1183007. Part 1 - provide a wrapper function so that all read from mAudioEndTime must be through MDSM::AudioEndTime().
https://reviewboard.mozilla.org/r/13205/#review11817
Ship It\!
Attachment #8633373 -
Flags: review?(kinetik) → review+
Updated•10 years ago
|
Attachment #8633374 -
Flags: review?(kinetik) → review+
Comment 9•10 years ago
|
||
Comment on attachment 8633374 [details]
MozReview Request: Bug 1183007. Part 2 - remove dependency on MDSM::OnAudioEndTimeUpdate from AudioSink.
https://reviewboard.mozilla.org/r/13207/#review11819
Ship It!
::: dom/media/MediaDecoderStateMachine.cpp:3077
(Diff revision 1)
> + return mAudioSink->GetEndTime();
Should this update mAudioEndTime? It seems wrong for AudioEndTime() to return a different value after mAudioSink becomes null, if AudioEndTime() is ever called after mAudioSink becomes null.
| Assignee | ||
Comment 10•10 years ago
|
||
https://reviewboard.mozilla.org/r/13207/#review11819
> Should this update mAudioEndTime? It seems wrong for AudioEndTime() to return a different value after mAudioSink becomes null, if AudioEndTime() is ever called after mAudioSink becomes null.
True that this is indeed a problem. Updating mAudioEndTime each time AudioEndTime() is called is not perfect since there will be a small error between the audio end time observed by MDSM and the true auido end time kept by AudioSink. I am trying to figure out if it makes sense to return mDecodedAudioEndTime when mAudioCompleted is true.
| Assignee | ||
Comment 11•10 years ago
|
||
Comment on attachment 8633375 [details]
MozReview Request: Bug 1183007. Part 2.5 - don't call AudioEndTime() after mAudioSink becomes null.
Cancel review per comment 10.
Attachment #8633375 -
Flags: review?(roc)
| Assignee | ||
Comment 12•10 years ago
|
||
Comment on attachment 8633376 [details] [diff] [review]
MozReview Request: Bug 1183007. Part 4 - remove code that is not used anymore.
Cancel review per comment 10.
Attachment #8633376 -
Flags: review?(roc)
| Assignee | ||
Comment 13•10 years ago
|
||
| Assignee | ||
Updated•10 years ago
|
Summary: Remove MediaDecoderStateMachine::mAudioEndTime → Remove MediaDecoderStateMachine::mAudioEndTime - first
| Assignee | ||
Comment 14•10 years ago
|
||
Let's deal with AudioSink only in this bug. I will file another bug to handle DecodedStream and remove mAudioEndTime.
| Assignee | ||
Comment 15•10 years ago
|
||
Comment on attachment 8633373 [details]
MozReview Request: Bug 1183007. Part 1 - provide a wrapper function so that all read from mAudioEndTime must be through MDSM::AudioEndTime().
Bug 1183007. Part 1 - provide a wrapper function so that all read from mAudioEndTime must be through MDSM::AudioEndTime().
Attachment #8633373 -
Flags: review+ → review?(kinetik)
| Assignee | ||
Comment 16•10 years ago
|
||
Comment on attachment 8633374 [details]
MozReview Request: Bug 1183007. Part 2 - remove dependency on MDSM::OnAudioEndTimeUpdate from AudioSink.
Bug 1183007. Part 2 - remove dependency on MDSM::OnAudioEndTimeUpdate from AudioSink.
Attachment #8633374 -
Flags: review+ → review?(kinetik)
| Assignee | ||
Comment 17•10 years ago
|
||
Comment on attachment 8633375 [details]
MozReview Request: Bug 1183007. Part 2.5 - don't call AudioEndTime() after mAudioSink becomes null.
Bug 1183007. Part 2.5 - don't call AudioEndTime() after mAudioSink becomes null.
Attachment #8633375 -
Attachment description: MozReview Request: Bug 1183007. Part 3 - remove dependency on MDSM::OnAudioEndTimeUpdate from DecodedStream. → MozReview Request: Bug 1183007. Part 2.5 - don't call AudioEndTime() after mAudioSink becomes null.
Attachment #8633375 -
Flags: review?(kinetik)
| Assignee | ||
Updated•10 years ago
|
Attachment #8633376 -
Attachment is obsolete: true
| Assignee | ||
Updated•10 years ago
|
Attachment #8633376 -
Attachment is patch: true
Attachment #8633376 -
Attachment mime type: text/x-review-board-request → text/plain
| Assignee | ||
Updated•10 years ago
|
Attachment #8633373 -
Flags: review?(kinetik) → review+
| Assignee | ||
Updated•10 years ago
|
Attachment #8633374 -
Flags: review?(kinetik) → review+
| Assignee | ||
Comment 18•10 years ago
|
||
Patch 2.5 addresses the issues in comment 10.
Try is green. https://treeherder.mozilla.org/#/jobs?repo=try&revision=0332fed29d38
Comment 19•10 years ago
|
||
Comment on attachment 8633375 [details]
MozReview Request: Bug 1183007. Part 2.5 - don't call AudioEndTime() after mAudioSink becomes null.
https://reviewboard.mozilla.org/r/13209/#review11953
::: dom/media/MediaDecoderStateMachine.cpp:2440
(Diff revision 2)
> + // is wrong to returns -1 for mAudioSink is null.
My brain's tired, but I'm struggling to parse the comment a bit. Would you remind rewording it to something like the following?
"Stop audio sink after call to AudioEndTime() above, otherwise it will return an incorrect value due to a null mAudioSink."
(assuming my interpretation is correct!)
Attachment #8633375 -
Flags: review?(kinetik)
Comment 20•10 years ago
|
||
Comment on attachment 8633375 [details]
MozReview Request: Bug 1183007. Part 2.5 - don't call AudioEndTime() after mAudioSink becomes null.
https://reviewboard.mozilla.org/r/13209/#review11955
Ship It!
Attachment #8633375 -
Flags: review+
| Assignee | ||
Comment 21•10 years ago
|
||
(In reply to Matthew Gregan [:kinetik] from comment #19)
> Comment on attachment 8633375 [details]
> MozReview Request: Bug 1183007. Part 2.5 - don't call AudioEndTime() after
> mAudioSink becomes null.
>
> https://reviewboard.mozilla.org/r/13209/#review11953
>
> ::: dom/media/MediaDecoderStateMachine.cpp:2440
> (Diff revision 2)
> > + // is wrong to returns -1 for mAudioSink is null.
>
> My brain's tired, but I'm struggling to parse the comment a bit. Would you
> remind rewording it to something like the following?
>
> "Stop audio sink after call to AudioEndTime() above, otherwise it will
> return an incorrect value due to a null mAudioSink."
>
> (assuming my interpretation is correct!)
Sure, I will rephrase the comment as suggested. Thanks for the review!
Comment 22•10 years ago
|
||
| Assignee | ||
Updated•10 years ago
|
Assignee: nobody → jwwang
Comment 23•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/492e9a6065d2
https://hg.mozilla.org/mozilla-central/rev/6db05cc790a9
https://hg.mozilla.org/mozilla-central/rev/fafc65c08458
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•