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

Unified Diff: webrtc/voice_engine/file_player.cc

Issue 2787263003: Delete all log messages depending on system_wrappers. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « webrtc/system_wrappers/include/metrics.h ('k') | webrtc/voice_engine/file_recorder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/voice_engine/file_player.cc
diff --git a/webrtc/voice_engine/file_player.cc b/webrtc/voice_engine/file_player.cc
index 4ee1322e9b9f5a123e968bbd564dd15dcce567e8..f2bfa8af2f50d8f7108de0dd36436a84cb86388a 100644
--- a/webrtc/voice_engine/file_player.cc
+++ b/webrtc/voice_engine/file_player.cc
@@ -14,7 +14,6 @@
#include "webrtc/common_types.h"
#include "webrtc/modules/media_file/media_file.h"
#include "webrtc/modules/media_file/media_file_defines.h"
-#include "webrtc/system_wrappers/include/logging.h"
#include "webrtc/typedefs.h"
#include "webrtc/voice_engine/coder.h"
@@ -115,9 +114,6 @@ int32_t FilePlayerImpl::Get10msAudioFromFile(int16_t* outBuffer,
size_t* lengthInSamples,
int frequencyInHz) {
if (_codec.plfreq == 0) {
- LOG(LS_WARNING) << "Get10msAudioFromFile() playing not started!"
- << " codec freq = " << _codec.plfreq
- << ", wanted freq = " << frequencyInHz;
return -1;
}
@@ -166,7 +162,6 @@ int32_t FilePlayerImpl::Get10msAudioFromFile(int16_t* outBuffer,
size_t outLen = 0;
if (_resampler.ResetIfNeeded(unresampledAudioFrame.sample_rate_hz_,
frequencyInHz, 1)) {
- LOG(LS_WARNING) << "Get10msAudioFromFile() unexpected codec.";
// New sampling frequency. Update state.
outLen = static_cast<size_t>(frequencyInHz / 100);
@@ -197,7 +192,6 @@ int32_t FilePlayerImpl::SetAudioScaling(float scaleFactor) {
_scaling = scaleFactor;
return 0;
}
- LOG(LS_WARNING) << "SetAudioScaling() non-allowed scale factor.";
return -1;
}
@@ -231,24 +225,18 @@ int32_t FilePlayerImpl::StartPlayingFile(const char* fileName,
codecInstL16.plfreq = 32000;
codecInstL16.pacsize = 160;
} else {
- LOG(LS_ERROR) << "StartPlayingFile() sample frequency not "
- << "supported for PCM format.";
return -1;
}
if (_fileModule.StartPlayingAudioFile(fileName, notification, loop,
_fileFormat, &codecInstL16,
startPosition, stopPosition) == -1) {
- LOG(LS_WARNING) << "StartPlayingFile() failed to initialize "
- << "pcm file " << fileName;
return -1;
}
SetAudioScaling(volumeScaling);
} else if (_fileFormat == kFileFormatPreencodedFile) {
if (_fileModule.StartPlayingAudioFile(fileName, notification, loop,
_fileFormat, codecInst) == -1) {
- LOG(LS_WARNING) << "StartPlayingFile() failed to initialize "
- << "pre-encoded file " << fileName;
return -1;
}
} else {
@@ -256,8 +244,6 @@ int32_t FilePlayerImpl::StartPlayingFile(const char* fileName,
if (_fileModule.StartPlayingAudioFile(fileName, notification, loop,
_fileFormat, no_inst, startPosition,
stopPosition) == -1) {
- LOG(LS_WARNING) << "StartPlayingFile() failed to initialize file "
- << fileName;
return -1;
}
SetAudioScaling(volumeScaling);
@@ -298,23 +284,17 @@ int32_t FilePlayerImpl::StartPlayingFile(InStream* sourceStream,
codecInstL16.plfreq = 32000;
codecInstL16.pacsize = 160;
} else {
- LOG(LS_ERROR) << "StartPlayingFile() sample frequency not "
- << "supported for PCM format.";
return -1;
}
if (_fileModule.StartPlayingAudioStream(
*sourceStream, notification, _fileFormat, &codecInstL16,
startPosition, stopPosition) == -1) {
- LOG(LS_ERROR) << "StartPlayingFile() failed to initialize stream "
- << "playout.";
return -1;
}
} else if (_fileFormat == kFileFormatPreencodedFile) {
if (_fileModule.StartPlayingAudioStream(*sourceStream, notification,
_fileFormat, codecInst) == -1) {
- LOG(LS_ERROR) << "StartPlayingFile() failed to initialize stream "
- << "playout.";
return -1;
}
} else {
@@ -322,8 +302,6 @@ int32_t FilePlayerImpl::StartPlayingFile(InStream* sourceStream,
if (_fileModule.StartPlayingAudioStream(*sourceStream, notification,
_fileFormat, no_inst, startPosition,
stopPosition) == -1) {
- LOG(LS_ERROR) << "StartPlayingFile() failed to initialize stream "
- << "playout.";
return -1;
}
}
@@ -353,13 +331,10 @@ int32_t FilePlayerImpl::GetPlayoutPosition(uint32_t* durationMs) {
int32_t FilePlayerImpl::SetUpAudioDecoder() {
if ((_fileModule.codec_info(_codec) == -1)) {
- LOG(LS_WARNING) << "Failed to retrieve codec info of file data.";
return -1;
}
if (STR_CASE_CMP(_codec.plname, "L16") != 0 &&
_audioDecoder.SetDecodeCodec(_codec) == -1) {
- LOG(LS_WARNING) << "SetUpAudioDecoder() codec " << _codec.plname
- << " not supported.";
return -1;
}
_numberOf10MsPerFrame = _codec.pacsize / (_codec.plfreq / 100);
« no previous file with comments | « webrtc/system_wrappers/include/metrics.h ('k') | webrtc/voice_engine/file_recorder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698