removed NetEq::EnableDtmf()
BUG=webrtc:1373 R=turaj@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1822005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4492 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -85,7 +85,6 @@ NetEqImpl::NetEqImpl(int fs,
|
||||
current_cng_rtp_payload_type_(0xFF), // Invalid RTP payload type.
|
||||
ssrc_(0),
|
||||
first_packet_(true),
|
||||
dtmf_enabled_(true),
|
||||
error_code_(0),
|
||||
decoder_error_code_(0),
|
||||
crit_sect_(CriticalSectionWrapper::CreateCriticalSection()) {
|
||||
@ -247,12 +246,6 @@ bool NetEqImpl::SetExtraDelay(int extra_delay_ms) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int NetEqImpl::EnableDtmf() {
|
||||
CriticalSectionScoped lock(crit_sect_);
|
||||
dtmf_enabled_ = true;
|
||||
return kOK;
|
||||
}
|
||||
|
||||
void NetEqImpl::SetPlayoutMode(NetEqPlayoutMode mode) {
|
||||
CriticalSectionScoped lock(crit_sect_);
|
||||
if (!decision_logic_.get() || mode != decision_logic_->playout_mode()) {
|
||||
@ -448,24 +441,22 @@ int NetEqImpl::InsertPacketInternal(const WebRtcRTPHeader& rtp_header,
|
||||
assert(current_packet);
|
||||
assert(current_packet->payload);
|
||||
if (decoder_database_->IsDtmf(current_packet->header.payloadType)) {
|
||||
if (dtmf_enabled_) {
|
||||
DtmfEvent event;
|
||||
int ret = DtmfBuffer::ParseEvent(
|
||||
current_packet->header.timestamp,
|
||||
current_packet->payload,
|
||||
current_packet->payload_length,
|
||||
&event);
|
||||
if (ret != DtmfBuffer::kOK) {
|
||||
LOG_FERR2(LS_WARNING, ParseEvent, ret,
|
||||
current_packet->payload_length);
|
||||
PacketBuffer::DeleteAllPackets(&packet_list);
|
||||
return kDtmfParsingError;
|
||||
}
|
||||
if (dtmf_buffer_->InsertEvent(event) != DtmfBuffer::kOK) {
|
||||
LOG_FERR0(LS_WARNING, InsertEvent);
|
||||
PacketBuffer::DeleteAllPackets(&packet_list);
|
||||
return kDtmfInsertError;
|
||||
}
|
||||
DtmfEvent event;
|
||||
int ret = DtmfBuffer::ParseEvent(
|
||||
current_packet->header.timestamp,
|
||||
current_packet->payload,
|
||||
current_packet->payload_length,
|
||||
&event);
|
||||
if (ret != DtmfBuffer::kOK) {
|
||||
LOG_FERR2(LS_WARNING, ParseEvent, ret,
|
||||
current_packet->payload_length);
|
||||
PacketBuffer::DeleteAllPackets(&packet_list);
|
||||
return kDtmfParsingError;
|
||||
}
|
||||
if (dtmf_buffer_->InsertEvent(event) != DtmfBuffer::kOK) {
|
||||
LOG_FERR0(LS_WARNING, InsertEvent);
|
||||
PacketBuffer::DeleteAllPackets(&packet_list);
|
||||
return kDtmfInsertError;
|
||||
}
|
||||
// TODO(hlundin): Let the destructor of Packet handle the payload.
|
||||
delete [] current_packet->payload;
|
||||
|
||||
Reference in New Issue
Block a user