Replace WEBRTC_TRACE logging in modules/media_file/
Patch set 1:
Run a script to replace occurrences of WEBRTC_TRACE logging with the new style,
in webrtc/modules/media_file/.
Patch set 2:
- Manually fix log lines not handled by the script
- Update the included headers
- Remove the now unused object ID variables
Bug: webrtc:5118
Change-Id: I1acbaec3fbbdf1deb7b934624a2f1fd38253c7e9
Reviewed-on: https://chromium-review.googlesource.com/602007
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Original-Commit-Position: refs/heads/master@{#19470}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 45ca37c02214531b3fe88b8b0cc2cc0d36571b8b
diff --git a/modules/media_file/media_file_impl.cc b/modules/media_file/media_file_impl.cc
index 56dc9c8..a869625 100644
--- a/modules/media_file/media_file_impl.cc
+++ b/modules/media_file/media_file_impl.cc
@@ -12,8 +12,8 @@
#include "webrtc/modules/media_file/media_file_impl.h"
#include "webrtc/rtc_base/format_macros.h"
+#include "webrtc/rtc_base/logging.h"
#include "webrtc/system_wrappers/include/file_wrapper.h"
-#include "webrtc/system_wrappers/include/trace.h"
namespace webrtc {
MediaFile* MediaFile::CreateMediaFile(const int32_t id)
@@ -43,7 +43,7 @@
_fileName(),
_ptrCallback(NULL)
{
- WEBRTC_TRACE(kTraceMemory, kTraceFile, id, "Created");
+ LOG(LS_INFO) << "MediaFileImpl()";
codec_info_.plname[0] = '\0';
_fileName[0] = '\0';
@@ -52,7 +52,7 @@
MediaFileImpl::~MediaFileImpl()
{
- WEBRTC_TRACE(kTraceMemory, kTraceFile, _id, "~MediaFileImpl()");
+ LOG(LS_INFO) << "~MediaFileImpl()";
{
rtc::CritScope lock(&_crit);
@@ -80,34 +80,29 @@
int64_t MediaFileImpl::TimeUntilNextProcess()
{
- WEBRTC_TRACE(
- kTraceWarning,
- kTraceFile,
- _id,
- "TimeUntilNextProcess: This method is not used by MediaFile class.");
+ LOG(LS_WARNING)
+ << "TimeUntilNextProcess: This method is not used by MediaFile class.";
return -1;
}
void MediaFileImpl::Process()
{
- WEBRTC_TRACE(kTraceWarning, kTraceFile, _id,
- "Process: This method is not used by MediaFile class.");
+ LOG(LS_WARNING) << "Process: This method is not used by MediaFile class.";
}
int32_t MediaFileImpl::PlayoutAudioData(int8_t* buffer,
size_t& dataLengthInBytes)
{
- WEBRTC_TRACE(kTraceStream, kTraceFile, _id,
- "MediaFileImpl::PlayoutData(buffer= 0x%x, bufLen= %" PRIuS ")",
- buffer, dataLengthInBytes);
+ LOG(LS_INFO) << "MediaFileImpl::PlayoutData(buffer= "
+ << static_cast<void*>(buffer)
+ << ", bufLen= " << dataLengthInBytes << ")";
const size_t bufferLengthInBytes = dataLengthInBytes;
dataLengthInBytes = 0;
if(buffer == NULL || bufferLengthInBytes == 0)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Buffer pointer or length is NULL!");
+ LOG(LS_ERROR) << "Buffer pointer or length is NULL!";
return -1;
}
@@ -117,15 +112,13 @@
if(!_playingActive)
{
- WEBRTC_TRACE(kTraceWarning, kTraceFile, _id,
- "Not currently playing!");
+ LOG(LS_WARNING) << "Not currently playing!";
return -1;
}
if(!_ptrFileUtilityObj)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Playing, but no FileUtility object!");
+ LOG(LS_ERROR) << "Playing, but no FileUtility object!";
StopPlaying();
return -1;
}
@@ -165,8 +158,7 @@
break;
default:
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Invalid file format: %d", _fileFormat);
+ LOG(LS_ERROR) << "Invalid file format: " << _fileFormat;
assert(false);
break;
}
@@ -226,20 +218,18 @@
int8_t* bufferRight,
size_t& dataLengthInBytes)
{
- WEBRTC_TRACE(kTraceStream, kTraceFile, _id,
- "MediaFileImpl::PlayoutStereoData(Left = 0x%x, Right = 0x%x,"
- " Len= %" PRIuS ")",
- bufferLeft,
- bufferRight,
- dataLengthInBytes);
+ LOG(LS_INFO)
+ << "MediaFileImpl::PlayoutStereoData(Left = "
+ << static_cast<void*>(bufferLeft) << ", Right = "
+ << static_cast<void*>(bufferRight) << ", Len= " << dataLengthInBytes
+ << ")";
const size_t bufferLengthInBytes = dataLengthInBytes;
dataLengthInBytes = 0;
if(bufferLeft == NULL || bufferRight == NULL || bufferLengthInBytes == 0)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "A buffer pointer or the length is NULL!");
+ LOG(LS_ERROR) << "A buffer pointer or the length is NULL!";
return -1;
}
@@ -250,18 +240,14 @@
if(!_playingActive || !_isStereo)
{
- WEBRTC_TRACE(kTraceWarning, kTraceFile, _id,
- "Not currently playing stereo!");
+ LOG(LS_WARNING) << "Not currently playing stereo!";
return -1;
}
if(!_ptrFileUtilityObj)
{
- WEBRTC_TRACE(
- kTraceError,
- kTraceFile,
- _id,
- "Playing stereo, but the FileUtility objects is NULL!");
+ LOG(LS_ERROR)
+ << "Playing stereo, but the FileUtility objects is NULL!";
StopPlaying();
return -1;
}
@@ -278,9 +264,8 @@
bufferLengthInBytes);
break;
default:
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Trying to read non-WAV as stereo audio\
- (not supported)");
+ LOG(LS_ERROR)
+ << "Trying to read non-WAV as stereo audio (not supported)";
break;
}
@@ -348,27 +333,21 @@
if((startPointMs && stopPointMs && !loop) &&
(notificationTimeMs > (stopPointMs - startPointMs)))
{
- WEBRTC_TRACE(
- kTraceError,
- kTraceFile,
- _id,
- "specified notification time is longer than amount of ms that will\
- be played");
+ LOG(LS_ERROR) << "specified notification time is longer than amount of"
+ << " ms that will be played";
return -1;
}
FileWrapper* inputStream = FileWrapper::Create();
if(inputStream == NULL)
{
- WEBRTC_TRACE(kTraceMemory, kTraceFile, _id,
- "Failed to allocate input stream for file %s", fileName);
+ LOG(LS_INFO) << "Failed to allocate input stream for file " << fileName;
return -1;
}
if (!inputStream->OpenFile(fileName, true)) {
delete inputStream;
- WEBRTC_TRACE(kTraceError, kTraceFile, _id, "Could not open input file %s",
- fileName);
+ LOG(LS_ERROR) << "Could not open input file " << fileName;
return -1;
}
@@ -421,30 +400,24 @@
rtc::CritScope lock(&_crit);
if(_playingActive || _recordingActive)
{
- WEBRTC_TRACE(
- kTraceError,
- kTraceFile,
- _id,
- "StartPlaying called, but already playing or recording file %s",
- (_fileName[0] == '\0') ? "(name not set)" : _fileName);
+ LOG(LS_ERROR)
+ << "StartPlaying called, but already playing or recording file "
+ << ((_fileName[0] == '\0') ? "(name not set)" : _fileName);
return -1;
}
if(_ptrFileUtilityObj != NULL)
{
- WEBRTC_TRACE(kTraceError,
- kTraceFile,
- _id,
- "StartPlaying called, but FileUtilityObj already exists!");
+ LOG(LS_ERROR)
+ << "StartPlaying called, but FileUtilityObj already exists!";
StopPlaying();
return -1;
}
- _ptrFileUtilityObj = new ModuleFileUtility(_id);
+ _ptrFileUtilityObj = new ModuleFileUtility();
if(_ptrFileUtilityObj == NULL)
{
- WEBRTC_TRACE(kTraceMemory, kTraceFile, _id,
- "Failed to create FileUtilityObj!");
+ LOG(LS_INFO) << "Failed to create FileUtilityObj!";
return -1;
}
@@ -455,8 +428,7 @@
if(_ptrFileUtilityObj->InitWavReading(stream, startPointMs,
stopPointMs) == -1)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Not a valid WAV file!");
+ LOG(LS_ERROR) << "Not a valid WAV file!";
StopPlaying();
return -1;
}
@@ -468,8 +440,7 @@
if(_ptrFileUtilityObj->InitCompressedReading(stream, startPointMs,
stopPointMs) == -1)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Not a valid Compressed file!");
+ LOG(LS_ERROR) << "Not a valid Compressed file!";
StopPlaying();
return -1;
}
@@ -488,8 +459,7 @@
stopPointMs,
codecInst->plfreq) == -1)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Not a valid raw 8 or 16 KHz PCM file!");
+ LOG(LS_ERROR) << "Not a valid raw 8 or 16 KHz PCM file!";
StopPlaying();
return -1;
}
@@ -505,8 +475,7 @@
if(_ptrFileUtilityObj->InitPreEncodedReading(stream, *codecInst) ==
-1)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Not a valid PreEncoded file!");
+ LOG(LS_ERROR) << "Not a valid PreEncoded file!";
StopPlaying();
return -1;
}
@@ -516,16 +485,14 @@
}
default:
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Invalid file format: %d", format);
+ LOG(LS_ERROR) << "Invalid file format: " << format;
assert(false);
break;
}
}
if(_ptrFileUtilityObj->codec_info(codec_info_) == -1)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Failed to retrieve codec info!");
+ LOG(LS_ERROR) << "Failed to retrieve codec info!";
StopPlaying();
return -1;
}
@@ -533,8 +500,7 @@
_isStereo = (codec_info_.channels == 2);
if(_isStereo && (_fileFormat != kFileFormatWavFile))
{
- WEBRTC_TRACE(kTraceWarning, kTraceFile, _id,
- "Stereo is only allowed for WAV files");
+ LOG(LS_WARNING) << "Stereo is only allowed for WAV files";
StopPlaying();
return -1;
}
@@ -572,8 +538,7 @@
if(!_playingActive)
{
- WEBRTC_TRACE(kTraceWarning, kTraceFile, _id,
- "playing is not active!");
+ LOG(LS_WARNING) << "playing is not active!";
return -1;
}
@@ -583,7 +548,7 @@
bool MediaFileImpl::IsPlaying()
{
- WEBRTC_TRACE(kTraceStream, kTraceFile, _id, "MediaFileImpl::IsPlaying()");
+ LOG(LS_VERBOSE) << "MediaFileImpl::IsPlaying()";
rtc::CritScope lock(&_crit);
return _playingActive;
}
@@ -592,14 +557,13 @@
const int8_t* buffer,
const size_t bufferLengthInBytes)
{
- WEBRTC_TRACE(kTraceStream, kTraceFile, _id,
- "MediaFile::IncomingData(buffer= 0x%x, bufLen= %" PRIuS,
- buffer, bufferLengthInBytes);
+ LOG(LS_INFO) << "MediaFile::IncomingData(buffer= "
+ << static_cast<const void*>(buffer) << ", bufLen= "
+ << bufferLengthInBytes << ")";
if(buffer == NULL || bufferLengthInBytes == 0)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Buffer pointer or length is NULL!");
+ LOG(LS_ERROR) << "Buffer pointer or length is NULL!";
return -1;
}
@@ -610,14 +574,12 @@
if(!_recordingActive)
{
- WEBRTC_TRACE(kTraceWarning, kTraceFile, _id,
- "Not currently recording!");
+ LOG(LS_WARNING) << "Not currently recording!";
return -1;
}
if(_ptrOutStream == NULL)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Recording is active, but output stream is NULL!");
+ LOG(LS_ERROR) << "Recording is active, but output stream is NULL!";
assert(false);
return -1;
}
@@ -663,8 +625,7 @@
*_ptrOutStream, buffer, bufferLengthInBytes);
break;
default:
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Invalid file format: %d", _fileFormat);
+ LOG(LS_ERROR) << "Invalid file format: " << _fileFormat;
assert(false);
break;
}
@@ -693,8 +654,7 @@
}
if(bytesWritten < (int32_t)bufferLengthInBytes)
{
- WEBRTC_TRACE(kTraceWarning, kTraceFile, _id,
- "Failed to write all requested bytes!");
+ LOG(LS_WARNING) << "Failed to write all requested bytes!";
StopRecording();
recordingEnded = true;
}
@@ -736,15 +696,14 @@
FileWrapper* outputStream = FileWrapper::Create();
if(outputStream == NULL)
{
- WEBRTC_TRACE(kTraceMemory, kTraceFile, _id,
- "Failed to allocate memory for output stream");
+ LOG(LS_INFO) << "Failed to allocate memory for output stream";
return -1;
}
if (!outputStream->OpenFile(fileName, false)) {
delete outputStream;
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Could not open output file '%s' for writing!", fileName);
+ LOG(LS_ERROR) << "Could not open output file '" << fileName
+ << "' for writing!";
return -1;
}
@@ -783,31 +742,24 @@
rtc::CritScope lock(&_crit);
if(_recordingActive || _playingActive)
{
- WEBRTC_TRACE(
- kTraceError,
- kTraceFile,
- _id,
- "StartRecording called, but already recording or playing file %s!",
- _fileName);
+ LOG(LS_ERROR)
+ << "StartRecording called, but already recording or playing file "
+ << _fileName << "!";
return -1;
}
if(_ptrFileUtilityObj != NULL)
{
- WEBRTC_TRACE(
- kTraceError,
- kTraceFile,
- _id,
- "StartRecording called, but fileUtilityObj already exists!");
+ LOG(LS_ERROR)
+ << "StartRecording called, but fileUtilityObj already exists!";
StopRecording();
return -1;
}
- _ptrFileUtilityObj = new ModuleFileUtility(_id);
+ _ptrFileUtilityObj = new ModuleFileUtility();
if(_ptrFileUtilityObj == NULL)
{
- WEBRTC_TRACE(kTraceMemory, kTraceFile, _id,
- "Cannot allocate fileUtilityObj!");
+ LOG(LS_INFO) << "Cannot allocate fileUtilityObj!";
return -1;
}
@@ -819,8 +771,7 @@
{
if(_ptrFileUtilityObj->InitWavWriting(stream, codecInst) == -1)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Failed to initialize WAV file!");
+ LOG(LS_ERROR) << "Failed to initialize WAV file!";
delete _ptrFileUtilityObj;
_ptrFileUtilityObj = NULL;
return -1;
@@ -834,8 +785,7 @@
if(_ptrFileUtilityObj->InitCompressedWriting(stream, codecInst) ==
-1)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Failed to initialize Compressed file!");
+ LOG(LS_ERROR) << "Failed to initialize Compressed file!";
delete _ptrFileUtilityObj;
_ptrFileUtilityObj = NULL;
return -1;
@@ -850,8 +800,7 @@
_ptrFileUtilityObj->InitPCMWriting(stream, codecInst.plfreq) ==
-1)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Failed to initialize 8 or 16KHz PCM file!");
+ LOG(LS_ERROR) << "Failed to initialize 8 or 16KHz PCM file!";
delete _ptrFileUtilityObj;
_ptrFileUtilityObj = NULL;
return -1;
@@ -864,8 +813,7 @@
if(_ptrFileUtilityObj->InitPreEncodedWriting(stream, codecInst) ==
-1)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Failed to initialize Pre-Encoded file!");
+ LOG(LS_ERROR) << "Failed to initialize Pre-Encoded file!";
delete _ptrFileUtilityObj;
_ptrFileUtilityObj = NULL;
return -1;
@@ -876,8 +824,7 @@
}
default:
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Invalid file format %d specified!", format);
+ LOG(LS_ERROR) << "Invalid file format " << format << " specified!";
delete _ptrFileUtilityObj;
_ptrFileUtilityObj = NULL;
return -1;
@@ -888,8 +835,7 @@
{
if(_fileFormat != kFileFormatWavFile)
{
- WEBRTC_TRACE(kTraceWarning, kTraceFile, _id,
- "Stereo is only allowed for WAV files");
+ LOG(LS_WARNING) << "Stereo is only allowed for WAV files";
StopRecording();
return -1;
}
@@ -897,11 +843,8 @@
(STR_NCASE_CMP(tmpAudioCodec.plname, "PCMU", 5) != 0) &&
(STR_NCASE_CMP(tmpAudioCodec.plname, "PCMA", 5) != 0))
{
- WEBRTC_TRACE(
- kTraceWarning,
- kTraceFile,
- _id,
- "Stereo is only allowed for codec PCMU, PCMA and L16 ");
+ LOG(LS_WARNING)
+ << "Stereo is only allowed for codec PCMU, PCMA and L16 ";
StopRecording();
return -1;
}
@@ -920,8 +863,7 @@
rtc::CritScope lock(&_crit);
if(!_recordingActive)
{
- WEBRTC_TRACE(kTraceWarning, kTraceFile, _id,
- "recording is not active!");
+ LOG(LS_WARNING) << "recording is not active!";
return -1;
}
@@ -960,7 +902,7 @@
bool MediaFileImpl::IsRecording()
{
- WEBRTC_TRACE(kTraceStream, kTraceFile, _id, "MediaFileImpl::IsRecording()");
+ LOG(LS_VERBOSE) << "MediaFileImpl::IsRecording()";
rtc::CritScope lock(&_crit);
return _recordingActive;
}
@@ -980,7 +922,7 @@
bool MediaFileImpl::IsStereo()
{
- WEBRTC_TRACE(kTraceStream, kTraceFile, _id, "MediaFileImpl::IsStereo()");
+ LOG(LS_VERBOSE) << "MediaFileImpl::IsStereo()";
rtc::CritScope lock(&_crit);
return _isStereo;
}
@@ -1009,11 +951,10 @@
return -1;
}
- ModuleFileUtility* utilityObj = new ModuleFileUtility(_id);
+ ModuleFileUtility* utilityObj = new ModuleFileUtility();
if(utilityObj == NULL)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "failed to allocate utility object!");
+ LOG(LS_ERROR) << "failed to allocate utility object!";
return -1;
}
@@ -1047,15 +988,14 @@
rtc::CritScope lock(&_crit);
if(!_playingActive && !_recordingActive)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Neither playout nor recording has been initialized!");
+ LOG(LS_ERROR) << "Neither playout nor recording has been initialized!";
return -1;
}
if (codec_info_.pltype == 0 && codec_info_.plname[0] == '\0')
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "The CodecInst for %s is unknown!",
- _playingActive ? "Playback" : "Recording");
+ LOG(LS_ERROR) << "The CodecInst for "
+ << (_playingActive ? "Playback" : "Recording")
+ << " is unknown!";
return -1;
}
memcpy(&codecInst,&codec_info_,sizeof(CodecInst));
@@ -1072,8 +1012,7 @@
format == kFileFormatPcm16kHzFile ||
format == kFileFormatPcm32kHzFile)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, -1,
- "Codec info required for file format specified!");
+ LOG(LS_ERROR) << "Codec info required for file format specified!";
return false;
}
}
@@ -1084,7 +1023,7 @@
{
if((fileName == NULL) ||(fileName[0] == '\0'))
{
- WEBRTC_TRACE(kTraceError, kTraceFile, -1, "FileName not specified!");
+ LOG(LS_ERROR) << "FileName not specified!";
return false;
}
return true;
@@ -1100,14 +1039,12 @@
}
if(stopPointMs &&(startPointMs >= stopPointMs))
{
- WEBRTC_TRACE(kTraceError, kTraceFile, -1,
- "startPointMs must be less than stopPointMs!");
+ LOG(LS_ERROR) << "startPointMs must be less than stopPointMs!";
return false;
}
if(stopPointMs &&((stopPointMs - startPointMs) < 20))
{
- WEBRTC_TRACE(kTraceError, kTraceFile, -1,
- "minimum play duration for files is 20 ms!");
+ LOG(LS_ERROR) << "minimum play duration for files is 20 ms!";
return false;
}
return true;
@@ -1119,8 +1056,7 @@
{
return true;
}
- WEBRTC_TRACE(kTraceError, kTraceFile, -1,
- "Frequency should be 8000, 16000 or 32000 (Hz)");
+ LOG(LS_ERROR) << "Frequency should be 8000, 16000 or 32000 (Hz)";
return false;
}
} // namespace webrtc
diff --git a/modules/media_file/media_file_utility.cc b/modules/media_file/media_file_utility.cc
index d305812..883f177 100644
--- a/modules/media_file/media_file_utility.cc
+++ b/modules/media_file/media_file_utility.cc
@@ -19,8 +19,8 @@
#include "webrtc/common_types.h"
#include "webrtc/modules/include/module_common_types.h"
#include "webrtc/rtc_base/format_macros.h"
+#include "webrtc/rtc_base/logging.h"
#include "webrtc/system_wrappers/include/file_wrapper.h"
-#include "webrtc/system_wrappers/include/trace.h"
#include "webrtc/typedefs.h"
namespace {
@@ -44,11 +44,10 @@
} // unnamed namespace
namespace webrtc {
-ModuleFileUtility::ModuleFileUtility(const int32_t id)
+ModuleFileUtility::ModuleFileUtility()
: _wavFormatObj(),
_dataSize(0),
_readSizeBytes(0),
- _id(id),
_stopPointInMs(0),
_startPointInMs(0),
_playoutPositionMs(0),
@@ -60,16 +59,14 @@
_reading(false),
_writing(false),
_tempData() {
- WEBRTC_TRACE(kTraceMemory, kTraceFile, _id,
- "ModuleFileUtility::ModuleFileUtility()");
+ LOG(LS_INFO) << "ModuleFileUtility::ModuleFileUtility()";
memset(&codec_info_,0,sizeof(CodecInst));
codec_info_.pltype = -1;
}
ModuleFileUtility::~ModuleFileUtility()
{
- WEBRTC_TRACE(kTraceMemory, kTraceFile, _id,
- "ModuleFileUtility::~ModuleFileUtility()");
+ LOG(LS_INFO) << "ModuleFileUtility::~ModuleFileUtility()";
}
int32_t ModuleFileUtility::ReadWavHeader(InStream& wav)
@@ -89,8 +86,7 @@
int len = wav.Read(&RIFFheaderObj, sizeof(WAVE_RIFF_header));
if (len != static_cast<int>(sizeof(WAVE_RIFF_header)))
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Not a wave file (too short)");
+ LOG(LS_ERROR) << "Not a wave file (too short)";
return -1;
}
@@ -100,8 +96,7 @@
}
if(strcmp(tmpStr, "RIFF") != 0)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Not a wave file (does not have RIFF)");
+ LOG(LS_ERROR) << "Not a wave file (does not have RIFF)";
return -1;
}
for (i = 0; i < 4; i++)
@@ -110,8 +105,7 @@
}
if(strcmp(tmpStr, "WAVE") != 0)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Not a wave file (does not have WAVE)");
+ LOG(LS_ERROR) << "Not a wave file (does not have WAVE)";
return -1;
}
@@ -165,8 +159,7 @@
if (CHUNKheaderObj.fmt_ckSize < sizeof(WAVE_FMTINFO_header))
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Chunk size is too small");
+ LOG(LS_ERROR) << "Chunk size is too small";
return -1;
}
for (i = 0;
@@ -176,8 +169,8 @@
len = wav.Read(&dummyRead, 1);
if(len != 1)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "File corrupted, reached EOF (reading fmt)");
+ LOG(LS_ERROR)
+ << "File corrupted, reached EOF (reading fmt)";
return -1;
}
}
@@ -196,8 +189,8 @@
len = wav.Read(&dummyRead, 1);
if(len != 1)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "File corrupted, reached EOF (reading other)");
+ LOG(LS_ERROR)
+ << "File corrupted, reached EOF (reading other)";
return -1;
}
}
@@ -219,26 +212,23 @@
(_wavFormatObj.formatTag != kWavFormatALaw) &&
(_wavFormatObj.formatTag != kWavFormatMuLaw))
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Coding formatTag value=%d not supported!",
- _wavFormatObj.formatTag);
+ LOG(LS_ERROR) << "Coding formatTag value=" << _wavFormatObj.formatTag
+ << " not supported!";
return -1;
}
if((_wavFormatObj.nChannels < 1) ||
(_wavFormatObj.nChannels > 2))
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "nChannels value=%d not supported!",
- _wavFormatObj.nChannels);
+ LOG(LS_ERROR) << "nChannels value=" << _wavFormatObj.nChannels
+ << " not supported!";
return -1;
}
if((_wavFormatObj.nBitsPerSample != 8) &&
(_wavFormatObj.nBitsPerSample != 16))
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "nBitsPerSample value=%d not supported!",
- _wavFormatObj.nBitsPerSample);
+ LOG(LS_ERROR) << "nBitsPerSample value=" << _wavFormatObj.nBitsPerSample
+ << " not supported!";
return -1;
}
@@ -326,14 +316,12 @@
}
else
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Unsupported PCM frequency!");
+ LOG(LS_ERROR) << "Unsupported PCM frequency!";
return -1;
}
break;
default:
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "unknown WAV format TAG!");
+ LOG(LS_ERROR) << "unknown WAV format TAG!";
return -1;
break;
}
@@ -349,8 +337,7 @@
if(ReadWavHeader(wav) == -1)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "failed to read WAV header!");
+ LOG(LS_ERROR) << "failed to read WAV header!";
return -1;
}
@@ -373,8 +360,8 @@
}
else // Must have reached EOF before start position!
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "InitWavReading(), EOF before start position");
+ LOG(LS_ERROR)
+ << "InitWavReading(), EOF before start position";
return -1;
}
}
@@ -404,15 +391,9 @@
int8_t* outData,
const size_t bufferSize)
{
- WEBRTC_TRACE(
- kTraceStream,
- kTraceFile,
- _id,
- "ModuleFileUtility::ReadWavDataAsMono(wav= 0x%x, outData= 0x%d, "
- "bufSize= %" PRIuS ")",
- &wav,
- outData,
- bufferSize);
+ LOG(LS_VERBOSE) << "ModuleFileUtility::ReadWavDataAsMono(wav= " << &wav
+ << ", outData= " << static_cast<void*>(outData)
+ << ", bufSize= " << bufferSize << ")";
// The number of bytes that should be read from file.
const size_t totalBytesNeeded = _readSizeBytes;
@@ -421,21 +402,18 @@
totalBytesNeeded >> 1 : totalBytesNeeded;
if(bufferSize < bytesRequested)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "ReadWavDataAsMono: output buffer is too short!");
+ LOG(LS_ERROR) << "ReadWavDataAsMono: output buffer is too short!";
return -1;
}
if(outData == NULL)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "ReadWavDataAsMono: output buffer NULL!");
+ LOG(LS_ERROR) << "ReadWavDataAsMono: output buffer NULL!";
return -1;
}
if(!_reading)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "ReadWavDataAsMono: no longer reading file.");
+ LOG(LS_ERROR) << "ReadWavDataAsMono: no longer reading file.";
return -1;
}
@@ -449,8 +427,8 @@
}
if(bytesRead < 0)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "ReadWavDataAsMono: failed to read data from WAV file.");
+ LOG(LS_ERROR)
+ << "ReadWavDataAsMono: failed to read data from WAV file.";
return -1;
}
// Output data is should be mono.
@@ -483,37 +461,26 @@
int8_t* outDataRight,
const size_t bufferSize)
{
- WEBRTC_TRACE(
- kTraceStream,
- kTraceFile,
- _id,
- "ModuleFileUtility::ReadWavDataAsStereo(wav= 0x%x, outLeft= 0x%x, "
- "outRight= 0x%x, bufSize= %" PRIuS ")",
- &wav,
- outDataLeft,
- outDataRight,
- bufferSize);
+ LOG(LS_VERBOSE) << "ModuleFileUtility::ReadWavDataAsStereo(wav= " << &wav
+ << ", outLeft= " << static_cast<void*>(outDataLeft)
+ << ", outRight= " << static_cast<void*>(outDataRight)
+ << ", bufSize= " << bufferSize << ")";
if((outDataLeft == NULL) ||
(outDataRight == NULL))
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "ReadWavDataAsMono: an input buffer is NULL!");
+ LOG(LS_ERROR) << "ReadWavDataAsStereo: an input buffer is NULL!";
return -1;
}
if(codec_info_.channels != 2)
{
- WEBRTC_TRACE(
- kTraceError,
- kTraceFile,
- _id,
- "ReadWavDataAsStereo: WAV file does not contain stereo data!");
+ LOG(LS_ERROR)
+ << "ReadWavDataAsStereo: WAV file does not contain stereo data!";
return -1;
}
if(! _reading)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "ReadWavDataAsStereo: no longer reading file.");
+ LOG(LS_ERROR) << "ReadWavDataAsStereo: no longer reading file.";
return -1;
}
@@ -524,8 +491,7 @@
const size_t bytesRequested = totalBytesNeeded >> 1;
if(bufferSize < bytesRequested)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "ReadWavData: Output buffers are too short!");
+ LOG(LS_ERROR) << "ReadWavDataAsStereo: Output buffers are too short!";
assert(false);
return -1;
}
@@ -533,8 +499,8 @@
int32_t bytesRead = ReadWavData(wav, _tempData, totalBytesNeeded);
if(bytesRead <= 0)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "ReadWavDataAsStereo: failed to read data from WAV file.");
+ LOG(LS_ERROR)
+ << "ReadWavDataAsStereo: failed to read data from WAV file.";
return -1;
}
@@ -563,9 +529,8 @@
outRight[i] = sampleData[(2 * i) + 1];
}
} else {
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "ReadWavStereoData: unsupported sample size %" PRIuS "!",
- _bytesPerSample);
+ LOG(LS_ERROR) << "ReadWavStereoData: unsupported sample size "
+ << _bytesPerSample << "!";
assert(false);
return -1;
}
@@ -576,15 +541,13 @@
uint8_t* buffer,
size_t dataLengthInBytes)
{
- WEBRTC_TRACE(kTraceStream, kTraceFile, _id,
- "ModuleFileUtility::ReadWavData(wav= 0x%x, buffer= 0x%x, "
- "dataLen= %" PRIuS ")", &wav, buffer, dataLengthInBytes);
-
+ LOG(LS_VERBOSE) << "ModuleFileUtility::ReadWavData(wav= " << &wav
+ << ", buffer= " << static_cast<void*>(buffer)
+ << ", dataLen= " << dataLengthInBytes << ")";
if(buffer == NULL)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "ReadWavDataAsMono: output buffer NULL!");
+ LOG(LS_ERROR) << "ReadWavDataAsMono: output buffer NULL!";
return -1;
}
@@ -658,8 +621,7 @@
if(set_codec_info(codecInst) != 0)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "codecInst identifies unsupported codec!");
+ LOG(LS_ERROR) << "codecInst identifies unsupported codec!";
return -1;
}
_writing = false;
@@ -694,8 +656,7 @@
}
else
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "codecInst identifies unsupported codec for WAV file!");
+ LOG(LS_ERROR) << "codecInst identifies unsupported codec for WAV file!";
return -1;
}
_writing = true;
@@ -707,14 +668,13 @@
const int8_t* buffer,
const size_t dataLength)
{
- WEBRTC_TRACE(kTraceStream, kTraceFile, _id,
- "ModuleFileUtility::WriteWavData(out= 0x%x, buf= 0x%x, "
- "dataLen= %" PRIuS ")", &out, buffer, dataLength);
+ LOG(LS_VERBOSE) << "ModuleFileUtility::WriteWavData(out= " << &out
+ << ", buf= " << static_cast<const void*>(buffer)
+ << ", dataLen= " << dataLength << ")";
if(buffer == NULL)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "WriteWavData: input buffer NULL!");
+ LOG(LS_ERROR) << "WriteWavData: input buffer NULL!";
return -1;
}
@@ -790,14 +750,12 @@
if(set_codec_info(cinst) != 0)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Pre-encoded file send codec mismatch!");
+ LOG(LS_ERROR) << "Pre-encoded file send codec mismatch!";
return -1;
}
if(codecType != _codecId)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "Pre-encoded file format codec mismatch!");
+ LOG(LS_ERROR) << "Pre-encoded file format codec mismatch!";
return -1;
}
memcpy(&codec_info_,&cinst,sizeof(CodecInst));
@@ -810,14 +768,13 @@
int8_t* outData,
const size_t bufferSize)
{
- WEBRTC_TRACE(kTraceStream, kTraceFile, _id,
- "ModuleFileUtility::ReadPreEncodedData(in= 0x%x, "
- "outData= 0x%x, bufferSize= %" PRIuS ")", &in, outData,
- bufferSize);
+ LOG(LS_VERBOSE) << "ModuleFileUtility::ReadPreEncodedData(in= " << &in
+ << ", outData= " << static_cast<void*>(outData)
+ << ", bufferSize= " << bufferSize << ")";
if(outData == NULL)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id, "output buffer NULL");
+ LOG(LS_ERROR) << "output buffer NULL";
}
size_t frameLen;
@@ -840,9 +797,8 @@
frameLen = buf[0] + buf[1] * 256;
if(bufferSize < frameLen)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "buffer not large enough to read %" PRIuS " bytes of "
- "pre-encoded data!", frameLen);
+ LOG(LS_ERROR) << "buffer not large enough to read " << frameLen
+ << " bytes of pre-encoded data!";
return -1;
}
return in.Read(outData, frameLen);
@@ -855,7 +811,7 @@
if(set_codec_info(codecInst) != 0)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id, "CodecInst not recognized!");
+ LOG(LS_ERROR) << "CodecInst not recognized!";
return -1;
}
_writing = true;
@@ -869,14 +825,13 @@
const int8_t* buffer,
const size_t dataLength)
{
- WEBRTC_TRACE(kTraceStream, kTraceFile, _id,
- "ModuleFileUtility::WritePreEncodedData(out= 0x%x, "
- "inData= 0x%x, dataLen= %" PRIuS ")", &out, buffer,
- dataLength);
+ LOG(LS_VERBOSE) << "ModuleFileUtility::WritePreEncodedData(out= " << &out
+ << " , inData= " << static_cast<const void*>(buffer)
+ << ", dataLen= " << dataLength << ")";
if(buffer == NULL)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,"buffer NULL");
+ LOG(LS_ERROR) << "buffer NULL";
}
size_t bytesWritten = 0;
@@ -903,9 +858,8 @@
const uint32_t start,
const uint32_t stop)
{
- WEBRTC_TRACE(kTraceDebug, kTraceFile, _id,
- "ModuleFileUtility::InitCompressedReading(in= 0x%x, "
- "start= %d, stop= %d)", &in, start, stop);
+ LOG(LS_VERBOSE) << "ModuleFileUtility::InitCompressedReading(in= " << &in
+ << ", start= " << start << ", stop= " << stop << ")";
#if defined(WEBRTC_CODEC_ILBC)
int16_t read_len = 0;
@@ -992,15 +946,15 @@
int8_t* outData,
size_t bufferSize)
{
- WEBRTC_TRACE(kTraceStream, kTraceFile, _id,
- "ModuleFileUtility::ReadCompressedData(in=0x%x, outData=0x%x, "
- "bytes=%" PRIuS ")", &in, outData, bufferSize);
+ LOG(LS_VERBOSE) << "ModuleFileUtility::ReadCompressedData(in=" << &in
+ << ", outData=" << static_cast<void*>(outData) << ", bytes="
+ << bufferSize << ")";
int bytesRead = 0;
if(! _reading)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id, "not currently reading!");
+ LOG(LS_ERROR) << "not currently reading!";
return -1;
}
@@ -1019,9 +973,8 @@
}
if(bufferSize < byteSize)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "output buffer is too short to read ILBC compressed "
- "data.");
+ LOG(LS_ERROR)
+ << "output buffer is too short to read ILBC compressed data.";
assert(false);
return -1;
}
@@ -1049,8 +1002,8 @@
#endif
if(bytesRead == 0)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "ReadCompressedData() no bytes read, codec not supported");
+ LOG(LS_ERROR)
+ << "ReadCompressedData() no bytes read, codec not supported";
return -1;
}
@@ -1074,9 +1027,8 @@
OutStream& out,
const CodecInst& codecInst)
{
- WEBRTC_TRACE(kTraceDebug, kTraceFile, _id,
- "ModuleFileUtility::InitCompressedWriting(out= 0x%x, "
- "codecName= %s)", &out, codecInst.plname);
+ LOG(LS_VERBOSE) << "ModuleFileUtility::InitCompressedWriting(out= " << &out
+ << ", codecName= " << codecInst.plname << ")";
_writing = false;
@@ -1095,8 +1047,7 @@
}
else
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "codecInst defines unsupported compression codec!");
+ LOG(LS_ERROR) << "codecInst defines unsupported compression codec!";
return -1;
}
memcpy(&codec_info_,&codecInst,sizeof(CodecInst));
@@ -1105,8 +1056,7 @@
}
#endif
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "codecInst defines unsupported compression codec!");
+ LOG(LS_ERROR) << "codecInst defines unsupported compression codec!";
return -1;
}
@@ -1115,13 +1065,13 @@
const int8_t* buffer,
const size_t dataLength)
{
- WEBRTC_TRACE(kTraceStream, kTraceFile, _id,
- "ModuleFileUtility::WriteCompressedData(out= 0x%x, buf= 0x%x, "
- "dataLen= %" PRIuS ")", &out, buffer, dataLength);
+ LOG(LS_VERBOSE) << "ModuleFileUtility::WriteCompressedData(out= " << &out
+ << ", buf= " << static_cast<const void*>(buffer)
+ << ", dataLen= " << dataLength << ")";
if(buffer == NULL)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,"buffer NULL");
+ LOG(LS_ERROR) << "buffer NULL";
}
if(!out.Write(buffer, dataLength))
@@ -1136,9 +1086,9 @@
const uint32_t stop,
uint32_t freq)
{
- WEBRTC_TRACE(kTraceInfo, kTraceFile, _id,
- "ModuleFileUtility::InitPCMReading(pcm= 0x%x, start=%d, "
- "stop=%d, freq=%d)", &pcm, start, stop, freq);
+ LOG(LS_VERBOSE) << "ModuleFileUtility::InitPCMReading(pcm= " << &pcm
+ << ", start=" << start << ", stop=" << stop << ", freq="
+ << freq << ")";
int8_t dummy[320];
int read_len;
@@ -1201,21 +1151,21 @@
int8_t* outData,
size_t bufferSize)
{
- WEBRTC_TRACE(kTraceStream, kTraceFile, _id,
- "ModuleFileUtility::ReadPCMData(pcm= 0x%x, outData= 0x%x, "
- "bufSize= %" PRIuS ")", &pcm, outData, bufferSize);
+ LOG(LS_VERBOSE) << "ModuleFileUtility::ReadPCMData(pcm= " << &pcm
+ << ", outData= " << static_cast<void*>(outData)
+ << ", bufSize= " << bufferSize << ")";
if(outData == NULL)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id, "buffer NULL");
+ LOG(LS_ERROR) << "buffer NULL";
}
// Readsize for 10ms of audio data (2 bytes per sample).
size_t bytesRequested = static_cast<size_t>(2 * codec_info_.plfreq / 100);
if(bufferSize < bytesRequested)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "ReadPCMData: buffer not long enough for a 10ms frame.");
+ LOG(LS_ERROR)
+ << "ReadPCMData: buffer not long enough for a 10ms frame.";
assert(false);
return -1;
}
@@ -1249,8 +1199,7 @@
}
if(bytesRead <= 0)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "ReadPCMData: Failed to rewind audio file.");
+ LOG(LS_ERROR) << "ReadPCMData: Failed to rewind audio file.";
return -1;
}
}
@@ -1258,8 +1207,7 @@
if(bytesRead <= 0)
{
- WEBRTC_TRACE(kTraceStream, kTraceFile, _id,
- "ReadPCMData: end of file");
+ LOG(LS_VERBOSE) << "ReadPCMData: end of file";
return -1;
}
_playoutPositionMs += 10;
@@ -1317,8 +1265,7 @@
(_codecId != kCodecL16_16kHz) &&
(_codecId != kCodecL16_32Khz))
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "CodecInst is not 8KHz PCM or 16KHz PCM!");
+ LOG(LS_ERROR) << "CodecInst is not 8KHz PCM or 16KHz PCM!";
return -1;
}
_writing = true;
@@ -1330,13 +1277,13 @@
const int8_t* buffer,
const size_t dataLength)
{
- WEBRTC_TRACE(kTraceStream, kTraceFile, _id,
- "ModuleFileUtility::WritePCMData(out= 0x%x, buf= 0x%x, "
- "dataLen= %" PRIuS ")", &out, buffer, dataLength);
+ LOG(LS_VERBOSE) << "ModuleFileUtility::WritePCMData(out= " << &out
+ << ", buf= " << static_cast<const void*>(buffer)
+ << ", dataLen= " << dataLength << ")";
if(buffer == NULL)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id, "buffer NULL");
+ LOG(LS_ERROR) << "buffer NULL";
}
if(!out.Write(buffer, dataLength))
@@ -1350,13 +1297,12 @@
int32_t ModuleFileUtility::codec_info(CodecInst& codecInst)
{
- WEBRTC_TRACE(kTraceStream, kTraceFile, _id,
- "ModuleFileUtility::codec_info(codecInst= 0x%x)", &codecInst);
+ LOG(LS_VERBOSE) << "ModuleFileUtility::codec_info(codecInst= " << &codecInst
+ << ")";
if(!_reading && !_writing)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "CodecInst: not currently reading audio file!");
+ LOG(LS_ERROR) << "CodecInst: not currently reading audio file!";
return -1;
}
memcpy(&codecInst,&codec_info_,sizeof(CodecInst));
@@ -1437,7 +1383,7 @@
if(fileName == NULL)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id, "filename NULL");
+ LOG(LS_ERROR) << "filename NULL";
return -1;
}
@@ -1445,21 +1391,18 @@
struct stat file_size;
if(stat(fileName,&file_size) == -1)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "failed to retrieve file size with stat!");
+ LOG(LS_ERROR) << "failed to retrieve file size with stat!";
return -1;
}
FileWrapper* inStreamObj = FileWrapper::Create();
if(inStreamObj == NULL)
{
- WEBRTC_TRACE(kTraceMemory, kTraceFile, _id,
- "failed to create InStream object!");
+ LOG(LS_INFO) << "failed to create InStream object!";
return -1;
}
if (!inStreamObj->OpenFile(fileName, true)) {
delete inStreamObj;
- WEBRTC_TRACE(kTraceError, kTraceFile, _id, "failed to open file %s!",
- fileName);
+ LOG(LS_ERROR) << "failed to open file " << fileName << "!";
return -1;
}
@@ -1469,8 +1412,7 @@
{
if(ReadWavHeader(*inStreamObj) == -1)
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "failed to read WAV file header!");
+ LOG(LS_ERROR) << "failed to read WAV file header!";
return -1;
}
time_in_ms = ((file_size.st_size - 44) /
@@ -1534,13 +1476,11 @@
}
case kFileFormatPreencodedFile:
{
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "cannot determine duration of Pre-Encoded file!");
+ LOG(LS_ERROR) << "cannot determine duration of Pre-Encoded file!";
break;
}
default:
- WEBRTC_TRACE(kTraceError, kTraceFile, _id,
- "unsupported file format %d!", fileFormat);
+ LOG(LS_ERROR) << "unsupported file format " << fileFormat << "!";
break;
}
inStreamObj->CloseFile();
@@ -1550,8 +1490,7 @@
uint32_t ModuleFileUtility::PlayoutPositionMs()
{
- WEBRTC_TRACE(kTraceStream, kTraceFile, _id,
- "ModuleFileUtility::PlayoutPosition()");
+ LOG(LS_VERBOSE) << "ModuleFileUtility::PlayoutPosition()";
return _reading ? _playoutPositionMs : 0;
}
diff --git a/modules/media_file/media_file_utility.h b/modules/media_file/media_file_utility.h
index 52cd807..8139a7c 100644
--- a/modules/media_file/media_file_utility.h
+++ b/modules/media_file/media_file_utility.h
@@ -25,7 +25,7 @@
{
public:
- ModuleFileUtility(const int32_t id);
+ ModuleFileUtility();
~ModuleFileUtility();
// Prepare for playing audio from stream.
@@ -257,8 +257,6 @@
// chunks if reading WAV.
size_t _readSizeBytes;
- int32_t _id;
-
uint32_t _stopPointInMs;
uint32_t _startPointInMs;
uint32_t _playoutPositionMs;