Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: webrtc/pc/mediasession.cc

Issue 1783263002: Replace scoped_ptr with unique_ptr in webrtc/pc/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/pc/mediasession.h ('k') | webrtc/pc/mediasession_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/pc/mediasession.h" 11 #include "webrtc/pc/mediasession.h"
12 12
13 #include <algorithm> // For std::find_if. 13 #include <algorithm> // For std::find_if.
14 #include <functional> 14 #include <functional>
15 #include <map> 15 #include <map>
16 #include <memory>
16 #include <set> 17 #include <set>
17 #include <utility> 18 #include <utility>
18 19
19 #include "webrtc/base/helpers.h" 20 #include "webrtc/base/helpers.h"
20 #include "webrtc/base/logging.h" 21 #include "webrtc/base/logging.h"
21 #include "webrtc/base/scoped_ptr.h"
22 #include "webrtc/base/stringutils.h" 22 #include "webrtc/base/stringutils.h"
23 #include "webrtc/media/base/cryptoparams.h" 23 #include "webrtc/media/base/cryptoparams.h"
24 #include "webrtc/media/base/mediaconstants.h" 24 #include "webrtc/media/base/mediaconstants.h"
25 #include "webrtc/p2p/base/p2pconstants.h" 25 #include "webrtc/p2p/base/p2pconstants.h"
26 #include "webrtc/pc/channelmanager.h" 26 #include "webrtc/pc/channelmanager.h"
27 #include "webrtc/pc/srtpfilter.h" 27 #include "webrtc/pc/srtpfilter.h"
28 28
29 #ifdef HAVE_SCTP 29 #ifdef HAVE_SCTP
30 #include "webrtc/media/sctp/sctpdataengine.h" 30 #include "webrtc/media/sctp/sctpdataengine.h"
31 #else 31 #else
(...skipping 10 matching lines...) Expand all
42 func(&crypto_suites); 42 func(&crypto_suites);
43 for (const auto crypto : crypto_suites) { 43 for (const auto crypto : crypto_suites) {
44 names->push_back(rtc::SrtpCryptoSuiteToName(crypto)); 44 names->push_back(rtc::SrtpCryptoSuiteToName(crypto));
45 } 45 }
46 #endif 46 #endif
47 } 47 }
48 } 48 }
49 49
50 namespace cricket { 50 namespace cricket {
51 51
52 using rtc::scoped_ptr;
53 52
54 // RTP Profile names 53 // RTP Profile names
55 // http://www.iana.org/assignments/rtp-parameters/rtp-parameters.xml 54 // http://www.iana.org/assignments/rtp-parameters/rtp-parameters.xml
56 // RFC4585 55 // RFC4585
57 const char kMediaProtocolAvpf[] = "RTP/AVPF"; 56 const char kMediaProtocolAvpf[] = "RTP/AVPF";
58 // RFC5124 57 // RFC5124
59 const char kMediaProtocolDtlsSavpf[] = "UDP/TLS/RTP/SAVPF"; 58 const char kMediaProtocolDtlsSavpf[] = "UDP/TLS/RTP/SAVPF";
60 59
61 // We always generate offers with "UDP/TLS/RTP/SAVPF" when using DTLS-SRTP, 60 // We always generate offers with "UDP/TLS/RTP/SAVPF" when using DTLS-SRTP,
62 // but we tolerate "RTP/SAVPF" in offers we receive, for compatibility. 61 // but we tolerate "RTP/SAVPF" in offers we receive, for compatibility.
(...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 channel_manager->GetSupportedAudioCodecs(&audio_codecs_); 1255 channel_manager->GetSupportedAudioCodecs(&audio_codecs_);
1257 channel_manager->GetSupportedAudioRtpHeaderExtensions(&audio_rtp_extensions_); 1256 channel_manager->GetSupportedAudioRtpHeaderExtensions(&audio_rtp_extensions_);
1258 channel_manager->GetSupportedVideoCodecs(&video_codecs_); 1257 channel_manager->GetSupportedVideoCodecs(&video_codecs_);
1259 channel_manager->GetSupportedVideoRtpHeaderExtensions(&video_rtp_extensions_); 1258 channel_manager->GetSupportedVideoRtpHeaderExtensions(&video_rtp_extensions_);
1260 channel_manager->GetSupportedDataCodecs(&data_codecs_); 1259 channel_manager->GetSupportedDataCodecs(&data_codecs_);
1261 } 1260 }
1262 1261
1263 SessionDescription* MediaSessionDescriptionFactory::CreateOffer( 1262 SessionDescription* MediaSessionDescriptionFactory::CreateOffer(
1264 const MediaSessionOptions& options, 1263 const MediaSessionOptions& options,
1265 const SessionDescription* current_description) const { 1264 const SessionDescription* current_description) const {
1266 scoped_ptr<SessionDescription> offer(new SessionDescription()); 1265 std::unique_ptr<SessionDescription> offer(new SessionDescription());
1267 1266
1268 StreamParamsVec current_streams; 1267 StreamParamsVec current_streams;
1269 GetCurrentStreamParams(current_description, &current_streams); 1268 GetCurrentStreamParams(current_description, &current_streams);
1270 1269
1271 AudioCodecs audio_codecs; 1270 AudioCodecs audio_codecs;
1272 VideoCodecs video_codecs; 1271 VideoCodecs video_codecs;
1273 DataCodecs data_codecs; 1272 DataCodecs data_codecs;
1274 GetCodecsToOffer(current_description, &audio_codecs, &video_codecs, 1273 GetCodecsToOffer(current_description, &audio_codecs, &video_codecs,
1275 &data_codecs); 1274 &data_codecs);
1276 1275
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 1364
1366 return offer.release(); 1365 return offer.release();
1367 } 1366 }
1368 1367
1369 SessionDescription* MediaSessionDescriptionFactory::CreateAnswer( 1368 SessionDescription* MediaSessionDescriptionFactory::CreateAnswer(
1370 const SessionDescription* offer, const MediaSessionOptions& options, 1369 const SessionDescription* offer, const MediaSessionOptions& options,
1371 const SessionDescription* current_description) const { 1370 const SessionDescription* current_description) const {
1372 // The answer contains the intersection of the codecs in the offer with the 1371 // The answer contains the intersection of the codecs in the offer with the
1373 // codecs we support, ordered by our local preference. As indicated by 1372 // codecs we support, ordered by our local preference. As indicated by
1374 // XEP-0167, we retain the same payload ids from the offer in the answer. 1373 // XEP-0167, we retain the same payload ids from the offer in the answer.
1375 scoped_ptr<SessionDescription> answer(new SessionDescription()); 1374 std::unique_ptr<SessionDescription> answer(new SessionDescription());
1376 1375
1377 StreamParamsVec current_streams; 1376 StreamParamsVec current_streams;
1378 GetCurrentStreamParams(current_description, &current_streams); 1377 GetCurrentStreamParams(current_description, &current_streams);
1379 1378
1380 if (offer) { 1379 if (offer) {
1381 ContentInfos::const_iterator it = offer->contents().begin(); 1380 ContentInfos::const_iterator it = offer->contents().begin();
1382 for (; it != offer->contents().end(); ++it) { 1381 for (; it != offer->contents().end(); ++it) {
1383 if (IsMediaContentOfType(&*it, MEDIA_TYPE_AUDIO)) { 1382 if (IsMediaContentOfType(&*it, MEDIA_TYPE_AUDIO)) {
1384 if (!AddAudioContentForAnswer(offer, options, current_description, 1383 if (!AddAudioContentForAnswer(offer, options, current_description,
1385 &current_streams, answer.get())) { 1384 &current_streams, answer.get())) {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1513 1512
1514 bool MediaSessionDescriptionFactory::AddTransportOffer( 1513 bool MediaSessionDescriptionFactory::AddTransportOffer(
1515 const std::string& content_name, 1514 const std::string& content_name,
1516 const TransportOptions& transport_options, 1515 const TransportOptions& transport_options,
1517 const SessionDescription* current_desc, 1516 const SessionDescription* current_desc,
1518 SessionDescription* offer_desc) const { 1517 SessionDescription* offer_desc) const {
1519 if (!transport_desc_factory_) 1518 if (!transport_desc_factory_)
1520 return false; 1519 return false;
1521 const TransportDescription* current_tdesc = 1520 const TransportDescription* current_tdesc =
1522 GetTransportDescription(content_name, current_desc); 1521 GetTransportDescription(content_name, current_desc);
1523 rtc::scoped_ptr<TransportDescription> new_tdesc( 1522 std::unique_ptr<TransportDescription> new_tdesc(
1524 transport_desc_factory_->CreateOffer(transport_options, current_tdesc)); 1523 transport_desc_factory_->CreateOffer(transport_options, current_tdesc));
1525 bool ret = (new_tdesc.get() != NULL && 1524 bool ret = (new_tdesc.get() != NULL &&
1526 offer_desc->AddTransportInfo(TransportInfo(content_name, *new_tdesc))); 1525 offer_desc->AddTransportInfo(TransportInfo(content_name, *new_tdesc)));
1527 if (!ret) { 1526 if (!ret) {
1528 LOG(LS_ERROR) 1527 LOG(LS_ERROR)
1529 << "Failed to AddTransportOffer, content name=" << content_name; 1528 << "Failed to AddTransportOffer, content name=" << content_name;
1530 } 1529 }
1531 return ret; 1530 return ret;
1532 } 1531 }
1533 1532
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 SessionDescription* desc) const { 1568 SessionDescription* desc) const {
1570 const ContentInfo* current_audio_content = 1569 const ContentInfo* current_audio_content =
1571 GetFirstAudioContent(current_description); 1570 GetFirstAudioContent(current_description);
1572 std::string content_name = 1571 std::string content_name =
1573 current_audio_content ? current_audio_content->name : CN_AUDIO; 1572 current_audio_content ? current_audio_content->name : CN_AUDIO;
1574 1573
1575 cricket::SecurePolicy sdes_policy = 1574 cricket::SecurePolicy sdes_policy =
1576 IsDtlsActive(content_name, current_description) ? cricket::SEC_DISABLED 1575 IsDtlsActive(content_name, current_description) ? cricket::SEC_DISABLED
1577 : secure(); 1576 : secure();
1578 1577
1579 scoped_ptr<AudioContentDescription> audio(new AudioContentDescription()); 1578 std::unique_ptr<AudioContentDescription> audio(new AudioContentDescription());
1580 std::vector<std::string> crypto_suites; 1579 std::vector<std::string> crypto_suites;
1581 GetSupportedAudioCryptoSuiteNames(&crypto_suites); 1580 GetSupportedAudioCryptoSuiteNames(&crypto_suites);
1582 if (!CreateMediaContentOffer( 1581 if (!CreateMediaContentOffer(
1583 options, 1582 options,
1584 audio_codecs, 1583 audio_codecs,
1585 sdes_policy, 1584 sdes_policy,
1586 GetCryptos(GetFirstAudioContentDescription(current_description)), 1585 GetCryptos(GetFirstAudioContentDescription(current_description)),
1587 crypto_suites, 1586 crypto_suites,
1588 audio_rtp_extensions, 1587 audio_rtp_extensions,
1589 add_legacy_, 1588 add_legacy_,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 SessionDescription* desc) const { 1628 SessionDescription* desc) const {
1630 const ContentInfo* current_video_content = 1629 const ContentInfo* current_video_content =
1631 GetFirstVideoContent(current_description); 1630 GetFirstVideoContent(current_description);
1632 std::string content_name = 1631 std::string content_name =
1633 current_video_content ? current_video_content->name : CN_VIDEO; 1632 current_video_content ? current_video_content->name : CN_VIDEO;
1634 1633
1635 cricket::SecurePolicy sdes_policy = 1634 cricket::SecurePolicy sdes_policy =
1636 IsDtlsActive(content_name, current_description) ? cricket::SEC_DISABLED 1635 IsDtlsActive(content_name, current_description) ? cricket::SEC_DISABLED
1637 : secure(); 1636 : secure();
1638 1637
1639 scoped_ptr<VideoContentDescription> video(new VideoContentDescription()); 1638 std::unique_ptr<VideoContentDescription> video(new VideoContentDescription());
1640 std::vector<std::string> crypto_suites; 1639 std::vector<std::string> crypto_suites;
1641 GetSupportedVideoCryptoSuiteNames(&crypto_suites); 1640 GetSupportedVideoCryptoSuiteNames(&crypto_suites);
1642 if (!CreateMediaContentOffer( 1641 if (!CreateMediaContentOffer(
1643 options, 1642 options,
1644 video_codecs, 1643 video_codecs,
1645 sdes_policy, 1644 sdes_policy,
1646 GetCryptos(GetFirstVideoContentDescription(current_description)), 1645 GetCryptos(GetFirstVideoContentDescription(current_description)),
1647 crypto_suites, 1646 crypto_suites,
1648 video_rtp_extensions, 1647 video_rtp_extensions,
1649 add_legacy_, 1648 add_legacy_,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1682 } 1681 }
1683 1682
1684 bool MediaSessionDescriptionFactory::AddDataContentForOffer( 1683 bool MediaSessionDescriptionFactory::AddDataContentForOffer(
1685 const MediaSessionOptions& options, 1684 const MediaSessionOptions& options,
1686 const SessionDescription* current_description, 1685 const SessionDescription* current_description,
1687 DataCodecs* data_codecs, 1686 DataCodecs* data_codecs,
1688 StreamParamsVec* current_streams, 1687 StreamParamsVec* current_streams,
1689 SessionDescription* desc) const { 1688 SessionDescription* desc) const {
1690 bool secure_transport = (transport_desc_factory_->secure() != SEC_DISABLED); 1689 bool secure_transport = (transport_desc_factory_->secure() != SEC_DISABLED);
1691 1690
1692 scoped_ptr<DataContentDescription> data(new DataContentDescription()); 1691 std::unique_ptr<DataContentDescription> data(new DataContentDescription());
1693 bool is_sctp = (options.data_channel_type == DCT_SCTP); 1692 bool is_sctp = (options.data_channel_type == DCT_SCTP);
1694 1693
1695 FilterDataCodecs(data_codecs, is_sctp); 1694 FilterDataCodecs(data_codecs, is_sctp);
1696 1695
1697 const ContentInfo* current_data_content = 1696 const ContentInfo* current_data_content =
1698 GetFirstDataContent(current_description); 1697 GetFirstDataContent(current_description);
1699 std::string content_name = 1698 std::string content_name =
1700 current_data_content ? current_data_content->name : CN_DATA; 1699 current_data_content ? current_data_content->name : CN_DATA;
1701 1700
1702 cricket::SecurePolicy sdes_policy = 1701 cricket::SecurePolicy sdes_policy =
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 } 1745 }
1747 1746
1748 bool MediaSessionDescriptionFactory::AddAudioContentForAnswer( 1747 bool MediaSessionDescriptionFactory::AddAudioContentForAnswer(
1749 const SessionDescription* offer, 1748 const SessionDescription* offer,
1750 const MediaSessionOptions& options, 1749 const MediaSessionOptions& options,
1751 const SessionDescription* current_description, 1750 const SessionDescription* current_description,
1752 StreamParamsVec* current_streams, 1751 StreamParamsVec* current_streams,
1753 SessionDescription* answer) const { 1752 SessionDescription* answer) const {
1754 const ContentInfo* audio_content = GetFirstAudioContent(offer); 1753 const ContentInfo* audio_content = GetFirstAudioContent(offer);
1755 1754
1756 scoped_ptr<TransportDescription> audio_transport(CreateTransportAnswer( 1755 std::unique_ptr<TransportDescription> audio_transport(CreateTransportAnswer(
1757 audio_content->name, offer, 1756 audio_content->name, offer,
1758 GetTransportOptions(options, audio_content->name), current_description)); 1757 GetTransportOptions(options, audio_content->name), current_description));
1759 if (!audio_transport) { 1758 if (!audio_transport) {
1760 return false; 1759 return false;
1761 } 1760 }
1762 1761
1763 AudioCodecs audio_codecs = audio_codecs_; 1762 AudioCodecs audio_codecs = audio_codecs_;
1764 if (!options.vad_enabled) { 1763 if (!options.vad_enabled) {
1765 StripCNCodecs(&audio_codecs); 1764 StripCNCodecs(&audio_codecs);
1766 } 1765 }
1767 1766
1768 bool bundle_enabled = 1767 bool bundle_enabled =
1769 offer->HasGroup(GROUP_TYPE_BUNDLE) && options.bundle_enabled; 1768 offer->HasGroup(GROUP_TYPE_BUNDLE) && options.bundle_enabled;
1770 scoped_ptr<AudioContentDescription> audio_answer( 1769 std::unique_ptr<AudioContentDescription> audio_answer(
1771 new AudioContentDescription()); 1770 new AudioContentDescription());
1772 // Do not require or create SDES cryptos if DTLS is used. 1771 // Do not require or create SDES cryptos if DTLS is used.
1773 cricket::SecurePolicy sdes_policy = 1772 cricket::SecurePolicy sdes_policy =
1774 audio_transport->secure() ? cricket::SEC_DISABLED : secure(); 1773 audio_transport->secure() ? cricket::SEC_DISABLED : secure();
1775 if (!CreateMediaContentAnswer( 1774 if (!CreateMediaContentAnswer(
1776 static_cast<const AudioContentDescription*>( 1775 static_cast<const AudioContentDescription*>(
1777 audio_content->description), 1776 audio_content->description),
1778 options, 1777 options,
1779 audio_codecs, 1778 audio_codecs,
1780 sdes_policy, 1779 sdes_policy,
(...skipping 23 matching lines...) Expand all
1804 return true; 1803 return true;
1805 } 1804 }
1806 1805
1807 bool MediaSessionDescriptionFactory::AddVideoContentForAnswer( 1806 bool MediaSessionDescriptionFactory::AddVideoContentForAnswer(
1808 const SessionDescription* offer, 1807 const SessionDescription* offer,
1809 const MediaSessionOptions& options, 1808 const MediaSessionOptions& options,
1810 const SessionDescription* current_description, 1809 const SessionDescription* current_description,
1811 StreamParamsVec* current_streams, 1810 StreamParamsVec* current_streams,
1812 SessionDescription* answer) const { 1811 SessionDescription* answer) const {
1813 const ContentInfo* video_content = GetFirstVideoContent(offer); 1812 const ContentInfo* video_content = GetFirstVideoContent(offer);
1814 scoped_ptr<TransportDescription> video_transport(CreateTransportAnswer( 1813 std::unique_ptr<TransportDescription> video_transport(CreateTransportAnswer(
1815 video_content->name, offer, 1814 video_content->name, offer,
1816 GetTransportOptions(options, video_content->name), current_description)); 1815 GetTransportOptions(options, video_content->name), current_description));
1817 if (!video_transport) { 1816 if (!video_transport) {
1818 return false; 1817 return false;
1819 } 1818 }
1820 1819
1821 scoped_ptr<VideoContentDescription> video_answer( 1820 std::unique_ptr<VideoContentDescription> video_answer(
1822 new VideoContentDescription()); 1821 new VideoContentDescription());
1823 // Do not require or create SDES cryptos if DTLS is used. 1822 // Do not require or create SDES cryptos if DTLS is used.
1824 cricket::SecurePolicy sdes_policy = 1823 cricket::SecurePolicy sdes_policy =
1825 video_transport->secure() ? cricket::SEC_DISABLED : secure(); 1824 video_transport->secure() ? cricket::SEC_DISABLED : secure();
1826 bool bundle_enabled = 1825 bool bundle_enabled =
1827 offer->HasGroup(GROUP_TYPE_BUNDLE) && options.bundle_enabled; 1826 offer->HasGroup(GROUP_TYPE_BUNDLE) && options.bundle_enabled;
1828 if (!CreateMediaContentAnswer( 1827 if (!CreateMediaContentAnswer(
1829 static_cast<const VideoContentDescription*>( 1828 static_cast<const VideoContentDescription*>(
1830 video_content->description), 1829 video_content->description),
1831 options, 1830 options,
(...skipping 27 matching lines...) Expand all
1859 return true; 1858 return true;
1860 } 1859 }
1861 1860
1862 bool MediaSessionDescriptionFactory::AddDataContentForAnswer( 1861 bool MediaSessionDescriptionFactory::AddDataContentForAnswer(
1863 const SessionDescription* offer, 1862 const SessionDescription* offer,
1864 const MediaSessionOptions& options, 1863 const MediaSessionOptions& options,
1865 const SessionDescription* current_description, 1864 const SessionDescription* current_description,
1866 StreamParamsVec* current_streams, 1865 StreamParamsVec* current_streams,
1867 SessionDescription* answer) const { 1866 SessionDescription* answer) const {
1868 const ContentInfo* data_content = GetFirstDataContent(offer); 1867 const ContentInfo* data_content = GetFirstDataContent(offer);
1869 scoped_ptr<TransportDescription> data_transport(CreateTransportAnswer( 1868 std::unique_ptr<TransportDescription> data_transport(CreateTransportAnswer(
1870 data_content->name, offer, 1869 data_content->name, offer,
1871 GetTransportOptions(options, data_content->name), current_description)); 1870 GetTransportOptions(options, data_content->name), current_description));
1872 if (!data_transport) { 1871 if (!data_transport) {
1873 return false; 1872 return false;
1874 } 1873 }
1875 bool is_sctp = (options.data_channel_type == DCT_SCTP); 1874 bool is_sctp = (options.data_channel_type == DCT_SCTP);
1876 std::vector<DataCodec> data_codecs(data_codecs_); 1875 std::vector<DataCodec> data_codecs(data_codecs_);
1877 FilterDataCodecs(&data_codecs, is_sctp); 1876 FilterDataCodecs(&data_codecs, is_sctp);
1878 1877
1879 scoped_ptr<DataContentDescription> data_answer( 1878 std::unique_ptr<DataContentDescription> data_answer(
1880 new DataContentDescription()); 1879 new DataContentDescription());
1881 // Do not require or create SDES cryptos if DTLS is used. 1880 // Do not require or create SDES cryptos if DTLS is used.
1882 cricket::SecurePolicy sdes_policy = 1881 cricket::SecurePolicy sdes_policy =
1883 data_transport->secure() ? cricket::SEC_DISABLED : secure(); 1882 data_transport->secure() ? cricket::SEC_DISABLED : secure();
1884 bool bundle_enabled = 1883 bool bundle_enabled =
1885 offer->HasGroup(GROUP_TYPE_BUNDLE) && options.bundle_enabled; 1884 offer->HasGroup(GROUP_TYPE_BUNDLE) && options.bundle_enabled;
1886 if (!CreateMediaContentAnswer( 1885 if (!CreateMediaContentAnswer(
1887 static_cast<const DataContentDescription*>( 1886 static_cast<const DataContentDescription*>(
1888 data_content->description), 1887 data_content->description),
1889 options, 1888 options,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1999 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); 1998 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO));
2000 } 1999 }
2001 2000
2002 const DataContentDescription* GetFirstDataContentDescription( 2001 const DataContentDescription* GetFirstDataContentDescription(
2003 const SessionDescription* sdesc) { 2002 const SessionDescription* sdesc) {
2004 return static_cast<const DataContentDescription*>( 2003 return static_cast<const DataContentDescription*>(
2005 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); 2004 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA));
2006 } 2005 }
2007 2006
2008 } // namespace cricket 2007 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/pc/mediasession.h ('k') | webrtc/pc/mediasession_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698