Class Stream

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class Stream extends GstObject

A high-level object representing a single stream. It might be backed, or not, by an actual flow of data in a pipeline (GstPad).

A GstStream does not care about data changes (such as decoding, encoding, parsing,...) as long as the underlying data flow corresponds to the same high-level flow (ex: a certain audio track).

A GstStream contains all the information pertinent to a stream, such as stream-id, tags, caps, type, ...

Elements can subclass a GstStream for internal usage (to contain information pertinent to streams of data).

Since:
1.10
  • Constructor Details

    • Stream

      public Stream(MemorySegment address)
      Create a Stream instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • Stream

      public Stream(@Nullable String streamId, @Nullable Caps caps, Set<StreamType> type, Set<StreamFlags> flags)
      Create a new GstStream for the given streamId, caps, type and flags
      Parameters:
      streamId - the id for the new stream. If null, a new one will be automatically generated
      caps - the GstCaps of the stream
      type - the GstStreamType of the stream
      flags - the GstStreamFlags of the stream
      Since:
      1.10
    • Stream

      public Stream(@Nullable String streamId, @Nullable Caps caps, StreamType type, StreamFlags... flags)
      Create a new GstStream for the given streamId, caps, type and flags
      Parameters:
      streamId - the id for the new stream. If null, a new one will be automatically generated
      caps - the GstCaps of the stream
      type - the GstStreamType of the stream
      flags - the GstStreamFlags of the stream
      Since:
      1.10
    • Stream

      public Stream()
      Create a new Stream.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the Stream class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected Stream asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GstObject
      Returns:
      the instance as if it were its parent type
    • getCaps

      public @Nullable Caps getCaps()
      Retrieve the caps for stream, if any
      Returns:
      The GstCaps for this Stream
      Since:
      1.10
    • getStreamFlags

      public Set<StreamFlags> getStreamFlags()
      Retrieve the current stream flags for this Stream
      Returns:
      The GstStreamFlags for this Stream
      Since:
      1.10
    • getStreamId

      public @Nullable String getStreamId()
      Returns the stream ID of stream.
      Returns:
      the stream ID of stream. Only valid during the lifetime of stream.
      Since:
      1.10
    • getStreamType

      public Set<StreamType> getStreamType()
      Retrieve the stream type for this Stream
      Returns:
      The GstStreamType for this Stream
      Since:
      1.10
    • getTags

      public @Nullable TagList getTags()
      Retrieve the tags for stream, if any
      Returns:
      The GstTagList for this Stream
      Since:
      1.10
    • setCaps

      public void setCaps(@Nullable Caps caps)
      Set the caps for the GstStream
      Parameters:
      caps - a GstCaps
      Since:
      1.10
    • setStreamFlags

      public void setStreamFlags(Set<StreamFlags> flags)
      Set the flags for the stream.
      Parameters:
      flags - the flags to set on this Stream
      Since:
      1.10
    • setStreamFlags

      public void setStreamFlags(StreamFlags... flags)
      Set the flags for the stream.
      Parameters:
      flags - the flags to set on this Stream
      Since:
      1.10
    • setStreamType

      public void setStreamType(Set<StreamType> streamType)
      Set the stream type of this Stream
      Parameters:
      streamType - the type to set on this Stream
      Since:
      1.10
    • setStreamType

      public void setStreamType(StreamType... streamType)
      Set the stream type of this Stream
      Parameters:
      streamType - the type to set on this Stream
      Since:
      1.10
    • setTags

      public void setTags(@Nullable TagList tags)
      Set the tags for the GstStream
      Parameters:
      tags - a GstTagList
      Since:
      1.10
    • builder

      public static Stream.Builder<? extends Stream.Builder> builder()
      A Stream.Builder object constructs a Stream with the specified properties. Use the various set...() methods to set properties, and finish construction with Stream.Builder.build().
      Returns:
      the builder object