Closed
Bug 1446929
Opened 8 years ago
Closed 8 years ago
dom/media/Benchmark.cpp only supports video
Categories
(Core :: Audio/Video: Playback, enhancement)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla61
| Tracking | Status | |
|---|---|---|
| firefox61 | --- | fixed |
People
(Reporter: decoder, Assigned: decoder)
Details
Attachments
(1 file)
Currently, the Benchmark class only seems to support video input judging from this code:
https://searchfox.org/mozilla-central/rev/3abf6fa7e2a6d9a7bfb88796141b0f012e68c2db/dom/media/Benchmark.cpp#180
I rewrote the code as follows:
> - mTrackDemuxer =
> - mDemuxer->GetTrackDemuxer(TrackInfo::kVideoTrack, 0);
> + if (mDemuxer->GetNumberTracks(TrackInfo::kVideoTrack)) {
> + mTrackDemuxer =
> + mDemuxer->GetTrackDemuxer(TrackInfo::kVideoTrack, 0);
> + } else if (mDemuxer->GetNumberTracks(TrackInfo::kAudioTrack)) {
> + mTrackDemuxer =
> + mDemuxer->GetTrackDemuxer(TrackInfo::kAudioTrack, 0);
> + }
Does this look like the right approach? And does it make sense to support more than one audio/video track?
I can attach a proper patch for review if this is the right way to go.
Updated•8 years ago
|
Component: Audio/Video → Audio/Video: Playback
| Assignee | ||
Comment 1•8 years ago
|
||
Setting needinfo for :jya to confirm the approach in comment 0 or suggest an alternative that I can implement.
Flags: needinfo?(jyavenard)
Comment 2•8 years ago
|
||
that or following the current style.
mTrackDemuxer =
mDemuxer->GetTrackDemuxer(TrackInfo::kVideoTrack, 0);
if (!mTrackDemuxer) {
mTrackDemuxer =
mDemuxer->GetTrackDemuxer(TrackInfo::kVideoTrack, 0);
if (!mTrackDemuxer) {
MainThreadShutdown();
return;
}
}
the one you suggest looks better though
Flags: needinfo?(jyavenard)
| Comment hidden (mozreview-request) |
Comment 4•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8962686 [details]
Bug 1446929 - Support audio files in media Benchmark class.
https://reviewboard.mozilla.org/r/231556/#review237054
Attachment #8962686 -
Flags: review?(jyavenard) → review+
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → choller
Status: NEW → ASSIGNED
Pushed by choller@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fc9024c91420
Support audio files in media Benchmark class. r=jya
Comment 6•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in
before you can comment on or make changes to this bug.
Description
•