(Auto)update libjingle 69600065-> 69617317

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6507 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
buildbot@webrtc.org 2014-06-20 12:30:24 +00:00
parent f425b55eeb
commit 75ce92086c
2 changed files with 55 additions and 27 deletions

View File

@ -898,6 +898,42 @@ bool BaseChannel::CheckSrtpConfig(const std::vector<CryptoParams>& cryptos,
return true;
}
bool BaseChannel::SetRecvRtpHeaderExtensions_w(
const MediaContentDescription* content,
MediaChannel* media_channel,
std::string* error_desc) {
if (content->rtp_header_extensions_set()) {
if (!media_channel->SetRecvRtpHeaderExtensions(
content->rtp_header_extensions())) {
std::ostringstream desc;
desc << "Failed to set receive rtp header extensions for "
<< MediaTypeToString(content->type()) << " content.";
SafeSetError(desc.str(), error_desc);
return false;
}
}
return true;
}
bool BaseChannel::SetSendRtpHeaderExtensions_w(
const MediaContentDescription* content,
MediaChannel* media_channel,
std::string* error_desc) {
if (content->rtp_header_extensions_set()) {
if (!media_channel->SetSendRtpHeaderExtensions(
content->rtp_header_extensions())) {
std::ostringstream desc;
desc << "Failed to set send rtp header extensions for "
<< MediaTypeToString(content->type()) << " content.";
SafeSetError(desc.str(), error_desc);
return false;
} else {
MaybeCacheRtpAbsSendTimeHeaderExtension(content->rtp_header_extensions());
}
}
return true;
}
bool BaseChannel::SetSrtp_w(const std::vector<CryptoParams>& cryptos,
ContentAction action,
ContentSource src,
@ -1154,22 +1190,16 @@ bool BaseChannel::SetBaseLocalContent_w(const MediaContentDescription* content,
std::string* error_desc) {
// Cache secure_required_ for belt and suspenders check on SendPacket
secure_required_ = content->crypto_required() != CT_NONE;
bool ret = UpdateLocalStreams_w(content->streams(), action, error_desc);
// Set local RTP header extensions.
bool ret = SetRecvRtpHeaderExtensions_w(content, media_channel(), error_desc);
// Set local SRTP parameters (what we will encrypt with).
ret &= SetSrtp_w(content->cryptos(), action, CS_LOCAL, error_desc);
// Set local RTCP mux parameters.
ret &= SetRtcpMux_w(content->rtcp_mux(), action, CS_LOCAL, error_desc);
// Set local RTP header extensions.
if (content->rtp_header_extensions_set()) {
if (!media_channel()->SetRecvRtpHeaderExtensions(
content->rtp_header_extensions())) {
std::ostringstream desc;
desc << "Failed to set receive rtp header extensions for "
<< MediaTypeToString(content->type()) << " content.";
SafeSetError(desc.str(), error_desc);
ret = false;
}
}
// Call UpdateLocalStreams_w last to make sure as many settings as possible
// are already set when creating streams.
ret &= UpdateLocalStreams_w(content->streams(), action, error_desc);
set_local_content_direction(content->direction());
return ret;
}
@ -1177,25 +1207,12 @@ bool BaseChannel::SetBaseLocalContent_w(const MediaContentDescription* content,
bool BaseChannel::SetBaseRemoteContent_w(const MediaContentDescription* content,
ContentAction action,
std::string* error_desc) {
bool ret = UpdateRemoteStreams_w(content->streams(), action, error_desc);
// Set remote RTP header extensions.
bool ret = SetSendRtpHeaderExtensions_w(content, media_channel(), error_desc);
// Set remote SRTP parameters (what the other side will encrypt with).
ret &= SetSrtp_w(content->cryptos(), action, CS_REMOTE, error_desc);
// Set remote RTCP mux parameters.
ret &= SetRtcpMux_w(content->rtcp_mux(), action, CS_REMOTE, error_desc);
// Set remote RTP header extensions.
if (content->rtp_header_extensions_set()) {
if (!media_channel()->SetSendRtpHeaderExtensions(
content->rtp_header_extensions())) {
std::ostringstream desc;
desc << "Failed to set send rtp header extensions for "
<< MediaTypeToString(content->type()) << " content.";
SafeSetError(desc.str(), error_desc);
ret = false;
} else {
MaybeCacheRtpAbsSendTimeHeaderExtension(content->rtp_header_extensions());
}
}
if (!media_channel()->SetMaxSendBandwidth(content->bandwidth())) {
std::ostringstream desc;
desc << "Failed to set max send bandwidth for "
@ -1203,6 +1220,10 @@ bool BaseChannel::SetBaseRemoteContent_w(const MediaContentDescription* content,
SafeSetError(desc.str(), error_desc);
ret = false;
}
// Call UpdateRemoteStreams_w last to make sure as many settings as possible
// are already set when creating streams.
ret &= UpdateRemoteStreams_w(content->streams(), action, error_desc);
set_remote_content_direction(content->direction());
return ret;
}

View File

@ -324,6 +324,13 @@ class BaseChannel
void MaybeCacheRtpAbsSendTimeHeaderExtension(
const std::vector<RtpHeaderExtension>& extensions);
bool SetRecvRtpHeaderExtensions_w(const MediaContentDescription* content,
MediaChannel* media_channel,
std::string* error_desc);
bool SetSendRtpHeaderExtensions_w(const MediaContentDescription* content,
MediaChannel* media_channel,
std::string* error_desc);
bool CheckSrtpConfig(const std::vector<CryptoParams>& cryptos,
bool* dtls,
std::string* error_desc);