git-svn-id: http://webrtc.googlecode.com/svn/trunk@413 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mallinath@webrtc.org 2011-08-22 18:33:51 +00:00
parent eb29a9789d
commit 6f555dcafe
3 changed files with 24 additions and 1 deletions

View File

@ -270,6 +270,10 @@ bool ParseJSONSignalingMessage(const std::string& signaling_message,
cricket::AudioContentDescription* audio_content =
new cricket::AudioContentDescription();
ParseAudioCodec(mlines[i], audio_content);
// enabling RTCP mux by default at both ends, without
// exchanging it through signaling message.
audio_content->set_rtcp_mux(true);
audio_content->SortCodecs();
sdp->AddContent(cricket::CN_AUDIO, cricket::NS_JINGLE_RTP, audio_content);
ParseICECandidates(mlines[i], candidates);
@ -277,6 +281,10 @@ bool ParseJSONSignalingMessage(const std::string& signaling_message,
cricket::VideoContentDescription* video_content =
new cricket::VideoContentDescription();
ParseVideoCodec(mlines[i], video_content);
// enabling RTCP mux by default at both ends, without
// exchanging it through signaling message.
video_content->set_rtcp_mux(true);
video_content->SortCodecs();
sdp->AddContent(cricket::CN_VIDEO, cricket::NS_JINGLE_RTP, video_content);
ParseICECandidates(mlines[i], candidates);

View File

@ -612,6 +612,9 @@ cricket::SessionDescription* WebRtcSession::CreateOffer() {
video->AddCodec(*codec);
}
// enabling RTCP mux by default at both ends, without
// exchanging it through signaling message.
video->set_rtcp_mux(true);
video->SortCodecs();
offer->AddContent(cricket::CN_VIDEO, cricket::NS_JINGLE_RTP, video);
} else {
@ -625,6 +628,9 @@ cricket::SessionDescription* WebRtcSession::CreateOffer() {
audio->AddCodec(*codec);
}
// enabling RTCP mux by default at both ends, without
// exchanging it through signaling message.
audio->set_rtcp_mux(true);
audio->SortCodecs();
offer->AddContent(cricket::CN_AUDIO, cricket::NS_JINGLE_RTP, audio);
}
@ -658,6 +664,10 @@ cricket::SessionDescription* WebRtcSession::CreateAnswer(
}
}
}
// enabling RTCP mux by default at both ends, without
// exchanging it through signaling message.
audio_accept->set_rtcp_mux(true);
audio_accept->SortCodecs();
answer->AddContent(audio_content->name, audio_content->type, audio_accept);
}
@ -684,6 +694,10 @@ cricket::SessionDescription* WebRtcSession::CreateAnswer(
}
}
}
// enabling RTCP mux by default at both ends, without
// exchanging it through signaling message.
video_accept->set_rtcp_mux(true);
video_accept->SortCodecs();
answer->AddContent(video_content->name, video_content->type, video_accept);
}

View File

@ -566,7 +566,7 @@ bool WebRtcVideoMediaChannel::Init() {
vie_channel_, *this) != 0) {
ret = false;
} else {
// EnableRtcp(); // by default RTCP is disabled.
EnableRtcp();
EnablePLI();
}
return ret;
@ -901,6 +901,7 @@ int WebRtcVideoMediaChannel::SendPacket(int channel, const void* data,
if (!network_interface_) {
return -1;
}
talk_base::Buffer packet(data, len, kMaxRtpPacketLen);
return network_interface_->SendPacket(&packet) ? len : -1;
}