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