22 #include <QtCore/QDebug> 28 PadPtr Pad::create(PadDirection direction,
const char *name)
30 GstPad *pad = gst_pad_new(name, static_cast<GstPadDirection>(direction));
32 gst_object_ref_sink(pad);
37 PadDirection Pad::direction()
const 39 return static_cast<PadDirection
>(gst_pad_get_direction(object<GstPad>()));
44 return ElementPtr::wrap(gst_pad_get_parent_element(object<GstPad>()),
false);
49 return PadPtr::wrap(gst_pad_get_peer(object<GstPad>()),
false);
52 bool Pad::isLinked()
const 54 return gst_pad_is_linked(object<GstPad>());
57 bool Pad::canLink(
const PadPtr & sink)
const 59 return gst_pad_can_link(object<GstPad>(), sink);
62 PadLinkReturn Pad::link(
const PadPtr & sink)
64 return static_cast<PadLinkReturn
>(gst_pad_link(object<GstPad>(), sink));
67 bool Pad::unlink(
const PadPtr & sink)
69 return gst_pad_unlink(object<GstPad>(), sink);
72 CapsPtr Pad::currentCaps()
const 74 return CapsPtr::wrap(gst_pad_get_current_caps(object<GstPad>()),
false);
77 CapsPtr Pad::allowedCaps()
const 79 return CapsPtr::wrap(gst_pad_get_allowed_caps(object<GstPad>()),
false);
82 CapsPtr Pad::padTemplateCaps()
const 84 return CapsPtr::wrap(gst_pad_get_pad_template_caps(object<GstPad>()),
false);
87 bool Pad::isActive()
const 89 return gst_pad_is_active(object<GstPad>());
92 bool Pad::setActive(
bool active)
94 return gst_pad_set_active(object<GstPad>(), active);
97 bool Pad::isBlocked()
const 99 return gst_pad_is_blocked(object<GstPad>());
102 bool Pad::isBlocking()
const 104 return gst_pad_is_blocking(object<GstPad>());
107 bool Pad::query(
const QueryPtr & query)
109 return gst_pad_query(object<GstPad>(), query);
112 bool Pad::sendEvent(
const EventPtr &event)
114 return gst_pad_send_event(object<GstPad>(), event);
static RefPointer< T > wrap(typename T::CType *nativePtr, bool increaseRef=true)
Wrappers for GStreamer classes.
ElementPtr parentElement() const