Remove the deprecated kTraceModuleCall trace from media file module.

Review URL: https://webrtc-codereview.appspot.com/392016

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1722 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
xians@webrtc.org 2012-02-20 08:37:49 +00:00
parent 56cfe80c74
commit 03039d56e6
2 changed files with 1 additions and 133 deletions

View File

@ -27,13 +27,11 @@
namespace webrtc {
MediaFile* MediaFile::CreateMediaFile(const WebRtc_Word32 id)
{
WEBRTC_TRACE(kTraceModuleCall, kTraceFile, id, "CreateMediaFile()");
return new MediaFileImpl(id);
}
void MediaFile::DestroyMediaFile(MediaFile* module)
{
WEBRTC_TRACE(kTraceModuleCall, kTraceFile, -1, "DestroyMediaFile()");
delete static_cast<MediaFileImpl*>(module);
}
@ -96,8 +94,6 @@ MediaFileImpl::~MediaFileImpl()
WebRtc_Word32 MediaFileImpl::ChangeUniqueId(const WebRtc_Word32 id)
{
WEBRTC_TRACE(kTraceModuleCall, kTraceFile, _id, "ChangeUniqueId(new id:%d)",
id);
_id = id;
return 0;
}
@ -415,18 +411,6 @@ WebRtc_Word32 MediaFileImpl::StartPlayingFile(
const WebRtc_UWord32 startPointMs,
const WebRtc_UWord32 stopPointMs)
{
WEBRTC_TRACE(
kTraceModuleCall,
kTraceFile,
_id,
"MediaFileImpl::StartPlayingFile: fileName= %s, notify= %d, loop= %d,\
format= %d, codecInst=%s, start= %d, stop= %d",
(fileName == NULL) ? "NULL" : fileName,
notificationTimeMs,
loop,
format,(codecInst == NULL) ? "NULL" : codecInst->plname,
startPointMs,
stopPointMs);
if(!ValidFileName(fileName))
{
@ -517,18 +501,6 @@ WebRtc_Word32 MediaFileImpl::StartPlayingStream(
const WebRtc_UWord32 stopPointMs,
bool videoOnly)
{
WEBRTC_TRACE(
kTraceModuleCall,
kTraceFile,
_id,
"MediaFileImpl::StartPlayingStream(stream=0x%x, notify=%ld, format=%d,\
codecInst=%s, start=%ld, stop=%ld",
&stream,
notificationTimeMs,
format,
(codecInst == NULL) ? "NULL" : codecInst->plname,
startPointMs,
stopPointMs);
if(!ValidFileFormat(format,codecInst))
{
@ -680,8 +652,6 @@ WebRtc_Word32 MediaFileImpl::StartPlayingStream(
WebRtc_Word32 MediaFileImpl::StopPlaying()
{
WEBRTC_TRACE(kTraceModuleCall, kTraceFile, _id,
"MediaFileImpl::StopPlaying()");
CriticalSectionScoped lock(_crit);
_isStereo = false;
@ -918,16 +888,6 @@ WebRtc_Word32 MediaFileImpl::StartRecordingFile(
const WebRtc_UWord32 maxSizeBytes,
bool videoOnly)
{
WEBRTC_TRACE(kTraceModuleCall,
kTraceFile,
_id,
"MediaFileImpl::StartRecordingFile(fileName= %s, format= %d,\
codecInst= %s, notificationMs= %d, maxSize= %d",
(fileName == NULL) ? "NULL" : fileName,
format,
(codecInst.plname[0] == '\0') ? "NULL" : codecInst.plname,
notificationTimeMs,
maxSizeBytes);
if(!ValidFileName(fileName))
{
@ -1003,14 +963,6 @@ WebRtc_Word32 MediaFileImpl::StartRecordingStream(
const WebRtc_UWord32 notificationTimeMs,
bool videoOnly)
{
WEBRTC_TRACE(
kTraceModuleCall,
kTraceFile,
_id,
"MediaFileImpl::StartRecordingStream: format= %d, codec= %s,\
notify= %d",
format,(codecInst.plname[0] == '\0') ? "NULL" : codecInst.plname,
notificationTimeMs);
// Check codec info
if(!ValidFileFormat(format,&codecInst))
@ -1173,8 +1125,6 @@ WebRtc_Word32 MediaFileImpl::StartRecordingStream(
WebRtc_Word32 MediaFileImpl::StopRecording()
{
WEBRTC_TRACE(kTraceModuleCall, kTraceFile, _id,
"MediaFileImpl::StopRecording()");
CriticalSectionScoped lock(_crit);
if(!_recordingActive)
@ -1232,8 +1182,6 @@ bool MediaFileImpl::IsRecording()
WebRtc_Word32 MediaFileImpl::RecordDurationMs(WebRtc_UWord32& durationMs)
{
WEBRTC_TRACE(kTraceModuleCall, kTraceFile, _id,
"MediaFileImpl::RecordDurationMs()");
CriticalSectionScoped lock(_crit);
if(!_recordingActive)
@ -1254,9 +1202,6 @@ bool MediaFileImpl::IsStereo()
WebRtc_Word32 MediaFileImpl::SetModuleFileCallback(FileCallback* callback)
{
WEBRTC_TRACE(kTraceModuleCall, kTraceFile, _id,
"MediaFileImpl::SetModuleFileCallback(callback= 0x%x)",
&callback);
CriticalSectionScoped lock(_callbackCrit);
@ -1269,14 +1214,6 @@ WebRtc_Word32 MediaFileImpl::FileDurationMs(const WebRtc_Word8* fileName,
const FileFormats format,
const WebRtc_UWord32 freqInHz)
{
WEBRTC_TRACE(
kTraceModuleCall,
kTraceFile,
_id,
"MediaFileImpl::FileDurationMs(%s, -, format= %d, freqInHz= %d)",
(fileName == NULL) ? "NULL" : fileName,
format,
freqInHz);
if(!ValidFileName(fileName))
{
@ -1310,8 +1247,6 @@ WebRtc_Word32 MediaFileImpl::FileDurationMs(const WebRtc_Word8* fileName,
WebRtc_Word32 MediaFileImpl::PlayoutPositionMs(WebRtc_UWord32& positionMs) const
{
WEBRTC_TRACE(kTraceModuleCall, kTraceFile, _id,
"MediaFileImpl::PlayoutPositionMS(?)");
CriticalSectionScoped lock(_crit);
if(!_playingActive)
{
@ -1324,8 +1259,6 @@ WebRtc_Word32 MediaFileImpl::PlayoutPositionMs(WebRtc_UWord32& positionMs) const
WebRtc_Word32 MediaFileImpl::codec_info(CodecInst& codecInst) const
{
WEBRTC_TRACE(kTraceModuleCall, kTraceFile, _id,
"MediaFileImpl::codec_info(CodecInst= 0x%x)", &codecInst);
CriticalSectionScoped lock(_crit);
if(!_playingActive && !_recordingActive)
{
@ -1346,8 +1279,6 @@ WebRtc_Word32 MediaFileImpl::codec_info(CodecInst& codecInst) const
WebRtc_Word32 MediaFileImpl::VideoCodecInst(VideoCodec& codecInst) const
{
WEBRTC_TRACE(kTraceModuleCall, kTraceFile, _id,
"MediaFileImpl::VideoCodecInst(CodecInst= 0x%x)", &codecInst);
CriticalSectionScoped lock(_crit);
if(!_playingActive && !_recordingActive)
{

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
@ -452,8 +452,6 @@ WebRtc_Word32 ModuleFileUtility::ReadWavHeader(InStream& wav)
bool fmtFound = false;
WebRtc_Word8 dummyRead;
WEBRTC_TRACE(kTraceModuleCall, kTraceFile, _id,
"ModuleFileUtility::ReadWavHeader(wav= 0x%x)", &wav);
_dataSize = 0;
len = wav.Read(&RIFFheaderObj, sizeof(WAVE_RIFF_header));
@ -636,18 +634,6 @@ WebRtc_Word32 ModuleFileUtility::ReadWavHeader(InStream& wav)
_readSizeBytes = (_wavFormatObj.nSamplesPerSec/100) *
_wavFormatObj.nChannels * (_wavFormatObj.nBitsPerSample / 8);
}
WEBRTC_TRACE(
kTraceModuleCall,
kTraceFile,
_id,
"ModuleFileUtility::ReadWavHeader: format=PCM %d KHz, sampleSize=%d,\
nChannels=%d, readSize=%d, dataSize=%d, rate=%d",
_wavFormatObj.nSamplesPerSec/1000,
_wavFormatObj.nBitsPerSample,
_wavFormatObj.nChannels,
_readSizeBytes,
_dataSize,
_wavFormatObj.nAvgBytesPerSec * 8);
return 0;
}
@ -743,14 +729,6 @@ WebRtc_Word32 ModuleFileUtility::InitWavReading(InStream& wav,
const WebRtc_UWord32 start,
const WebRtc_UWord32 stop)
{
WEBRTC_TRACE(
kTraceModuleCall,
kTraceFile,
_id,
"ModuleFileUtility::InitWavReading(wav= 0x%x, start= %d, stop=%d)",
&wav,
start,
stop);
_reading = false;
@ -799,9 +777,6 @@ WebRtc_Word32 ModuleFileUtility::InitWavReading(InStream& wav,
}
_bytesPerSample = _wavFormatObj.nBitsPerSample / 8;
WEBRTC_TRACE(kTraceModuleCall, kTraceFile, _id,
"WAV header: codecName= %s, sampleSize= %d, freq= %d",
codec_info_.plname, _bytesPerSample, codec_info_.plfreq);
_startPointInMs = start;
_stopPointInMs = stop;
@ -1071,9 +1046,6 @@ WebRtc_Word32 ModuleFileUtility::ReadWavData(
WebRtc_Word32 ModuleFileUtility::InitWavWriting(OutStream& wav,
const CodecInst& codecInst)
{
WEBRTC_TRACE(kTraceModuleCall, kTraceFile, _id,
"ModuleFileUtility::InitWavWriting(wav= 0x%x, codec=%s)",
&wav, codecInst.plname);
if(set_codec_info(codecInst) != 0)
{
@ -1159,17 +1131,6 @@ WebRtc_Word32 ModuleFileUtility::WriteWavHeader(
const WebRtc_UWord32 format,
const WebRtc_UWord32 lengthInBytes)
{
WEBRTC_TRACE(
kTraceModuleCall,
kTraceFile,
_id,
"ModuleFileUtility::WriteWavHeader(format= PCM %d KHz,\
bytesPerSample= %d, channels= %d, format= %d, dataLength= %d)",
freq / 1000,
bytesPerSample,
channels,
format,
lengthInBytes);
// Frame size in bytes for 10 ms of audio.
// TODO (hellner): 44.1 kHz has 440 samples frame size. Doesn't seem to
@ -1302,9 +1263,6 @@ WebRtc_Word32 ModuleFileUtility::UpdateWavHeader(OutStream& wav)
WebRtc_Word32 ModuleFileUtility::InitPreEncodedReading(InStream& in,
const CodecInst& cinst)
{
WEBRTC_TRACE(kTraceModuleCall, kTraceFile, _id,
"ModuleFileUtility::InitPreEncodedReading(in=0x%x, codec='%s')",
&in, cinst.plname);
WebRtc_UWord8 preEncodedID;
in.Read(&preEncodedID, 1);
@ -1384,13 +1342,6 @@ WebRtc_Word32 ModuleFileUtility::InitPreEncodedWriting(
OutStream& out,
const CodecInst& codecInst)
{
WEBRTC_TRACE(
kTraceModuleCall,
kTraceFile,
_id,
"ModuleFileUtility::InitFormatedWriting(out=0x%x, codecInst= %s)",
&out,
codecInst.plname);
if(set_codec_info(codecInst) != 0)
{
@ -2105,9 +2056,6 @@ WebRtc_Word32 ModuleFileUtility::ReadPCMData(InStream& pcm,
WebRtc_Word32 ModuleFileUtility::InitPCMWriting(OutStream& out,
WebRtc_UWord32 freq)
{
WEBRTC_TRACE(kTraceModuleCall, kTraceFile, _id,
"ModuleFileUtility::InitPCMWriting(out=0x%x, freq= %ld)", &out,
freq);
if(freq == 8000)
{
@ -2199,9 +2147,6 @@ WebRtc_Word32 ModuleFileUtility::codec_info(CodecInst& codecInst)
WebRtc_Word32 ModuleFileUtility::set_codec_info(const CodecInst& codecInst)
{
WEBRTC_TRACE(kTraceModuleCall, kTraceFile, _id,
"ModuleFileUtility::set_codec_info(codecName= %s)",
codecInst.plname);
_codecId = kCodecNoCodec;
if(STR_CASE_CMP(codecInst.plname, "PCMU") == 0)
@ -2369,14 +2314,6 @@ WebRtc_Word32 ModuleFileUtility::FileDurationMs(const WebRtc_Word8* fileName,
const FileFormats fileFormat,
const WebRtc_UWord32 freqInHz)
{
WEBRTC_TRACE(
kTraceModuleCall,
kTraceFile,
_id,
"ModuleFileUtility::FileDuration(%s, format= %d, frequency %d)",
fileName,
fileFormat,
freqInHz);
if(fileName == NULL)
{