19 #include "../QGlib/error.h"
20 #include <gst/gstbin.h>
21 #include <gst/gstutils.h>
28 GstElement *bin = gst_bin_new(name);
30 gst_object_ref_sink(bin);
39 GstElement *e = gst_parse_bin_from_description_full(description, ghostUnlinkedPads,
40 NULL, GST_PARSE_FLAG_FATAL_ERRORS, &error);
45 gst_object_ref_sink(e);
52 return gst_bin_add(object<GstBin>(), element);
57 return gst_bin_remove(object<GstBin>(), element);
65 e = gst_bin_get_by_name(object<GstBin>(), name);
68 e = gst_bin_get_by_name_recurse_up(object<GstBin>(), name);
71 Q_ASSERT_X(
false,
"QGst::Bin::getElementByName",
"Invalid RecursionType");
78 return ElementPtr::wrap(gst_bin_get_by_interface(object<GstBin>(), interfaceType),
false);
83 return PadPtr::wrap(gst_bin_find_unlinked_pad(object<GstBin>(),
84 static_cast<GstPadDirection>(direction)),
false);
87 bool Bin::recalculateLatency()
89 return gst_bin_recalculate_latency(object<GstBin>());
static RefPointer< T > wrap(typename T::CType *nativePtr, bool increaseRef=true)
Smart pointer class for working with wrapper classes that support reference counting.
PadPtr findUnlinkedPad(PadDirection direction) const
static BinPtr create(const char *name=NULL)
ElementPtr getElementByName(const char *name, RecursionType recursionType=RecurseDown) const
static BinPtr fromDescription(const char *description, BinFromDescriptionOption ghostUnlinkedPads=Ghost)
QGlib::RefPointer< T > getElementByInterface() const
bool add(const ElementPtr &element)
bool remove(const ElementPtr &element)
Wrapper class for GError.