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

Unified Diff: media/test/pipeline_integration_test_base.cc

Issue 1812543003: Allow muting/unmuting audio through media track API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blink-sb-tracks6
Patch Set: Avoid ChunkDemuxer/PipelineImpl deadlock Created 4 years, 8 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 | « media/test/pipeline_integration_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/test/pipeline_integration_test_base.cc
diff --git a/media/test/pipeline_integration_test_base.cc b/media/test/pipeline_integration_test_base.cc
index 17647ba7ad07dd725c6998ae55f1864f348b398b..9c20aebbf14e788d6e3d38aea9ce8f169af0df7f 100644
--- a/media/test/pipeline_integration_test_base.cc
+++ b/media/test/pipeline_integration_test_base.cc
@@ -83,6 +83,15 @@ void PipelineIntegrationTestBase::DemuxerEncryptedMediaInitDataCB(
void PipelineIntegrationTestBase::DemuxerMediaTracksUpdatedCB(
scoped_ptr<MediaTracks> tracks) {
CHECK(tracks);
+ CHECK(demuxer_);
+
+ // Generate track ids.
+ std::vector<unsigned> track_ids;
+ for (size_t track_id = 1; track_id <= tracks->tracks().size(); ++track_id) {
+ track_ids.push_back(track_id);
+ }
+
+ demuxer_->OnTrackIdsAssigned(*tracks.get(), track_ids);
}
void PipelineIntegrationTestBase::OnEnded() {
@@ -273,16 +282,14 @@ void PipelineIntegrationTestBase::CreateDemuxer(
scoped_ptr<DataSource> data_source) {
data_source_ = std::move(data_source);
- Demuxer::MediaTracksUpdatedCB tracks_updated_cb =
- base::Bind(&PipelineIntegrationTestBase::DemuxerMediaTracksUpdatedCB,
- base::Unretained(this));
-
#if !defined(MEDIA_DISABLE_FFMPEG)
demuxer_ = scoped_ptr<Demuxer>(new FFmpegDemuxer(
message_loop_.task_runner(), data_source_.get(),
base::Bind(&PipelineIntegrationTestBase::DemuxerEncryptedMediaInitDataCB,
base::Unretained(this)),
- tracks_updated_cb, new MediaLog()));
+ base::Bind(&PipelineIntegrationTestBase::DemuxerMediaTracksUpdatedCB,
+ base::Unretained(this)),
+ new MediaLog()));
#endif
}
« no previous file with comments | « media/test/pipeline_integration_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698