mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-23 00:26:31 +00:00
Rename gst::Bin traits from BinExt to GstBinExt to prevent conflicts with gtk::Bin
This commit is contained in:
parent
ff6b09d301
commit
0947c8f087
6 changed files with 14 additions and 8 deletions
|
@ -84,6 +84,7 @@ conversion_type = "scalar"
|
|||
[[object]]
|
||||
name = "Gst.Bin"
|
||||
status = "generate"
|
||||
trait_name = "GstBinExt"
|
||||
[[object.function]]
|
||||
name = "add"
|
||||
[object.function.return]
|
||||
|
|
|
@ -83,8 +83,13 @@ Homebrew only installs various plugins if explicitly enabled, so some extra
|
|||
```
|
||||
$ brew install gstreamer gst-plugins-base gst-plugins-good \
|
||||
gst-plugins-bad gst-plugins-ugly gst-libav gst-rtsp-server \
|
||||
<<<<<<< HEAD
|
||||
--with-orc --with-libogg --with-opus --with-pango --with-theora \
|
||||
--with-libvorbis --with-libvpx --enable-gtk3
|
||||
=======
|
||||
--with-orc -with-libogg --with-opus --with-pango --with-theora \
|
||||
--with-libvorbis --with-libvpx
|
||||
>>>>>>> Add libvpx to brew install
|
||||
```
|
||||
|
||||
If you wish to install the gstreamer-player sub-crate, make sure the
|
||||
|
|
|
@ -47,7 +47,7 @@ impl Bin {
|
|||
unsafe impl Send for Bin {}
|
||||
unsafe impl Sync for Bin {}
|
||||
|
||||
pub trait BinExt {
|
||||
pub trait GstBinExt {
|
||||
fn add<P: IsA<Element>>(&self, element: &P) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
//fn add_many<P: IsA<Element>>(&self, element_1: &P, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs);
|
||||
|
@ -111,7 +111,7 @@ pub trait BinExt {
|
|||
fn connect_property_message_forward_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
}
|
||||
|
||||
impl<O: IsA<Bin> + IsA<glib::object::Object>> BinExt for O {
|
||||
impl<O: IsA<Bin> + IsA<glib::object::Object>> GstBinExt for O {
|
||||
fn add<P: IsA<Element>>(&self, element: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib::error::BoolError::from_glib(ffi::gst_bin_add(self.to_glib_none().0, element.to_glib_none().0), "Failed to add element")
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
mod bin;
|
||||
pub use self::bin::Bin;
|
||||
pub use self::bin::BinExt;
|
||||
pub use self::bin::GstBinExt;
|
||||
|
||||
mod buffer_pool;
|
||||
pub use self::buffer_pool::BufferPool;
|
||||
|
@ -181,7 +181,7 @@ pub mod functions;
|
|||
|
||||
#[doc(hidden)]
|
||||
pub mod traits {
|
||||
pub use super::BinExt;
|
||||
pub use super::GstBinExt;
|
||||
pub use super::BufferPoolExt;
|
||||
pub use super::ChildProxyExt;
|
||||
pub use super::ClockExt;
|
||||
|
|
|
@ -15,7 +15,7 @@ use glib::IsA;
|
|||
|
||||
use ffi;
|
||||
|
||||
pub trait BinExtManual {
|
||||
pub trait GstBinExtManual {
|
||||
fn add_many<E: IsA<Element>>(&self, elements: &[&E]) -> Result<(), glib::BoolError>;
|
||||
fn remove_many<E: IsA<Element>>(&self, elements: &[&E]) -> Result<(), glib::BoolError>;
|
||||
|
||||
|
@ -28,7 +28,7 @@ pub trait BinExtManual {
|
|||
fn get_children(&self) -> Vec<Element>;
|
||||
}
|
||||
|
||||
impl<O: IsA<Bin>> BinExtManual for O {
|
||||
impl<O: IsA<Bin>> GstBinExtManual for O {
|
||||
fn add_many<E: IsA<Element>>(&self, elements: &[&E]) -> Result<(), glib::BoolError> {
|
||||
for e in elements {
|
||||
unsafe {
|
||||
|
|
|
@ -176,7 +176,7 @@ mod pad;
|
|||
mod parse_context;
|
||||
mod proxy_pad;
|
||||
mod tag_setter;
|
||||
pub use bin::BinExtManual;
|
||||
pub use bin::GstBinExtManual;
|
||||
pub use element::{ElementExtManual, ElementMessageType, NotifyWatchId};
|
||||
pub use element::{
|
||||
ELEMENT_METADATA_AUTHOR, ELEMENT_METADATA_DESCRIPTION, ELEMENT_METADATA_DOC_URI,
|
||||
|
@ -294,7 +294,7 @@ pub mod prelude {
|
|||
|
||||
pub use meta::MetaAPI;
|
||||
|
||||
pub use bin::BinExtManual;
|
||||
pub use bin::GstBinExtManual;
|
||||
pub use element::ElementExtManual;
|
||||
|
||||
// OS dependent Bus extensions (also import the other plateform trait for doc)
|
||||
|
|
Loading…
Reference in a new issue