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

Side by Side Diff: media/formats/mpeg/mpeg_audio_stream_parser_base.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: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/formats/mpeg/mpeg_audio_stream_parser_base.h" 5 #include "media/formats/mpeg/mpeg_audio_stream_parser_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "media/base/media_tracks.h" 10 #include "media/base/media_tracks.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 scoped_ptr<MediaTracks> media_tracks(new MediaTracks()); 220 scoped_ptr<MediaTracks> media_tracks(new MediaTracks());
221 if (config_.IsValidConfig()) { 221 if (config_.IsValidConfig()) {
222 media_tracks->AddAudioTrack(config_, "audio", "", "", ""); 222 media_tracks->AddAudioTrack(config_, "audio", "", "", "");
223 } 223 }
224 if (!config_cb_.Run(std::move(media_tracks), TextTrackConfigMap())) 224 if (!config_cb_.Run(std::move(media_tracks), TextTrackConfigMap()))
225 return -1; 225 return -1;
226 226
227 if (!init_cb_.is_null()) { 227 if (!init_cb_.is_null()) {
228 InitParameters params(kInfiniteDuration()); 228 InitParameters params(kInfiniteDuration());
229 params.detected_audio_track_count = 1;
chcunningham 2016/03/23 23:05:56 Some quick googling for multitrack mpeg audio didn
wolenetz 2016/03/25 23:25:08 Acknowledged.
229 params.auto_update_timestamp_offset = true; 230 params.auto_update_timestamp_offset = true;
230 base::ResetAndReturn(&init_cb_).Run(params); 231 base::ResetAndReturn(&init_cb_).Run(params);
231 } 232 }
232 } 233 }
233 234
234 if (metadata_frame) 235 if (metadata_frame)
235 return frame_size; 236 return frame_size;
236 237
237 // TODO(wolenetz/acolwell): Validate and use a common cross-parser TrackId 238 // TODO(wolenetz/acolwell): Validate and use a common cross-parser TrackId
238 // type and allow multiple audio tracks, if applicable. See 239 // type and allow multiple audio tracks, if applicable. See
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 if (end_of_segment) { 413 if (end_of_segment) {
413 in_media_segment_ = false; 414 in_media_segment_ = false;
414 end_of_segment_cb_.Run(); 415 end_of_segment_cb_.Run();
415 } 416 }
416 417
417 timestamp_helper_->SetBaseTimestamp(base::TimeDelta()); 418 timestamp_helper_->SetBaseTimestamp(base::TimeDelta());
418 return true; 419 return true;
419 } 420 }
420 421
421 } // namespace media 422 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698