forked from mirrors/gstreamer-rs
Add autogenerated GstContext functions
This commit is contained in:
parent
0720b9f6f1
commit
bf0f472014
2 changed files with 29 additions and 18 deletions
10
Gir_Gst.toml
10
Gir_Gst.toml
|
@ -152,6 +152,11 @@ name = "Gst.Query"
|
||||||
status = "manual"
|
status = "manual"
|
||||||
ref_mode = "ref"
|
ref_mode = "ref"
|
||||||
|
|
||||||
|
[[object]]
|
||||||
|
name = "Gst.Context"
|
||||||
|
status = "manual"
|
||||||
|
ref_mode = "ref"
|
||||||
|
|
||||||
[[object]]
|
[[object]]
|
||||||
name = "Gst.DateTime"
|
name = "Gst.DateTime"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
|
@ -233,6 +238,11 @@ status = "generate"
|
||||||
# Pass by value
|
# Pass by value
|
||||||
ignore = true
|
ignore = true
|
||||||
|
|
||||||
|
[[object.function]]
|
||||||
|
name = "get_context_unlocked"
|
||||||
|
# Unsafe
|
||||||
|
ignore = true
|
||||||
|
|
||||||
[[object]]
|
[[object]]
|
||||||
name = "Gst.ElementFactory"
|
name = "Gst.ElementFactory"
|
||||||
status = "generate"
|
status = "generate"
|
||||||
|
|
|
@ -5,6 +5,7 @@ use Bus;
|
||||||
use Caps;
|
use Caps;
|
||||||
use Clock;
|
use Clock;
|
||||||
use ClockTime;
|
use ClockTime;
|
||||||
|
use Context;
|
||||||
use ElementFactory;
|
use ElementFactory;
|
||||||
use Error;
|
use Error;
|
||||||
use Format;
|
use Format;
|
||||||
|
@ -112,11 +113,9 @@ pub trait ElementExt {
|
||||||
|
|
||||||
fn get_compatible_pad_template(&self, compattempl: &PadTemplate) -> Option<PadTemplate>;
|
fn get_compatible_pad_template(&self, compattempl: &PadTemplate) -> Option<PadTemplate>;
|
||||||
|
|
||||||
//fn get_context(&self, context_type: &str) -> /*Ignored*/Option<Context>;
|
fn get_context(&self, context_type: &str) -> Option<Context>;
|
||||||
|
|
||||||
//fn get_context_unlocked(&self, context_type: &str) -> /*Ignored*/Option<Context>;
|
fn get_contexts(&self) -> Vec<Context>;
|
||||||
|
|
||||||
//fn get_contexts(&self) -> /*Ignored*/Vec<Context>;
|
|
||||||
|
|
||||||
fn get_factory(&self) -> Option<ElementFactory>;
|
fn get_factory(&self) -> Option<ElementFactory>;
|
||||||
|
|
||||||
|
@ -186,7 +185,7 @@ pub trait ElementExt {
|
||||||
|
|
||||||
fn set_clock<P: IsA<Clock>>(&self, clock: &P) -> Result<(), glib::error::BoolError>;
|
fn set_clock<P: IsA<Clock>>(&self, clock: &P) -> Result<(), glib::error::BoolError>;
|
||||||
|
|
||||||
//fn set_context(&self, context: /*Ignored*/&mut Context);
|
fn set_context(&self, context: &Context);
|
||||||
|
|
||||||
fn set_locked_state(&self, locked_state: bool) -> bool;
|
fn set_locked_state(&self, locked_state: bool) -> bool;
|
||||||
|
|
||||||
|
@ -295,17 +294,17 @@ impl<O: IsA<Element> + IsA<glib::object::Object>> ElementExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//fn get_context(&self, context_type: &str) -> /*Ignored*/Option<Context> {
|
fn get_context(&self, context_type: &str) -> Option<Context> {
|
||||||
// unsafe { TODO: call ffi::gst_element_get_context() }
|
unsafe {
|
||||||
//}
|
from_glib_full(ffi::gst_element_get_context(self.to_glib_none().0, context_type.to_glib_none().0))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//fn get_context_unlocked(&self, context_type: &str) -> /*Ignored*/Option<Context> {
|
fn get_contexts(&self) -> Vec<Context> {
|
||||||
// unsafe { TODO: call ffi::gst_element_get_context_unlocked() }
|
unsafe {
|
||||||
//}
|
FromGlibPtrContainer::from_glib_full(ffi::gst_element_get_contexts(self.to_glib_none().0))
|
||||||
|
}
|
||||||
//fn get_contexts(&self) -> /*Ignored*/Vec<Context> {
|
}
|
||||||
// unsafe { TODO: call ffi::gst_element_get_contexts() }
|
|
||||||
//}
|
|
||||||
|
|
||||||
fn get_factory(&self) -> Option<ElementFactory> {
|
fn get_factory(&self) -> Option<ElementFactory> {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -524,9 +523,11 @@ impl<O: IsA<Element> + IsA<glib::object::Object>> ElementExt for O {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//fn set_context(&self, context: /*Ignored*/&mut Context) {
|
fn set_context(&self, context: &Context) {
|
||||||
// unsafe { TODO: call ffi::gst_element_set_context() }
|
unsafe {
|
||||||
//}
|
ffi::gst_element_set_context(self.to_glib_none().0, context.to_glib_none().0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn set_locked_state(&self, locked_state: bool) -> bool {
|
fn set_locked_state(&self, locked_state: bool) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
Loading…
Reference in a new issue