| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 } | 47 } |
| 48 last_c = c; | 48 last_c = c; |
| 49 } | 49 } |
| 50 return -1; | 50 return -1; |
| 51 } | 51 } |
| 52 | 52 |
| 53 MPEGAudioStreamParserBase::MPEGAudioStreamParserBase(uint32_t start_code_mask, | 53 MPEGAudioStreamParserBase::MPEGAudioStreamParserBase(uint32_t start_code_mask, |
| 54 AudioCodec audio_codec, | 54 AudioCodec audio_codec, |
| 55 int codec_delay) | 55 int codec_delay) |
| 56 : state_(UNINITIALIZED), | 56 : state_(UNINITIALIZED), |
| 57 media_log_(nullptr), |
| 57 in_media_segment_(false), | 58 in_media_segment_(false), |
| 58 start_code_mask_(start_code_mask), | 59 start_code_mask_(start_code_mask), |
| 59 audio_codec_(audio_codec), | 60 audio_codec_(audio_codec), |
| 60 codec_delay_(codec_delay) {} | 61 codec_delay_(codec_delay) {} |
| 61 | 62 |
| 62 MPEGAudioStreamParserBase::~MPEGAudioStreamParserBase() {} | 63 MPEGAudioStreamParserBase::~MPEGAudioStreamParserBase() {} |
| 63 | 64 |
| 64 void MPEGAudioStreamParserBase::Init( | 65 void MPEGAudioStreamParserBase::Init( |
| 65 const InitCB& init_cb, | 66 const InitCB& init_cb, |
| 66 const NewConfigCB& config_cb, | 67 const NewConfigCB& config_cb, |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 if (end_of_segment) { | 411 if (end_of_segment) { |
| 411 in_media_segment_ = false; | 412 in_media_segment_ = false; |
| 412 end_of_segment_cb_.Run(); | 413 end_of_segment_cb_.Run(); |
| 413 } | 414 } |
| 414 | 415 |
| 415 timestamp_helper_->SetBaseTimestamp(base::TimeDelta()); | 416 timestamp_helper_->SetBaseTimestamp(base::TimeDelta()); |
| 416 return true; | 417 return true; |
| 417 } | 418 } |
| 418 | 419 |
| 419 } // namespace media | 420 } // namespace media |
| OLD | NEW |