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:
@ -51,35 +51,18 @@ bool RTPReceiverVideo::ShouldReportCsrcChanges(
|
||||
return true;
|
||||
}
|
||||
|
||||
ModuleRTPUtility::Payload* RTPReceiverVideo::CreatePayloadType(
|
||||
WebRtc_Word32 RTPReceiverVideo::OnNewPayloadTypeCreated(
|
||||
const char payloadName[RTP_PAYLOAD_NAME_SIZE],
|
||||
const WebRtc_Word8 payloadType,
|
||||
const WebRtc_UWord32 frequency,
|
||||
const WebRtc_UWord8 channels,
|
||||
const WebRtc_UWord32 rate) {
|
||||
RtpVideoCodecTypes videoType = kRtpNoVideo;
|
||||
if (ModuleRTPUtility::StringCompare(payloadName, "VP8", 3)) {
|
||||
videoType = kRtpVp8Video;
|
||||
} else if (ModuleRTPUtility::StringCompare(payloadName, "I420", 4)) {
|
||||
videoType = kRtpNoVideo;
|
||||
} else if (ModuleRTPUtility::StringCompare(payloadName, "ULPFEC", 6)) {
|
||||
// store this
|
||||
const WebRtc_UWord32 frequency) {
|
||||
if (ModuleRTPUtility::StringCompare(payloadName, "ULPFEC", 6)) {
|
||||
// Enable FEC if not enabled.
|
||||
if (_receiveFEC == NULL) {
|
||||
_receiveFEC = new ReceiverFEC(_id, this);
|
||||
}
|
||||
_receiveFEC->SetPayloadTypeFEC(payloadType);
|
||||
videoType = kRtpFecVideo;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
ModuleRTPUtility::Payload* payload = new ModuleRTPUtility::Payload;
|
||||
|
||||
payload->name[RTP_PAYLOAD_NAME_SIZE - 1] = 0;
|
||||
strncpy(payload->name, payloadName, RTP_PAYLOAD_NAME_SIZE - 1);
|
||||
payload->typeSpecific.Video.videoCodecType = videoType;
|
||||
payload->typeSpecific.Video.maxRate = rate;
|
||||
payload->audio = false;
|
||||
return payload;
|
||||
return 0;
|
||||
}
|
||||
|
||||
WebRtc_Word32 RTPReceiverVideo::ParseRtpPacket(
|
||||
@ -109,20 +92,6 @@ RTPAliveType RTPReceiverVideo::ProcessDeadOrAlive(
|
||||
return kRtpDead;
|
||||
}
|
||||
|
||||
bool RTPReceiverVideo::PayloadIsCompatible(
|
||||
const ModuleRTPUtility::Payload& payload,
|
||||
const WebRtc_UWord32 frequency,
|
||||
const WebRtc_UWord8 channels,
|
||||
const WebRtc_UWord32 rate) const {
|
||||
return !payload.audio;
|
||||
}
|
||||
|
||||
void RTPReceiverVideo::UpdatePayloadRate(
|
||||
ModuleRTPUtility::Payload* payload,
|
||||
const WebRtc_UWord32 rate) const {
|
||||
payload->typeSpecific.Video.maxRate = rate;
|
||||
}
|
||||
|
||||
WebRtc_Word32 RTPReceiverVideo::InvokeOnInitializeDecoder(
|
||||
RtpFeedback* callback,
|
||||
const WebRtc_Word32 id,
|
||||
|
||||
Reference in New Issue
Block a user