| Index: chromecast/media/cma/backend/alsa/post_processing_pipeline_impl.h
|
| diff --git a/chromecast/media/cma/backend/alsa/post_processing_pipeline.h b/chromecast/media/cma/backend/alsa/post_processing_pipeline_impl.h
|
| similarity index 66%
|
| copy from chromecast/media/cma/backend/alsa/post_processing_pipeline.h
|
| copy to chromecast/media/cma/backend/alsa/post_processing_pipeline_impl.h
|
| index b3864c683c45de4603d6d31602291e2d418227c9..aee127188459ef950e0615ae61ab7f6eceb16da4 100644
|
| --- a/chromecast/media/cma/backend/alsa/post_processing_pipeline.h
|
| +++ b/chromecast/media/cma/backend/alsa/post_processing_pipeline_impl.h
|
| @@ -2,15 +2,15 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROMECAST_MEDIA_CMA_BACKEND_ALSA_POST_PROCESSING_PIPELINE_H_
|
| -#define CHROMECAST_MEDIA_CMA_BACKEND_ALSA_POST_PROCESSING_PIPELINE_H_
|
| +#ifndef CHROMECAST_MEDIA_CMA_BACKEND_ALSA_POST_PROCESSING_PIPELINE_IMPL_H_
|
| +#define CHROMECAST_MEDIA_CMA_BACKEND_ALSA_POST_PROCESSING_PIPELINE_IMPL_H_
|
|
|
| -#include <cstdint>
|
| #include <memory>
|
| #include <string>
|
| #include <vector>
|
|
|
| #include "base/macros.h"
|
| +#include "chromecast/media/cma/backend/alsa/post_processing_pipeline.h"
|
|
|
| namespace base {
|
| class ListValue;
|
| @@ -24,26 +24,32 @@ class AudioPostProcessor;
|
|
|
| // Creates and contains multiple AudioPostProcessors, as specified in ctor.
|
| // Provides convenience methods to access and use the AudioPostProcessors.
|
| -class PostProcessingPipeline {
|
| +class PostProcessingPipelineImpl : public PostProcessingPipeline {
|
| public:
|
| - PostProcessingPipeline(const base::ListValue* filter_description_list,
|
| - int channels);
|
| - ~PostProcessingPipeline();
|
| + PostProcessingPipelineImpl(const std::string& name,
|
| + const base::ListValue* filter_description_list,
|
| + int channels);
|
| + ~PostProcessingPipelineImpl() override;
|
|
|
| int ProcessFrames(const std::vector<float*>& data,
|
| int num_frames,
|
| float current_volume,
|
| - bool is_silence);
|
| - bool SetSampleRate(int sample_rate);
|
| - bool IsRinging();
|
| + bool is_silence) override;
|
| +
|
| + bool SetSampleRate(int sample_rate) override;
|
| + bool IsRinging() override;
|
|
|
| private:
|
| int GetRingingTimeInFrames();
|
| + void UpdateCastVolume(float multiplier);
|
|
|
| + std::string name_;
|
| int sample_rate_;
|
| int ringing_time_in_frames_ = 0;
|
| int silence_frames_processed_ = 0;
|
| int total_delay_frames_ = 0;
|
| + float current_multiplier_;
|
| + float cast_volume_;
|
|
|
| // Contains all libraries in use;
|
| // Functions in shared objects cannot be used once library is closed.
|
| @@ -52,10 +58,10 @@ class PostProcessingPipeline {
|
| // Must be after libraries_
|
| std::vector<std::unique_ptr<AudioPostProcessor>> processors_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(PostProcessingPipeline);
|
| + DISALLOW_COPY_AND_ASSIGN(PostProcessingPipelineImpl);
|
| };
|
|
|
| } // namespace media
|
| } // namespace chromecast
|
|
|
| -#endif // CHROMECAST_MEDIA_CMA_BACKEND_ALSA_POST_PROCESSING_PIPELINE_H_
|
| +#endif // CHROMECAST_MEDIA_CMA_BACKEND_ALSA_POST_PROCESSING_PIPELINE_IMPL_H_
|
|
|