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

Side by Side Diff: media/filters/media_source_state.cc

Issue 1861963008: Use StreamParser::TrackId instead of string for MediaTrack::byteStreamTrackId (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include <algorithm> into stream_parser_buffer.cc 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 unified diff | Download patch
« no previous file with comments | « media/filters/media_source_state.h ('k') | media/formats/common/stream_parser_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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/filters/media_source_state.h" 5 #include "media/filters/media_source_state.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "media/base/media_track.h" 9 #include "media/base/media_track.h"
10 #include "media/base/media_tracks.h" 10 #include "media/base/media_tracks.h"
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 return false; 473 return false;
474 } 474 }
475 475
476 bool MediaSourceState::OnNewConfigs( 476 bool MediaSourceState::OnNewConfigs(
477 bool allow_audio, 477 bool allow_audio,
478 bool allow_video, 478 bool allow_video,
479 std::unique_ptr<MediaTracks> tracks, 479 std::unique_ptr<MediaTracks> tracks,
480 const StreamParser::TextTrackConfigMap& text_configs) { 480 const StreamParser::TextTrackConfigMap& text_configs) {
481 DCHECK_GE(state_, PENDING_PARSER_CONFIG); 481 DCHECK_GE(state_, PENDING_PARSER_CONFIG);
482 DCHECK(tracks.get()); 482 DCHECK(tracks.get());
483
483 media_tracks_ = std::move(tracks); 484 media_tracks_ = std::move(tracks);
484 const AudioDecoderConfig& audio_config = media_tracks_->getFirstAudioConfig(); 485 const AudioDecoderConfig& audio_config = media_tracks_->getFirstAudioConfig();
485 const VideoDecoderConfig& video_config = media_tracks_->getFirstVideoConfig(); 486 const VideoDecoderConfig& video_config = media_tracks_->getFirstVideoConfig();
486 487
487 DVLOG(1) << "OnNewConfigs(" << allow_audio << ", " << allow_video << ", " 488 DVLOG(1) << "OnNewConfigs(" << allow_audio << ", " << allow_video << ", "
488 << audio_config.IsValidConfig() << ", " 489 << audio_config.IsValidConfig() << ", "
489 << video_config.IsValidConfig() << ")"; 490 << video_config.IsValidConfig() << ")";
490 // MSE spec allows new configs to be emitted only during Append, but not 491 // MSE spec allows new configs to be emitted only during Append, but not
491 // during Flush or parser reset operations. 492 // during Flush or parser reset operations.
492 CHECK(append_in_progress_); 493 CHECK(append_in_progress_);
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 740
740 void MediaSourceState::OnSourceInitDone( 741 void MediaSourceState::OnSourceInitDone(
741 const StreamParser::InitParameters& params) { 742 const StreamParser::InitParameters& params) {
742 DCHECK_EQ(state_, PENDING_PARSER_INIT); 743 DCHECK_EQ(state_, PENDING_PARSER_INIT);
743 state_ = PARSER_INITIALIZED; 744 state_ = PARSER_INITIALIZED;
744 auto_update_timestamp_offset_ = params.auto_update_timestamp_offset; 745 auto_update_timestamp_offset_ = params.auto_update_timestamp_offset;
745 base::ResetAndReturn(&init_cb_).Run(params); 746 base::ResetAndReturn(&init_cb_).Run(params);
746 } 747 }
747 748
748 } // namespace media 749 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/media_source_state.h ('k') | media/formats/common/stream_parser_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698