WebRtc_Word32 => int32_t etc. in audio_coding/
BUG=314 Review URL: https://webrtc-codereview.appspot.com/1271006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3789 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -31,12 +31,12 @@ class AudioPacketizationCallback {
|
||||
public:
|
||||
virtual ~AudioPacketizationCallback() {}
|
||||
|
||||
virtual WebRtc_Word32 SendData(
|
||||
virtual int32_t SendData(
|
||||
FrameType frame_type,
|
||||
WebRtc_UWord8 payload_type,
|
||||
WebRtc_UWord32 timestamp,
|
||||
const WebRtc_UWord8* payload_data,
|
||||
WebRtc_UWord16 payload_len_bytes,
|
||||
uint8_t payload_type,
|
||||
uint32_t timestamp,
|
||||
const uint8_t* payload_data,
|
||||
uint16_t payload_len_bytes,
|
||||
const RTPFragmentationHeader* fragmentation) = 0;
|
||||
};
|
||||
|
||||
@ -45,8 +45,8 @@ class AudioCodingFeedback {
|
||||
public:
|
||||
virtual ~AudioCodingFeedback() {}
|
||||
|
||||
virtual WebRtc_Word32 IncomingDtmf(const WebRtc_UWord8 digit_dtmf,
|
||||
const bool end) = 0;
|
||||
virtual int32_t IncomingDtmf(const uint8_t digit_dtmf,
|
||||
const bool end) = 0;
|
||||
};
|
||||
|
||||
// Callback class used for reporting VAD decision
|
||||
@ -54,7 +54,7 @@ class ACMVADCallback {
|
||||
public:
|
||||
virtual ~ACMVADCallback() {}
|
||||
|
||||
virtual WebRtc_Word32 InFrameType(WebRtc_Word16 frameType) = 0;
|
||||
virtual int32_t InFrameType(int16_t frameType) = 0;
|
||||
};
|
||||
|
||||
// Callback class used for reporting receiver statistics
|
||||
@ -62,12 +62,12 @@ class ACMVQMonCallback {
|
||||
public:
|
||||
virtual ~ACMVQMonCallback() {}
|
||||
|
||||
virtual WebRtc_Word32 NetEqStatistics(
|
||||
const WebRtc_Word32 id, // current ACM id
|
||||
const WebRtc_UWord16 MIUsValid, // valid voice duration in ms
|
||||
const WebRtc_UWord16 MIUsReplaced, // concealed voice duration in ms
|
||||
const WebRtc_UWord8 eventFlags, // concealed voice flags
|
||||
const WebRtc_UWord16 delayMS) = 0; // average delay in ms
|
||||
virtual int32_t NetEqStatistics(
|
||||
const int32_t id, // current ACM id
|
||||
const uint16_t MIUsValid, // valid voice duration in ms
|
||||
const uint16_t MIUsReplaced, // concealed voice duration in ms
|
||||
const uint8_t eventFlags, // concealed voice flags
|
||||
const uint16_t delayMS) = 0; // average delay in ms
|
||||
};
|
||||
|
||||
class AudioCodingModule: public Module {
|
||||
@ -79,7 +79,7 @@ class AudioCodingModule: public Module {
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Creation and destruction of a ACM
|
||||
//
|
||||
static AudioCodingModule* Create(const WebRtc_Word32 id);
|
||||
static AudioCodingModule* Create(const int32_t id);
|
||||
|
||||
static void Destroy(AudioCodingModule* module);
|
||||
|
||||
@ -88,16 +88,16 @@ class AudioCodingModule: public Module {
|
||||
//
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_UWord8 NumberOfCodecs()
|
||||
// uint8_t NumberOfCodecs()
|
||||
// Returns number of supported codecs.
|
||||
//
|
||||
// Return value:
|
||||
// number of supported codecs.
|
||||
///
|
||||
static WebRtc_UWord8 NumberOfCodecs();
|
||||
static uint8_t NumberOfCodecs();
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 Codec()
|
||||
// int32_t Codec()
|
||||
// Get supported codec with list number.
|
||||
//
|
||||
// Input:
|
||||
@ -111,10 +111,10 @@ class AudioCodingModule: public Module {
|
||||
// -1 if the list number (list_id) is invalid.
|
||||
// 0 if succeeded.
|
||||
//
|
||||
static WebRtc_Word32 Codec(WebRtc_UWord8 list_id, CodecInst* codec);
|
||||
static int32_t Codec(uint8_t list_id, CodecInst* codec);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 Codec()
|
||||
// int32_t Codec()
|
||||
// Get supported codec with the given codec name, sampling frequency, and
|
||||
// a given number of channels.
|
||||
//
|
||||
@ -132,11 +132,11 @@ class AudioCodingModule: public Module {
|
||||
// -1 if no codec matches the given parameters.
|
||||
// 0 if succeeded.
|
||||
//
|
||||
static WebRtc_Word32 Codec(const char* payload_name, CodecInst* codec,
|
||||
int sampling_freq_hz, int channels);
|
||||
static int32_t Codec(const char* payload_name, CodecInst* codec,
|
||||
int sampling_freq_hz, int channels);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 Codec()
|
||||
// int32_t Codec()
|
||||
//
|
||||
// Returns the list number of the given codec name, sampling frequency, and
|
||||
// a given number of channels.
|
||||
@ -151,7 +151,7 @@ class AudioCodingModule: public Module {
|
||||
// if the codec is found, the index of the codec in the list,
|
||||
// -1 if the codec is not found.
|
||||
//
|
||||
static WebRtc_Word32 Codec(const char* payload_name, int sampling_freq_hz,
|
||||
static int32_t Codec(const char* payload_name, int sampling_freq_hz,
|
||||
int channels);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -173,7 +173,7 @@ class AudioCodingModule: public Module {
|
||||
//
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 InitializeSender()
|
||||
// int32_t InitializeSender()
|
||||
// Any encoder-related state of ACM will be initialized to the
|
||||
// same state when ACM is created. This will not interrupt or
|
||||
// effect decoding functionality of ACM. ACM will lose all the
|
||||
@ -184,10 +184,10 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to initialize,
|
||||
// 0 if succeeded.
|
||||
//
|
||||
virtual WebRtc_Word32 InitializeSender() = 0;
|
||||
virtual int32_t InitializeSender() = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 ResetEncoder()
|
||||
// int32_t ResetEncoder()
|
||||
// This API resets the states of encoder. All the encoder settings, such as
|
||||
// send-codec or VAD/DTX, will be preserved.
|
||||
//
|
||||
@ -195,10 +195,10 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to initialize,
|
||||
// 0 if succeeded.
|
||||
//
|
||||
virtual WebRtc_Word32 ResetEncoder() = 0;
|
||||
virtual int32_t ResetEncoder() = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 RegisterSendCodec()
|
||||
// int32_t RegisterSendCodec()
|
||||
// Registers a codec, specified by |send_codec|, as sending codec.
|
||||
// This API can be called multiple of times to register Codec. The last codec
|
||||
// registered overwrites the previous ones.
|
||||
@ -224,7 +224,7 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to initialize,
|
||||
// 0 if succeeded.
|
||||
//
|
||||
virtual WebRtc_Word32 RegisterSendCodec(const CodecInst& send_codec) = 0;
|
||||
virtual int32_t RegisterSendCodec(const CodecInst& send_codec) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// int RegisterSecondarySendCodec()
|
||||
@ -254,7 +254,7 @@ class AudioCodingModule: public Module {
|
||||
virtual void UnregisterSecondarySendCodec() = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 SendCodec()
|
||||
// int32_t SendCodec()
|
||||
// Get parameters for the codec currently registered as send codec.
|
||||
//
|
||||
// Output:
|
||||
@ -264,7 +264,7 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to get send codec,
|
||||
// 0 if succeeded.
|
||||
//
|
||||
virtual WebRtc_Word32 SendCodec(CodecInst* current_send_codec) const = 0;
|
||||
virtual int32_t SendCodec(CodecInst* current_send_codec) const = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// int SecondarySendCodec()
|
||||
@ -280,27 +280,27 @@ class AudioCodingModule: public Module {
|
||||
virtual int SecondarySendCodec(CodecInst* secondary_codec) const = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 SendFrequency()
|
||||
// int32_t SendFrequency()
|
||||
// Get the sampling frequency of the current encoder in Hertz.
|
||||
//
|
||||
// Return value:
|
||||
// positive; sampling frequency [Hz] of the current encoder.
|
||||
// -1 if an error has happened.
|
||||
//
|
||||
virtual WebRtc_Word32 SendFrequency() const = 0;
|
||||
virtual int32_t SendFrequency() const = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 Bitrate()
|
||||
// int32_t Bitrate()
|
||||
// Get encoding bit-rate in bits per second.
|
||||
//
|
||||
// Return value:
|
||||
// positive; encoding rate in bits/sec,
|
||||
// -1 if an error is happened.
|
||||
//
|
||||
virtual WebRtc_Word32 SendBitrate() const = 0;
|
||||
virtual int32_t SendBitrate() const = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 SetReceivedEstimatedBandwidth()
|
||||
// int32_t SetReceivedEstimatedBandwidth()
|
||||
// Set available bandwidth [bits/sec] of the up-link channel.
|
||||
// This information is used for traffic shaping, and is currently only
|
||||
// supported if iSAC is the send codec.
|
||||
@ -312,11 +312,11 @@ class AudioCodingModule: public Module {
|
||||
// -1 if error occurred in setting the bandwidth,
|
||||
// 0 bandwidth is set successfully.
|
||||
//
|
||||
virtual WebRtc_Word32 SetReceivedEstimatedBandwidth(
|
||||
const WebRtc_Word32 bw) = 0;
|
||||
virtual int32_t SetReceivedEstimatedBandwidth(
|
||||
const int32_t bw) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 RegisterTransportCallback()
|
||||
// int32_t RegisterTransportCallback()
|
||||
// Register a transport callback which will be called to deliver
|
||||
// the encoded buffers whenever Process() is called and a
|
||||
// bit-stream is ready.
|
||||
@ -331,11 +331,11 @@ class AudioCodingModule: public Module {
|
||||
// -1 if the transport callback could not be registered
|
||||
// 0 if registration is successful.
|
||||
//
|
||||
virtual WebRtc_Word32 RegisterTransportCallback(
|
||||
virtual int32_t RegisterTransportCallback(
|
||||
AudioPacketizationCallback* transport) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 Add10MsData()
|
||||
// int32_t Add10MsData()
|
||||
// Add 10MS of raw (PCM) audio data to the encoder. If the sampling
|
||||
// frequency of the audio does not match the sampling frequency of the
|
||||
// current encoder ACM will resample the audio.
|
||||
@ -352,14 +352,14 @@ class AudioCodingModule: public Module {
|
||||
// < -1 to add the frame to the buffer n samples had to be
|
||||
// overwritten, -n is the return value in this case.
|
||||
//
|
||||
virtual WebRtc_Word32 Add10MsData(const AudioFrame& audio_frame) = 0;
|
||||
virtual int32_t Add10MsData(const AudioFrame& audio_frame) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// (FEC) Forward Error Correction
|
||||
//
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 SetFECStatus(const bool enable)
|
||||
// int32_t SetFECStatus(const bool enable)
|
||||
// configure FEC status i.e. on/off.
|
||||
//
|
||||
// RFC 2198 describes a solution which has a single payload type which
|
||||
@ -380,7 +380,7 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to set FEC status,
|
||||
// 0 if succeeded.
|
||||
//
|
||||
virtual WebRtc_Word32 SetFECStatus(const bool enable_fec) = 0;
|
||||
virtual int32_t SetFECStatus(const bool enable_fec) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// bool FECStatus()
|
||||
@ -397,7 +397,7 @@ class AudioCodingModule: public Module {
|
||||
//
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 SetVAD()
|
||||
// int32_t SetVAD()
|
||||
// If DTX is enabled & the codec does not have internal DTX/VAD
|
||||
// WebRtc VAD will be automatically enabled and |enable_vad| is ignored.
|
||||
//
|
||||
@ -422,12 +422,12 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to set up VAD/DTX,
|
||||
// 0 if succeeded.
|
||||
//
|
||||
virtual WebRtc_Word32 SetVAD(const bool enable_dtx = true,
|
||||
virtual int32_t SetVAD(const bool enable_dtx = true,
|
||||
const bool enable_vad = false,
|
||||
const ACMVADMode vad_mode = VADNormal) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 VAD()
|
||||
// int32_t VAD()
|
||||
// Get VAD status.
|
||||
//
|
||||
// Outputs:
|
||||
@ -441,11 +441,11 @@ class AudioCodingModule: public Module {
|
||||
// -1 if fails to retrieve the setting of DTX/VAD,
|
||||
// 0 if succeeded.
|
||||
//
|
||||
virtual WebRtc_Word32 VAD(bool* dtx_enabled, bool* vad_enabled,
|
||||
virtual int32_t VAD(bool* dtx_enabled, bool* vad_enabled,
|
||||
ACMVADMode* vad_mode) const = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 ReplaceInternalDTXWithWebRtc()
|
||||
// int32_t ReplaceInternalDTXWithWebRtc()
|
||||
// Used to replace codec internal DTX scheme with WebRtc. This is only
|
||||
// supported for G729, where this call replaces AnnexB with WebRtc DTX.
|
||||
//
|
||||
@ -458,11 +458,11 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to replace codec internal DTX with WebRtc,
|
||||
// 0 if succeeded.
|
||||
//
|
||||
virtual WebRtc_Word32 ReplaceInternalDTXWithWebRtc(
|
||||
virtual int32_t ReplaceInternalDTXWithWebRtc(
|
||||
const bool use_webrtc_dtx = false) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 IsInternalDTXReplacedWithWebRtc()
|
||||
// int32_t IsInternalDTXReplacedWithWebRtc()
|
||||
// Get status if the codec internal DTX (when such exists) is replaced with
|
||||
// WebRtc DTX. This is only supported for G729.
|
||||
//
|
||||
@ -475,11 +475,11 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to determine if codec internal DTX is replaced with WebRtc,
|
||||
// 0 if succeeded.
|
||||
//
|
||||
virtual WebRtc_Word32 IsInternalDTXReplacedWithWebRtc(
|
||||
virtual int32_t IsInternalDTXReplacedWithWebRtc(
|
||||
bool* uses_webrtc_dtx) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 RegisterVADCallback()
|
||||
// int32_t RegisterVADCallback()
|
||||
// Call this method to register a callback function which is called
|
||||
// any time that ACM encounters an empty frame. That is a frame which is
|
||||
// recognized inactive. Depending on the codec WebRtc VAD or internal codec
|
||||
@ -492,14 +492,14 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to register the callback function.
|
||||
// 0 if the callback function is registered successfully.
|
||||
//
|
||||
virtual WebRtc_Word32 RegisterVADCallback(ACMVADCallback* vad_callback) = 0;
|
||||
virtual int32_t RegisterVADCallback(ACMVADCallback* vad_callback) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Receiver
|
||||
//
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 InitializeReceiver()
|
||||
// int32_t InitializeReceiver()
|
||||
// Any decoder-related state of ACM will be initialized to the
|
||||
// same state when ACM is created. This will not interrupt or
|
||||
// effect encoding functionality of ACM. ACM would lose all the
|
||||
@ -511,10 +511,10 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to initialize,
|
||||
// 0 if succeeded.
|
||||
//
|
||||
virtual WebRtc_Word32 InitializeReceiver() = 0;
|
||||
virtual int32_t InitializeReceiver() = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 ResetDecoder()
|
||||
// int32_t ResetDecoder()
|
||||
// This API resets the states of decoders. ACM will not lose any
|
||||
// decoder-related settings, such as registered codecs.
|
||||
//
|
||||
@ -522,29 +522,29 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to initialize,
|
||||
// 0 if succeeded.
|
||||
//
|
||||
virtual WebRtc_Word32 ResetDecoder() = 0;
|
||||
virtual int32_t ResetDecoder() = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 ReceiveFrequency()
|
||||
// int32_t ReceiveFrequency()
|
||||
// Get sampling frequency of the last received payload.
|
||||
//
|
||||
// Return value:
|
||||
// non-negative the sampling frequency in Hertz.
|
||||
// -1 if an error has occurred.
|
||||
//
|
||||
virtual WebRtc_Word32 ReceiveFrequency() const = 0;
|
||||
virtual int32_t ReceiveFrequency() const = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 PlayoutFrequency()
|
||||
// int32_t PlayoutFrequency()
|
||||
// Get sampling frequency of audio played out.
|
||||
//
|
||||
// Return value:
|
||||
// the sampling frequency in Hertz.
|
||||
//
|
||||
virtual WebRtc_Word32 PlayoutFrequency() const = 0;
|
||||
virtual int32_t PlayoutFrequency() const = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 RegisterReceiveCodec()
|
||||
// int32_t RegisterReceiveCodec()
|
||||
// Register possible decoders, can be called multiple times for
|
||||
// codecs, CNG-NB, CNG-WB, CNG-SWB, AVT and RED.
|
||||
//
|
||||
@ -557,11 +557,11 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to register the codec
|
||||
// 0 if the codec registered successfully.
|
||||
//
|
||||
virtual WebRtc_Word32 RegisterReceiveCodec(
|
||||
virtual int32_t RegisterReceiveCodec(
|
||||
const CodecInst& receive_codec) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 UnregisterReceiveCodec()
|
||||
// int32_t UnregisterReceiveCodec()
|
||||
// Unregister the codec currently registered with a specific payload type
|
||||
// from the list of possible receive codecs.
|
||||
//
|
||||
@ -573,11 +573,11 @@ class AudioCodingModule: public Module {
|
||||
// -1 if fails to unregister.
|
||||
// 0 if the given codec is successfully unregistered.
|
||||
//
|
||||
virtual WebRtc_Word32 UnregisterReceiveCodec(
|
||||
const WebRtc_Word16 payload_type) = 0;
|
||||
virtual int32_t UnregisterReceiveCodec(
|
||||
const int16_t payload_type) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 ReceiveCodec()
|
||||
// int32_t ReceiveCodec()
|
||||
// Get the codec associated with last received payload.
|
||||
//
|
||||
// Output:
|
||||
@ -589,10 +589,10 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to retrieve the codec,
|
||||
// 0 if the codec is successfully retrieved.
|
||||
//
|
||||
virtual WebRtc_Word32 ReceiveCodec(CodecInst* curr_receive_codec) const = 0;
|
||||
virtual int32_t ReceiveCodec(CodecInst* curr_receive_codec) const = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 IncomingPacket()
|
||||
// int32_t IncomingPacket()
|
||||
// Call this function to insert a parsed RTP packet into ACM.
|
||||
//
|
||||
// Inputs:
|
||||
@ -605,12 +605,12 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to push in the payload
|
||||
// 0 if payload is successfully pushed in.
|
||||
//
|
||||
virtual WebRtc_Word32 IncomingPacket(const WebRtc_UWord8* incoming_payload,
|
||||
const WebRtc_Word32 payload_len_bytes,
|
||||
virtual int32_t IncomingPacket(const uint8_t* incoming_payload,
|
||||
const int32_t payload_len_bytes,
|
||||
const WebRtcRTPHeader& rtp_info) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 IncomingPayload()
|
||||
// int32_t IncomingPayload()
|
||||
// Call this API to push incoming payloads when there is no rtp-info.
|
||||
// The rtp-info will be created in ACM. One usage for this API is when
|
||||
// pre-encoded files are pushed in ACM
|
||||
@ -633,13 +633,13 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to push in the payload
|
||||
// 0 if payload is successfully pushed in.
|
||||
//
|
||||
virtual WebRtc_Word32 IncomingPayload(const WebRtc_UWord8* incoming_payload,
|
||||
const WebRtc_Word32 payload_len_byte,
|
||||
const WebRtc_UWord8 payload_type,
|
||||
const WebRtc_UWord32 timestamp = 0) = 0;
|
||||
virtual int32_t IncomingPayload(const uint8_t* incoming_payload,
|
||||
const int32_t payload_len_byte,
|
||||
const uint8_t payload_type,
|
||||
const uint32_t timestamp = 0) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 SetMinimumPlayoutDelay()
|
||||
// int32_t SetMinimumPlayoutDelay()
|
||||
// Set Minimum playout delay, used for lip-sync.
|
||||
//
|
||||
// Input:
|
||||
@ -649,10 +649,10 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to set the delay,
|
||||
// 0 if the minimum delay is set.
|
||||
//
|
||||
virtual WebRtc_Word32 SetMinimumPlayoutDelay(const WebRtc_Word32 time_ms) = 0;
|
||||
virtual int32_t SetMinimumPlayoutDelay(const int32_t time_ms) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 RegisterIncomingMessagesCallback()
|
||||
// int32_t RegisterIncomingMessagesCallback()
|
||||
// Used by the module to deliver messages to the codec module/application
|
||||
// when a DTMF tone is detected, as well as when it stopped.
|
||||
//
|
||||
@ -669,13 +669,13 @@ class AudioCodingModule: public Module {
|
||||
// -1 if the message callback could not be registered
|
||||
// 0 if registration is successful.
|
||||
//
|
||||
virtual WebRtc_Word32
|
||||
virtual int32_t
|
||||
RegisterIncomingMessagesCallback(
|
||||
AudioCodingFeedback* in_message_callback,
|
||||
const ACMCountries cpt = ACMDisableCountryDetection) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 SetDtmfPlayoutStatus()
|
||||
// int32_t SetDtmfPlayoutStatus()
|
||||
// Configure DTMF playout, i.e. whether out-of-band
|
||||
// DTMF tones are played or not.
|
||||
//
|
||||
@ -687,7 +687,7 @@ class AudioCodingModule: public Module {
|
||||
// -1 if the method fails, e.g. DTMF playout is not supported.
|
||||
// 0 if the status is set successfully.
|
||||
//
|
||||
virtual WebRtc_Word32 SetDtmfPlayoutStatus(const bool enable) = 0;
|
||||
virtual int32_t SetDtmfPlayoutStatus(const bool enable) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// bool DtmfPlayoutStatus()
|
||||
@ -700,7 +700,7 @@ class AudioCodingModule: public Module {
|
||||
virtual bool DtmfPlayoutStatus() const = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 SetBackgroundNoiseMode()
|
||||
// int32_t SetBackgroundNoiseMode()
|
||||
// Sets the mode of the background noise playout in an event of long
|
||||
// packet loss burst. For the valid modes see the declaration of
|
||||
// ACMBackgroundNoiseMode in audio_coding_module_typedefs.h.
|
||||
@ -712,11 +712,11 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to set the mode.
|
||||
// 0 if succeeded in setting the mode.
|
||||
//
|
||||
virtual WebRtc_Word32 SetBackgroundNoiseMode(
|
||||
virtual int32_t SetBackgroundNoiseMode(
|
||||
const ACMBackgroundNoiseMode mode) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 BackgroundNoiseMode()
|
||||
// int32_t BackgroundNoiseMode()
|
||||
// Call this method to get the mode of the background noise playout.
|
||||
// Playout of background noise is a result of a long packet loss burst.
|
||||
// See ACMBackgroundNoiseMode in audio_coding_module_typedefs.h for
|
||||
@ -730,26 +730,26 @@ class AudioCodingModule: public Module {
|
||||
// -1 if ACM failed to output a valid mode.
|
||||
//
|
||||
// TODO(tlegrand): Change function to return the mode.
|
||||
virtual WebRtc_Word32 BackgroundNoiseMode(ACMBackgroundNoiseMode* mode) = 0;
|
||||
virtual int32_t BackgroundNoiseMode(ACMBackgroundNoiseMode* mode) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 PlayoutTimestamp()
|
||||
// int32_t PlayoutTimestamp()
|
||||
// The send timestamp of an RTP packet is associated with the decoded
|
||||
// audio of the packet in question. This function returns the timestamp of
|
||||
// the latest audio obtained by calling PlayoutData10ms().
|
||||
//
|
||||
// Input:
|
||||
// -timestamp : a reference to a WebRtc_UWord32 to receive the
|
||||
// -timestamp : a reference to a uint32_t to receive the
|
||||
// timestamp.
|
||||
// Return value:
|
||||
// 0 if the output is a correct timestamp.
|
||||
// -1 if failed to output the correct timestamp.
|
||||
//
|
||||
// TODO(tlegrand): Change function to return the timestamp.
|
||||
virtual WebRtc_Word32 PlayoutTimestamp(WebRtc_UWord32* timestamp) = 0;
|
||||
virtual int32_t PlayoutTimestamp(uint32_t* timestamp) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 DecoderEstimatedBandwidth()
|
||||
// int32_t DecoderEstimatedBandwidth()
|
||||
// Get the estimate of the Bandwidth, in bits/second, based on the incoming
|
||||
// stream. This API is useful in one-way communication scenarios, where
|
||||
// the bandwidth information is sent in an out-of-band fashion.
|
||||
@ -759,10 +759,10 @@ class AudioCodingModule: public Module {
|
||||
// >0 bandwidth in bits/second.
|
||||
// -1 if failed to get a bandwidth estimate.
|
||||
//
|
||||
virtual WebRtc_Word32 DecoderEstimatedBandwidth() const = 0;
|
||||
virtual int32_t DecoderEstimatedBandwidth() const = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 SetPlayoutMode()
|
||||
// int32_t SetPlayoutMode()
|
||||
// Call this API to set the playout mode. Playout mode could be optimized
|
||||
// for i) voice, ii) FAX or iii) streaming. In Voice mode, NetEQ is
|
||||
// optimized to deliver highest audio quality while maintaining a minimum
|
||||
@ -781,7 +781,7 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to set the mode,
|
||||
// 0 if succeeding.
|
||||
//
|
||||
virtual WebRtc_Word32 SetPlayoutMode(const AudioPlayoutMode mode) = 0;
|
||||
virtual int32_t SetPlayoutMode(const AudioPlayoutMode mode) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// AudioPlayoutMode PlayoutMode()
|
||||
@ -799,7 +799,7 @@ class AudioCodingModule: public Module {
|
||||
virtual AudioPlayoutMode PlayoutMode() const = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 PlayoutData10Ms(
|
||||
// int32_t PlayoutData10Ms(
|
||||
// Get 10 milliseconds of raw audio data for playout, at the given sampling
|
||||
// frequency. ACM will perform a resampling if required.
|
||||
//
|
||||
@ -818,7 +818,7 @@ class AudioCodingModule: public Module {
|
||||
// -1 if the function fails,
|
||||
// 0 if the function succeeds.
|
||||
//
|
||||
virtual WebRtc_Word32 PlayoutData10Ms(WebRtc_Word32 desired_freq_hz,
|
||||
virtual int32_t PlayoutData10Ms(int32_t desired_freq_hz,
|
||||
AudioFrame* audio_frame) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -827,7 +827,7 @@ class AudioCodingModule: public Module {
|
||||
//
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word16 SetReceiveVADMode()
|
||||
// int16_t SetReceiveVADMode()
|
||||
// Configure VAD aggressiveness on the incoming stream.
|
||||
//
|
||||
// Input:
|
||||
@ -840,7 +840,7 @@ class AudioCodingModule: public Module {
|
||||
// -1 if fails to set the mode,
|
||||
// 0 if the mode is set successfully.
|
||||
//
|
||||
virtual WebRtc_Word16 SetReceiveVADMode(const ACMVADMode mode) = 0;
|
||||
virtual int16_t SetReceiveVADMode(const ACMVADMode mode) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ACMVADMode ReceiveVADMode()
|
||||
@ -859,7 +859,7 @@ class AudioCodingModule: public Module {
|
||||
//
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 SetISACMaxRate()
|
||||
// int32_t SetISACMaxRate()
|
||||
// Set the maximum instantaneous rate of iSAC. For a payload of B bits
|
||||
// with a frame-size of T sec the instantaneous rate is B/T bits per
|
||||
// second. Therefore, (B/T < |max_rate_bps|) and
|
||||
@ -873,11 +873,11 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to set the maximum rate.
|
||||
// 0 if the maximum rate is set successfully.
|
||||
//
|
||||
virtual WebRtc_Word32 SetISACMaxRate(
|
||||
const WebRtc_UWord32 max_rate_bps) = 0;
|
||||
virtual int32_t SetISACMaxRate(
|
||||
const uint32_t max_rate_bps) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 SetISACMaxPayloadSize()
|
||||
// int32_t SetISACMaxPayloadSize()
|
||||
// Set the maximum payload size of iSAC packets. No iSAC payload,
|
||||
// regardless of its frame-size, may exceed the given limit. For
|
||||
// an iSAC payload of size B bits and frame-size T seconds we have;
|
||||
@ -891,11 +891,11 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to set the maximum payload-size.
|
||||
// 0 if the given length is set successfully.
|
||||
//
|
||||
virtual WebRtc_Word32 SetISACMaxPayloadSize(
|
||||
const WebRtc_UWord16 max_payload_len_bytes) = 0;
|
||||
virtual int32_t SetISACMaxPayloadSize(
|
||||
const uint16_t max_payload_len_bytes) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 ConfigISACBandwidthEstimator()
|
||||
// int32_t ConfigISACBandwidthEstimator()
|
||||
// Call this function to configure the bandwidth estimator of ISAC.
|
||||
// During the adaptation of bit-rate, iSAC automatically adjusts the
|
||||
// frame-size (either 30 or 60 ms) to save on RTP header. The initial
|
||||
@ -918,9 +918,9 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to configure the bandwidth estimator,
|
||||
// 0 if the configuration was successfully applied.
|
||||
//
|
||||
virtual WebRtc_Word32 ConfigISACBandwidthEstimator(
|
||||
const WebRtc_UWord8 init_frame_size_ms,
|
||||
const WebRtc_UWord16 init_rate_bps,
|
||||
virtual int32_t ConfigISACBandwidthEstimator(
|
||||
const uint8_t init_frame_size_ms,
|
||||
const uint16_t init_rate_bps,
|
||||
const bool enforce_frame_size = false) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -928,7 +928,7 @@ class AudioCodingModule: public Module {
|
||||
//
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// WebRtc_Word32 NetworkStatistics()
|
||||
// int32_t NetworkStatistics()
|
||||
// Get network statistics.
|
||||
//
|
||||
// Input:
|
||||
@ -938,7 +938,7 @@ class AudioCodingModule: public Module {
|
||||
// -1 if failed to set the network statistics,
|
||||
// 0 if statistics are set successfully.
|
||||
//
|
||||
virtual WebRtc_Word32 NetworkStatistics(
|
||||
virtual int32_t NetworkStatistics(
|
||||
ACMNetworkStatistics* network_statistics) const = 0;
|
||||
|
||||
//
|
||||
|
||||
@ -167,14 +167,14 @@ enum ACMAMRPackingFormat {
|
||||
// -maxWaitingTimeMs : max packet waiting time in the buffer
|
||||
// -addedSamples : samples inserted because of packet loss in off mode
|
||||
typedef struct {
|
||||
WebRtc_UWord16 currentBufferSize;
|
||||
WebRtc_UWord16 preferredBufferSize;
|
||||
uint16_t currentBufferSize;
|
||||
uint16_t preferredBufferSize;
|
||||
bool jitterPeaksFound;
|
||||
WebRtc_UWord16 currentPacketLossRate;
|
||||
WebRtc_UWord16 currentDiscardRate;
|
||||
WebRtc_UWord16 currentExpandRate;
|
||||
WebRtc_UWord16 currentPreemptiveRate;
|
||||
WebRtc_UWord16 currentAccelerateRate;
|
||||
uint16_t currentPacketLossRate;
|
||||
uint16_t currentDiscardRate;
|
||||
uint16_t currentExpandRate;
|
||||
uint16_t currentPreemptiveRate;
|
||||
uint16_t currentAccelerateRate;
|
||||
int32_t clockDriftPPM;
|
||||
int meanWaitingTimeMs;
|
||||
int medianWaitingTimeMs;
|
||||
|
||||
Reference in New Issue
Block a user