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

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

Issue 2958393002: Add a simple, safe gain PostProcessor. (Closed)
Patch Set: Unrelated cleanup Created 3 years, 5 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_impl.h
diff --git a/chromecast/media/cma/backend/alsa/post_processing_pipeline_impl.h b/chromecast/media/cma/backend/alsa/post_processing_pipeline_impl.h
index 75a9463b39e7723a611cb3fddc8733323f922e08..43b437412d567977acbf1197d0c7d51ffab97d14 100644
--- a/chromecast/media/cma/backend/alsa/post_processing_pipeline_impl.h
+++ b/chromecast/media/cma/backend/alsa/post_processing_pipeline_impl.h
@@ -11,10 +11,10 @@
#include "base/macros.h"
#include "chromecast/media/cma/backend/alsa/post_processing_pipeline.h"
+#include "chromecast/media/cma/backend/alsa/post_processor_factory.h"
namespace base {
class ListValue;
-class ScopedNativeLibrary;
} // namespace base
namespace chromecast {
@@ -44,6 +44,13 @@ class PostProcessingPipelineImpl : public PostProcessingPipeline {
const std::string& config) override;
private:
+ // Note: typedef is used to silence chromium-style mandatory constructor in
+ // structs.
+ typedef struct {
+ std::unique_ptr<AudioPostProcessor> ptr;
+ std::string name;
+ } PostProcessorInfo;
+
int GetRingingTimeInFrames();
void UpdateCastVolume(float multiplier);
@@ -55,17 +62,8 @@ class PostProcessingPipelineImpl : public PostProcessingPipeline {
float current_multiplier_;
float cast_volume_;
- // 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_
- // Note: typedef is used to silence chromium-style mandatory constructor in
- // structs.
- typedef struct {
- std::unique_ptr<AudioPostProcessor> ptr;
- std::string name;
- } PostProcessorInfo;
+ // factory_ keeps shared libraries open, so it must outlive processors_.
+ PostProcessorFactory factory_;
std::vector<PostProcessorInfo> processors_;

Powered by Google App Engine
This is Rietveld 408576698