Skip to content

Commit

Permalink
[GStreamer][WebRTC] Crash when setting video encoder bitrate per gccb…
Browse files Browse the repository at this point in the history
…we request

https://bugs.webkit.org/show_bug.cgi?id=271517

Reviewed by Adrian Perez de Castro.

* Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.h: Disable the
ssrc-audio-level RTP extension.
* Source/WebCore/platform/gstreamer/VideoEncoderPrivateGStreamer.cpp:
(videoEncoderConstructed): Fix typo, our encoder bitrate property is not named target-property.

Canonical link: https://commits.webkit.org/276688@main
  • Loading branch information
philn committed Mar 26, 2024
1 parent 33209be commit 635fa17
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
6 changes: 2 additions & 4 deletions LayoutTests/platform/glib/TestExpectations
Expand Up @@ -2028,8 +2028,7 @@ webkit.org/b/235885 webrtc/ephemeral-certificates-and-cnames.html [ Failure ]
webkit.org/b/235885 webrtc/filtering-ice-candidate-after-reload.html [ Failure ]
webkit.org/b/235885 webrtc/peer-connection-track-end.html [ Failure ]
webkit.org/b/235885 webrtc/peerconnection-page-cache.html [ Timeout ]
webkit.org/b/271517 webrtc/video-stats.html [ Crash ]
#webkit.org/b/235885 webrtc/video-stats.html [ Failure ]
webkit.org/b/235885 webrtc/video-stats.html [ Failure ]
webkit.org/b/235885 webrtc/vp8-then-h264.html [ Failure Timeout Crash ]
webkit.org/b/252878 fast/mediastream/mediastreamtrack-video-clone.html [ Crash Failure Timeout Pass ]
webkit.org/b/213202 fast/mediastream/getUserMedia-grant-persistency3.html [ Failure Pass ]
Expand All @@ -2049,8 +2048,7 @@ webrtc/captureCanvas-webrtc.html [ Pass Timeout ]
webkit.org/b/252878 webrtc/audio-peer-connection-webaudio.html [ Failure Pass Timeout ]
webkit.org/b/252878 webrtc/audio-samplerate-change.html [ Pass Timeout ]
webkit.org/b/252878 webrtc/datachannel/bufferedAmountLowThreshold-default.html [ Failure Pass ]
webkit.org/b/271517 webrtc/video-h264.html [ Crash ]
#webkit.org/b/252878 webrtc/video-h264.html [ Pass Timeout ]
webkit.org/b/252878 webrtc/video-h264.html [ Pass Timeout ]

imported/w3c/web-platform-tests/mediacapture-streams/GUM-required-constraint-with-ideal-value.https.html [ Pass Failure ]
imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-preload-none.https.html [ Pass Failure ]
Expand Down
Expand Up @@ -49,7 +49,6 @@ a=msid:{media-stream-id:OK} {media-stream-track-id:OK}
a=fingerprint:sha-256 {fingerprint:OK}
a=extmap:1 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:3 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=fmtp:96 minptime=10;useinbandfec=1
a=recvonly
a=fingerprint:sha-256 {fingerprint:OK}
Expand Down
Expand Up @@ -24,7 +24,6 @@ a=rtcp-fb:96 transport-cc
a=msid:{media-stream-id:OK} {media-stream-track-id:OK}
a=extmap:1 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:3 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=fmtp:96 minptime=10;useinbandfec=1
a=rtpmap:9 G722/8000
a=rtcp-fb:9 transport-cc
Expand Down Expand Up @@ -71,7 +70,6 @@ a=rtcp-fb:96 transport-cc
a=msid:{media-stream-id:OK} {media-stream-track-id:OK}
a=extmap:1 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:3 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=fmtp:96 minptime=10;useinbandfec=1
a=rtpmap:9 G722/8000
a=rtcp-fb:9 transport-cc
Expand Down
Expand Up @@ -177,8 +177,9 @@ class GStreamerRegistryScanner {

Vector<const char*> m_allAudioRtpExtensions { "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01",
"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time",
"urn:ietf:params:rtp-hdrext:sdes:mid",
"urn:ietf:params:rtp-hdrext:ssrc-audio-level"
"urn:ietf:params:rtp-hdrext:sdes:mid"
// This extension triggers caps negotiation issues. See https://bugs.webkit.org/show_bug.cgi?id=271519.
// "urn:ietf:params:rtp-hdrext:ssrc-audio-level"
};
Vector<const char*> m_allVideoRtpExtensions { "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01",
"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time",
Expand Down
Expand Up @@ -579,7 +579,7 @@ static void videoEncoderConstructed(GObject* encoder)
if (gst_structure_has_name(structure, "encoder-bitrate-change-request")) {
uint32_t bitrate;
gst_structure_get_uint(structure, "bitrate", &bitrate);
g_object_set(parent, "target-bitrate", bitrate, nullptr);
g_object_set(parent, "bitrate", bitrate, nullptr);
return TRUE;
}
}
Expand Down

0 comments on commit 635fa17

Please sign in to comment.