Gst::Object Class Reference

Gst::Object — Base class for the GStreamer object hierarchy. More...

#include <object.h>

Inheritance diagram for Gst::Object:

Gst::Bus Gst::Clock Gst::Element Gst::Index Gst::Pad Gst::PadTemplate Gst::Plugin Gst::PluginFeature Gst::Registry Gst::Task Gst::XML

List of all members.

Public Member Functions

virtual ~Object ()
GstObject* gobj ()
 Provides access to the underlying C GObject.
const GstObject* gobj () const
 Provides access to the underlying C GObject.
GstObject* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
void reference () const
void unreference () const
bool set_name (const Glib::ustring& name)
 Sets the name of object.
bool set_name ()
 Gives object a guaranteed unique name.
Glib::ustring get_name () const
 Returns a copy of the name of object.
bool set_parent (const Glib::RefPtr<Object>& parent)
 Sets the parent of object to parent.
Glib::RefPtr<Objectget_parent ()
 Returns the parent of object.
Glib::RefPtr<const Objectget_parent () const
 Returns the parent of object.
void unparent ()
 Clear the parent of object, removing the associated reference.
Glib::ustring get_name_prefix () const
 Returns a copy of the name prefix of object.
void set_name_prefix (const Glib::ustring& prefix)
 Sets the name prefix of object to name_prefix.
xmlpp::Node* save (xmlpp::Node* parent) const
 Saves object into the parent XML node.
void restore (xmlpp::Node* self)
 Restores the Gst::Object with the data from the parent XML node.
Glib::PropertyProxy
<Glib::ustring> 
property_name ()
 The name of the object.
Glib::PropertyProxy_ReadOnly
<Glib::ustring> 
property_name () const
 The name of the object.

Protected Member Functions

 Object ()

Related Functions

(Note that these are not member functions.)

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


Detailed Description

Gst::Object — Base class for the GStreamer object hierarchy.

Gst::Object provides a root for the object hierarchy tree filed in by the GStreamer library. It is currently a thin wrapper on top of Glib::Object. It is an abstract class that is not very usable on its own.

Gst::Object gives us basic refcounting, parenting functionality and locking. Most of the function are just extended for special GStreamer needs and can be found under the same name in the base class of Gst::Object which is Glib::Object (e.g. Glib::Object::reference() becomes Gst:Object::reference().

In contrast to Glib::Object instances, Gst::Object adds a name property. The functions set_name() and get_name() are used to set/get the name of the object.

Last reviewed on 2005-11-09 (0.9.4)


Constructor & Destructor Documentation

virtual Gst::Object::~Object (  )  [virtual]

Gst::Object::Object (  )  [protected]


Member Function Documentation

Glib::ustring Gst::Object::get_name (  )  const

Returns a copy of the name of object.

For a nameless object, this returns NULL.

Returns:
The name of object. MT safe. This function grabs and releases object's LOCK.

Reimplemented in Gst::Plugin, and Gst::PluginFeature.

Glib::ustring Gst::Object::get_name_prefix (  )  const

Returns a copy of the name prefix of object.

For a prefixless object, this returns NULL.

Returns:
The name prefix of object. MT safe. This function grabs and releases object's LOCK.

Glib::RefPtr<const Object> Gst::Object::get_parent (  )  const

Returns the parent of object.

Returns:
Parent of object, this can be NULL if object has no parent. MT safe. Grabs and releases object's LOCK.

Glib::RefPtr<Object> Gst::Object::get_parent (  ) 

Returns the parent of object.

Returns:
Parent of object, this can be NULL if object has no parent. MT safe. Grabs and releases object's LOCK.

const GstObject* Gst::Object::gobj (  )  const [inline]

GstObject* Gst::Object::gobj (  )  [inline]

GstObject* Gst::Object::gobj_copy (  ) 

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

Reimplemented in Gst::BaseSink, Gst::BaseSrc, Gst::BaseTransform, Gst::Bin, Gst::Bus, Gst::CapsFilter, Gst::Clock, Gst::Element, Gst::ElementInterfaced<T_Interface>, Gst::ElementFactory, Gst::FakeSink, Gst::FakeSrc, Gst::FdSink, Gst::FdSrc, Gst::FileSink, Gst::FileSrc, Gst::Identity, Gst::Index, Gst::IndexFactory, Gst::MultiQueue, Gst::Pad, Gst::PadTemplate, Gst::Pipeline, Gst::Plugin, Gst::PluginFeature, Gst::PushSrc, Gst::Queue, Gst::Registry, Gst::SystemClock, Gst::Task, Gst::Tee, Gst::TypeFind, Gst::XML, GstBase::Adder, GstBase::AlsaMixer, GstBase::AlsaSink, GstBase::AlsaSrc, GstBase::AudioClock, GstBase::AudioConvert, GstBase::AudioFilter, GstBase::AudioResample, GstBase::AudioSink, GstBase::AudioSrc, GstBase::AudioTestSrc, GstBase::BaseAudioSink, GstBase::BaseAudioSrc, GstBase::CddaBaseSrc, GstBase::CdParanoiaSrc, GstBase::ClockOverlay, GstBase::DecodeBin, GstBase::FfmpegColorSpace, GstBase::GioSink, GstBase::GioSrc, GstBase::GioStreamSink, GstBase::GioStreamSrc, GstBase::OggDemux, GstBase::OggMux, GstBase::PlayBin2, GstBase::TextOverlay, GstBase::TextRender, GstBase::TheoraDec, GstBase::TheoraEnc, GstBase::TimeOverlay, GstBase::VideoRate, GstBase::VideoScale, GstBase::VideoSink, GstBase::VideoTestSrc, GstBase::Volume, GstBase::VorbisDec, GstBase::VorbisEnc, GstBase::VorbisParse, GstBase::VorbisTag, GstBase::XImageSink, and GstBase::XvImageSink.

Glib::PropertyProxy_ReadOnly<Glib::ustring> Gst::Object::property_name (  )  const

The name of the object.

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.

Glib::PropertyProxy<Glib::ustring> Gst::Object::property_name (  ) 

The name of the object.

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.

void Gst::Object::reference (  )  const

void Gst::Object::restore ( xmlpp::Node *  self  ) 

Restores the Gst::Object with the data from the parent XML node.

Parameters:
self The XML node to load object from.

xmlpp::Node* Gst::Object::save ( xmlpp::Node *  parent  )  const

Saves object into the parent XML node.

Parameters:
parent The parent XML node to save object into.
Returns:
The new xmlpp::Node pointer with the saved object.

bool Gst::Object::set_name (  ) 

Gives object a guaranteed unique name.

Returns:
true if the name could be set. Since Objects that have a parent cannot be renamed, this function returns false in those cases. MT safe. This function grabs and releases object's LOCK.

bool Gst::Object::set_name ( const Glib::ustring &  name  ) 

Sets the name of object.

For setting an arbitrary name, use set_name() with no argument. This function makes a copy of the provided name, so the caller retains ownership of the name it sent.

Parameters:
name New name of object.
Returns:
true if the name could be set. Since Objects that have a parent cannot be renamed, this function returns false in those cases. MT safe. This function grabs and releases object's LOCK.

Reimplemented in Gst::PluginFeature.

void Gst::Object::set_name_prefix ( const Glib::ustring &  prefix  ) 

Sets the name prefix of object to name_prefix.

This function makes a copy of the provided name prefix, so the caller retains ownership of the name prefix it sent.

MT safe. This function grabs and releases object's LOCK.

Parameters:
name_prefix New name prefix of object.

bool Gst::Object::set_parent ( const Glib::RefPtr<Object>&  parent  ) 

Sets the parent of object to parent.

The object's reference count will be incremented.

This function causes the parent-set signal to be emitted when the parent was successfully set.

Parameters:
parent New parent of object.
Returns:
true if parent could be set or false when object already had a parent or object and parent are the same. MT safe. Grabs and releases object's LOCK.

void Gst::Object::unparent (  ) 

Clear the parent of object, removing the associated reference.

This function decreases the refcount of object.

MT safe. Grabs and releases object's lock.

void Gst::Object::unreference (  )  const


Friends And Related Function Documentation

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

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

Parameters:
object The C instance.
take_copy False 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:

Generated on Thu Jan 15 09:33:13 2009 for gstreamermm by  doxygen 1.5.7.1