Commit 0947c8f0 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Rename gst::Bin traits from BinExt to GstBinExt to prevent conflicts with gtk::Bin

parent ff6b09d3
...@@ -84,6 +84,7 @@ conversion_type = "scalar" ...@@ -84,6 +84,7 @@ conversion_type = "scalar"
[[object]] [[object]]
name = "Gst.Bin" name = "Gst.Bin"
status = "generate" status = "generate"
trait_name = "GstBinExt"
[[object.function]] [[object.function]]
name = "add" name = "add"
[object.function.return] [object.function.return]
......
...@@ -83,8 +83,13 @@ Homebrew only installs various plugins if explicitly enabled, so some extra ...@@ -83,8 +83,13 @@ Homebrew only installs various plugins if explicitly enabled, so some extra
``` ```
$ brew install gstreamer gst-plugins-base gst-plugins-good \ $ brew install gstreamer gst-plugins-base gst-plugins-good \
gst-plugins-bad gst-plugins-ugly gst-libav gst-rtsp-server \ gst-plugins-bad gst-plugins-ugly gst-libav gst-rtsp-server \
<<<<<<< HEAD
--with-orc --with-libogg --with-opus --with-pango --with-theora \ --with-orc --with-libogg --with-opus --with-pango --with-theora \
--with-libvorbis --with-libvpx --enable-gtk3 --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 If you wish to install the gstreamer-player sub-crate, make sure the
......
...@@ -47,7 +47,7 @@ impl Bin { ...@@ -47,7 +47,7 @@ impl Bin {
unsafe impl Send for Bin {} unsafe impl Send for Bin {}
unsafe impl Sync 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<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); //fn add_many<P: IsA<Element>>(&self, element_1: &P, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs);
...@@ -111,7 +111,7 @@ pub trait BinExt { ...@@ -111,7 +111,7 @@ pub trait BinExt {
fn connect_property_message_forward_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; 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> { fn add<P: IsA<Element>>(&self, element: &P) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib::error::BoolError::from_glib(ffi::gst_bin_add(self.to_glib_none().0, element.to_glib_none().0), "Failed to add element") 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 @@ ...@@ -4,7 +4,7 @@
mod bin; mod bin;
pub use self::bin::Bin; pub use self::bin::Bin;
pub use self::bin::BinExt; pub use self::bin::GstBinExt;
mod buffer_pool; mod buffer_pool;
pub use self::buffer_pool::BufferPool; pub use self::buffer_pool::BufferPool;
...@@ -181,7 +181,7 @@ pub mod functions; ...@@ -181,7 +181,7 @@ pub mod functions;
#[doc(hidden)] #[doc(hidden)]
pub mod traits { pub mod traits {
pub use super::BinExt; pub use super::GstBinExt;
pub use super::BufferPoolExt; pub use super::BufferPoolExt;
pub use super::ChildProxyExt; pub use super::ChildProxyExt;
pub use super::ClockExt; pub use super::ClockExt;
......
...@@ -15,7 +15,7 @@ use glib::IsA; ...@@ -15,7 +15,7 @@ use glib::IsA;
use ffi; use ffi;
pub trait BinExtManual { pub trait GstBinExtManual {
fn add_many<E: IsA<Element>>(&self, elements: &[&E]) -> Result<(), glib::BoolError>; fn add_many<E: IsA<Element>>(&self, elements: &[&E]) -> Result<(), glib::BoolError>;
fn remove_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 { ...@@ -28,7 +28,7 @@ pub trait BinExtManual {
fn get_children(&self) -> Vec<Element>; 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> { fn add_many<E: IsA<Element>>(&self, elements: &[&E]) -> Result<(), glib::BoolError> {
for e in elements { for e in elements {
unsafe { unsafe {
......
...@@ -176,7 +176,7 @@ mod pad; ...@@ -176,7 +176,7 @@ mod pad;
mod parse_context; mod parse_context;
mod proxy_pad; mod proxy_pad;
mod tag_setter; mod tag_setter;
pub use bin::BinExtManual; pub use bin::GstBinExtManual;
pub use element::{ElementExtManual, ElementMessageType, NotifyWatchId}; pub use element::{ElementExtManual, ElementMessageType, NotifyWatchId};
pub use element::{ pub use element::{
ELEMENT_METADATA_AUTHOR, ELEMENT_METADATA_DESCRIPTION, ELEMENT_METADATA_DOC_URI, ELEMENT_METADATA_AUTHOR, ELEMENT_METADATA_DESCRIPTION, ELEMENT_METADATA_DOC_URI,
...@@ -294,7 +294,7 @@ pub mod prelude { ...@@ -294,7 +294,7 @@ pub mod prelude {
pub use meta::MetaAPI; pub use meta::MetaAPI;
pub use bin::BinExtManual; pub use bin::GstBinExtManual;
pub use element::ElementExtManual; pub use element::ElementExtManual;
// OS dependent Bus extensions (also import the other plateform trait for doc) // OS dependent Bus extensions (also import the other plateform trait for doc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment