#include <object.h>
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<Object> | get_parent () |
Returns the parent of object. | |
Glib::RefPtr<const Object> | get_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::Object> | wrap (GstObject* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
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)
virtual Gst::Object::~Object | ( | ) | [virtual] |
Gst::Object::Object | ( | ) | [protected] |
Glib::ustring Gst::Object::get_name | ( | ) | const |
Returns a copy of the name of object.
For a nameless object, this returns NULL.
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.
Glib::RefPtr<const Object> Gst::Object::get_parent | ( | ) | const |
Returns the parent of object.
Glib::RefPtr<Object> Gst::Object::get_parent | ( | ) |
Returns the parent of object.
const GstObject* Gst::Object::gobj | ( | ) | const [inline] |
Provides access to the underlying C GObject.
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.
GstObject* Gst::Object::gobj | ( | ) | [inline] |
Provides access to the underlying C GObject.
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.
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.
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.
void Gst::Object::reference | ( | ) | const |
void Gst::Object::restore | ( | xmlpp::Node * | self | ) |
Restores the Gst::Object with the data from the parent XML node.
self | The XML node to load object from. |
xmlpp::Node* Gst::Object::save | ( | xmlpp::Node * | parent | ) | const |
bool Gst::Object::set_name | ( | ) |
Gives object a guaranteed unique name.
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.
name | New name of object. |
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.
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.
parent | New parent of object. |
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 |
Glib::RefPtr<Gst::Object> wrap | ( | GstObject * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
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. |