webrtc examples: Force regular non-MULTIOPUS
authorOlivier CrĂȘte <olivier.crete@collabora.com>
Tue, 3 Jan 2023 22:44:37 +0000 (17:44 -0500)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 4 Jan 2023 12:02:25 +0000 (12:02 +0000)
Using MULTIOPUS breaks with most browsers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3675>

subprojects/gst-examples/webrtc/multiparty-sendrecv/gst-rust/src/main.rs
subprojects/gst-examples/webrtc/sendonly/webrtc-unidirectional-h264.c
subprojects/gst-examples/webrtc/sendrecv/gst-rust/src/main.rs
subprojects/gst-examples/webrtc/sendrecv/gst/webrtc-sendrecv.c

index 8e84f9a..b00cda9 100644 (file)
@@ -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 \
index 1fedf84..7df8bd9 100644 (file)
@@ -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);
index 585eb17..c06d777 100644 (file)
@@ -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"
     )?;
 
index 9455e26..d1da115 100644 (file)
@@ -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) {