From b7c0e8bc844c05bee02d85075529411f44f4fec5 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 | 6 ++++-- .../gst-examples/webrtc/sendrecv/gst-rust/src/main.rs | 2 +- .../gst-examples/webrtc/sendrecv/gst/webrtc-sendrecv.c | 3 ++- 4 files changed, 8 insertions(+), 5 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 8e84f9a757..b00cda9068 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 @@ -159,7 +159,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 1fedf8494c..7df8bd9c74 100644 --- a/subprojects/gst-examples/webrtc/sendonly/webrtc-unidirectional-h264.c +++ b/subprojects/gst-examples/webrtc/sendonly/webrtc-unidirectional-h264.c @@ -248,8 +248,10 @@ create_receiver_entry (SoupWebsocketConnection * connection) "rtph264pay config-interval=-1 name=payloader aggregate-mode=zero-latency ! " "application/x-rtp,media=video,encoding-name=H264,payload=" RTP_PAYLOAD_TYPE " ! webrtcbin. " - "autoaudiosrc ! queue max-size-buffers=1 leaky=downstream ! audioconvert ! audioresample ! opusenc ! rtpopuspay pt=" - RTP_AUDIO_PAYLOAD_TYPE " ! webrtcbin. ", &error); + "autoaudiosrc ! queue max-size-buffers=1 leaky=downstream" + " ! audioconvert ! audioresample ! opusenc ! rtpopuspay pt=" + 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 585eb17f09..c06d777906 100644 --- a/subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/main.rs +++ b/subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/main.rs @@ -116,7 +116,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 9455e26273..d1da1155d0 100644 --- a/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc-sendrecv.c +++ b/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc-sendrecv.c @@ -481,7 +481,8 @@ start_pipeline (gboolean create_offer, guint opus_pt, guint vp8_pt) audio_desc = g_strdup_printf ("audiotestsrc is-live=true wave=red-noise ! audioconvert ! audioresample" - "! queue ! opusenc ! rtpopuspay name=audiopay pt=%u ! queue", opus_pt); + "! queue ! opusenc ! rtpopuspay name=audiopay pt=%u " + "! application/x-rtp, encoding-name=OPUS ! queue", opus_pt); audio_bin = gst_parse_bin_from_description (audio_desc, TRUE, &audio_error); g_free (audio_desc); if (audio_error) {