WebRtc_Word32 -> int32_t in utility/

BUG=314

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3797 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org
2013-04-09 13:32:55 +00:00
parent 0ea11c1768
commit c75102eba7
19 changed files with 360 additions and 366 deletions

View File

@ -29,7 +29,7 @@ public:
// Note: will return NULL for video file formats (e.g. AVI) if the flag
// WEBRTC_MODULE_UTILITY_VIDEO is not defined.
static FilePlayer* CreateFilePlayer(const WebRtc_UWord32 instanceID,
static FilePlayer* CreateFilePlayer(const uint32_t instanceID,
const FileFormats fileFormat);
static void DestroyFilePlayer(FilePlayer* player);
@ -43,65 +43,65 @@ public:
int frequencyInHz) = 0;
// Register callback for receiving file playing notifications.
virtual WebRtc_Word32 RegisterModuleFileCallback(
virtual int32_t RegisterModuleFileCallback(
FileCallback* callback) = 0;
// API for playing audio from fileName to channel.
// Note: codecInst is used for pre-encoded files.
virtual WebRtc_Word32 StartPlayingFile(
virtual int32_t StartPlayingFile(
const char* fileName,
bool loop,
WebRtc_UWord32 startPosition,
uint32_t startPosition,
float volumeScaling,
WebRtc_UWord32 notification,
WebRtc_UWord32 stopPosition = 0,
uint32_t notification,
uint32_t stopPosition = 0,
const CodecInst* codecInst = NULL) = 0;
// Note: codecInst is used for pre-encoded files.
virtual WebRtc_Word32 StartPlayingFile(
virtual int32_t StartPlayingFile(
InStream& sourceStream,
WebRtc_UWord32 startPosition,
uint32_t startPosition,
float volumeScaling,
WebRtc_UWord32 notification,
WebRtc_UWord32 stopPosition = 0,
uint32_t notification,
uint32_t stopPosition = 0,
const CodecInst* codecInst = NULL) = 0;
virtual WebRtc_Word32 StopPlayingFile() = 0;
virtual int32_t StopPlayingFile() = 0;
virtual bool IsPlayingFile() const = 0;
virtual WebRtc_Word32 GetPlayoutPosition(WebRtc_UWord32& durationMs) = 0;
virtual int32_t GetPlayoutPosition(uint32_t& durationMs) = 0;
// Set audioCodec to the currently used audio codec.
virtual WebRtc_Word32 AudioCodec(CodecInst& audioCodec) const = 0;
virtual int32_t AudioCodec(CodecInst& audioCodec) const = 0;
virtual WebRtc_Word32 Frequency() const = 0;
virtual int32_t Frequency() const = 0;
// Note: scaleFactor is in the range [0.0 - 2.0]
virtual WebRtc_Word32 SetAudioScaling(float scaleFactor) = 0;
virtual int32_t SetAudioScaling(float scaleFactor) = 0;
// Return the time in ms until next video frame should be pulled (by
// calling GetVideoFromFile(..)).
// Note: this API reads one video frame from file. This means that it should
// be called exactly once per GetVideoFromFile(..) API call.
virtual WebRtc_Word32 TimeUntilNextVideoFrame() { return -1;}
virtual int32_t TimeUntilNextVideoFrame() { return -1;}
virtual WebRtc_Word32 StartPlayingVideoFile(
virtual int32_t StartPlayingVideoFile(
const char* /*fileName*/,
bool /*loop*/,
bool /*videoOnly*/) { return -1;}
virtual WebRtc_Word32 video_codec_info(VideoCodec& /*videoCodec*/) const
virtual int32_t video_codec_info(VideoCodec& /*videoCodec*/) const
{return -1;}
virtual WebRtc_Word32 GetVideoFromFile(I420VideoFrame& /*videoFrame*/)
virtual int32_t GetVideoFromFile(I420VideoFrame& /*videoFrame*/)
{ return -1;}
// Same as GetVideoFromFile(). videoFrame will have the resolution specified
// by the width outWidth and height outHeight in pixels.
virtual WebRtc_Word32 GetVideoFromFile(I420VideoFrame& /*videoFrame*/,
const WebRtc_UWord32 /*outWidth*/,
const WebRtc_UWord32 /*outHeight*/)
virtual int32_t GetVideoFromFile(I420VideoFrame& /*videoFrame*/,
const uint32_t /*outWidth*/,
const uint32_t /*outHeight*/)
{return -1;}
protected:
virtual ~FilePlayer() {}

View File

@ -28,40 +28,40 @@ public:
// Note: will return NULL for video file formats (e.g. AVI) if the flag
// WEBRTC_MODULE_UTILITY_VIDEO is not defined.
static FileRecorder* CreateFileRecorder(const WebRtc_UWord32 instanceID,
static FileRecorder* CreateFileRecorder(const uint32_t instanceID,
const FileFormats fileFormat);
static void DestroyFileRecorder(FileRecorder* recorder);
virtual WebRtc_Word32 RegisterModuleFileCallback(
virtual int32_t RegisterModuleFileCallback(
FileCallback* callback) = 0;
virtual FileFormats RecordingFileFormat() const = 0;
virtual WebRtc_Word32 StartRecordingAudioFile(
virtual int32_t StartRecordingAudioFile(
const char* fileName,
const CodecInst& codecInst,
WebRtc_UWord32 notification,
uint32_t notification,
ACMAMRPackingFormat amrFormat = AMRFileStorage) = 0;
virtual WebRtc_Word32 StartRecordingAudioFile(
virtual int32_t StartRecordingAudioFile(
OutStream& destStream,
const CodecInst& codecInst,
WebRtc_UWord32 notification,
uint32_t notification,
ACMAMRPackingFormat amrFormat = AMRFileStorage) = 0;
// Stop recording.
// Note: this API is for both audio and video.
virtual WebRtc_Word32 StopRecording() = 0;
virtual int32_t StopRecording() = 0;
// Return true if recording.
// Note: this API is for both audio and video.
virtual bool IsRecording() const = 0;
virtual WebRtc_Word32 codec_info(CodecInst& codecInst) const = 0;
virtual int32_t codec_info(CodecInst& codecInst) const = 0;
// Write frame to file. Frame should contain 10ms of un-ecoded audio data.
virtual WebRtc_Word32 RecordAudioToFile(
virtual int32_t RecordAudioToFile(
const AudioFrame& frame,
const TickTime* playoutTS = NULL) = 0;
@ -71,7 +71,7 @@ public:
// Only video data will be recorded if videoOnly is true. amrFormat
// specifies the amr/amrwb storage format.
// Note: the file format is AVI.
virtual WebRtc_Word32 StartRecordingVideoFile(
virtual int32_t StartRecordingVideoFile(
const char* fileName,
const CodecInst& audioCodecInst,
const VideoCodec& videoCodecInst,
@ -79,7 +79,7 @@ public:
bool videoOnly = false) = 0;
// Record the video frame in videoFrame to AVI file.
virtual WebRtc_Word32 RecordVideoToFile(
virtual int32_t RecordVideoToFile(
const I420VideoFrame& videoFrame) = 0;
protected:

View File

@ -22,11 +22,11 @@ public:
static ProcessThread* CreateProcessThread();
static void DestroyProcessThread(ProcessThread* module);
virtual WebRtc_Word32 Start() = 0;
virtual WebRtc_Word32 Stop() = 0;
virtual int32_t Start() = 0;
virtual int32_t Stop() = 0;
virtual WebRtc_Word32 RegisterModule(const Module* module) = 0;
virtual WebRtc_Word32 DeRegisterModule(const Module* module) = 0;
virtual int32_t RegisterModule(const Module* module) = 0;
virtual int32_t DeRegisterModule(const Module* module) = 0;
protected:
virtual ~ProcessThread();
};

View File

@ -31,10 +31,10 @@ public:
// Open the file fileNameUTF8 for writing RTP/RTCP packets.
// Note: this API also adds the rtpplay header.
virtual WebRtc_Word32 Start(const char* fileNameUTF8) = 0;
virtual int32_t Start(const char* fileNameUTF8) = 0;
// Close the existing file. No more packets will be recorded.
virtual WebRtc_Word32 Stop() = 0;
virtual int32_t Stop() = 0;
// Return true if a file is open for recording RTP/RTCP packets.
virtual bool IsActive() const = 0;
@ -42,8 +42,8 @@ public:
// Writes the RTP/RTCP packet in packet with length packetLength in bytes.
// Note: packet should contain the RTP/RTCP part of the packet. I.e. the
// first bytes of packet should be the RTP/RTCP header.
virtual WebRtc_Word32 DumpPacket(const WebRtc_UWord8* packet,
WebRtc_UWord16 packetLength) = 0;
virtual int32_t DumpPacket(const uint8_t* packet,
uint16_t packetLength) = 0;
protected:
virtual ~RtpDump();