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 "chromecast/media/cma/pipeline/audio_pipeline_impl.h" | 5 #include "chromecast/media/cma/pipeline/audio_pipeline_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 MediaPipelineBackend::AudioDecoder* decoder, | 26 MediaPipelineBackend::AudioDecoder* decoder, |
27 const AvPipelineClient& client) | 27 const AvPipelineClient& client) |
28 : AvPipelineImpl(decoder, client), audio_decoder_(decoder) { | 28 : AvPipelineImpl(decoder, client), audio_decoder_(decoder) { |
29 DCHECK(audio_decoder_); | 29 DCHECK(audio_decoder_); |
30 } | 30 } |
31 | 31 |
32 AudioPipelineImpl::~AudioPipelineImpl() {} | 32 AudioPipelineImpl::~AudioPipelineImpl() {} |
33 | 33 |
34 ::media::PipelineStatus AudioPipelineImpl::Initialize( | 34 ::media::PipelineStatus AudioPipelineImpl::Initialize( |
35 const ::media::AudioDecoderConfig& audio_config, | 35 const ::media::AudioDecoderConfig& audio_config, |
36 scoped_ptr<CodedFrameProvider> frame_provider) { | 36 std::unique_ptr<CodedFrameProvider> frame_provider) { |
37 CMALOG(kLogControl) << __FUNCTION__ << " " | 37 CMALOG(kLogControl) << __FUNCTION__ << " " |
38 << audio_config.AsHumanReadableString(); | 38 << audio_config.AsHumanReadableString(); |
39 if (frame_provider) { | 39 if (frame_provider) { |
40 SetCodedFrameProvider(std::move(frame_provider), kAppAudioBufferSize, | 40 SetCodedFrameProvider(std::move(frame_provider), kAppAudioBufferSize, |
41 kMaxAudioFrameSize); | 41 kMaxAudioFrameSize); |
42 } | 42 } |
43 | 43 |
44 DCHECK(audio_config.IsValidConfig()); | 44 DCHECK(audio_config.IsValidConfig()); |
45 AudioConfig cast_audio_config = | 45 AudioConfig cast_audio_config = |
46 DecoderConfigAdapter::ToCastAudioConfig(kPrimary, audio_config); | 46 DecoderConfigAdapter::ToCastAudioConfig(kPrimary, audio_config); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 current_stats.audio_bytes_decoded - previous_stats_.audio_bytes_decoded; | 85 current_stats.audio_bytes_decoded - previous_stats_.audio_bytes_decoded; |
86 | 86 |
87 bytes_decoded_since_last_update_ = delta_stats.audio_bytes_decoded; | 87 bytes_decoded_since_last_update_ = delta_stats.audio_bytes_decoded; |
88 previous_stats_ = current_stats; | 88 previous_stats_ = current_stats; |
89 | 89 |
90 client().statistics_cb.Run(delta_stats); | 90 client().statistics_cb.Run(delta_stats); |
91 } | 91 } |
92 | 92 |
93 } // namespace media | 93 } // namespace media |
94 } // namespace chromecast | 94 } // namespace chromecast |
OLD | NEW |