Closed
Bug 1219142
Opened 9 years ago
Closed 9 years ago
Use MediaEventSource to publish events when data arrives in the MediaResource
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
(2 files)
The reader can register with the event to receive notifications without delegation from MDSM. This will also remove MediaDecoderReader::DispatchNotifyDataArrived to simplify the interface.
Assignee | ||
Comment 1•9 years ago
|
||
Bug 1219142. Part 1 - add AbstractMediaDecoder::DataArrivedEvent() to publish events. r=jya.
Attachment #8681769 -
Flags: review?(jyavenard)
Assignee | ||
Comment 2•9 years ago
|
||
Bug 1219142. Part 2 - remove unused code. r=jya.
Attachment #8681770 -
Flags: review?(jyavenard)
Updated•9 years ago
|
Attachment #8681769 -
Flags: review?(jyavenard)
Comment 3•9 years ago
|
||
Comment on attachment 8681769 [details] MozReview Request: Bug 1219142. Part 1 - add AbstractMediaDecoder::DataArrivedEvent() to publish events. r=jya. https://reviewboard.mozilla.org/r/23889/#review21337 ::: dom/media/AbstractMediaDecoder.h:81 (Diff revision 1) > + virtual MediaEventSource<uint32_t, int64_t, bool>* DataArrivedEvent() I'd prefer that no such information is provided, as it can only lead to invalid reads being performed on the MediaResource. So instead, don't have any arguments at all. Since bug 1218157; the arguments are unused.
Comment 4•9 years ago
|
||
Comment on attachment 8681770 [details] MozReview Request: Bug 1219142. Part 2 - remove unused code. r=jya. https://reviewboard.mozilla.org/r/23891/#review21339
Attachment #8681770 -
Flags: review?(jyavenard) → review+
Comment 5•9 years ago
|
||
NotifyDataArrivedInternal , if still used should also no longer been provided argument. The receiver should only been using the call to detect that the buffered range is to be refreshed. not attempt to do anything else
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to Jean-Yves Avenard [:jya] from comment #5) > NotifyDataArrivedInternal , if still used should also no longer been > provided argument. https://hg.mozilla.org/mozilla-central/file/96377bdbcdf3/dom/media/webm/WebMReader.cpp#l805 I guess it should be |mBufferedState->NotifyDataArrived(bytes->Elements(), bytes->Length(), range.mStart)| so |aLength| and |aOffset| won't be used at all.
Assignee | ||
Comment 7•9 years ago
|
||
https://reviewboard.mozilla.org/r/23889/#review21337 > I'd prefer that no such information is provided, as it can only lead to invalid reads being performed on the MediaResource. > > So instead, don't have any arguments at all. > > Since bug 1218157; the arguments are unused. Do you mean |virtual MediaEventSource<void>* DataArrivedEvent()| because we don't need |aThrottleUpdates| either? However, MediaDecoderReader::ThrottledNotifyDataArrived() still takes an interval which comes from |media::Interval<int64_t>(aOffset, aOffset + aLength)| in MediaDecoderReader::OnDataArrived().
Comment 8•9 years ago
|
||
(In reply to JW Wang [:jwwang] from comment #6) > (In reply to Jean-Yves Avenard [:jya] from comment #5) > > NotifyDataArrivedInternal , if still used should also no longer been > > provided argument. > > https://hg.mozilla.org/mozilla-central/file/96377bdbcdf3/dom/media/webm/ > WebMReader.cpp#l805 > I guess it should be |mBufferedState->NotifyDataArrived(bytes->Elements(), > bytes->Length(), range.mStart)| so |aLength| and |aOffset| won't be used at > all. But those aren't the arguments provided to WebMReader::NotifyDataArrived Instead it retrieves the cached ranges and pass that information instead.
Comment 9•9 years ago
|
||
(In reply to JW Wang [:jwwang] from comment #7) > https://reviewboard.mozilla.org/r/23889/#review21337 > > > I'd prefer that no such information is provided, as it can only lead to invalid reads being performed on the MediaResource. > > > > So instead, don't have any arguments at all. > > > > Since bug 1218157; the arguments are unused. > > Do you mean |virtual MediaEventSource<void>* DataArrivedEvent()| because we > don't need |aThrottleUpdates| either? However, > MediaDecoderReader::ThrottledNotifyDataArrived() still takes an interval > which comes from |media::Interval<int64_t>(aOffset, aOffset + aLength)| in > MediaDecoderReader::OnDataArrived(). Same thing.. We no longer require this. We could remove the throttling too... We may want to reschedule a task when MediaFormatReader::NotifyDataArrivedInternal is called; so that when we get a storm of NotifyDataArrived dispatch (it's called for every 32kB downloaded) we don't end up recalculating unnecessarily, and instead it's calculated once only. Actually, upon checking it's already done that way.
Updated•9 years ago
|
Priority: -- → P2
Assignee | ||
Comment 10•9 years ago
|
||
https://reviewboard.mozilla.org/r/23889/#review22535
Assignee | ||
Updated•9 years ago
|
Attachment #8681769 -
Flags: review?(jyavenard)
Comment 11•9 years ago
|
||
https://reviewboard.mozilla.org/r/23889/#review22535 is there something new I should look at?
Assignee | ||
Comment 12•9 years ago
|
||
no, just a rebase for we remove all arguments (throttling and others).
Comment 13•9 years ago
|
||
(In reply to JW Wang [:jwwang] from comment #12) > no, just a rebase for we remove all arguments (throttling and others). but I still see the throttle related arguments in that patch.
Assignee | ||
Comment 14•9 years ago
|
||
Can you paste the link? I see none in this link: https://reviewboard.mozilla.org/r/23889/diff/2#index_header.
Comment 15•9 years ago
|
||
(In reply to JW Wang [:jwwang] from comment #14) > Can you paste the link? I see none in this link: > https://reviewboard.mozilla.org/r/23889/diff/2#index_header. "The page you were looking for does not exist." I see: https://reviewboard.mozilla.org/r/23889/diff/1#2 like dom/media/MediaDecoder.cpp " mDataArrivedEvent.Notify(aLength, aOffset, aThrottleUpdates);" etc.
Assignee | ||
Comment 16•9 years ago
|
||
How about this one? https://reviewboard.mozilla.org/r/23889/diff/2/
Comment 17•9 years ago
|
||
still no go: "The page you were looking for does not exist. If you're pretty sure this page does exist, try logging in and trying again." but I'm logged in
Comment 18•9 years ago
|
||
This is the only link to a repository I can find: https://reviewboard-hg.mozilla.org/gecko/rev/ba0fb2ebab3d and that's the code from 2 weeks ago
Assignee | ||
Comment 19•9 years ago
|
||
Let me upload the patch again.
Assignee | ||
Comment 20•9 years ago
|
||
Comment on attachment 8681769 [details] MozReview Request: Bug 1219142. Part 1 - add AbstractMediaDecoder::DataArrivedEvent() to publish events. r=jya. Review request updated; see interdiff: https://reviewboard.mozilla.org/r/23889/diff/1-2/
Assignee | ||
Comment 21•9 years ago
|
||
Comment on attachment 8681770 [details] MozReview Request: Bug 1219142. Part 2 - remove unused code. r=jya. Review request updated; see interdiff: https://reviewboard.mozilla.org/r/23891/diff/1-2/
Assignee | ||
Comment 22•9 years ago
|
||
Does it work? https://reviewboard.mozilla.org/r/23887
Comment 23•9 years ago
|
||
Comment on attachment 8681769 [details] MozReview Request: Bug 1219142. Part 1 - add AbstractMediaDecoder::DataArrivedEvent() to publish events. r=jya. https://reviewboard.mozilla.org/r/23889/#review22831 sorry it took so long. at no time did i see a new revision (until now that is)
Attachment #8681769 -
Flags: review?(jyavenard) → review+
Assignee | ||
Comment 24•9 years ago
|
||
Thanks for the review!
Comment 25•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/74726f6aa4e9 https://hg.mozilla.org/integration/mozilla-inbound/rev/28d11278ff97
Comment 26•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/74726f6aa4e9 https://hg.mozilla.org/mozilla-central/rev/28d11278ff97
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → jwwang
You need to log in
before you can comment on or make changes to this bug.
Description
•