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

Unified Diff: webrtc/modules/audio_device/android/audio_device_template.h

Issue 2103863004: UMA log for audio_device Init and Start(Playout|Recording). Make Init return a more specific error … (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rename variable. 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_device/android/audio_device_template.h
diff --git a/webrtc/modules/audio_device/android/audio_device_template.h b/webrtc/modules/audio_device/android/audio_device_template.h
index fa7b15e0f7581a5005c458b7e98234956fcc1ce5..46d97f6da6f787f518f9996c3147cc04a415960c 100644
--- a/webrtc/modules/audio_device/android/audio_device_template.h
+++ b/webrtc/modules/audio_device/android/audio_device_template.h
@@ -53,23 +53,24 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
return 0;
}
- int32_t Init() override {
+ InitStatus Init() override {
LOG(INFO) << __FUNCTION__;
RTC_DCHECK(thread_checker_.CalledOnValidThread());
RTC_DCHECK(!initialized_);
- if (!audio_manager_->Init())
- return -1;
+ if (!audio_manager_->Init()) {
+ return InitStatus::OTHER_ERROR;
+ }
if (output_.Init() != 0) {
audio_manager_->Close();
- return -1;
+ return InitStatus::PLAYOUT_ERROR;
}
if (input_.Init() != 0) {
output_.Terminate();
audio_manager_->Close();
- return -1;
+ return InitStatus::RECORDING_ERROR;
}
initialized_ = true;
- return 0;
+ return InitStatus::OK;
}
int32_t Terminate() override {

Powered by Google App Engine
This is Rietveld 408576698