Package org.freedesktop.gstreamer.gst
Class Stream
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.gnome.gobject.InitiallyUnowned
org.freedesktop.gstreamer.gst.GstObject
org.freedesktop.gstreamer.gst.Stream
- All Implemented Interfaces:
Proxy
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classStream.Builder<B extends Stream.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classGstStream class structureNested classes/interfaces inherited from class org.freedesktop.gstreamer.gst.GstObject
GstObject.DeepNotifyCallback, GstObject.Object$Impl, GstObject.ObjectClassNested classes/interfaces inherited from class org.gnome.gobject.InitiallyUnowned
InitiallyUnowned.InitiallyUnownedClassNested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback -
Constructor Summary
ConstructorsConstructorDescriptionStream()Creates a new Stream.Stream(@Nullable String streamId, @Nullable Caps caps, Set<StreamType> type, Set<StreamFlags> flags) Create a newGstStreamfor the givenstreamId,caps,typeandflagsStream(@Nullable String streamId, @Nullable Caps caps, StreamType type, StreamFlags... flags) Create a newGstStreamfor the givenstreamId,caps,typeandflagsStream(MemorySegment address) Create a Stream proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected StreamasParent()Returns this instance as if it were its parent type.static Stream.Builder<? extends Stream.Builder> builder()AStream.Builderobject constructs aStreamwith the specified properties.@Nullable CapsgetCaps()Retrieve the caps forstream,if anystatic MemoryLayoutThe memory layout of the native struct.Retrieve the current stream flags for this Stream@Nullable StringReturns the stream ID ofstream.Retrieve the stream type for this Stream@Nullable TagListgetTags()Retrieve the tags forstream,if anystatic @Nullable TypegetType()Get the GType of the Stream classvoidSet the caps for theGstStreamvoidsetStreamFlags(Set<StreamFlags> flags) Set theflagsfor thestream.voidsetStreamFlags(StreamFlags... flags) Set theflagsfor thestream.voidsetStreamType(Set<StreamType> streamType) Set the stream type of this StreamvoidsetStreamType(StreamType... streamType) Set the stream type of this StreamvoidSet the tags for theGstStreamMethods inherited from class org.freedesktop.gstreamer.gst.GstObject
addControlBinding, checkUniqueness, deepNotify, defaultDeepNotify, defaultError, emitDeepNotify, getControlBinding, getControlRate, getGValueArray, getName, getParent, getPathString, getValue, getValueArray, hasActiveControlBindings, hasAncestor, hasAsAncestor, hasAsParent, onDeepNotify, ref, refSink, removeControlBinding, replace, setControlBindingDisabled, setControlBindingsDisabled, setControlRate, setName, setParent, suggestNextSync, syncValues, unparent, unrefMethods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
Stream
Create a Stream proxy 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 newGstStreamfor the givenstreamId,caps,typeandflags- Parameters:
streamId- the id for the new stream. Ifnull, a new one will be automatically generatedcaps- theGstCapsof the streamtype- theGstStreamTypeof the streamflags- theGstStreamFlagsof the stream- Since:
- 1.10
-
Stream
public Stream(@Nullable String streamId, @Nullable Caps caps, StreamType type, StreamFlags... flags) Create a newGstStreamfor the givenstreamId,caps,typeandflags- Parameters:
streamId- the id for the new stream. Ifnull, a new one will be automatically generatedcaps- theGstCapsof the streamtype- theGstStreamTypeof the streamflags- theGstStreamFlagsof the stream- Since:
- 1.10
-
Stream
public Stream()Creates a new Stream.
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName(). This will call the native function pointer of this virtual method in the typeclass of the parent type. -
getCaps
Retrieve the caps forstream,if any- Returns:
- The
GstCapsfor this Stream - Since:
- 1.10
-
getStreamFlags
Retrieve the current stream flags for this Stream- Returns:
- The
GstStreamFlagsfor this Stream - Since:
- 1.10
-
getStreamId
Returns the stream ID ofstream.- Returns:
- the stream ID of
stream.Only valid during the lifetime ofstream. - Since:
- 1.10
-
getStreamType
Retrieve the stream type for this Stream- Returns:
- The
GstStreamTypefor this Stream - Since:
- 1.10
-
getTags
Retrieve the tags forstream,if any- Returns:
- The
GstTagListfor this Stream - Since:
- 1.10
-
setCaps
Set the caps for theGstStream- Parameters:
caps- aGstCaps- Since:
- 1.10
-
setStreamFlags
Set theflagsfor thestream.- Parameters:
flags- the flags to set on this Stream- Since:
- 1.10
-
setStreamFlags
Set theflagsfor thestream.- Parameters:
flags- the flags to set on this Stream- Since:
- 1.10
-
setStreamType
Set the stream type of this Stream- Parameters:
streamType- the type to set on this Stream- Since:
- 1.10
-
setStreamType
Set the stream type of this Stream- Parameters:
streamType- the type to set on this Stream- Since:
- 1.10
-
setTags
Set the tags for theGstStream- Parameters:
tags- aGstTagList- Since:
- 1.10
-
builder
AStream.Builderobject constructs aStreamwith the specified properties. Use the variousset...()methods to set properties, and finish construction withStream.Builder.build().- Returns:
- the builder object
-