Title: [237585] trunk
Revision
237585
Author
[email protected]
Date
2018-10-30 01:59:44 -0700 (Tue, 30 Oct 2018)

Log Message

LibWebRTCRtpReceiverBackend::getSynchronizationSources should use Vector::append
https://bugs.webkit.org/show_bug.cgi?id=191026

Reviewed by Eric Carlson.

Source/WebCore:

Covered by updated test.

* Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp:
(WebCore::LibWebRTCRtpReceiverBackend::getSynchronizationSources const):

LayoutTests:

* webrtc/video-addTransceiver-expected.txt:
* webrtc/video-addTransceiver.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (237584 => 237585)


--- trunk/LayoutTests/ChangeLog	2018-10-30 08:26:57 UTC (rev 237584)
+++ trunk/LayoutTests/ChangeLog	2018-10-30 08:59:44 UTC (rev 237585)
@@ -1,3 +1,13 @@
+2018-10-30  Youenn Fablet  <[email protected]>
+
+        LibWebRTCRtpReceiverBackend::getSynchronizationSources should use Vector::append
+        https://bugs.webkit.org/show_bug.cgi?id=191026
+
+        Reviewed by Eric Carlson.
+
+        * webrtc/video-addTransceiver-expected.txt:
+        * webrtc/video-addTransceiver.html:
+
 2018-10-29  Devin Rousso  <[email protected]>
 
         Web Inspector: refactor code for getting properties via WI.RemoteObject

Modified: trunk/LayoutTests/webrtc/video-addTransceiver-expected.txt (237584 => 237585)


--- trunk/LayoutTests/webrtc/video-addTransceiver-expected.txt	2018-10-30 08:26:57 UTC (rev 237584)
+++ trunk/LayoutTests/webrtc/video-addTransceiver-expected.txt	2018-10-30 08:59:44 UTC (rev 237585)
@@ -3,4 +3,5 @@
 PASS Setting up calls with addTransceiver but with no track 
 PASS Setting up calls with addTransceiver with a track 
 PASS Basic video exchange set up with addTransceiver 
+PASS Testing synchronization sources 
 

Modified: trunk/LayoutTests/webrtc/video-addTransceiver.html (237584 => 237585)


--- trunk/LayoutTests/webrtc/video-addTransceiver.html	2018-10-30 08:26:57 UTC (rev 237584)
+++ trunk/LayoutTests/webrtc/video-addTransceiver.html	2018-10-30 08:59:44 UTC (rev 237585)
@@ -87,6 +87,36 @@
     testImage();
 }, "Basic video exchange set up with addTransceiver");
 
+promise_test(async (test) => {
+    let receivingConnection;
+    if (window.testRunner)
+        testRunner.setUserMediaPermission(true);
+
+    const stream = await navigator.mediaDevices.getUserMedia({audio: true, video: true});
+
+    const remoteStream = await new Promise((resolve, reject) => {
+        createConnections((firstConnection) => {
+            firstConnection.addTrack(stream.getAudioTracks()[0], stream);
+            firstConnection.addTrack(stream.getVideoTracks()[0], stream);
+        }, (secondConnection) => {
+            secondConnection._ontrack_ = (trackEvent) => {
+                resolve(trackEvent.streams[0]);
+            };
+            receivingConnection = secondConnection;
+        });
+        setTimeout(() => reject("Test timed out"), 5000);
+    });
+
+    video.srcObject = remoteStream;
+    await video.play();
+
+    const sources = receivingConnection.getReceivers()[0].getSynchronizationSources();
+    if (sources.length) {
+        assert_true(!!sources[0].audioLevel, "audioLevel");
+        assert_true(!!sources[0].source, "source");
+        assert_true(!!sources[0].timestamp, "timestamp");
+    }
+}, "Testing synchronization sources");
         </script>
     </body>
 </html>

Modified: trunk/Source/WebCore/ChangeLog (237584 => 237585)


--- trunk/Source/WebCore/ChangeLog	2018-10-30 08:26:57 UTC (rev 237584)
+++ trunk/Source/WebCore/ChangeLog	2018-10-30 08:59:44 UTC (rev 237585)
@@ -1,3 +1,15 @@
+2018-10-30  Youenn Fablet  <[email protected]>
+
+        LibWebRTCRtpReceiverBackend::getSynchronizationSources should use Vector::append
+        https://bugs.webkit.org/show_bug.cgi?id=191026
+
+        Reviewed by Eric Carlson.
+
+        Covered by updated test.
+
+        * Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp:
+        (WebCore::LibWebRTCRtpReceiverBackend::getSynchronizationSources const):
+
 2018-10-30  Claudio Saavedra  <[email protected]>
 
         [GTK][WPE] Fixes to the PublicSuffix implementation

Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp (237584 => 237585)


--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp	2018-10-30 08:26:57 UTC (rev 237584)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp	2018-10-30 08:59:44 UTC (rev 237585)
@@ -73,7 +73,7 @@
     Vector<RTCRtpSynchronizationSource> sources;
     for (auto& rtcSource : m_rtcReceiver->GetSources()) {
         if (rtcSource.source_type() == webrtc::RtpSourceType::SSRC)
-            sources.uncheckedAppend(toRTCRtpSynchronizationSource(rtcSource));
+            sources.append(toRTCRtpSynchronizationSource(rtcSource));
     }
     return sources;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to