Moved almost all payload-related stuff to the payload registry.

The big benefit is we no longer have a circular dependency between the media receiver and the payload registry. The payload registry is starting to take a bit more place on the stage, and now knows how to do different things depending on audio or video.

BUG=
TESTED=rtp_rtcp_unittests, vie_auto_test, voe_auto_test

Review URL: https://webrtc-codereview.appspot.com/1078004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3465 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
phoglund@webrtc.org
2013-02-04 13:23:07 +00:00
parent fa53d8717c
commit 244251a9cd
13 changed files with 523 additions and 296 deletions

View File

@ -85,7 +85,9 @@ RtpRtcp* RtpRtcp::CreateRtpRtcp(const RtpRtcp::Configuration& configuration) {
}
ModuleRtpRtcpImpl::ModuleRtpRtcpImpl(const Configuration& configuration)
: rtp_payload_registry_(configuration.id),
: rtp_payload_registry_(
configuration.id,
RTPPayloadStrategy::CreateStrategy(configuration.audio)),
rtp_sender_(configuration.id,
configuration.audio,
configuration.clock,
@ -138,10 +140,6 @@ ModuleRtpRtcpImpl::ModuleRtpRtcpImpl(const Configuration& configuration)
new RTPReceiverVideo(configuration.id, &rtp_payload_registry_,
configuration.incoming_data);
}
// TODO(phoglund): Get rid of this silly circular dependency between the
// payload manager and the video RTP receiver.
rtp_payload_registry_.set_rtp_media_receiver(rtp_receiver_strategy);
rtp_receiver_.reset(new RTPReceiver(
configuration.id, configuration.clock, this,
configuration.audio_messages, configuration.incoming_data,