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

Side by Side Diff: chromecast/media/audio/cast_audio_manager.cc

Issue 2538793002: Log audio system used to WebRTC log. (Closed)
Patch Set: Code review. Created 4 years 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 unified diff | Download patch
« no previous file with comments | « chromecast/media/audio/cast_audio_manager.h ('k') | media/audio/alsa/audio_manager_alsa.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/bind.h" 10 #include "base/bind.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 ::media::AudioParameters CastAudioManager::GetInputStreamParameters( 77 ::media::AudioParameters CastAudioManager::GetInputStreamParameters(
78 const std::string& device_id) { 78 const std::string& device_id) {
79 LOG(WARNING) << "No support for input audio devices"; 79 LOG(WARNING) << "No support for input audio devices";
80 // Need to send a valid AudioParameters object even when it will unused. 80 // Need to send a valid AudioParameters object even when it will unused.
81 return ::media::AudioParameters( 81 return ::media::AudioParameters(
82 ::media::AudioParameters::AUDIO_PCM_LOW_LATENCY, 82 ::media::AudioParameters::AUDIO_PCM_LOW_LATENCY,
83 ::media::CHANNEL_LAYOUT_STEREO, 48000, 16, 1024); 83 ::media::CHANNEL_LAYOUT_STEREO, 48000, 16, 1024);
84 } 84 }
85 85
86 const char* CastAudioManager::GetName() {
87 return "Cast";
88 }
89
86 std::unique_ptr<MediaPipelineBackend> 90 std::unique_ptr<MediaPipelineBackend>
87 CastAudioManager::CreateMediaPipelineBackend( 91 CastAudioManager::CreateMediaPipelineBackend(
88 const MediaPipelineDeviceParams& params) { 92 const MediaPipelineDeviceParams& params) {
89 return backend_manager_->CreateMediaPipelineBackend(params); 93 return backend_manager_->CreateMediaPipelineBackend(params);
90 } 94 }
91 95
92 void CastAudioManager::ReleaseOutputStream(::media::AudioOutputStream* stream) { 96 void CastAudioManager::ReleaseOutputStream(::media::AudioOutputStream* stream) {
93 // If |stream| is |mixer_output_stream_|, we should not use 97 // If |stream| is |mixer_output_stream_|, we should not use
94 // AudioManagerBase::ReleaseOutputStream as we do not want the release 98 // AudioManagerBase::ReleaseOutputStream as we do not want the release
95 // function to decrement |AudioManagerBase::num_output_streams_|. This is 99 // function to decrement |AudioManagerBase::num_output_streams_|. This is
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 DCHECK(!mixer_output_stream_); // Only allow 1 |mixer_output_stream_|. 179 DCHECK(!mixer_output_stream_); // Only allow 1 |mixer_output_stream_|.
176 180
177 // Keep a reference to this stream for proper behavior on 181 // Keep a reference to this stream for proper behavior on
178 // CastAudioManager::ReleaseOutputStream. 182 // CastAudioManager::ReleaseOutputStream.
179 mixer_output_stream_.reset(new CastAudioOutputStream(params, this)); 183 mixer_output_stream_.reset(new CastAudioOutputStream(params, this));
180 return mixer_output_stream_.get(); 184 return mixer_output_stream_.get();
181 } 185 }
182 186
183 } // namespace media 187 } // namespace media
184 } // namespace chromecast 188 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/media/audio/cast_audio_manager.h ('k') | media/audio/alsa/audio_manager_alsa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698