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

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

Issue 1826583003: MSE: Record counts of detected MSE audio, video and text tracks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yet another attempt to fix that link failure. MEDIA_EXPORT should do it! Created 4 years, 9 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/filters/chunk_demuxer.cc ('k') | media/formats/mp4/box_definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp2t/mp2t_stream_parser.cc
diff --git a/media/formats/mp2t/mp2t_stream_parser.cc b/media/formats/mp2t/mp2t_stream_parser.cc
index 90a2b96e887fe9e2fa3fd91ba64d55706b254943..c23168f83181acdb2ffe2cf53520c070f647f707 100644
--- a/media/formats/mp2t/mp2t_stream_parser.cc
+++ b/media/formats/mp2t/mp2t_stream_parser.cc
@@ -544,7 +544,16 @@ bool Mp2tStreamParser::FinishInitializationIfNeeded() {
// For Mpeg2 TS, the duration is not known.
DVLOG(1) << "Mpeg2TS stream parser initialization done";
- base::ResetAndReturn(&init_cb_).Run(InitParameters(kInfiniteDuration()));
+
+ // TODO(wolenetz): If possible, detect and report track counts by type more
+ // accurately here. Currently, capped at max 1 each for audio and video, with
+ // assumption of 0 text tracks.
+ InitParameters params(kInfiniteDuration());
+ params.detected_audio_track_count =
+ queue_with_config.audio_config.IsValidConfig() ? 1 : 0;
+ params.detected_video_track_count =
+ queue_with_config.video_config.IsValidConfig() ? 1 : 0;
+ base::ResetAndReturn(&init_cb_).Run(params);
is_initialized_ = true;
return true;
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | media/formats/mp4/box_definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698