Struct gstreamer_pbutils::Discoverer [−]
pub struct Discoverer(_, _);
The Discoverer is a utility object which allows to get as much
information as possible from one or many URIs.
It provides two APIs, allowing usage in blocking or non-blocking mode.
The blocking mode just requires calling Discoverer::discover_uri
with the URI one wishes to discover.
The non-blocking mode requires a running glib::MainLoop iterating a
glib::MainContext, where one connects to the various signals, appends the
URIs to be processed (through Discoverer::discover_uri_async) and then
asks for the discovery to begin (through Discoverer::start).
By default this will use the GLib default main context unless you have
set a custom context using glib::MainContext::push_thread_default.
All the information is returned in a DiscovererInfo structure.
Implements
Methods
impl Discoverer[src]
impl Discovererpub fn new(timeout: ClockTime) -> Result<Discoverer, Error>[src]
pub fn new(timeout: ClockTime) -> Result<Discoverer, Error>Creates a new Discoverer with the provided timeout.
timeout
timeout per file, in nanoseconds. Allowed are values between
one second (GST_SECOND) and one hour (3600 * GST_SECOND)
Returns
The new Discoverer.
If an error occurred when creating the discoverer, err will be set
accordingly and None will be returned. If err is set, the caller must
free it when no longer needed using glib::Error::free.
pub fn discover_uri(&self, uri: &str) -> Result<DiscovererInfo, Error>[src]
pub fn discover_uri(&self, uri: &str) -> Result<DiscovererInfo, Error>pub fn discover_uri_async(&self, uri: &str) -> Result<(), BoolError>[src]
pub fn discover_uri_async(&self, uri: &str) -> Result<(), BoolError>pub fn start(&self)[src]
pub fn start(&self)pub fn stop(&self)[src]
pub fn stop(&self)pub fn connect_discovered<F: Fn(&Discoverer, &DiscovererInfo, &Option<Error>) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_discovered<F: Fn(&Discoverer, &DiscovererInfo, &Option<Error>) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_finished<F: Fn(&Discoverer) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_finished<F: Fn(&Discoverer) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_source_setup<F: Fn(&Discoverer, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_source_setup<F: Fn(&Discoverer, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdpub fn connect_starting<F: Fn(&Discoverer) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_starting<F: Fn(&Discoverer) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdimpl Discoverer[src]
impl Discovererpub fn set_property_timeout(&self, timeout: ClockTime)[src]
pub fn set_property_timeout(&self, timeout: ClockTime)pub fn get_property_timeout(&self) -> ClockTime[src]
pub fn get_property_timeout(&self) -> ClockTimepub fn connect_property_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
pub fn connect_property_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerIdTrait Implementations
impl Clone for Discoverer
impl Clone for Discovererfn clone(&self) -> Discoverer
fn clone(&self) -> DiscovererReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Hash for Discoverer
impl Hash for Discovererfn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Ord for Discoverer
impl Ord for Discovererfn cmp(&self, other: &Discoverer) -> Ordering
fn cmp(&self, other: &Discoverer) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl StaticType for Discoverer
impl StaticType for Discovererfn static_type() -> Type
fn static_type() -> TypeReturns the type identifier of Self.
impl<T: IsA<Object>> PartialEq<T> for Discoverer
impl<T: IsA<Object>> PartialEq<T> for Discovererfn eq(&self, other: &T) -> bool
fn eq(&self, other: &T) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl Eq for Discoverer
impl Eq for Discovererimpl<T: IsA<Object>> PartialOrd<T> for Discoverer
impl<T: IsA<Object>> PartialOrd<T> for Discovererfn partial_cmp(&self, other: &T) -> Option<Ordering>
fn partial_cmp(&self, other: &T) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Debug for Discoverer
impl Debug for Discovererimpl IsA<Object> for Discoverer
impl IsA<Object> for Discovererimpl Send for Discoverer[src]
impl Send for Discovererimpl Sync for Discoverer[src]
impl Sync for Discoverer