Closed
Bug 1172264
Opened 10 years ago
Closed 10 years ago
Mirror duration from the MDSM to the MediaDecoder
Categories
(Core :: Audio/Video, defect)
Core
Audio/Video
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: bholley, Assigned: bholley)
References
(Blocks 1 open bug)
Details
Attachments
(8 files)
1.30 KB,
patch
|
jwwang
:
review+
|
Details | Diff | Splinter Review |
15.90 KB,
patch
|
jwwang
:
review+
|
Details | Diff | Splinter Review |
5.61 KB,
patch
|
jwwang
:
review+
|
Details | Diff | Splinter Review |
11.70 KB,
patch
|
jwwang
:
review+
|
Details | Diff | Splinter Review |
17.33 KB,
patch
|
jwwang
:
review+
|
Details | Diff | Splinter Review |
8.60 KB,
patch
|
jwwang
:
review+
|
Details | Diff | Splinter Review |
5.60 KB,
patch
|
jwwang
:
review+
|
Details | Diff | Splinter Review |
1015 bytes,
patch
|
jya
:
review+
|
Details | Diff | Splinter Review |
This will ideally let us eliminate the manual firing of MediaDecoder::DurationChanged that we have now. Once we have bug 1163223, we can do this.
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8623373 -
Flags: review?(jwwang)
Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8623374 -
Flags: review?(jwwang)
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8623375 -
Flags: review?(jwwang)
Assignee | ||
Comment 5•10 years ago
|
||
Attachment #8623376 -
Flags: review?(jwwang)
Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8623377 -
Flags: review?(jwwang)
Assignee | ||
Comment 7•10 years ago
|
||
Attachment #8623378 -
Flags: review?(jwwang)
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8623379 -
Flags: review?(jwwang)
Assignee | ||
Comment 9•10 years ago
|
||
Attachment #8623380 -
Flags: review?(jwwang)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → bobbyholley
Comment 10•10 years ago
|
||
Comment on attachment 8623373 [details] [diff] [review]
Part 1 - Require Manual disconnection for all mirrors. v1
Review of attachment 8623373 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/media/StateMirroring.h
@@ +286,5 @@
> + // As a member of complex objects, a Mirror<T> may be destroyed on a
> + // different thread than its owner, or late in shutdown during CC. Given
> + // that, we require manual disconnection so that callers can put things in
> + // the right place.
> + MOZ_DIAGNOSTIC_ASSERT(!mImpl->IsConnected());
How do we ensure no data race when Mirror is deleted on a thread other than the owner thread?
Attachment #8623373 -
Flags: review?(jwwang) → review+
Comment 11•10 years ago
|
||
Comment on attachment 8623374 [details] [diff] [review]
Part 2 - Track the MDSM's duration as a TimeUnit and eliminate the separate concept of 'end time'. v1
Review of attachment 8623374 [details] [diff] [review]:
-----------------------------------------------------------------
Nice!
Attachment #8623374 -
Flags: review?(jwwang) → review+
Updated•10 years ago
|
Attachment #8623375 -
Flags: review?(jwwang) → review+
Updated•10 years ago
|
Attachment #8623376 -
Flags: review?(jwwang) → review+
Comment 12•10 years ago
|
||
Comment on attachment 8623377 [details] [diff] [review]
Part 5 - Mirror duration from the MDSM to the MediaDecoderReader and remove MDSM::GetDuration. v1
Review of attachment 8623377 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/media/MediaDecoderReader.h
@@ +81,5 @@
> // destroyed.
> explicit MediaDecoderReader(AbstractMediaDecoder* aDecoder, MediaTaskQueue* aBorrowedTaskQueue = nullptr);
>
> + // Does any spinup that needs to happen on this task queue. This may run
> + // before Init().
How can this be run before Init() when we have tail dispatcher?
Attachment #8623377 -
Flags: review?(jwwang) → review+
Comment 13•10 years ago
|
||
Comment on attachment 8623378 [details] [diff] [review]
Part 6 - Route mExplicitDuration directly from the mediasource code to MediaDecoder, and stop passing an argument to DurationChanged. v1
Review of attachment 8623378 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/media/MediaDecoder.cpp
@@ +1102,5 @@
>
> + // See https://www.w3.org/Bugs/Public/show_bug.cgi?id=28822 for a discussion
> + // of whether we should fire durationchange on explicit infinity.
> + if (mOwner && mFiredMetadataLoaded &&
> + (!mozilla::IsInfinite<double>(mDuration) || mExplicitDuration.Ref().isSome())) {
Why do we fire "durationchange" if we have mExplicitDuration in spite of infinite mDuration?
Updated•10 years ago
|
Attachment #8623379 -
Flags: review?(jwwang) → review+
Comment 14•10 years ago
|
||
Comment on attachment 8623380 [details] [diff] [review]
Part 8 - Mark WPT as succeeding. v1
Review of attachment 8623380 [details] [diff] [review]:
-----------------------------------------------------------------
Jya is more familiar with MSE tests.
Attachment #8623380 -
Flags: review?(jwwang) → review?(jyavenard)
Comment 15•10 years ago
|
||
Comment on attachment 8623380 [details] [diff] [review]
Part 8 - Mark WPT as succeeding. v1
Review of attachment 8623380 [details] [diff] [review]:
-----------------------------------------------------------------
Hopefully they aren't going to intermittently timeout anymore.
Attachment #8623380 -
Flags: review?(jyavenard) → review+
Comment 16•10 years ago
|
||
Comment on attachment 8623380 [details] [diff] [review]
Part 8 - Mark WPT as succeeding. v1
Review of attachment 8623380 [details] [diff] [review]:
-----------------------------------------------------------------
::: testing/web-platform/meta/media-source/mediasource-duration.html.ini
@@ +12,5 @@
>
> [Test setting same duration multiple times does not fire duplicate durationchange]
> + expected:
> + if os == "linux": FAIL # Duration estimates wrong for webm - bug 1065207
> + if (os == "win") and (version == "5.1.2600"): FAIL # Same as above
You need the trailing CR.
Assignee | ||
Comment 17•10 years ago
|
||
(In reply to JW Wang [:jwwang] from comment #10)
> How do we ensure no data race when Mirror is deleted on a thread other than
> the owner thread?
I don't understand this question - the point here is that the caller is always required to tear down the mirror on the owner thread (before the owner thread goes away), so that it doesn't matter which thread the object is destroyed on.
(In reply to JW Wang [:jwwang] from comment #12)
> How can this be run before Init() when we have tail dispatcher?
Fair point - I'll update the comment.
(In reply to JW Wang [:jwwang] from comment #13)
> > + // See https://www.w3.org/Bugs/Public/show_bug.cgi?id=28822 for a discussion
> > + // of whether we should fire durationchange on explicit infinity.
> > + if (mOwner && mFiredMetadataLoaded &&
> > + (!mozilla::IsInfinite<double>(mDuration) || mExplicitDuration.Ref().isSome())) {
>
> Why do we fire "durationchange" if we have mExplicitDuration in spite of
> infinite mDuration?
It's explained in the comment that you quote. ;-)
Assuming that the patch was unobjectionable aside from that, I'm going to push this rpending to avoid losing a day. I'll of course address any further feedback immediately upon arrival.
I apologize for my continued bending of the rules here, but I have exactly 3 days left to get all this threading model stuff sorted out, and we're very, very close.
Comment 18•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/f4f44192009b
https://hg.mozilla.org/integration/mozilla-inbound/rev/394c85b4a06b
https://hg.mozilla.org/integration/mozilla-inbound/rev/3ead3466f84a
https://hg.mozilla.org/integration/mozilla-inbound/rev/bc8f5c62dbef
https://hg.mozilla.org/integration/mozilla-inbound/rev/645564f3f35f
https://hg.mozilla.org/integration/mozilla-inbound/rev/5a1fd02713e2
https://hg.mozilla.org/integration/mozilla-inbound/rev/549275b488a7
https://hg.mozilla.org/integration/mozilla-inbound/rev/a5eb0b1fcf39
Comment 19•10 years ago
|
||
Comment on attachment 8623378 [details] [diff] [review]
Part 6 - Route mExplicitDuration directly from the mediasource code to MediaDecoder, and stop passing an argument to DurationChanged. v1
Review of attachment 8623378 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/media/MediaDecoder.cpp
@@ +1102,5 @@
>
> + // See https://www.w3.org/Bugs/Public/show_bug.cgi?id=28822 for a discussion
> + // of whether we should fire durationchange on explicit infinity.
> + if (mOwner && mFiredMetadataLoaded &&
> + (!mozilla::IsInfinite<double>(mDuration) || mExplicitDuration.Ref().isSome())) {
I see. It makes sense to me.
Attachment #8623378 -
Flags: review?(jwwang) → review+
Comment 20•10 years ago
|
||
Comment on attachment 8623373 [details] [diff] [review]
Part 1 - Require Manual disconnection for all mirrors. v1
Review of attachment 8623373 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/media/StateMirroring.h
@@ +286,5 @@
> + // As a member of complex objects, a Mirror<T> may be destroyed on a
> + // different thread than its owner, or late in shutdown during CC. Given
> + // that, we require manual disconnection so that callers can put things in
> + // the right place.
> + MOZ_DIAGNOSTIC_ASSERT(!mImpl->IsConnected());
If mImpl->IsConnected() reads mCanonical on a non-owner thread, there will be data race since mCanonical is written in the owner thread in DisconnectIfConnected().
However, I believe our media code always ensures DisconnectIfConnected() "happen before" ~Mirror().
Assignee | ||
Comment 21•10 years ago
|
||
(In reply to JW Wang [:jwwang] from comment #20)
> If mImpl->IsConnected() reads mCanonical on a non-owner thread, there will
> be data race since mCanonical is written in the owner thread in
> DisconnectIfConnected().
>
> However, I believe our media code always ensures DisconnectIfConnected()
> "happen before" ~Mirror().
Right. The assertion is racey only in the case where we get it wrong. :-)
Comment 22•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f4f44192009b
https://hg.mozilla.org/mozilla-central/rev/394c85b4a06b
https://hg.mozilla.org/mozilla-central/rev/3ead3466f84a
https://hg.mozilla.org/mozilla-central/rev/bc8f5c62dbef
https://hg.mozilla.org/mozilla-central/rev/645564f3f35f
https://hg.mozilla.org/mozilla-central/rev/5a1fd02713e2
https://hg.mozilla.org/mozilla-central/rev/549275b488a7
https://hg.mozilla.org/mozilla-central/rev/a5eb0b1fcf39
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•