Package ch.bailu.gtk.gst
Klasse PadTemplate
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.type.PropertyHolder
ch.bailu.gtk.gst.PadTemplate
- Alle implementierten Schnittstellen:
PointerInterface
Padtemplates describe the possible media types a pad or an elementfactory can
handle. This allows for both inspection of handled types before loading the
element plugin as well as identifying pads on elements that are not yet
created (request or sometimes pads).
Pad and PadTemplates have #GstCaps attached to it to describe the media type
they are capable of dealing with. gst_pad_template_get_caps() or
GST_PAD_TEMPLATE_CAPS() are used to get the caps of a padtemplate. It's not
possible to modify the caps of a padtemplate after creation.
PadTemplates have a #GstPadPresence property which identifies the lifetime
of the pad and that can be retrieved with GST_PAD_TEMPLATE_PRESENCE(). Also
the direction of the pad can be retrieved from the #GstPadTemplate with
GST_PAD_TEMPLATE_DIRECTION().
The GST_PAD_TEMPLATE_NAME_TEMPLATE () is important for GST_PAD_REQUEST pads
because it has to be used as the name in the gst_element_request_pad_simple()
call to instantiate a pad from this template.
Padtemplates can be created with gst_pad_template_new() or with
gst_static_pad_template_get (), which creates a #GstPadTemplate from a
#GstStaticPadTemplate that can be filled with the
convenient GST_STATIC_PAD_TEMPLATE() macro.
A padtemplate can be used to create a pad (see gst_pad_new_from_template()
or gst_pad_new_from_static_template ()) or to add to an element class
(see gst_element_class_add_static_pad_template ()).
The following code example shows the code to create a pad from a padtemplate.
The following example shows you how to add the padtemplate to an
element class, this is usually done in the class_init of the class:
handle. This allows for both inspection of handled types before loading the
element plugin as well as identifying pads on elements that are not yet
created (request or sometimes pads).
Pad and PadTemplates have #GstCaps attached to it to describe the media type
they are capable of dealing with. gst_pad_template_get_caps() or
GST_PAD_TEMPLATE_CAPS() are used to get the caps of a padtemplate. It's not
possible to modify the caps of a padtemplate after creation.
PadTemplates have a #GstPadPresence property which identifies the lifetime
of the pad and that can be retrieved with GST_PAD_TEMPLATE_PRESENCE(). Also
the direction of the pad can be retrieved from the #GstPadTemplate with
GST_PAD_TEMPLATE_DIRECTION().
The GST_PAD_TEMPLATE_NAME_TEMPLATE () is important for GST_PAD_REQUEST pads
because it has to be used as the name in the gst_element_request_pad_simple()
call to instantiate a pad from this template.
Padtemplates can be created with gst_pad_template_new() or with
gst_static_pad_template_get (), which creates a #GstPadTemplate from a
#GstStaticPadTemplate that can be filled with the
convenient GST_STATIC_PAD_TEMPLATE() macro.
A padtemplate can be used to create a pad (see gst_pad_new_from_template()
or gst_pad_new_from_static_template ()) or to add to an element class
(see gst_element_class_add_static_pad_template ()).
The following code example shows the code to create a pad from a padtemplate.
<!-- language="C" -->
GstStaticPadTemplate my_template =
GST_STATIC_PAD_TEMPLATE (
"sink", // the name of the pad
GST_PAD_SINK, // the direction of the pad
GST_PAD_ALWAYS, // when this pad will be present
GST_STATIC_CAPS ( // the capabilities of the padtemplate
"audio/x-raw, "
"channels = (int) [ 1, 6 ]"
)
);
void
my_method (void)
{
GstPad *pad;
pad = gst_pad_new_from_static_template (&my_template, "sink");
...
}
The following example shows you how to add the padtemplate to an
element class, this is usually done in the class_init of the class:
<!-- language="C" -->
static void
my_element_class_init (GstMyElementClass *klass)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_static_pad_template (gstelement_class, &my_template);
}
https://gstreamer.freedesktop.org/documentation/gstreamer/gi-index.html
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenVon Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify -
Feldübersicht
FelderVon Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungPadTemplate(PointerContainer pointer) PadTemplate(Str name_template, int direction, int presence, Caps caps) Creates a new pad template with a name according to the given template
and with the given arguments.PadTemplate(String name_template, int direction, int presence, Caps caps) Creates a new pad template with a name according to the given template
and with the given arguments. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetCaps()Gets the capabilities of the pad template.static ClassHandlerSee gst_pad_template_set_documentation_caps().static intstatic longstatic TypeSystem.TypeSizestatic longstatic TypeSystem.TypeSizestatic PadTemplatenewFromStaticPadTemplateWithGtypePadTemplate(StaticPadTemplate pad_template, long pad_type) Converts a #GstStaticPadTemplate into a #GstPadTemplate with a type.static PadTemplatenewWithGtypePadTemplate(Str name_template, int direction, int presence, Caps caps, long pad_type) Creates a new pad template with a name according to the given template
and with the given arguments.static PadTemplatenewWithGtypePadTemplate(String name_template, int direction, int presence, Caps caps, long pad_type) Creates a new pad template with a name according to the given template
and with the given arguments.onPadCreated(PadTemplate.OnPadCreated signal) Connect to signal "pad-created".voidpadCreated(Pad pad) Emit the pad-created signal for this template when created by this pad.voidsetDocumentationCaps(Caps caps) Certain elements will dynamically construct the caps of their
pad templates.Von Klasse geerbte Methoden ch.bailu.gtk.type.PropertyHolder
getBooleanProperty, getIntProperty, getObjectProperty, getStringProperty, getStrProperty, setBooleanProperty, setIntProperty, setObjectProperty, setStringProperty, setStrPropertyVon Klasse geerbte Methoden ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnrefVon Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacksVon Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNullVon Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitVon Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Felddetails
-
SIGNAL_ON_PAD_CREATED
- Siehe auch:
-
-
Konstruktordetails
-
PadTemplate
-
PadTemplate
Creates a new pad template with a name according to the given template
and with the given arguments.- Parameter:
name_template- the name template.direction- the #GstPadDirection of the template.presence- the #GstPadPresence of the pad.caps- a #GstCaps set for the template.
-
PadTemplate
Creates a new pad template with a name according to the given template
and with the given arguments.- Parameter:
name_template- the name template.direction- the #GstPadDirection of the template.presence- the #GstPadPresence of the pad.caps- a #GstCaps set for the template.
-
-
Methodendetails
-
getClassHandler
-
newFromStaticPadTemplateWithGtypePadTemplate
public static PadTemplate newFromStaticPadTemplateWithGtypePadTemplate(@Nonnull StaticPadTemplate pad_template, long pad_type) Converts a #GstStaticPadTemplate into a #GstPadTemplate with a type.- Parameter:
pad_template- the static pad templatepad_type- The #GType of the pad to create- Gibt zurück:
- a new #GstPadTemplate.
-
newWithGtypePadTemplate
public static PadTemplate newWithGtypePadTemplate(@Nonnull Str name_template, int direction, int presence, @Nonnull Caps caps, long pad_type) Creates a new pad template with a name according to the given template
and with the given arguments.- Parameter:
name_template- the name template.direction- the #GstPadDirection of the template.presence- the #GstPadPresence of the pad.caps- a #GstCaps set for the template.pad_type- The #GType of the pad to create- Gibt zurück:
- a new #GstPadTemplate.
-
newWithGtypePadTemplate
public static PadTemplate newWithGtypePadTemplate(String name_template, int direction, int presence, @Nonnull Caps caps, long pad_type) Creates a new pad template with a name according to the given template
and with the given arguments.- Parameter:
name_template- the name template.direction- the #GstPadDirection of the template.presence- the #GstPadPresence of the pad.caps- a #GstCaps set for the template.pad_type- The #GType of the pad to create- Gibt zurück:
- a new #GstPadTemplate.
-
getCaps
Gets the capabilities of the pad template.- Gibt zurück:
- the #GstCaps of the pad template. Unref after usage.
-
getDocumentationCaps
See gst_pad_template_set_documentation_caps().- Gibt zurück:
- The caps to document. For convenience, this will return gst_pad_template_get_caps() when no documentation caps were set.
-
padCreated
Emit the pad-created signal for this template when created by this pad.- Parameter:
pad- the #GstPad that created it
-
setDocumentationCaps
Certain elements will dynamically construct the caps of their
pad templates. In order not to let environment-specific information
into the documentation, element authors should use this method to
expose "stable" caps to the reader.- Parameter:
caps- the documented capabilities
-
onPadCreated
Connect to signal "pad-created".
SeePadTemplate.OnPadCreated.onPadCreated(ch.bailu.gtk.gst.Pad)for signal description.
FieldSIGNAL_ON_PAD_CREATEDcontains original signal name and can be used as resource reference.- Parameter:
signal- callback function (lambda).- Gibt zurück:
SignalHandler. Can be used to disconnect signal and to release callback function.
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-