00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "object.h"
00018 #include "../QGlib/string_p.h"
00019 #include <gst/gstobject.h>
00020
00021 namespace QGst {
00022
00023 QString Object::name() const
00024 {
00025 return QGlib::Private::stringFromGCharPtr(gst_object_get_name(object<GstObject>()));
00026 }
00027
00028 bool Object::setName(const char *name)
00029 {
00030 return gst_object_set_name(object<GstObject>(), name);
00031 }
00032
00033 ObjectPtr Object::parent() const
00034 {
00035 return ObjectPtr::wrap(gst_object_get_parent(object<GstObject>()), false);
00036 }
00037
00038 bool Object::setParent(const ObjectPtr & parent)
00039 {
00040 return gst_object_set_parent(object<GstObject>(), parent);
00041 }
00042
00043 void Object::unparent()
00044 {
00045 gst_object_unparent(object<GstObject>());
00046 }
00047
00048 bool Object::isAncestorOf(const ObjectPtr & obj) const
00049 {
00050 return gst_object_has_ancestor(obj, object<GstObject>());
00051 }
00052
00053 QString Object::pathString() const
00054 {
00055 return QGlib::Private::stringFromGCharPtr(gst_object_get_path_string(object<GstObject>()));
00056 }
00057
00058 void Object::ref(bool increaseRef)
00059 {
00060 if (increaseRef) {
00061 gst_object_ref(m_object);
00062 }
00063 }
00064
00065 void Object::unref()
00066 {
00067 gst_object_unref(m_object);
00068 }
00069
00070 }