Lines Matching refs:offer

182 static bool SelectCrypto(const MediaContentDescription* offer,
185 bool audio = offer->type() == MEDIA_TYPE_AUDIO;
186 const CryptoParamsVec& cryptos = offer->cryptos();
707 // stream is created. The created content is added to the offer.
718 MediaContentDescriptionImpl<C>* offer) {
719 offer->AddCodecs(codecs);
720 offer->SortCodecs();
723 offer->set_crypto_required(CT_SDES);
725 offer->set_rtcp_mux(options.rtcp_mux_enabled);
726 offer->set_multistream(options.is_muc);
727 offer->set_rtp_header_extensions(rtp_extensions);
730 offer->type(), options.streams, current_streams,
731 offer, add_legacy_stream)) {
738 AddMediaCryptos(*current_cryptos, offer);
740 if (offer->cryptos().empty()) {
741 if (!CreateMediaCryptos(crypto_suites, offer)) {
748 if (offer->crypto_required() == CT_SDES && offer->cryptos().empty()) {
781 // they were present in the offer.
927 // The codecs, rtcp_mux, and crypto are all negotiated with the offer
929 // method returns false. The created content is added to the offer.
932 const MediaContentDescriptionImpl<C>* offer,
943 NegotiateCodecs(local_codecs, offer->codecs(), &negotiated_codecs);
946 answer->set_protocol(offer->protocol());
949 offer->rtp_header_extensions(),
953 answer->set_rtcp_mux(options.rtcp_mux_enabled && offer->rtcp_mux());
957 if (SelectCrypto(offer, bundle_enabled, &crypto)) {
966 (offer->crypto_required() == CT_SDES || sdes_policy == SEC_REQUIRED)) {
978 switch (offer->direction()) {
1143 scoped_ptr<SessionDescription> offer(new SessionDescription());
1155 // If application doesn't want CN codecs in offer.
1169 // of the m-lines in the new offer.
1176 &current_streams, offer.get())) {
1183 &current_streams, offer.get())) {
1189 &current_streams, offer.get())) {
1202 &current_streams, offer.get())) {
1208 &current_streams, offer.get())) {
1213 &current_streams, offer.get())) {
1221 for (ContentInfos::const_iterator content = offer->contents().begin();
1222 content != offer->contents().end(); ++content) {
1225 offer->AddGroup(offer_bundle);
1226 if (!UpdateTransportInfoForBundle(offer_bundle, offer.get())) {
1230 if (!UpdateCryptoParamsForBundle(offer_bundle, offer.get())) {
1236 return offer.release();
1240 const SessionDescription* offer, const MediaSessionOptions& options,
1242 // The answer contains the intersection of the codecs in the offer with the
1244 // XEP-0167, we retain the same payload ids from the offer in the answer.
1250 if (offer) {
1251 ContentInfos::const_iterator it = offer->contents().begin();
1252 for (; it != offer->contents().end(); ++it) {
1254 if (!AddAudioContentForAnswer(offer, options, current_description,
1259 if (!AddVideoContentForAnswer(offer, options, current_description,
1265 if (!AddDataContentForAnswer(offer, options, current_description,
1273 // If the offer supports BUNDLE, and we want to use it too, create a BUNDLE
1275 if (offer->HasGroup(GROUP_TYPE_BUNDLE) && options.bundle_enabled) {
1276 const ContentGroup* offer_bundle = offer->GetGroupByName(GROUP_TYPE_BUNDLE);
1571 const SessionDescription* offer,
1576 const ContentInfo* audio_content = GetFirstAudioContent(offer);
1579 CreateTransportAnswer(audio_content->name, offer,
1592 offer->HasGroup(GROUP_TYPE_BUNDLE) && options.bundle_enabled;
1621 // The answer MUST contain the same number of m-lines as the offer.
1631 const SessionDescription* offer,
1636 const ContentInfo* video_content = GetFirstVideoContent(offer);
1638 CreateTransportAnswer(video_content->name, offer,
1651 offer->HasGroup(GROUP_TYPE_BUNDLE) && options.bundle_enabled;
1678 // The answer MUST contain the same number of m-lines as the offer.
1687 const SessionDescription* offer,
1692 const ContentInfo* data_content = GetFirstDataContent(offer);
1694 CreateTransportAnswer(data_content->name, offer,
1710 offer->HasGroup(GROUP_TYPE_BUNDLE) && options.bundle_enabled;
1738 // The answer MUST contain the same number of m-lines as the offer.