Closed
Bug 1221009
Opened 9 years ago
Closed 9 years ago
Separate the interface of MediaResourceCallback from MediaDecoder
Categories
(Core :: Audio/Video: Playback, defect, P2)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: jwwang, Assigned: jwwang)
References
Details
Attachments
(3 files)
We will have a class inheriting MediaResourceCallback to forward notifications from MediaResource to MediaDecoder which no longer inherits MediaResourceCallback. There are several benefits in doing this: 1. We will be able to create MediaDecoder after MediaResource is instantiated and remove the need for MediaDecoder::SetResource() by passing MediaResource to the constructor. This allow us to make mResource const and simplify the logic. 2. MediaDecoder can be disconnected from the object to stop receiving notifications from MediaResource. We won't have to check if MediaDecoder is in a valid state (shutdown or not) to process the notifications.
Updated•9 years ago
|
Priority: -- → P2
Assignee | ||
Comment 1•9 years ago
|
||
Bug 1221009. Part 1 - add a class to forward notifications from MediaResource to MediaDecoder. r=roc.
Attachment #8686528 -
Flags: review?(roc)
Assignee | ||
Comment 2•9 years ago
|
||
Bug 1221009. Part 2 - remove unused code. r=roc.
Attachment #8686529 -
Flags: review?(roc)
Assignee | ||
Comment 3•9 years ago
|
||
Bug 1221009. Part 3 - add assertions to functions that shouldn't be called after shutdown. r=roc.
Attachment #8686530 -
Flags: review?(roc)
Assignee | ||
Comment 4•9 years ago
|
||
Comment on attachment 8686528 [details] MozReview Request: Bug 1221009. Part 1 - add a class to forward notifications from MediaResource to MediaDecoder. r=roc. Review request updated; see interdiff: https://reviewboard.mozilla.org/r/24995/diff/1-2/
For some reason I can't review those patches. Others do work. Maybe you need to repost them?
Flags: needinfo?(jwwang)
Assignee | ||
Comment 6•9 years ago
|
||
Comment on attachment 8686528 [details] MozReview Request: Bug 1221009. Part 1 - add a class to forward notifications from MediaResource to MediaDecoder. r=roc. Review request updated; see interdiff: https://reviewboard.mozilla.org/r/24995/diff/1-2/
Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8686529 [details] MozReview Request: Bug 1221009. Part 2 - remove unused code. r=roc. Review request updated; see interdiff: https://reviewboard.mozilla.org/r/24997/diff/1-2/
Assignee | ||
Comment 8•9 years ago
|
||
Comment on attachment 8686530 [details] MozReview Request: Bug 1221009. Part 3 - add assertions to functions that shouldn't be called after shutdown. r=roc. Review request updated; see interdiff: https://reviewboard.mozilla.org/r/24999/diff/1-2/
Yes, thanks.
Attachment #8686528 -
Flags: review?(roc) → review+
Comment on attachment 8686528 [details] MozReview Request: Bug 1221009. Part 1 - add a class to forward notifications from MediaResource to MediaDecoder. r=roc. https://reviewboard.mozilla.org/r/24995/#review22725 This is only a very small improvement IMHO, but since you've done it, I guess we might as well take it.
Comment on attachment 8686529 [details] MozReview Request: Bug 1221009. Part 2 - remove unused code. r=roc. https://reviewboard.mozilla.org/r/24997/#review22727
Attachment #8686529 -
Flags: review?(roc) → review+
Attachment #8686530 -
Flags: review?(roc) → review+
Comment on attachment 8686530 [details] MozReview Request: Bug 1221009. Part 3 - add assertions to functions that shouldn't be called after shutdown. r=roc. https://reviewboard.mozilla.org/r/24999/#review22729
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #11) > This is only a very small improvement IMHO, but since you've done it, I > guess we might as well take it. I mean, it probably wasn't worth your time to do this.
Assignee | ||
Comment 15•9 years ago
|
||
Thanks for the review! This is a step forward to remove bi-directional dependency between MediaDecoder and MDSM/MediaResource. For now, MediaDecoder functions could be called after Shutdown() and we have to check |mShuttingDown| from time to time to know if this MediaDecoder is in a valid state to handle the request. I would like to apply the observer pattern so MediaDecoder can convenient disconnect from the event publishers (MDSM or MediaResource) during shutdown to stop receiving notifications. It also helps improve the logic of MediaDecoder in a more readable way.
Assignee | ||
Comment 16•9 years ago
|
||
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=56e757bbcf37
Comment 17•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/926b9011f5c2 https://hg.mozilla.org/integration/mozilla-inbound/rev/a20ad2282ed1 https://hg.mozilla.org/integration/mozilla-inbound/rev/057d396895c6
Comment 18•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/926b9011f5c2 https://hg.mozilla.org/mozilla-central/rev/a20ad2282ed1 https://hg.mozilla.org/mozilla-central/rev/057d396895c6
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in
before you can comment on or make changes to this bug.
Description
•