sendrecv: port all examples to use a max-bundle policy

This commit is contained in:
Mathieu Duponchelle 2018-10-15 20:45:57 +02:00
parent 5c4b9a7f53
commit 4df6d21992
4 changed files with 13 additions and 10 deletions

View file

@ -316,6 +316,7 @@ fn add_video_source(pipeline: &gst::Pipeline, webrtcbin: &gst::Element) -> Resul
let vp8enc = gst::ElementFactory::make("vp8enc", None).unwrap();
videotestsrc.set_property_from_str("pattern", "ball");
videotestsrc.set_property("is-live", &true).unwrap();
vp8enc.set_property("deadline", &1i64).unwrap();
let rtpvp8pay = gst::ElementFactory::make("rtpvp8pay", None).unwrap();
@ -355,6 +356,7 @@ fn add_audio_source(pipeline: &gst::Pipeline, webrtcbin: &gst::Element) -> Resul
let queue3 = gst::ElementFactory::make("queue", None).unwrap();
audiotestsrc.set_property_from_str("wave", "red-noise");
audiotestsrc.set_property("is-live", &true).unwrap();
pipeline.add_many(&[
&audiotestsrc,
@ -430,6 +432,7 @@ impl AppControl {
pipeline.add(&webrtcbin)?;
webrtcbin.set_property_from_str("stun-server", STUN_SERVER);
webrtcbin.set_property_from_str("bundle-policy", "max-bundle");
add_video_source(&pipeline, &webrtcbin)?;
add_audio_source(&pipeline, &webrtcbin)?;

View file

@ -16,10 +16,10 @@ namespace GstWebRTCDemo
{
const string SERVER = "wss://127.0.0.1:8443";
const string PIPELINE_DESC = @"webrtcbin name=sendrecv
videotestsrc pattern=ball ! videoconvert ! queue ! vp8enc deadline=1 ! rtpvp8pay !
const string PIPELINE_DESC = @"webrtcbin name=sendrecv bundle-policy=max-bundle
videotestsrc is-live=true pattern=ball ! videoconvert ! queue ! vp8enc deadline=1 ! rtpvp8pay !
queue ! application/x-rtp,media=video,encoding-name=VP8,payload=97 ! sendrecv.
audiotestsrc wave=red-noise ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay !
audiotestsrc is-live=true wave=red-noise ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay !
queue ! application/x-rtp,media=audio,encoding-name=OPUS,payload=96 ! sendrecv.";
readonly int _id;
@ -306,4 +306,4 @@ namespace GstWebRTCDemo
}
}
}
}

View file

@ -330,10 +330,10 @@ start_pipeline (void)
GError *error = NULL;
pipe1 =
gst_parse_launch ("webrtcbin name=sendrecv " STUN_SERVER
"videotestsrc pattern=ball ! videoconvert ! queue ! vp8enc deadline=1 ! rtpvp8pay ! "
gst_parse_launch ("webrtcbin bundle-policy=max-bundle name=sendrecv " STUN_SERVER
"videotestsrc is-live=true pattern=ball ! videoconvert ! queue ! vp8enc deadline=1 ! rtpvp8pay ! "
"queue ! " RTP_CAPS_VP8 "96 ! sendrecv. "
"audiotestsrc wave=red-noise ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! "
"audiotestsrc is-live=true wave=red-noise ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay ! "
"queue ! " RTP_CAPS_OPUS "97 ! sendrecv. ",
&error);

View file

@ -16,10 +16,10 @@ gi.require_version('GstSdp', '1.0')
from gi.repository import GstSdp
PIPELINE_DESC = '''
webrtcbin name=sendrecv
videotestsrc pattern=ball ! videoconvert ! queue ! vp8enc deadline=1 ! rtpvp8pay !
webrtcbin name=sendrecv bundle-policy=max-bundle
videotestsrc is-live=true pattern=ball ! videoconvert ! queue ! vp8enc deadline=1 ! rtpvp8pay !
queue ! application/x-rtp,media=video,encoding-name=VP8,payload=97 ! sendrecv.
audiotestsrc wave=red-noise ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay !
audiotestsrc is-live=true wave=red-noise ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay !
queue ! application/x-rtp,media=audio,encoding-name=OPUS,payload=96 ! sendrecv.
'''