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

Side by Side Diff: chromeos/audio/cras_audio_handler.cc

Issue 2634263002: Pass camera facing info to audio client (Closed)
Patch Set: add //media/base:video_facing dependency to //content/browser Created 3 years, 10 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chromeos/audio/cras_audio_handler.h" 5 #include "chromeos/audio/cras_audio_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 return g_cras_audio_handler != NULL; 119 return g_cras_audio_handler != NULL;
120 } 120 }
121 121
122 // static 122 // static
123 CrasAudioHandler* CrasAudioHandler::Get() { 123 CrasAudioHandler* CrasAudioHandler::Get() {
124 CHECK(g_cras_audio_handler) 124 CHECK(g_cras_audio_handler)
125 << "CrasAudioHandler::Get() called before Initialize()."; 125 << "CrasAudioHandler::Get() called before Initialize().";
126 return g_cras_audio_handler; 126 return g_cras_audio_handler;
127 } 127 }
128 128
129 void CrasAudioHandler::OnVideoCaptureStarted(media::VideoFacingMode facing) {
130 // TODO(jennyz): Switch active audio device according to video facing.
131 LOG(ERROR) << "aaaa start facing " << static_cast<int>(facing);
132 }
133
134 void CrasAudioHandler::OnVideoCaptureStopped(media::VideoFacingMode facing) {
135 // TODO(jennyz): Switch active audio device according to video facing.
136 LOG(ERROR) << "aaaa stop facing " << static_cast<int>(facing);
137 }
138
129 void CrasAudioHandler::AddAudioObserver(AudioObserver* observer) { 139 void CrasAudioHandler::AddAudioObserver(AudioObserver* observer) {
130 observers_.AddObserver(observer); 140 observers_.AddObserver(observer);
131 } 141 }
132 142
133 void CrasAudioHandler::RemoveAudioObserver(AudioObserver* observer) { 143 void CrasAudioHandler::RemoveAudioObserver(AudioObserver* observer) {
134 observers_.RemoveObserver(observer); 144 observers_.RemoveObserver(observer);
135 } 145 }
136 146
137 bool CrasAudioHandler::HasKeyboardMic() { 147 bool CrasAudioHandler::HasKeyboardMic() {
138 return GetKeyboardMic() != NULL; 148 return GetKeyboardMic() != NULL;
(...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 hdmi_rediscover_grace_period_duration_in_ms_), 1419 hdmi_rediscover_grace_period_duration_in_ms_),
1410 this, &CrasAudioHandler::UpdateAudioAfterHDMIRediscoverGracePeriod); 1420 this, &CrasAudioHandler::UpdateAudioAfterHDMIRediscoverGracePeriod);
1411 } 1421 }
1412 1422
1413 void CrasAudioHandler::SetHDMIRediscoverGracePeriodForTesting( 1423 void CrasAudioHandler::SetHDMIRediscoverGracePeriodForTesting(
1414 int duration_in_ms) { 1424 int duration_in_ms) {
1415 hdmi_rediscover_grace_period_duration_in_ms_ = duration_in_ms; 1425 hdmi_rediscover_grace_period_duration_in_ms_ = duration_in_ms;
1416 } 1426 }
1417 1427
1418 } // namespace chromeos 1428 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698