mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-02 07:18:43 +00:00
Update for new GLib boxed deriving API
This commit is contained in:
parent
56895f35bc
commit
cbfd80d75f
2 changed files with 6 additions and 17 deletions
|
@ -175,7 +175,8 @@ static PROPERTIES: [subclass::Property; 11] = [
|
||||||
|
|
||||||
const REQWEST_CLIENT_CONTEXT: &str = "gst.reqwest.client";
|
const REQWEST_CLIENT_CONTEXT: &str = "gst.reqwest.client";
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug, GBoxed)]
|
||||||
|
#[gboxed(type_name = "ReqwestClientContext")]
|
||||||
struct ClientContext(Arc<ClientContextInner>);
|
struct ClientContext(Arc<ClientContextInner>);
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
@ -183,14 +184,6 @@ struct ClientContextInner {
|
||||||
client: Client,
|
client: Client,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl glib::subclass::boxed::BoxedType for ClientContext {
|
|
||||||
const NAME: &'static str = "ReqwestClientContext";
|
|
||||||
|
|
||||||
glib_boxed_type!();
|
|
||||||
}
|
|
||||||
|
|
||||||
glib_boxed_derive_traits!(ClientContext);
|
|
||||||
|
|
||||||
#[allow(clippy::large_enum_variant)]
|
#[allow(clippy::large_enum_variant)]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
enum State {
|
enum State {
|
||||||
|
|
|
@ -22,7 +22,8 @@ use futures::lock::Mutex as FutMutex;
|
||||||
use futures::prelude::*;
|
use futures::prelude::*;
|
||||||
|
|
||||||
use glib;
|
use glib;
|
||||||
use glib::{glib_boxed_derive_traits, glib_boxed_type, glib_object_impl, glib_object_subclass};
|
use glib::GBoxed;
|
||||||
|
use glib::{glib_object_impl, glib_object_subclass};
|
||||||
|
|
||||||
use gst;
|
use gst;
|
||||||
use gst::prelude::*;
|
use gst::prelude::*;
|
||||||
|
@ -439,16 +440,11 @@ enum Item {
|
||||||
Event(gst::Event),
|
Event(gst::Event),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug, GBoxed)]
|
||||||
|
#[gboxed(type_name = "TsTestItemSender")]
|
||||||
struct ItemSender {
|
struct ItemSender {
|
||||||
sender: mpsc::Sender<Item>,
|
sender: mpsc::Sender<Item>,
|
||||||
}
|
}
|
||||||
impl glib::subclass::boxed::BoxedType for ItemSender {
|
|
||||||
const NAME: &'static str = "TsTestItemSender";
|
|
||||||
|
|
||||||
glib_boxed_type!();
|
|
||||||
}
|
|
||||||
glib_boxed_derive_traits!(ItemSender);
|
|
||||||
|
|
||||||
static SINK_PROPERTIES: [glib::subclass::Property; 1] =
|
static SINK_PROPERTIES: [glib::subclass::Property; 1] =
|
||||||
[glib::subclass::Property("sender", |name| {
|
[glib::subclass::Property("sender", |name| {
|
||||||
|
|
Loading…
Reference in a new issue