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/mpeg/mpeg_audio_stream_parser_base.h" | 5 #include "media/formats/mpeg/mpeg_audio_stream_parser_base.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 MPEGAudioStreamParserBase::~MPEGAudioStreamParserBase() {} | 62 MPEGAudioStreamParserBase::~MPEGAudioStreamParserBase() {} |
63 | 63 |
64 void MPEGAudioStreamParserBase::Init( | 64 void MPEGAudioStreamParserBase::Init( |
65 const InitCB& init_cb, | 65 const InitCB& init_cb, |
66 const NewConfigCB& config_cb, | 66 const NewConfigCB& config_cb, |
67 const NewBuffersCB& new_buffers_cb, | 67 const NewBuffersCB& new_buffers_cb, |
68 bool ignore_text_tracks, | 68 bool ignore_text_tracks, |
69 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, | 69 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, |
70 const NewMediaSegmentCB& new_segment_cb, | 70 const NewMediaSegmentCB& new_segment_cb, |
71 const EndMediaSegmentCB& end_of_segment_cb, | 71 const EndMediaSegmentCB& end_of_segment_cb, |
72 const scoped_refptr<MediaLog>& media_log) { | 72 MediaLog* media_log) { |
73 DVLOG(1) << __func__; | 73 DVLOG(1) << __func__; |
74 DCHECK_EQ(state_, UNINITIALIZED); | 74 DCHECK_EQ(state_, UNINITIALIZED); |
75 init_cb_ = init_cb; | 75 init_cb_ = init_cb; |
76 config_cb_ = config_cb; | 76 config_cb_ = config_cb; |
77 new_buffers_cb_ = new_buffers_cb; | 77 new_buffers_cb_ = new_buffers_cb; |
78 new_segment_cb_ = new_segment_cb; | 78 new_segment_cb_ = new_segment_cb; |
79 end_of_segment_cb_ = end_of_segment_cb; | 79 end_of_segment_cb_ = end_of_segment_cb; |
80 media_log_ = media_log; | 80 media_log_ = media_log; |
81 | 81 |
82 ChangeState(INITIALIZED); | 82 ChangeState(INITIALIZED); |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 if (end_of_segment) { | 410 if (end_of_segment) { |
411 in_media_segment_ = false; | 411 in_media_segment_ = false; |
412 end_of_segment_cb_.Run(); | 412 end_of_segment_cb_.Run(); |
413 } | 413 } |
414 | 414 |
415 timestamp_helper_->SetBaseTimestamp(base::TimeDelta()); | 415 timestamp_helper_->SetBaseTimestamp(base::TimeDelta()); |
416 return true; | 416 return true; |
417 } | 417 } |
418 | 418 |
419 } // namespace media | 419 } // namespace media |
OLD | NEW |