gstreamermm  0.10.11
Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions
Gst::Discoverer Class Reference

Discoverer - Utility for discovering information on URIs. More...

Inheritance diagram for Gst::Discoverer:
Inheritance graph
[legend]
Collaboration diagram for Gst::Discoverer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~Discoverer ()
GstDiscoverer* gobj ()
 Provides access to the underlying C GObject.
const GstDiscoverer* gobj () const
 Provides access to the underlying C GObject.
GstDiscoverer* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
void start ()
 Allow asynchronous discovering of URIs to take place.
void stop ()
 Stop the discovery of any pending URIs and clears the list of pending URIS (if any).
Glib::RefPtr< DiscovererInfodiscover_uri (const Glib::ustring& uri)
 Synchronously discovers the given uri.
bool discover_uri_async (const Glib::ustring& uri)
 Appends the given uri to the list of URIs to discoverer.
Glib::PropertyProxy< guint64 > property_timeout ()
 Timeout.
Glib::PropertyProxy_ReadOnly
< guint64 > 
property_timeout () const
 Timeout.
Glib::SignalProxy2< void,
const Glib::RefPtr
< DiscovererInfo >&, const
Glib::Error& > 
signal_discovered ()
Glib::SignalProxy0< void > signal_finished ()
Glib::SignalProxy0< void > signal_starting ()

Static Public Member Functions

static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system.
static Glib::RefPtr< Discoverercreate (ClockTime timeout)
 Creates a new Gst::Discoverer with the provided timeout.

Protected Member Functions

 Discoverer (ClockTime timeout)
virtual void on_discovered (const Glib::RefPtr< DiscovererInfo >& info, const Glib::Error& error)
 This is a default handler for the signal signal_discovered().
virtual void on_finished ()
 This is a default handler for the signal signal_finished().
virtual void on_starting ()
 This is a default handler for the signal signal_starting().

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Gst::Discovererwrap (GstDiscoverer* object, bool take_copy=false)
 A Glib::wrap() method for this object.

Detailed Description

Discoverer - Utility for discovering information on URIs.

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 discover_uri() with the URI one wishes to discover.

The non-blocking mode requires a running Glib::MainLoop in the default Glib::MainContext, where one connects to the various signals, appends the URIs to be processed (through discover_uri_async()) and then asks for the discovery to begin (through start()).

All the information is returned in a DiscovererInfo structure.


Constructor & Destructor Documentation

virtual Gst::Discoverer::~Discoverer ( ) [virtual]
Gst::Discoverer::Discoverer ( ClockTime  timeout) [explicit, protected]

Member Function Documentation

Creates a new Gst::Discoverer with the provided timeout.

Parameters:
timeoutTimeout per file, in nanoseconds. Allowed are values between one second (Gst::SECOND) and one hour (3600* Gst::SECOND).
errA pointer to a Error. can be 0.
Returns:
The new Gst::Discoverer. If an error occurred when creating the discoverer, err will be set accordingly and 0 will be returned. If err is set, the caller must free it when no longer needed using Glib::error_free().

Synchronously discovers the given uri.

A copy of uri will be made internally, so the caller can safely Glib::free() afterwards.

Parameters:
uriThe URI to run on.
errIf an error occurred, this field will be filled in.
Returns:
The result of the scanning. Can be 0 if an error occurred.

Appends the given uri to the list of URIs to discoverer.

The actual discovery of the uri will only take place if start() has been called.

A copy of uri will be made internally, so the caller can safely Glib::free() afterwards.

Parameters:
uriThe URI to add.
Returns:
true if the uri was successfully appended to the list of pending uris, else false.
static GType Gst::Discoverer::get_type ( ) [static]

Get the GType for this class, for use with the underlying GObject type system.

GstDiscoverer* Gst::Discoverer::gobj ( ) [inline]

Provides access to the underlying C GObject.

Reimplemented from Glib::ObjectBase.

const GstDiscoverer* Gst::Discoverer::gobj ( ) const [inline]

Provides access to the underlying C GObject.

Reimplemented from Glib::ObjectBase.

GstDiscoverer* Gst::Discoverer::gobj_copy ( )

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

virtual void Gst::Discoverer::on_discovered ( const Glib::RefPtr< DiscovererInfo >&  info,
const Glib::Error error 
) [protected, virtual]

This is a default handler for the signal signal_discovered().

virtual void Gst::Discoverer::on_finished ( ) [protected, virtual]

This is a default handler for the signal signal_finished().

virtual void Gst::Discoverer::on_starting ( ) [protected, virtual]

This is a default handler for the signal signal_starting().

Timeout.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Timeout.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Slot Prototype:
void on_my_discovered(const Glib::RefPtr<DiscovererInfo>& info, const Glib::Error& error)

Will be emitted when all information on a URI could be discovered.

Parameters:
infoThe results Gst::DiscovererInfo.
Slot Prototype:
void on_my_finished()

Will be emitted when all pending URIs have been processed.

Slot Prototype:
void on_my_starting()

Will be emitted when the discover starts analyzing the pending URIs

Allow asynchronous discovering of URIs to take place.

A MainLoop must be available for Gst::Discoverer to properly work in asynchronous mode.

Stop the discovery of any pending URIs and clears the list of pending URIS (if any).


Friends And Related Function Documentation

Glib::RefPtr< Gst::Discoverer > wrap ( GstDiscoverer *  object,
bool  take_copy = false 
) [related]

A Glib::wrap() method for this object.

Parameters:
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file: