| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 Mp2tStreamParser::Mp2tStreamParser(bool sbr_in_mimetype) | 162 Mp2tStreamParser::Mp2tStreamParser(bool sbr_in_mimetype) |
| 163 : sbr_in_mimetype_(sbr_in_mimetype), | 163 : sbr_in_mimetype_(sbr_in_mimetype), |
| 164 selected_audio_pid_(-1), | 164 selected_audio_pid_(-1), |
| 165 selected_video_pid_(-1), | 165 selected_video_pid_(-1), |
| 166 is_initialized_(false), | 166 is_initialized_(false), |
| 167 segment_started_(false) { | 167 segment_started_(false) { |
| 168 } | 168 } |
| 169 | 169 |
| 170 Mp2tStreamParser::~Mp2tStreamParser() { | 170 Mp2tStreamParser::~Mp2tStreamParser() { |
| 171 STLDeleteValues(&pids_); | 171 base::STLDeleteValues(&pids_); |
| 172 } | 172 } |
| 173 | 173 |
| 174 void Mp2tStreamParser::Init( | 174 void Mp2tStreamParser::Init( |
| 175 const InitCB& init_cb, | 175 const InitCB& init_cb, |
| 176 const NewConfigCB& config_cb, | 176 const NewConfigCB& config_cb, |
| 177 const NewBuffersCB& new_buffers_cb, | 177 const NewBuffersCB& new_buffers_cb, |
| 178 bool /* ignore_text_tracks */, | 178 bool /* ignore_text_tracks */, |
| 179 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, | 179 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, |
| 180 const NewMediaSegmentCB& new_segment_cb, | 180 const NewMediaSegmentCB& new_segment_cb, |
| 181 const EndMediaSegmentCB& end_of_segment_cb, | 181 const EndMediaSegmentCB& end_of_segment_cb, |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 // so that buffers with the same config can be added later on. | 672 // so that buffers with the same config can be added later on. |
| 673 BufferQueueWithConfig queue_with_config( | 673 BufferQueueWithConfig queue_with_config( |
| 674 true, last_audio_config, last_video_config); | 674 true, last_audio_config, last_video_config); |
| 675 buffer_queue_chain_.push_back(queue_with_config); | 675 buffer_queue_chain_.push_back(queue_with_config); |
| 676 | 676 |
| 677 return true; | 677 return true; |
| 678 } | 678 } |
| 679 | 679 |
| 680 } // namespace mp2t | 680 } // namespace mp2t |
| 681 } // namespace media | 681 } // namespace media |
| OLD | NEW |