Remove TimeToSendPacket and TimeToSendPadding from the default module.
Thie CL moves the default RTP module logic for TimeToSendPacket and TimeToSendPadding to PayloadRouter class and asserts on usage of the default module. BUG=769 TEST=New unittest. R=stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/33319004 Cr-Commit-Position: refs/heads/master@{#8383} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8383 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -71,6 +71,29 @@ bool PayloadRouter::RoutePayload(FrameType frame_type,
|
||||
payload_length, fragmentation, rtp_video_hdr) == 0 ? true : false;
|
||||
}
|
||||
|
||||
bool PayloadRouter::TimeToSendPacket(uint32_t ssrc,
|
||||
uint16_t sequence_number,
|
||||
int64_t capture_timestamp,
|
||||
bool retransmission) {
|
||||
CriticalSectionScoped cs(crit_.get());
|
||||
for (auto* rtp_module : rtp_modules_) {
|
||||
if (rtp_module->SendingMedia() && ssrc == rtp_module->SSRC()) {
|
||||
return rtp_module->TimeToSendPacket(ssrc, sequence_number,
|
||||
capture_timestamp, retransmission);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
size_t PayloadRouter::TimeToSendPadding(size_t bytes) {
|
||||
CriticalSectionScoped cs(crit_.get());
|
||||
for(auto* rtp_module : rtp_modules_) {
|
||||
if (rtp_module->SendingMedia())
|
||||
return rtp_module->TimeToSendPadding(bytes);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t PayloadRouter::MaxPayloadLength() const {
|
||||
size_t min_payload_length = DefaultMaxPayloadLength();
|
||||
CriticalSectionScoped cs(crit_.get());
|
||||
|
||||
Reference in New Issue
Block a user