Changeset 268592 in webkit
- Timestamp:
- Oct 16, 2020 8:38:29 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r268589 r268592 1 2020-10-16 Youenn Fablet <youenn@apple.com> 2 3 sdpFmtLine should be missing from RTCRtpCodecCapability instead of being an empty string 4 https://bugs.webkit.org/show_bug.cgi?id=217818 5 6 Reviewed by Eric Carlson. 7 8 * webrtc/video-mute-vp8.html: 9 1 10 2020-10-16 Sam Sneddon <gsnedders@apple.com> 2 11 -
trunk/LayoutTests/webrtc/video-mute-vp8.html
r253966 r268592 21 21 22 22 const codecs = RTCRtpSender.getCapabilities("video").codecs; 23 assert_true(codecs.some((codec) => { return codec.mimeType.indexOf("VP8") }), "VP8 is listed as a codec"); 23 assert_true(codecs.some((codec) => { return codec.mimeType.indexOf("VP8") >= 0 }), "VP8 is listed as a codec"); 24 25 codecs.forEach((codec) => { 26 if (codec.mimeType.indexOf("VP8") >=0) 27 assert_equals(codec.sdpFmtpLine, undefined, "VP8 codec.sdpFmtpLine is undefined"); 28 }); 24 29 25 30 const pc = new RTCPeerConnection(); -
trunk/Source/WebCore/ChangeLog
r268590 r268592 1 2020-10-16 Youenn Fablet <youenn@apple.com> 2 3 sdpFmtLine should be missing from RTCRtpCodecCapability instead of being an empty string 4 https://bugs.webkit.org/show_bug.cgi?id=217818 5 6 Reviewed by Eric Carlson. 7 8 Covered by updated test. 9 10 * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: 11 (WebCore::toRTCRtpCapabilities): 12 If line is empty, make sure to return a null string instead. 13 1 14 2020-10-16 Philippe Normand <pnormand@igalia.com> 2 15 -
trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp
r267249 r268592 405 405 capabilities.codecs.reserveInitialCapacity(rtpCapabilities.codecs.size()); 406 406 for (auto& codec : rtpCapabilities.codecs) { 407 StringBuilder sdpFmtpLine ;407 StringBuilder sdpFmtpLineBuilder; 408 408 bool hasParameter = false; 409 409 for (auto& parameter : codec.parameters) { 410 sdpFmtpLine .append(hasParameter ? ";" : "", StringView(parameter.first.data(), parameter.first.length()), '=', StringView(parameter.second.data(), parameter.second.length()));410 sdpFmtpLineBuilder.append(hasParameter ? ";" : "", StringView(parameter.first.data(), parameter.first.length()), '=', StringView(parameter.second.data(), parameter.second.length())); 411 411 hasParameter = true; 412 412 } 413 capabilities.codecs.uncheckedAppend(RTCRtpCodecCapability { fromStdString(codec.mime_type()), static_cast<uint32_t>(codec.clock_rate ? *codec.clock_rate : 0), toChannels(codec.num_channels), sdpFmtpLine.toString() }); 413 String sdpFmtpLine; 414 if (sdpFmtpLineBuilder.length()) 415 sdpFmtpLine = sdpFmtpLineBuilder.toString(); 416 capabilities.codecs.uncheckedAppend(RTCRtpCodecCapability { fromStdString(codec.mime_type()), static_cast<uint32_t>(codec.clock_rate ? *codec.clock_rate : 0), toChannels(codec.num_channels), WTFMove(sdpFmtpLine) }); 414 417 } 415 418
Note: See TracChangeset
for help on using the changeset viewer.