Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: chromecast/media/cma/backend/alsa/stream_mixer_alsa.h

Issue 2847673002: [Chromecast] Complete PostProcessingPipeline changes (Closed)
Patch Set: Fix deps Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_;

Powered by Google App Engine
This is Rietveld 408576698