From: Sebastian Dröge Date: Thu, 19 Jan 2023 18:38:41 +0000 (+0200) Subject: examples: webrtc: rust: Set keyframe-max-dist=2000 and picture-id-mode=15-bit for... X-Git-Tag: 1.22.0~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6541dccaeac0abf2dfc64ab92ff1706780bfe2bc;p=platform%2Fupstream%2Fgstreamer.git examples: webrtc: rust: Set keyframe-max-dist=2000 and picture-id-mode=15-bit for VP8 and perfect-timestamps=true for audio This makes it in sync with the C sendrecv and generally behaves better. Part-of: --- 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 b00cda9..8a9aed2 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 @@ -157,9 +157,9 @@ impl App { // Create the GStreamer pipeline let pipeline = gst::parse_launch( &format!( - "videotestsrc is-live=true ! vp8enc deadline=1 ! rtpvp8pay pt=96 ! tee name=video-tee ! \ + "videotestsrc is-live=true ! vp8enc deadline=1 keyframe-max-dist=2000 ! rtpvp8pay pt=96 picture-id-mode=15-bit ! tee name=video-tee ! \ queue ! fakesink sync=true \ - audiotestsrc wave=ticks is-live=true ! opusenc ! rtpopuspay pt=97 ! application/x-rtp,encoding-name=OPUS ! tee name=audio-tee ! \ + audiotestsrc wave=ticks is-live=true ! opusenc perfect-timestamp=true ! 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 \ @@ -192,13 +192,6 @@ impl App { // Channel for outgoing WebSocket messages from other threads let (send_ws_msg_tx, send_ws_msg_rx) = mpsc::unbounded::(); - // Asynchronously set the pipeline to Playing - pipeline.call_async(|pipeline| { - pipeline - .set_state(gst::State::Playing) - .expect("Couldn't set pipeline to Playing"); - }); - let app = App(Arc::new(AppInner { pipeline, video_tee, 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 ef613cd..7a53608 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 name=vpay pt=96 ! webrtcbin. \ + "videotestsrc pattern=ball is-live=true ! vp8enc deadline=1 keyframe-max-dist=2000 ! rtpvp8pay name=vpay pt=96 picture-id-mode=15-bit ! webrtcbin. \ audiotestsrc is-live=true ! opusenc perfect-timestamp=true ! rtpopuspay name=apay pt=97 ! application/x-rtp,encoding-name=OPUS ! webrtcbin. \ webrtcbin name=webrtcbin" )?;