Class GstBase

java.lang.Object
org.freedesktop.gstreamer.base.GstBase

@Generated("org.javagi.JavaGI") public final class GstBase extends Object
Constants and functions that are declared in the global GstBase namespace.
  • Field Details

    • BASE_PARSE_FLAG_DRAINING

      public static final int BASE_PARSE_FLAG_DRAINING
      See Also:
    • BASE_PARSE_FLAG_LOST_SYNC

      public static final int BASE_PARSE_FLAG_LOST_SYNC
      See Also:
    • BASE_TRANSFORM_SINK_NAME

      public static final String BASE_TRANSFORM_SINK_NAME
      The name of the templates for the sink pad.
      See Also:
    • BASE_TRANSFORM_SRC_NAME

      public static final String BASE_TRANSFORM_SRC_NAME
      The name of the templates for the source pad.
      See Also:
  • Constructor Details

    • GstBase

      public GstBase()
  • Method Details

    • javagi$ensureInitialized

      public static void javagi$ensureInitialized()
    • typeFindHelper

      public static @Nullable Caps typeFindHelper(Pad src, long size)

      Tries to find what type of data is flowing from the given source GstPad.

      Free-function: gst_caps_unref

      Parameters:
      src - A source GstPad
      size - The length in bytes
      Returns:
      the GstCaps corresponding to the data stream. Returns null if no GstCaps matches the data stream.
    • typeFindHelperForBuffer

      public static @Nullable Caps typeFindHelperForBuffer(@Nullable GstObject obj, Buffer buf, @Nullable Out<TypeFindProbability> prob)

      Tries to find what type of data is contained in the given GstBuffer, the assumption being that the buffer represents the beginning of the stream or file.

      All available typefinders will be called on the data in order of rank. If a typefinding function returns a probability of TypeFindProbability.MAXIMUM, typefinding is stopped immediately and the found caps will be returned right away. Otherwise, all available typefind functions will the tried, and the caps with the highest probability will be returned, or null if the content of the buffer could not be identified.

      Free-function: gst_caps_unref

      Parameters:
      obj - object doing the typefinding, or null (used for logging)
      buf - a GstBuffer with data to typefind
      prob - location to store the probability of the found caps, or null
      Returns:
      the GstCaps corresponding to the data, or null if no type could be found. The caller should free the caps returned with gst_caps_unref().
    • typeFindHelperForBufferWithCaps

      public static @Nullable Caps typeFindHelperForBufferWithCaps(@Nullable GstObject obj, Buffer buf, Caps caps, @Nullable Out<TypeFindProbability> prob)

      Tries to find if type of media contained in the given GstBuffer, matches caps specified, assumption being that the buffer represents the beginning of the stream or file.

      Tries to find what type of data is contained in the given data, the assumption being that the data represents the beginning of the stream or file.

      Only the typefinder matching the given caps will be called, if found. The caps with the highest probability will be returned, or null if the content of the data could not be identified.

      Free-function: gst_caps_unref

      Parameters:
      obj - object doing the typefinding, or null (used for logging)
      buf - a GstBuffer with data to typefind
      caps - caps of the media
      prob - location to store the probability of the found caps, or null
      Returns:
      the GstCaps corresponding to the data, or null if no type could be found. The caller should free the caps returned with gst_caps_unref().
      Since:
      1.22
    • typeFindHelperForBufferWithExtension

      public static @Nullable Caps typeFindHelperForBufferWithExtension(@Nullable GstObject obj, Buffer buf, @Nullable String extension, @Nullable Out<TypeFindProbability> prob)

      Tries to find what type of data is contained in the given GstBuffer, the assumption being that the buffer represents the beginning of the stream or file.

      All available typefinders will be called on the data in order of rank. If a typefinding function returns a probability of TypeFindProbability.MAXIMUM, typefinding is stopped immediately and the found caps will be returned right away. Otherwise, all available typefind functions will the tried, and the caps with the highest probability will be returned, or null if the content of the buffer could not be identified.

      When extension is not null, this function will first try the typefind functions for the given extension, which might speed up the typefinding in many cases.

      Free-function: gst_caps_unref

      Parameters:
      obj - object doing the typefinding, or null (used for logging)
      buf - a GstBuffer with data to typefind
      extension - extension of the media, or null
      prob - location to store the probability of the found caps, or null
      Returns:
      the GstCaps corresponding to the data, or null if no type could be found. The caller should free the caps returned with gst_caps_unref().
      Since:
      1.16
    • typeFindHelperForData

      public static @Nullable Caps typeFindHelperForData(@Nullable GstObject obj, @Nullable byte @Nullable [] data, @Nullable Out<TypeFindProbability> prob)

      Tries to find what type of data is contained in the given data, the assumption being that the data represents the beginning of the stream or file.

      All available typefinders will be called on the data in order of rank. If a typefinding function returns a probability of TypeFindProbability.MAXIMUM, typefinding is stopped immediately and the found caps will be returned right away. Otherwise, all available typefind functions will the tried, and the caps with the highest probability will be returned, or null if the content of data could not be identified.

      Free-function: gst_caps_unref

      Parameters:
      obj - object doing the typefinding, or null (used for logging)
      data -
      • a pointer with data to typefind
      prob - location to store the probability of the found caps, or null
      Returns:
      the GstCaps corresponding to the data, or null if no type could be found. The caller should free the caps returned with gst_caps_unref().
    • typeFindHelperForDataWithCaps

      public static @Nullable Caps typeFindHelperForDataWithCaps(@Nullable GstObject obj, @Nullable byte @Nullable [] data, Caps caps, @Nullable Out<TypeFindProbability> prob)

      Tries to find if type of media contained in the given data, matches the caps specified, assumption being that the data represents the beginning of the stream or file.

      Only the typefinder matching the given caps will be called, if found. The caps with the highest probability will be returned, or null if the content of the data could not be identified.

      Free-function: gst_caps_unref

      Parameters:
      obj - object doing the typefinding, or null (used for logging)
      data - a pointer with data to typefind
      caps - caps of the media
      prob - location to store the probability of the found caps, or null
      Returns:
      the GstCaps corresponding to the data, or null if no type could be found. The caller should free the caps returned with gst_caps_unref().
      Since:
      1.22
    • typeFindHelperForDataWithExtension

      public static @Nullable Caps typeFindHelperForDataWithExtension(@Nullable GstObject obj, @Nullable byte @Nullable [] data, @Nullable String extension, @Nullable Out<TypeFindProbability> prob)

      Tries to find what type of data is contained in the given data, the assumption being that the data represents the beginning of the stream or file.

      All available typefinders will be called on the data in order of rank. If a typefinding function returns a probability of TypeFindProbability.MAXIMUM, typefinding is stopped immediately and the found caps will be returned right away. Otherwise, all available typefind functions will the tried, and the caps with the highest probability will be returned, or null if the content of data could not be identified.

      When extension is not null, this function will first try the typefind functions for the given extension, which might speed up the typefinding in many cases.

      Free-function: gst_caps_unref

      Parameters:
      obj - object doing the typefinding, or null (used for logging)
      data -
      • a pointer with data to typefind
      extension - extension of the media, or null
      prob - location to store the probability of the found caps, or null
      Returns:
      the GstCaps corresponding to the data, or null if no type could be found. The caller should free the caps returned with gst_caps_unref().
      Since:
      1.16
    • typeFindHelperForExtension

      public static @Nullable Caps typeFindHelperForExtension(@Nullable GstObject obj, String extension)

      Tries to find the best GstCaps associated with extension.

      All available typefinders will be checked against the extension in order of rank. The caps of the first typefinder that can handle extension will be returned.

      Free-function: gst_caps_unref

      Parameters:
      obj - object doing the typefinding, or null (used for logging)
      extension - an extension
      Returns:
      the GstCaps corresponding to extension, or null if no type could be found. The caller should free the caps returned with gst_caps_unref().
    • typeFindHelperGetRange

      public static @Nullable Caps typeFindHelperGetRange(GstObject obj, @Nullable GstObject parent, @Nullable TypeFindHelperGetRangeFunction func, long size, @Nullable String extension, @Nullable Out<TypeFindProbability> prob)

      Utility function to do pull-based typefinding. Unlike gst_type_find_helper() however, this function will use the specified function func to obtain the data needed by the typefind functions, rather than operating on a given source pad. This is useful mostly for elements like tag demuxers which strip off data at the beginning and/or end of a file and want to typefind the stripped data stream before adding their own source pad (the specified callback can then call the upstream peer pad with offsets adjusted for the tag size, for example).

      When extension is not null, this function will first try the typefind functions for the given extension, which might speed up the typefinding in many cases.

      Free-function: gst_caps_unref

      Parameters:
      obj - A GstObject that will be passed as first argument to func
      parent - the parent of obj or null
      func - A generic GstTypeFindHelperGetRangeFunction that will be used to access data at random offsets when doing the typefinding
      size - The length in bytes
      extension - extension of the media, or null
      prob - location to store the probability of the found caps, or null
      Returns:
      the GstCaps corresponding to the data stream. Returns null if no GstCaps matches the data stream.
    • typeFindHelperGetRangeFull

      public static FlowReturn typeFindHelperGetRangeFull(GstObject obj, @Nullable GstObject parent, @Nullable TypeFindHelperGetRangeFunction func, long size, @Nullable String extension, Out<Caps> caps, @Nullable Out<TypeFindProbability> prob)

      Utility function to do pull-based typefinding. Unlike gst_type_find_helper() however, this function will use the specified function func to obtain the data needed by the typefind functions, rather than operating on a given source pad. This is useful mostly for elements like tag demuxers which strip off data at the beginning and/or end of a file and want to typefind the stripped data stream before adding their own source pad (the specified callback can then call the upstream peer pad with offsets adjusted for the tag size, for example).

      When extension is not null, this function will first try the typefind functions for the given extension, which might speed up the typefinding in many cases.

      Parameters:
      obj - A GstObject that will be passed as first argument to func
      parent - the parent of obj or null
      func - A generic GstTypeFindHelperGetRangeFunction that will be used to access data at random offsets when doing the typefinding
      size - The length in bytes
      extension - extension of the media, or null
      caps - returned caps
      prob - location to store the probability of the found caps, or null
      Returns:
      the last GstFlowReturn from pulling a buffer or FlowReturn.OK if typefinding was successful.
      Since:
      1.14.3
    • typeFindListFactoriesForCaps

      public static @Nullable List<TypeFindFactory> typeFindListFactoriesForCaps(@Nullable GstObject obj, Caps caps)

      Tries to find the best GstTypeFindFactory associated with caps.

      The typefinder that can handle caps will be returned.

      Free-function: g_list_free

      Parameters:
      obj - object doing the typefinding, or null (used for logging)
      caps - caps of the media
      Returns:
      the list of GstTypeFindFactory corresponding to caps, or null if no typefinder could be found. Caller should free the returned list with g_list_free() and list elements with gst_object_unref().
      Since:
      1.22