examples: Fix for API changes

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1182>
This commit is contained in:
Sebastian Dröge 2023-01-04 10:42:41 +02:00
parent b94bfe1613
commit 32a608b76b
7 changed files with 6 additions and 9 deletions

View file

@ -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;

View file

@ -38,7 +38,6 @@
use std::env;
use ges::prelude::*;
use gst::prelude::*;
#[allow(unused_imports)]
#[path = "../examples-common.rs"]

View file

@ -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::<PlayVideoRenderer>);
play.set_uri(Some(uri));
play.play();

View file

@ -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::<gst_player::PlayerSignalDispatcher>()),
None::<gst_player::PlayerVideoRenderer>,
Some(dispatcher.upcast::<gst_player::PlayerSignalDispatcher>()),
);
// Tell the player what uri to play.

View file

@ -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

View file

@ -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

View file

@ -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