mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-29 06:50:59 +00:00
Update for various deprecated APIs
This commit is contained in:
parent
037294b077
commit
2c386fb792
7 changed files with 11 additions and 9 deletions
|
@ -693,7 +693,7 @@ fn setup(
|
||||||
let pipeline = gst::Pipeline::default();
|
let pipeline = gst::Pipeline::default();
|
||||||
|
|
||||||
// Src
|
// Src
|
||||||
let src_element = glib::Object::new::<ElementSrcTest>(&[]);
|
let src_element = glib::Object::new_default::<ElementSrcTest>();
|
||||||
src_element.set_property("context", &context_name);
|
src_element.set_property("context", &context_name);
|
||||||
pipeline.add(&src_element).unwrap();
|
pipeline.add(&src_element).unwrap();
|
||||||
|
|
||||||
|
@ -713,7 +713,9 @@ fn setup(
|
||||||
|
|
||||||
// Sink
|
// Sink
|
||||||
let (sender, receiver) = mpsc::channel::<Item>(10);
|
let (sender, receiver) = mpsc::channel::<Item>(10);
|
||||||
let sink_element = glib::Object::new::<ElementSinkTest>(&[("sender", &ItemSender { sender })]);
|
let sink_element = glib::Object::builder::<ElementSinkTest>()
|
||||||
|
.property("sender", ItemSender { sender })
|
||||||
|
.build();
|
||||||
pipeline.add(&sink_element).unwrap();
|
pipeline.add(&sink_element).unwrap();
|
||||||
last_element.link(&sink_element).unwrap();
|
last_element.link(&sink_element).unwrap();
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ glib::wrapper! {
|
||||||
|
|
||||||
impl RTPAv1Depay {
|
impl RTPAv1Depay {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
glib::Object::new(&[])
|
glib::Object::new_default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ glib::wrapper! {
|
||||||
|
|
||||||
impl RTPAv1Pay {
|
impl RTPAv1Pay {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
glib::Object::new(&[])
|
glib::Object::new_default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,6 @@ impl Signallable for Signaller {
|
||||||
|
|
||||||
impl Default for Signaller {
|
impl Default for Signaller {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
glib::Object::new::<Self>(&[])
|
glib::Object::new_default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1402,7 +1402,7 @@ impl WebRTCSink {
|
||||||
);
|
);
|
||||||
|
|
||||||
let pipeline = gst::Pipeline::builder()
|
let pipeline = gst::Pipeline::builder()
|
||||||
.name(&format!("session-pipeline-{}", session_id))
|
.name(format!("session-pipeline-{}", session_id))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let webrtcbin = make_element("webrtcbin", Some(&format!("webrtcbin-{}", session_id)))
|
let webrtcbin = make_element("webrtcbin", Some(&format!("webrtcbin-{}", session_id)))
|
||||||
|
|
|
@ -83,13 +83,13 @@ impl<T: AsRef<glib::Object> + Signallable> SignallableObject for T {}
|
||||||
|
|
||||||
impl Default for WebRTCSink {
|
impl Default for WebRTCSink {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
glib::Object::new::<Self>(&[])
|
glib::Object::new_default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl WebRTCSink {
|
impl WebRTCSink {
|
||||||
pub fn with_signaller(signaller: Box<dyn SignallableObject>) -> Self {
|
pub fn with_signaller(signaller: Box<dyn SignallableObject>) -> Self {
|
||||||
let ret: WebRTCSink = glib::Object::new(&[]);
|
let ret = glib::Object::new_default::<WebRTCSink>();
|
||||||
|
|
||||||
let ws = ret.imp();
|
let ws = ret.imp();
|
||||||
ws.set_signaller(signaller).unwrap();
|
ws.set_signaller(signaller).unwrap();
|
||||||
|
|
|
@ -16,6 +16,6 @@ glib::wrapper! {
|
||||||
|
|
||||||
impl CustomSource {
|
impl CustomSource {
|
||||||
pub fn new(source: &gst::Element) -> CustomSource {
|
pub fn new(source: &gst::Element) -> CustomSource {
|
||||||
glib::Object::new(&[("source", source)])
|
glib::Object::builder().property("source", source).build()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue