From 32a608b76b012a26725ec47655a2c151f9ea04e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 4 Jan 2023 10:42:41 +0200 Subject: [PATCH] examples: Fix for API changes Part-of: --- examples/src/bin/cairo_compositor.rs | 2 -- examples/src/bin/ges.rs | 1 - examples/src/bin/play.rs | 2 +- examples/src/bin/player.rs | 4 ++-- examples/src/bin/rtsp-server-record.rs | 2 +- examples/src/bin/rtsp-server-subclass.rs | 2 +- examples/src/bin/rtsp-server.rs | 2 +- 7 files changed, 6 insertions(+), 9 deletions(-) diff --git a/examples/src/bin/cairo_compositor.rs b/examples/src/bin/cairo_compositor.rs index 1cb8f2033..1ec6c2f2e 100644 --- a/examples/src/bin/cairo_compositor.rs +++ b/examples/src/bin/cairo_compositor.rs @@ -14,8 +14,6 @@ mod cairo_compositor { use gst_video::{prelude::*, subclass::prelude::*}; use once_cell::sync::Lazy; - use super::*; - // In the imp submodule we include the actual implementation of the compositor. mod imp { use std::sync::Mutex; diff --git a/examples/src/bin/ges.rs b/examples/src/bin/ges.rs index 8022c4cdb..6aaac517c 100644 --- a/examples/src/bin/ges.rs +++ b/examples/src/bin/ges.rs @@ -38,7 +38,6 @@ use std::env; use ges::prelude::*; -use gst::prelude::*; #[allow(unused_imports)] #[path = "../examples-common.rs"] diff --git a/examples/src/bin/play.rs b/examples/src/bin/play.rs index 51a2dce00..bbf3b73d2 100644 --- a/examples/src/bin/play.rs +++ b/examples/src/bin/play.rs @@ -17,7 +17,7 @@ use gst_play::{Play, PlayMessage, PlayVideoRenderer}; fn main_loop(uri: &str) -> Result<(), Error> { gst::init()?; - let play = Play::new(PlayVideoRenderer::NONE); + let play = Play::new(None::); play.set_uri(Some(uri)); play.play(); diff --git a/examples/src/bin/player.rs b/examples/src/bin/player.rs index f44e5b860..09f23f727 100644 --- a/examples/src/bin/player.rs +++ b/examples/src/bin/player.rs @@ -24,8 +24,8 @@ fn main_loop(uri: &str) -> Result<(), Error> { let dispatcher = gst_player::PlayerGMainContextSignalDispatcher::new(None); let player = gst_player::Player::new( - gst_player::PlayerVideoRenderer::NONE, - Some(&dispatcher.upcast::()), + None::, + Some(dispatcher.upcast::()), ); // Tell the player what uri to play. diff --git a/examples/src/bin/rtsp-server-record.rs b/examples/src/bin/rtsp-server-record.rs index f2a20109c..3fb1321a1 100644 --- a/examples/src/bin/rtsp-server-record.rs +++ b/examples/src/bin/rtsp-server-record.rs @@ -119,7 +119,7 @@ fn main_loop() -> Result<(), Error> { // Now we add a new mount-point and tell the RTSP server to use the factory // we configured beforehand. This factory will take on the job of creating // a pipeline, which will take on the incoming data of connected clients. - mounts.add_factory("/test", &factory); + mounts.add_factory("/test", factory); // Attach the server to our main context. // A main context is the thing where other stuff is registering itself for its diff --git a/examples/src/bin/rtsp-server-subclass.rs b/examples/src/bin/rtsp-server-subclass.rs index 36f4f8300..95ab2d583 100644 --- a/examples/src/bin/rtsp-server-subclass.rs +++ b/examples/src/bin/rtsp-server-subclass.rs @@ -53,7 +53,7 @@ fn main_loop() -> Result<(), Error> { // Now we add a new mount-point and tell the RTSP server to serve the content // provided by the factory we configured above, when a client connects to // this specific path. - mounts.add_factory("/test", &factory); + mounts.add_factory("/test", factory); // Attach the server to our main context. // A main context is the thing where other stuff is registering itself for its diff --git a/examples/src/bin/rtsp-server.rs b/examples/src/bin/rtsp-server.rs index 384cb645f..e7483eece 100644 --- a/examples/src/bin/rtsp-server.rs +++ b/examples/src/bin/rtsp-server.rs @@ -56,7 +56,7 @@ fn main_loop() -> Result<(), Error> { // Now we add a new mount-point and tell the RTSP server to serve the content // provided by the factory we configured above, when a client connects to // this specific path. - mounts.add_factory("/test", &factory); + mounts.add_factory("/test", factory); // Attach the server to our main context. // A main context is the thing where other stuff is registering itself for its