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

Unified Diff: chromecast/media/cma/test/frame_segmenter_for_test.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/cma/base/demuxer_stream_for_test.cc ('k') | chromecast/media/service/cast_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cma/test/frame_segmenter_for_test.cc
diff --git a/chromecast/media/cma/test/frame_segmenter_for_test.cc b/chromecast/media/cma/test/frame_segmenter_for_test.cc
index 5d9406ec01950def579fbb77597fd7403ae85c24..e6442b54bfc3454a5af486ce650f0e347e16871c 100644
--- a/chromecast/media/cma/test/frame_segmenter_for_test.cc
+++ b/chromecast/media/cma/test/frame_segmenter_for_test.cc
@@ -323,8 +323,16 @@ DemuxResult FFmpegDemuxForTest(const base::FilePath& filepath,
false);
init_event.RunAndWaitForStatus(::media::PIPELINE_OK);
- ::media::DemuxerStream* stream = demuxer.GetStream(
- audio ? ::media::DemuxerStream::AUDIO : ::media::DemuxerStream::VIDEO);
+ std::vector<::media::DemuxerStream*> streams = demuxer.GetStreams();
+ ::media::DemuxerStream* stream = nullptr;
+ ::media::DemuxerStream::Type target_type =
+ audio ? ::media::DemuxerStream::AUDIO : ::media::DemuxerStream::VIDEO;
+ for (const auto& demuxer_stream : streams) {
+ if (demuxer_stream->type() == target_type) {
+ stream = demuxer_stream;
+ break;
+ }
+ }
CHECK(stream);
DemuxResult demux_result;
« no previous file with comments | « chromecast/media/cma/base/demuxer_stream_for_test.cc ('k') | chromecast/media/service/cast_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698