| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chromecast/media/cma/backend/media_pipeline_backend_manager.h" | 5 #include "chromecast/media/cma/backend/media_pipeline_backend_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 #include "chromecast/chromecast_features.h" | 11 #include "chromecast/chromecast_features.h" |
| 12 #include "chromecast/media/cma/backend/media_pipeline_backend_wrapper.h" | 12 #include "chromecast/media/cma/backend/media_pipeline_backend_wrapper.h" |
| 13 #include "chromecast/public/cast_media_shlib.h" | 13 #include "chromecast/public/cast_media_shlib.h" |
| 14 | 14 |
| 15 namespace chromecast { | 15 namespace chromecast { |
| 16 namespace media { | 16 namespace media { |
| 17 namespace { | 17 namespace { |
| 18 #if BUILDFLAG(DISABLE_DISPLAY) | 18 #if BUILDFLAG(IS_CAST_AUDIO_ONLY) |
| 19 constexpr int kAudioDecoderLimit = std::numeric_limits<int>::max(); | 19 constexpr int kAudioDecoderLimit = std::numeric_limits<int>::max(); |
| 20 #else | 20 #else |
| 21 constexpr int kAudioDecoderLimit = 2; | 21 constexpr int kAudioDecoderLimit = 2; |
| 22 #endif | 22 #endif |
| 23 } // namespace | 23 } // namespace |
| 24 | 24 |
| 25 MediaPipelineBackendManager::MediaPipelineBackendManager( | 25 MediaPipelineBackendManager::MediaPipelineBackendManager( |
| 26 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner) | 26 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner) |
| 27 : media_task_runner_(std::move(media_task_runner)) { | 27 : media_task_runner_(std::move(media_task_runner)) { |
| 28 DCHECK_EQ(2, NUM_DECODER_TYPES); | 28 DCHECK_EQ(2, NUM_DECODER_TYPES); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 auto it = volume_by_stream_type_.find(stream_type); | 104 auto it = volume_by_stream_type_.find(stream_type); |
| 105 if (it == volume_by_stream_type_.end()) { | 105 if (it == volume_by_stream_type_.end()) { |
| 106 return 1.0; | 106 return 1.0; |
| 107 } else { | 107 } else { |
| 108 return it->second; | 108 return it->second; |
| 109 } | 109 } |
| 110 } | 110 } |
| 111 | 111 |
| 112 } // namespace media | 112 } // namespace media |
| 113 } // namespace chromecast | 113 } // namespace chromecast |
| OLD | NEW |