Remove const for plain data types in voice_engine/
BUG=1644 R=henrikg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1463004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4018 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
185bae4b6f
commit
9213521ea9
@ -94,7 +94,7 @@ Channel::InFrameType(int16_t frameType)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
Channel::OnRxVadDetected(const int vadDecision)
|
Channel::OnRxVadDetected(int vadDecision)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
|
||||||
"Channel::OnRxVadDetected(vadDecision=%d)", vadDecision);
|
"Channel::OnRxVadDetected(vadDecision=%d)", vadDecision);
|
||||||
@ -332,10 +332,10 @@ Channel::SendRTCPPacket(int channel, const void *data, int len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Channel::OnPlayTelephoneEvent(const int32_t id,
|
Channel::OnPlayTelephoneEvent(int32_t id,
|
||||||
const uint8_t event,
|
uint8_t event,
|
||||||
const uint16_t lengthMs,
|
uint16_t lengthMs,
|
||||||
const uint8_t volume)
|
uint8_t volume)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
"Channel::OnPlayTelephoneEvent(id=%d, event=%u, lengthMs=%u,"
|
"Channel::OnPlayTelephoneEvent(id=%d, event=%u, lengthMs=%u,"
|
||||||
@ -356,8 +356,8 @@ Channel::OnPlayTelephoneEvent(const int32_t id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Channel::OnIncomingSSRCChanged(const int32_t id,
|
Channel::OnIncomingSSRCChanged(int32_t id,
|
||||||
const uint32_t SSRC)
|
uint32_t SSRC)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
"Channel::OnIncomingSSRCChanged(id=%d, SSRC=%d)",
|
"Channel::OnIncomingSSRCChanged(id=%d, SSRC=%d)",
|
||||||
@ -382,9 +382,9 @@ Channel::OnIncomingSSRCChanged(const int32_t id,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Channel::OnIncomingCSRCChanged(const int32_t id,
|
void Channel::OnIncomingCSRCChanged(int32_t id,
|
||||||
const uint32_t CSRC,
|
uint32_t CSRC,
|
||||||
const bool added)
|
bool added)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
"Channel::OnIncomingCSRCChanged(id=%d, CSRC=%d, added=%d)",
|
"Channel::OnIncomingCSRCChanged(id=%d, CSRC=%d, added=%d)",
|
||||||
@ -405,10 +405,10 @@ void Channel::OnIncomingCSRCChanged(const int32_t id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Channel::OnApplicationDataReceived(const int32_t id,
|
Channel::OnApplicationDataReceived(int32_t id,
|
||||||
const uint8_t subType,
|
uint8_t subType,
|
||||||
const uint32_t name,
|
uint32_t name,
|
||||||
const uint16_t length,
|
uint16_t length,
|
||||||
const uint8_t* data)
|
const uint8_t* data)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
@ -436,12 +436,12 @@ Channel::OnApplicationDataReceived(const int32_t id,
|
|||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
Channel::OnInitializeDecoder(
|
Channel::OnInitializeDecoder(
|
||||||
const int32_t id,
|
int32_t id,
|
||||||
const int8_t payloadType,
|
int8_t payloadType,
|
||||||
const char payloadName[RTP_PAYLOAD_NAME_SIZE],
|
const char payloadName[RTP_PAYLOAD_NAME_SIZE],
|
||||||
const int frequency,
|
int frequency,
|
||||||
const uint8_t channels,
|
uint8_t channels,
|
||||||
const uint32_t rate)
|
uint32_t rate)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
"Channel::OnInitializeDecoder(id=%d, payloadType=%d, "
|
"Channel::OnInitializeDecoder(id=%d, payloadType=%d, "
|
||||||
@ -477,7 +477,7 @@ Channel::OnInitializeDecoder(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Channel::OnPacketTimeout(const int32_t id)
|
Channel::OnPacketTimeout(int32_t id)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
"Channel::OnPacketTimeout(id=%d)", id);
|
"Channel::OnPacketTimeout(id=%d)", id);
|
||||||
@ -504,8 +504,8 @@ Channel::OnPacketTimeout(const int32_t id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Channel::OnReceivedPacket(const int32_t id,
|
Channel::OnReceivedPacket(int32_t id,
|
||||||
const RtpRtcpPacketType packetType)
|
RtpRtcpPacketType packetType)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
"Channel::OnReceivedPacket(id=%d, packetType=%d)",
|
"Channel::OnReceivedPacket(id=%d, packetType=%d)",
|
||||||
@ -536,8 +536,8 @@ Channel::OnReceivedPacket(const int32_t id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Channel::OnPeriodicDeadOrAlive(const int32_t id,
|
Channel::OnPeriodicDeadOrAlive(int32_t id,
|
||||||
const RTPAliveType alive)
|
RTPAliveType alive)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
"Channel::OnPeriodicDeadOrAlive(id=%d, alive=%d)", id, alive);
|
"Channel::OnPeriodicDeadOrAlive(id=%d, alive=%d)", id, alive);
|
||||||
@ -590,7 +590,7 @@ Channel::OnPeriodicDeadOrAlive(const int32_t id,
|
|||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
Channel::OnReceivedPayloadData(const uint8_t* payloadData,
|
Channel::OnReceivedPayloadData(const uint8_t* payloadData,
|
||||||
const uint16_t payloadSize,
|
uint16_t payloadSize,
|
||||||
const WebRtcRTPHeader* rtpHeader)
|
const WebRtcRTPHeader* rtpHeader)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
@ -631,7 +631,7 @@ Channel::OnReceivedPayloadData(const uint8_t* payloadData,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t Channel::GetAudioFrame(const int32_t id, AudioFrame& audioFrame)
|
int32_t Channel::GetAudioFrame(int32_t id, AudioFrame& audioFrame)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
"Channel::GetAudioFrame(id=%d)", id);
|
"Channel::GetAudioFrame(id=%d)", id);
|
||||||
@ -737,7 +737,7 @@ int32_t Channel::GetAudioFrame(const int32_t id, AudioFrame& audioFrame)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
Channel::NeededFrequency(const int32_t id)
|
Channel::NeededFrequency(int32_t id)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
"Channel::NeededFrequency(id=%d)", id);
|
"Channel::NeededFrequency(id=%d)", id);
|
||||||
@ -778,8 +778,8 @@ Channel::NeededFrequency(const int32_t id)
|
|||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
Channel::CreateChannel(Channel*& channel,
|
Channel::CreateChannel(Channel*& channel,
|
||||||
const int32_t channelId,
|
int32_t channelId,
|
||||||
const uint32_t instanceId)
|
uint32_t instanceId)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(instanceId,channelId),
|
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(instanceId,channelId),
|
||||||
"Channel::CreateChannel(channelId=%d, instanceId=%d)",
|
"Channel::CreateChannel(channelId=%d, instanceId=%d)",
|
||||||
@ -798,7 +798,7 @@ Channel::CreateChannel(Channel*& channel,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Channel::PlayNotification(const int32_t id, const uint32_t durationMs)
|
Channel::PlayNotification(int32_t id, uint32_t durationMs)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
"Channel::PlayNotification(id=%d, durationMs=%d)",
|
"Channel::PlayNotification(id=%d, durationMs=%d)",
|
||||||
@ -808,7 +808,7 @@ Channel::PlayNotification(const int32_t id, const uint32_t durationMs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Channel::RecordNotification(const int32_t id, const uint32_t durationMs)
|
Channel::RecordNotification(int32_t id, uint32_t durationMs)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
"Channel::RecordNotification(id=%d, durationMs=%d)",
|
"Channel::RecordNotification(id=%d, durationMs=%d)",
|
||||||
@ -818,7 +818,7 @@ Channel::RecordNotification(const int32_t id, const uint32_t durationMs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Channel::PlayFileEnded(const int32_t id)
|
Channel::PlayFileEnded(int32_t id)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
"Channel::PlayFileEnded(id=%d)", id);
|
"Channel::PlayFileEnded(id=%d)", id);
|
||||||
@ -846,7 +846,7 @@ Channel::PlayFileEnded(const int32_t id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Channel::RecordFileEnded(const int32_t id)
|
Channel::RecordFileEnded(int32_t id)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
"Channel::RecordFileEnded(id=%d)", id);
|
"Channel::RecordFileEnded(id=%d)", id);
|
||||||
@ -862,8 +862,8 @@ Channel::RecordFileEnded(const int32_t id)
|
|||||||
" shutdown");
|
" shutdown");
|
||||||
}
|
}
|
||||||
|
|
||||||
Channel::Channel(const int32_t channelId,
|
Channel::Channel(int32_t channelId,
|
||||||
const uint32_t instanceId) :
|
uint32_t instanceId) :
|
||||||
_fileCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
|
_fileCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
|
||||||
_callbackCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
|
_callbackCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
|
||||||
_instanceId(instanceId),
|
_instanceId(instanceId),
|
||||||
@ -2300,11 +2300,11 @@ Channel::GetPeriodicDeadOrAliveStatus(bool& enabled, int& sampleTimeSeconds)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int Channel::StartPlayingFileLocally(const char* fileName,
|
int Channel::StartPlayingFileLocally(const char* fileName,
|
||||||
const bool loop,
|
bool loop,
|
||||||
const FileFormats format,
|
FileFormats format,
|
||||||
const int startPosition,
|
int startPosition,
|
||||||
const float volumeScaling,
|
float volumeScaling,
|
||||||
const int stopPosition,
|
int stopPosition,
|
||||||
const CodecInst* codecInst)
|
const CodecInst* codecInst)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
@ -2372,10 +2372,10 @@ int Channel::StartPlayingFileLocally(const char* fileName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int Channel::StartPlayingFileLocally(InStream* stream,
|
int Channel::StartPlayingFileLocally(InStream* stream,
|
||||||
const FileFormats format,
|
FileFormats format,
|
||||||
const int startPosition,
|
int startPosition,
|
||||||
const float volumeScaling,
|
float volumeScaling,
|
||||||
const int stopPosition,
|
int stopPosition,
|
||||||
const CodecInst* codecInst)
|
const CodecInst* codecInst)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
@ -2530,7 +2530,7 @@ int Channel::RegisterFilePlayingToMixer()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Channel::ScaleLocalFilePlayout(const float scale)
|
int Channel::ScaleLocalFilePlayout(float scale)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
"Channel::ScaleLocalFilePlayout(scale=%5.3f)", scale);
|
"Channel::ScaleLocalFilePlayout(scale=%5.3f)", scale);
|
||||||
@ -2586,11 +2586,11 @@ int Channel::GetLocalPlayoutPosition(int& positionMs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int Channel::StartPlayingFileAsMicrophone(const char* fileName,
|
int Channel::StartPlayingFileAsMicrophone(const char* fileName,
|
||||||
const bool loop,
|
bool loop,
|
||||||
const FileFormats format,
|
FileFormats format,
|
||||||
const int startPosition,
|
int startPosition,
|
||||||
const float volumeScaling,
|
float volumeScaling,
|
||||||
const int stopPosition,
|
int stopPosition,
|
||||||
const CodecInst* codecInst)
|
const CodecInst* codecInst)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
@ -2655,10 +2655,10 @@ int Channel::StartPlayingFileAsMicrophone(const char* fileName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int Channel::StartPlayingFileAsMicrophone(InStream* stream,
|
int Channel::StartPlayingFileAsMicrophone(InStream* stream,
|
||||||
const FileFormats format,
|
FileFormats format,
|
||||||
const int startPosition,
|
int startPosition,
|
||||||
const float volumeScaling,
|
float volumeScaling,
|
||||||
const int stopPosition,
|
int stopPosition,
|
||||||
const CodecInst* codecInst)
|
const CodecInst* codecInst)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
@ -2762,7 +2762,7 @@ int Channel::IsPlayingFileAsMicrophone() const
|
|||||||
return _inputFilePlaying;
|
return _inputFilePlaying;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Channel::ScaleFileAsMicrophonePlayout(const float scale)
|
int Channel::ScaleFileAsMicrophonePlayout(float scale)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
"Channel::ScaleFileAsMicrophonePlayout(scale=%5.3f)", scale);
|
"Channel::ScaleFileAsMicrophonePlayout(scale=%5.3f)", scale);
|
||||||
@ -3280,7 +3280,7 @@ Channel::VoiceActivityIndicator(int &activity)
|
|||||||
#ifdef WEBRTC_VOICE_ENGINE_AGC
|
#ifdef WEBRTC_VOICE_ENGINE_AGC
|
||||||
|
|
||||||
int
|
int
|
||||||
Channel::SetRxAgcStatus(const bool enable, const AgcModes mode)
|
Channel::SetRxAgcStatus(bool enable, AgcModes mode)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
"Channel::SetRxAgcStatus(enable=%d, mode=%d)",
|
"Channel::SetRxAgcStatus(enable=%d, mode=%d)",
|
||||||
@ -3360,7 +3360,7 @@ Channel::GetRxAgcStatus(bool& enabled, AgcModes& mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Channel::SetRxAgcConfig(const AgcConfig config)
|
Channel::SetRxAgcConfig(AgcConfig config)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
"Channel::SetRxAgcConfig()");
|
"Channel::SetRxAgcConfig()");
|
||||||
@ -3424,7 +3424,7 @@ Channel::GetRxAgcConfig(AgcConfig& config)
|
|||||||
#ifdef WEBRTC_VOICE_ENGINE_NR
|
#ifdef WEBRTC_VOICE_ENGINE_NR
|
||||||
|
|
||||||
int
|
int
|
||||||
Channel::SetRxNsStatus(const bool enable, const NsModes mode)
|
Channel::SetRxNsStatus(bool enable, NsModes mode)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
|
||||||
"Channel::SetRxNsStatus(enable=%d, mode=%d)",
|
"Channel::SetRxNsStatus(enable=%d, mode=%d)",
|
||||||
@ -3888,7 +3888,7 @@ Channel::GetRemoteRTCPData(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Channel::SendApplicationDefinedRTCPPacket(const unsigned char subType,
|
Channel::SendApplicationDefinedRTCPPacket(unsigned char subType,
|
||||||
unsigned int name,
|
unsigned int name,
|
||||||
const char* data,
|
const char* data,
|
||||||
unsigned short dataLengthInBytes)
|
unsigned short dataLengthInBytes)
|
||||||
@ -4835,7 +4835,7 @@ Channel::GetRtpRtcp(RtpRtcp* &rtpRtcpModule) const
|
|||||||
// TODO(andrew): refactor Mix functions here and in transmit_mixer.cc to use
|
// TODO(andrew): refactor Mix functions here and in transmit_mixer.cc to use
|
||||||
// a shared helper.
|
// a shared helper.
|
||||||
int32_t
|
int32_t
|
||||||
Channel::MixOrReplaceAudioWithFile(const int mixingFrequency)
|
Channel::MixOrReplaceAudioWithFile(int mixingFrequency)
|
||||||
{
|
{
|
||||||
scoped_array<int16_t> fileBuffer(new int16_t[640]);
|
scoped_array<int16_t> fileBuffer(new int16_t[640]);
|
||||||
int fileSamples(0);
|
int fileSamples(0);
|
||||||
@ -4903,7 +4903,7 @@ Channel::MixOrReplaceAudioWithFile(const int mixingFrequency)
|
|||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
Channel::MixAudioWithFile(AudioFrame& audioFrame,
|
Channel::MixAudioWithFile(AudioFrame& audioFrame,
|
||||||
const int mixingFrequency)
|
int mixingFrequency)
|
||||||
{
|
{
|
||||||
assert(mixingFrequency <= 32000);
|
assert(mixingFrequency <= 32000);
|
||||||
|
|
||||||
|
@ -72,9 +72,9 @@ public:
|
|||||||
public:
|
public:
|
||||||
virtual ~Channel();
|
virtual ~Channel();
|
||||||
static int32_t CreateChannel(Channel*& channel,
|
static int32_t CreateChannel(Channel*& channel,
|
||||||
const int32_t channelId,
|
int32_t channelId,
|
||||||
const uint32_t instanceId);
|
uint32_t instanceId);
|
||||||
Channel(const int32_t channelId, const uint32_t instanceId);
|
Channel(int32_t channelId, uint32_t instanceId);
|
||||||
int32_t Init();
|
int32_t Init();
|
||||||
int32_t SetEngineInformation(
|
int32_t SetEngineInformation(
|
||||||
Statistics& engineStatistics,
|
Statistics& engineStatistics,
|
||||||
@ -139,37 +139,37 @@ public:
|
|||||||
int32_t GetPeriodicDeadOrAliveStatus(bool& enabled, int& sampleTimeSeconds);
|
int32_t GetPeriodicDeadOrAliveStatus(bool& enabled, int& sampleTimeSeconds);
|
||||||
|
|
||||||
// VoEFile
|
// VoEFile
|
||||||
int StartPlayingFileLocally(const char* fileName, const bool loop,
|
int StartPlayingFileLocally(const char* fileName, bool loop,
|
||||||
const FileFormats format,
|
FileFormats format,
|
||||||
const int startPosition,
|
int startPosition,
|
||||||
const float volumeScaling,
|
float volumeScaling,
|
||||||
const int stopPosition,
|
int stopPosition,
|
||||||
const CodecInst* codecInst);
|
const CodecInst* codecInst);
|
||||||
int StartPlayingFileLocally(InStream* stream, const FileFormats format,
|
int StartPlayingFileLocally(InStream* stream, FileFormats format,
|
||||||
const int startPosition,
|
int startPosition,
|
||||||
const float volumeScaling,
|
float volumeScaling,
|
||||||
const int stopPosition,
|
int stopPosition,
|
||||||
const CodecInst* codecInst);
|
const CodecInst* codecInst);
|
||||||
int StopPlayingFileLocally();
|
int StopPlayingFileLocally();
|
||||||
int IsPlayingFileLocally() const;
|
int IsPlayingFileLocally() const;
|
||||||
int RegisterFilePlayingToMixer();
|
int RegisterFilePlayingToMixer();
|
||||||
int ScaleLocalFilePlayout(const float scale);
|
int ScaleLocalFilePlayout(float scale);
|
||||||
int GetLocalPlayoutPosition(int& positionMs);
|
int GetLocalPlayoutPosition(int& positionMs);
|
||||||
int StartPlayingFileAsMicrophone(const char* fileName, const bool loop,
|
int StartPlayingFileAsMicrophone(const char* fileName, bool loop,
|
||||||
const FileFormats format,
|
FileFormats format,
|
||||||
const int startPosition,
|
int startPosition,
|
||||||
const float volumeScaling,
|
float volumeScaling,
|
||||||
const int stopPosition,
|
int stopPosition,
|
||||||
const CodecInst* codecInst);
|
const CodecInst* codecInst);
|
||||||
int StartPlayingFileAsMicrophone(InStream* stream,
|
int StartPlayingFileAsMicrophone(InStream* stream,
|
||||||
const FileFormats format,
|
FileFormats format,
|
||||||
const int startPosition,
|
int startPosition,
|
||||||
const float volumeScaling,
|
float volumeScaling,
|
||||||
const int stopPosition,
|
int stopPosition,
|
||||||
const CodecInst* codecInst);
|
const CodecInst* codecInst);
|
||||||
int StopPlayingFileAsMicrophone();
|
int StopPlayingFileAsMicrophone();
|
||||||
int IsPlayingFileAsMicrophone() const;
|
int IsPlayingFileAsMicrophone() const;
|
||||||
int ScaleFileAsMicrophonePlayout(const float scale);
|
int ScaleFileAsMicrophonePlayout(float scale);
|
||||||
int StartRecordingPlayout(const char* fileName, const CodecInst* codecInst);
|
int StartRecordingPlayout(const char* fileName, const CodecInst* codecInst);
|
||||||
int StartRecordingPlayout(OutStream* stream, const CodecInst* codecInst);
|
int StartRecordingPlayout(OutStream* stream, const CodecInst* codecInst);
|
||||||
int StopRecordingPlayout();
|
int StopRecordingPlayout();
|
||||||
@ -185,7 +185,7 @@ public:
|
|||||||
// VoEVolumeControl
|
// VoEVolumeControl
|
||||||
int GetSpeechOutputLevel(uint32_t& level) const;
|
int GetSpeechOutputLevel(uint32_t& level) const;
|
||||||
int GetSpeechOutputLevelFullRange(uint32_t& level) const;
|
int GetSpeechOutputLevelFullRange(uint32_t& level) const;
|
||||||
int SetMute(const bool enable);
|
int SetMute(bool enable);
|
||||||
bool Mute() const;
|
bool Mute() const;
|
||||||
int SetOutputVolumePan(float left, float right);
|
int SetOutputVolumePan(float left, float right);
|
||||||
int GetOutputVolumePan(float& left, float& right) const;
|
int GetOutputVolumePan(float& left, float& right) const;
|
||||||
@ -234,13 +234,13 @@ public:
|
|||||||
int DeRegisterRxVadObserver();
|
int DeRegisterRxVadObserver();
|
||||||
int VoiceActivityIndicator(int &activity);
|
int VoiceActivityIndicator(int &activity);
|
||||||
#ifdef WEBRTC_VOICE_ENGINE_AGC
|
#ifdef WEBRTC_VOICE_ENGINE_AGC
|
||||||
int SetRxAgcStatus(const bool enable, const AgcModes mode);
|
int SetRxAgcStatus(bool enable, AgcModes mode);
|
||||||
int GetRxAgcStatus(bool& enabled, AgcModes& mode);
|
int GetRxAgcStatus(bool& enabled, AgcModes& mode);
|
||||||
int SetRxAgcConfig(const AgcConfig config);
|
int SetRxAgcConfig(AgcConfig config);
|
||||||
int GetRxAgcConfig(AgcConfig& config);
|
int GetRxAgcConfig(AgcConfig& config);
|
||||||
#endif
|
#endif
|
||||||
#ifdef WEBRTC_VOICE_ENGINE_NR
|
#ifdef WEBRTC_VOICE_ENGINE_NR
|
||||||
int SetRxNsStatus(const bool enable, const NsModes mode);
|
int SetRxNsStatus(bool enable, NsModes mode);
|
||||||
int GetRxNsStatus(bool& enabled, NsModes& mode);
|
int GetRxNsStatus(bool& enabled, NsModes& mode);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -264,7 +264,7 @@ public:
|
|||||||
unsigned int& timestamp,
|
unsigned int& timestamp,
|
||||||
unsigned int& playoutTimestamp, unsigned int* jitter,
|
unsigned int& playoutTimestamp, unsigned int* jitter,
|
||||||
unsigned short* fractionLost);
|
unsigned short* fractionLost);
|
||||||
int SendApplicationDefinedRTCPPacket(const unsigned char subType,
|
int SendApplicationDefinedRTCPPacket(unsigned char subType,
|
||||||
unsigned int name, const char* data,
|
unsigned int name, const char* data,
|
||||||
unsigned short dataLengthInBytes);
|
unsigned short dataLengthInBytes);
|
||||||
int GetRTPStatistics(unsigned int& averageJitterMs,
|
int GetRTPStatistics(unsigned int& averageJitterMs,
|
||||||
@ -295,55 +295,55 @@ public:
|
|||||||
int32_t InFrameType(int16_t frameType);
|
int32_t InFrameType(int16_t frameType);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int32_t OnRxVadDetected(const int vadDecision);
|
int32_t OnRxVadDetected(int vadDecision);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// From RtpData in the RTP/RTCP module
|
// From RtpData in the RTP/RTCP module
|
||||||
int32_t OnReceivedPayloadData(const uint8_t* payloadData,
|
int32_t OnReceivedPayloadData(const uint8_t* payloadData,
|
||||||
const uint16_t payloadSize,
|
uint16_t payloadSize,
|
||||||
const WebRtcRTPHeader* rtpHeader);
|
const WebRtcRTPHeader* rtpHeader);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// From RtpFeedback in the RTP/RTCP module
|
// From RtpFeedback in the RTP/RTCP module
|
||||||
int32_t OnInitializeDecoder(
|
int32_t OnInitializeDecoder(
|
||||||
const int32_t id,
|
int32_t id,
|
||||||
const int8_t payloadType,
|
int8_t payloadType,
|
||||||
const char payloadName[RTP_PAYLOAD_NAME_SIZE],
|
const char payloadName[RTP_PAYLOAD_NAME_SIZE],
|
||||||
const int frequency,
|
int frequency,
|
||||||
const uint8_t channels,
|
uint8_t channels,
|
||||||
const uint32_t rate);
|
uint32_t rate);
|
||||||
|
|
||||||
void OnPacketTimeout(const int32_t id);
|
void OnPacketTimeout(int32_t id);
|
||||||
|
|
||||||
void OnReceivedPacket(const int32_t id, const RtpRtcpPacketType packetType);
|
void OnReceivedPacket(int32_t id, RtpRtcpPacketType packetType);
|
||||||
|
|
||||||
void OnPeriodicDeadOrAlive(const int32_t id,
|
void OnPeriodicDeadOrAlive(int32_t id,
|
||||||
const RTPAliveType alive);
|
RTPAliveType alive);
|
||||||
|
|
||||||
void OnIncomingSSRCChanged(const int32_t id,
|
void OnIncomingSSRCChanged(int32_t id,
|
||||||
const uint32_t SSRC);
|
uint32_t SSRC);
|
||||||
|
|
||||||
void OnIncomingCSRCChanged(const int32_t id,
|
void OnIncomingCSRCChanged(int32_t id,
|
||||||
const uint32_t CSRC, const bool added);
|
uint32_t CSRC, bool added);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// From RtcpFeedback in the RTP/RTCP module
|
// From RtcpFeedback in the RTP/RTCP module
|
||||||
void OnApplicationDataReceived(const int32_t id,
|
void OnApplicationDataReceived(int32_t id,
|
||||||
const uint8_t subType,
|
uint8_t subType,
|
||||||
const uint32_t name,
|
uint32_t name,
|
||||||
const uint16_t length,
|
uint16_t length,
|
||||||
const uint8_t* data);
|
const uint8_t* data);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// From RtpAudioFeedback in the RTP/RTCP module
|
// From RtpAudioFeedback in the RTP/RTCP module
|
||||||
void OnReceivedTelephoneEvent(const int32_t id,
|
void OnReceivedTelephoneEvent(int32_t id,
|
||||||
const uint8_t event,
|
uint8_t event,
|
||||||
const bool endOfEvent);
|
bool endOfEvent);
|
||||||
|
|
||||||
void OnPlayTelephoneEvent(const int32_t id,
|
void OnPlayTelephoneEvent(int32_t id,
|
||||||
const uint8_t event,
|
uint8_t event,
|
||||||
const uint16_t lengthMs,
|
uint16_t lengthMs,
|
||||||
const uint8_t volume);
|
uint8_t volume);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// From Transport (called by the RTP/RTCP module)
|
// From Transport (called by the RTP/RTCP module)
|
||||||
@ -352,8 +352,8 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// From MixerParticipant
|
// From MixerParticipant
|
||||||
int32_t GetAudioFrame(const int32_t id, AudioFrame& audioFrame);
|
int32_t GetAudioFrame(int32_t id, AudioFrame& audioFrame);
|
||||||
int32_t NeededFrequency(const int32_t id);
|
int32_t NeededFrequency(int32_t id);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// From MonitorObserver
|
// From MonitorObserver
|
||||||
@ -361,12 +361,12 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// From FileCallback
|
// From FileCallback
|
||||||
void PlayNotification(const int32_t id,
|
void PlayNotification(int32_t id,
|
||||||
const uint32_t durationMs);
|
uint32_t durationMs);
|
||||||
void RecordNotification(const int32_t id,
|
void RecordNotification(int32_t id,
|
||||||
const uint32_t durationMs);
|
uint32_t durationMs);
|
||||||
void PlayFileEnded(const int32_t id);
|
void PlayFileEnded(int32_t id);
|
||||||
void RecordFileEnded(const int32_t id);
|
void RecordFileEnded(int32_t id);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
uint32_t InstanceId() const
|
uint32_t InstanceId() const
|
||||||
@ -423,8 +423,8 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
int InsertInbandDtmfTone();
|
int InsertInbandDtmfTone();
|
||||||
int32_t MixOrReplaceAudioWithFile(const int mixingFrequency);
|
int32_t MixOrReplaceAudioWithFile(int mixingFrequency);
|
||||||
int32_t MixAudioWithFile(AudioFrame& audioFrame, const int mixingFrequency);
|
int32_t MixAudioWithFile(AudioFrame& audioFrame, int mixingFrequency);
|
||||||
void UpdateDeadOrAliveCounters(bool alive);
|
void UpdateDeadOrAliveCounters(bool alive);
|
||||||
int32_t SendPacketRaw(const void *data, int len, bool RTCP);
|
int32_t SendPacketRaw(const void *data, int len, bool RTCP);
|
||||||
void UpdatePacketDelay(uint32_t timestamp,
|
void UpdatePacketDelay(uint32_t timestamp,
|
||||||
|
@ -17,7 +17,7 @@ namespace webrtc
|
|||||||
namespace voe
|
namespace voe
|
||||||
{
|
{
|
||||||
|
|
||||||
ChannelManager::ChannelManager(const uint32_t instanceId) :
|
ChannelManager::ChannelManager(uint32_t instanceId) :
|
||||||
ChannelManagerBase(),
|
ChannelManagerBase(),
|
||||||
_instanceId(instanceId)
|
_instanceId(instanceId)
|
||||||
{
|
{
|
||||||
@ -33,7 +33,7 @@ bool ChannelManager::CreateChannel(int32_t& channelId)
|
|||||||
return ChannelManagerBase::CreateItem(channelId);
|
return ChannelManagerBase::CreateItem(channelId);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t ChannelManager::DestroyChannel(const int32_t channelId)
|
int32_t ChannelManager::DestroyChannel(int32_t channelId)
|
||||||
{
|
{
|
||||||
Channel* deleteChannel =
|
Channel* deleteChannel =
|
||||||
static_cast<Channel*> (ChannelManagerBase::RemoveItem(channelId));
|
static_cast<Channel*> (ChannelManagerBase::RemoveItem(channelId));
|
||||||
@ -71,7 +71,7 @@ void ChannelManager::DeleteItem(void* item)
|
|||||||
delete deleteItem;
|
delete deleteItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
Channel* ChannelManager::GetChannel(const int32_t channelId) const
|
Channel* ChannelManager::GetChannel(int32_t channelId) const
|
||||||
{
|
{
|
||||||
return static_cast<Channel*> (ChannelManagerBase::GetItem(channelId));
|
return static_cast<Channel*> (ChannelManagerBase::GetItem(channelId));
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ class ChannelManager: private ChannelManagerBase
|
|||||||
public:
|
public:
|
||||||
bool CreateChannel(int32_t& channelId);
|
bool CreateChannel(int32_t& channelId);
|
||||||
|
|
||||||
int32_t DestroyChannel(const int32_t channelId);
|
int32_t DestroyChannel(int32_t channelId);
|
||||||
|
|
||||||
int32_t MaxNumOfChannels() const;
|
int32_t MaxNumOfChannels() const;
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ public:
|
|||||||
void GetChannelIds(int32_t* channelsArray,
|
void GetChannelIds(int32_t* channelsArray,
|
||||||
int32_t& numOfChannels) const;
|
int32_t& numOfChannels) const;
|
||||||
|
|
||||||
ChannelManager(const uint32_t instanceId);
|
ChannelManager(uint32_t instanceId);
|
||||||
|
|
||||||
~ChannelManager();
|
~ChannelManager();
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ private:
|
|||||||
|
|
||||||
ChannelManager& operator=(const ChannelManager&);
|
ChannelManager& operator=(const ChannelManager&);
|
||||||
|
|
||||||
Channel* GetChannel(const int32_t channelId) const;
|
Channel* GetChannel(int32_t channelId) const;
|
||||||
|
|
||||||
void GetChannels(MapWrapper& channels) const;
|
void GetChannels(MapWrapper& channels) const;
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ const int16_t Dtmf_dBm0kHz[37]=
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
DtmfInband::DtmfInband(const int32_t id) :
|
DtmfInband::DtmfInband(int32_t id) :
|
||||||
_critSect(*CriticalSectionWrapper::CreateCriticalSection()),
|
_critSect(*CriticalSectionWrapper::CreateCriticalSection()),
|
||||||
_id(id),
|
_id(id),
|
||||||
_outputFrequencyHz(8000),
|
_outputFrequencyHz(8000),
|
||||||
@ -87,7 +87,7 @@ DtmfInband::~DtmfInband()
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
DtmfInband::SetSampleRate(const uint16_t frequency)
|
DtmfInband::SetSampleRate(uint16_t frequency)
|
||||||
{
|
{
|
||||||
if (frequency != 8000 &&
|
if (frequency != 8000 &&
|
||||||
frequency != 16000 &&
|
frequency != 16000 &&
|
||||||
@ -125,7 +125,7 @@ DtmfInband::Init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
DtmfInband::AddTone(const uint8_t eventCode,
|
DtmfInband::AddTone(uint8_t eventCode,
|
||||||
int32_t lengthMs,
|
int32_t lengthMs,
|
||||||
int32_t attenuationDb)
|
int32_t attenuationDb)
|
||||||
{
|
{
|
||||||
@ -170,7 +170,7 @@ DtmfInband::ResetTone()
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
DtmfInband::StartTone(const uint8_t eventCode,
|
DtmfInband::StartTone(uint8_t eventCode,
|
||||||
int32_t attenuationDb)
|
int32_t attenuationDb)
|
||||||
{
|
{
|
||||||
CriticalSectionScoped lock(&_critSect);
|
CriticalSectionScoped lock(&_critSect);
|
||||||
@ -263,10 +263,10 @@ DtmfInband::DelaySinceLastTone() const
|
|||||||
|
|
||||||
int16_t
|
int16_t
|
||||||
DtmfInband::DtmfFix_generate(int16_t *decoded,
|
DtmfInband::DtmfFix_generate(int16_t *decoded,
|
||||||
const int16_t value,
|
int16_t value,
|
||||||
const int16_t volume,
|
int16_t volume,
|
||||||
const int16_t frameLen,
|
int16_t frameLen,
|
||||||
const int16_t fs)
|
int16_t fs)
|
||||||
{
|
{
|
||||||
const int16_t *a_times2Tbl;
|
const int16_t *a_times2Tbl;
|
||||||
const int16_t *y2_Table;
|
const int16_t *y2_Table;
|
||||||
@ -348,11 +348,11 @@ DtmfInband::DtmfFix_generate(int16_t *decoded,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int16_t
|
int16_t
|
||||||
DtmfInband::DtmfFix_generateSignal(const int16_t a1_times2,
|
DtmfInband::DtmfFix_generateSignal(int16_t a1_times2,
|
||||||
const int16_t a2_times2,
|
int16_t a2_times2,
|
||||||
const int16_t volume,
|
int16_t volume,
|
||||||
int16_t *signal,
|
int16_t *signal,
|
||||||
const int16_t length)
|
int16_t length)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -24,22 +24,22 @@ class CriticalSectionWrapper;
|
|||||||
class DtmfInband
|
class DtmfInband
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DtmfInband(const int32_t id);
|
DtmfInband(int32_t id);
|
||||||
|
|
||||||
virtual ~DtmfInband();
|
virtual ~DtmfInband();
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
int SetSampleRate(const uint16_t frequency);
|
int SetSampleRate(uint16_t frequency);
|
||||||
|
|
||||||
int GetSampleRate(uint16_t& frequency);
|
int GetSampleRate(uint16_t& frequency);
|
||||||
|
|
||||||
int AddTone(const uint8_t eventCode,
|
int AddTone(uint8_t eventCode,
|
||||||
int32_t lengthMs,
|
int32_t lengthMs,
|
||||||
int32_t attenuationDb);
|
int32_t attenuationDb);
|
||||||
|
|
||||||
int ResetTone();
|
int ResetTone();
|
||||||
int StartTone(const uint8_t eventCode, int32_t attenuationDb);
|
int StartTone(uint8_t eventCode, int32_t attenuationDb);
|
||||||
|
|
||||||
int StopTone();
|
int StopTone();
|
||||||
|
|
||||||
@ -54,21 +54,21 @@ public:
|
|||||||
private:
|
private:
|
||||||
void ReInit();
|
void ReInit();
|
||||||
int16_t DtmfFix_generate(int16_t* decoded,
|
int16_t DtmfFix_generate(int16_t* decoded,
|
||||||
const int16_t value,
|
int16_t value,
|
||||||
const int16_t volume,
|
int16_t volume,
|
||||||
const int16_t frameLen,
|
int16_t frameLen,
|
||||||
const int16_t fs);
|
int16_t fs);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum {kDtmfFrameSizeMs = 10};
|
enum {kDtmfFrameSizeMs = 10};
|
||||||
enum {kDtmfAmpHigh = 32768};
|
enum {kDtmfAmpHigh = 32768};
|
||||||
enum {kDtmfAmpLow = 23171}; // 3 dB lower than the high frequency
|
enum {kDtmfAmpLow = 23171}; // 3 dB lower than the high frequency
|
||||||
|
|
||||||
int16_t DtmfFix_generateSignal(const int16_t a1_times2,
|
int16_t DtmfFix_generateSignal(int16_t a1_times2,
|
||||||
const int16_t a2_times2,
|
int16_t a2_times2,
|
||||||
const int16_t volume,
|
int16_t volume,
|
||||||
int16_t* signal,
|
int16_t* signal,
|
||||||
const int16_t length);
|
int16_t length);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CriticalSectionWrapper& _critSect;
|
CriticalSectionWrapper& _critSect;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
DtmfInbandQueue::DtmfInbandQueue(const int32_t id):
|
DtmfInbandQueue::DtmfInbandQueue(int32_t id):
|
||||||
_id(id),
|
_id(id),
|
||||||
_DtmfCritsect(*CriticalSectionWrapper::CreateCriticalSection()),
|
_DtmfCritsect(*CriticalSectionWrapper::CreateCriticalSection()),
|
||||||
_nextEmptyIndex(0)
|
_nextEmptyIndex(0)
|
||||||
|
@ -22,7 +22,7 @@ class DtmfInbandQueue
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DtmfInbandQueue(const int32_t id);
|
DtmfInbandQueue(int32_t id);
|
||||||
|
|
||||||
virtual ~DtmfInbandQueue();
|
virtual ~DtmfInbandQueue();
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@ namespace webrtc {
|
|||||||
|
|
||||||
class MockVoeConnectionObserver : public VoEConnectionObserver {
|
class MockVoeConnectionObserver : public VoEConnectionObserver {
|
||||||
public:
|
public:
|
||||||
MOCK_METHOD2(OnPeriodicDeadOrAlive, void(const int channel,
|
MOCK_METHOD2(OnPeriodicDeadOrAlive, void(int channel,
|
||||||
const bool alive));
|
bool alive));
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ class MockVoEObserver: public VoiceEngineObserver {
|
|||||||
MockVoEObserver() {}
|
MockVoEObserver() {}
|
||||||
virtual ~MockVoEObserver() {}
|
virtual ~MockVoEObserver() {}
|
||||||
|
|
||||||
MOCK_METHOD2(CallbackOnError, void(const int channel, const int error_code));
|
MOCK_METHOD2(CallbackOnError, void(int channel, int error_code));
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ public:
|
|||||||
// Sets the AGC configuration.
|
// Sets the AGC configuration.
|
||||||
// Should only be used in situations where the working environment
|
// Should only be used in situations where the working environment
|
||||||
// is well known.
|
// is well known.
|
||||||
virtual int SetAgcConfig(const AgcConfig config) = 0;
|
virtual int SetAgcConfig(AgcConfig config) = 0;
|
||||||
|
|
||||||
// Gets the AGC configuration.
|
// Gets the AGC configuration.
|
||||||
virtual int GetAgcConfig(AgcConfig& config) = 0;
|
virtual int GetAgcConfig(AgcConfig& config) = 0;
|
||||||
@ -152,7 +152,7 @@ public:
|
|||||||
|
|
||||||
// Modifies the AGC configuration on the receiving side for the
|
// Modifies the AGC configuration on the receiving side for the
|
||||||
// specified |channel|.
|
// specified |channel|.
|
||||||
virtual int SetRxAgcConfig(int channel, const AgcConfig config) = 0;
|
virtual int SetRxAgcConfig(int channel, AgcConfig config) = 0;
|
||||||
|
|
||||||
// Gets the AGC configuration on the receiving side.
|
// Gets the AGC configuration on the receiving side.
|
||||||
virtual int GetRxAgcConfig(int channel, AgcConfig& config) = 0;
|
virtual int GetRxAgcConfig(int channel, AgcConfig& config) = 0;
|
||||||
|
@ -50,7 +50,7 @@ public:
|
|||||||
// This method will be called after the occurrence of any runtime error
|
// This method will be called after the occurrence of any runtime error
|
||||||
// code, or warning notification, when the observer interface has been
|
// code, or warning notification, when the observer interface has been
|
||||||
// installed using VoEBase::RegisterVoiceEngineObserver().
|
// installed using VoEBase::RegisterVoiceEngineObserver().
|
||||||
virtual void CallbackOnError(const int channel, const int errCode) = 0;
|
virtual void CallbackOnError(int channel, int errCode) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~VoiceEngineObserver() {}
|
virtual ~VoiceEngineObserver() {}
|
||||||
@ -72,11 +72,11 @@ public:
|
|||||||
|
|
||||||
// Specifies the amount and type of trace information which will be
|
// Specifies the amount and type of trace information which will be
|
||||||
// created by the VoiceEngine.
|
// created by the VoiceEngine.
|
||||||
static int SetTraceFilter(const unsigned int filter);
|
static int SetTraceFilter(unsigned int filter);
|
||||||
|
|
||||||
// Sets the name of the trace file and enables non-encrypted trace messages.
|
// Sets the name of the trace file and enables non-encrypted trace messages.
|
||||||
static int SetTraceFile(const char* fileNameUTF8,
|
static int SetTraceFile(const char* fileNameUTF8,
|
||||||
const bool addFileCounter = false);
|
bool addFileCounter = false);
|
||||||
|
|
||||||
// Installs the TraceCallback implementation to ensure that the user
|
// Installs the TraceCallback implementation to ensure that the user
|
||||||
// receives callbacks for generated trace messages.
|
// receives callbacks for generated trace messages.
|
||||||
|
@ -51,9 +51,9 @@ public:
|
|||||||
// The sampling frequency will depend upon the codec used.
|
// The sampling frequency will depend upon the codec used.
|
||||||
// If |isStereo| is true, audio10ms will contain 16-bit PCM data
|
// If |isStereo| is true, audio10ms will contain 16-bit PCM data
|
||||||
// samples in interleaved stereo format (L0,R0,L1,R1,...).
|
// samples in interleaved stereo format (L0,R0,L1,R1,...).
|
||||||
virtual void Process(const int channel, const ProcessingTypes type,
|
virtual void Process(int channel, ProcessingTypes type,
|
||||||
int16_t audio10ms[], const int length,
|
int16_t audio10ms[], int length,
|
||||||
const int samplingFreq, const bool isStereo) = 0;
|
int samplingFreq, bool isStereo) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~VoEMediaProcess() {}
|
virtual ~VoEMediaProcess() {}
|
||||||
|
@ -47,7 +47,7 @@ public:
|
|||||||
// This method will be called peridically and deliver dead-or-alive
|
// This method will be called peridically and deliver dead-or-alive
|
||||||
// notifications for a specified |channel| when the observer interface
|
// notifications for a specified |channel| when the observer interface
|
||||||
// has been installed and activated.
|
// has been installed and activated.
|
||||||
virtual void OnPeriodicDeadOrAlive(const int channel, const bool alive) = 0;
|
virtual void OnPeriodicDeadOrAlive(int channel, bool alive) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~VoEConnectionObserver() {}
|
virtual ~VoEConnectionObserver() {}
|
||||||
|
@ -52,10 +52,10 @@ class WEBRTC_DLLEXPORT VoERTPObserver
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void OnIncomingCSRCChanged(
|
virtual void OnIncomingCSRCChanged(
|
||||||
const int channel, const unsigned int CSRC, const bool added) = 0;
|
int channel, unsigned int CSRC, bool added) = 0;
|
||||||
|
|
||||||
virtual void OnIncomingSSRCChanged(
|
virtual void OnIncomingSSRCChanged(
|
||||||
const int channel, const unsigned int SSRC) = 0;
|
int channel, unsigned int SSRC) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~VoERTPObserver() {}
|
virtual ~VoERTPObserver() {}
|
||||||
@ -66,9 +66,9 @@ class WEBRTC_DLLEXPORT VoERTCPObserver
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void OnApplicationDataReceived(
|
virtual void OnApplicationDataReceived(
|
||||||
const int channel, const unsigned char subType,
|
int channel, unsigned char subType,
|
||||||
const unsigned int name, const unsigned char* data,
|
unsigned int name, const unsigned char* data,
|
||||||
const unsigned short dataLengthInBytes) = 0;
|
unsigned short dataLengthInBytes) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~VoERTCPObserver() {}
|
virtual ~VoERTCPObserver() {}
|
||||||
@ -209,7 +209,7 @@ public:
|
|||||||
|
|
||||||
// Sends an RTCP APP packet on a specific |channel|.
|
// Sends an RTCP APP packet on a specific |channel|.
|
||||||
virtual int SendApplicationDefinedRTCPPacket(
|
virtual int SendApplicationDefinedRTCPPacket(
|
||||||
int channel, const unsigned char subType, unsigned int name,
|
int channel, unsigned char subType, unsigned int name,
|
||||||
const char* data, unsigned short dataLengthInBytes) = 0;
|
const char* data, unsigned short dataLengthInBytes) = 0;
|
||||||
|
|
||||||
// Sets the Forward Error Correction (FEC) status on a specific |channel|.
|
// Sets the Forward Error Correction (FEC) status on a specific |channel|.
|
||||||
|
@ -61,7 +61,7 @@ MonitorModule::Version(char* version,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
MonitorModule::ChangeUniqueId(const int32_t id)
|
MonitorModule::ChangeUniqueId(int32_t id)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ public: // module
|
|||||||
uint32_t& remainingBufferInBytes,
|
uint32_t& remainingBufferInBytes,
|
||||||
uint32_t& position) const;
|
uint32_t& position) const;
|
||||||
|
|
||||||
int32_t ChangeUniqueId(const int32_t id);
|
int32_t ChangeUniqueId(int32_t id);
|
||||||
|
|
||||||
int32_t TimeUntilNextProcess();
|
int32_t TimeUntilNextProcess();
|
||||||
|
|
||||||
|
@ -24,10 +24,10 @@ namespace webrtc {
|
|||||||
namespace voe {
|
namespace voe {
|
||||||
|
|
||||||
void
|
void
|
||||||
OutputMixer::NewMixedAudio(const int32_t id,
|
OutputMixer::NewMixedAudio(int32_t id,
|
||||||
const AudioFrame& generalAudioFrame,
|
const AudioFrame& generalAudioFrame,
|
||||||
const AudioFrame** uniqueAudioFrames,
|
const AudioFrame** uniqueAudioFrames,
|
||||||
const uint32_t size)
|
uint32_t size)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
|
||||||
"OutputMixer::NewMixedAudio(id=%d, size=%u)", id, size);
|
"OutputMixer::NewMixedAudio(id=%d, size=%u)", id, size);
|
||||||
@ -37,29 +37,29 @@ OutputMixer::NewMixedAudio(const int32_t id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void OutputMixer::MixedParticipants(
|
void OutputMixer::MixedParticipants(
|
||||||
const int32_t id,
|
int32_t id,
|
||||||
const ParticipantStatistics* participantStatistics,
|
const ParticipantStatistics* participantStatistics,
|
||||||
const uint32_t size)
|
uint32_t size)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
|
||||||
"OutputMixer::MixedParticipants(id=%d, size=%u)", id, size);
|
"OutputMixer::MixedParticipants(id=%d, size=%u)", id, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputMixer::VADPositiveParticipants(const int32_t id,
|
void OutputMixer::VADPositiveParticipants(int32_t id,
|
||||||
const ParticipantStatistics* participantStatistics, const uint32_t size)
|
const ParticipantStatistics* participantStatistics, uint32_t size)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
|
||||||
"OutputMixer::VADPositiveParticipants(id=%d, size=%u)",
|
"OutputMixer::VADPositiveParticipants(id=%d, size=%u)",
|
||||||
id, size);
|
id, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputMixer::MixedAudioLevel(const int32_t id, const uint32_t level)
|
void OutputMixer::MixedAudioLevel(int32_t id, uint32_t level)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
|
||||||
"OutputMixer::MixedAudioLevel(id=%d, level=%u)", id, level);
|
"OutputMixer::MixedAudioLevel(id=%d, level=%u)", id, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputMixer::PlayNotification(const int32_t id, const uint32_t durationMs)
|
void OutputMixer::PlayNotification(int32_t id, uint32_t durationMs)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
|
||||||
"OutputMixer::PlayNotification(id=%d, durationMs=%d)",
|
"OutputMixer::PlayNotification(id=%d, durationMs=%d)",
|
||||||
@ -67,8 +67,8 @@ void OutputMixer::PlayNotification(const int32_t id, const uint32_t durationMs)
|
|||||||
// Not implement yet
|
// Not implement yet
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputMixer::RecordNotification(const int32_t id,
|
void OutputMixer::RecordNotification(int32_t id,
|
||||||
const uint32_t durationMs)
|
uint32_t durationMs)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
|
||||||
"OutputMixer::RecordNotification(id=%d, durationMs=%d)",
|
"OutputMixer::RecordNotification(id=%d, durationMs=%d)",
|
||||||
@ -77,7 +77,7 @@ void OutputMixer::RecordNotification(const int32_t id,
|
|||||||
// Not implement yet
|
// Not implement yet
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputMixer::PlayFileEnded(const int32_t id)
|
void OutputMixer::PlayFileEnded(int32_t id)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
|
||||||
"OutputMixer::PlayFileEnded(id=%d)", id);
|
"OutputMixer::PlayFileEnded(id=%d)", id);
|
||||||
@ -85,7 +85,7 @@ void OutputMixer::PlayFileEnded(const int32_t id)
|
|||||||
// not needed
|
// not needed
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutputMixer::RecordFileEnded(const int32_t id)
|
void OutputMixer::RecordFileEnded(int32_t id)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
|
||||||
"OutputMixer::RecordFileEnded(id=%d)", id);
|
"OutputMixer::RecordFileEnded(id=%d)", id);
|
||||||
@ -99,7 +99,7 @@ void OutputMixer::RecordFileEnded(const int32_t id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
OutputMixer::Create(OutputMixer*& mixer, const uint32_t instanceId)
|
OutputMixer::Create(OutputMixer*& mixer, uint32_t instanceId)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceMemory, kTraceVoice, instanceId,
|
WEBRTC_TRACE(kTraceMemory, kTraceVoice, instanceId,
|
||||||
"OutputMixer::Create(instanceId=%d)", instanceId);
|
"OutputMixer::Create(instanceId=%d)", instanceId);
|
||||||
@ -114,7 +114,7 @@ OutputMixer::Create(OutputMixer*& mixer, const uint32_t instanceId)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
OutputMixer::OutputMixer(const uint32_t instanceId) :
|
OutputMixer::OutputMixer(uint32_t instanceId) :
|
||||||
_callbackCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
|
_callbackCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
|
||||||
_fileCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
|
_fileCritSect(*CriticalSectionWrapper::CreateCriticalSection()),
|
||||||
_mixerModule(*AudioConferenceMixer::Create(instanceId)),
|
_mixerModule(*AudioConferenceMixer::Create(instanceId)),
|
||||||
@ -262,14 +262,14 @@ int OutputMixer::StopPlayingDtmfTone()
|
|||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
OutputMixer::SetMixabilityStatus(MixerParticipant& participant,
|
OutputMixer::SetMixabilityStatus(MixerParticipant& participant,
|
||||||
const bool mixable)
|
bool mixable)
|
||||||
{
|
{
|
||||||
return _mixerModule.SetMixabilityStatus(participant, mixable);
|
return _mixerModule.SetMixabilityStatus(participant, mixable);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
OutputMixer::SetAnonymousMixabilityStatus(MixerParticipant& participant,
|
OutputMixer::SetAnonymousMixabilityStatus(MixerParticipant& participant,
|
||||||
const bool mixable)
|
bool mixable)
|
||||||
{
|
{
|
||||||
return _mixerModule.SetAnonymousMixabilityStatus(participant,mixable);
|
return _mixerModule.SetAnonymousMixabilityStatus(participant,mixable);
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ class OutputMixer : public AudioMixerOutputReceiver,
|
|||||||
public FileCallback
|
public FileCallback
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static int32_t Create(OutputMixer*& mixer, const uint32_t instanceId);
|
static int32_t Create(OutputMixer*& mixer, uint32_t instanceId);
|
||||||
|
|
||||||
static void Destroy(OutputMixer*& mixer);
|
static void Destroy(OutputMixer*& mixer);
|
||||||
|
|
||||||
@ -63,10 +63,10 @@ public:
|
|||||||
int32_t DoOperationsOnCombinedSignal();
|
int32_t DoOperationsOnCombinedSignal();
|
||||||
|
|
||||||
int32_t SetMixabilityStatus(MixerParticipant& participant,
|
int32_t SetMixabilityStatus(MixerParticipant& participant,
|
||||||
const bool mixable);
|
bool mixable);
|
||||||
|
|
||||||
int32_t SetAnonymousMixabilityStatus(MixerParticipant& participant,
|
int32_t SetAnonymousMixabilityStatus(MixerParticipant& participant,
|
||||||
const bool mixable);
|
bool mixable);
|
||||||
|
|
||||||
int GetMixedAudio(int sample_rate_hz, int num_channels,
|
int GetMixedAudio(int sample_rate_hz, int num_channels,
|
||||||
AudioFrame* audioFrame);
|
AudioFrame* audioFrame);
|
||||||
@ -92,34 +92,34 @@ public:
|
|||||||
|
|
||||||
// from AudioMixerOutputReceiver
|
// from AudioMixerOutputReceiver
|
||||||
virtual void NewMixedAudio(
|
virtual void NewMixedAudio(
|
||||||
const int32_t id,
|
int32_t id,
|
||||||
const AudioFrame& generalAudioFrame,
|
const AudioFrame& generalAudioFrame,
|
||||||
const AudioFrame** uniqueAudioFrames,
|
const AudioFrame** uniqueAudioFrames,
|
||||||
const uint32_t size);
|
uint32_t size);
|
||||||
|
|
||||||
// from AudioMixerStatusReceiver
|
// from AudioMixerStatusReceiver
|
||||||
virtual void MixedParticipants(
|
virtual void MixedParticipants(
|
||||||
const int32_t id,
|
int32_t id,
|
||||||
const ParticipantStatistics* participantStatistics,
|
const ParticipantStatistics* participantStatistics,
|
||||||
const uint32_t size);
|
uint32_t size);
|
||||||
|
|
||||||
virtual void VADPositiveParticipants(
|
virtual void VADPositiveParticipants(
|
||||||
const int32_t id,
|
int32_t id,
|
||||||
const ParticipantStatistics* participantStatistics,
|
const ParticipantStatistics* participantStatistics,
|
||||||
const uint32_t size);
|
uint32_t size);
|
||||||
|
|
||||||
virtual void MixedAudioLevel(const int32_t id, const uint32_t level);
|
virtual void MixedAudioLevel(int32_t id, uint32_t level);
|
||||||
|
|
||||||
// For file recording
|
// For file recording
|
||||||
void PlayNotification(const int32_t id, const uint32_t durationMs);
|
void PlayNotification(int32_t id, uint32_t durationMs);
|
||||||
|
|
||||||
void RecordNotification(const int32_t id, const uint32_t durationMs);
|
void RecordNotification(int32_t id, uint32_t durationMs);
|
||||||
|
|
||||||
void PlayFileEnded(const int32_t id);
|
void PlayFileEnded(int32_t id);
|
||||||
void RecordFileEnded(const int32_t id);
|
void RecordFileEnded(int32_t id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
OutputMixer(const uint32_t instanceId);
|
OutputMixer(uint32_t instanceId);
|
||||||
void APMAnalyzeReverseStream();
|
void APMAnalyzeReverseStream();
|
||||||
int InsertInbandDtmfTone();
|
int InsertInbandDtmfTone();
|
||||||
|
|
||||||
|
@ -104,16 +104,16 @@ uint16_t SharedData::NumOfSendingChannels()
|
|||||||
return nChannelsSending;
|
return nChannelsSending;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SharedData::SetLastError(const int32_t error) const {
|
void SharedData::SetLastError(int32_t error) const {
|
||||||
_engineStatistics.SetLastError(error);
|
_engineStatistics.SetLastError(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SharedData::SetLastError(const int32_t error,
|
void SharedData::SetLastError(int32_t error,
|
||||||
const TraceLevel level) const {
|
TraceLevel level) const {
|
||||||
_engineStatistics.SetLastError(error, level);
|
_engineStatistics.SetLastError(error, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SharedData::SetLastError(const int32_t error, const TraceLevel level,
|
void SharedData::SetLastError(int32_t error, TraceLevel level,
|
||||||
const char* msg) const {
|
const char* msg) const {
|
||||||
_engineStatistics.SetLastError(error, level, msg);
|
_engineStatistics.SetLastError(error, level, msg);
|
||||||
}
|
}
|
||||||
|
@ -58,9 +58,9 @@ public:
|
|||||||
uint16_t NumOfSendingChannels();
|
uint16_t NumOfSendingChannels();
|
||||||
|
|
||||||
// Convenience methods for calling statistics().SetLastError().
|
// Convenience methods for calling statistics().SetLastError().
|
||||||
void SetLastError(const int32_t error) const;
|
void SetLastError(int32_t error) const;
|
||||||
void SetLastError(const int32_t error, const TraceLevel level) const;
|
void SetLastError(int32_t error, TraceLevel level) const;
|
||||||
void SetLastError(const int32_t error, const TraceLevel level,
|
void SetLastError(int32_t error, TraceLevel level,
|
||||||
const char* msg) const;
|
const char* msg) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -20,7 +20,7 @@ namespace webrtc {
|
|||||||
|
|
||||||
namespace voe {
|
namespace voe {
|
||||||
|
|
||||||
Statistics::Statistics(const uint32_t instanceId) :
|
Statistics::Statistics(uint32_t instanceId) :
|
||||||
_critPtr(CriticalSectionWrapper::CreateCriticalSection()),
|
_critPtr(CriticalSectionWrapper::CreateCriticalSection()),
|
||||||
_instanceId(instanceId),
|
_instanceId(instanceId),
|
||||||
_lastError(0),
|
_lastError(0),
|
||||||
@ -54,15 +54,15 @@ bool Statistics::Initialized() const
|
|||||||
return _isInitialized;
|
return _isInitialized;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t Statistics::SetLastError(const int32_t error) const
|
int32_t Statistics::SetLastError(int32_t error) const
|
||||||
{
|
{
|
||||||
CriticalSectionScoped cs(_critPtr);
|
CriticalSectionScoped cs(_critPtr);
|
||||||
_lastError = error;
|
_lastError = error;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t Statistics::SetLastError(const int32_t error,
|
int32_t Statistics::SetLastError(int32_t error,
|
||||||
const TraceLevel level) const
|
TraceLevel level) const
|
||||||
{
|
{
|
||||||
CriticalSectionScoped cs(_critPtr);
|
CriticalSectionScoped cs(_critPtr);
|
||||||
_lastError = error;
|
_lastError = error;
|
||||||
@ -73,8 +73,8 @@ int32_t Statistics::SetLastError(const int32_t error,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t Statistics::SetLastError(
|
int32_t Statistics::SetLastError(
|
||||||
const int32_t error,
|
int32_t error,
|
||||||
const TraceLevel level, const char* msg) const
|
TraceLevel level, const char* msg) const
|
||||||
{
|
{
|
||||||
CriticalSectionScoped cs(_critPtr);
|
CriticalSectionScoped cs(_critPtr);
|
||||||
char traceMessage[KTraceMaxMessageSize];
|
char traceMessage[KTraceMaxMessageSize];
|
||||||
|
@ -26,16 +26,16 @@ class Statistics
|
|||||||
public:
|
public:
|
||||||
enum {KTraceMaxMessageSize = 256};
|
enum {KTraceMaxMessageSize = 256};
|
||||||
public:
|
public:
|
||||||
Statistics(const uint32_t instanceId);
|
Statistics(uint32_t instanceId);
|
||||||
~Statistics();
|
~Statistics();
|
||||||
|
|
||||||
int32_t SetInitialized();
|
int32_t SetInitialized();
|
||||||
int32_t SetUnInitialized();
|
int32_t SetUnInitialized();
|
||||||
bool Initialized() const;
|
bool Initialized() const;
|
||||||
int32_t SetLastError(const int32_t error) const;
|
int32_t SetLastError(int32_t error) const;
|
||||||
int32_t SetLastError(const int32_t error, const TraceLevel level) const;
|
int32_t SetLastError(int32_t error, TraceLevel level) const;
|
||||||
int32_t SetLastError(const int32_t error,
|
int32_t SetLastError(int32_t error,
|
||||||
const TraceLevel level,
|
TraceLevel level,
|
||||||
const char* msg) const;
|
const char* msg) const;
|
||||||
int32_t LastError() const;
|
int32_t LastError() const;
|
||||||
|
|
||||||
|
@ -14,12 +14,12 @@
|
|||||||
|
|
||||||
class FakeMediaProcess : public webrtc::VoEMediaProcess {
|
class FakeMediaProcess : public webrtc::VoEMediaProcess {
|
||||||
public:
|
public:
|
||||||
virtual void Process(const int channel,
|
virtual void Process(int channel,
|
||||||
const webrtc::ProcessingTypes type,
|
const webrtc::ProcessingTypes type,
|
||||||
int16_t audio_10ms[],
|
int16_t audio_10ms[],
|
||||||
const int length,
|
int length,
|
||||||
const int sampling_freq_hz,
|
int sampling_freq_hz,
|
||||||
const bool stereo) {
|
bool stereo) {
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
if (!stereo) {
|
if (!stereo) {
|
||||||
audio_10ms[i] = static_cast<int16_t>(audio_10ms[i] *
|
audio_10ms[i] = static_cast<int16_t>(audio_10ms[i] *
|
||||||
|
@ -14,7 +14,7 @@ class TestErrorObserver : public webrtc::VoiceEngineObserver {
|
|||||||
public:
|
public:
|
||||||
TestErrorObserver() {}
|
TestErrorObserver() {}
|
||||||
virtual ~TestErrorObserver() {}
|
virtual ~TestErrorObserver() {}
|
||||||
void CallbackOnError(const int channel, const int error_code) {
|
void CallbackOnError(int channel, int error_code) {
|
||||||
ADD_FAILURE() << "Unexpected error on channel " << channel <<
|
ADD_FAILURE() << "Unexpected error on channel " << channel <<
|
||||||
": error code " << error_code;
|
": error code " << error_code;
|
||||||
}
|
}
|
||||||
|
@ -16,11 +16,11 @@ class TestRtpObserver : public webrtc::VoERTPObserver {
|
|||||||
public:
|
public:
|
||||||
TestRtpObserver();
|
TestRtpObserver();
|
||||||
virtual ~TestRtpObserver();
|
virtual ~TestRtpObserver();
|
||||||
virtual void OnIncomingCSRCChanged(const int channel,
|
virtual void OnIncomingCSRCChanged(int channel,
|
||||||
const unsigned int CSRC,
|
unsigned int CSRC,
|
||||||
const bool added);
|
bool added);
|
||||||
virtual void OnIncomingSSRCChanged(const int channel,
|
virtual void OnIncomingSSRCChanged(int channel,
|
||||||
const unsigned int SSRC);
|
unsigned int SSRC);
|
||||||
void Reset();
|
void Reset();
|
||||||
public:
|
public:
|
||||||
unsigned int ssrc_[2];
|
unsigned int ssrc_[2];
|
||||||
@ -47,9 +47,9 @@ void TestRtpObserver::Reset() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestRtpObserver::OnIncomingCSRCChanged(const int channel,
|
void TestRtpObserver::OnIncomingCSRCChanged(int channel,
|
||||||
const unsigned int CSRC,
|
unsigned int CSRC,
|
||||||
const bool added) {
|
bool added) {
|
||||||
char msg[128];
|
char msg[128];
|
||||||
sprintf(msg, "=> OnIncomingCSRCChanged(channel=%d, CSRC=%u, added=%d)\n",
|
sprintf(msg, "=> OnIncomingCSRCChanged(channel=%d, CSRC=%u, added=%d)\n",
|
||||||
channel, CSRC, added);
|
channel, CSRC, added);
|
||||||
@ -66,8 +66,8 @@ void TestRtpObserver::OnIncomingCSRCChanged(const int channel,
|
|||||||
size_[channel] = 0;
|
size_[channel] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestRtpObserver::OnIncomingSSRCChanged(const int channel,
|
void TestRtpObserver::OnIncomingSSRCChanged(int channel,
|
||||||
const unsigned int SSRC) {
|
unsigned int SSRC) {
|
||||||
char msg[128];
|
char msg[128];
|
||||||
sprintf(msg, "\n=> OnIncomingSSRCChanged(channel=%d, SSRC=%u)\n", channel,
|
sprintf(msg, "\n=> OnIncomingSSRCChanged(channel=%d, SSRC=%u)\n", channel,
|
||||||
SSRC);
|
SSRC);
|
||||||
@ -78,11 +78,11 @@ void TestRtpObserver::OnIncomingSSRCChanged(const int channel,
|
|||||||
|
|
||||||
class RtcpAppHandler : public webrtc::VoERTCPObserver {
|
class RtcpAppHandler : public webrtc::VoERTCPObserver {
|
||||||
public:
|
public:
|
||||||
void OnApplicationDataReceived(const int channel,
|
void OnApplicationDataReceived(int channel,
|
||||||
const unsigned char sub_type,
|
unsigned char sub_type,
|
||||||
const unsigned int name,
|
unsigned int name,
|
||||||
const unsigned char* data,
|
const unsigned char* data,
|
||||||
const unsigned short length_in_bytes);
|
unsigned short length_in_bytes);
|
||||||
void Reset();
|
void Reset();
|
||||||
~RtcpAppHandler() {}
|
~RtcpAppHandler() {}
|
||||||
unsigned short length_in_bytes_;
|
unsigned short length_in_bytes_;
|
||||||
@ -125,9 +125,9 @@ class RtpRtcpTest : public AfterStreamingFixture {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void RtcpAppHandler::OnApplicationDataReceived(
|
void RtcpAppHandler::OnApplicationDataReceived(
|
||||||
const int /*channel*/, const unsigned char sub_type,
|
const int /*channel*/, unsigned char sub_type,
|
||||||
const unsigned int name, const unsigned char* data,
|
unsigned int name, const unsigned char* data,
|
||||||
const unsigned short length_in_bytes) {
|
unsigned short length_in_bytes) {
|
||||||
length_in_bytes_ = length_in_bytes;
|
length_in_bytes_ = length_in_bytes;
|
||||||
memcpy(data_, &data[0], length_in_bytes);
|
memcpy(data_, &data[0], length_in_bytes);
|
||||||
sub_type_ = sub_type;
|
sub_type_ = sub_type;
|
||||||
|
@ -169,7 +169,7 @@ void XRTPObserver::OnIncomingCSRCChanged(const int /*channel*/, const unsigned i
|
|||||||
const bool /*added*/) {
|
const bool /*added*/) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void XRTPObserver::OnIncomingSSRCChanged(const int /*channel*/, const unsigned int SSRC) {
|
void XRTPObserver::OnIncomingSSRCChanged(const int /*channel*/, unsigned int SSRC) {
|
||||||
// char msg[128];
|
// char msg[128];
|
||||||
// sprintf(msg, "OnIncomingSSRCChanged(channel=%d, SSRC=%lu)\n",
|
// sprintf(msg, "OnIncomingSSRCChanged(channel=%d, SSRC=%lu)\n",
|
||||||
// channel, SSRC);
|
// channel, SSRC);
|
||||||
@ -199,7 +199,7 @@ int VoEExtendedTest::TestPassed(const char* str) const {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VoEExtendedTest::OnPeriodicDeadOrAlive(const int /*channel*/, const bool alive) {
|
void VoEExtendedTest::OnPeriodicDeadOrAlive(const int /*channel*/, bool alive) {
|
||||||
_alive = alive;
|
_alive = alive;
|
||||||
if (alive) {
|
if (alive) {
|
||||||
TEST_LOG("=> ALIVE ");
|
TEST_LOG("=> ALIVE ");
|
||||||
@ -209,7 +209,7 @@ void VoEExtendedTest::OnPeriodicDeadOrAlive(const int /*channel*/, const bool al
|
|||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VoEExtendedTest::CallbackOnError(const int errCode, int) {
|
void VoEExtendedTest::CallbackOnError(int errCode, int) {
|
||||||
_errCode = errCode;
|
_errCode = errCode;
|
||||||
TEST_LOG("\n************************\n");
|
TEST_LOG("\n************************\n");
|
||||||
TEST_LOG(" RUNTIME ERROR: %d \n", errCode);
|
TEST_LOG(" RUNTIME ERROR: %d \n", errCode);
|
||||||
|
@ -55,7 +55,7 @@ class AudioDeviceModuleImpl : public AudioDeviceModule {
|
|||||||
uint32_t& position) const {
|
uint32_t& position) const {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
virtual int32_t ChangeUniqueId(const int32_t id) {
|
virtual int32_t ChangeUniqueId(int32_t id) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
virtual int32_t TimeUntilNextProcess() {
|
virtual int32_t TimeUntilNextProcess() {
|
||||||
@ -284,14 +284,14 @@ class AudioDeviceModuleImpl : public AudioDeviceModule {
|
|||||||
virtual int32_t StereoRecording(bool* enabled) const {
|
virtual int32_t StereoRecording(bool* enabled) const {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
virtual int32_t SetRecordingChannel(const ChannelType channel) {
|
virtual int32_t SetRecordingChannel(ChannelType channel) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
virtual int32_t RecordingChannel(ChannelType* channel) const {
|
virtual int32_t RecordingChannel(ChannelType* channel) const {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int32_t SetPlayoutBuffer(const BufferType type, uint16_t sizeMS = 0) {
|
virtual int32_t SetPlayoutBuffer(BufferType type, uint16_t sizeMS = 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
virtual int32_t PlayoutBuffer(BufferType* type, uint16_t* sizeMS) const {
|
virtual int32_t PlayoutBuffer(BufferType* type, uint16_t* sizeMS) const {
|
||||||
@ -323,13 +323,13 @@ class AudioDeviceModuleImpl : public AudioDeviceModule {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int32_t SetRecordingSampleRate(const uint32_t samplesPerSec) {
|
virtual int32_t SetRecordingSampleRate(uint32_t samplesPerSec) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
virtual int32_t RecordingSampleRate(uint32_t* samplesPerSec) const {
|
virtual int32_t RecordingSampleRate(uint32_t* samplesPerSec) const {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
virtual int32_t SetPlayoutSampleRate(const uint32_t samplesPerSec) {
|
virtual int32_t SetPlayoutSampleRate(uint32_t samplesPerSec) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
virtual int32_t PlayoutSampleRate(uint32_t* samplesPerSec) const {
|
virtual int32_t PlayoutSampleRate(uint32_t* samplesPerSec) const {
|
||||||
@ -398,11 +398,11 @@ class XRTPObserver : public VoERTPObserver {
|
|||||||
public:
|
public:
|
||||||
XRTPObserver();
|
XRTPObserver();
|
||||||
~XRTPObserver();
|
~XRTPObserver();
|
||||||
virtual void OnIncomingCSRCChanged(const int channel,
|
virtual void OnIncomingCSRCChanged(int channel,
|
||||||
const unsigned int CSRC,
|
unsigned int CSRC,
|
||||||
const bool added);
|
bool added);
|
||||||
virtual void OnIncomingSSRCChanged(const int channel,
|
virtual void OnIncomingSSRCChanged(int channel,
|
||||||
const unsigned int SSRC);
|
unsigned int SSRC);
|
||||||
public:
|
public:
|
||||||
unsigned int _SSRC;
|
unsigned int _SSRC;
|
||||||
};
|
};
|
||||||
@ -442,12 +442,12 @@ class VoEExtendedTest : public VoiceEngineObserver,
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// from VoiceEngineObserver
|
// from VoiceEngineObserver
|
||||||
void CallbackOnError(const int errCode, const int channel);
|
void CallbackOnError(int errCode, int channel);
|
||||||
void CallbackOnTrace(const TraceLevel level, const char* message,
|
void CallbackOnTrace(TraceLevel level, const char* message,
|
||||||
const int length);
|
int length);
|
||||||
|
|
||||||
// from VoEConnectionObserver
|
// from VoEConnectionObserver
|
||||||
void OnPeriodicDeadOrAlive(const int channel, const bool alive);
|
void OnPeriodicDeadOrAlive(int channel, bool alive);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Play(int channel, unsigned int timeMillisec,
|
void Play(int channel, unsigned int timeMillisec,
|
||||||
|
@ -65,10 +65,10 @@ void RunTest(std::string out_path);
|
|||||||
|
|
||||||
class MyObserver : public VoiceEngineObserver {
|
class MyObserver : public VoiceEngineObserver {
|
||||||
public:
|
public:
|
||||||
virtual void CallbackOnError(const int channel, const int err_code);
|
virtual void CallbackOnError(int channel, int err_code);
|
||||||
};
|
};
|
||||||
|
|
||||||
void MyObserver::CallbackOnError(const int channel, const int err_code) {
|
void MyObserver::CallbackOnError(int channel, int err_code) {
|
||||||
// Add printf for other error codes here
|
// Add printf for other error codes here
|
||||||
if (err_code == VE_TYPING_NOISE_WARNING) {
|
if (err_code == VE_TYPING_NOISE_WARNING) {
|
||||||
printf(" TYPING NOISE DETECTED \n");
|
printf(" TYPING NOISE DETECTED \n");
|
||||||
|
@ -61,14 +61,14 @@ class ConnectionObserver : public VoEConnectionObserver
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ConnectionObserver();
|
ConnectionObserver();
|
||||||
virtual void OnPeriodicDeadOrAlive(const int channel, const bool alive);
|
virtual void OnPeriodicDeadOrAlive(int channel, bool alive);
|
||||||
};
|
};
|
||||||
|
|
||||||
ConnectionObserver::ConnectionObserver()
|
ConnectionObserver::ConnectionObserver()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConnectionObserver::OnPeriodicDeadOrAlive(const int channel, const bool alive)
|
void ConnectionObserver::OnPeriodicDeadOrAlive(int channel, bool alive)
|
||||||
{
|
{
|
||||||
CString str;
|
CString str;
|
||||||
str.Format(_T("OnPeriodicDeadOrAlive(channel=%d) => alive=%d"), channel, alive);
|
str.Format(_T("OnPeriodicDeadOrAlive(channel=%d) => alive=%d"), channel, alive);
|
||||||
@ -79,7 +79,7 @@ void ConnectionObserver::OnPeriodicDeadOrAlive(const int channel, const bool ali
|
|||||||
// VoiceEngineObserver
|
// VoiceEngineObserver
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
void CWinTestDlg::CallbackOnError(const int channel, const int errCode)
|
void CWinTestDlg::CallbackOnError(int channel, int errCode)
|
||||||
{
|
{
|
||||||
_nErrorCallbacks++;
|
_nErrorCallbacks++;
|
||||||
|
|
||||||
@ -129,14 +129,14 @@ void CWinTestDlg::CallbackOnError(const int channel, const int errCode)
|
|||||||
// VoERTPObserver
|
// VoERTPObserver
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
void CWinTestDlg::OnIncomingCSRCChanged(const int channel, const unsigned int CSRC, const bool added)
|
void CWinTestDlg::OnIncomingCSRCChanged(int channel, unsigned int CSRC, bool added)
|
||||||
{
|
{
|
||||||
CString str;
|
CString str;
|
||||||
str.Format(_T("OnIncomingCSRCChanged(channel=%d) => CSRC=%u, added=%d"), channel, CSRC, added);
|
str.Format(_T("OnIncomingCSRCChanged(channel=%d) => CSRC=%u, added=%d"), channel, CSRC, added);
|
||||||
SetDlgItemText(IDC_EDIT_ERROR_CALLBACK, (LPCTSTR)str);
|
SetDlgItemText(IDC_EDIT_ERROR_CALLBACK, (LPCTSTR)str);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWinTestDlg::OnIncomingSSRCChanged(const int channel, const unsigned int SSRC)
|
void CWinTestDlg::OnIncomingSSRCChanged(int channel, unsigned int SSRC)
|
||||||
{
|
{
|
||||||
CString str;
|
CString str;
|
||||||
str.Format(_T("OnIncomingSSRCChanged(channel=%d) => SSRC=%u"), channel, SSRC);
|
str.Format(_T("OnIncomingSSRCChanged(channel=%d) => SSRC=%u"), channel, SSRC);
|
||||||
@ -184,24 +184,24 @@ class MediaProcessImpl : public VoEMediaProcess
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MediaProcessImpl();
|
MediaProcessImpl();
|
||||||
virtual void Process(const int channel,
|
virtual void Process(int channel,
|
||||||
const ProcessingTypes type,
|
ProcessingTypes type,
|
||||||
int16_t audio_10ms[],
|
int16_t audio_10ms[],
|
||||||
const int length,
|
int length,
|
||||||
const int samplingFreqHz,
|
int samplingFreqHz,
|
||||||
const bool stereo);
|
bool stereo);
|
||||||
};
|
};
|
||||||
|
|
||||||
MediaProcessImpl::MediaProcessImpl()
|
MediaProcessImpl::MediaProcessImpl()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void MediaProcessImpl::Process(const int channel,
|
void MediaProcessImpl::Process(int channel,
|
||||||
const ProcessingTypes type,
|
ProcessingTypes type,
|
||||||
int16_t audio_10ms[],
|
int16_t audio_10ms[],
|
||||||
const int length,
|
int length,
|
||||||
const int samplingFreqHz,
|
int samplingFreqHz,
|
||||||
const bool stereo)
|
bool stereo)
|
||||||
{
|
{
|
||||||
int x = rand() % 100;
|
int x = rand() % 100;
|
||||||
|
|
||||||
|
@ -125,13 +125,13 @@ protected:
|
|||||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||||
|
|
||||||
protected: // VoiceEngineObserver
|
protected: // VoiceEngineObserver
|
||||||
virtual void CallbackOnError(const int channel, const int errCode);
|
virtual void CallbackOnError(int channel, int errCode);
|
||||||
|
|
||||||
protected: // VoERTPObserver
|
protected: // VoERTPObserver
|
||||||
virtual void OnIncomingCSRCChanged(
|
virtual void OnIncomingCSRCChanged(
|
||||||
const int channel, const unsigned int CSRC, const bool added);
|
int channel, unsigned int CSRC, bool added);
|
||||||
virtual void OnIncomingSSRCChanged(
|
virtual void OnIncomingSSRCChanged(
|
||||||
const int channel, const unsigned int SSRC);
|
int channel, unsigned int SSRC);
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
protected:
|
protected:
|
||||||
|
@ -81,8 +81,8 @@ TransmitMixer::OnPeriodicProcess()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TransmitMixer::PlayNotification(const int32_t id,
|
void TransmitMixer::PlayNotification(int32_t id,
|
||||||
const uint32_t durationMs)
|
uint32_t durationMs)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, -1),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, -1),
|
||||||
"TransmitMixer::PlayNotification(id=%d, durationMs=%d)",
|
"TransmitMixer::PlayNotification(id=%d, durationMs=%d)",
|
||||||
@ -91,8 +91,8 @@ void TransmitMixer::PlayNotification(const int32_t id,
|
|||||||
// Not implement yet
|
// Not implement yet
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransmitMixer::RecordNotification(const int32_t id,
|
void TransmitMixer::RecordNotification(int32_t id,
|
||||||
const uint32_t durationMs)
|
uint32_t durationMs)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId,-1),
|
||||||
"TransmitMixer::RecordNotification(id=%d, durationMs=%d)",
|
"TransmitMixer::RecordNotification(id=%d, durationMs=%d)",
|
||||||
@ -101,7 +101,7 @@ void TransmitMixer::RecordNotification(const int32_t id,
|
|||||||
// Not implement yet
|
// Not implement yet
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransmitMixer::PlayFileEnded(const int32_t id)
|
void TransmitMixer::PlayFileEnded(int32_t id)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, -1),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, -1),
|
||||||
"TransmitMixer::PlayFileEnded(id=%d)", id);
|
"TransmitMixer::PlayFileEnded(id=%d)", id);
|
||||||
@ -117,7 +117,7 @@ void TransmitMixer::PlayFileEnded(const int32_t id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TransmitMixer::RecordFileEnded(const int32_t id)
|
TransmitMixer::RecordFileEnded(int32_t id)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, -1),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, -1),
|
||||||
"TransmitMixer::RecordFileEnded(id=%d)", id);
|
"TransmitMixer::RecordFileEnded(id=%d)", id);
|
||||||
@ -140,7 +140,7 @@ TransmitMixer::RecordFileEnded(const int32_t id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
TransmitMixer::Create(TransmitMixer*& mixer, const uint32_t instanceId)
|
TransmitMixer::Create(TransmitMixer*& mixer, uint32_t instanceId)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(instanceId, -1),
|
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(instanceId, -1),
|
||||||
"TransmitMixer::Create(instanceId=%d)", instanceId);
|
"TransmitMixer::Create(instanceId=%d)", instanceId);
|
||||||
@ -165,7 +165,7 @@ TransmitMixer::Destroy(TransmitMixer*& mixer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TransmitMixer::TransmitMixer(const uint32_t instanceId) :
|
TransmitMixer::TransmitMixer(uint32_t instanceId) :
|
||||||
_engineStatisticsPtr(NULL),
|
_engineStatisticsPtr(NULL),
|
||||||
_channelManagerPtr(NULL),
|
_channelManagerPtr(NULL),
|
||||||
audioproc_(NULL),
|
audioproc_(NULL),
|
||||||
@ -327,13 +327,13 @@ void TransmitMixer::GetSendCodecInfo(int* max_sample_rate, int* max_channels) {
|
|||||||
|
|
||||||
int32_t
|
int32_t
|
||||||
TransmitMixer::PrepareDemux(const void* audioSamples,
|
TransmitMixer::PrepareDemux(const void* audioSamples,
|
||||||
const uint32_t nSamples,
|
uint32_t nSamples,
|
||||||
const uint8_t nChannels,
|
uint8_t nChannels,
|
||||||
const uint32_t samplesPerSec,
|
uint32_t samplesPerSec,
|
||||||
const uint16_t totalDelayMS,
|
uint16_t totalDelayMS,
|
||||||
const int32_t clockDrift,
|
int32_t clockDrift,
|
||||||
const uint16_t currentMicLevel,
|
uint16_t currentMicLevel,
|
||||||
const bool keyPressed)
|
bool keyPressed)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, -1),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_instanceId, -1),
|
||||||
"TransmitMixer::PrepareDemux(nSamples=%u, nChannels=%u,"
|
"TransmitMixer::PrepareDemux(nSamples=%u, nChannels=%u,"
|
||||||
@ -470,7 +470,7 @@ uint32_t TransmitMixer::CaptureLevel() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TransmitMixer::UpdateMuteMicrophoneTime(const uint32_t lengthMs)
|
TransmitMixer::UpdateMuteMicrophoneTime(uint32_t lengthMs)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, -1),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, -1),
|
||||||
"TransmitMixer::UpdateMuteMicrophoneTime(lengthMs=%d)",
|
"TransmitMixer::UpdateMuteMicrophoneTime(lengthMs=%d)",
|
||||||
@ -488,11 +488,11 @@ TransmitMixer::StopSend()
|
|||||||
}
|
}
|
||||||
|
|
||||||
int TransmitMixer::StartPlayingFileAsMicrophone(const char* fileName,
|
int TransmitMixer::StartPlayingFileAsMicrophone(const char* fileName,
|
||||||
const bool loop,
|
bool loop,
|
||||||
const FileFormats format,
|
FileFormats format,
|
||||||
const int startPosition,
|
int startPosition,
|
||||||
const float volumeScaling,
|
float volumeScaling,
|
||||||
const int stopPosition,
|
int stopPosition,
|
||||||
const CodecInst* codecInst)
|
const CodecInst* codecInst)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, -1),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, -1),
|
||||||
@ -559,10 +559,10 @@ int TransmitMixer::StartPlayingFileAsMicrophone(const char* fileName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int TransmitMixer::StartPlayingFileAsMicrophone(InStream* stream,
|
int TransmitMixer::StartPlayingFileAsMicrophone(InStream* stream,
|
||||||
const FileFormats format,
|
FileFormats format,
|
||||||
const int startPosition,
|
int startPosition,
|
||||||
const float volumeScaling,
|
float volumeScaling,
|
||||||
const int stopPosition,
|
int stopPosition,
|
||||||
const CodecInst* codecInst)
|
const CodecInst* codecInst)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,-1),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,-1),
|
||||||
@ -671,7 +671,7 @@ int TransmitMixer::IsPlayingFileAsMicrophone() const
|
|||||||
return _filePlaying;
|
return _filePlaying;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TransmitMixer::ScaleFileAsMicrophonePlayout(const float scale)
|
int TransmitMixer::ScaleFileAsMicrophonePlayout(float scale)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, -1),
|
WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, -1),
|
||||||
"TransmitMixer::ScaleFileAsMicrophonePlayout(scale=%5.3f)",
|
"TransmitMixer::ScaleFileAsMicrophonePlayout(scale=%5.3f)",
|
||||||
@ -1208,7 +1208,7 @@ int TransmitMixer::GenerateAudioFrame(const int16_t audio[],
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t TransmitMixer::RecordAudioToFile(
|
int32_t TransmitMixer::RecordAudioToFile(
|
||||||
const uint32_t mixingFrequency)
|
uint32_t mixingFrequency)
|
||||||
{
|
{
|
||||||
CriticalSectionScoped cs(&_critSect);
|
CriticalSectionScoped cs(&_critSect);
|
||||||
if (_fileRecorderPtr == NULL)
|
if (_fileRecorderPtr == NULL)
|
||||||
@ -1231,7 +1231,7 @@ int32_t TransmitMixer::RecordAudioToFile(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t TransmitMixer::MixOrReplaceAudioWithFile(
|
int32_t TransmitMixer::MixOrReplaceAudioWithFile(
|
||||||
const int mixingFrequency)
|
int mixingFrequency)
|
||||||
{
|
{
|
||||||
scoped_array<int16_t> fileBuffer(new int16_t[640]);
|
scoped_array<int16_t> fileBuffer(new int16_t[640]);
|
||||||
|
|
||||||
@ -1328,7 +1328,7 @@ void TransmitMixer::ProcessAudio(int delay_ms, int clock_drift,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WEBRTC_VOICE_ENGINE_TYPING_DETECTION
|
#ifdef WEBRTC_VOICE_ENGINE_TYPING_DETECTION
|
||||||
int TransmitMixer::TypingDetection(const bool keyPressed)
|
int TransmitMixer::TypingDetection(bool keyPressed)
|
||||||
{
|
{
|
||||||
|
|
||||||
// We let the VAD determine if we're using this feature or not.
|
// We let the VAD determine if we're using this feature or not.
|
||||||
|
@ -39,7 +39,7 @@ class TransmitMixer : public MonitorObserver,
|
|||||||
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static int32_t Create(TransmitMixer*& mixer, const uint32_t instanceId);
|
static int32_t Create(TransmitMixer*& mixer, uint32_t instanceId);
|
||||||
|
|
||||||
static void Destroy(TransmitMixer*& mixer);
|
static void Destroy(TransmitMixer*& mixer);
|
||||||
|
|
||||||
@ -51,13 +51,13 @@ public:
|
|||||||
AudioProcessing* audioProcessingModule);
|
AudioProcessing* audioProcessingModule);
|
||||||
|
|
||||||
int32_t PrepareDemux(const void* audioSamples,
|
int32_t PrepareDemux(const void* audioSamples,
|
||||||
const uint32_t nSamples,
|
uint32_t nSamples,
|
||||||
const uint8_t nChannels,
|
uint8_t nChannels,
|
||||||
const uint32_t samplesPerSec,
|
uint32_t samplesPerSec,
|
||||||
const uint16_t totalDelayMS,
|
uint16_t totalDelayMS,
|
||||||
const int32_t clockDrift,
|
int32_t clockDrift,
|
||||||
const uint16_t currentMicLevel,
|
uint16_t currentMicLevel,
|
||||||
const bool keyPressed);
|
bool keyPressed);
|
||||||
|
|
||||||
|
|
||||||
int32_t DemuxAndMix();
|
int32_t DemuxAndMix();
|
||||||
@ -69,7 +69,7 @@ public:
|
|||||||
int32_t StopSend();
|
int32_t StopSend();
|
||||||
|
|
||||||
// VoEDtmf
|
// VoEDtmf
|
||||||
void UpdateMuteMicrophoneTime(const uint32_t lengthMs);
|
void UpdateMuteMicrophoneTime(uint32_t lengthMs);
|
||||||
|
|
||||||
// VoEExternalMedia
|
// VoEExternalMedia
|
||||||
int RegisterExternalMediaProcessing(VoEMediaProcess* object,
|
int RegisterExternalMediaProcessing(VoEMediaProcess* object,
|
||||||
@ -79,7 +79,7 @@ public:
|
|||||||
int GetMixingFrequency();
|
int GetMixingFrequency();
|
||||||
|
|
||||||
// VoEVolumeControl
|
// VoEVolumeControl
|
||||||
int SetMute(const bool enable);
|
int SetMute(bool enable);
|
||||||
|
|
||||||
bool Mute() const;
|
bool Mute() const;
|
||||||
|
|
||||||
@ -92,25 +92,25 @@ public:
|
|||||||
bool IsRecordingMic();
|
bool IsRecordingMic();
|
||||||
|
|
||||||
int StartPlayingFileAsMicrophone(const char* fileName,
|
int StartPlayingFileAsMicrophone(const char* fileName,
|
||||||
const bool loop,
|
bool loop,
|
||||||
const FileFormats format,
|
FileFormats format,
|
||||||
const int startPosition,
|
int startPosition,
|
||||||
const float volumeScaling,
|
float volumeScaling,
|
||||||
const int stopPosition,
|
int stopPosition,
|
||||||
const CodecInst* codecInst);
|
const CodecInst* codecInst);
|
||||||
|
|
||||||
int StartPlayingFileAsMicrophone(InStream* stream,
|
int StartPlayingFileAsMicrophone(InStream* stream,
|
||||||
const FileFormats format,
|
FileFormats format,
|
||||||
const int startPosition,
|
int startPosition,
|
||||||
const float volumeScaling,
|
float volumeScaling,
|
||||||
const int stopPosition,
|
int stopPosition,
|
||||||
const CodecInst* codecInst);
|
const CodecInst* codecInst);
|
||||||
|
|
||||||
int StopPlayingFileAsMicrophone();
|
int StopPlayingFileAsMicrophone();
|
||||||
|
|
||||||
int IsPlayingFileAsMicrophone() const;
|
int IsPlayingFileAsMicrophone() const;
|
||||||
|
|
||||||
int ScaleFileAsMicrophonePlayout(const float scale);
|
int ScaleFileAsMicrophonePlayout(float scale);
|
||||||
|
|
||||||
int StartRecordingMicrophone(const char* fileName,
|
int StartRecordingMicrophone(const char* fileName,
|
||||||
const CodecInst* codecInst);
|
const CodecInst* codecInst);
|
||||||
@ -137,15 +137,15 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// FileCallback
|
// FileCallback
|
||||||
void PlayNotification(const int32_t id,
|
void PlayNotification(int32_t id,
|
||||||
const uint32_t durationMs);
|
uint32_t durationMs);
|
||||||
|
|
||||||
void RecordNotification(const int32_t id,
|
void RecordNotification(int32_t id,
|
||||||
const uint32_t durationMs);
|
uint32_t durationMs);
|
||||||
|
|
||||||
void PlayFileEnded(const int32_t id);
|
void PlayFileEnded(int32_t id);
|
||||||
|
|
||||||
void RecordFileEnded(const int32_t id);
|
void RecordFileEnded(int32_t id);
|
||||||
|
|
||||||
#ifdef WEBRTC_VOICE_ENGINE_TYPING_DETECTION
|
#ifdef WEBRTC_VOICE_ENGINE_TYPING_DETECTION
|
||||||
// Typing detection
|
// Typing detection
|
||||||
@ -161,7 +161,7 @@ public:
|
|||||||
bool IsStereoChannelSwappingEnabled();
|
bool IsStereoChannelSwappingEnabled();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TransmitMixer(const uint32_t instanceId);
|
TransmitMixer(uint32_t instanceId);
|
||||||
|
|
||||||
// Gets the maximum sample rate and number of channels over all currently
|
// Gets the maximum sample rate and number of channels over all currently
|
||||||
// sending codecs.
|
// sending codecs.
|
||||||
@ -171,15 +171,15 @@ private:
|
|||||||
int nSamples,
|
int nSamples,
|
||||||
int nChannels,
|
int nChannels,
|
||||||
int samplesPerSec);
|
int samplesPerSec);
|
||||||
int32_t RecordAudioToFile(const uint32_t mixingFrequency);
|
int32_t RecordAudioToFile(uint32_t mixingFrequency);
|
||||||
|
|
||||||
int32_t MixOrReplaceAudioWithFile(
|
int32_t MixOrReplaceAudioWithFile(
|
||||||
const int mixingFrequency);
|
int mixingFrequency);
|
||||||
|
|
||||||
void ProcessAudio(int delay_ms, int clock_drift, int current_mic_level);
|
void ProcessAudio(int delay_ms, int clock_drift, int current_mic_level);
|
||||||
|
|
||||||
#ifdef WEBRTC_VOICE_ENGINE_TYPING_DETECTION
|
#ifdef WEBRTC_VOICE_ENGINE_TYPING_DETECTION
|
||||||
int TypingDetection(const bool keyPressed);
|
int TypingDetection(bool keyPressed);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// uses
|
// uses
|
||||||
|
@ -19,9 +19,9 @@ namespace {
|
|||||||
|
|
||||||
class MediaCallback : public VoEMediaProcess {
|
class MediaCallback : public VoEMediaProcess {
|
||||||
public:
|
public:
|
||||||
virtual void Process(const int channel, const ProcessingTypes type,
|
virtual void Process(int channel, ProcessingTypes type,
|
||||||
int16_t audio[], const int samples_per_channel,
|
int16_t audio[], int samples_per_channel,
|
||||||
const int sample_rate_hz, const bool is_stereo) {
|
int sample_rate_hz, bool is_stereo) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ int VoEAudioProcessingImpl::GetAgcStatus(bool& enabled, AgcModes& mode) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int VoEAudioProcessingImpl::SetAgcConfig(const AgcConfig config) {
|
int VoEAudioProcessingImpl::SetAgcConfig(AgcConfig config) {
|
||||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||||
"SetAgcConfig()");
|
"SetAgcConfig()");
|
||||||
#ifdef WEBRTC_VOICE_ENGINE_AGC
|
#ifdef WEBRTC_VOICE_ENGINE_AGC
|
||||||
@ -437,7 +437,7 @@ int VoEAudioProcessingImpl::GetRxAgcStatus(int channel,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int VoEAudioProcessingImpl::SetRxAgcConfig(int channel,
|
int VoEAudioProcessingImpl::SetRxAgcConfig(int channel,
|
||||||
const AgcConfig config) {
|
AgcConfig config) {
|
||||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||||
"SetRxAgcConfig(channel=%d)", channel);
|
"SetRxAgcConfig(channel=%d)", channel);
|
||||||
#ifdef WEBRTC_VOICE_ENGINE_AGC
|
#ifdef WEBRTC_VOICE_ENGINE_AGC
|
||||||
|
@ -27,7 +27,7 @@ class VoEAudioProcessingImpl : public VoEAudioProcessing {
|
|||||||
|
|
||||||
virtual int GetAgcStatus(bool& enabled, AgcModes& mode);
|
virtual int GetAgcStatus(bool& enabled, AgcModes& mode);
|
||||||
|
|
||||||
virtual int SetAgcConfig(const AgcConfig config);
|
virtual int SetAgcConfig(AgcConfig config);
|
||||||
|
|
||||||
virtual int GetAgcConfig(AgcConfig& config);
|
virtual int GetAgcConfig(AgcConfig& config);
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ class VoEAudioProcessingImpl : public VoEAudioProcessing {
|
|||||||
|
|
||||||
virtual int GetRxAgcStatus(int channel, bool& enabled, AgcModes& mode);
|
virtual int GetRxAgcStatus(int channel, bool& enabled, AgcModes& mode);
|
||||||
|
|
||||||
virtual int SetRxAgcConfig(int channel, const AgcConfig config);
|
virtual int SetRxAgcConfig(int channel, AgcConfig config);
|
||||||
|
|
||||||
virtual int GetRxAgcConfig(int channel, AgcConfig& config);
|
virtual int GetRxAgcConfig(int channel, AgcConfig& config);
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ VoEBaseImpl::~VoEBaseImpl()
|
|||||||
delete &_callbackCritSect;
|
delete &_callbackCritSect;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VoEBaseImpl::OnErrorIsReported(const ErrorCode error)
|
void VoEBaseImpl::OnErrorIsReported(ErrorCode error)
|
||||||
{
|
{
|
||||||
CriticalSectionScoped cs(&_callbackCritSect);
|
CriticalSectionScoped cs(&_callbackCritSect);
|
||||||
if (_voiceEngineObserver)
|
if (_voiceEngineObserver)
|
||||||
@ -94,7 +94,7 @@ void VoEBaseImpl::OnErrorIsReported(const ErrorCode error)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void VoEBaseImpl::OnWarningIsReported(const WarningCode warning)
|
void VoEBaseImpl::OnWarningIsReported(WarningCode warning)
|
||||||
{
|
{
|
||||||
CriticalSectionScoped cs(&_callbackCritSect);
|
CriticalSectionScoped cs(&_callbackCritSect);
|
||||||
if (_voiceEngineObserver)
|
if (_voiceEngineObserver)
|
||||||
@ -126,14 +126,14 @@ void VoEBaseImpl::OnWarningIsReported(const WarningCode warning)
|
|||||||
|
|
||||||
int32_t VoEBaseImpl::RecordedDataIsAvailable(
|
int32_t VoEBaseImpl::RecordedDataIsAvailable(
|
||||||
const void* audioSamples,
|
const void* audioSamples,
|
||||||
const uint32_t nSamples,
|
uint32_t nSamples,
|
||||||
const uint8_t nBytesPerSample,
|
uint8_t nBytesPerSample,
|
||||||
const uint8_t nChannels,
|
uint8_t nChannels,
|
||||||
const uint32_t samplesPerSec,
|
uint32_t samplesPerSec,
|
||||||
const uint32_t totalDelayMS,
|
uint32_t totalDelayMS,
|
||||||
const int32_t clockDrift,
|
int32_t clockDrift,
|
||||||
const uint32_t currentMicLevel,
|
uint32_t currentMicLevel,
|
||||||
const bool keyPressed,
|
bool keyPressed,
|
||||||
uint32_t& newMicLevel)
|
uint32_t& newMicLevel)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
WEBRTC_TRACE(kTraceStream, kTraceVoice, VoEId(_shared->instance_id(), -1),
|
||||||
@ -232,10 +232,10 @@ int32_t VoEBaseImpl::RecordedDataIsAvailable(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t VoEBaseImpl::NeedMorePlayData(
|
int32_t VoEBaseImpl::NeedMorePlayData(
|
||||||
const uint32_t nSamples,
|
uint32_t nSamples,
|
||||||
const uint8_t nBytesPerSample,
|
uint8_t nBytesPerSample,
|
||||||
const uint8_t nChannels,
|
uint8_t nChannels,
|
||||||
const uint32_t samplesPerSec,
|
uint32_t samplesPerSec,
|
||||||
void* audioSamples,
|
void* audioSamples,
|
||||||
uint32_t& nSamplesOut)
|
uint32_t& nSamplesOut)
|
||||||
{
|
{
|
||||||
|
@ -73,26 +73,26 @@ public:
|
|||||||
// AudioTransport
|
// AudioTransport
|
||||||
virtual int32_t
|
virtual int32_t
|
||||||
RecordedDataIsAvailable(const void* audioSamples,
|
RecordedDataIsAvailable(const void* audioSamples,
|
||||||
const uint32_t nSamples,
|
uint32_t nSamples,
|
||||||
const uint8_t nBytesPerSample,
|
uint8_t nBytesPerSample,
|
||||||
const uint8_t nChannels,
|
uint8_t nChannels,
|
||||||
const uint32_t samplesPerSec,
|
uint32_t samplesPerSec,
|
||||||
const uint32_t totalDelayMS,
|
uint32_t totalDelayMS,
|
||||||
const int32_t clockDrift,
|
int32_t clockDrift,
|
||||||
const uint32_t currentMicLevel,
|
uint32_t currentMicLevel,
|
||||||
const bool keyPressed,
|
bool keyPressed,
|
||||||
uint32_t& newMicLevel);
|
uint32_t& newMicLevel);
|
||||||
|
|
||||||
virtual int32_t NeedMorePlayData(const uint32_t nSamples,
|
virtual int32_t NeedMorePlayData(uint32_t nSamples,
|
||||||
const uint8_t nBytesPerSample,
|
uint8_t nBytesPerSample,
|
||||||
const uint8_t nChannels,
|
uint8_t nChannels,
|
||||||
const uint32_t samplesPerSec,
|
uint32_t samplesPerSec,
|
||||||
void* audioSamples,
|
void* audioSamples,
|
||||||
uint32_t& nSamplesOut);
|
uint32_t& nSamplesOut);
|
||||||
|
|
||||||
// AudioDeviceObserver
|
// AudioDeviceObserver
|
||||||
virtual void OnErrorIsReported(const ErrorCode error);
|
virtual void OnErrorIsReported(ErrorCode error);
|
||||||
virtual void OnWarningIsReported(const WarningCode warning);
|
virtual void OnWarningIsReported(WarningCode warning);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
VoEBaseImpl(voe::SharedData* shared);
|
VoEBaseImpl(voe::SharedData* shared);
|
||||||
|
@ -403,7 +403,7 @@ int VoERTP_RTCPImpl::GetRemoteRTCPData(
|
|||||||
|
|
||||||
int VoERTP_RTCPImpl::SendApplicationDefinedRTCPPacket(
|
int VoERTP_RTCPImpl::SendApplicationDefinedRTCPPacket(
|
||||||
int channel,
|
int channel,
|
||||||
const unsigned char subType,
|
unsigned char subType,
|
||||||
unsigned int name,
|
unsigned int name,
|
||||||
const char* data,
|
const char* data,
|
||||||
unsigned short dataLengthInBytes)
|
unsigned short dataLengthInBytes)
|
||||||
|
@ -50,7 +50,7 @@ public:
|
|||||||
|
|
||||||
virtual int SendApplicationDefinedRTCPPacket(
|
virtual int SendApplicationDefinedRTCPPacket(
|
||||||
int channel,
|
int channel,
|
||||||
const unsigned char subType,
|
unsigned char subType,
|
||||||
unsigned int name,
|
unsigned int name,
|
||||||
const char* data,
|
const char* data,
|
||||||
unsigned short dataLengthInBytes);
|
unsigned short dataLengthInBytes);
|
||||||
|
@ -197,7 +197,7 @@ enum { kVoiceEngineMaxRtpExtensionId = 14 };
|
|||||||
namespace webrtc
|
namespace webrtc
|
||||||
{
|
{
|
||||||
|
|
||||||
inline int VoEId(const int veId, const int chId)
|
inline int VoEId(int veId, int chId)
|
||||||
{
|
{
|
||||||
if (chId == -1)
|
if (chId == -1)
|
||||||
{
|
{
|
||||||
@ -207,13 +207,13 @@ inline int VoEId(const int veId, const int chId)
|
|||||||
return (int) ((veId << 16) + chId);
|
return (int) ((veId << 16) + chId);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int VoEModuleId(const int veId, const int chId)
|
inline int VoEModuleId(int veId, int chId)
|
||||||
{
|
{
|
||||||
return (int) ((veId << 16) + chId);
|
return (int) ((veId << 16) + chId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert module ID to internal VoE channel ID
|
// Convert module ID to internal VoE channel ID
|
||||||
inline int VoEChannelId(const int moduleId)
|
inline int VoEChannelId(int moduleId)
|
||||||
{
|
{
|
||||||
return (int) (moduleId & 0xffff);
|
return (int) (moduleId & 0xffff);
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ VoiceEngine* VoiceEngine::Create()
|
|||||||
return GetVoiceEngine();
|
return GetVoiceEngine();
|
||||||
}
|
}
|
||||||
|
|
||||||
int VoiceEngine::SetTraceFilter(const unsigned int filter)
|
int VoiceEngine::SetTraceFilter(unsigned int filter)
|
||||||
{
|
{
|
||||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice,
|
WEBRTC_TRACE(kTraceApiCall, kTraceVoice,
|
||||||
VoEId(gVoiceEngineInstanceCounter, -1),
|
VoEId(gVoiceEngineInstanceCounter, -1),
|
||||||
@ -104,7 +104,7 @@ int VoiceEngine::SetTraceFilter(const unsigned int filter)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int VoiceEngine::SetTraceFile(const char* fileNameUTF8,
|
int VoiceEngine::SetTraceFile(const char* fileNameUTF8,
|
||||||
const bool addFileCounter)
|
bool addFileCounter)
|
||||||
{
|
{
|
||||||
int ret = Trace::SetTraceFile(fileNameUTF8, addFileCounter);
|
int ret = Trace::SetTraceFile(fileNameUTF8, addFileCounter);
|
||||||
WEBRTC_TRACE(kTraceApiCall, kTraceVoice,
|
WEBRTC_TRACE(kTraceApiCall, kTraceVoice,
|
||||||
|
Loading…
Reference in New Issue
Block a user