Update talk to 50918584.
Together with Stefan's http://review.webrtc.org/1960004/. R=mallinath@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2048004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4556 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -15,6 +15,8 @@
|
||||
#include <map>
|
||||
|
||||
#include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h"
|
||||
#include "webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h"
|
||||
#include "webrtc/modules/rtp_rtcp/interface/rtp_receiver.h"
|
||||
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
|
||||
#include "webrtc/modules/video_coding/main/source/internal_defines.h"
|
||||
#include "webrtc/modules/video_coding/main/test/pcap_file_reader.h"
|
||||
@ -217,8 +219,9 @@ class SsrcHandlers {
|
||||
RtpRtcp::Configuration configuration;
|
||||
configuration.id = 1;
|
||||
configuration.audio = false;
|
||||
configuration.incoming_data = handler->payload_sink_.get();
|
||||
handler->rtp_module_.reset(RtpRtcp::CreateRtpRtcp(configuration));
|
||||
handler->rtp_module_.reset(RtpReceiver::CreateVideoReceiver(
|
||||
configuration.id, configuration.clock, handler->payload_sink_.get(),
|
||||
NULL, handler->rtp_payload_registry_.get()));
|
||||
if (handler->rtp_module_.get() == NULL) {
|
||||
return -1;
|
||||
}
|
||||
@ -227,9 +230,6 @@ class SsrcHandlers {
|
||||
kMaxPacketAgeToNack) < 0) {
|
||||
return -1;
|
||||
}
|
||||
handler->rtp_module_->SetRTCPStatus(kRtcpNonCompound);
|
||||
handler->rtp_module_->SetREMBStatus(true);
|
||||
handler->rtp_module_->SetSSRCFilter(true, ssrc);
|
||||
handler->rtp_header_parser_->RegisterRtpHeaderExtension(
|
||||
kRtpExtensionTransmissionTimeOffset,
|
||||
kDefaultTransmissionTimeOffsetExtensionId);
|
||||
@ -241,7 +241,11 @@ class SsrcHandlers {
|
||||
strncpy(codec.plName, it->name().c_str(), sizeof(codec.plName)-1);
|
||||
codec.plType = it->payload_type();
|
||||
codec.codecType = it->codec_type();
|
||||
if (handler->rtp_module_->RegisterReceivePayload(codec) < 0) {
|
||||
if (handler->rtp_module_->RegisterReceivePayload(codec.plName,
|
||||
codec.plType,
|
||||
90000,
|
||||
0,
|
||||
codec.maxBitrate) < 0) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -250,20 +254,18 @@ class SsrcHandlers {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Process() {
|
||||
for (HandlerMapIt it = handlers_.begin(); it != handlers_.end(); ++it) {
|
||||
it->second->rtp_module_->Process();
|
||||
}
|
||||
}
|
||||
|
||||
void IncomingPacket(const uint8_t* data, uint32_t length) {
|
||||
for (HandlerMapIt it = handlers_.begin(); it != handlers_.end(); ++it) {
|
||||
if (it->second->rtp_header_parser_->IsRtcp(data, length)) {
|
||||
it->second->rtp_module_->IncomingRtcpPacket(data, length);
|
||||
} else {
|
||||
if (!it->second->rtp_header_parser_->IsRtcp(data, length)) {
|
||||
RTPHeader header;
|
||||
it->second->rtp_header_parser_->Parse(data, length, &header);
|
||||
it->second->rtp_module_->IncomingRtpPacket(data, length, header);
|
||||
PayloadUnion payload_specific;
|
||||
it->second->rtp_payload_registry_->GetPayloadSpecifics(
|
||||
header.payloadType, &payload_specific);
|
||||
bool in_order =
|
||||
it->second->rtp_module_->InOrderPacket(header.sequenceNumber);
|
||||
it->second->rtp_module_->IncomingRtpPacket(&header, data, length,
|
||||
payload_specific, in_order);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -274,6 +276,8 @@ class SsrcHandlers {
|
||||
Handler(uint32_t ssrc, const PayloadTypes& payload_types,
|
||||
LostPackets* lost_packets)
|
||||
: rtp_header_parser_(RtpHeaderParser::Create()),
|
||||
rtp_payload_registry_(new RTPPayloadRegistry(
|
||||
0, RTPPayloadStrategy::CreateStrategy(false))),
|
||||
rtp_module_(),
|
||||
payload_sink_(),
|
||||
ssrc_(ssrc),
|
||||
@ -297,7 +301,8 @@ class SsrcHandlers {
|
||||
}
|
||||
|
||||
scoped_ptr<RtpHeaderParser> rtp_header_parser_;
|
||||
scoped_ptr<RtpRtcp> rtp_module_;
|
||||
scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_;
|
||||
scoped_ptr<RtpReceiver> rtp_module_;
|
||||
scoped_ptr<PayloadSinkInterface> payload_sink_;
|
||||
|
||||
private:
|
||||
@ -367,8 +372,6 @@ class RtpPlayerImpl : public RtpPlayerInterface {
|
||||
|
||||
// Send any packets from packet source.
|
||||
if (!end_of_file_ && (TimeUntilNextPacket() == 0 || first_packet_)) {
|
||||
ssrc_handlers_.Process();
|
||||
|
||||
if (first_packet_) {
|
||||
next_packet_length_ = sizeof(next_packet_);
|
||||
if (packet_source_->NextPacket(next_packet_, &next_packet_length_,
|
||||
|
||||
Reference in New Issue
Block a user