<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[208043] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/208043">208043</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-10-28 04:14:51 -0700 (Fri, 28 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>PeerMediaDescription does not need to be refcounted
https://bugs.webkit.org/show_bug.cgi?id=164059
Patch by Youenn Fablet <youenn@apple.com> on 2016-10-28
Reviewed by Darin Adler.
No change of behavior.
* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::MediaEndpointPeerConnection::createOfferTask):
(WebCore::MediaEndpointPeerConnection::createAnswerTask):
(WebCore::createSourceMap):
(WebCore::MediaEndpointPeerConnection::setLocalDescriptionTask):
(WebCore::MediaEndpointPeerConnection::setRemoteDescriptionTask):
(WebCore::MediaEndpointPeerConnection::addIceCandidateTask):
(WebCore::MediaEndpointPeerConnection::gotIceCandidate):
* Modules/mediastream/MediaEndpointPeerConnection.h:
* Modules/mediastream/SDPProcessor.cpp:
(WebCore::configurationFromJSON):
(WebCore::configurationToJSON):
(WebCore::SDPProcessor::generateCandidateLine):
(WebCore::SDPProcessor::parseCandidateLine):
* platform/mediastream/IceCandidate.h:
* platform/mediastream/MediaEndpointSessionConfiguration.h:
(WebCore::MediaEndpointSessionConfiguration::mediaDescriptions):
(WebCore::MediaEndpointSessionConfiguration::addMediaDescription):
(WebCore::MediaEndpointSessionConfiguration::clone):
* platform/mediastream/PeerMediaDescription.h:
(WebCore::PeerMediaDescription::addPayload):
(WebCore::PeerMediaDescription::addSsrc):
(WebCore::PeerMediaDescription::clearSsrcs):
(WebCore::PeerMediaDescription::addIceCandidate):
(WebCore::PeerMediaDescription::create): Deleted.
(WebCore::PeerMediaDescription::~PeerMediaDescription): Deleted.
(WebCore::PeerMediaDescription::type): Deleted.
(WebCore::PeerMediaDescription::setType): Deleted.
(WebCore::PeerMediaDescription::port): Deleted.
(WebCore::PeerMediaDescription::setPort): Deleted.
(WebCore::PeerMediaDescription::address): Deleted.
(WebCore::PeerMediaDescription::setAddress): Deleted.
(WebCore::PeerMediaDescription::mode): Deleted.
(WebCore::PeerMediaDescription::setMode): Deleted.
(WebCore::PeerMediaDescription::mid): Deleted.
(WebCore::PeerMediaDescription::setMid): Deleted.
(WebCore::PeerMediaDescription::payloads): Deleted.
(WebCore::PeerMediaDescription::setPayloads): Deleted.
(WebCore::PeerMediaDescription::rtcpMux): Deleted.
(WebCore::PeerMediaDescription::setRtcpMux): Deleted.
(WebCore::PeerMediaDescription::rtcpAddress): Deleted.
(WebCore::PeerMediaDescription::setRtcpAddress): Deleted.
(WebCore::PeerMediaDescription::rtcpPort): Deleted.
(WebCore::PeerMediaDescription::setRtcpPort): Deleted.
(WebCore::PeerMediaDescription::mediaStreamId): Deleted.
(WebCore::PeerMediaDescription::setMediaStreamId): Deleted.
(WebCore::PeerMediaDescription::mediaStreamTrackId): Deleted.
(WebCore::PeerMediaDescription::setMediaStreamTrackId): Deleted.
(WebCore::PeerMediaDescription::dtlsSetup): Deleted.
(WebCore::PeerMediaDescription::setDtlsSetup): Deleted.
(WebCore::PeerMediaDescription::dtlsFingerprintHashFunction): Deleted.
(WebCore::PeerMediaDescription::setDtlsFingerprintHashFunction): Deleted.
(WebCore::PeerMediaDescription::dtlsFingerprint): Deleted.
(WebCore::PeerMediaDescription::setDtlsFingerprint): Deleted.
(WebCore::PeerMediaDescription::cname): Deleted.
(WebCore::PeerMediaDescription::setCname): Deleted.
(WebCore::PeerMediaDescription::ssrcs): Deleted.
(WebCore::PeerMediaDescription::iceUfrag): Deleted.
(WebCore::PeerMediaDescription::setIceUfrag): Deleted.
(WebCore::PeerMediaDescription::icePassword): Deleted.
(WebCore::PeerMediaDescription::setIcePassword): Deleted.
(WebCore::PeerMediaDescription::iceCandidates): Deleted.
(WebCore::PeerMediaDescription::clone): Deleted.
(WebCore::PeerMediaDescription::PeerMediaDescription): Deleted.
* platform/mediastream/mac/MediaEndpointMac.cpp:
(WebCore::MediaEndpointMac::addRemoteCandidate):
(WebCore::MediaEndpointMac::OnIceCandidate):
* platform/mediastream/mac/MediaEndpointMac.h:
* platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:
(WebCore::MediaEndpointOwr::updateSendConfiguration):
* platform/mediastream/openwebrtc/MediaEndpointOwr.h:
* platform/mock/MockMediaEndpoint.cpp:
(WebCore::MockMediaEndpoint::updateConfigurationMids):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaEndpointPeerConnectioncpp">trunk/Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaEndpointPeerConnectionh">trunk/Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamSDPProcessorcpp">trunk/Source/WebCore/Modules/mediastream/SDPProcessor.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreamMediaEndpointSessionConfigurationh">trunk/Source/WebCore/platform/mediastream/MediaEndpointSessionConfiguration.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreamPeerMediaDescriptionh">trunk/Source/WebCore/platform/mediastream/PeerMediaDescription.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreamopenwebrtcMediaEndpointOwrcpp">trunk/Source/WebCore/platform/mediastream/openwebrtc/MediaEndpointOwr.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreamopenwebrtcMediaEndpointOwrh">trunk/Source/WebCore/platform/mediastream/openwebrtc/MediaEndpointOwr.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmockMockMediaEndpointcpp">trunk/Source/WebCore/platform/mock/MockMediaEndpoint.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208042 => 208043)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-28 09:40:44 UTC (rev 208042)
+++ trunk/Source/WebCore/ChangeLog        2016-10-28 11:14:51 UTC (rev 208043)
</span><span class="lines">@@ -1,3 +1,86 @@
</span><ins>+2016-10-28 Youenn Fablet <youenn@apple.com>
+
+ PeerMediaDescription does not need to be refcounted
+ https://bugs.webkit.org/show_bug.cgi?id=164059
+
+ Reviewed by Darin Adler.
+
+ No change of behavior.
+
+ * Modules/mediastream/MediaEndpointPeerConnection.cpp:
+ (WebCore::MediaEndpointPeerConnection::createOfferTask):
+ (WebCore::MediaEndpointPeerConnection::createAnswerTask):
+ (WebCore::createSourceMap):
+ (WebCore::MediaEndpointPeerConnection::setLocalDescriptionTask):
+ (WebCore::MediaEndpointPeerConnection::setRemoteDescriptionTask):
+ (WebCore::MediaEndpointPeerConnection::addIceCandidateTask):
+ (WebCore::MediaEndpointPeerConnection::gotIceCandidate):
+ * Modules/mediastream/MediaEndpointPeerConnection.h:
+ * Modules/mediastream/SDPProcessor.cpp:
+ (WebCore::configurationFromJSON):
+ (WebCore::configurationToJSON):
+ (WebCore::SDPProcessor::generateCandidateLine):
+ (WebCore::SDPProcessor::parseCandidateLine):
+ * platform/mediastream/IceCandidate.h:
+ * platform/mediastream/MediaEndpointSessionConfiguration.h:
+ (WebCore::MediaEndpointSessionConfiguration::mediaDescriptions):
+ (WebCore::MediaEndpointSessionConfiguration::addMediaDescription):
+ (WebCore::MediaEndpointSessionConfiguration::clone):
+ * platform/mediastream/PeerMediaDescription.h:
+ (WebCore::PeerMediaDescription::addPayload):
+ (WebCore::PeerMediaDescription::addSsrc):
+ (WebCore::PeerMediaDescription::clearSsrcs):
+ (WebCore::PeerMediaDescription::addIceCandidate):
+ (WebCore::PeerMediaDescription::create): Deleted.
+ (WebCore::PeerMediaDescription::~PeerMediaDescription): Deleted.
+ (WebCore::PeerMediaDescription::type): Deleted.
+ (WebCore::PeerMediaDescription::setType): Deleted.
+ (WebCore::PeerMediaDescription::port): Deleted.
+ (WebCore::PeerMediaDescription::setPort): Deleted.
+ (WebCore::PeerMediaDescription::address): Deleted.
+ (WebCore::PeerMediaDescription::setAddress): Deleted.
+ (WebCore::PeerMediaDescription::mode): Deleted.
+ (WebCore::PeerMediaDescription::setMode): Deleted.
+ (WebCore::PeerMediaDescription::mid): Deleted.
+ (WebCore::PeerMediaDescription::setMid): Deleted.
+ (WebCore::PeerMediaDescription::payloads): Deleted.
+ (WebCore::PeerMediaDescription::setPayloads): Deleted.
+ (WebCore::PeerMediaDescription::rtcpMux): Deleted.
+ (WebCore::PeerMediaDescription::setRtcpMux): Deleted.
+ (WebCore::PeerMediaDescription::rtcpAddress): Deleted.
+ (WebCore::PeerMediaDescription::setRtcpAddress): Deleted.
+ (WebCore::PeerMediaDescription::rtcpPort): Deleted.
+ (WebCore::PeerMediaDescription::setRtcpPort): Deleted.
+ (WebCore::PeerMediaDescription::mediaStreamId): Deleted.
+ (WebCore::PeerMediaDescription::setMediaStreamId): Deleted.
+ (WebCore::PeerMediaDescription::mediaStreamTrackId): Deleted.
+ (WebCore::PeerMediaDescription::setMediaStreamTrackId): Deleted.
+ (WebCore::PeerMediaDescription::dtlsSetup): Deleted.
+ (WebCore::PeerMediaDescription::setDtlsSetup): Deleted.
+ (WebCore::PeerMediaDescription::dtlsFingerprintHashFunction): Deleted.
+ (WebCore::PeerMediaDescription::setDtlsFingerprintHashFunction): Deleted.
+ (WebCore::PeerMediaDescription::dtlsFingerprint): Deleted.
+ (WebCore::PeerMediaDescription::setDtlsFingerprint): Deleted.
+ (WebCore::PeerMediaDescription::cname): Deleted.
+ (WebCore::PeerMediaDescription::setCname): Deleted.
+ (WebCore::PeerMediaDescription::ssrcs): Deleted.
+ (WebCore::PeerMediaDescription::iceUfrag): Deleted.
+ (WebCore::PeerMediaDescription::setIceUfrag): Deleted.
+ (WebCore::PeerMediaDescription::icePassword): Deleted.
+ (WebCore::PeerMediaDescription::setIcePassword): Deleted.
+ (WebCore::PeerMediaDescription::iceCandidates): Deleted.
+ (WebCore::PeerMediaDescription::clone): Deleted.
+ (WebCore::PeerMediaDescription::PeerMediaDescription): Deleted.
+ * platform/mediastream/mac/MediaEndpointMac.cpp:
+ (WebCore::MediaEndpointMac::addRemoteCandidate):
+ (WebCore::MediaEndpointMac::OnIceCandidate):
+ * platform/mediastream/mac/MediaEndpointMac.h:
+ * platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:
+ (WebCore::MediaEndpointOwr::updateSendConfiguration):
+ * platform/mediastream/openwebrtc/MediaEndpointOwr.h:
+ * platform/mock/MockMediaEndpoint.cpp:
+ (WebCore::MockMediaEndpoint::updateConfigurationMids):
+
</ins><span class="cx"> 2016-10-28 Antoine Quint <graouts@apple.com>
</span><span class="cx">
</span><span class="cx"> [Modern Media Controls] Media Controller: scrubbing support
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaEndpointPeerConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp (208042 => 208043)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp        2016-10-28 09:40:44 UTC (rev 208042)
+++ trunk/Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp        2016-10-28 11:14:51 UTC (rev 208043)
</span><span class="lines">@@ -160,21 +160,21 @@
</span><span class="cx">
</span><span class="cx"> // Remove any transceiver objects from transceivers that can be matched to an existing media description.
</span><span class="cx"> for (auto& mediaDescription : configurationSnapshot->mediaDescriptions()) {
</span><del>- if (!mediaDescription->port()) {
</del><ins>+ if (!mediaDescription.port) {
</ins><span class="cx"> // This media description should be recycled.
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RTCRtpTransceiver* transceiver = matchTransceiverByMid(transceivers, mediaDescription->mid());
</del><ins>+ RTCRtpTransceiver* transceiver = matchTransceiverByMid(transceivers, mediaDescription.mid);
</ins><span class="cx"> if (!transceiver)
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- mediaDescription->setMode(transceiver->directionString());
</del><ins>+ mediaDescription.mode = transceiver->directionString();
</ins><span class="cx"> if (transceiver->hasSendingDirection()) {
</span><span class="cx"> RTCRtpSender& sender = *transceiver->sender();
</span><span class="cx">
</span><del>- mediaDescription->setMediaStreamId(sender.mediaStreamIds()[0]);
- mediaDescription->setMediaStreamTrackId(sender.trackId());
</del><ins>+ mediaDescription.mediaStreamId = sender.mediaStreamIds()[0];
+ mediaDescription.mediaStreamTrackId = sender.trackId();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> transceivers.removeFirst(transceiver);
</span><span class="lines">@@ -182,23 +182,23 @@
</span><span class="cx">
</span><span class="cx"> // Add media descriptions for remaining transceivers.
</span><span class="cx"> for (auto& transceiver : transceivers) {
</span><del>- RefPtr<PeerMediaDescription> mediaDescription = PeerMediaDescription::create();
</del><ins>+ PeerMediaDescription mediaDescription;
</ins><span class="cx"> RTCRtpSender& sender = *transceiver->sender();
</span><span class="cx">
</span><del>- mediaDescription->setMode(transceiver->directionString());
- mediaDescription->setMid(transceiver->provisionalMid());
- mediaDescription->setMediaStreamId(sender.mediaStreamIds()[0]);
- mediaDescription->setType(sender.trackKind());
- mediaDescription->setPayloads(sender.trackKind() == "audio" ? m_defaultAudioPayloads : m_defaultVideoPayloads);
- mediaDescription->setDtlsFingerprintHashFunction(m_dtlsFingerprintFunction);
- mediaDescription->setDtlsFingerprint(m_dtlsFingerprint);
- mediaDescription->setCname(m_cname);
- mediaDescription->addSsrc(cryptographicallyRandomNumber());
- mediaDescription->setIceUfrag(m_iceUfrag);
- mediaDescription->setIcePassword(m_icePassword);
</del><ins>+ mediaDescription.mode = transceiver->directionString();
+ mediaDescription.mid = transceiver->provisionalMid();
+ mediaDescription.mediaStreamId = sender.mediaStreamIds()[0];
+ mediaDescription.type = sender.trackKind();
+ mediaDescription.payloads = sender.trackKind() == "audio" ? m_defaultAudioPayloads : m_defaultVideoPayloads;
+ mediaDescription.dtlsFingerprintHashFunction = m_dtlsFingerprintFunction;
+ mediaDescription.dtlsFingerprint = m_dtlsFingerprint;
+ mediaDescription.cname = m_cname;
+ mediaDescription.addSsrc(cryptographicallyRandomNumber());
+ mediaDescription.iceUfrag = m_iceUfrag;
+ mediaDescription.icePassword = m_icePassword;
</ins><span class="cx">
</span><span class="cx"> if (sender.track())
</span><del>- mediaDescription->setMediaStreamTrackId(sender.trackId());
</del><ins>+ mediaDescription.mediaStreamTrackId = sender.trackId();
</ins><span class="cx">
</span><span class="cx"> configurationSnapshot->addMediaDescription(WTFMove(mediaDescription));
</span><span class="cx"> }
</span><span class="lines">@@ -233,12 +233,12 @@
</span><span class="cx"> configurationSnapshot->setSessionVersion(m_sdpAnswerSessionVersion++);
</span><span class="cx">
</span><span class="cx"> auto transceivers = RtpTransceiverVector(m_client->getTransceivers());
</span><del>- const MediaDescriptionVector& remoteMediaDescriptions = internalRemoteDescription()->configuration()->mediaDescriptions();
</del><ins>+ auto& remoteMediaDescriptions = internalRemoteDescription()->configuration()->mediaDescriptions();
</ins><span class="cx">
</span><span class="cx"> for (unsigned i = 0; i < remoteMediaDescriptions.size(); ++i) {
</span><del>- PeerMediaDescription& remoteMediaDescription = *remoteMediaDescriptions[i];
</del><ins>+ auto& remoteMediaDescription = remoteMediaDescriptions[i];
</ins><span class="cx">
</span><del>- RTCRtpTransceiver* transceiver = matchTransceiverByMid(transceivers, remoteMediaDescription.mid());
</del><ins>+ auto* transceiver = matchTransceiverByMid(transceivers, remoteMediaDescription.mid);
</ins><span class="cx"> if (!transceiver) {
</span><span class="cx"> LOG_ERROR("Could not find a matching transceiver for remote description while creating answer");
</span><span class="cx"> continue;
</span><span class="lines">@@ -245,39 +245,39 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (i >= configurationSnapshot->mediaDescriptions().size()) {
</span><del>- auto newMediaDescription = PeerMediaDescription::create();
</del><ins>+ PeerMediaDescription newMediaDescription;
</ins><span class="cx">
</span><span class="cx"> RTCRtpSender& sender = *transceiver->sender();
</span><span class="cx"> if (sender.track()) {
</span><span class="cx"> if (sender.mediaStreamIds().size())
</span><del>- newMediaDescription->setMediaStreamId(sender.mediaStreamIds()[0]);
- newMediaDescription->setMediaStreamTrackId(sender.trackId());
- newMediaDescription->addSsrc(cryptographicallyRandomNumber());
</del><ins>+ newMediaDescription.mediaStreamId = sender.mediaStreamIds()[0];
+ newMediaDescription.mediaStreamTrackId = sender.trackId();
+ newMediaDescription.addSsrc(cryptographicallyRandomNumber());
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- newMediaDescription->setMode(transceiver->directionString());
- newMediaDescription->setType(remoteMediaDescription.type());
- newMediaDescription->setMid(remoteMediaDescription.mid());
- newMediaDescription->setDtlsSetup(remoteMediaDescription.dtlsSetup() == "active" ? "passive" : "active");
- newMediaDescription->setDtlsFingerprintHashFunction(m_dtlsFingerprintFunction);
- newMediaDescription->setDtlsFingerprint(m_dtlsFingerprint);
- newMediaDescription->setCname(m_cname);
- newMediaDescription->setIceUfrag(m_iceUfrag);
- newMediaDescription->setIcePassword(m_icePassword);
</del><ins>+ newMediaDescription.mode = transceiver->directionString();
+ newMediaDescription.type = remoteMediaDescription.type;
+ newMediaDescription.mid = remoteMediaDescription.mid;
+ newMediaDescription.dtlsSetup = remoteMediaDescription.dtlsSetup == "active" ? "passive" : "active";
+ newMediaDescription.dtlsFingerprintHashFunction = m_dtlsFingerprintFunction;
+ newMediaDescription.dtlsFingerprint = m_dtlsFingerprint;
+ newMediaDescription.cname = m_cname;
+ newMediaDescription.iceUfrag = m_iceUfrag;
+ newMediaDescription.icePassword = m_icePassword;
</ins><span class="cx">
</span><span class="cx"> configurationSnapshot->addMediaDescription(WTFMove(newMediaDescription));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- PeerMediaDescription& localMediaDescription = *configurationSnapshot->mediaDescriptions()[i];
</del><ins>+ PeerMediaDescription& localMediaDescription = configurationSnapshot->mediaDescriptions()[i];
</ins><span class="cx">
</span><del>- localMediaDescription.setPayloads(remoteMediaDescription.payloads());
- localMediaDescription.setRtcpMux(remoteMediaDescription.rtcpMux());
</del><ins>+ localMediaDescription.payloads = remoteMediaDescription.payloads;
+ localMediaDescription.rtcpMux = remoteMediaDescription.rtcpMux;
</ins><span class="cx">
</span><del>- if (!localMediaDescription.ssrcs().size())
</del><ins>+ if (!localMediaDescription.ssrcs.size())
</ins><span class="cx"> localMediaDescription.addSsrc(cryptographicallyRandomNumber());
</span><span class="cx">
</span><del>- if (localMediaDescription.dtlsSetup() == "actpass")
- localMediaDescription.setDtlsSetup("passive");
</del><ins>+ if (localMediaDescription.dtlsSetup == "actpass")
+ localMediaDescription.dtlsSetup = "passive";
</ins><span class="cx">
</span><span class="cx"> transceivers.removeFirst(transceiver);
</span><span class="cx"> }
</span><span class="lines">@@ -295,11 +295,11 @@
</span><span class="cx"> RealtimeMediaSourceMap sourceMap;
</span><span class="cx">
</span><span class="cx"> for (unsigned i = 0; i < remoteMediaDescriptions.size() && i < localMediaDescriptionCount; ++i) {
</span><del>- PeerMediaDescription& remoteMediaDescription = *remoteMediaDescriptions[i];
- if (remoteMediaDescription.type() != "audio" && remoteMediaDescription.type() != "video")
</del><ins>+ auto& remoteMediaDescription = remoteMediaDescriptions[i];
+ if (remoteMediaDescription.type != "audio" && remoteMediaDescription.type != "video")
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- RTCRtpTransceiver* transceiver = matchTransceiverByMid(transceivers, remoteMediaDescription.mid());
</del><ins>+ RTCRtpTransceiver* transceiver = matchTransceiverByMid(transceivers, remoteMediaDescription.mid);
</ins><span class="cx"> if (transceiver) {
</span><span class="cx"> if (transceiver->hasSendingDirection() && transceiver->sender()->track())
</span><span class="cx"> sourceMap.set(transceiver->mid(), &transceiver->sender()->track()->source());
</span><span class="lines">@@ -359,11 +359,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Associate media descriptions with transceivers (set provisional mid to 'final' mid).
</span><del>- for (unsigned i = previousNumberOfMediaDescriptions; i < mediaDescriptions.size(); ++i) {
- PeerMediaDescription& mediaDescription = *mediaDescriptions[i];
-
</del><ins>+ for (auto& mediaDescription : mediaDescriptions) {
</ins><span class="cx"> RTCRtpTransceiver* transceiver = matchTransceiver(transceivers, [&mediaDescription] (RTCRtpTransceiver& current) {
</span><del>- return current.provisionalMid() == mediaDescription.mid();
</del><ins>+ return current.provisionalMid() == mediaDescription.mid;
</ins><span class="cx"> });
</span><span class="cx"> if (transceiver)
</span><span class="cx"> transceiver->setMid(transceiver->provisionalMid());
</span><span class="lines">@@ -464,13 +462,12 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- const MediaDescriptionVector& mediaDescriptions = newDescription->configuration()->mediaDescriptions();
</del><ins>+ auto& mediaDescriptions = newDescription->configuration()->mediaDescriptions();
</ins><span class="cx"> for (auto& mediaDescription : mediaDescriptions) {
</span><del>- if (mediaDescription->type() != "audio" && mediaDescription->type() != "video")
</del><ins>+ if (mediaDescription.type != "audio" && mediaDescription.type != "video")
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- mediaDescription->setPayloads(m_mediaEndpoint->filterPayloads(mediaDescription->payloads(),
- mediaDescription->type() == "audio" ? m_defaultAudioPayloads : m_defaultVideoPayloads));
</del><ins>+ mediaDescription.payloads = m_mediaEndpoint->filterPayloads(mediaDescription.payloads, mediaDescription.type == "audio" ? m_defaultAudioPayloads : m_defaultVideoPayloads);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool isInitiator = newDescription->type() == RTCSessionDescription::SdpType::Answer;
</span><span class="lines">@@ -488,32 +485,32 @@
</span><span class="cx"> // One legacy MediaStreamEvent will be fired for every new MediaStream created as this remote description is set.
</span><span class="cx"> Vector<RefPtr<MediaStreamEvent>> legacyMediaStreamEvents;
</span><span class="cx">
</span><del>- for (auto mediaDescription : mediaDescriptions) {
- RTCRtpTransceiver* transceiver = matchTransceiverByMid(transceivers, mediaDescription->mid());
</del><ins>+ for (auto& mediaDescription : mediaDescriptions) {
+ RTCRtpTransceiver* transceiver = matchTransceiverByMid(transceivers, mediaDescription.mid);
</ins><span class="cx"> if (!transceiver) {
</span><span class="cx"> bool receiveOnlyFlag = false;
</span><span class="cx">
</span><del>- if (mediaDescription->mode() == "sendrecv" || mediaDescription->mode() == "recvonly") {
</del><ins>+ if (mediaDescription.mode == "sendrecv" || mediaDescription.mode == "recvonly") {
</ins><span class="cx"> // Try to match an existing transceiver.
</span><span class="cx"> transceiver = matchTransceiver(transceivers, [&mediaDescription] (RTCRtpTransceiver& current) {
</span><del>- return !current.stopped() && current.mid().isNull() && current.sender()->trackKind() == mediaDescription->type();
</del><ins>+ return !current.stopped() && current.mid().isNull() && current.sender()->trackKind() == mediaDescription.type;
</ins><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> if (transceiver) {
</span><span class="cx"> // This transceiver was created locally with a provisional mid. Its real mid will now be set by the remote
</span><span class="cx"> // description so we need to update the mid of the transceiver's muted source to preserve the association.
</span><del>- transceiver->setMid(mediaDescription->mid());
- m_mediaEndpoint->replaceMutedRemoteSourceMid(transceiver->provisionalMid(), mediaDescription->mid());
</del><ins>+ transceiver->setMid(mediaDescription.mid);
+ m_mediaEndpoint->replaceMutedRemoteSourceMid(transceiver->provisionalMid(), mediaDescription.mid);
</ins><span class="cx"> } else
</span><span class="cx"> receiveOnlyFlag = true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!transceiver) {
</span><del>- auto sender = RTCRtpSender::create(mediaDescription->type(), Vector<String>(), m_client->senderClient());
- auto receiver = createReceiver(mediaDescription->mid(), mediaDescription->type(), mediaDescription->mediaStreamTrackId());
</del><ins>+ auto sender = RTCRtpSender::create(mediaDescription.type, Vector<String>(), m_client->senderClient());
+ auto receiver = createReceiver(mediaDescription.mid, mediaDescription.type, mediaDescription.mediaStreamTrackId);
</ins><span class="cx">
</span><span class="cx"> auto newTransceiver = RTCRtpTransceiver::create(WTFMove(sender), WTFMove(receiver));
</span><del>- newTransceiver->setMid(mediaDescription->mid());
</del><ins>+ newTransceiver->setMid(mediaDescription.mid);
</ins><span class="cx"> if (receiveOnlyFlag)
</span><span class="cx"> newTransceiver->disableSendingDirection();
</span><span class="cx">
</span><span class="lines">@@ -522,7 +519,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (mediaDescription->mode() == "sendrecv" || mediaDescription->mode() == "sendonly") {
</del><ins>+ if (mediaDescription.mode == "sendrecv" || mediaDescription.mode == "sendonly") {
</ins><span class="cx"> RTCRtpReceiver& receiver = *transceiver->receiver();
</span><span class="cx"> if (receiver.isDispatched())
</span><span class="cx"> continue;
</span><span class="lines">@@ -529,8 +526,8 @@
</span><span class="cx"> receiver.setDispatched(true);
</span><span class="cx">
</span><span class="cx"> Vector<String> mediaStreamIds;
</span><del>- if (!mediaDescription->mediaStreamId().isEmpty())
- mediaStreamIds.append(mediaDescription->mediaStreamId());
</del><ins>+ if (!mediaDescription.mediaStreamId.isEmpty())
+ mediaStreamIds.append(mediaDescription.mediaStreamId);
</ins><span class="cx">
</span><span class="cx"> // A remote track can be associated with 0..* MediaStreams. We create a new stream for
</span><span class="cx"> // a track in case of an unrecognized stream id, or just add the track if the stream
</span><span class="lines">@@ -646,7 +643,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- const MediaDescriptionVector& remoteMediaDescriptions = internalRemoteDescription()->configuration()->mediaDescriptions();
</del><ins>+ auto& remoteMediaDescriptions = internalRemoteDescription()->configuration()->mediaDescriptions();
</ins><span class="cx"> PeerMediaDescription* targetMediaDescription = nullptr;
</span><span class="cx">
</span><span class="cx"> // When identifying the target media description, sdpMid takes precedence over sdpMLineIndex
</span><span class="lines">@@ -654,8 +651,8 @@
</span><span class="cx"> if (!rtcCandidate.sdpMid().isNull()) {
</span><span class="cx"> const String& mid = rtcCandidate.sdpMid();
</span><span class="cx"> for (auto& description : remoteMediaDescriptions) {
</span><del>- if (description->mid() == mid) {
- targetMediaDescription = description.get();
</del><ins>+ if (description.mid == mid) {
+ targetMediaDescription = &description;
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -670,7 +667,7 @@
</span><span class="cx"> promise.reject(OperationError, "sdpMLineIndex is out of range");
</span><span class="cx"> return;
</span><span class="cx"> }
</span><del>- targetMediaDescription = remoteMediaDescriptions[sdpMLineIndex].get();
</del><ins>+ targetMediaDescription = &remoteMediaDescriptions[sdpMLineIndex];
</ins><span class="cx"> } else {
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return;
</span><span class="lines">@@ -685,7 +682,8 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- m_mediaEndpoint->addRemoteCandidate(result.candidate(), targetMediaDescription->mid(), targetMediaDescription->iceUfrag(), targetMediaDescription->icePassword());
</del><ins>+ ASSERT(targetMediaDescription);
+ m_mediaEndpoint->addRemoteCandidate(result.candidate(), targetMediaDescription->mid, targetMediaDescription->iceUfrag, targetMediaDescription->icePassword);
</ins><span class="cx">
</span><span class="cx"> targetMediaDescription->addIceCandidate(WTFMove(result.candidate()));
</span><span class="cx">
</span><span class="lines">@@ -837,11 +835,11 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(isMainThread());
</span><span class="cx">
</span><del>- const MediaDescriptionVector& mediaDescriptions = internalLocalDescription()->configuration()->mediaDescriptions();
</del><ins>+ auto& mediaDescriptions = internalLocalDescription()->configuration()->mediaDescriptions();
</ins><span class="cx"> size_t mediaDescriptionIndex = notFound;
</span><span class="cx">
</span><span class="cx"> for (size_t i = 0; i < mediaDescriptions.size(); ++i) {
</span><del>- if (mediaDescriptions[i]->mid() == mid) {
</del><ins>+ if (mediaDescriptions[i].mid == mid) {
</ins><span class="cx"> mediaDescriptionIndex = i;
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="lines">@@ -855,9 +853,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- auto& mediaDescription = mediaDescriptions[mediaDescriptionIndex];
- ASSERT(mediaDescription);
- mediaDescription->addIceCandidate(WTFMove(candidate));
</del><ins>+ mediaDescriptions[mediaDescriptionIndex].addIceCandidate(WTFMove(candidate));
</ins><span class="cx">
</span><span class="cx"> m_client->fireEvent(RTCIceCandidateEvent::create(false, false, RTCIceCandidate::create(candidateLine, mid, mediaDescriptionIndex)));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaEndpointPeerConnectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.h (208042 => 208043)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.h        2016-10-28 09:40:44 UTC (rev 208042)
+++ trunk/Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.h        2016-10-28 11:14:51 UTC (rev 208043)
</span><span class="lines">@@ -43,13 +43,14 @@
</span><span class="cx">
</span><span class="cx"> class MediaStream;
</span><span class="cx"> class MediaStreamTrack;
</span><del>-class PeerMediaDescription;
</del><span class="cx"> class SDPProcessor;
</span><span class="cx">
</span><del>-typedef Vector<RefPtr<PeerMediaDescription>> MediaDescriptionVector;
-typedef Vector<RefPtr<RTCRtpSender>> RtpSenderVector;
-typedef Vector<RefPtr<RTCRtpTransceiver>> RtpTransceiverVector;
</del><ins>+struct PeerMediaDescription;
</ins><span class="cx">
</span><ins>+using MediaDescriptionVector = Vector<PeerMediaDescription>;
+using RtpSenderVector = Vector<RefPtr<RTCRtpSender>>;
+using RtpTransceiverVector = Vector<RefPtr<RTCRtpTransceiver>>;
+
</ins><span class="cx"> class MediaEndpointPeerConnection : public PeerConnectionBackend, public MediaEndpointClient {
</span><span class="cx"> public:
</span><span class="cx"> MediaEndpointPeerConnection(PeerConnectionBackendClient*);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamSDPProcessorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/SDPProcessor.cpp (208042 => 208043)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/SDPProcessor.cpp        2016-10-28 09:40:44 UTC (rev 208042)
+++ trunk/Source/WebCore/Modules/mediastream/SDPProcessor.cpp        2016-10-28 11:14:51 UTC (rev 208043)
</span><span class="lines">@@ -199,22 +199,22 @@
</span><span class="cx"> RefPtr<InspectorObject> mediaDescriptionObject = InspectorObject::create();
</span><span class="cx"> mediaDescriptionsArray->get(i)->asObject(mediaDescriptionObject);
</span><span class="cx">
</span><del>- RefPtr<PeerMediaDescription> mediaDescription = PeerMediaDescription::create();
</del><ins>+ PeerMediaDescription mediaDescription;
</ins><span class="cx">
</span><span class="cx"> if (mediaDescriptionObject->getString(typeString(), stringValue))
</span><del>- mediaDescription->setType(stringValue);
</del><ins>+ mediaDescription.type = stringValue;
</ins><span class="cx">
</span><span class="cx"> if (mediaDescriptionObject->getInteger(portString(), intValue))
</span><del>- mediaDescription->setPort(intValue);
</del><ins>+ mediaDescription.port = intValue;
</ins><span class="cx">
</span><span class="cx"> if (mediaDescriptionObject->getString(addressString(), stringValue))
</span><del>- mediaDescription->setAddress(stringValue);
</del><ins>+ mediaDescription.address = stringValue;
</ins><span class="cx">
</span><span class="cx"> if (mediaDescriptionObject->getString(modeString(), stringValue))
</span><del>- mediaDescription->setMode(stringValue);
</del><ins>+ mediaDescription.mode = stringValue;
</ins><span class="cx">
</span><span class="cx"> if (mediaDescriptionObject->getString(midString(), stringValue))
</span><del>- mediaDescription->setMid(stringValue);
</del><ins>+ mediaDescription.mid = stringValue;
</ins><span class="cx">
</span><span class="cx"> RefPtr<InspectorArray> payloadsArray = InspectorArray::create();
</span><span class="cx"> mediaDescriptionObject->getArray(payloadsString(), payloadsArray);
</span><span class="lines">@@ -258,37 +258,37 @@
</span><span class="cx"> payload.addParameter("rtxTime", intValue);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- mediaDescription->addPayload(WTFMove(payload));
</del><ins>+ mediaDescription.addPayload(WTFMove(payload));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<InspectorObject> rtcpObject = InspectorObject::create();
</span><span class="cx"> if (mediaDescriptionObject->getObject(rtcpString(), rtcpObject)) {
</span><span class="cx"> if (rtcpObject->getBoolean(muxString(), boolValue))
</span><del>- mediaDescription->setRtcpMux(boolValue);
</del><ins>+ mediaDescription.rtcpMux = boolValue;
</ins><span class="cx">
</span><span class="cx"> if (rtcpObject->getString(rtcpAddressString(), stringValue))
</span><del>- mediaDescription->setRtcpAddress(stringValue);
</del><ins>+ mediaDescription.rtcpAddress = stringValue;
</ins><span class="cx">
</span><span class="cx"> if (rtcpObject->getInteger(rtcpPortString(), intValue))
</span><del>- mediaDescription->setRtcpPort(intValue);
</del><ins>+ mediaDescription.rtcpPort = intValue;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (mediaDescriptionObject->getString(mediaStreamIdString(), stringValue))
</span><del>- mediaDescription->setMediaStreamId(stringValue);
</del><ins>+ mediaDescription.mediaStreamId = stringValue;
</ins><span class="cx">
</span><span class="cx"> if (mediaDescriptionObject->getString(mediaStreamTrackIdString(), stringValue))
</span><del>- mediaDescription->setMediaStreamTrackId(stringValue);
</del><ins>+ mediaDescription.mediaStreamTrackId = stringValue;
</ins><span class="cx">
</span><span class="cx"> RefPtr<InspectorObject> dtlsObject = InspectorObject::create();
</span><span class="cx"> if (mediaDescriptionObject->getObject(dtlsString(), dtlsObject)) {
</span><span class="cx"> if (dtlsObject->getString(setupString(), stringValue))
</span><del>- mediaDescription->setDtlsSetup(stringValue);
</del><ins>+ mediaDescription.dtlsSetup = stringValue;
</ins><span class="cx">
</span><span class="cx"> if (dtlsObject->getString(fingerprintHashFunctionString(), stringValue))
</span><del>- mediaDescription->setDtlsFingerprintHashFunction(stringValue);
</del><ins>+ mediaDescription.dtlsFingerprintHashFunction = stringValue;
</ins><span class="cx">
</span><span class="cx"> if (dtlsObject->getString(fingerprintString(), stringValue))
</span><del>- mediaDescription->setDtlsFingerprint(stringValue);
</del><ins>+ mediaDescription.dtlsFingerprint = stringValue;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> RefPtr<InspectorArray> ssrcsArray = InspectorArray::create();
</span><span class="lines">@@ -296,19 +296,19 @@
</span><span class="cx">
</span><span class="cx"> for (unsigned j = 0; j < ssrcsArray->length(); ++j) {
</span><span class="cx"> ssrcsArray->get(j)->asInteger(intValue);
</span><del>- mediaDescription->addSsrc(intValue);
</del><ins>+ mediaDescription.addSsrc(intValue);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (mediaDescriptionObject->getString(cnameString(), stringValue))
</span><del>- mediaDescription->setCname(stringValue);
</del><ins>+ mediaDescription.cname = stringValue;
</ins><span class="cx">
</span><span class="cx"> RefPtr<InspectorObject> iceObject = InspectorObject::create();
</span><span class="cx"> if (mediaDescriptionObject->getObject(iceString(), iceObject)) {
</span><span class="cx"> if (iceObject->getString(ufragString(), stringValue))
</span><del>- mediaDescription->setIceUfrag(stringValue);
</del><ins>+ mediaDescription.iceUfrag = stringValue;
</ins><span class="cx">
</span><span class="cx"> if (iceObject->getString(passwordString(), stringValue))
</span><del>- mediaDescription->setIcePassword(stringValue);
</del><ins>+ mediaDescription.icePassword = stringValue;
</ins><span class="cx">
</span><span class="cx"> RefPtr<InspectorArray> candidatesArray = InspectorArray::create();
</span><span class="cx"> iceObject->getArray(candidatesString(), candidatesArray);
</span><span class="lines">@@ -317,7 +317,7 @@
</span><span class="cx"> RefPtr<InspectorObject> candidateObject = InspectorObject::create();
</span><span class="cx"> candidatesArray->get(j)->asObject(candidateObject);
</span><span class="cx">
</span><del>- mediaDescription->addIceCandidate(createCandidate(*candidateObject));
</del><ins>+ mediaDescription.addIceCandidate(createCandidate(*candidateObject));
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -351,18 +351,18 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<InspectorArray> mediaDescriptionsArray = InspectorArray::create();
</span><span class="cx">
</span><del>- for (const RefPtr<PeerMediaDescription>& mediaDescription : configuration.mediaDescriptions()) {
</del><ins>+ for (const auto& mediaDescription : configuration.mediaDescriptions()) {
</ins><span class="cx"> RefPtr<InspectorObject> mediaDescriptionObject = InspectorObject::create();
</span><span class="cx">
</span><del>- mediaDescriptionObject->setString(typeString(), mediaDescription->type());
- mediaDescriptionObject->setInteger(portString(), mediaDescription->port());
- mediaDescriptionObject->setString(addressString(), mediaDescription->address());
- mediaDescriptionObject->setString(modeString(), mediaDescription->mode());
- mediaDescriptionObject->setString(midString(), mediaDescription->mid());
</del><ins>+ mediaDescriptionObject->setString(typeString(), mediaDescription.type);
+ mediaDescriptionObject->setInteger(portString(), mediaDescription.port);
+ mediaDescriptionObject->setString(addressString(), mediaDescription.address);
+ mediaDescriptionObject->setString(modeString(), mediaDescription.mode);
+ mediaDescriptionObject->setString(midString(), mediaDescription.mid);
</ins><span class="cx">
</span><span class="cx"> RefPtr<InspectorArray> payloadsArray = InspectorArray::create();
</span><span class="cx">
</span><del>- for (auto& payload : mediaDescription->payloads()) {
</del><ins>+ for (auto& payload : mediaDescription.payloads) {
</ins><span class="cx"> RefPtr<InspectorObject> payloadObject = InspectorObject::create();
</span><span class="cx">
</span><span class="cx"> payloadObject->setInteger(typeString(), payload.type);
</span><span class="lines">@@ -387,35 +387,35 @@
</span><span class="cx"> mediaDescriptionObject->setArray(payloadsString(), payloadsArray);
</span><span class="cx">
</span><span class="cx"> RefPtr<InspectorObject> rtcpObject = InspectorObject::create();
</span><del>- rtcpObject->setBoolean(muxString(), mediaDescription->rtcpMux());
- rtcpObject->setString(addressString(), mediaDescription->rtcpAddress());
- rtcpObject->setInteger(portString(), mediaDescription->rtcpPort());
</del><ins>+ rtcpObject->setBoolean(muxString(), mediaDescription.rtcpMux);
+ rtcpObject->setString(addressString(), mediaDescription.rtcpAddress);
+ rtcpObject->setInteger(portString(), mediaDescription.rtcpPort);
</ins><span class="cx"> mediaDescriptionObject->setObject(rtcpString(), rtcpObject);
</span><span class="cx">
</span><del>- mediaDescriptionObject->setString(mediaStreamIdString(), mediaDescription->mediaStreamId());
- mediaDescriptionObject->setString(mediaStreamTrackIdString(), mediaDescription->mediaStreamTrackId());
</del><ins>+ mediaDescriptionObject->setString(mediaStreamIdString(), mediaDescription.mediaStreamId);
+ mediaDescriptionObject->setString(mediaStreamTrackIdString(), mediaDescription.mediaStreamTrackId);
</ins><span class="cx">
</span><span class="cx"> RefPtr<InspectorObject> dtlsObject = InspectorObject::create();
</span><del>- dtlsObject->setString(setupString(), mediaDescription->dtlsSetup());
- dtlsObject->setString(fingerprintHashFunctionString(), mediaDescription->dtlsFingerprintHashFunction());
- dtlsObject->setString(fingerprintString(), mediaDescription->dtlsFingerprint());
</del><ins>+ dtlsObject->setString(setupString(), mediaDescription.dtlsSetup);
+ dtlsObject->setString(fingerprintHashFunctionString(), mediaDescription.dtlsFingerprintHashFunction);
+ dtlsObject->setString(fingerprintString(), mediaDescription.dtlsFingerprint);
</ins><span class="cx"> mediaDescriptionObject->setObject(dtlsString(), dtlsObject);
</span><span class="cx">
</span><span class="cx"> RefPtr<InspectorArray> ssrcsArray = InspectorArray::create();
</span><span class="cx">
</span><del>- for (auto ssrc : mediaDescription->ssrcs())
</del><ins>+ for (auto ssrc : mediaDescription.ssrcs)
</ins><span class="cx"> ssrcsArray->pushDouble(ssrc);
</span><span class="cx"> mediaDescriptionObject->setArray(ssrcsString(), ssrcsArray);
</span><span class="cx">
</span><del>- mediaDescriptionObject->setString(cnameString(), mediaDescription->cname());
</del><ins>+ mediaDescriptionObject->setString(cnameString(), mediaDescription.cname);
</ins><span class="cx">
</span><span class="cx"> RefPtr<InspectorObject> iceObject = InspectorObject::create();
</span><del>- iceObject->setString(ufragString(), mediaDescription->iceUfrag());
- iceObject->setString(passwordString(), mediaDescription->icePassword());
</del><ins>+ iceObject->setString(ufragString(), mediaDescription.iceUfrag);
+ iceObject->setString(passwordString(), mediaDescription.icePassword);
</ins><span class="cx">
</span><span class="cx"> RefPtr<InspectorArray> candidatesArray = InspectorArray::create();
</span><span class="cx">
</span><del>- for (auto& candidate : mediaDescription->iceCandidates())
</del><ins>+ for (auto& candidate : mediaDescription.iceCandidates)
</ins><span class="cx"> candidatesArray->pushObject(createCandidateObject(candidate));
</span><span class="cx">
</span><span class="cx"> iceObject->setArray(candidatesString(), candidatesArray);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamMediaEndpointSessionConfigurationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/MediaEndpointSessionConfiguration.h (208042 => 208043)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/MediaEndpointSessionConfiguration.h        2016-10-28 09:40:44 UTC (rev 208042)
+++ trunk/Source/WebCore/platform/mediastream/MediaEndpointSessionConfiguration.h        2016-10-28 11:14:51 UTC (rev 208043)
</span><span class="lines">@@ -52,8 +52,9 @@
</span><span class="cx"> unsigned sessionVersion() const { return m_sessionVersion; }
</span><span class="cx"> void setSessionVersion(unsigned sessionVersion) { m_sessionVersion = sessionVersion; }
</span><span class="cx">
</span><del>- const Vector<RefPtr<PeerMediaDescription>>& mediaDescriptions() const { return m_mediaDescriptions; }
- void addMediaDescription(RefPtr<PeerMediaDescription>&& description) { m_mediaDescriptions.append(WTFMove(description)); }
</del><ins>+ Vector<PeerMediaDescription>& mediaDescriptions() { return m_mediaDescriptions; }
+ const Vector<PeerMediaDescription>& mediaDescriptions() const { return m_mediaDescriptions; }
+ void addMediaDescription(PeerMediaDescription&& description) { m_mediaDescriptions.append(WTFMove(description)); }
</ins><span class="cx">
</span><span class="cx"> RefPtr<MediaEndpointSessionConfiguration> clone() const
</span><span class="cx"> {
</span><span class="lines">@@ -60,10 +61,8 @@
</span><span class="cx"> RefPtr<MediaEndpointSessionConfiguration> copy = create();
</span><span class="cx"> copy->m_sessionId = m_sessionId;
</span><span class="cx"> copy->m_sessionVersion = m_sessionVersion;
</span><ins>+ copy->m_mediaDescriptions = m_mediaDescriptions;
</ins><span class="cx">
</span><del>- for (auto& mdesc : m_mediaDescriptions)
- copy->m_mediaDescriptions.append(mdesc->clone());
-
</del><span class="cx"> return copy;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -77,7 +76,7 @@
</span><span class="cx"> uint64_t m_sessionId;
</span><span class="cx"> unsigned m_sessionVersion { 0 };
</span><span class="cx">
</span><del>- Vector<RefPtr<PeerMediaDescription>> m_mediaDescriptions;
</del><ins>+ Vector<PeerMediaDescription> m_mediaDescriptions;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamPeerMediaDescriptionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/PeerMediaDescription.h (208042 => 208043)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/PeerMediaDescription.h        2016-10-28 09:40:44 UTC (rev 208042)
+++ trunk/Source/WebCore/platform/mediastream/PeerMediaDescription.h        2016-10-28 11:14:51 UTC (rev 208043)
</span><span class="lines">@@ -28,8 +28,7 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#ifndef PeerMediaDescription_h
-#define PeerMediaDescription_h
</del><ins>+#pragma once
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(WEB_RTC)
</span><span class="cx">
</span><span class="lines">@@ -36,147 +35,43 @@
</span><span class="cx"> #include "IceCandidate.h"
</span><span class="cx"> #include "MediaPayload.h"
</span><span class="cx"> #include "RealtimeMediaSource.h"
</span><del>-#include <wtf/RefCounted.h>
</del><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class PeerMediaDescription : public RefCounted<PeerMediaDescription> {
-public:
- static RefPtr<PeerMediaDescription> create()
- {
- return adoptRef(new PeerMediaDescription());
- }
- virtual ~PeerMediaDescription() { }
</del><ins>+struct PeerMediaDescription {
+ void addPayload(MediaPayload&& payload) { payloads.append(WTFMove(payload)); }
+ void addSsrc(unsigned ssrc) { ssrcs.append(ssrc); }
+ void clearSsrcs() { ssrcs.clear(); }
+ void addIceCandidate(IceCandidate&& candidate) { iceCandidates.append(WTFMove(candidate)); }
</ins><span class="cx">
</span><del>- const String& type() const { return m_type; }
- void setType(const String& type) { m_type = type; }
</del><ins>+ String type;
+ unsigned short port { 9 };
+ String address { "0.0.0.0" };
+ String mode { ASCIILiteral { "sendrecv" } };
+ String mid;
</ins><span class="cx">
</span><del>- unsigned short port() const { return m_port; }
- void setPort(unsigned short port) { m_port = port; }
</del><ins>+ Vector<MediaPayload> payloads;
</ins><span class="cx">
</span><del>- const String& address() const { return m_address; }
- void setAddress(const String& address) { m_address = address; }
</del><ins>+ bool rtcpMux { true };
+ String rtcpAddress;
+ unsigned short rtcpPort { 0 };
</ins><span class="cx">
</span><del>- const String& mode() const { return m_mode; }
- void setMode(const String& mode) { m_mode = mode; }
</del><ins>+ String mediaStreamId;
+ String mediaStreamTrackId;
</ins><span class="cx">
</span><del>- const String& mid() const { return m_mid; }
- void setMid(const String& mid) { m_mid = mid; }
</del><ins>+ String dtlsSetup { "actpass" };
+ String dtlsFingerprintHashFunction;
+ String dtlsFingerprint;
</ins><span class="cx">
</span><del>- const Vector<MediaPayload>& payloads() const { return m_payloads; }
- void addPayload(MediaPayload&& payload) { m_payloads.append(WTFMove(payload)); }
- void setPayloads(Vector<MediaPayload>&& payloads) { m_payloads = payloads; }
- void setPayloads(const Vector<MediaPayload>& payloads) { m_payloads = payloads; }
</del><ins>+ Vector<unsigned> ssrcs;
+ String cname;
</ins><span class="cx">
</span><del>- bool rtcpMux() const { return m_rtcpMux; }
- void setRtcpMux(bool rtcpMux) { m_rtcpMux = rtcpMux; }
-
- const String& rtcpAddress() const { return m_rtcpAddress; }
- void setRtcpAddress(const String& rtcpAddress) { m_rtcpAddress = rtcpAddress; }
-
- unsigned short rtcpPort() const { return m_rtcpPort; }
- void setRtcpPort(unsigned short rtcpPort) { m_rtcpPort = rtcpPort; }
-
- const String& mediaStreamId() const { return m_mediaStreamId; }
- void setMediaStreamId(const String& mediaStreamId) { m_mediaStreamId = mediaStreamId; }
-
- const String& mediaStreamTrackId() const { return m_mediaStreamTrackId; }
- void setMediaStreamTrackId(const String& mediaStreamTrackId) { m_mediaStreamTrackId = mediaStreamTrackId; }
-
- const String& dtlsSetup() const { return m_dtlsSetup; }
- void setDtlsSetup(const String& dtlsSetup) { m_dtlsSetup = dtlsSetup; }
-
- const String& dtlsFingerprintHashFunction() const { return m_dtlsFingerprintHashFunction; }
- void setDtlsFingerprintHashFunction(const String& dtlsFingerprintHashFunction) { m_dtlsFingerprintHashFunction = dtlsFingerprintHashFunction; }
-
- const String& dtlsFingerprint() const { return m_dtlsFingerprint; }
- void setDtlsFingerprint(const String& dtlsFingerprint) { m_dtlsFingerprint = dtlsFingerprint; }
-
- const String& cname() const { return m_cname; }
- void setCname(const String& cname) { m_cname = cname; }
-
- const Vector<unsigned>& ssrcs() const { return m_ssrcs; }
- void addSsrc(unsigned ssrc) { m_ssrcs.append(ssrc); }
- void clearSsrcs() { m_ssrcs.clear(); }
-
- const String& iceUfrag() const { return m_iceUfrag; }
- void setIceUfrag(const String& iceUfrag) { m_iceUfrag = iceUfrag; }
-
- const String& icePassword() const { return m_icePassword; }
- void setIcePassword(const String& icePassword) { m_icePassword = icePassword; }
-
- const Vector<IceCandidate>& iceCandidates() const { return m_iceCandidates; }
- void addIceCandidate(IceCandidate&& candidate) { m_iceCandidates.append(WTFMove(candidate)); }
-
- RefPtr<PeerMediaDescription> clone() const
- {
- RefPtr<PeerMediaDescription> copy = create();
-
- copy->m_type = String(m_type);
- copy->m_port = m_port;
- copy->m_address = String(m_address);
- copy->m_mode = String(m_mode);
- copy->m_mid = String(m_mid);
-
- copy->m_payloads = m_payloads;
-
- copy->m_rtcpMux = m_rtcpMux;
- copy->m_rtcpAddress = String(m_rtcpAddress);
- copy->m_rtcpPort = m_rtcpPort;
-
- copy->m_mediaStreamId = String(m_mediaStreamId);
- copy->m_mediaStreamTrackId = String(m_mediaStreamTrackId);
-
- copy->m_dtlsSetup = String(m_dtlsSetup);
- copy->m_dtlsFingerprintHashFunction = String(m_dtlsFingerprintHashFunction);
- copy->m_dtlsFingerprint = String(m_dtlsFingerprint);
-
- for (auto ssrc : m_ssrcs)
- copy->m_ssrcs.append(ssrc);
-
- copy->m_cname = String(m_cname);
-
- copy->m_iceUfrag = String(m_iceUfrag);
- copy->m_icePassword = String(m_icePassword);
-
- copy->m_iceCandidates = m_iceCandidates;
-
- return copy;
- }
-
-private:
- PeerMediaDescription() { }
-
- String m_type;
- unsigned short m_port { 9 };
- String m_address { "0.0.0.0" };
- String m_mode { "sendrecv" };
- String m_mid;
-
- Vector<MediaPayload> m_payloads;
-
- bool m_rtcpMux { true };
- String m_rtcpAddress;
- unsigned short m_rtcpPort { 0 };
-
- String m_mediaStreamId;
- String m_mediaStreamTrackId;
-
- String m_dtlsSetup { "actpass" };
- String m_dtlsFingerprintHashFunction;
- String m_dtlsFingerprint;
-
- Vector<unsigned> m_ssrcs;
- String m_cname;
-
- String m_iceUfrag;
- String m_icePassword;
- Vector<IceCandidate> m_iceCandidates;
</del><ins>+ String iceUfrag;
+ String icePassword;
+ Vector<IceCandidate> iceCandidates;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // ENABLE(WEB_RTC)
</span><del>-
-#endif // PeerMediaDescription_h
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamopenwebrtcMediaEndpointOwrcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/openwebrtc/MediaEndpointOwr.cpp (208042 => 208043)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/openwebrtc/MediaEndpointOwr.cpp        2016-10-28 09:40:44 UTC (rev 208042)
+++ trunk/Source/WebCore/platform/mediastream/openwebrtc/MediaEndpointOwr.cpp        2016-10-28 11:14:51 UTC (rev 208043)
</span><span class="lines">@@ -217,8 +217,8 @@
</span><span class="cx"> for (unsigned i = m_transceivers.size(); i < configuration->mediaDescriptions().size(); ++i) {
</span><span class="cx"> TransceiverConfig config;
</span><span class="cx"> config.type = SessionTypeMedia;
</span><del>- config.isDtlsClient = configuration->mediaDescriptions()[i]->dtlsSetup() == "active";
- config.mid = configuration->mediaDescriptions()[i]->mid();
</del><ins>+ config.isDtlsClient = configuration->mediaDescriptions()[i].dtlsSetup == "active";
+ config.mid = configuration->mediaDescriptions()[i].mid;
</ins><span class="cx"> transceiverConfigs.append(WTFMove(config));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -227,7 +227,7 @@
</span><span class="cx"> // Prepare the new sessions.
</span><span class="cx"> for (unsigned i = m_numberOfReceivePreparedSessions; i < m_transceivers.size(); ++i) {
</span><span class="cx"> OwrSession* session = m_transceivers[i]->session();
</span><del>- prepareMediaSession(OWR_MEDIA_SESSION(session), configuration->mediaDescriptions()[i].get(), isInitiator);
</del><ins>+ prepareMediaSession(OWR_MEDIA_SESSION(session), &configuration->mediaDescriptions()[i], isInitiator);
</ins><span class="cx"> owr_transport_agent_add_session(m_transportAgent, session);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -252,8 +252,8 @@
</span><span class="cx"> for (unsigned i = m_transceivers.size(); i < configuration->mediaDescriptions().size(); ++i) {
</span><span class="cx"> TransceiverConfig config;
</span><span class="cx"> config.type = SessionTypeMedia;
</span><del>- config.isDtlsClient = configuration->mediaDescriptions()[i]->dtlsSetup() != "active";
- config.mid = configuration->mediaDescriptions()[i]->mid();
</del><ins>+ config.isDtlsClient = configuration->mediaDescriptions()[i].dtlsSetup != "active";
+ config.mid = configuration->mediaDescriptions()[i].mid;
</ins><span class="cx"> transceiverConfigs.append(WTFMove(config));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -260,25 +260,25 @@
</span><span class="cx"> ensureTransportAgentAndTransceivers(isInitiator, transceiverConfigs);
</span><span class="cx">
</span><span class="cx"> for (unsigned i = 0; i < m_transceivers.size(); ++i) {
</span><del>- OwrSession* session = m_transceivers[i]->session();
- PeerMediaDescription& mdesc = *configuration->mediaDescriptions()[i];
</del><ins>+ auto* session = m_transceivers[i]->session();
+ auto& mdesc = configuration->mediaDescriptions()[i];
</ins><span class="cx">
</span><del>- if (mdesc.type() == "audio" || mdesc.type() == "video")
- g_object_set(session, "rtcp-mux", mdesc.rtcpMux(), nullptr);
</del><ins>+ if (mdesc.type == "audio" || mdesc.type == "video")
+ g_object_set(session, "rtcp-mux", mdesc.rtcpMux, nullptr);
</ins><span class="cx">
</span><del>- if (mdesc.iceCandidates().size()) {
- for (auto& candidate : mdesc.iceCandidates())
- internalAddRemoteCandidate(session, candidate, mdesc.iceUfrag(), mdesc.icePassword());
</del><ins>+ if (mdesc.iceCandidates.size()) {
+ for (auto& candidate : mdesc.iceCandidates)
+ internalAddRemoteCandidate(session, candidate, mdesc.iceUfrag, mdesc.icePassword);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (i < m_numberOfSendPreparedSessions)
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- if (!sendSourceMap.contains(mdesc.mid()))
</del><ins>+ if (!sendSourceMap.contains(mdesc.mid))
</ins><span class="cx"> continue;
</span><span class="cx">
</span><span class="cx"> const MediaPayload* payload = nullptr;
</span><del>- for (auto& p : mdesc.payloads()) {
</del><ins>+ for (auto& p : mdesc.payloads) {
</ins><span class="cx"> if (p.encodingName.convertToASCIIUppercase() != "RTX") {
</span><span class="cx"> payload = &p;
</span><span class="cx"> break;
</span><span class="lines">@@ -288,14 +288,14 @@
</span><span class="cx"> if (!payload)
</span><span class="cx"> return UpdateResult::Failed;
</span><span class="cx">
</span><del>- auto* rtxPayload = findRtxPayload(mdesc.payloads(), payload->type);
- auto* source = static_cast<RealtimeMediaSourceOwr*>(sendSourceMap.get(mdesc.mid()));
</del><ins>+ auto* rtxPayload = findRtxPayload(mdesc.payloads, payload->type);
+ auto* source = static_cast<RealtimeMediaSourceOwr*>(sendSourceMap.get(mdesc.mid));
</ins><span class="cx">
</span><span class="cx"> ASSERT(codecTypes.find(payload->encodingName.convertToASCIIUppercase()) != notFound);
</span><span class="cx"> auto codecType = static_cast<OwrCodecType>(codecTypes.find(payload->encodingName.convertToASCIIUppercase()));
</span><span class="cx">
</span><span class="cx"> OwrPayload* sendPayload;
</span><del>- if (mdesc.type() == "audio")
</del><ins>+ if (mdesc.type == "audio")
</ins><span class="cx"> sendPayload = owr_audio_payload_new(codecType, payload->type, payload->clockRate, payload->channels);
</span><span class="cx"> else {
</span><span class="cx"> sendPayload = owr_video_payload_new(codecType, payload->type, payload->clockRate, payload->ccmfir, payload->nackpli);
</span><span class="lines">@@ -466,8 +466,8 @@
</span><span class="cx">
</span><span class="cx"> void MediaEndpointOwr::prepareSession(OwrSession* session, PeerMediaDescription* mediaDescription)
</span><span class="cx"> {
</span><del>- g_object_set_data_full(G_OBJECT(session), "ice-ufrag", g_strdup(mediaDescription->iceUfrag().ascii().data()), g_free);
- g_object_set_data_full(G_OBJECT(session), "ice-password", g_strdup(mediaDescription->icePassword().ascii().data()), g_free);
</del><ins>+ g_object_set_data_full(G_OBJECT(session), "ice-ufrag", g_strdup(mediaDescription->iceUfrag.ascii().data()), g_free);
+ g_object_set_data_full(G_OBJECT(session), "ice-password", g_strdup(mediaDescription->icePassword.ascii().data()), g_free);
</ins><span class="cx">
</span><span class="cx"> g_signal_connect(session, "on-new-candidate", G_CALLBACK(gotCandidate), this);
</span><span class="cx"> g_signal_connect(session, "on-candidate-gathering-done", G_CALLBACK(candidateGatheringDone), this);
</span><span class="lines">@@ -478,28 +478,28 @@
</span><span class="cx"> {
</span><span class="cx"> prepareSession(OWR_SESSION(mediaSession), mediaDescription);
</span><span class="cx">
</span><del>- bool useRtcpMux = !isInitiator && mediaDescription->rtcpMux();
</del><ins>+ bool useRtcpMux = !isInitiator && mediaDescription->rtcpMux;
</ins><span class="cx"> g_object_set(mediaSession, "rtcp-mux", useRtcpMux, nullptr);
</span><span class="cx">
</span><del>- if (!mediaDescription->cname().isEmpty() && mediaDescription->ssrcs().size()) {
- g_object_set(mediaSession, "cname", mediaDescription->cname().ascii().data(),
- "send-ssrc", mediaDescription->ssrcs()[0],
</del><ins>+ if (!mediaDescription->cname.isEmpty() && mediaDescription->ssrcs.size()) {
+ g_object_set(mediaSession, "cname", mediaDescription->cname.ascii().data(),
+ "send-ssrc", mediaDescription->ssrcs[0],
</ins><span class="cx"> nullptr);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> g_signal_connect(mediaSession, "on-incoming-source", G_CALLBACK(gotIncomingSource), this);
</span><span class="cx">
</span><del>- for (auto& payload : mediaDescription->payloads()) {
</del><ins>+ for (auto& payload : mediaDescription->payloads) {
</ins><span class="cx"> if (payload.encodingName.convertToASCIIUppercase() == "RTX")
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- auto* rtxPayload = findRtxPayload(mediaDescription->payloads(), payload.type);
</del><ins>+ auto* rtxPayload = findRtxPayload(mediaDescription->payloads, payload.type);
</ins><span class="cx">
</span><span class="cx"> ASSERT(codecTypes.find(payload.encodingName) != notFound);
</span><span class="cx"> OwrCodecType codecType = static_cast<OwrCodecType>(codecTypes.find(payload.encodingName.convertToASCIIUppercase()));
</span><span class="cx">
</span><span class="cx"> OwrPayload* receivePayload;
</span><del>- if (mediaDescription->type() == "audio")
</del><ins>+ if (mediaDescription->type == "audio")
</ins><span class="cx"> receivePayload = owr_audio_payload_new(codecType, payload.type, payload.clockRate, payload.channels);
</span><span class="cx"> else {
</span><span class="cx"> receivePayload = owr_video_payload_new(codecType, payload.type, payload.clockRate, payload.ccmfir, payload.nackpli);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreamopenwebrtcMediaEndpointOwrh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/openwebrtc/MediaEndpointOwr.h (208042 => 208043)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/openwebrtc/MediaEndpointOwr.h        2016-10-28 09:40:44 UTC (rev 208042)
+++ trunk/Source/WebCore/platform/mediastream/openwebrtc/MediaEndpointOwr.h        2016-10-28 11:14:51 UTC (rev 208043)
</span><span class="lines">@@ -43,10 +43,11 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class PeerMediaDescription;
</del><span class="cx"> class RealtimeMediaSourceOwr;
</span><span class="cx"> class RTCConfigurationPrivate;
</span><span class="cx">
</span><ins>+struct PeerMediaDescription;
+
</ins><span class="cx"> class OwrTransceiver : public RefCounted<OwrTransceiver> {
</span><span class="cx"> public:
</span><span class="cx"> static Ref<OwrTransceiver> create(const String& mid, OwrSession* session)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmockMockMediaEndpointcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mock/MockMediaEndpoint.cpp (208042 => 208043)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mock/MockMediaEndpoint.cpp        2016-10-28 09:40:44 UTC (rev 208042)
+++ trunk/Source/WebCore/platform/mock/MockMediaEndpoint.cpp        2016-10-28 11:14:51 UTC (rev 208043)
</span><span class="lines">@@ -225,8 +225,8 @@
</span><span class="cx"> void MockMediaEndpoint::updateConfigurationMids(const MediaEndpointSessionConfiguration& configuration)
</span><span class="cx"> {
</span><span class="cx"> Vector<String> mids;
</span><del>- for (const RefPtr<PeerMediaDescription>& mediaDescription : configuration.mediaDescriptions())
- mids.append(mediaDescription->mid());
</del><ins>+ for (auto& mediaDescription : configuration.mediaDescriptions())
+ mids.append(mediaDescription.mid);
</ins><span class="cx"> m_mids.swap(mids);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>