Klasse Pad

Alle implementierten Schnittstellen:
PointerInterface
Bekannte direkte Unterklassen:
ProxyPad

public class Pad extends PropertyHolder
A #GstElement is linked to other elements via "pads", which are extremely
light-weight generic link points.

Pads have a #GstPadDirection, source pads produce data, sink pads consume
data.

Pads are typically created from a #GstPadTemplate with
gst_pad_new_from_template() and are then added to a #GstElement. This usually
happens when the element is created but it can also happen dynamically based
on the data that the element is processing or based on the pads that the
application requests.

Pads without pad templates can be created with gst_pad_new(),
which takes a direction and a name as an argument. If the name is %NULL,
then a guaranteed unique name will be assigned to it.

A #GstElement creating a pad will typically use the various
gst_pad_set_*_function\() calls to register callbacks for events, queries or
dataflow on the pads.

gst_pad_get_parent() will retrieve the #GstElement that owns the pad.

After two pads are retrieved from an element by gst_element_get_static_pad(),
the pads can be linked with gst_pad_link(). (For quick links,
you can also use gst_element_link(), which will make the obvious
link for you if it's straightforward.). Pads can be unlinked again with
gst_pad_unlink(). gst_pad_get_peer() can be used to check what the pad is
linked to.

Before dataflow is possible on the pads, they need to be activated with
gst_pad_set_active().

gst_pad_query() and gst_pad_peer_query() can be used to query various
properties of the pad and the stream.

To send a #GstEvent on a pad, use gst_pad_send_event() and
gst_pad_push_event(). Some events will be sticky on the pad, meaning that
after they pass on the pad they can be queried later with
gst_pad_get_sticky_event() and gst_pad_sticky_events_foreach().
gst_pad_get_current_caps() and gst_pad_has_current_caps() are convenience
functions to query the current sticky CAPS event on a pad.

GstElements will use gst_pad_push() and gst_pad_pull_range() to push out
or pull in a buffer.

The dataflow, events and queries that happen on a pad can be monitored with
probes that can be installed with gst_pad_add_probe(). gst_pad_is_blocked()
can be used to check if a block probe is installed on the pad.
gst_pad_is_blocking() checks if the blocking probe is currently blocking the
pad. gst_pad_remove_probe() is used to remove a previously installed probe
and unblock blocking probes if any.

Pad have an offset that can be retrieved with gst_pad_get_offset(). This
offset will be applied to the running_time of all data passing over the pad.
gst_pad_set_offset() can be used to change the offset.

Convenience functions exist to start, pause and stop the task on a pad with
gst_pad_start_task(), gst_pad_pause_task() and gst_pad_stop_task()
respectively.

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

  • Felddetails

  • Konstruktordetails

    • Pad

      public Pad(PointerContainer pointer)
    • Pad

      public Pad(@Nullable Str name, int direction)
      Creates a new pad with the given name in the given direction.
      If name is %NULL, a guaranteed unique name (across all pads)
      will be assigned.
      This function makes a copy of the name so you can safely free the name.
      Parameter:
      name - the name of the new pad.
      direction - the #GstPadDirection of the pad.
    • Pad

      public Pad(String name, int direction)
      Creates a new pad with the given name in the given direction.
      If name is %NULL, a guaranteed unique name (across all pads)
      will be assigned.
      This function makes a copy of the name so you can safely free the name.
      Parameter:
      name - the name of the new pad.
      direction - the #GstPadDirection of the pad.
  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • newFromStaticTemplatePad

      public static Pad newFromStaticTemplatePad(@Nonnull StaticPadTemplate templ, @Nonnull Str name)
      Creates a new pad with the given name from the given static template.
      If name is %NULL, a guaranteed unique name (across all pads)
      will be assigned.
      This function makes a copy of the name so you can safely free the name.
      Parameter:
      templ - the #GstStaticPadTemplate to use
      name - the name of the pad
      Gibt zurück:
      a new #GstPad.
    • newFromStaticTemplatePad

      public static Pad newFromStaticTemplatePad(@Nonnull StaticPadTemplate templ, String name)
      Creates a new pad with the given name from the given static template.
      If name is %NULL, a guaranteed unique name (across all pads)
      will be assigned.
      This function makes a copy of the name so you can safely free the name.
      Parameter:
      templ - the #GstStaticPadTemplate to use
      name - the name of the pad
      Gibt zurück:
      a new #GstPad.
    • newFromTemplatePad

      public static Pad newFromTemplatePad(@Nonnull PadTemplate templ, @Nullable Str name)
      Creates a new pad with the given name from the given template.
      If name is %NULL, a guaranteed unique name (across all pads)
      will be assigned.
      This function makes a copy of the name so you can safely free the name.
      Parameter:
      templ - the pad template to use
      name - the name of the pad
      Gibt zurück:
      a new #GstPad.
    • newFromTemplatePad

      public static Pad newFromTemplatePad(@Nonnull PadTemplate templ, String name)
      Creates a new pad with the given name from the given template.
      If name is %NULL, a guaranteed unique name (across all pads)
      will be assigned.
      This function makes a copy of the name so you can safely free the name.
      Parameter:
      templ - the pad template to use
      name - the name of the pad
      Gibt zurück:
      a new #GstPad.
    • activateMode

      public boolean activateMode(int mode, boolean active)
      Activates or deactivates the given pad in @mode via dispatching to the
      pad's activatemodefunc. For use from within pad activation functions only.

      If you don't know what this is, you probably don't want to call it.
      Parameter:
      mode - the requested activation mode
      active - whether or not the pad should be active.
      Gibt zurück:
      %TRUE if the operation was successful. MT safe.
    • addProbe

      public long addProbe(int mask, Pad.OnPadProbeCallback callback, @Nullable Pointer user_data, Pad.OnDestroyNotify destroy_data)
      Be notified of different states of pads. The provided callback is called for
      every state that matches @mask.

      Probes are called in groups: First GST_PAD_PROBE_TYPE_BLOCK probes are
      called, then others, then finally GST_PAD_PROBE_TYPE_IDLE. The only
      exception here are GST_PAD_PROBE_TYPE_IDLE probes that are called
      immediately if the pad is already idle while calling gst_pad_add_probe().
      In each of the groups, probes are called in the order in which they were
      added.
      Parameter:
      mask - the probe mask
      callback - #GstPadProbeCallback that will be called with notifications of the pad state
      user_data - user data passed to the callback
      destroy_data - #GDestroyNotify for user_data
      Gibt zurück:
      an id or 0 if no probe is pending. The id can be used to remove the probe with gst_pad_remove_probe(). When using GST_PAD_PROBE_TYPE_IDLE it can happen that the probe can be run immediately and if the probe returns GST_PAD_PROBE_REMOVE this functions returns 0. MT safe.
    • canLink

      public boolean canLink(@Nonnull Pad sinkpad)
      Checks if the source pad and the sink pad are compatible so they can be
      linked.
      Parameter:
      sinkpad - the sink #GstPad.
      Gibt zurück:
      %TRUE if the pads can be linked.
    • chain

      public int chain(@Nonnull Buffer buffer)
      Chain a buffer to @pad.

      The function returns #GST_FLOW_FLUSHING if the pad was flushing.

      If the buffer type is not acceptable for @pad (as negotiated with a
      preceding GST_EVENT_CAPS event), this function returns
      #GST_FLOW_NOT_NEGOTIATED.

      The function proceeds calling the chain function installed on @pad (see
      gst_pad_set_chain_function()) and the return value of that function is
      returned to the caller. #GST_FLOW_NOT_SUPPORTED is returned if @pad has no
      chain function.

      In all cases, success or failure, the caller loses its reference to @buffer
      after calling this function.
      Parameter:
      buffer - the #GstBuffer to send, return GST_FLOW_ERROR if not.
      Gibt zurück:
      a #GstFlowReturn from the pad. MT safe.
    • chainList

      public int chainList(@Nonnull BufferList list)
      Chain a bufferlist to @pad.

      The function returns #GST_FLOW_FLUSHING if the pad was flushing.

      If @pad was not negotiated properly with a CAPS event, this function
      returns #GST_FLOW_NOT_NEGOTIATED.

      The function proceeds calling the chainlist function installed on @pad (see
      gst_pad_set_chain_list_function()) and the return value of that function is
      returned to the caller. #GST_FLOW_NOT_SUPPORTED is returned if @pad has no
      chainlist function.

      In all cases, success or failure, the caller loses its reference to @list
      after calling this function.

      MT safe.
      Parameter:
      list - the #GstBufferList to send, return GST_FLOW_ERROR if not.
      Gibt zurück:
      a #GstFlowReturn from the pad.
    • checkReconfigure

      public boolean checkReconfigure()
      Check and clear the #GST_PAD_FLAG_NEED_RECONFIGURE flag on @pad and return %TRUE
      if the flag was set.
      Gibt zurück:
      %TRUE is the GST_PAD_FLAG_NEED_RECONFIGURE flag was set on @pad.
    • createStreamId

      public Str createStreamId(@Nonnull Element parent, @Nullable Str stream_id)
      Creates a stream-id for the source #GstPad @pad by combining the
      upstream information with the optional @stream_id of the stream
      of @pad. @pad must have a parent #GstElement and which must have zero
      or one sinkpad. @stream_id can only be %NULL if the parent element
      of @pad has only a single source pad.

      This function generates an unique stream-id by getting the upstream
      stream-start event stream ID and appending @stream_id to it. If the
      element has no sinkpad it will generate an upstream stream-id by
      doing an URI query on the element and in the worst case just uses
      a random number. Source elements that don't implement the URI
      handler interface should ideally generate a unique, deterministic
      stream-id manually instead.

      Since stream IDs are sorted alphabetically, any numbers in the
      stream ID should be printed with a fixed number of characters,
      preceded by 0's, such as by using the format \%03u instead of \%u.
      Parameter:
      parent - Parent #GstElement of @pad
      stream_id - The stream-id
      Gibt zurück:
      A stream-id for @pad. g_free() after usage.
    • createStreamId

      public Str createStreamId(@Nonnull Element parent, String stream_id)
      Creates a stream-id for the source #GstPad @pad by combining the
      upstream information with the optional @stream_id of the stream
      of @pad. @pad must have a parent #GstElement and which must have zero
      or one sinkpad. @stream_id can only be %NULL if the parent element
      of @pad has only a single source pad.

      This function generates an unique stream-id by getting the upstream
      stream-start event stream ID and appending @stream_id to it. If the
      element has no sinkpad it will generate an upstream stream-id by
      doing an URI query on the element and in the worst case just uses
      a random number. Source elements that don't implement the URI
      handler interface should ideally generate a unique, deterministic
      stream-id manually instead.

      Since stream IDs are sorted alphabetically, any numbers in the
      stream ID should be printed with a fixed number of characters,
      preceded by 0's, such as by using the format \%03u instead of \%u.
      Parameter:
      parent - Parent #GstElement of @pad
      stream_id - The stream-id
      Gibt zurück:
      A stream-id for @pad. g_free() after usage.
    • createStreamIdPrintf

      public Str createStreamIdPrintf(@Nonnull Element parent, @Nullable Str stream_id, Object... _ellipsis)
      Creates a stream-id for the source #GstPad @pad by combining the
      upstream information with the optional @stream_id of the stream
      of @pad. @pad must have a parent #GstElement and which must have zero
      or one sinkpad. @stream_id can only be %NULL if the parent element
      of @pad has only a single source pad.

      This function generates an unique stream-id by getting the upstream
      stream-start event stream ID and appending @stream_id to it. If the
      element has no sinkpad it will generate an upstream stream-id by
      doing an URI query on the element and in the worst case just uses
      a random number. Source elements that don't implement the URI
      handler interface should ideally generate a unique, deterministic
      stream-id manually instead.
      Parameter:
      parent - Parent #GstElement of @pad
      stream_id - The stream-id
      _ellipsis - parameters for the @stream_id format string
      Gibt zurück:
      A stream-id for @pad. g_free() after usage.
    • createStreamIdPrintf

      public Str createStreamIdPrintf(@Nonnull Element parent, String stream_id, Object... _ellipsis)
      Creates a stream-id for the source #GstPad @pad by combining the
      upstream information with the optional @stream_id of the stream
      of @pad. @pad must have a parent #GstElement and which must have zero
      or one sinkpad. @stream_id can only be %NULL if the parent element
      of @pad has only a single source pad.

      This function generates an unique stream-id by getting the upstream
      stream-start event stream ID and appending @stream_id to it. If the
      element has no sinkpad it will generate an upstream stream-id by
      doing an URI query on the element and in the worst case just uses
      a random number. Source elements that don't implement the URI
      handler interface should ideally generate a unique, deterministic
      stream-id manually instead.
      Parameter:
      parent - Parent #GstElement of @pad
      stream_id - The stream-id
      _ellipsis - parameters for the @stream_id format string
      Gibt zurück:
      A stream-id for @pad. g_free() after usage.
    • eventDefault

      public boolean eventDefault(@Nullable Object parent, @Nonnull Event event)
      Invokes the default event handler for the given pad.

      The EOS event will pause the task associated with @pad before it is forwarded
      to all internally linked pads,

      The event is sent to all pads internally linked to @pad. This function
      takes ownership of @event.
      Parameter:
      parent - the parent of @pad or %NULL
      event - the #GstEvent to handle.
      Gibt zurück:
      %TRUE if the event was sent successfully.
    • forward

      public boolean forward(Pad.OnPadForwardFunction forward, @Nullable Pointer user_data)
      Calls @forward for all internally linked pads of @pad. This function deals with
      dynamically changing internal pads and will make sure that the @forward
      function is only called once for each pad.

      When @forward returns %TRUE, no further pads will be processed.
      Parameter:
      forward - a #GstPadForwardFunction
      user_data - user data passed to @forward
      Gibt zurück:
      %TRUE if one of the dispatcher functions returned %TRUE.
    • getAllowedCaps

      public Caps getAllowedCaps()
      Gets the capabilities of the allowed media types that can flow through
      @pad and its peer.

      The allowed capabilities is calculated as the intersection of the results of
      calling gst_pad_query_caps() on @pad and its peer. The caller owns a reference
      on the resulting caps.
      Gibt zurück:
      the allowed #GstCaps of the pad link. Unref the caps when you no longer need it. This function returns %NULL when @pad has no peer. MT safe.
    • getCurrentCaps

      public Caps getCurrentCaps()
      Gets the capabilities currently configured on @pad with the last
      #GST_EVENT_CAPS event.
      Gibt zurück:
      the current caps of the pad with incremented ref-count or %NULL when pad has no caps. Unref after usage.
    • getDirection

      public int getDirection()
      Gets the direction of the pad. The direction of the pad is
      decided at construction time so this function does not take
      the LOCK.
      Gibt zurück:
      the #GstPadDirection of the pad. MT safe.
    • getElementPrivate

      public Pointer getElementPrivate()
      Gets the private data of a pad.
      No locking is performed in this function.
      Gibt zurück:
      a #gpointer to the private data.
    • getLastFlowReturn

      public int getLastFlowReturn()
      Gets the #GstFlowReturn return from the last data passed by this pad.
      Gibt zurück:
    • getOffset

      public long getOffset()
      Get the offset applied to the running time of @pad. @pad has to be a source
      pad.
      Gibt zurück:
      the offset.
    • getPadTemplate

      public PadTemplate getPadTemplate()
      Gets the template for @pad.
      Gibt zurück:
      the #GstPadTemplate from which this pad was instantiated, or %NULL if this pad has no template. Unref after usage.
    • getPadTemplateCaps

      public Caps getPadTemplateCaps()
      Gets the capabilities for @pad's template.
      Gibt zurück:
      the #GstCaps of this pad template. Unref after usage.
    • getParentElement

      public Element getParentElement()
      Gets the parent of @pad, cast to a #GstElement. If a @pad has no parent or
      its parent is not an element, return %NULL.
      Gibt zurück:
      the parent of the pad. The caller has a reference on the parent, so unref when you're finished with it. MT safe.
    • getPeer

      public Pad getPeer()
      Gets the peer of @pad. This function refs the peer pad so
      you need to unref it after use.
      Gibt zurück:
      the peer #GstPad. Unref after usage. MT safe.
    • getSingleInternalLink

      public Pad getSingleInternalLink()
      If there is a single internal link of the given pad, this function will
      return it. Otherwise, it will return NULL.
      Gibt zurück:
      a #GstPad, or %NULL if @pad has none or more than one internal links. Unref returned pad with gst_object_unref().
    • getStickyEvent

      public Event getStickyEvent(int event_type, int idx)
      Returns a new reference of the sticky event of type @event_type
      from the event.
      Parameter:
      event_type - the #GstEventType that should be retrieved.
      idx - the index of the event
      Gibt zurück:
      a #GstEvent of type @event_type or %NULL when no event of @event_type was on @pad. Unref after usage.
    • getStream

      public Stream getStream()
      Returns the current #GstStream for the @pad, or %NULL if none has been
      set yet, i.e. the pad has not received a stream-start event yet.

      This is a convenience wrapper around gst_pad_get_sticky_event() and
      gst_event_parse_stream().
      Gibt zurück:
      the current #GstStream for @pad, or %NULL. unref the returned stream when no longer needed.
    • getStreamId

      public Str getStreamId()
      Returns the current stream-id for the @pad, or %NULL if none has been
      set yet, i.e. the pad has not received a stream-start event yet.

      This is a convenience wrapper around gst_pad_get_sticky_event() and
      gst_event_parse_stream_start().

      The returned stream-id string should be treated as an opaque string, its
      contents should not be interpreted.
      Gibt zurück:
      a newly-allocated copy of the stream-id for @pad, or %NULL. g_free() the returned string when no longer needed.
    • getTaskState

      public int getTaskState()
      Get @pad task state. If no task is currently
      set, #GST_TASK_STOPPED is returned.
      Gibt zurück:
      The current state of @pad's task.
    • hasCurrentCaps

      public boolean hasCurrentCaps()
      Check if @pad has caps set on it with a #GST_EVENT_CAPS event.
      Gibt zurück:
      %TRUE when @pad has caps associated with it.
    • isActive

      public boolean isActive()
      Query if a pad is active
      Gibt zurück:
      %TRUE if the pad is active. MT safe.
    • isBlocked

      public boolean isBlocked()
      Checks if the pad is blocked or not. This function returns the
      last requested state of the pad. It is not certain that the pad
      is actually blocking at this point (see gst_pad_is_blocking()).
      Gibt zurück:
      %TRUE if the pad is blocked. MT safe.
    • isBlocking

      public boolean isBlocking()
      Checks if the pad is blocking or not. This is a guaranteed state
      of whether the pad is actually blocking on a #GstBuffer or a #GstEvent.
      Gibt zurück:
      %TRUE if the pad is blocking. MT safe.
    • isLinked

      public boolean isLinked()
      Checks if a @pad is linked to another pad or not.
      Gibt zurück:
      %TRUE if the pad is linked, %FALSE otherwise. MT safe.
    • iterateInternalLinks

      public Iterator iterateInternalLinks()
      Gets an iterator for the pads to which the given pad is linked to inside
      of the parent element.

      Each #GstPad element yielded by the iterator will have its refcount increased,
      so unref after use.

      Free-function: gst_iterator_free
      Gibt zurück:
      a new #GstIterator of #GstPad or %NULL when the pad does not have an iterator function configured. Use gst_iterator_free() after usage.
    • iterateInternalLinksDefault

      public Iterator iterateInternalLinksDefault(@Nullable Object parent)
      Iterate the list of pads to which the given pad is linked to inside of
      the parent element.
      This is the default handler, and thus returns an iterator of all of the
      pads inside the parent element with opposite direction.

      The caller must free this iterator after use with gst_iterator_free().
      Parameter:
      parent - the parent of @pad or %NULL
      Gibt zurück:
      a #GstIterator of #GstPad, or %NULL if @pad has no parent. Unref each returned pad with gst_object_unref().
    • link

      public int link(@Nonnull Pad sinkpad)
      Links the source pad and the sink pad.
      Parameter:
      sinkpad - the sink #GstPad to link.
      Gibt zurück:
      A result code indicating if the connection worked or what went wrong. MT Safe.
    • linkFull

      public int linkFull(@Nonnull Pad sinkpad, int flags)
      Links the source pad and the sink pad.

      This variant of #gst_pad_link provides a more granular control on the
      checks being done when linking. While providing some considerable speedups
      the caller of this method must be aware that wrong usage of those flags
      can cause severe issues. Refer to the documentation of #GstPadLinkCheck
      for more information.

      MT Safe.
      Parameter:
      sinkpad - the sink #GstPad to link.
      flags - the checks to validate when linking
      Gibt zurück:
      A result code indicating if the connection worked or what went wrong.
    • linkMaybeGhosting

      public boolean linkMaybeGhosting(@Nonnull Pad sink)
      Links @src to @sink, creating any #GstGhostPad's in between as necessary.

      This is a convenience function to save having to create and add intermediate
      #GstGhostPad's as required for linking across #GstBin boundaries.

      If @src or @sink pads don't have parent elements or do not share a common
      ancestor, the link will fail.
      Parameter:
      sink - a #GstPad
      Gibt zurück:
      whether the link succeeded.
    • linkMaybeGhostingFull

      public boolean linkMaybeGhostingFull(@Nonnull Pad sink, int flags)
      Links @src to @sink, creating any #GstGhostPad's in between as necessary.

      This is a convenience function to save having to create and add intermediate
      #GstGhostPad's as required for linking across #GstBin boundaries.

      If @src or @sink pads don't have parent elements or do not share a common
      ancestor, the link will fail.

      Calling gst_pad_link_maybe_ghosting_full() with
      @flags == %GST_PAD_LINK_CHECK_DEFAULT is the recommended way of linking
      pads with safety checks applied.
      Parameter:
      sink - a #GstPad
      flags - some #GstPadLinkCheck flags
      Gibt zurück:
      whether the link succeeded.
    • markReconfigure

      public void markReconfigure()
      Mark a pad for needing reconfiguration. The next call to
      gst_pad_check_reconfigure() will return %TRUE after this call.
    • needsReconfigure

      public boolean needsReconfigure()
      Check the #GST_PAD_FLAG_NEED_RECONFIGURE flag on @pad and return %TRUE
      if the flag was set.
      Gibt zurück:
      %TRUE is the GST_PAD_FLAG_NEED_RECONFIGURE flag is set on @pad.
    • pauseTask

      public boolean pauseTask()
      Pause the task of @pad. This function will also wait until the
      function executed by the task is finished if this function is not
      called from the task function.
      Gibt zurück:
      a %TRUE if the task could be paused or %FALSE when the pad has no task.
    • peerQuery

      public boolean peerQuery(@Nonnull Query query)
      Performs gst_pad_query() on the peer of @pad.

      The caller is responsible for both the allocation and deallocation of
      the query structure.
      Parameter:
      query - the #GstQuery to perform.
      Gibt zurück:
      %TRUE if the query could be performed. This function returns %FALSE if @pad has no peer.
    • peerQueryAcceptCaps

      public boolean peerQueryAcceptCaps(@Nonnull Caps caps)
      Check if the peer of @pad accepts @caps. If @pad has no peer, this function
      returns %TRUE.
      Parameter:
      caps - a #GstCaps to check on the pad
      Gibt zurück:
      %TRUE if the peer of @pad can accept the caps or @pad has no peer.
    • peerQueryCaps

      public Caps peerQueryCaps(@Nullable Caps filter)
      Gets the capabilities of the peer connected to this pad. Similar to
      gst_pad_query_caps().

      When called on srcpads @filter contains the caps that
      upstream could produce in the order preferred by upstream. When
      called on sinkpads @filter contains the caps accepted by
      downstream in the preferred order. @filter might be %NULL but
      if it is not %NULL the returned caps will be a subset of @filter.
      Parameter:
      filter - a #GstCaps filter, or %NULL.
      Gibt zurück:
      the caps of the peer pad with incremented ref-count. When there is no peer pad, this function returns @filter or, when @filter is %NULL, ANY caps.
    • proxyQueryAcceptCaps

      public boolean proxyQueryAcceptCaps(@Nonnull Query query)
      Checks if all internally linked pads of @pad accepts the caps in @query and
      returns the intersection of the results.

      This function is useful as a default accept caps query function for an element
      that can handle any stream format, but requires caps that are acceptable for
      all opposite pads.
      Parameter:
      query - an ACCEPT_CAPS #GstQuery.
      Gibt zurück:
      %TRUE if @query could be executed
    • proxyQueryCaps

      public boolean proxyQueryCaps(@Nonnull Query query)
      Calls gst_pad_query_caps() for all internally linked pads of @pad and returns
      the intersection of the results.

      This function is useful as a default caps query function for an element
      that can handle any stream format, but requires all its pads to have
      the same caps. Two such elements are tee and adder.
      Parameter:
      query - a CAPS #GstQuery.
      Gibt zurück:
      %TRUE if @query could be executed
    • push

      public int push(@Nonnull Buffer buffer)
      Pushes a buffer to the peer of @pad.

      This function will call installed block probes before triggering any
      installed data probes.

      The function proceeds calling gst_pad_chain() on the peer pad and returns
      the value from that function. If @pad has no peer, #GST_FLOW_NOT_LINKED will
      be returned.

      In all cases, success or failure, the caller loses its reference to @buffer
      after calling this function.
      Parameter:
      buffer - the #GstBuffer to push returns GST_FLOW_ERROR if not.
      Gibt zurück:
      a #GstFlowReturn from the peer pad. MT safe.
    • pushEvent

      public boolean pushEvent(@Nonnull Event event)
      Sends the event to the peer of the given pad. This function is
      mainly used by elements to send events to their peer
      elements.

      This function takes ownership of the provided event so you should
      gst_event_ref() it if you want to reuse the event after this call.
      Parameter:
      event - the #GstEvent to send to the pad.
      Gibt zurück:
      %TRUE if the event was handled. MT safe.
    • pushList

      public int pushList(@Nonnull BufferList list)
      Pushes a buffer list to the peer of @pad.

      This function will call installed block probes before triggering any
      installed data probes.

      The function proceeds calling the chain function on the peer pad and returns
      the value from that function. If @pad has no peer, #GST_FLOW_NOT_LINKED will
      be returned. If the peer pad does not have any installed chainlist function
      every group buffer of the list will be merged into a normal #GstBuffer and
      chained via gst_pad_chain().

      In all cases, success or failure, the caller loses its reference to @list
      after calling this function.
      Parameter:
      list - the #GstBufferList to push returns GST_FLOW_ERROR if not.
      Gibt zurück:
      a #GstFlowReturn from the peer pad. MT safe.
    • query

      public boolean query(@Nonnull Query query)
      Dispatches a query to a pad. The query should have been allocated by the
      caller via one of the type-specific allocation functions. The element that
      the pad belongs to is responsible for filling the query with an appropriate
      response, which should then be parsed with a type-specific query parsing
      function.

      Again, the caller is responsible for both the allocation and deallocation of
      the query structure.

      Please also note that some queries might need a running pipeline to work.
      Parameter:
      query - the #GstQuery to perform.
      Gibt zurück:
      %TRUE if the query could be performed.
    • queryAcceptCaps

      public boolean queryAcceptCaps(@Nonnull Caps caps)
      Check if the given pad accepts the caps.
      Parameter:
      caps - a #GstCaps to check on the pad
      Gibt zurück:
      %TRUE if the pad can accept the caps.
    • queryCaps

      public Caps queryCaps(@Nullable Caps filter)
      Gets the capabilities this pad can produce or consume.
      Note that this method doesn't necessarily return the caps set by sending a
      gst_event_new_caps() - use gst_pad_get_current_caps() for that instead.
      gst_pad_query_caps returns all possible caps a pad can operate with, using
      the pad's CAPS query function, If the query fails, this function will return
      @filter, if not %NULL, otherwise ANY.

      When called on sinkpads @filter contains the caps that
      upstream could produce in the order preferred by upstream. When
      called on srcpads @filter contains the caps accepted by
      downstream in the preferred order. @filter might be %NULL but
      if it is not %NULL the returned caps will be a subset of @filter.

      Note that this function does not return writable #GstCaps, use
      gst_caps_make_writable() before modifying the caps.
      Parameter:
      filter - suggested #GstCaps, or %NULL
      Gibt zurück:
      the caps of the pad with incremented ref-count.
    • queryDefault

      public boolean queryDefault(@Nullable Object parent, @Nonnull Query query)
      Invokes the default query handler for the given pad.
      The query is sent to all pads internally linked to @pad. Note that
      if there are many possible sink pads that are internally linked to
      @pad, only one will be sent the query.
      Multi-sinkpad elements should implement custom query handlers.
      Parameter:
      parent - the parent of @pad or %NULL
      query - the #GstQuery to handle.
      Gibt zurück:
      %TRUE if the query was performed successfully.
    • removeProbe

      public void removeProbe(long id)
      Remove the probe with @id from @pad.

      MT safe.
      Parameter:
      id - the probe id to remove
    • sendEvent

      public boolean sendEvent(@Nonnull Event event)
      Sends the event to the pad. This function can be used
      by applications to send events in the pipeline.

      If @pad is a source pad, @event should be an upstream event. If @pad is a
      sink pad, @event should be a downstream event. For example, you would not
      send a #GST_EVENT_EOS on a src pad; EOS events only propagate downstream.
      Furthermore, some downstream events have to be serialized with data flow,
      like EOS, while some can travel out-of-band, like #GST_EVENT_FLUSH_START. If
      the event needs to be serialized with data flow, this function will take the
      pad's stream lock while calling its event function.

      To find out whether an event type is upstream, downstream, or downstream and
      serialized, see #GstEventTypeFlags, gst_event_type_get_flags(),
      #GST_EVENT_IS_UPSTREAM, #GST_EVENT_IS_DOWNSTREAM, and
      #GST_EVENT_IS_SERIALIZED. Note that in practice that an application or
      plugin doesn't need to bother itself with this information; the core handles
      all necessary locks and checks.

      This function takes ownership of the provided event so you should
      gst_event_ref() it if you want to reuse the event after this call.
      Parameter:
      event - the #GstEvent to send to the pad.
      Gibt zurück:
      %TRUE if the event was handled.
    • setActivateFunctionFull

      public void setActivateFunctionFull(Pad.OnPadActivateFunction activate, @Nullable Pointer user_data, Pad.OnDestroyNotify notify)
      Sets the given activate function for @pad. The activate function will
      dispatch to gst_pad_activate_mode() to perform the actual activation.
      Only makes sense to set on sink pads.

      Call this function if your sink pad can start a pull-based task.
      Parameter:
      activate - the #GstPadActivateFunction to set.
      user_data - user_data passed to @notify
      notify - notify called when @activate will not be used anymore.
    • setActivatemodeFunctionFull

      public void setActivatemodeFunctionFull(Pad.OnPadActivateModeFunction activatemode, @Nullable Pointer user_data, Pad.OnDestroyNotify notify)
      Sets the given activate_mode function for the pad. An activate_mode function
      prepares the element for data passing.
      Parameter:
      activatemode - the #GstPadActivateModeFunction to set.
      user_data - user_data passed to @notify
      notify - notify called when @activatemode will not be used anymore.
    • setActive

      public boolean setActive(boolean active)
      Activates or deactivates the given pad.
      Normally called from within core state change functions.

      If @active, makes sure the pad is active. If it is already active, either in
      push or pull mode, just return. Otherwise dispatches to the pad's activate
      function to perform the actual activation.

      If not @active, calls gst_pad_activate_mode() with the pad's current mode
      and a %FALSE argument.
      Parameter:
      active - whether or not the pad should be active.
      Gibt zurück:
      %TRUE if the operation was successful. MT safe.
    • setChainFunctionFull

      public void setChainFunctionFull(Pad.OnPadChainFunction chain, @Nullable Pointer user_data, Pad.OnDestroyNotify notify)
      Sets the given chain function for the pad. The chain function is called to
      process a #GstBuffer input buffer. see #GstPadChainFunction for more details.
      Parameter:
      chain - the #GstPadChainFunction to set.
      user_data - user_data passed to @notify
      notify - notify called when @chain will not be used anymore.
    • setChainListFunctionFull

      public void setChainListFunctionFull(Pad.OnPadChainListFunction chainlist, @Nullable Pointer user_data, Pad.OnDestroyNotify notify)
      Sets the given chain list function for the pad. The chainlist function is
      called to process a #GstBufferList input buffer list. See
      #GstPadChainListFunction for more details.
      Parameter:
      chainlist - the #GstPadChainListFunction to set.
      user_data - user_data passed to @notify
      notify - notify called when @chainlist will not be used anymore.
    • setElementPrivate

      public void setElementPrivate(@Nullable Pointer priv)
      Set the given private data gpointer on the pad.
      This function can only be used by the element that owns the pad.
      No locking is performed in this function.
      Parameter:
      priv - The private data to attach to the pad.
    • setEventFullFunctionFull

      public void setEventFullFunctionFull(Pad.OnPadEventFullFunction event, @Nullable Pointer user_data, Pad.OnDestroyNotify notify)
      Sets the given event handler for the pad.
      Parameter:
      event - the #GstPadEventFullFunction to set.
      user_data - user_data passed to @notify
      notify - notify called when @event will not be used anymore.
    • setEventFunctionFull

      public void setEventFunctionFull(Pad.OnPadEventFunction event, @Nullable Pointer user_data, Pad.OnDestroyNotify notify)
      Sets the given event handler for the pad.
      Parameter:
      event - the #GstPadEventFunction to set.
      user_data - user_data passed to @notify
      notify - notify called when @event will not be used anymore.
    • setIterateInternalLinksFunctionFull

      public void setIterateInternalLinksFunctionFull(Pad.OnPadIterIntLinkFunction iterintlink, @Nullable Pointer user_data, Pad.OnDestroyNotify notify)
      Sets the given internal link iterator function for the pad.
      Parameter:
      iterintlink - the #GstPadIterIntLinkFunction to set.
      user_data - user_data passed to @notify
      notify - notify called when @iterintlink will not be used anymore.
    • setLinkFunctionFull

      public void setLinkFunctionFull(Pad.OnPadLinkFunction link, @Nullable Pointer user_data, Pad.OnDestroyNotify notify)
      Sets the given link function for the pad. It will be called when
      the pad is linked with another pad.

      The return value #GST_PAD_LINK_OK should be used when the connection can be
      made.

      The return value #GST_PAD_LINK_REFUSED should be used when the connection
      cannot be made for some reason.

      If @link is installed on a source pad, it should call the #GstPadLinkFunction
      of the peer sink pad, if present.
      Parameter:
      link - the #GstPadLinkFunction to set.
      user_data - user_data passed to @notify
      notify - notify called when @link will not be used anymore.
    • setOffset

      public void setOffset(long offset)
      Set the offset that will be applied to the running time of @pad. Upon next
      buffer, every sticky events (notably segment) will be pushed again with
      their running time adjusted. For that reason this is only reliable on
      source pads.
      Parameter:
      offset - the offset
    • setQueryFunctionFull

      public void setQueryFunctionFull(Pad.OnPadQueryFunction query, @Nullable Pointer user_data, Pad.OnDestroyNotify notify)
      Set the given query function for the pad.
      Parameter:
      query - the #GstPadQueryFunction to set.
      user_data - user_data passed to @notify
      notify - notify called when @query will not be used anymore.
    • setUnlinkFunctionFull

      public void setUnlinkFunctionFull(Pad.OnPadUnlinkFunction unlink, @Nullable Pointer user_data, Pad.OnDestroyNotify notify)
      Sets the given unlink function for the pad. It will be called
      when the pad is unlinked.

      Note that the pad's lock is already held when the unlink
      function is called, so most pad functions cannot be called
      from within the callback.
      Parameter:
      unlink - the #GstPadUnlinkFunction to set.
      user_data - user_data passed to @notify
      notify - notify called when @unlink will not be used anymore.
    • startTask

      public boolean startTask(Pad.OnTaskFunction func, @Nullable Pointer user_data, Pad.OnDestroyNotify notify)
      Starts a task that repeatedly calls @func with @user_data. This function
      is mostly used in pad activation functions to start the dataflow.
      The #GST_PAD_STREAM_LOCK of @pad will automatically be acquired
      before @func is called.
      Parameter:
      func - the task function to call
      user_data - user data passed to the task function
      notify - called when @user_data is no longer referenced
      Gibt zurück:
      a %TRUE if the task could be started.
    • stopTask

      public boolean stopTask()
      Stop the task of @pad. This function will also make sure that the
      function executed by the task will effectively stop if not called
      from the GstTaskFunction.

      This function will deadlock if called from the GstTaskFunction of
      the task. Use gst_task_pause() instead.

      Regardless of whether the pad has a task, the stream lock is acquired and
      released so as to ensure that streaming through this pad has finished.
      Gibt zurück:
      a %TRUE if the task could be stopped or %FALSE on error.
    • storeStickyEvent

      public int storeStickyEvent(@Nonnull Event event)
      Store the sticky @event on @pad
      Parameter:
      event - a #GstEvent
      Gibt zurück:
      #GST_FLOW_OK on success, #GST_FLOW_FLUSHING when the pad was flushing or #GST_FLOW_EOS when the pad was EOS.
    • unlink

      public boolean unlink(@Nonnull Pad sinkpad)
      Unlinks the source pad from the sink pad. Will emit the #GstPad::unlinked
      signal on both pads.
      Parameter:
      sinkpad - the sink #GstPad to unlink.
      Gibt zurück:
      %TRUE if the pads were unlinked. This function returns %FALSE if the pads were not linked together. MT safe.
    • useFixedCaps

      public void useFixedCaps()
      A helper function you can use that sets the FIXED_CAPS flag
      This way the default CAPS query will always return the negotiated caps
      or in case the pad is not negotiated, the padtemplate caps.

      The negotiated caps are the caps of the last CAPS event that passed on the
      pad. Use this function on a pad that, once it negotiated to a CAPS, cannot
      be renegotiated to something else.
    • onLinked

      public SignalHandler onLinked(Pad.OnLinked signal)
      Connect to signal "linked".
      See Pad.OnLinked.onLinked(ch.bailu.gtk.gst.Pad) for signal description.
      Field SIGNAL_ON_LINKED contains 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.
    • onUnlinked

      public SignalHandler onUnlinked(Pad.OnUnlinked signal)
      Connect to signal "unlinked".
      See Pad.OnUnlinked.onUnlinked(ch.bailu.gtk.gst.Pad) for signal description.
      Field SIGNAL_ON_UNLINKED contains 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.
    • linkGetName

      public static Str linkGetName(int ret)
      Gets a string representing the given pad-link return.
      Parameter:
      ret - a #GstPadLinkReturn to get the name of.
      Gibt zurück:
      a static string with the name of the pad-link return.
    • 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()