| Index: chromecast/media/cma/backend/media_pipeline_backend_manager.h
|
| diff --git a/chromecast/media/cma/backend/media_pipeline_backend_manager.h b/chromecast/media/cma/backend/media_pipeline_backend_manager.h
|
| index 54e6f205ad0e4d2cdfdbedb5c4fa01c2035ae031..d61621be4bc017552755e144bb3631acd011350f 100644
|
| --- a/chromecast/media/cma/backend/media_pipeline_backend_manager.h
|
| +++ b/chromecast/media/cma/backend/media_pipeline_backend_manager.h
|
| @@ -49,6 +49,13 @@ class MediaPipelineBackendManager {
|
| private:
|
| friend class MediaPipelineBackendWrapper;
|
|
|
| + // Backend wrapper instances must use these APIs when allocating and releasing
|
| + // decoder objects, so we can enforce global limit on #concurrent decoders.
|
| + bool IncrementAudioDecoderCount();
|
| + bool IncrementVideoDecoderCount();
|
| + void DecrementAudioDecoderCount();
|
| + void DecrementVideoDecoderCount();
|
| +
|
| // Internal clean up when a new media pipeline backend is destroyed.
|
| void OnMediaPipelineBackendDestroyed(const MediaPipelineBackend* backend);
|
|
|
| @@ -59,6 +66,10 @@ class MediaPipelineBackendManager {
|
| // A vector that stores all of the existing media_pipeline_backends_.
|
| std::vector<MediaPipelineBackend*> media_pipeline_backends_;
|
|
|
| + // Total count of decoders created
|
| + int audio_decoder_count_;
|
| + int video_decoder_count_;
|
| +
|
| // Volume multiplier for each type of audio streams.
|
| std::map<int, float> volume_by_stream_type_;
|
|
|
|
|