Index: chromecast/media/cma/backend/alsa/stream_mixer_alsa.h |
diff --git a/chromecast/media/cma/backend/alsa/stream_mixer_alsa.h b/chromecast/media/cma/backend/alsa/stream_mixer_alsa.h |
index b5a2f9b8bb0bd34943dc78d222006a86b53874ec..3b8f181c84e4923e07feb3a03fafbb39801a3e44 100644 |
--- a/chromecast/media/cma/backend/alsa/stream_mixer_alsa.h |
+++ b/chromecast/media/cma/backend/alsa/stream_mixer_alsa.h |
@@ -30,6 +30,7 @@ namespace chromecast { |
namespace media { |
class AlsaWrapper; |
class FilterGroup; |
+class PostProcessingPipelineParser; |
// Mixer implementation. The mixer has one or more input queues; these can be |
// added/removed at any time. When an input source pushes frames to an input |
@@ -175,8 +176,8 @@ class StreamMixerAlsa { |
// mixer thread. |
void OnFramesQueued(); |
+ void ResetPostProcessorsForTest(const std::string& pipeline_json); |
void SetAlsaWrapperForTest(std::unique_ptr<AlsaWrapper> alsa_wrapper); |
- void DisablePostProcessingForTest(); |
void WriteFramesForTest(); // Can be called on any thread. |
void ClearInputsForTest(); // Removes all inputs. |
@@ -213,6 +214,7 @@ class StreamMixerAlsa { |
void FinalizeOnMixerThread(); |
void FinishFinalize(); |
+ void CreatePostProcessors(PostProcessingPipelineParser* pipeline_parser); |
// Reads the buffer size, period size, start threshold, and avail min value |
// from the provided command line flags or uses default values if no flags are |
// provided. |
@@ -242,7 +244,7 @@ class StreamMixerAlsa { |
void WriteFrames(); |
bool TryWriteFrames(); |
- void WriteMixedPcm(std::vector<uint8_t>* interleaved, int frames); |
+ void WriteMixedPcm(int frames); |
void UpdateRenderingDelay(int newly_pushed_frames); |
size_t InterleavedSize(int frames); |
ssize_t BytesPerOutputFormatSample(); |
@@ -275,7 +277,7 @@ class StreamMixerAlsa { |
std::vector<std::unique_ptr<InputQueue>> inputs_; |
std::vector<std::unique_ptr<InputQueue>> ignored_inputs_; |
- MediaPipelineBackendAlsa::RenderingDelay rendering_delay_; |
+ MediaPipelineBackendAlsa::RenderingDelay alsa_rendering_delay_; |
std::unique_ptr<base::Timer> retry_write_frames_timer_; |
@@ -283,6 +285,11 @@ class StreamMixerAlsa { |
std::unique_ptr<base::Timer> check_close_timer_; |
std::vector<std::unique_ptr<FilterGroup>> filter_groups_; |
+ FilterGroup* default_filter_; |
+ FilterGroup* mix_filter_; |
+ FilterGroup* linearize_filter_; |
+ std::vector<uint8_t> interleaved_; |
+ |
std::vector<CastMediaShlib::LoopbackAudioObserver*> loopback_observers_; |
std::map<AudioContentType, VolumeInfo> volume_info_; |