Package org.freedesktop.gstreamer.gst
Class 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).
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Stream.Builder<B extends Stream.Builder<B>>
Inner class implementing a builder pattern to construct a GObject with properties.static class
GstStream class structureNested classes/interfaces inherited from class org.freedesktop.gstreamer.gst.GstObject
GstObject.DeepNotifyCallback, GstObject.ObjectClass, GstObject.ObjectImpl
Nested classes/interfaces inherited from class org.gnome.gobject.InitiallyUnowned
InitiallyUnowned.InitiallyUnownedClass
Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback
-
Constructor Summary
ConstructorDescriptionStream
(@Nullable String streamId, @Nullable Caps caps, Set<StreamType> type, Set<StreamFlags> flags) Create a newGstStream
for the givenstreamId
,caps
,type
andflags
Stream
(@Nullable String streamId, @Nullable Caps caps, StreamType type, StreamFlags... flags) Create a newGstStream
for the givenstreamId
,caps
,type
andflags
Stream
(MemorySegment address) Create a Stream proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected Stream
asParent()
Returns this instance as if it were its parent type.static Stream.Builder
<? extends Stream.Builder> builder()
AStream.Builder
object constructs aStream
with the specified properties.getCaps()
Retrieve the caps for this Stream, if anystatic MemoryLayout
The memory layout of the native struct.Retrieve the current stream flags for this StreamReturns the stream ID of this Stream.Retrieve the stream type for this StreamgetTags()
Retrieve the tags for this Stream, if anystatic Type
getType()
Get the GType of the Stream classvoid
Set the caps for theGstStream
void
setStreamFlags
(Set<StreamFlags> flags) Set theflags
for the this Stream.void
setStreamFlags
(StreamFlags... flags) Set theflags
for the this Stream.void
setStreamType
(Set<StreamType> streamType) Set the stream type of this Streamvoid
setStreamType
(StreamType... streamType) Set the stream type of this Streamvoid
Set the tags for theGstStream
Methods 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, unref
Methods 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, 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, withProperties
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.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 @Nullable String streamId, @Nullable @Nullable Caps caps, Set<StreamType> type, Set<StreamFlags> flags) Create a newGstStream
for the givenstreamId
,caps
,type
andflags
- Parameters:
streamId
- the id for the new stream. Ifnull
, a new one will be automatically generatedcaps
- theGstCaps
of the streamtype
- theGstStreamType
of the streamflags
- theGstStreamFlags
of the stream
-
Stream
public Stream(@Nullable @Nullable String streamId, @Nullable @Nullable Caps caps, StreamType type, StreamFlags... flags) Create a newGstStream
for the givenstreamId
,caps
,type
andflags
- Parameters:
streamId
- the id for the new stream. Ifnull
, a new one will be automatically generatedcaps
- theGstCaps
of the streamtype
- theGstStreamType
of the streamflags
- theGstStreamFlags
of the 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 Javasuper
keyword, 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 for this Stream, if any- Returns:
- The
GstCaps
for this Stream
-
getStreamFlags
Retrieve the current stream flags for this Stream- Returns:
- The
GstStreamFlags
for this Stream
-
getStreamId
Returns the stream ID of this Stream.- Returns:
- the stream ID of this Stream. Only valid during the lifetime of this Stream.
-
getStreamType
Retrieve the stream type for this Stream- Returns:
- The
GstStreamType
for this Stream
-
getTags
Retrieve the tags for this Stream, if any- Returns:
- The
GstTagList
for this Stream
-
setCaps
Set the caps for theGstStream
- Parameters:
caps
- aGstCaps
-
setStreamFlags
Set theflags
for the this Stream.- Parameters:
flags
- the flags to set on this Stream
-
setStreamFlags
Set theflags
for the this Stream.- Parameters:
flags
- the flags to set on this Stream
-
setStreamType
Set the stream type of this Stream- Parameters:
streamType
- the type to set on this Stream
-
setStreamType
Set the stream type of this Stream- Parameters:
streamType
- the type to set on this Stream
-
setTags
Set the tags for theGstStream
- Parameters:
tags
- aGstTagList
-
builder
AStream.Builder
object constructs aStream
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withStream.Builder.build()
.
-