OLD | NEW |
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/mp2t/mp2t_stream_parser.h" | 5 #include "media/formats/mp2t/mp2t_stream_parser.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 STLDeleteValues(&pids_); | 165 STLDeleteValues(&pids_); |
166 } | 166 } |
167 | 167 |
168 void Mp2tStreamParser::Init( | 168 void Mp2tStreamParser::Init( |
169 const InitCB& init_cb, | 169 const InitCB& init_cb, |
170 const NewConfigCB& config_cb, | 170 const NewConfigCB& config_cb, |
171 const NewBuffersCB& new_buffers_cb, | 171 const NewBuffersCB& new_buffers_cb, |
172 bool /* ignore_text_tracks */, | 172 bool /* ignore_text_tracks */, |
173 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, | 173 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, |
174 const NewMediaSegmentCB& new_segment_cb, | 174 const NewMediaSegmentCB& new_segment_cb, |
175 const base::Closure& end_of_segment_cb, | 175 const EndMediaSegmentCB& end_of_segment_cb, |
176 const scoped_refptr<MediaLog>& media_log) { | 176 const scoped_refptr<MediaLog>& media_log) { |
177 DCHECK(!is_initialized_); | 177 DCHECK(!is_initialized_); |
178 DCHECK(init_cb_.is_null()); | 178 DCHECK(init_cb_.is_null()); |
179 DCHECK(!init_cb.is_null()); | 179 DCHECK(!init_cb.is_null()); |
180 DCHECK(!config_cb.is_null()); | 180 DCHECK(!config_cb.is_null()); |
181 DCHECK(!new_buffers_cb.is_null()); | 181 DCHECK(!new_buffers_cb.is_null()); |
182 DCHECK(!encrypted_media_init_data_cb.is_null()); | 182 DCHECK(!encrypted_media_init_data_cb.is_null()); |
183 DCHECK(!end_of_segment_cb.is_null()); | 183 DCHECK(!end_of_segment_cb.is_null()); |
184 | 184 |
185 init_cb_ = init_cb; | 185 init_cb_ = init_cb; |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 // so that buffers with the same config can be added later on. | 644 // so that buffers with the same config can be added later on. |
645 BufferQueueWithConfig queue_with_config( | 645 BufferQueueWithConfig queue_with_config( |
646 true, last_audio_config, last_video_config); | 646 true, last_audio_config, last_video_config); |
647 buffer_queue_chain_.push_back(queue_with_config); | 647 buffer_queue_chain_.push_back(queue_with_config); |
648 | 648 |
649 return true; | 649 return true; |
650 } | 650 } |
651 | 651 |
652 } // namespace mp2t | 652 } // namespace mp2t |
653 } // namespace media | 653 } // namespace media |
OLD | NEW |