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

Unified Diff: media/formats/mp2t/mp2t_stream_parser_unittest.cc

Issue 1716503002: Basic media tracks implementation for media stream parsers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 10 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/formats/mp2t/mp2t_stream_parser.cc ('k') | media/formats/mp4/mp4_stream_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp2t/mp2t_stream_parser_unittest.cc
diff --git a/media/formats/mp2t/mp2t_stream_parser_unittest.cc b/media/formats/mp2t/mp2t_stream_parser_unittest.cc
index ab1d2306290c56d6670d4fbe09b2d947b1d4e433..553f0c46ba37e9a2df04e8c1ea5f20bc6a4bc941 100644
--- a/media/formats/mp2t/mp2t_stream_parser_unittest.cc
+++ b/media/formats/mp2t/mp2t_stream_parser_unittest.cc
@@ -15,6 +15,8 @@
#include "base/time/time.h"
#include "media/base/audio_decoder_config.h"
#include "media/base/decoder_buffer.h"
+#include "media/base/media_track.h"
+#include "media/base/media_tracks.h"
#include "media/base/stream_parser_buffer.h"
#include "media/base/test_data_util.h"
#include "media/base/text_track_config.h"
@@ -111,10 +113,12 @@ class Mp2tStreamParserTest : public testing::Test {
<< ", autoTimestampOffset=" << params.auto_update_timestamp_offset;
}
- bool OnNewConfig(const AudioDecoderConfig& ac,
- const VideoDecoderConfig& vc,
+ bool OnNewConfig(scoped_ptr<MediaTracks> tracks,
const StreamParser::TextTrackConfigMap& tc) {
- DVLOG(1) << "OnNewConfig: audio=" << ac.IsValidConfig()
+ const AudioDecoderConfig& ac = tracks->getFirstAudioConfig();
+ const VideoDecoderConfig& vc = tracks->getFirstVideoConfig();
+ DVLOG(1) << "OnNewConfig: media tracks count=" << tracks->tracks().size()
+ << ", audio=" << ac.IsValidConfig()
<< ", video=" << vc.IsValidConfig();
config_count_++;
EXPECT_TRUE(ac.IsValidConfig());
« no previous file with comments | « media/formats/mp2t/mp2t_stream_parser.cc ('k') | media/formats/mp4/mp4_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698