Title: [238172] trunk
Revision
238172
Author
[email protected]
Date
2018-11-14 07:21:46 -0800 (Wed, 14 Nov 2018)

Log Message

Add support for RTCRtpCodecParameters.sdpFmtpLine
https://bugs.webkit.org/show_bug.cgi?id=191591

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* web-platform-tests/webrtc/protocol/video-codecs.https-expected.txt:

Source/WebCore:

Covered by rebased test.

* Modules/mediastream/RTCRtpCodecParameters.h:
* Modules/mediastream/RTCRtpCodecParameters.idl:
* Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
(WebCore::toRTCCodecParameters):

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (238171 => 238172)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2018-11-14 14:57:59 UTC (rev 238171)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2018-11-14 15:21:46 UTC (rev 238172)
@@ -1,5 +1,14 @@
 2018-11-14  Youenn Fablet  <[email protected]>
 
+        Add support for RTCRtpCodecParameters.sdpFmtpLine
+        https://bugs.webkit.org/show_bug.cgi?id=191591
+
+        Reviewed by Eric Carlson.
+
+        * web-platform-tests/webrtc/protocol/video-codecs.https-expected.txt:
+
+2018-11-14  Youenn Fablet  <[email protected]>
+
         Add support for transport and peerConnection stats
         https://bugs.webkit.org/show_bug.cgi?id=191592
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/protocol/video-codecs.https-expected.txt (238171 => 238172)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/protocol/video-codecs.https-expected.txt	2018-11-14 14:57:59 UTC (rev 238171)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/protocol/video-codecs.https-expected.txt	2018-11-14 15:21:46 UTC (rev 238172)
@@ -1,5 +1,5 @@
 
 PASS H.264 and VP8 should be supported in initial offer 
 PASS H.264 and VP8 should be negotiated after handshake 
-FAIL All H.264 codecs MUST include profile-level-id promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'fmtp.split')"
+PASS All H.264 codecs MUST include profile-level-id 
 

Modified: trunk/Source/WebCore/ChangeLog (238171 => 238172)


--- trunk/Source/WebCore/ChangeLog	2018-11-14 14:57:59 UTC (rev 238171)
+++ trunk/Source/WebCore/ChangeLog	2018-11-14 15:21:46 UTC (rev 238172)
@@ -1,5 +1,19 @@
 2018-11-14  Youenn Fablet  <[email protected]>
 
+        Add support for RTCRtpCodecParameters.sdpFmtpLine
+        https://bugs.webkit.org/show_bug.cgi?id=191591
+
+        Reviewed by Eric Carlson.
+
+        Covered by rebased test.
+
+        * Modules/mediastream/RTCRtpCodecParameters.h:
+        * Modules/mediastream/RTCRtpCodecParameters.idl:
+        * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
+        (WebCore::toRTCCodecParameters):
+
+2018-11-14  Youenn Fablet  <[email protected]>
+
         Add support for transport and peerConnection stats
         https://bugs.webkit.org/show_bug.cgi?id=191592
 

Modified: trunk/Source/WebCore/Modules/mediastream/RTCRtpCodecParameters.h (238171 => 238172)


--- trunk/Source/WebCore/Modules/mediastream/RTCRtpCodecParameters.h	2018-11-14 14:57:59 UTC (rev 238171)
+++ trunk/Source/WebCore/Modules/mediastream/RTCRtpCodecParameters.h	2018-11-14 15:21:46 UTC (rev 238172)
@@ -36,6 +36,7 @@
     String mimeType;
     unsigned long clockRate { 0 };
     unsigned short channels = 1;
+    String sdpFmtpLine;
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/Modules/mediastream/RTCRtpCodecParameters.idl (238171 => 238172)


--- trunk/Source/WebCore/Modules/mediastream/RTCRtpCodecParameters.idl	2018-11-14 14:57:59 UTC (rev 238171)
+++ trunk/Source/WebCore/Modules/mediastream/RTCRtpCodecParameters.idl	2018-11-14 15:21:46 UTC (rev 238172)
@@ -32,5 +32,5 @@
     DOMString mimeType;
     unsigned long clockRate;
     unsigned short channels = 1;
-    // FIXME: Add DOMString sdpFmtpLine;
+    DOMString sdpFmtpLine;
 };

Modified: trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp (238171 => 238172)


--- trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp	2018-11-14 14:57:59 UTC (rev 238171)
+++ trunk/Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp	2018-11-14 15:21:46 UTC (rev 238172)
@@ -128,6 +128,24 @@
     if (rtcParameters.num_channels)
         parameters.channels = *rtcParameters.num_channels;
 
+    StringBuilder sdpFmtpLineBuilder;
+    sdpFmtpLineBuilder.appendLiteral("a=fmtp:");
+    sdpFmtpLineBuilder.appendNumber(parameters.payloadType);
+    sdpFmtpLineBuilder.append(' ');
+
+    bool isFirst = true;
+    for (auto& keyValue : rtcParameters.parameters) {
+        if (!isFirst)
+            sdpFmtpLineBuilder.append(';');
+        else
+            isFirst = false;
+
+        sdpFmtpLineBuilder.append(StringView { keyValue.first.c_str() });
+        sdpFmtpLineBuilder.append('=');
+        sdpFmtpLineBuilder.append(StringView { keyValue.second.c_str() });
+    }
+    parameters.sdpFmtpLine = sdpFmtpLineBuilder.toString();
+
     return parameters;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to