| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/audio/cast_audio_manager.h" | 5 #include "chromecast/media/audio/cast_audio_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chromecast/media/audio/cast_audio_output_stream.h" | 10 #include "chromecast/media/audio/cast_audio_output_stream.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 ::media::AudioParameters CastAudioManager::GetInputStreamParameters( | 55 ::media::AudioParameters CastAudioManager::GetInputStreamParameters( |
| 56 const std::string& device_id) { | 56 const std::string& device_id) { |
| 57 LOG(WARNING) << "No support for input audio devices"; | 57 LOG(WARNING) << "No support for input audio devices"; |
| 58 // Need to send a valid AudioParameters object even when it will unused. | 58 // Need to send a valid AudioParameters object even when it will unused. |
| 59 return ::media::AudioParameters( | 59 return ::media::AudioParameters( |
| 60 ::media::AudioParameters::AUDIO_PCM_LOW_LATENCY, | 60 ::media::AudioParameters::AUDIO_PCM_LOW_LATENCY, |
| 61 ::media::CHANNEL_LAYOUT_STEREO, 48000, 16, 1024); | 61 ::media::CHANNEL_LAYOUT_STEREO, 48000, 16, 1024); |
| 62 } | 62 } |
| 63 | 63 |
| 64 scoped_ptr<MediaPipelineBackend> CastAudioManager::CreateMediaPipelineBackend( | 64 std::unique_ptr<MediaPipelineBackend> |
| 65 CastAudioManager::CreateMediaPipelineBackend( |
| 65 const MediaPipelineDeviceParams& params) { | 66 const MediaPipelineDeviceParams& params) { |
| 66 return backend_manager_->CreateMediaPipelineBackend(params); | 67 return backend_manager_->CreateMediaPipelineBackend(params); |
| 67 } | 68 } |
| 68 | 69 |
| 69 ::media::AudioOutputStream* CastAudioManager::MakeLinearOutputStream( | 70 ::media::AudioOutputStream* CastAudioManager::MakeLinearOutputStream( |
| 70 const ::media::AudioParameters& params) { | 71 const ::media::AudioParameters& params) { |
| 71 DCHECK_EQ(::media::AudioParameters::AUDIO_PCM_LINEAR, params.format()); | 72 DCHECK_EQ(::media::AudioParameters::AUDIO_PCM_LINEAR, params.format()); |
| 72 return new CastAudioOutputStream(params, this); | 73 return new CastAudioOutputStream(params, this); |
| 73 } | 74 } |
| 74 | 75 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 } | 113 } |
| 113 | 114 |
| 114 ::media::AudioParameters output_params( | 115 ::media::AudioParameters output_params( |
| 115 ::media::AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, | 116 ::media::AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, |
| 116 sample_rate, bits_per_sample, buffer_size); | 117 sample_rate, bits_per_sample, buffer_size); |
| 117 return output_params; | 118 return output_params; |
| 118 } | 119 } |
| 119 | 120 |
| 120 } // namespace media | 121 } // namespace media |
| 121 } // namespace chromecast | 122 } // namespace chromecast |
| OLD | NEW |