From 2544c7cb78d458450dfc39fc01930abff3dd2b27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Tue, 3 Jan 2023 17:44:37 -0500 Subject: [PATCH] webrtc examples: Force regular non-MULTIOPUS Using MULTIOPUS breaks with most browsers Part-of: --- .../webrtc/multiparty-sendrecv/gst-rust/src/main.rs | 2 +- .../webrtc/sendonly/webrtc-unidirectional-h264.c | 3 ++- .../gst-examples/webrtc/sendrecv/gst-rust/src/main.rs | 2 +- .../gst-examples/webrtc/sendrecv/gst/webrtc-sendrecv.c | 6 +++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/subprojects/gst-examples/webrtc/multiparty-sendrecv/gst-rust/src/main.rs b/subprojects/gst-examples/webrtc/multiparty-sendrecv/gst-rust/src/main.rs index ddc61a0c3c..a8e373582b 100644 --- a/subprojects/gst-examples/webrtc/multiparty-sendrecv/gst-rust/src/main.rs +++ b/subprojects/gst-examples/webrtc/multiparty-sendrecv/gst-rust/src/main.rs @@ -160,7 +160,7 @@ impl App { &format!( "videotestsrc is-live=true ! vp8enc deadline=1 ! rtpvp8pay pt=96 ! tee name=video-tee ! \ queue ! fakesink sync=true \ - audiotestsrc wave=ticks is-live=true ! opusenc ! rtpopuspay pt=97 ! tee name=audio-tee ! \ + audiotestsrc wave=ticks is-live=true ! opusenc ! rtpopuspay pt=97 ! application/x-rtp,encoding-name=OPUS ! tee name=audio-tee ! \ queue ! fakesink sync=true \ audiotestsrc wave=silence is-live=true ! audio-mixer. \ audiomixer name=audio-mixer sink_0::mute=true ! audioconvert ! audioresample ! autoaudiosink \ diff --git a/subprojects/gst-examples/webrtc/sendonly/webrtc-unidirectional-h264.c b/subprojects/gst-examples/webrtc/sendonly/webrtc-unidirectional-h264.c index 75f4a3e56c..42cd9d2d60 100644 --- a/subprojects/gst-examples/webrtc/sendonly/webrtc-unidirectional-h264.c +++ b/subprojects/gst-examples/webrtc/sendonly/webrtc-unidirectional-h264.c @@ -244,7 +244,8 @@ create_receiver_entry (SoupWebsocketConnection * connection) "application/x-rtp,media=video,encoding-name=H264,payload=" RTP_PAYLOAD_TYPE " ! webrtcbin. " "autoaudiosrc is-live=1 ! queue max-size-buffers=1 leaky=downstream ! audioconvert ! audioresample ! opusenc ! rtpopuspay pt=" - RTP_AUDIO_PAYLOAD_TYPE " ! webrtcbin. ", &error); + RTP_AUDIO_PAYLOAD_TYPE + " ! application/x-rtp,encoding-name=OPUS ! webrtcbin. ", &error); if (error != NULL) { g_error ("Could not create WebRTC pipeline: %s\n", error->message); g_error_free (error); diff --git a/subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/main.rs b/subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/main.rs index a594e5071c..836ab5d564 100644 --- a/subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/main.rs +++ b/subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/main.rs @@ -115,7 +115,7 @@ impl App { // Create the GStreamer pipeline let pipeline = gst::parse_launch( "videotestsrc pattern=ball is-live=true ! vp8enc deadline=1 ! rtpvp8pay pt=96 ! webrtcbin. \ - audiotestsrc is-live=true ! opusenc ! rtpopuspay pt=97 ! webrtcbin. \ + audiotestsrc is-live=true ! opusenc ! rtpopuspay pt=97 ! application/x-rtp,encoding-name=OPUS ! webrtcbin. \ webrtcbin name=webrtcbin" )?; diff --git a/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc-sendrecv.c b/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc-sendrecv.c index edbaafac2a..a201c7473e 100644 --- a/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc-sendrecv.c +++ b/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc-sendrecv.c @@ -445,9 +445,9 @@ start_pipeline (gboolean create_offer, guint opus_pt, guint vp8_pt) * fixes stuttery video playback in Chrome */ "rtpvp8pay name=videopay picture-id-mode=15-bit ! " "queue ! %s,payload=%u ! sendrecv. " - "audiotestsrc is-live=true wave=red-noise ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay name=audiopay ! " - "queue ! %s,payload=%u ! sendrecv. ", RTP_CAPS_VP8, vp8_pt, - RTP_CAPS_OPUS, opus_pt); + "audiotestsrc is-live=true wave=red-noise ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay name=audiopay " + " ! application/x-rtp, encoding-name=OPUS ! queue ! %s,payload=%u ! sendrecv. ", + RTP_CAPS_VP8, vp8_pt, RTP_CAPS_OPUS, opus_pt); pipe1 = gst_parse_launch (pipeline, &error); g_free (pipeline);