Chromium Code Reviews| Index: chromecast/media/cma/backend/alsa/post_processing_pipeline.h |
| diff --git a/chromecast/media/cma/backend/alsa/post_processing_pipeline.h b/chromecast/media/cma/backend/alsa/post_processing_pipeline.h |
| index b3864c683c45de4603d6d31602291e2d418227c9..9b46c22162b981afb7df7d8d8ab29a64053b88e6 100644 |
| --- a/chromecast/media/cma/backend/alsa/post_processing_pipeline.h |
| +++ b/chromecast/media/cma/backend/alsa/post_processing_pipeline.h |
| @@ -5,54 +5,30 @@ |
| #ifndef CHROMECAST_MEDIA_CMA_BACKEND_ALSA_POST_PROCESSING_PIPELINE_H_ |
| #define CHROMECAST_MEDIA_CMA_BACKEND_ALSA_POST_PROCESSING_PIPELINE_H_ |
| -#include <cstdint> |
| #include <memory> |
| -#include <string> |
| #include <vector> |
| -#include "base/macros.h" |
| - |
| namespace base { |
| class ListValue; |
| -class ScopedNativeLibrary; |
| } // namespace base |
| namespace chromecast { |
| namespace media { |
| -class AudioPostProcessor; |
| - |
| -// Creates and contains multiple AudioPostProcessors, as specified in ctor. |
| -// Provides convenience methods to access and use the AudioPostProcessors. |
| class PostProcessingPipeline { |
| public: |
| - PostProcessingPipeline(const base::ListValue* filter_description_list, |
| - int channels); |
| - ~PostProcessingPipeline(); |
| - |
| - int ProcessFrames(const std::vector<float*>& data, |
| - int num_frames, |
| - float current_volume, |
| - bool is_silence); |
| - bool SetSampleRate(int sample_rate); |
| - bool IsRinging(); |
| - |
| - private: |
| - int GetRingingTimeInFrames(); |
| - |
| - int sample_rate_; |
| - int ringing_time_in_frames_ = 0; |
| - int silence_frames_processed_ = 0; |
| - int total_delay_frames_ = 0; |
| - |
| - // Contains all libraries in use; |
| - // Functions in shared objects cannot be used once library is closed. |
| - std::vector<std::unique_ptr<base::ScopedNativeLibrary>> libraries_; |
| - |
| - // Must be after libraries_ |
| - std::vector<std::unique_ptr<AudioPostProcessor>> processors_; |
| - |
| - DISALLOW_COPY_AND_ASSIGN(PostProcessingPipeline); |
| + virtual ~PostProcessingPipeline() = default; |
| + virtual int ProcessFrames(const std::vector<float*>& data, |
| + int num_frames, |
| + float current_volume, |
| + bool is_silence) = 0; |
|
kmackay
2017/04/28 00:31:42
Do we need is_silence? Could just check volume==0
bshaya
2017/04/28 01:37:37
I fixed this in filter_group so that we ring out a
|
| + virtual bool SetSampleRate(int sample_rate) = 0; |
| + virtual bool IsRinging() = 0; |
| + |
| + static std::unique_ptr<PostProcessingPipeline> Create( |
| + const std::string& name, |
| + const base::ListValue* filter_description_list, |
| + int num_channels); |
| }; |
| } // namespace media |