summaryrefslogtreecommitdiff
path: root/voice_engine/channel.h
diff options
context:
space:
mode:
authorstefan@webrtc.org <stefan@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-09-06 13:40:11 +0000
committerstefan@webrtc.org <stefan@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-09-06 13:40:11 +0000
commitdb74c61ddfa26c23d3e392b241c983010e10b1c5 (patch)
tree9d821acc914354c93a8e8b9e4d3ceabaab2fe0e5 /voice_engine/channel.h
parent401430209d88473fa9edc74c257757ae7eb8e069 (diff)
downloadwebrtc-db74c61ddfa26c23d3e392b241c983010e10b1c5.tar.gz
Adds support for combining RTX and FEC/RED.
This is accomplished by breaking out RTX and FEC/RED functionality from the RTP module and keeping track of the base payload type, that is the payload type received when not receiving RTX. Enables retransmissions over RTX by default in the loopback test. BUG=1811 TESTS=voe/vie_auto_test --automated and trybots. R=mflodman@webrtc.org, pbos@webrtc.org, xians@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2154004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@4692 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'voice_engine/channel.h')
-rw-r--r--voice_engine/channel.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/voice_engine/channel.h b/voice_engine/channel.h
index 34013069..a6147075 100644
--- a/voice_engine/channel.h
+++ b/voice_engine/channel.h
@@ -306,10 +306,7 @@ public:
uint16_t payloadSize,
const WebRtcRTPHeader* rtpHeader);
- bool OnRecoveredPacket(const uint8_t* packet, int packet_length) {
- // Generic FEC not supported for audio.
- return true;
- }
+ bool OnRecoveredPacket(const uint8_t* packet, int packet_length);
public:
// From RtpFeedback in the RTP/RTCP module
@@ -439,6 +436,12 @@ public:
uint32_t EncodeAndSend();
private:
+ bool ReceivePacket(const uint8_t* packet, int packet_length,
+ const RTPHeader& header, bool in_order);
+ bool HandleEncapsulation(const uint8_t* packet,
+ int packet_length,
+ const RTPHeader& header);
+ bool IsPacketInOrder(const RTPHeader& header) const;
bool IsPacketRetransmitted(const RTPHeader& header) const;
int ResendPackets(const uint16_t* sequence_numbers, int length);
int InsertInbandDtmfTone();
@@ -502,6 +505,7 @@ private:
uint32_t playout_delay_ms_;
uint32_t _numberOfDiscardedPackets;
uint16_t send_sequence_number_;
+ uint8_t restored_packet_[kVoiceEngineMaxIpPacketSizeBytes];
private:
// uses
@@ -571,6 +575,7 @@ private:
bool _rxApmIsEnabled;
bool _rxAgcIsEnabled;
bool _rxNsIsEnabled;
+ bool restored_packet_in_use_;
};
} // namespace voe