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

Unified Diff: media/formats/common/stream_parser_test_base.cc

Issue 1833053005: Remove MediaTracks::getFirstAudio/VideoConfig (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@track-control
Patch Set: Avoid crashes in tests Created 4 years, 6 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/base/media_tracks.cc ('k') | media/formats/mp2t/mp2t_stream_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/common/stream_parser_test_base.cc
diff --git a/media/formats/common/stream_parser_test_base.cc b/media/formats/common/stream_parser_test_base.cc
index c70d6e2288f0bce42ad204432cf7655aa7e298ef..86c9499f2ec6af054a9259aec84c8d1d574575be 100644
--- a/media/formats/common/stream_parser_test_base.cc
+++ b/media/formats/common/stream_parser_test_base.cc
@@ -89,11 +89,12 @@ void StreamParserTestBase::OnInitDone(
bool StreamParserTestBase::OnNewConfig(
std::unique_ptr<MediaTracks> tracks,
const StreamParser::TextTrackConfigMap& text_config) {
- DVLOG(1) << __FUNCTION__ << " media tracks count=" << tracks->tracks().size();
+ DVLOG(1) << __FUNCTION__ << ": got " << tracks->tracks().size() << " tracks";
EXPECT_EQ(tracks->tracks().size(), 1u);
- EXPECT_TRUE(tracks->getFirstAudioConfig().IsValidConfig());
- EXPECT_FALSE(tracks->getFirstVideoConfig().IsValidConfig());
- last_audio_config_ = tracks->getFirstAudioConfig();
+ const auto& track = tracks->tracks()[0];
+ EXPECT_EQ(track->type(), MediaTrack::Audio);
+ last_audio_config_ = tracks->getAudioConfig(track->bytestream_track_id());
+ EXPECT_TRUE(last_audio_config_.IsValidConfig());
return true;
}
« no previous file with comments | « media/base/media_tracks.cc ('k') | media/formats/mp2t/mp2t_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698