Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1003)

Unified Diff: media/base/demuxer_perftest.cc

Issue 2667283002: Refactor MediaResource to be multi-stream capable (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromecast/media/service/cast_renderer.cc ('k') | media/base/demuxer_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/demuxer_perftest.cc
diff --git a/media/base/demuxer_perftest.cc b/media/base/demuxer_perftest.cc
index 6fccde25e1a2a05a77d9a23db922312aa0cbc37f..a3cf33085a9b65ec2a61621c5f02b727f13047a8 100644
--- a/media/base/demuxer_perftest.cc
+++ b/media/base/demuxer_perftest.cc
@@ -102,23 +102,13 @@ class StreamReader {
StreamReader::StreamReader(media::Demuxer* demuxer,
bool enable_bitstream_converter) {
- media::DemuxerStream* stream =
- demuxer->GetStream(media::DemuxerStream::AUDIO);
- if (stream) {
+ std::vector<media::DemuxerStream*> streams = demuxer->GetStreams();
+ for (const auto& stream : streams) {
streams_.push_back(stream);
end_of_stream_.push_back(false);
last_read_timestamp_.push_back(media::kNoTimestamp);
counts_.push_back(0);
- }
-
- stream = demuxer->GetStream(media::DemuxerStream::VIDEO);
- if (stream) {
- streams_.push_back(stream);
- end_of_stream_.push_back(false);
- last_read_timestamp_.push_back(media::kNoTimestamp);
- counts_.push_back(0);
-
- if (enable_bitstream_converter)
+ if (enable_bitstream_converter && stream->type() == DemuxerStream::VIDEO)
stream->EnableBitstreamConverter();
}
}
« no previous file with comments | « chromecast/media/service/cast_renderer.cc ('k') | media/base/demuxer_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698