| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 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/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 media_log_(media_log), | 103 media_log_(media_log), |
| 104 state_(UNINITIALIZED), | 104 state_(UNINITIALIZED), |
| 105 auto_update_timestamp_offset_(false) { | 105 auto_update_timestamp_offset_(false) { |
| 106 DCHECK(!create_demuxer_stream_cb_.is_null()); | 106 DCHECK(!create_demuxer_stream_cb_.is_null()); |
| 107 DCHECK(frame_processor_); | 107 DCHECK(frame_processor_); |
| 108 } | 108 } |
| 109 | 109 |
| 110 MediaSourceState::~MediaSourceState() { | 110 MediaSourceState::~MediaSourceState() { |
| 111 Shutdown(); | 111 Shutdown(); |
| 112 | 112 |
| 113 STLDeleteValues(&text_stream_map_); | 113 base::STLDeleteValues(&text_stream_map_); |
| 114 } | 114 } |
| 115 | 115 |
| 116 void MediaSourceState::Init( | 116 void MediaSourceState::Init( |
| 117 const StreamParser::InitCB& init_cb, | 117 const StreamParser::InitCB& init_cb, |
| 118 bool allow_audio, | 118 bool allow_audio, |
| 119 bool allow_video, | 119 bool allow_video, |
| 120 const StreamParser::EncryptedMediaInitDataCB& encrypted_media_init_data_cb, | 120 const StreamParser::EncryptedMediaInitDataCB& encrypted_media_init_data_cb, |
| 121 const NewTextTrackCB& new_text_track_cb) { | 121 const NewTextTrackCB& new_text_track_cb) { |
| 122 DCHECK_EQ(state_, UNINITIALIZED); | 122 DCHECK_EQ(state_, UNINITIALIZED); |
| 123 new_text_track_cb_ = new_text_track_cb; | 123 new_text_track_cb_ = new_text_track_cb; |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 | 824 |
| 825 void MediaSourceState::OnSourceInitDone( | 825 void MediaSourceState::OnSourceInitDone( |
| 826 const StreamParser::InitParameters& params) { | 826 const StreamParser::InitParameters& params) { |
| 827 DCHECK_EQ(state_, PENDING_PARSER_INIT); | 827 DCHECK_EQ(state_, PENDING_PARSER_INIT); |
| 828 state_ = PARSER_INITIALIZED; | 828 state_ = PARSER_INITIALIZED; |
| 829 auto_update_timestamp_offset_ = params.auto_update_timestamp_offset; | 829 auto_update_timestamp_offset_ = params.auto_update_timestamp_offset; |
| 830 base::ResetAndReturn(&init_cb_).Run(params); | 830 base::ResetAndReturn(&init_cb_).Run(params); |
| 831 } | 831 } |
| 832 | 832 |
| 833 } // namespace media | 833 } // namespace media |
| OLD | NEW |