Open
Bug 1363283
Opened 8 years ago
Updated 3 years ago
Reduce ref-counting overhead of MediaFormatReader::HandleDemuxedSamples()
Categories
(Core :: Audio/Video: Playback, enhancement, P3)
Core
Audio/Video: Playback
Tracking
()
NEW
People
(Reporter: jwwang, Unassigned)
Details
Attachments
(1 file)
59 bytes,
text/x-review-board-request
|
Details |
http://searchfox.org/mozilla-central/rev/224cc663d54085994a4871ef464b7662e0721e83/dom/media/MediaFormatReader.cpp#2037
We can reduce one AddRef/Release pair by transferring the ownership of |sample| for it is no longer used and will be removed by |decoder.mQueuedSamples.RemoveElementAt(0)| soon.
Reporter | ||
Updated•8 years ago
|
Assignee: nobody → jwwang
Priority: -- → P3
Comment hidden (mozreview-request) |
Reporter | ||
Updated•8 years ago
|
Attachment #8865766 -
Flags: review?(jyavenard)
Attachment #8865766 -
Flags: review?(gsquelart)
Reporter | ||
Comment 2•8 years ago
|
||
mozreview-review |
Comment on attachment 8865766 [details]
Bug 1363283 - Reduce ref-counting overhead of MediaFormatReader::HandleDemuxedSamples().
https://reviewboard.mozilla.org/r/137386/#review140446
::: dom/media/Benchmark.cpp:308
(Diff revision 1)
> MOZ_ASSERT(OnThread());
> if (mFinished || mSampleIndex >= mSamples.Length()) {
> return;
> }
> RefPtr<Benchmark> ref(mMainThreadState);
> - mDecoder->Decode(mSamples[mSampleIndex])
> + mDecoder->Decode(mSamples[mSampleIndex].forget())
Hi Gerald,
Can you review the change in Benchmark.cpp to make sure it is safe to transfer the ownership of mSamples[mSampleIndex]?
Comment 3•8 years ago
|
||
mozreview-review |
Comment on attachment 8865766 [details]
Bug 1363283 - Reduce ref-counting overhead of MediaFormatReader::HandleDemuxedSamples().
https://reviewboard.mozilla.org/r/137386/#review140886
I don't like it.
It makes the code much more painful to read, more complicated to maintain for no proven benefit
Attachment #8865766 -
Flags: review?(jyavenard)
Comment 4•8 years ago
|
||
mozreview-review |
Comment on attachment 8865766 [details]
Bug 1363283 - Reduce ref-counting overhead of MediaFormatReader::HandleDemuxedSamples().
https://reviewboard.mozilla.org/r/137386/#review140888
I should add, that the aim was to have a shared MediaRawData between the MSE demuxer (that stores all those raw data in an array) and the MediaDataDecoder.
This would no longer be possible with this.
Comment 5•8 years ago
|
||
mozreview-review |
Comment on attachment 8865766 [details]
Bug 1363283 - Reduce ref-counting overhead of MediaFormatReader::HandleDemuxedSamples().
https://reviewboard.mozilla.org/r/137386/#review140934
(Deferring to jya's review)
Attachment #8865766 -
Flags: review?(gsquelart)
Comment 6•3 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Assignee: suro001 → nobody
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•