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

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

Issue 1864483002: Forward output glitch information from stream WebRTC log (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 6 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 unified diff | Download patch
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 "chromecast/media/audio/cast_audio_output_stream.h" 10 #include "chromecast/media/audio/cast_audio_output_stream.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 ::media::CHANNEL_LAYOUT_STEREO, 48000, 16, 1024); 66 ::media::CHANNEL_LAYOUT_STEREO, 48000, 16, 1024);
67 } 67 }
68 68
69 std::unique_ptr<MediaPipelineBackend> 69 std::unique_ptr<MediaPipelineBackend>
70 CastAudioManager::CreateMediaPipelineBackend( 70 CastAudioManager::CreateMediaPipelineBackend(
71 const MediaPipelineDeviceParams& params) { 71 const MediaPipelineDeviceParams& params) {
72 return backend_manager_->CreateMediaPipelineBackend(params); 72 return backend_manager_->CreateMediaPipelineBackend(params);
73 } 73 }
74 74
75 ::media::AudioOutputStream* CastAudioManager::MakeLinearOutputStream( 75 ::media::AudioOutputStream* CastAudioManager::MakeLinearOutputStream(
76 const ::media::AudioParameters& params) { 76 const ::media::AudioParameters& params,
77 const ::media::AudioManager::LogCallback& log_callback) {
77 DCHECK_EQ(::media::AudioParameters::AUDIO_PCM_LINEAR, params.format()); 78 DCHECK_EQ(::media::AudioParameters::AUDIO_PCM_LINEAR, params.format());
78 return new CastAudioOutputStream(params, this); 79 return new CastAudioOutputStream(params, this);
79 } 80 }
80 81
81 ::media::AudioOutputStream* CastAudioManager::MakeLowLatencyOutputStream( 82 ::media::AudioOutputStream* CastAudioManager::MakeLowLatencyOutputStream(
82 const ::media::AudioParameters& params, 83 const ::media::AudioParameters& params,
83 const std::string& device_id) { 84 const std::string& device_id,
85 const ::media::AudioManager::LogCallback& log_callback) {
84 DCHECK_EQ(::media::AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format()); 86 DCHECK_EQ(::media::AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
85 return new CastAudioOutputStream(params, this); 87 return new CastAudioOutputStream(params, this);
86 } 88 }
87 89
88 ::media::AudioInputStream* CastAudioManager::MakeLinearInputStream( 90 ::media::AudioInputStream* CastAudioManager::MakeLinearInputStream(
89 const ::media::AudioParameters& params, 91 const ::media::AudioParameters& params,
90 const std::string& device_id) { 92 const std::string& device_id,
93 const ::media::AudioManager::LogCallback& log_callback) {
91 LOG(WARNING) << "No support for input audio devices"; 94 LOG(WARNING) << "No support for input audio devices";
92 return nullptr; 95 return nullptr;
93 } 96 }
94 97
95 ::media::AudioInputStream* CastAudioManager::MakeLowLatencyInputStream( 98 ::media::AudioInputStream* CastAudioManager::MakeLowLatencyInputStream(
96 const ::media::AudioParameters& params, 99 const ::media::AudioParameters& params,
97 const std::string& device_id) { 100 const std::string& device_id,
101 const ::media::AudioManager::LogCallback& log_callback) {
98 LOG(WARNING) << "No support for input audio devices"; 102 LOG(WARNING) << "No support for input audio devices";
99 return nullptr; 103 return nullptr;
100 } 104 }
101 105
102 ::media::AudioParameters CastAudioManager::GetPreferredOutputStreamParameters( 106 ::media::AudioParameters CastAudioManager::GetPreferredOutputStreamParameters(
103 const std::string& output_device_id, 107 const std::string& output_device_id,
104 const ::media::AudioParameters& input_params) { 108 const ::media::AudioParameters& input_params) {
105 ::media::ChannelLayout channel_layout = ::media::CHANNEL_LAYOUT_STEREO; 109 ::media::ChannelLayout channel_layout = ::media::CHANNEL_LAYOUT_STEREO;
106 int sample_rate = kDefaultSampleRate; 110 int sample_rate = kDefaultSampleRate;
107 int buffer_size = kDefaultOutputBufferSize; 111 int buffer_size = kDefaultOutputBufferSize;
(...skipping 10 matching lines...) Expand all
118 } 122 }
119 123
120 ::media::AudioParameters output_params( 124 ::media::AudioParameters output_params(
121 ::media::AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, 125 ::media::AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout,
122 sample_rate, bits_per_sample, buffer_size); 126 sample_rate, bits_per_sample, buffer_size);
123 return output_params; 127 return output_params;
124 } 128 }
125 129
126 } // namespace media 130 } // namespace media
127 } // namespace chromecast 131 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/media/audio/cast_audio_manager.h ('k') | chromecast/media/audio/cast_audio_output_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698