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

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

Issue 2771143002: Implement runtime audio post-processing pipeline. See go/cast_audio.json (Closed)
Patch Set: Suffix governor with _1.0 Created 3 years, 9 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/post_processing_pipeline_parser.h
diff --git a/chromecast/media/cma/backend/alsa/post_processing_pipeline_parser.h b/chromecast/media/cma/backend/alsa/post_processing_pipeline_parser.h
new file mode 100644
index 0000000000000000000000000000000000000000..a2da06003c8f3a3bc6c228065963c363f7691879
--- /dev/null
+++ b/chromecast/media/cma/backend/alsa/post_processing_pipeline_parser.h
@@ -0,0 +1,52 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// 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_PARSER_H_
+#define CHROMECAST_MEDIA_CMA_BACKEND_ALSA_POST_PROCESSING_PIPELINE_PARSER_H_
+
+#include <memory>
+#include <string>
+
+#include "base/macros.h"
+
+namespace base {
+class DictionaryValue;
+class ListValue;
+} // namespace base
+
+namespace chromecast {
+namespace media {
+
+// Helper class to parse post-processing pipeline descriptor file.
+class PostProcessingPipelineParser {
+ public:
+ PostProcessingPipelineParser();
+ ~PostProcessingPipelineParser();
+
+ // Reads the pipeline descriptor file and does preliminary parsing.
+ // Crashes with fatal log if parsing fails.
+ void Initialize();
+
+ // Gets the list of processors for a given stream type.
+ // The format will be:
+ // [
+ // {"processor": "PATH_TO_SHARED_OBJECT",
+ // "config": "CONFIGURATION_STRING"},
+ // {"processor": "PATH_TO_SHARED_OBJECT",
+ // "config": "CONFIGURATION_STRING"},
+ // ...
+ // ]
+ base::ListValue* GetPipelineByDeviceId(const std::string& device_id);
+
+ private:
+ std::unique_ptr<base::DictionaryValue> config_dict_;
+ base::DictionaryValue* pipeline_dict_ = nullptr;
+
+ DISALLOW_COPY_AND_ASSIGN(PostProcessingPipelineParser);
+};
+
+} // namepsace media
+} // namespace chromecast
+
+#endif // CHROMECAST_MEDIA_CMA_BACKEND_ALSA_POST_PROCESSING_PIPELINE_PARSER_H_

Powered by Google App Engine
This is Rietveld 408576698