Klasse ElementFactory

Alle implementierten Schnittstellen:
PointerInterface

public class ElementFactory extends PluginFeature
#GstElementFactory is used to create instances of elements. A
GstElementFactory can be added to a #GstPlugin as it is also a
#GstPluginFeature.

Use the gst_element_factory_find() and gst_element_factory_create()
functions to create element instances or use gst_element_factory_make() as a
convenient shortcut.

The following code example shows you how to create a GstFileSrc element.

## Using an element factory
<!-- language="C" -->
   #include <gst/gst.h>
 
   GstElement *src;
   GstElementFactory *srcfactory;
 
   gst_init (&argc, &argv);
 
   srcfactory = gst_element_factory_find ("filesrc");
   g_return_if_fail (srcfactory != NULL);
   src = gst_element_factory_create (srcfactory, "src");
   g_return_if_fail (src != NULL);
   ...
 

https://gstreamer.freedesktop.org/documentation/gstreamer/gi-index.html

  • Konstruktordetails

  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • canSinkAllCaps

      public boolean canSinkAllCaps(@Nonnull Caps caps)
      Checks if the factory can sink all possible capabilities.
      Parameter:
      caps - the caps to check
      Gibt zurück:
      %TRUE if the caps are fully compatible.
    • canSinkAnyCaps

      public boolean canSinkAnyCaps(@Nonnull Caps caps)
      Checks if the factory can sink any possible capability.
      Parameter:
      caps - the caps to check
      Gibt zurück:
      %TRUE if the caps have a common subset.
    • canSrcAllCaps

      public boolean canSrcAllCaps(@Nonnull Caps caps)
      Checks if the factory can src all possible capabilities.
      Parameter:
      caps - the caps to check
      Gibt zurück:
      %TRUE if the caps are fully compatible.
    • canSrcAnyCaps

      public boolean canSrcAnyCaps(@Nonnull Caps caps)
      Checks if the factory can src any possible capability.
      Parameter:
      caps - the caps to check
      Gibt zurück:
      %TRUE if the caps have a common subset.
    • create

      public Element create(@Nullable Str name)
      Create a new element of the type defined by the given elementfactory.
      It will be given the name supplied, since all elements require a name as
      their first argument.
      Parameter:
      name - name of new element, or %NULL to automatically create a unique name
      Gibt zurück:
      new #GstElement or %NULL if the element couldn't be created
    • create

      public Element create(String name)
      Create a new element of the type defined by the given elementfactory.
      It will be given the name supplied, since all elements require a name as
      their first argument.
      Parameter:
      name - name of new element, or %NULL to automatically create a unique name
      Gibt zurück:
      new #GstElement or %NULL if the element couldn't be created
    • createFull

      public Element createFull(@Nullable Str first, Object... _ellipsis)
      Create a new element of the type defined by the given elementfactory.
      The supplied list of properties, will be passed at object construction.
      Parameter:
      first - name of the first property
      _ellipsis - %NULL terminated list of properties
      Gibt zurück:
      new #GstElement or %NULL if the element couldn't be created
    • createFull

      public Element createFull(String first, Object... _ellipsis)
      Create a new element of the type defined by the given elementfactory.
      The supplied list of properties, will be passed at object construction.
      Parameter:
      first - name of the first property
      _ellipsis - %NULL terminated list of properties
      Gibt zurück:
      new #GstElement or %NULL if the element couldn't be created
    • getElementType

      public long getElementType()
      Get the #GType for elements managed by this factory. The type can
      only be retrieved if the element factory is loaded, which can be
      assured with gst_plugin_feature_load().
      Gibt zurück:
      the #GType for elements managed by this factory or 0 if the factory is not loaded.
    • getMetadata

      public Str getMetadata(@Nonnull Str key)
      Get the metadata on @factory with @key.
      Parameter:
      key - a key
      Gibt zurück:
      the metadata with @key on @factory or %NULL when there was no metadata with the given @key.
    • getMetadata

      public Str getMetadata(String key)
      Get the metadata on @factory with @key.
      Parameter:
      key - a key
      Gibt zurück:
      the metadata with @key on @factory or %NULL when there was no metadata with the given @key.
    • getNumPadTemplates

      public int getNumPadTemplates()
      Gets the number of pad_templates in this factory.
      Gibt zurück:
      the number of pad_templates
    • getSkipDocumentation

      public boolean getSkipDocumentation()
      Queries whether registered element managed by @factory needs to
      be excluded from documentation system or not.
      Gibt zurück:
      %TRUE if documentation should be skipped
    • getStaticPadTemplates

      public List getStaticPadTemplates()
      Gets the #GList of #GstStaticPadTemplate for this factory.
      Gibt zurück:
      the static pad templates
    • getUriType

      public int getUriType()
      Gets the type of URIs the element supports or #GST_URI_UNKNOWN if none.
      Gibt zurück:
      type of URIs this element supports
    • hasInterface

      public boolean hasInterface(@Nonnull Str interfacename)
      Check if @factory implements the interface with name @interfacename.
      Parameter:
      interfacename - an interface name
      Gibt zurück:
      %TRUE when @factory implement the interface.
    • hasInterface

      public boolean hasInterface(String interfacename)
      Check if @factory implements the interface with name @interfacename.
      Parameter:
      interfacename - an interface name
      Gibt zurück:
      %TRUE when @factory implement the interface.
    • find

      public static ElementFactory find(@Nonnull Str name)
      Search for an element factory of the given name. Refs the returned
      element factory; caller is responsible for unreffing.
      Parameter:
      name - name of factory to find
      Gibt zurück:
      #GstElementFactory if found, %NULL otherwise
    • listFilter

      public static List listFilter(@Nonnull List list, @Nonnull Caps caps, int direction, boolean subsetonly)
      Filter out all the elementfactories in @list that can handle @caps in
      the given direction.

      If @subsetonly is %TRUE, then only the elements whose pads templates
      are a complete superset of @caps will be returned. Else any element
      whose pad templates caps can intersect with @caps will be returned.
      Parameter:
      list - a #GList of #GstElementFactory to filter
      caps - a #GstCaps
      direction - a #GstPadDirection to filter on
      subsetonly - whether to filter on caps subsets or not.
      Gibt zurück:
      a #GList of #GstElementFactory elements that match the given requisites. Use #gst_plugin_feature_list_free after usage.
    • make

      public static Element make(@Nonnull Str factoryname, @Nullable Str name)
      Create a new element of the type defined by the given element factory.
      If name is %NULL, then the element will receive a guaranteed unique name,
      consisting of the element factory name and a number.
      If name is given, it will be given the name supplied.
      Parameter:
      factoryname - a named factory to instantiate
      name - name of new element, or %NULL to automatically create a unique name
      Gibt zurück:
      new #GstElement or %NULL if unable to create element
    • makeFull

      public static Element makeFull(@Nonnull Str factoryname, @Nullable Str first, Object... _ellipsis)
      Create a new element of the type defined by the given element factory.
      The supplied list of properties, will be passed at object construction.
      Parameter:
      factoryname - a named factory to instantiate
      first - name of first property
      _ellipsis - %NULL terminated list of properties
      Gibt zurück:
      new #GstElement or %NULL if unable to create element
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()