Class Gst
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The allocator name for the default system memory allocatorstatic final Set
<BufferCopyFlags> Combination of all possible fields that can be copied with gst_buffer_copy_into().static final Set
<BufferCopyFlags> Combination of all possible metadata fields that can be copied with gst_buffer_copy_into().static final long
Constant for no-offset return results.static final int
static final String
static final ClockTime
Constant to define an undefined clock time.static final int
static final int
static final int
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Elements interacting with hardware devices should specify this classifier in their metadata.static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final ElementFactoryListType
Elements of any of the defined GST_ELEMENT_FACTORY_LIST typesstatic final ElementFactoryListType
All encoders handling audio media typesstatic final ElementFactoryListType
All sinks handling audio, video or image media typesstatic final ElementFactoryListType
All elements used to 'decode' streams (decoders, demuxers, parsers, depayloaders)static final ElementFactoryListType
static final ElementFactoryListType
static final ElementFactoryListType
static final ElementFactoryListType
static final ElementFactoryListType
static final ElementFactoryListType
static final ElementFactoryListType
static final ElementFactoryListType
static final ElementFactoryListType
static final ElementFactoryListType
Elements matching any of the defined GST_ELEMENT_FACTORY_TYPE_MEDIA typesstatic final ElementFactoryListType
static final ElementFactoryListType
static final ElementFactoryListType
static final ElementFactoryListType
static final ElementFactoryListType
static final ElementFactoryListType
static final ElementFactoryListType
static final ElementFactoryListType
static final ElementFactoryListType
static final ElementFactoryListType
static final ElementFactoryListType
Timestamp correcting elementsstatic final ElementFactoryListType
All encoders handling video or image media typesstatic final String
Name and contact details of the author(s).static final String
Sentence describing the purpose of the element.static final String
Set uri pointing to user documentation.static final String
Elements that bridge to certain other products can include an icon of that used product.static final String
String describing the type of element, as an unordered list separated with slashes ('/').static final String
The long English name of the element.static final String
Builds a string using errno describing the previously failed system call.static final int
static final Set
<EventTypeFlags> The same thing asGST_EVENT_TYPE_UPSTREAM
|GST_EVENT_TYPE_DOWNSTREAM
.static final int
A mask value with all bits set, for use as a GstFlagSet mask where all flag bits must match exactlystatic final long
The PERCENT format is between 0 and this valuestatic final long
The value used to scale down the reported PERCENT format value to its real value.static final String
Can be used together withGST_FOURCC_ARGS
to properly output aguint32
fourcc value in a printf\\()-style text message.static final int
A value which is guaranteed to never be returned by gst_util_group_id_next().static final String
To be used in GST_PLUGIN_DEFINE if unsure about the licence.GstLockFlags value alias for GST_LOCK_FLAG_READ | GST_LOCK_FLAG_WRITEGstMapFlags value alias for GST_MAP_READ | GST_MAP_WRITEstatic final String
This metadata stays relevant until a deep copy is made.static final String
This metadata stays relevant as long as memory layout is unchanged.static final ClockTimeDiff
Constant that defines one GStreamer millisecond.static final ClockTimeDiff
Constant that defines one GStreamer nanosecondstatic final int
Use this flag on GObject properties of GstObject to indicate that they might not be available depending on environment such as OS, device, etc, so such properties will be installed conditionally only if the GstObject is able to support it.static final int
Use this flag on GObject properties to signal they can make sense to be.static final int
Use this flag on GObject properties of GstObject to indicate that duringgst-inspect
and friends, the default value should be used as default instead of the current value.static final int
Use this flag on GObject properties of GstElements to indicate that they can be changed when the element is in the PAUSED or lower state.static final int
Use this flag on GObject properties of GstElements to indicate that they can be changed when the element is in the PLAYING or lower state.static final int
Use this flag on GObject properties of GstElements to indicate that they can be changed when the element is in the READY or lower state.static final int
Bits based on GST_PARAM_USER_SHIFT can be used by 3rd party applications.static final String
The field name in a GstCaps that is used to signal the UUID of the protection system.static final String
The protection system value of the unspecified UUID.static final String
printf format type used to debug GStreamer types.static final int
static final Set
<QueryTypeFlags> The same thing asGST_QUERY_TYPE_UPSTREAM
|GST_QUERY_TYPE_DOWNSTREAM
.static final ClockTimeDiff
Constant that defines one GStreamer second.static final String
printf format type used to debug GStreamer segments.static final int
static final int
A value which is guaranteed to never be returned by gst_util_seqnum_next().static final String
A string that can be used in printf-like format strings to display a signedGstClockTimeDiff
orgint64
value inh:m:s
format.static final String
printf format type used to debug GStreamer signed time value pointers.static final String
album containing this data (string)static final String
The artist of the entire album, as it should be displayed.static final String
The artist of the entire album, as it should be sorted.static final String
album gain in db (double)static final String
peak of the album (double)static final String
album containing this data, as used for sorting (string)static final String
count of discs inside collection this disc belongs to (unsigned integer)static final String
disc number inside a collection (unsigned integer)static final String
Arbitrary application data (sample)static final String
Name of the application used to create the media (string)static final String
person(s) responsible for the recording (string)static final String
person(s) responsible for the recording, as used for sorting (string)static final String
generic file attachment (sample) (sample taglist should specify the content type and if possible set "filename" to the file name of the attachment)static final String
codec the audio data is stored in (string)static final String
number of beats per minute in audio (double)static final String
exact or average bitrate in bits/s (unsigned integer)static final String
codec the data is stored in (string)static final String
free text commenting the data (string)static final String
person(s) who composed the recording (string)static final String
The composer's name, used for sorting (string)static final String
conductor/performer refinement (string)static final String
contact information (string)static final String
container format the data is stored in (string)static final String
Unique identifier for the audio, video or text track this tag is associated with.static final String
copyright notice of the data (string)static final String
URI to location where copyright details can be found (string)static final String
date the data was created (GDate
structure)static final String
date and time the data was created (GstDateTime
structure)static final String
short text describing the content of the data (string)static final String
Manufacturer of the device used to create the media (string)static final String
Model of the device used to create the media (string)static final String
length in GStreamer time units (nanoseconds) (unsigned 64-bit integer)static final String
name of the person or organisation that encoded the file.static final String
encoder used to encode this stream (string)static final String
version of the encoder used to encode this stream (unsigned integer)static final String
key/value text commenting the data (string)static final String
genre this data belongs to (string)static final String
Indicates the direction the device is pointing to when capturing a media.static final String
The city (english name) where the media has been produced (string).static final String
The country (english name) where the media has been produced (string).static final String
geo elevation of where the media has been recorded or produced in meters according to WGS84 (zero is average sea level) (double).static final String
Represents the expected error on the horizontal positioning in meters (double).static final String
geo latitude location of where the media has been recorded or produced in degrees according to WGS84 (zero at the equator, negative values for southern latitudes) (double).static final String
geo longitude location of where the media has been recorded or produced in degrees according to WGS84 (zero at the prime meridian in Greenwich/UK, negative values for western longitudes).static final String
Indicates the movement direction of the device performing the capture of a media.static final String
Speed of the capturing device when performing the capture.static final String
human readable descriptive location of where the media has been recorded or produced.static final String
A location 'smaller' than GST_TAG_GEO_LOCATION_CITY that specifies better where the media has been produced.static final String
Groups together media that are related and spans multiple tracks.static final String
Homepage for this media (i.e.static final String
image (sample) (sample taglist should specify the content type and preferably also set "image-type" field asGstTagImageType
)static final String
Represents the 'Orientation' tag from EXIF.static final String
Information about the people behind a remix and similar interpretations of another existing piece (string)static final String
International Standard Recording Code - see http://www.ifpi.org/isrc/ (string)static final String
comma separated keywords describing the content (string).static final String
ISO-639-2 or ISO-639-1 code for the language the content is in (string)static final String
Name of the language the content is in (string)static final String
license of data (string)static final String
URI to location where license details can be found (string)static final String
Origin of media as a URI (location, where the original of the file or stream is hosted) (string)static final String
The lyrics of the media (string)static final String
maximum bitrate in bits/s (unsigned integer)static final String
Midi note number of the audio track.static final String
minimum bitrate in bits/s (unsigned integer)static final String
nominal bitrate in bits/s (unsigned integer).static final String
organization (string)static final String
person(s) performing (string)static final String
image that is meant for preview purposes, e.g.static final String
Any private data that may be contained in tags (sample).static final String
Name of the label or publisher (string)static final String
reference level of track and album gain values (double)static final String
serial number of track (unsigned integer)static final String
Number of the episode within a season/show (unsigned integer)static final String
Name of the show, used for displaying (string)static final String
Number of the season of a show/series (unsigned integer)static final String
Name of the show, used for sorting (string)static final String
codec/format the subtitle data is stored in (string)static final String
commonly used title (string)static final String
commonly used title, as used for sorting (string)static final String
count of tracks inside collection this track belongs to (unsigned integer)static final String
track gain in db (double)static final String
track number inside a collection (unsigned integer)static final String
peak of the track (double)static final String
Rating attributed by a person (likely the application user).static final String
version of this data (string)static final String
codec the video data is stored in (string)static final String
A string that can be used in printf-like format strings to display aGstClockTime
value inh:m:s
format.static final String
printf format type used to debug GStreamer ClockTime pointers.static final int
Special value for the repeat_count set in gst_toc_entry_set_loop() or returned by gst_toc_entry_set_loop() to indicate infinite looping.static final int
Value forGstUri
<!-- -->.port to indicate no port number.static final ClockTimeDiff
Constant that defines one GStreamer microsecond.static final int
Indicates that the first value provided to a comparison function (gst_value_compare()) is equal to the second one.static final int
Indicates that the first value provided to a comparison function (gst_value_compare()) is greater than the second one.static final int
Indicates that the first value provided to a comparison function (gst_value_compare()) is lesser than the second one.static final int
Indicates that the comparison function (gst_value_compare()) can not determine a order for the two provided values.static final int
The major version of GStreamer at compile time:static final int
The micro version of GStreamer at compile time:static final int
The minor version of GStreamer at compile time:static final int
The nano version of GStreamer at compile time: Actual releases have 0, GIT versions have 1, prerelease versions have 2-... -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
calculateLinearRegression
(ClockTime xy, ClockTime temp, int n, ClockTime mNum, ClockTime mDenom, ClockTime b, ClockTime xbase, Out<Double> rSquared) Calculates the linear regression of the valuesxy
and places the result inmNum
,mDenom
,b
andxbase
, representing the function y(x) = m_num/m_denom * (x - xbase) + b that has the least-square distance from all pointsx
andy
.static void
clearBuffer
(Buffer[] bufPtr) Clears a reference to aGstBuffer
.static void
clearBufferList
(BufferList[] listPtr) Clears a reference to aGstBufferList
.static void
Clears a reference to aGstCaps
.static void
clearContext
(Context[] contextPtr) Clears a reference to aGstContext
.static void
clearEvent
(Event[] eventPtr) Clears a reference to aGstEvent
.static void
clearMessage
(Message[] msgPtr) Clears a reference to aGstMessage
.static void
clearMiniObject
(MiniObject[] objectPtr) Clears a reference to aGstMiniObject
.static void
clearObject
(GstObject[] objectPtr) Clears a reference to aGstObject
.static void
clearPromise
(Promise[] promisePtr) Clears a reference to aGstPromise
.static void
clearQuery
(Query[] queryPtr) Clears a reference to aGstQuery
.static void
clearSample
(Sample[] samplePtr) Clears a reference to aGstSample
static void
clearStructure
(Structure[] structurePtr) Clears a reference to aGstStructure
.static void
clearTagList
(TagList[] taglistPtr) Clears a reference to aGstTagList
.static void
Clears a reference to aGstUri
.static void
Adds the logging function to the list of logging functions.static void
debugAddRingBufferLogger
(int maxSizePerThread, int threadTimeout) Adds a memory ringbuffer based debug logger that stores up tomaxSizePerThread
bytes of logs per thread and times out threads afterthreadTimeout
seconds of inactivity.static String
debugBinToDotData
(Bin bin, Set<DebugGraphDetails> details) To aid debugging applications one can use this method to obtain the whole network of gstreamer elements that form the pipeline into a dot file.static String
debugBinToDotData
(Bin bin, DebugGraphDetails... details) To aid debugging applications one can use this method to obtain the whole network of gstreamer elements that form the pipeline into a dot file.static void
debugBinToDotFile
(Bin bin, Set<DebugGraphDetails> details, String fileName) To aid debugging applications one can use this method to write out the whole network of gstreamer elements that form the pipeline into a dot file.static void
debugBinToDotFile
(Bin bin, DebugGraphDetails details, String fileName) To aid debugging applications one can use this method to write out the whole network of gstreamer elements that form the pipeline into a dot file.static void
debugBinToDotFileWithTs
(Bin bin, Set<DebugGraphDetails> details, String fileName) This works like gst_debug_bin_to_dot_file(), but adds the current timestamp to the filename, so that it can be used to take multiple snapshots.static void
debugBinToDotFileWithTs
(Bin bin, DebugGraphDetails details, String fileName) This works like gst_debug_bin_to_dot_file(), but adds the current timestamp to the filename, so that it can be used to take multiple snapshots.static String
debugConstructTermColor
(int colorinfo) Constructs a string that can be used for getting the desired color in color terminals.static int
debugConstructWinColor
(int colorinfo) Constructs an integer that can be used for getting the desired color in windows' terminals (cmd.exe).static SList
<DebugCategory> Returns a snapshot of a all categories that are currently in use .static DebugColorMode
Changes the coloring mode for debug output.static DebugLevel
Returns the default threshold that is used for new categories.static String
debugGetStackTrace
(Set<StackTraceFlags> flags) static String
debugGetStackTrace
(StackTraceFlags... flags) static boolean
Checks if debugging output is activated.static boolean
Checks if the debugging output should be colored.static void
debugLog
(DebugCategory category, DebugLevel level, String file, String function, int line, @Nullable GObject object, String format, Object... varargs) Logs the given message using the currently registered debugging handlers.static void
debugLogDefault
(DebugCategory category, DebugLevel level, String file, String function, int line, @Nullable GObject object, DebugMessage message, @Nullable MemorySegment userData) The default logging handler used by GStreamer.static String
debugLogGetLine
(DebugCategory category, DebugLevel level, String file, String function, int line, @Nullable GObject object, DebugMessage message) Returns the string representation for the specified debug log message formatted in the same way as gst_debug_log_default() (the default handler), without color.static void
debugLogId
(DebugCategory category, DebugLevel level, String file, String function, int line, @Nullable String id, String format, Object... varargs) Logs the given message using the currently registered debugging handlers.static void
debugLogIdLiteral
(DebugCategory category, DebugLevel level, String file, String function, int line, @Nullable String id, String messageString) Logs the given message using the currently registered debugging handlers.static void
debugLogLiteral
(DebugCategory category, DebugLevel level, String file, String function, int line, @Nullable GObject object, String messageString) Logs the given message using the currently registered debugging handlers.static void
If libunwind, glibc backtrace or DbgHelp are present a stack trace is printed.static int
debugRemoveLogFunction
(@Nullable LogFunction func) Removes all registered instances of the given logging functions.static int
debugRemoveLogFunctionByData
(@Nullable MemorySegment data) Removes all registered instances of log functions with the given user data.static void
Removes any previously added ring buffer logger with gst_debug_add_ring_buffer_logger().static String[]
Fetches the current logs per thread from the ring buffer logger.static void
debugSetActive
(boolean active) If activated, debugging messages are sent to the debugging handlers.static void
debugSetColored
(boolean colored) Sets or unsets the use of coloured debugging output.static void
Changes the coloring mode for debug output.static void
Changes the coloring mode for debug output.static void
Sets the default threshold to the given level and updates all categories to use this threshold.static void
debugSetThresholdForName
(String name, DebugLevel level) Sets all categories which match the given glob style pattern to the given level.static void
debugSetThresholdFromString
(String list, boolean reset) Sets the debug logging wanted in the same form as with the GST_DEBUG environment variable.static void
Resets all categories with the given name back to the default level.static void
deinit()
Clean up any resources created by GStreamer in gst_init().static boolean
dynamicTypeRegister
(Plugin plugin, Type type) Registers a newGstDynamicTypeFactory
in the registrystatic String
errorGetMessage
(Quark domain, int code) Get a string describing the error message in the current locale.static String
filenameToUri
(String filename) Similar to g_filename_to_uri(), but attempts to handle relative file paths as well.static String
flowGetName
(FlowReturn ret) Gets a string representing the given flow return.static Quark
flowToQuark
(FlowReturn ret) Get the unique quark for the given GstFlowReturn.static boolean
formatsContains
(Format[] formats, Format format) See if the given format is inside the format array.static String
This helper is mostly helpful for plugins that need to inspect the folder of the main executable to determine their set of features.static String
infoStrdupPrintf
(String format, Object... varargs) Allocates, fills and returns a 0-terminated string from the printf styleformat
string and corresponding arguments.static void
Initializes the GStreamer library, setting up internal path lists, registering built-in elements, and loading standard plugins.static boolean
Initializes the GStreamer library, setting up internal path lists, registering built-in elements, and loading standard plugins.static OptionGroup
Returns aGOptionGroup
with GStreamer's argument specifications.static boolean
isCapsFeatures
(@Nullable MemorySegment obj) Checks ifobj
is aGstCapsFeatures
static boolean
Use this function to check if GStreamer has been initialized with gst_init() or gst_init_check().static void
static int
static int
macosMainSimple
(MainFuncSimple mainFunc) static Structure
makeElementMessageDetails
(String name, Object... varargs) Create aGstStructure
to be used withgst_element_message_full_with_details
.static ParamSpec
paramSpecArray
(String name, String nick, String blurb, ParamSpec elementSpec, Set<ParamFlags> flags) This function creates a GstArray GParamSpec for use by objects/elements that want to expose properties of GstArray type.static ParamSpec
paramSpecArray
(String name, String nick, String blurb, ParamSpec elementSpec, ParamFlags... flags) This function creates a GstArray GParamSpec for use by objects/elements that want to expose properties of GstArray type.static ParamSpec
paramSpecFraction
(String name, String nick, String blurb, int minNum, int minDenom, int maxNum, int maxDenom, int defaultNum, int defaultDenom, Set<ParamFlags> flags) This function creates a fraction GParamSpec for use by objects/elements that want to expose properties of fraction type.static ParamSpec
paramSpecFraction
(String name, String nick, String blurb, int minNum, int minDenom, int maxNum, int maxDenom, int defaultNum, int defaultDenom, ParamFlags... flags) This function creates a fraction GParamSpec for use by objects/elements that want to expose properties of fraction type.static Type
static Bin
parseBinFromDescription
(String binDescription, boolean ghostUnlinkedPads) This is a convenience wrapper around gst_parse_launch() to create aGstBin
from a gst-launch-style pipeline description.static Element
parseBinFromDescriptionFull
(String binDescription, boolean ghostUnlinkedPads, @Nullable ParseContext context, Set<ParseFlags> flags) This is a convenience wrapper around gst_parse_launch() to create aGstBin
from a gst-launch-style pipeline description.static Element
parseBinFromDescriptionFull
(String binDescription, boolean ghostUnlinkedPads, @Nullable ParseContext context, ParseFlags... flags) This is a convenience wrapper around gst_parse_launch() to create aGstBin
from a gst-launch-style pipeline description.static Element
parseLaunch
(String pipelineDescription) Create a new pipeline based on command line syntax.static Element
parseLaunchFull
(String pipelineDescription, @Nullable ParseContext context, Set<ParseFlags> flags) Create a new pipeline based on command line syntax.static Element
parseLaunchFull
(String pipelineDescription, @Nullable ParseContext context, ParseFlags... flags) Create a new pipeline based on command line syntax.static Element
parseLaunchv
(String[] argv) Create a new element based on command line syntax.static Element
parseLaunchvFull
(String[] argv, @Nullable ParseContext context, Set<ParseFlags> flags) Create a new element based on command line syntax.static Element
parseLaunchvFull
(String[] argv, @Nullable ParseContext context, ParseFlags... flags) Create a new element based on command line syntax.static void
Outputs a formatted message via the GLib print handler.static void
Outputs a formatted message via the GLib error message handler.static void
printerrln
(String format, Object... varargs) Outputs a formatted message via the GLib error message handler.static void
Outputs a formatted message via the GLib print handler.static String[]
protectionFilterSystemsByAvailableDecryptors
(String[] systemIdentifiers) Iterates the supplied list of UUIDs and checks the GstRegistry for all the decryptors supporting one of the supplied UUIDs.static Type
static String
protectionSelectSystem
(String[] systemIdentifiers) Iterates the supplied list of UUIDs and checks the GstRegistry for an element that supports one of the supplied UUIDs.static Type
static boolean
Some functions in the GStreamer core might install a custom SIGSEGV handler to better catch and report errors to the application.static void
segtrapSetEnabled
(boolean enabled) Applications might want to disable/enable the SIGSEGV handling of the GStreamer core.static boolean
Checks if the given type is already registered.static String
tagGetDescription
(String tag) Returns the human-readable description of this tag, You must not change or free this string.static TagFlag
tagGetFlag
(String tag) Gets the flag oftag
.static String
tagGetNick
(String tag) Returns the human-readable name of this tag, You must not change or free this string.static Type
tagGetType
(String tag) Gets theGType
used for this tag.static boolean
tagIsFixed
(String tag) Checks if the given tag is fixed.static void
tagMergeStringsWithComma
(Value dest, Value src) This is a convenience function for the func argument of gst_tag_register().static void
tagMergeUseFirst
(Value dest, Value src) This is a convenience function for the func argument of gst_tag_register().static void
tagRegister
(String name, TagFlag flag, Type type, String nick, String blurb, @Nullable TagMergeFunc func) Registers a new tag type for the use with GStreamer's type system.static void
tagRegisterStatic
(String name, TagFlag flag, Type type, String nick, String blurb, @Nullable TagMergeFunc func) Registers a new tag type for the use with GStreamer's type system.Get a list of all active tracer objects owned by the tracing framework for the entirety of the run-time of the process or till gst_deinit() is called.static void
tracingRegisterHook
(Tracer tracer, String detail, Callback func) Registerfunc
to be called when the trace hookdetail
is getting invoked.static boolean
typeIsPluginApi
(Type type, @Nullable Out<Set<PluginAPIFlags>> flags) Checks iftype
is plugin API.static void
typeMarkAsPluginApi
(Type type, Set<PluginAPIFlags> flags) Markstype
as plugin API.static void
typeMarkAsPluginApi
(Type type, PluginAPIFlags... flags) Markstype
as plugin API.static boolean
Forces GStreamer to re-scan its plugin paths and update the default plugin registry.static MemorySegment
utilArrayBinarySearch
(@Nullable MemorySegment array, int numElements, long elementSize, CompareDataFunc searchFunc, SearchMode mode, @Nullable MemorySegment searchData) Searches insidearray
forsearchData
by using the comparison functionsearchFunc
.static int
utilCeilLog2
(int v) Return a max num of log2.static void
utilDoubleToFraction
(double src, Out<Integer> destN, Out<Integer> destD) Transforms agdouble
to a fraction and simplifies the result.static void
utilDumpBuffer
(Buffer buf) Dumps the buffer memory into a hex representation.static void
utilDumpMem
(byte[] mem) Dumps the memory block into a hex representation.static int
utilFilenameCompare
(String a, String b) Compares the given filenames using natural ordering.static boolean
utilFractionAdd
(int aN, int aD, int bN, int bD, Out<Integer> resN, Out<Integer> resD) Adds the fractionsaN
/aD
andbN
/bD
and stores the result inresN
andresD
.static int
utilFractionCompare
(int aN, int aD, int bN, int bD) Compares the fractionsaN
/aD
andbN
/bD
and returns -1 if a < b, 0 if a = b and 1 if a > b.static boolean
utilFractionMultiply
(int aN, int aD, int bN, int bD, Out<Integer> resN, Out<Integer> resD) Multiplies the fractionsaN
/aD
andbN
/bD
and stores the result inresN
andresD
.static void
utilFractionToDouble
(int srcN, int srcD, Out<Double> dest) Transforms a fraction to agdouble
.static long
utilGdoubleToGuint64
(double value) static boolean
utilGetObjectArray
(GObject object, String name, Out<ValueArray> array) Get a property of typeGST_TYPE_ARRAY
and transform it into aGValueArray
.static ClockTime
Get a timestamp as GstClockTime to be used for interval measurements.static int
utilGreatestCommonDivisor
(int a, int b) Calculates the greatest common divisor ofa
andb
.static long
utilGreatestCommonDivisorInt64
(long a, long b) Calculates the greatest common divisor ofa
andb
.static int
Return a constantly incrementing group id.static double
utilGuint64ToGdouble
(long value) static int
utilSeqnumCompare
(int s1, int s2) Compare two sequence numbers, handling wraparound.static int
Return a constantly incrementing sequence number.static void
utilSetObjectArg
(GObject object, String name, String value) Converts the string value to the type of the objects argument and sets the argument with it.static boolean
utilSetObjectArray
(GObject object, String name, ValueArray array) Transfer aGValueArray
toGST_TYPE_ARRAY
and set this value on the specified property name.static void
utilSetValueFromString
(Value value, String valueStr) Converts the string to the type of the value and sets the value with it.static void
utilSimplifyFraction
(MemorySegment numerator, MemorySegment denominator, int nTerms, int threshold) Calculates the simpler representation ofnumerator
anddenominator
and update both values with the resulting simplified fraction.static long
utilUint64Scale
(long val, long num, long denom) Scaleval
by the rational numbernum
/denom
, avoiding overflows and underflows and without loss of precision.static long
utilUint64ScaleCeil
(long val, long num, long denom) Scaleval
by the rational numbernum
/denom
, avoiding overflows and underflows and without loss of precision.static long
utilUint64ScaleInt
(long val, int num, int denom) Scaleval
by the rational numbernum
/denom
, avoiding overflows and underflows and without loss of precision.static long
utilUint64ScaleIntCeil
(long val, int num, int denom) Scaleval
by the rational numbernum
/denom
, avoiding overflows and underflows and without loss of precision.static long
utilUint64ScaleIntRound
(long val, int num, int denom) Scaleval
by the rational numbernum
/denom
, avoiding overflows and underflows and without loss of precision.static long
utilUint64ScaleRound
(long val, long num, long denom) Scaleval
by the rational numbernum
/denom
, avoiding overflows and underflows and without loss of precision.static boolean
valueCanCompare
(Value value1, Value value2) Determines ifvalue1
andvalue2
can be compared.static boolean
valueCanIntersect
(Value value1, Value value2) Determines if intersecting two values will produce a valid result.static boolean
valueCanSubtract
(Value minuend, Value subtrahend) Checks if it's possible to subtractsubtrahend
fromminuend
.static boolean
valueCanUnion
(Value value1, Value value2) Determines ifvalue1
andvalue2
can be non-trivially unioned.static int
valueCompare
(Value value1, Value value2) Comparesvalue1
andvalue2
.static boolean
valueDeserialize
(Value dest, String src) Tries to deserialize a string into the type specified by the given GValue.static boolean
valueDeserializeWithPspec
(Value dest, String src, @Nullable ParamSpec pspec) Tries to deserialize a string into the type specified by the given GValue.static boolean
valueFixate
(Value dest, Value src) Fixatesrc
into a new valuedest
.static boolean
valueFractionMultiply
(Value product, Value factor1, Value factor2) Multiplies the twoGValue
items containing aGST_TYPE_FRACTION
and setsproduct
to the product of the two fractions.static boolean
valueFractionSubtract
(Value dest, Value minuend, Value subtrahend) Subtracts thesubtrahend
from theminuend
and setsdest
to the result.static long
valueGetBitmask
(Value value) Gets the bitmask specified byvalue
.static Caps
valueGetCaps
(Value value) Gets the contents ofvalue
.static CapsFeatures
valueGetCapsFeatures
(Value value) Gets the contents ofvalue
.static double
valueGetDoubleRangeMax
(Value value) Gets the maximum of the range specified byvalue
.static double
valueGetDoubleRangeMin
(Value value) Gets the minimum of the range specified byvalue
.static int
valueGetFlagsetFlags
(Value value) Retrieve the flags field of a GstFlagSetvalue
.static int
valueGetFlagsetMask
(Value value) Retrieve the mask field of a GstFlagSetvalue
.static int
valueGetFractionDenominator
(Value value) Gets the denominator of the fraction specified byvalue
.static int
valueGetFractionNumerator
(Value value) Gets the numerator of the fraction specified byvalue
.static Value
valueGetFractionRangeMax
(Value value) Gets the maximum of the range specified byvalue
.static Value
valueGetFractionRangeMin
(Value value) Gets the minimum of the range specified byvalue
.static long
valueGetInt64RangeMax
(Value value) Gets the maximum of the range specified byvalue
.static long
valueGetInt64RangeMin
(Value value) Gets the minimum of the range specified byvalue
.static long
valueGetInt64RangeStep
(Value value) Gets the step of the range specified byvalue
.static int
valueGetIntRangeMax
(Value value) Gets the maximum of the range specified byvalue
.static int
valueGetIntRangeMin
(Value value) Gets the minimum of the range specified byvalue
.static int
valueGetIntRangeStep
(Value value) Gets the step of the range specified byvalue
.static Structure
valueGetStructure
(Value value) Gets the contents ofvalue
.static void
valueInitAndCopy
(Value dest, Value src) Initialises the target value to be of the same type as source and then copies the contents from source to target.static boolean
valueIntersect
(@Nullable Value dest, Value value1, Value value2) Calculates the intersection of two values.static boolean
valueIsFixed
(Value value) Tests if the given GValue, if available in a GstStructure (or any other container) contains a "fixed" (which means: one value) or an "unfixed" (which means: multiple possible values, such as data lists or data ranges) value.static boolean
valueIsSubset
(Value value1, Value value2) Check thatvalue1
is a subset ofvalue2
.static void
valueRegister
(ValueTable table) Registers functions to perform calculations onGValue
items of a given type.static String
valueSerialize
(Value value) tries to transform the givenvalue
into a string representation that allows getting back this string later on using gst_value_deserialize().static void
valueSetBitmask
(Value value, long bitmask) Setsvalue
to the bitmask specified bybitmask
.static void
valueSetCaps
(Value value, Caps caps) Sets the contents ofvalue
tocaps
.static void
valueSetCapsFeatures
(Value value, CapsFeatures features) Sets the contents ofvalue
tofeatures
.static void
valueSetDoubleRange
(Value value, double start, double end) Setsvalue
to the range specified bystart
andend
.static void
valueSetFlagset
(Value value, int flags, int mask) Setsvalue
to the flags and mask values provided inflags
andmask
.static void
valueSetFraction
(Value value, int numerator, int denominator) Setsvalue
to the fraction specified bynumerator
overdenominator
.static void
valueSetFractionRange
(Value value, Value start, Value end) Setsvalue
to the range specified bystart
andend
.static void
valueSetFractionRangeFull
(Value value, int numeratorStart, int denominatorStart, int numeratorEnd, int denominatorEnd) Setsvalue
to the range specified bynumeratorStart
/denominatorStart
andnumeratorEnd
/denominatorEnd
.static void
valueSetInt64Range
(Value value, long start, long end) Setsvalue
to the range specified bystart
andend
.static void
valueSetInt64RangeStep
(Value value, long start, long end, long step) Setsvalue
to the range specified bystart
,end
andstep
.static void
valueSetIntRange
(Value value, int start, int end) Setsvalue
to the range specified bystart
andend
.static void
valueSetIntRangeStep
(Value value, int start, int end, int step) Setsvalue
to the range specified bystart
,end
andstep
.static void
valueSetStructure
(Value value, Structure structure) Sets the contents ofvalue
tostructure
.static boolean
valueSubtract
(@Nullable Value dest, Value minuend, Value subtrahend) Subtractssubtrahend
fromminuend
and stores the result indest
.static boolean
valueUnion
(Value dest, Value value1, Value value2) Creates a GValue corresponding to the union ofvalue1
andvalue2
.static void
Gets the version number of the GStreamer library.static String
This function returns a string that is useful for describing this version of GStreamer to the outside world: user agent strings, logging, ...
-
Field Details
-
ALLOCATOR_SYSMEM
The allocator name for the default system memory allocator- See Also:
-
BUFFER_COPY_ALL
Combination of all possible fields that can be copied with gst_buffer_copy_into(). -
BUFFER_COPY_METADATA
Combination of all possible metadata fields that can be copied with gst_buffer_copy_into(). -
BUFFER_OFFSET_NONE
public static final long BUFFER_OFFSET_NONEConstant for no-offset return results.- See Also:
-
CAN_INLINE
public static final int CAN_INLINE- See Also:
-
CAPS_FEATURE_MEMORY_SYSTEM_MEMORY
- See Also:
-
CLOCK_TIME_NONE
Constant to define an undefined clock time. -
DEBUG_BG_MASK
public static final int DEBUG_BG_MASK- See Also:
-
DEBUG_FG_MASK
public static final int DEBUG_FG_MASK- See Also:
-
DEBUG_FORMAT_MASK
public static final int DEBUG_FORMAT_MASK- See Also:
-
ELEMENT_FACTORY_KLASS_DECODER
- See Also:
-
ELEMENT_FACTORY_KLASS_DECRYPTOR
- See Also:
-
ELEMENT_FACTORY_KLASS_DEMUXER
- See Also:
-
ELEMENT_FACTORY_KLASS_DEPAYLOADER
- See Also:
-
ELEMENT_FACTORY_KLASS_ENCODER
- See Also:
-
ELEMENT_FACTORY_KLASS_ENCRYPTOR
- See Also:
-
ELEMENT_FACTORY_KLASS_FORMATTER
- See Also:
-
ELEMENT_FACTORY_KLASS_HARDWARE
Elements interacting with hardware devices should specify this classifier in their metadata. You may need to put the element in "READY" state to test if the hardware is present in the system.- See Also:
-
ELEMENT_FACTORY_KLASS_MEDIA_AUDIO
- See Also:
-
ELEMENT_FACTORY_KLASS_MEDIA_IMAGE
- See Also:
-
ELEMENT_FACTORY_KLASS_MEDIA_METADATA
- See Also:
-
ELEMENT_FACTORY_KLASS_MEDIA_SUBTITLE
- See Also:
-
ELEMENT_FACTORY_KLASS_MEDIA_VIDEO
- See Also:
-
ELEMENT_FACTORY_KLASS_MUXER
- See Also:
-
ELEMENT_FACTORY_KLASS_PARSER
- See Also:
-
ELEMENT_FACTORY_KLASS_PAYLOADER
- See Also:
-
ELEMENT_FACTORY_KLASS_SINK
- See Also:
-
ELEMENT_FACTORY_KLASS_SRC
- See Also:
-
ELEMENT_FACTORY_TYPE_ANY
Elements of any of the defined GST_ELEMENT_FACTORY_LIST types -
ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS
All sinks handling audio, video or image media types -
ELEMENT_FACTORY_TYPE_AUDIO_ENCODER
All encoders handling audio media types -
ELEMENT_FACTORY_TYPE_DECODABLE
All elements used to 'decode' streams (decoders, demuxers, parsers, depayloaders) -
ELEMENT_FACTORY_TYPE_DECODER
-
ELEMENT_FACTORY_TYPE_DECRYPTOR
-
ELEMENT_FACTORY_TYPE_DEMUXER
-
ELEMENT_FACTORY_TYPE_DEPAYLOADER
-
ELEMENT_FACTORY_TYPE_ENCODER
-
ELEMENT_FACTORY_TYPE_ENCRYPTOR
-
ELEMENT_FACTORY_TYPE_FORMATTER
-
ELEMENT_FACTORY_TYPE_HARDWARE
-
ELEMENT_FACTORY_TYPE_MAX_ELEMENTS
-
ELEMENT_FACTORY_TYPE_MEDIA_ANY
Elements matching any of the defined GST_ELEMENT_FACTORY_TYPE_MEDIA typesNote: Do not use this if you wish to not filter against any of the defined media types. If you wish to do this, simply don't specify any GST_ELEMENT_FACTORY_TYPE_MEDIA flag.
-
ELEMENT_FACTORY_TYPE_MEDIA_AUDIO
-
ELEMENT_FACTORY_TYPE_MEDIA_IMAGE
-
ELEMENT_FACTORY_TYPE_MEDIA_METADATA
-
ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE
-
ELEMENT_FACTORY_TYPE_MEDIA_VIDEO
-
ELEMENT_FACTORY_TYPE_MUXER
-
ELEMENT_FACTORY_TYPE_PARSER
-
ELEMENT_FACTORY_TYPE_PAYLOADER
-
ELEMENT_FACTORY_TYPE_SINK
-
ELEMENT_FACTORY_TYPE_SRC
-
ELEMENT_FACTORY_TYPE_TIMESTAMPER
Timestamp correcting elements -
ELEMENT_FACTORY_TYPE_VIDEO_ENCODER
All encoders handling video or image media types -
ELEMENT_METADATA_AUTHOR
Name and contact details of the author(s). Use \\n to separate multiple author details. E.g: "Joe Bloggs <joe.blogs at foo.com>"- See Also:
-
ELEMENT_METADATA_DESCRIPTION
Sentence describing the purpose of the element. E.g: "Write stream to a file"- See Also:
-
ELEMENT_METADATA_DOC_URI
Set uri pointing to user documentation. Applications can use this to show help for e.g. effects to users.- See Also:
-
ELEMENT_METADATA_ICON_NAME
Elements that bridge to certain other products can include an icon of that used product. Application can show the icon in menus/selectors to help identifying specific elements.- See Also:
-
ELEMENT_METADATA_KLASS
String describing the type of element, as an unordered list separated with slashes ('/'). See draft-klass.txt of the design docs for more details and common types. E.g: "Sink/File"- See Also:
-
ELEMENT_METADATA_LONGNAME
The long English name of the element. E.g. "File Sink"- See Also:
-
ERROR_SYSTEM
Builds a string using errno describing the previously failed system call. To be used as the debug argument inGST_ELEMENT_ERROR
.- See Also:
-
EVENT_NUM_SHIFT
public static final int EVENT_NUM_SHIFT- See Also:
-
EVENT_TYPE_BOTH
The same thing asGST_EVENT_TYPE_UPSTREAM
|GST_EVENT_TYPE_DOWNSTREAM
. -
FLAG_SET_MASK_EXACT
public static final int FLAG_SET_MASK_EXACTA mask value with all bits set, for use as a GstFlagSet mask where all flag bits must match exactly- See Also:
-
FORMAT_PERCENT_MAX
public static final long FORMAT_PERCENT_MAXThe PERCENT format is between 0 and this value- See Also:
-
FORMAT_PERCENT_SCALE
public static final long FORMAT_PERCENT_SCALEThe value used to scale down the reported PERCENT format value to its real value.- See Also:
-
FOURCC_FORMAT
Can be used together withGST_FOURCC_ARGS
to properly output aguint32
fourcc value in a printf\\()-style text message.printf ("fourcc: %" GST_FOURCC_FORMAT "\\n", GST_FOURCC_ARGS (fcc));
- See Also:
-
GROUP_ID_INVALID
public static final int GROUP_ID_INVALIDA value which is guaranteed to never be returned by gst_util_group_id_next().Can be used as a default value in variables used to store group_id.
- See Also:
-
LICENSE_UNKNOWN
To be used in GST_PLUGIN_DEFINE if unsure about the licence.- See Also:
-
LOCK_FLAG_READWRITE
-
MAP_READWRITE
-
META_TAG_MEMORY_REFERENCE_STR
This metadata stays relevant until a deep copy is made.- See Also:
-
META_TAG_MEMORY_STR
This metadata stays relevant as long as memory layout is unchanged. In hindsight, this tag should have been called "memory-layout".- See Also:
-
MSECOND
Constant that defines one GStreamer millisecond. -
NSECOND
Constant that defines one GStreamer nanosecond -
PARAM_CONDITIONALLY_AVAILABLE
public static final int PARAM_CONDITIONALLY_AVAILABLEUse this flag on GObject properties of GstObject to indicate that they might not be available depending on environment such as OS, device, etc, so such properties will be installed conditionally only if the GstObject is able to support it.- See Also:
-
PARAM_CONTROLLABLE
public static final int PARAM_CONTROLLABLEUse this flag on GObject properties to signal they can make sense to be. controlled over time. This hint is used by the GstController.- See Also:
-
PARAM_DOC_SHOW_DEFAULT
public static final int PARAM_DOC_SHOW_DEFAULTUse this flag on GObject properties of GstObject to indicate that duringgst-inspect
and friends, the default value should be used as default instead of the current value.- See Also:
-
PARAM_MUTABLE_PAUSED
public static final int PARAM_MUTABLE_PAUSEDUse this flag on GObject properties of GstElements to indicate that they can be changed when the element is in the PAUSED or lower state. This flag implies GST_PARAM_MUTABLE_READY.- See Also:
-
PARAM_MUTABLE_PLAYING
public static final int PARAM_MUTABLE_PLAYINGUse this flag on GObject properties of GstElements to indicate that they can be changed when the element is in the PLAYING or lower state. This flag implies GST_PARAM_MUTABLE_PAUSED.- See Also:
-
PARAM_MUTABLE_READY
public static final int PARAM_MUTABLE_READYUse this flag on GObject properties of GstElements to indicate that they can be changed when the element is in the READY or lower state.- See Also:
-
PARAM_USER_SHIFT
public static final int PARAM_USER_SHIFTBits based on GST_PARAM_USER_SHIFT can be used by 3rd party applications.- See Also:
-
PROTECTION_SYSTEM_ID_CAPS_FIELD
The field name in a GstCaps that is used to signal the UUID of the protection system.- See Also:
-
PROTECTION_UNSPECIFIED_SYSTEM_ID
The protection system value of the unspecified UUID. In some cases the system protection ID is not present in the contents or in their metadata, as encrypted WebM. This define is used to set the value of the "system_id" field in GstProtectionEvent, with this value, the application will use an external information to choose which protection system to use.Example: The matroskademux uses this value in the case of encrypted WebM, the application will choose the appropriate protection system based on the information received through EME API.
- See Also:
-
PTR_FORMAT
printf format type used to debug GStreamer types. You can use this in combination with GStreamer's debug logging system as well as the functions gst_info_vasprintf(), gst_info_strdup_vprintf() and gst_info_strdup_printf() to pretty-print the following types:GstCaps
,GstStructure
,GstCapsFeatures
,GstTagList
,GstDateTime
,GstBuffer
,GstBufferList
,GstMessage
,GstEvent
,GstQuery
,GstContext
,GstPad
,GstObject
. AllGObject
types will be printed as typename plus pointer, and everything else will simply be printed as pointer address.This can only be used on types whose size is >= sizeof(gpointer).
- See Also:
-
QUERY_NUM_SHIFT
public static final int QUERY_NUM_SHIFT- See Also:
-
QUERY_TYPE_BOTH
The same thing asGST_QUERY_TYPE_UPSTREAM
|GST_QUERY_TYPE_DOWNSTREAM
. -
SECOND
Constant that defines one GStreamer second. -
SEGMENT_FORMAT
printf format type used to debug GStreamer segments. You can use this in combination with GStreamer's debug logging system as well as the functions gst_info_vasprintf(), gst_info_strdup_vprintf() and gst_info_strdup_printf() to pretty-printGstSegment
structures. This can only be used on pointers to GstSegment structures.- See Also:
-
SEGMENT_INSTANT_FLAGS
public static final int SEGMENT_INSTANT_FLAGS- See Also:
-
SEQNUM_INVALID
public static final int SEQNUM_INVALIDA value which is guaranteed to never be returned by gst_util_seqnum_next().Can be used as a default value in variables used to store seqnum.
- See Also:
-
STIMEP_FORMAT
printf format type used to debug GStreamer signed time value pointers. You can use this in combination with GStreamer's debug logging system as well as the functions gst_info_vasprintf(), gst_info_strdup_vprintf() and gst_info_strdup_printf() to pretty-print signed time (pointers toGstClockTimeDiff
orgint64
).- See Also:
-
STIME_FORMAT
A string that can be used in printf-like format strings to display a signedGstClockTimeDiff
orgint64
value inh:m:s
format. Use GST_TIME_ARGS() to construct the matching arguments.Example:
printf("%" GST_STIME_FORMAT "\\n", GST_STIME_ARGS(ts));
- See Also:
-
TAG_ALBUM
album containing this data (string)The album name as it should be displayed, e.g. 'The Jazz Guitar'
- See Also:
-
TAG_ALBUM_ARTIST
The artist of the entire album, as it should be displayed.- See Also:
-
TAG_ALBUM_ARTIST_SORTNAME
The artist of the entire album, as it should be sorted.- See Also:
-
TAG_ALBUM_GAIN
-
TAG_ALBUM_PEAK
-
TAG_ALBUM_SORTNAME
album containing this data, as used for sorting (string)The album name as it should be sorted, e.g. 'Jazz Guitar, The'
- See Also:
-
TAG_ALBUM_VOLUME_COUNT
count of discs inside collection this disc belongs to (unsigned integer)- See Also:
-
TAG_ALBUM_VOLUME_NUMBER
disc number inside a collection (unsigned integer)- See Also:
-
TAG_APPLICATION_DATA
Arbitrary application data (sample)Some formats allow applications to add their own arbitrary data into files. This data is application dependent.
- See Also:
-
TAG_APPLICATION_NAME
Name of the application used to create the media (string)- See Also:
-
TAG_ARTIST
person(s) responsible for the recording (string)The artist name as it should be displayed, e.g. 'Jimi Hendrix' or 'The Guitar Heroes'
- See Also:
-
TAG_ARTIST_SORTNAME
person(s) responsible for the recording, as used for sorting (string)The artist name as it should be sorted, e.g. 'Hendrix, Jimi' or 'Guitar Heroes, The'
- See Also:
-
TAG_ATTACHMENT
generic file attachment (sample) (sample taglist should specify the content type and if possible set "filename" to the file name of the attachment)- See Also:
-
TAG_AUDIO_CODEC
-
TAG_BEATS_PER_MINUTE
number of beats per minute in audio (double)- See Also:
-
TAG_BITRATE
exact or average bitrate in bits/s (unsigned integer)- See Also:
-
TAG_CODEC
-
TAG_COMMENT
-
TAG_COMPOSER
-
TAG_COMPOSER_SORTNAME
The composer's name, used for sorting (string)- See Also:
-
TAG_CONDUCTOR
-
TAG_CONTACT
-
TAG_CONTAINER_FORMAT
container format the data is stored in (string)- See Also:
-
TAG_CONTAINER_SPECIFIC_TRACK_ID
Unique identifier for the audio, video or text track this tag is associated with. The mappings for several container formats are defined in the [Sourcing In-band Media Resource Tracks from Media Containers into HTML specification](https://dev.w3.org/html5/html-sourcing-inband-tracks/).- See Also:
-
TAG_COPYRIGHT
-
TAG_COPYRIGHT_URI
URI to location where copyright details can be found (string)- See Also:
-
TAG_DATE
-
TAG_DATE_TIME
date and time the data was created (GstDateTime
structure)- See Also:
-
TAG_DESCRIPTION
short text describing the content of the data (string)- See Also:
-
TAG_DEVICE_MANUFACTURER
Manufacturer of the device used to create the media (string)- See Also:
-
TAG_DEVICE_MODEL
Model of the device used to create the media (string)- See Also:
-
TAG_DURATION
length in GStreamer time units (nanoseconds) (unsigned 64-bit integer)- See Also:
-
TAG_ENCODED_BY
name of the person or organisation that encoded the file. May contain a copyright message if the person or organisation also holds the copyright (string)Note: do not use this field to describe the encoding application. Use
GST_TAG_APPLICATION_NAME
orGST_TAG_COMMENT
for that.- See Also:
-
TAG_ENCODER
-
TAG_ENCODER_VERSION
version of the encoder used to encode this stream (unsigned integer)- See Also:
-
TAG_EXTENDED_COMMENT
key/value text commenting the data (string)Must be in the form of 'key=comment' or 'key[lc]=comment' where 'lc' is an ISO-639 language code.
This tag is used for unknown Vorbis comment tags, unknown APE tags and certain ID3v2 comment fields.
- See Also:
-
TAG_GENRE
-
TAG_GEO_LOCATION_CAPTURE_DIRECTION
Indicates the direction the device is pointing to when capturing a media. It is represented as degrees in floating point representation, 0 means the geographic north, and increases clockwise (double from 0 to 360)See also
GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION
- See Also:
-
TAG_GEO_LOCATION_CITY
The city (english name) where the media has been produced (string).- See Also:
-
TAG_GEO_LOCATION_COUNTRY
The country (english name) where the media has been produced (string).- See Also:
-
TAG_GEO_LOCATION_ELEVATION
geo elevation of where the media has been recorded or produced in meters according to WGS84 (zero is average sea level) (double).- See Also:
-
TAG_GEO_LOCATION_HORIZONTAL_ERROR
Represents the expected error on the horizontal positioning in meters (double).- See Also:
-
TAG_GEO_LOCATION_LATITUDE
geo latitude location of where the media has been recorded or produced in degrees according to WGS84 (zero at the equator, negative values for southern latitudes) (double).- See Also:
-
TAG_GEO_LOCATION_LONGITUDE
geo longitude location of where the media has been recorded or produced in degrees according to WGS84 (zero at the prime meridian in Greenwich/UK, negative values for western longitudes). (double).- See Also:
-
TAG_GEO_LOCATION_MOVEMENT_DIRECTION
Indicates the movement direction of the device performing the capture of a media. It is represented as degrees in floating point representation, 0 means the geographic north, and increases clockwise (double from 0 to 360)See also
GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION
- See Also:
-
TAG_GEO_LOCATION_MOVEMENT_SPEED
Speed of the capturing device when performing the capture. Represented in m/s. (double)See also
GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION
- See Also:
-
TAG_GEO_LOCATION_NAME
human readable descriptive location of where the media has been recorded or produced. (string).- See Also:
-
TAG_GEO_LOCATION_SUBLOCATION
A location 'smaller' than GST_TAG_GEO_LOCATION_CITY that specifies better where the media has been produced. (e.g. the neighborhood) (string).This tag has been added as this is how it is handled/named in XMP's Iptc4xmpcore schema.
- See Also:
-
TAG_GROUPING
Groups together media that are related and spans multiple tracks. An example are multiple pieces of a concerto. (string)- See Also:
-
TAG_HOMEPAGE
Homepage for this media (i.e. artist or movie homepage) (string)- See Also:
-
TAG_IMAGE
image (sample) (sample taglist should specify the content type and preferably also set "image-type" field asGstTagImageType
)- See Also:
-
TAG_IMAGE_ORIENTATION
Represents the 'Orientation' tag from EXIF. Defines how the image should be rotated and mirrored for display. (string)This tag has a predefined set of allowed values: "rotate-0" "rotate-90" "rotate-180" "rotate-270" "flip-rotate-0" "flip-rotate-90" "flip-rotate-180" "flip-rotate-270"
The naming is adopted according to a possible transformation to perform on the image to fix its orientation, obviously equivalent operations will yield the same result.
Rotations indicated by the values are in clockwise direction and 'flip' means an horizontal mirroring.
- See Also:
-
TAG_INTERPRETED_BY
Information about the people behind a remix and similar interpretations of another existing piece (string)- See Also:
-
TAG_ISRC
International Standard Recording Code - see http://www.ifpi.org/isrc/ (string)- See Also:
-
TAG_KEYWORDS
comma separated keywords describing the content (string).- See Also:
-
TAG_LANGUAGE_CODE
ISO-639-2 or ISO-639-1 code for the language the content is in (string)There is utility API in libgsttag in gst-plugins-base to obtain a translated language name from the language code:
gst_tag_get_language_name()
- See Also:
-
TAG_LANGUAGE_NAME
Name of the language the content is in (string)Free-form name of the language the content is in, if a language code is not available. This tag should not be set in addition to a language code. It is undefined what language or locale the language name is in.
- See Also:
-
TAG_LICENSE
-
TAG_LICENSE_URI
URI to location where license details can be found (string)- See Also:
-
TAG_LOCATION
Origin of media as a URI (location, where the original of the file or stream is hosted) (string)- See Also:
-
TAG_LYRICS
-
TAG_MAXIMUM_BITRATE
maximum bitrate in bits/s (unsigned integer)- See Also:
-
TAG_MIDI_BASE_NOTE
Midi note number of the audio track. This is useful for sample instruments and in particular for multi-samples.- See Also:
-
TAG_MINIMUM_BITRATE
minimum bitrate in bits/s (unsigned integer)- See Also:
-
TAG_NOMINAL_BITRATE
nominal bitrate in bits/s (unsigned integer). The actual bitrate might be different from this target bitrate.- See Also:
-
TAG_ORGANIZATION
-
TAG_PERFORMER
-
TAG_PREVIEW_IMAGE
image that is meant for preview purposes, e.g. small icon-sized version (sample) (sample taglist should specify the content type)- See Also:
-
TAG_PRIVATE_DATA
Any private data that may be contained in tags (sample).It is represented by
GstSample
in whichGstBuffer
contains the binary data and the sample's infoGstStructure
may contain any extra information that identifies the origin or meaning of the data.Private frames in ID3v2 tags ('PRIV' frames) will be represented using this tag, in which case the GstStructure will be named "ID3PrivateFrame" and contain a field named "owner" of type string which contains the owner-identification string from the tag.
- See Also:
-
TAG_PUBLISHER
-
TAG_REFERENCE_LEVEL
reference level of track and album gain values (double)- See Also:
-
TAG_SERIAL
-
TAG_SHOW_EPISODE_NUMBER
Number of the episode within a season/show (unsigned integer)- See Also:
-
TAG_SHOW_NAME
-
TAG_SHOW_SEASON_NUMBER
Number of the season of a show/series (unsigned integer)- See Also:
-
TAG_SHOW_SORTNAME
-
TAG_SUBTITLE_CODEC
codec/format the subtitle data is stored in (string)- See Also:
-
TAG_TITLE
commonly used title (string)The title as it should be displayed, e.g. 'The Doll House'
- See Also:
-
TAG_TITLE_SORTNAME
commonly used title, as used for sorting (string)The title as it should be sorted, e.g. 'Doll House, The'
- See Also:
-
TAG_TRACK_COUNT
count of tracks inside collection this track belongs to (unsigned integer)- See Also:
-
TAG_TRACK_GAIN
-
TAG_TRACK_NUMBER
track number inside a collection (unsigned integer)- See Also:
-
TAG_TRACK_PEAK
-
TAG_USER_RATING
Rating attributed by a person (likely the application user). The higher the value, the more the user likes this media (unsigned int from 0 to 100)- See Also:
-
TAG_VERSION
-
TAG_VIDEO_CODEC
-
TIMEP_FORMAT
printf format type used to debug GStreamer ClockTime pointers. You can use this in combination with GStreamer's debug logging system as well as the functions gst_info_vasprintf(), gst_info_strdup_vprintf() and gst_info_strdup_printf() to pretty-printGstClockTime
pointers. This can only be used on pointers to GstClockTime values.- See Also:
-
TIME_FORMAT
A string that can be used in printf-like format strings to display aGstClockTime
value inh:m:s
format. Use GST_TIME_ARGS() to construct the matching arguments.Example:
printf("%" GST_TIME_FORMAT "\\n", GST_TIME_ARGS(ts));
- See Also:
-
TOC_REPEAT_COUNT_INFINITE
public static final int TOC_REPEAT_COUNT_INFINITESpecial value for the repeat_count set in gst_toc_entry_set_loop() or returned by gst_toc_entry_set_loop() to indicate infinite looping.- See Also:
-
URI_NO_PORT
public static final int URI_NO_PORTValue forGstUri
<!-- -->.port to indicate no port number.- See Also:
-
USECOND
Constant that defines one GStreamer microsecond. -
VALUE_EQUAL
public static final int VALUE_EQUALIndicates that the first value provided to a comparison function (gst_value_compare()) is equal to the second one.- See Also:
-
VALUE_GREATER_THAN
public static final int VALUE_GREATER_THANIndicates that the first value provided to a comparison function (gst_value_compare()) is greater than the second one.- See Also:
-
VALUE_LESS_THAN
public static final int VALUE_LESS_THANIndicates that the first value provided to a comparison function (gst_value_compare()) is lesser than the second one.- See Also:
-
VALUE_UNORDERED
public static final int VALUE_UNORDEREDIndicates that the comparison function (gst_value_compare()) can not determine a order for the two provided values.- See Also:
-
VERSION_MAJOR
public static final int VERSION_MAJORThe major version of GStreamer at compile time:- See Also:
-
VERSION_MICRO
public static final int VERSION_MICROThe micro version of GStreamer at compile time:- See Also:
-
VERSION_MINOR
public static final int VERSION_MINORThe minor version of GStreamer at compile time:- See Also:
-
VERSION_NANO
public static final int VERSION_NANOThe nano version of GStreamer at compile time: Actual releases have 0, GIT versions have 1, prerelease versions have 2-...- See Also:
-
-
Constructor Details
-
Gst
public Gst()
-
-
Method Details
-
javagi$ensureInitialized
public static void javagi$ensureInitialized() -
calculateLinearRegression
public static boolean calculateLinearRegression(ClockTime xy, ClockTime temp, int n, ClockTime mNum, ClockTime mDenom, ClockTime b, ClockTime xbase, Out<Double> rSquared) Calculates the linear regression of the valuesxy
and places the result inmNum
,mDenom
,b
andxbase
, representing the function y(x) = m_num/m_denom * (x - xbase) + b that has the least-square distance from all pointsx
andy
.rSquared
will contain the remaining error.If
temp
is notnull
, it will be used as temporary space for the function, in which case the function works without any allocation at all. Iftemp
isnull
, an allocation will take place.temp
should have at least the same amount of memory allocated asxy
, i.e. 2*n*sizeof(GstClockTime).This function assumes (x,y) values with reasonable large differences between them. It will not calculate the exact results if the differences between neighbouring values are too small due to not being able to represent sub-integer values during the calculations.
- Parameters:
xy
- Pairs of (x,y) valuestemp
- Temporary scratch space used by the functionn
- number of (x,y) pairsmNum
- numerator of calculated slopemDenom
- denominator of calculated slopeb
- Offset at Y-axisxbase
- Offset at X-axisrSquared
- R-squared- Returns:
true
if the linear regression was successfully calculated
-
clearBuffer
Clears a reference to aGstBuffer
.bufPtr
must not benull
.If the reference is
null
then this function does nothing. Otherwise, the reference count of the buffer is decreased and the pointer is set tonull
.- Parameters:
bufPtr
- a pointer to aGstBuffer
reference
-
clearBufferList
Clears a reference to aGstBufferList
.listPtr
must not benull
.If the reference is
null
then this function does nothing. Otherwise, the reference count of the list is decreased and the pointer is set tonull
.- Parameters:
listPtr
- a pointer to aGstBufferList
reference
-
clearCaps
Clears a reference to aGstCaps
.capsPtr
must not benull
.If the reference is
null
then this function does nothing. Otherwise, the reference count of the caps is decreased and the pointer is set tonull
.- Parameters:
capsPtr
- a pointer to aGstCaps
reference
-
clearContext
Clears a reference to aGstContext
.contextPtr
must not beNULL
.If the reference is
NULL
then this function does nothing. Otherwise, the reference count of the context is decreased and the pointer is set toNULL
.- Parameters:
contextPtr
- a pointer to aGstContext
reference
-
clearEvent
Clears a reference to aGstEvent
.eventPtr
must not benull
.If the reference is
null
then this function does nothing. Otherwise, the reference count of the event is decreased and the pointer is set tonull
.- Parameters:
eventPtr
- a pointer to aGstEvent
reference
-
clearMessage
Clears a reference to aGstMessage
.msgPtr
must not benull
.If the reference is
null
then this function does nothing. Otherwise, the reference count of the message is decreased and the pointer is set tonull
.- Parameters:
msgPtr
- a pointer to aGstMessage
reference
-
clearMiniObject
Clears a reference to aGstMiniObject
.objectPtr
must not benull
.If the reference is
null
then this function does nothing. Otherwise, the reference count of the object is decreased using gst_mini_object_unref() and the pointer is set tonull
.A macro is also included that allows this function to be used without pointer casts.
- Parameters:
objectPtr
- a pointer to aGstMiniObject
reference
-
clearObject
Clears a reference to aGstObject
.objectPtr
must not benull
.If the reference is
null
then this function does nothing. Otherwise, the reference count of the object is decreased using gst_object_unref() and the pointer is set tonull
.A macro is also included that allows this function to be used without pointer casts.
- Parameters:
objectPtr
- a pointer to aGstObject
reference
-
clearPromise
Clears a reference to aGstPromise
.promisePtr
must not beNULL
.If the reference is
NULL
then this function does nothing. Otherwise, the reference count of the promise is decreased and the pointer is set toNULL
.- Parameters:
promisePtr
- a pointer to aGstPromise
reference
-
clearQuery
Clears a reference to aGstQuery
.queryPtr
must not benull
.If the reference is
null
then this function does nothing. Otherwise, the reference count of the query is decreased and the pointer is set tonull
.- Parameters:
queryPtr
- a pointer to aGstQuery
reference
-
clearSample
Clears a reference to aGstSample
samplePtr
must not benull
.If the reference is
null
then this function does nothing. Otherwise, the reference count of the sample is decreased and the pointer is set tonull
.- Parameters:
samplePtr
- a pointer to aGstSample
reference
-
clearStructure
Clears a reference to aGstStructure
.structurePtr
must not benull
.If the reference is
null
then this function does nothing. Otherwise, the structure is free'd using gst_structure_free() and the pointer is set tonull
.A macro is also included that allows this function to be used without pointer casts.
- Parameters:
structurePtr
- a pointer to aGstStructure
reference
-
clearTagList
Clears a reference to aGstTagList
.taglistPtr
must not benull
.If the reference is
null
then this function does nothing. Otherwise, the reference count of the taglist is decreased and the pointer is set tonull
.- Parameters:
taglistPtr
- a pointer to aGstTagList
reference
-
clearUri
Clears a reference to aGstUri
.uriPtr
must not benull
.If the reference is
null
then this function does nothing. Otherwise, the reference count of the uri is decreased and the pointer is set tonull
.- Parameters:
uriPtr
- a pointer to aGstUri
reference
-
debugAddLogFunction
Adds the logging function to the list of logging functions. Be sure to useG_GNUC_NO_INSTRUMENT
on that function, it is needed.- Parameters:
func
- the function to use
-
debugAddRingBufferLogger
public static void debugAddRingBufferLogger(int maxSizePerThread, int threadTimeout) Adds a memory ringbuffer based debug logger that stores up tomaxSizePerThread
bytes of logs per thread and times out threads afterthreadTimeout
seconds of inactivity.Logs can be fetched with gst_debug_ring_buffer_logger_get_logs() and the logger can be removed again with gst_debug_remove_ring_buffer_logger(). Only one logger at a time is possible.
- Parameters:
maxSizePerThread
- Maximum size of log per thread in bytesthreadTimeout
- Timeout for threads in seconds
-
debugBinToDotData
To aid debugging applications one can use this method to obtain the whole network of gstreamer elements that form the pipeline into a dot file. This data can be processed with graphviz to get an image.- Parameters:
bin
- the top-level pipeline that should be analyzeddetails
- type ofGstDebugGraphDetails
to use- Returns:
- a string containing the pipeline in graphviz dot format.
-
debugBinToDotData
To aid debugging applications one can use this method to obtain the whole network of gstreamer elements that form the pipeline into a dot file. This data can be processed with graphviz to get an image.- Parameters:
bin
- the top-level pipeline that should be analyzeddetails
- type ofGstDebugGraphDetails
to use- Returns:
- a string containing the pipeline in graphviz dot format.
-
debugBinToDotFile
To aid debugging applications one can use this method to write out the whole network of gstreamer elements that form the pipeline into a dot file. This file can be processed with graphviz to get an image.dot -Tpng -oimage.png graph_lowlevel.dot
- Parameters:
bin
- the top-level pipeline that should be analyzeddetails
- type ofGstDebugGraphDetails
to usefileName
- output base filename (e.g. "myplayer")
-
debugBinToDotFile
To aid debugging applications one can use this method to write out the whole network of gstreamer elements that form the pipeline into a dot file. This file can be processed with graphviz to get an image.dot -Tpng -oimage.png graph_lowlevel.dot
- Parameters:
bin
- the top-level pipeline that should be analyzeddetails
- type ofGstDebugGraphDetails
to usefileName
- output base filename (e.g. "myplayer")
-
debugBinToDotFileWithTs
public static void debugBinToDotFileWithTs(Bin bin, Set<DebugGraphDetails> details, String fileName) This works like gst_debug_bin_to_dot_file(), but adds the current timestamp to the filename, so that it can be used to take multiple snapshots.- Parameters:
bin
- the top-level pipeline that should be analyzeddetails
- type ofGstDebugGraphDetails
to usefileName
- output base filename (e.g. "myplayer")
-
debugBinToDotFileWithTs
This works like gst_debug_bin_to_dot_file(), but adds the current timestamp to the filename, so that it can be used to take multiple snapshots.- Parameters:
bin
- the top-level pipeline that should be analyzeddetails
- type ofGstDebugGraphDetails
to usefileName
- output base filename (e.g. "myplayer")
-
debugConstructTermColor
Constructs a string that can be used for getting the desired color in color terminals. You need to free the string after use.- Parameters:
colorinfo
- the color info- Returns:
- a string containing the color definition
-
debugConstructWinColor
public static int debugConstructWinColor(int colorinfo) Constructs an integer that can be used for getting the desired color in windows' terminals (cmd.exe). As there is no mean to underline, we simply ignore this attribute.This function returns 0 on non-windows machines.
- Parameters:
colorinfo
- the color info- Returns:
- an integer containing the color definition
-
debugGetAllCategories
Returns a snapshot of a all categories that are currently in use . This list may change anytime. The caller has to free the list after use.- Returns:
- the list of debug categories
-
debugGetColorMode
Changes the coloring mode for debug output.- Returns:
- see
GstDebugColorMode
for possible values.
-
debugGetDefaultThreshold
Returns the default threshold that is used for new categories.- Returns:
- the default threshold level
-
debugGetStackTrace
-
debugGetStackTrace
-
debugIsActive
public static boolean debugIsActive()Checks if debugging output is activated.- Returns:
true
, if debugging is activated
-
debugIsColored
public static boolean debugIsColored()Checks if the debugging output should be colored.- Returns:
true
, if the debug output should be colored.
-
debugLog
public static void debugLog(DebugCategory category, DebugLevel level, String file, String function, int line, @Nullable @Nullable GObject object, String format, Object... varargs) Logs the given message using the currently registered debugging handlers.- Parameters:
category
- category to loglevel
- level of the message is infile
- the file that emitted the message, usually the __FILE__ identifierfunction
- the function that emitted the messageline
- the line from that the message was emitted, usually __LINE__object
- the object this message relates to, ornull
if noneformat
- a printf style format stringvarargs
- optional arguments for the format
-
debugLogDefault
public static void debugLogDefault(DebugCategory category, DebugLevel level, String file, String function, int line, @Nullable @Nullable GObject object, DebugMessage message, @Nullable @Nullable MemorySegment userData) The default logging handler used by GStreamer. Logging functions get called whenever a macro like GST_DEBUG or similar is used. By default this function is setup to output the message and additional info to stderr (or the log file specified via the GST_DEBUG_FILE environment variable) as received viauserData
.You can add other handlers by using gst_debug_add_log_function(). And you can remove this handler by calling gst_debug_remove_log_function(gst_debug_log_default);
- Parameters:
category
- category to loglevel
- level of the messagefile
- the file that emitted the message, usually the __FILE__ identifierfunction
- the function that emitted the messageline
- the line from that the message was emitted, usually __LINE__object
- the object this message relates to, ornull
if nonemessage
- the actual messageuserData
- the FILE* to log to
-
debugLogGetLine
public static String debugLogGetLine(DebugCategory category, DebugLevel level, String file, String function, int line, @Nullable @Nullable GObject object, DebugMessage message) Returns the string representation for the specified debug log message formatted in the same way as gst_debug_log_default() (the default handler), without color. The purpose is to make it easy for custom log output handlers to get a log output that is identical to what the default handler would write out.- Parameters:
category
- category to loglevel
- level of the messagefile
- the file that emitted the message, usually the __FILE__ identifierfunction
- the function that emitted the messageline
- the line from that the message was emitted, usually __LINE__object
- the object this message relates to, ornull
if nonemessage
- the actual message
-
debugLogId
public static void debugLogId(DebugCategory category, DebugLevel level, String file, String function, int line, @Nullable @Nullable String id, String format, Object... varargs) Logs the given message using the currently registered debugging handlers.- Parameters:
category
- category to loglevel
- level of the message is infile
- the file that emitted the message, usually the __FILE__ identifierfunction
- the function that emitted the messageline
- the line from that the message was emitted, usually __LINE__id
- the identifier of the object this message relates to, ornull
if none.format
- a printf style format stringvarargs
- optional arguments for the format
-
debugLogIdLiteral
public static void debugLogIdLiteral(DebugCategory category, DebugLevel level, String file, String function, int line, @Nullable @Nullable String id, String messageString) Logs the given message using the currently registered debugging handlers.- Parameters:
category
- category to loglevel
- level of the message is infile
- the file that emitted the message, usually the __FILE__ identifierfunction
- the function that emitted the messageline
- the line from that the message was emitted, usually __LINE__id
- the identifier of the object this message relates to ornull
if nonemessageString
- a message string
-
debugLogLiteral
public static void debugLogLiteral(DebugCategory category, DebugLevel level, String file, String function, int line, @Nullable @Nullable GObject object, String messageString) Logs the given message using the currently registered debugging handlers.- Parameters:
category
- category to loglevel
- level of the message is infile
- the file that emitted the message, usually the __FILE__ identifierfunction
- the function that emitted the messageline
- the line from that the message was emitted, usually __LINE__object
- the object this message relates to, ornull
if nonemessageString
- a message string
-
debugPrintStackTrace
public static void debugPrintStackTrace()If libunwind, glibc backtrace or DbgHelp are present a stack trace is printed. -
debugRemoveLogFunction
Removes all registered instances of the given logging functions.- Parameters:
func
- the log function to remove, ornull
to remove the default log function- Returns:
- How many instances of the function were removed
-
debugRemoveLogFunctionByData
Removes all registered instances of log functions with the given user data.- Parameters:
data
- user data of the log function to remove- Returns:
- How many instances of the function were removed
-
debugRemoveRingBufferLogger
public static void debugRemoveRingBufferLogger()Removes any previously added ring buffer logger with gst_debug_add_ring_buffer_logger(). -
debugRingBufferLoggerGetLogs
Fetches the current logs per thread from the ring buffer logger. See gst_debug_add_ring_buffer_logger() for details.- Returns:
- NULL-terminated array of strings with the debug output per thread
-
debugSetActive
public static void debugSetActive(boolean active) If activated, debugging messages are sent to the debugging handlers. It makes sense to deactivate it for speed issues.This function is not threadsafe. It makes sense to only call it
during initialization.- Parameters:
active
- Whether to use debugging output or not
-
debugSetColorMode
Changes the coloring mode for debug output.This function may be called before gst_init().
- Parameters:
mode
- The coloring mode for debug output. SeeGstDebugColorMode
.
-
debugSetColorModeFromString
Changes the coloring mode for debug output.This function may be called before gst_init().
- Parameters:
mode
- The coloring mode for debug output. One of the following: "on", "auto", "off", "disable", "unix".
-
debugSetColored
public static void debugSetColored(boolean colored) Sets or unsets the use of coloured debugging output. Same as gst_debug_set_color_mode () with the argument being being GST_DEBUG_COLOR_MODE_ON or GST_DEBUG_COLOR_MODE_OFF.This function may be called before gst_init().
- Parameters:
colored
- Whether to use colored output or not
-
debugSetDefaultThreshold
Sets the default threshold to the given level and updates all categories to use this threshold.This function may be called before gst_init().
- Parameters:
level
- level to set
-
debugSetThresholdForName
Sets all categories which match the given glob style pattern to the given level.- Parameters:
name
- name of the categories to setlevel
- level to set them to
-
debugSetThresholdFromString
Sets the debug logging wanted in the same form as with the GST_DEBUG environment variable. You can use wildcards such as*
, but note that the order matters when you use wild cards, e.g.foosrc:6,*src:3,*:2
sets everything to log level 2.- Parameters:
list
- comma-separated list of "category:level" pairs to be used as debug logging levelsreset
-true
to clear all previously-set debug levels before setting new thresholdsfalse
if adding the threshold described bylist
to the one already set.
-
debugUnsetThresholdForName
Resets all categories with the given name back to the default level.- Parameters:
name
- name of the categories to set
-
deinit
public static void deinit()Clean up any resources created by GStreamer in gst_init().It is normally not needed to call this function in a normal application as the resources will automatically be freed when the program terminates. This function is therefore mostly used by testsuites and other memory profiling tools.
After this call GStreamer (including this method) should not be used anymore.
-
dynamicTypeRegister
-
errorGetMessage
Get a string describing the error message in the current locale.- Parameters:
domain
- the GStreamer error domain this error belongs to.code
- the error code belonging to the domain.- Returns:
- a newly allocated string describing the error message (in UTF-8 encoding)
-
filenameToUri
Similar to g_filename_to_uri(), but attempts to handle relative file paths as well. Before convertingfilename
into an URI, it will be prefixed by the current working directory if it is a relative path, and then the path will be canonicalised so that it doesn't contain any './' or '../' segments.On Windows
filename
should be in UTF-8 encoding.- Parameters:
filename
- absolute or relative file name path- Returns:
- newly-allocated URI string, or NULL on error. The caller must free the URI string with g_free() when no longer needed.
- Throws:
GErrorException
- seeGError
-
flowGetName
Gets a string representing the given flow return.- Parameters:
ret
- aGstFlowReturn
to get the name of.- Returns:
- a static string with the name of the flow return.
-
flowToQuark
Get the unique quark for the given GstFlowReturn.- Parameters:
ret
- aGstFlowReturn
to get the quark of.- Returns:
- the quark associated with the flow return or 0 if an invalid return was specified.
-
formatsContains
-
getMainExecutablePath
This helper is mostly helpful for plugins that need to inspect the folder of the main executable to determine their set of features.When a plugin is initialized from the gst-plugin-scanner external process, the returned path will be the same as from the parent process.
- Returns:
- The path of the executable that
initialized GStreamer, or
null
if it could not be determined.
-
infoStrdupPrintf
Allocates, fills and returns a 0-terminated string from the printf styleformat
string and corresponding arguments.See gst_info_vasprintf() for when this function is required.
Free with g_free().
- Parameters:
format
- a printf style format stringvarargs
- the printf arguments forformat
- Returns:
- a newly allocated null terminated string or
null
on any error
-
init
Initializes the GStreamer library, setting up internal path lists, registering built-in elements, and loading standard plugins.Unless the plugin registry is disabled at compile time, the registry will be loaded. By default this will also check if the registry cache needs to be updated and rescan all plugins if needed. See gst_update_registry() for details and section <link linkend="gst-running">Running GStreamer Applications</link> for how to disable automatic registry updates.
WARNING: This function will terminate your program if it was unable to initialize GStreamer for some reason. If you want your program to fall back, use gst_init_check() instead.
- Parameters:
argv
- pointer to application's argv
-
initCheck
Initializes the GStreamer library, setting up internal path lists, registering built-in elements, and loading standard plugins.This function will return
false
if GStreamer could not be initialized for some reason. If you want your program to fail fatally, use gst_init() instead.- Parameters:
argv
- pointer to application's argv- Returns:
true
if GStreamer could be initialized.- Throws:
GErrorException
- seeGError
-
initGetOptionGroup
Returns aGOptionGroup
with GStreamer's argument specifications. The group is set up to use standard GOption callbacks, so when using this group in combination with GOption parsing methods, all argument parsing and initialization is automated.This function is useful if you want to integrate GStreamer with other libraries that use GOption (see g_option_context_add_group() ).
If you use this function, you should make sure you initialise the GLib threading system as one of the very first things in your program (see the example at the beginning of this section).
- Returns:
- a pointer to GStreamer's option group.
-
isCapsFeatures
Checks ifobj
is aGstCapsFeatures
- Returns:
true
ifobj
is aGstCapsFeatures
false
otherwise
-
isInitialized
public static boolean isInitialized()Use this function to check if GStreamer has been initialized with gst_init() or gst_init_check().- Returns:
true
if initialization has been done,false
otherwise.
-
macosMain
-
macosMainSimple
-
makeElementMessageDetails
-
paramSpecArray
public static ParamSpec paramSpecArray(String name, String nick, String blurb, ParamSpec elementSpec, Set<ParamFlags> flags) This function creates a GstArray GParamSpec for use by objects/elements that want to expose properties of GstArray type. This function is typically * used in connection with g_object_class_install_property() in a GObjects's instance_init function.- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedelementSpec
- GParamSpec of the arrayflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecArray
public static ParamSpec paramSpecArray(String name, String nick, String blurb, ParamSpec elementSpec, ParamFlags... flags) This function creates a GstArray GParamSpec for use by objects/elements that want to expose properties of GstArray type. This function is typically * used in connection with g_object_class_install_property() in a GObjects's instance_init function.- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedelementSpec
- GParamSpec of the arrayflags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecFraction
public static ParamSpec paramSpecFraction(String name, String nick, String blurb, int minNum, int minDenom, int maxNum, int maxDenom, int defaultNum, int defaultDenom, Set<ParamFlags> flags) This function creates a fraction GParamSpec for use by objects/elements that want to expose properties of fraction type. This function is typically used in connection with g_object_class_install_property() in a GObjects's instance_init function.- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminNum
- minimum value (fraction numerator)minDenom
- minimum value (fraction denominator)maxNum
- maximum value (fraction numerator)maxDenom
- maximum value (fraction denominator)defaultNum
- default value (fraction numerator)defaultDenom
- default value (fraction denominator)flags
- flags for the property specified- Returns:
- a newly created parameter specification
-
paramSpecFraction
public static ParamSpec paramSpecFraction(String name, String nick, String blurb, int minNum, int minDenom, int maxNum, int maxDenom, int defaultNum, int defaultDenom, ParamFlags... flags) This function creates a fraction GParamSpec for use by objects/elements that want to expose properties of fraction type. This function is typically used in connection with g_object_class_install_property() in a GObjects's instance_init function.- Parameters:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedminNum
- minimum value (fraction numerator)minDenom
- minimum value (fraction denominator)maxNum
- maximum value (fraction numerator)maxDenom
- maximum value (fraction denominator)defaultNum
- default value (fraction numerator)defaultDenom
- default value (fraction denominator)flags
- flags for the property specified- Returns:
- a newly created parameter specification
-
parentBufferMetaApiGetType
-
parseBinFromDescription
public static Bin parseBinFromDescription(String binDescription, boolean ghostUnlinkedPads) throws GErrorException This is a convenience wrapper around gst_parse_launch() to create aGstBin
from a gst-launch-style pipeline description. See gst_parse_launch() and the gst-launch man page for details about the syntax. Ghost pads on the bin for unlinked source or sink pads within the bin can automatically be created (but only a maximum of one ghost pad for each direction will be created; if you expect multiple unlinked source pads or multiple unlinked sink pads and want them all ghosted, you will have to create the ghost pads yourself).- Parameters:
binDescription
- command line describing the binghostUnlinkedPads
- whether to automatically create ghost pads for unlinked source or sink pads within the bin- Returns:
- a
newly-created bin, or
null
if an error occurred. - Throws:
GErrorException
- seeGError
-
parseBinFromDescriptionFull
public static Element parseBinFromDescriptionFull(String binDescription, boolean ghostUnlinkedPads, @Nullable @Nullable ParseContext context, Set<ParseFlags> flags) throws GErrorException This is a convenience wrapper around gst_parse_launch() to create aGstBin
from a gst-launch-style pipeline description. See gst_parse_launch() and the gst-launch man page for details about the syntax. Ghost pads on the bin for unlinked source or sink pads within the bin can automatically be created (but only a maximum of one ghost pad for each direction will be created; if you expect multiple unlinked source pads or multiple unlinked sink pads and want them all ghosted, you will have to create the ghost pads yourself).- Parameters:
binDescription
- command line describing the binghostUnlinkedPads
- whether to automatically create ghost pads for unlinked source or sink pads within the bincontext
- a parse context allocated with gst_parse_context_new(), ornull
flags
- parsing options, orGST_PARSE_FLAG_NONE
- Returns:
- a newly-created
element, which is guaranteed to be a bin unless
GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS
was passed, ornull
if an error occurred. - Throws:
GErrorException
- seeGError
-
parseBinFromDescriptionFull
public static Element parseBinFromDescriptionFull(String binDescription, boolean ghostUnlinkedPads, @Nullable @Nullable ParseContext context, ParseFlags... flags) throws GErrorException This is a convenience wrapper around gst_parse_launch() to create aGstBin
from a gst-launch-style pipeline description. See gst_parse_launch() and the gst-launch man page for details about the syntax. Ghost pads on the bin for unlinked source or sink pads within the bin can automatically be created (but only a maximum of one ghost pad for each direction will be created; if you expect multiple unlinked source pads or multiple unlinked sink pads and want them all ghosted, you will have to create the ghost pads yourself).- Parameters:
binDescription
- command line describing the binghostUnlinkedPads
- whether to automatically create ghost pads for unlinked source or sink pads within the bincontext
- a parse context allocated with gst_parse_context_new(), ornull
flags
- parsing options, orGST_PARSE_FLAG_NONE
- Returns:
- a newly-created
element, which is guaranteed to be a bin unless
GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS
was passed, ornull
if an error occurred. - Throws:
GErrorException
- seeGError
-
parseLaunch
Create a new pipeline based on command line syntax. Please note that you might get a return value that is notnull
even though theerror
is set. In this case there was a recoverable parsing error and you can try to play the pipeline.To create a sub-pipeline (bin) for embedding into an existing pipeline use gst_parse_bin_from_description().
- Parameters:
pipelineDescription
- the command line describing the pipeline- Returns:
- a new element on success,
null
on failure. If more than one toplevel element is specified by thepipelineDescription
, all elements are put into aGstPipeline
, which than is returned. - Throws:
GErrorException
- seeGError
-
parseLaunchFull
public static Element parseLaunchFull(String pipelineDescription, @Nullable @Nullable ParseContext context, Set<ParseFlags> flags) throws GErrorException Create a new pipeline based on command line syntax. Please note that you might get a return value that is notnull
even though theerror
is set. In this case there was a recoverable parsing error and you can try to play the pipeline.To create a sub-pipeline (bin) for embedding into an existing pipeline use gst_parse_bin_from_description_full().
- Parameters:
pipelineDescription
- the command line describing the pipelinecontext
- a parse context allocated with gst_parse_context_new(), ornull
flags
- parsing options, orGST_PARSE_FLAG_NONE
- Returns:
- a new element on success,
null
on failure. If more than one toplevel element is specified by thepipelineDescription
, all elements are put into aGstPipeline
, which then is returned (unless the GST_PARSE_FLAG_PLACE_IN_BIN flag is set, in which case they are put in aGstBin
instead). - Throws:
GErrorException
- seeGError
-
parseLaunchFull
public static Element parseLaunchFull(String pipelineDescription, @Nullable @Nullable ParseContext context, ParseFlags... flags) throws GErrorException Create a new pipeline based on command line syntax. Please note that you might get a return value that is notnull
even though theerror
is set. In this case there was a recoverable parsing error and you can try to play the pipeline.To create a sub-pipeline (bin) for embedding into an existing pipeline use gst_parse_bin_from_description_full().
- Parameters:
pipelineDescription
- the command line describing the pipelinecontext
- a parse context allocated with gst_parse_context_new(), ornull
flags
- parsing options, orGST_PARSE_FLAG_NONE
- Returns:
- a new element on success,
null
on failure. If more than one toplevel element is specified by thepipelineDescription
, all elements are put into aGstPipeline
, which then is returned (unless the GST_PARSE_FLAG_PLACE_IN_BIN flag is set, in which case they are put in aGstBin
instead). - Throws:
GErrorException
- seeGError
-
parseLaunchv
Create a new element based on command line syntax.error
will contain an error message if an erroneous pipeline is specified. An error does not mean that the pipeline could not be constructed.- Parameters:
argv
- null-terminated array of arguments- Returns:
- a new element on success and
null
on failure. - Throws:
GErrorException
- seeGError
-
parseLaunchvFull
public static Element parseLaunchvFull(String[] argv, @Nullable @Nullable ParseContext context, Set<ParseFlags> flags) throws GErrorException Create a new element based on command line syntax.error
will contain an error message if an erroneous pipeline is specified. An error does not mean that the pipeline could not be constructed.- Parameters:
argv
- null-terminated array of argumentscontext
- a parse context allocated with gst_parse_context_new(), ornull
flags
- parsing options, orGST_PARSE_FLAG_NONE
- Returns:
- a new element on success; on
failure, either
null
or a partially-constructed bin or element will be returned anderror
will be set (unless you passedGST_PARSE_FLAG_FATAL_ERRORS
inflags
, thennull
will always be returned on failure) - Throws:
GErrorException
- seeGError
-
parseLaunchvFull
public static Element parseLaunchvFull(String[] argv, @Nullable @Nullable ParseContext context, ParseFlags... flags) throws GErrorException Create a new element based on command line syntax.error
will contain an error message if an erroneous pipeline is specified. An error does not mean that the pipeline could not be constructed.- Parameters:
argv
- null-terminated array of argumentscontext
- a parse context allocated with gst_parse_context_new(), ornull
flags
- parsing options, orGST_PARSE_FLAG_NONE
- Returns:
- a new element on success; on
failure, either
null
or a partially-constructed bin or element will be returned anderror
will be set (unless you passedGST_PARSE_FLAG_FATAL_ERRORS
inflags
, thennull
will always be returned on failure) - Throws:
GErrorException
- seeGError
-
print
Outputs a formatted message via the GLib print handler. The default print handler simply outputs the message to stdout.This function will not append a new-line character at the end, unlike gst_println() which will.
All strings must be in ASCII or UTF-8 encoding.
This function differs from g_print() in that it supports all the additional printf specifiers that are supported by GStreamer's debug logging system, such as
GST_PTR_FORMAT
andGST_SEGMENT_FORMAT
.This function is primarily for printing debug output.
- Parameters:
format
- a printf style format stringvarargs
- the printf arguments forformat
-
printerr
Outputs a formatted message via the GLib error message handler. The default handler simply outputs the message to stderr.This function will not append a new-line character at the end, unlike gst_printerrln() which will.
All strings must be in ASCII or UTF-8 encoding.
This function differs from g_printerr() in that it supports the additional printf specifiers that are supported by GStreamer's debug logging system, such as
GST_PTR_FORMAT
andGST_SEGMENT_FORMAT
.This function is primarily for printing debug output.
- Parameters:
format
- a printf style format stringvarargs
- the printf arguments forformat
-
printerrln
Outputs a formatted message via the GLib error message handler. The default handler simply outputs the message to stderr.This function will append a new-line character at the end, unlike gst_printerr() which will not.
All strings must be in ASCII or UTF-8 encoding.
This function differs from g_printerr() in that it supports the additional printf specifiers that are supported by GStreamer's debug logging system, such as
GST_PTR_FORMAT
andGST_SEGMENT_FORMAT
.This function is primarily for printing debug output.
- Parameters:
format
- a printf style format stringvarargs
- the printf arguments forformat
-
println
Outputs a formatted message via the GLib print handler. The default print handler simply outputs the message to stdout.This function will append a new-line character at the end, unlike gst_print() which will not.
All strings must be in ASCII or UTF-8 encoding.
This function differs from g_print() in that it supports all the additional printf specifiers that are supported by GStreamer's debug logging system, such as
GST_PTR_FORMAT
andGST_SEGMENT_FORMAT
.This function is primarily for printing debug output.
- Parameters:
format
- a printf style format stringvarargs
- the printf arguments forformat
-
protectionFilterSystemsByAvailableDecryptors
Iterates the supplied list of UUIDs and checks the GstRegistry for all the decryptors supporting one of the supplied UUIDs.- Parameters:
systemIdentifiers
- A null terminated array of strings that contains the UUID values of each protection system that is to be checked.- Returns:
- A null terminated array containing all
the
systemIdentifiers
supported by the set of available decryptors, ornull
if no matches were found.
-
protectionMetaApiGetType
-
protectionSelectSystem
Iterates the supplied list of UUIDs and checks the GstRegistry for an element that supports one of the supplied UUIDs. If more than one element matches, the system ID of the highest ranked element is selected.- Parameters:
systemIdentifiers
- A null terminated array of strings that contains the UUID values of each protection system that is to be checked.- Returns:
- One of the strings from
systemIdentifiers
that indicates the highest ranked element that implements the protection system indicated by that system ID, ornull
if no element has been found.
-
referenceTimestampMetaApiGetType
-
segtrapIsEnabled
public static boolean segtrapIsEnabled()Some functions in the GStreamer core might install a custom SIGSEGV handler to better catch and report errors to the application. Currently this feature is enabled by default when loading plugins.Applications might want to disable this behaviour with the gst_segtrap_set_enabled() function. This is typically done if the application wants to install its own handler without GStreamer interfering.
- Returns:
true
if GStreamer is allowed to install a custom SIGSEGV handler.
-
segtrapSetEnabled
public static void segtrapSetEnabled(boolean enabled) Applications might want to disable/enable the SIGSEGV handling of the GStreamer core. See gst_segtrap_is_enabled() for more information.- Parameters:
enabled
- whether a custom SIGSEGV handler should be installed.
-
tagExists
Checks if the given type is already registered.- Parameters:
tag
- name of the tag- Returns:
true
if the type is already registered
-
tagGetDescription
-
tagGetFlag
-
tagGetNick
-
tagGetType
-
tagIsFixed
Checks if the given tag is fixed. A fixed tag can only contain one value. Unfixed tags can contain lists of values.- Parameters:
tag
- tag to check- Returns:
true
, if the given tag is fixed.
-
tagMergeStringsWithComma
This is a convenience function for the func argument of gst_tag_register(). It concatenates all given strings using a comma. The tag must be registered as a G_TYPE_STRING or this function will fail.- Parameters:
dest
- uninitialized GValue to store result insrc
- GValue to copy from
-
tagMergeUseFirst
-
tagRegister
public static void tagRegister(String name, TagFlag flag, Type type, String nick, String blurb, @Nullable @Nullable TagMergeFunc func) Registers a new tag type for the use with GStreamer's type system. If a type with that name is already registered, that one is used. The old registration may have used a different type however. So don't rely on your supplied values.Important: if you do not supply a merge function the implication will be that there can only be one single value for this tag in a tag list and any additional values will silently be discarded when being added (unless
GST_TAG_MERGE_REPLACE
,GST_TAG_MERGE_REPLACE_ALL
, orGST_TAG_MERGE_PREPEND
is used as merge mode, in which case the new value will replace the old one in the list).The merge function will be called from gst_tag_list_copy_value() when it is required that one or more values for a tag be condensed into one single value. This may happen from gst_tag_list_get_string(), gst_tag_list_get_int(), gst_tag_list_get_double() etc. What will happen exactly in that case depends on how the tag was registered and if a merge function was supplied and if so which one.
Two default merge functions are provided: gst_tag_merge_use_first() and gst_tag_merge_strings_with_comma().
- Parameters:
name
- the name or identifier stringflag
- a flag describing the type of tag infotype
- the type this data is innick
- human-readable nameblurb
- a human-readable description about this tagfunc
- function for merging multiple values of this tag, ornull
-
tagRegisterStatic
public static void tagRegisterStatic(String name, TagFlag flag, Type type, String nick, String blurb, @Nullable @Nullable TagMergeFunc func) Registers a new tag type for the use with GStreamer's type system.Same as gst_tag_register(), but
name
,nick
, andblurb
must be static strings or inlined strings, as they will not be copied. (GStreamer plugins will be made resident once loaded, so this function can be used even from dynamically loaded plugins.)- Parameters:
name
- the name or identifier string (string constant)flag
- a flag describing the type of tag infotype
- the type this data is innick
- human-readable name or short description (string constant)blurb
- a human-readable description for this tag (string constant)func
- function for merging multiple values of this tag, ornull
-
tracingGetActiveTracers
-
tracingRegisterHook
-
typeIsPluginApi
public static boolean typeIsPluginApi(Type type, @Nullable @Nullable Out<Set<PluginAPIFlags>> flags) Checks iftype
is plugin API. See gst_type_mark_as_plugin_api() for details.- Parameters:
type
- a GTypeflags
- WhatGstPluginAPIFlags
the plugin was marked with- Returns:
true
iftype
is plugin API orfalse
otherwise.
-
typeMarkAsPluginApi
Markstype
as plugin API. This should be called inclass_init
of elements that expose new types (i.e. enums, flags or internal GObjects) via properties, signals or pad templates.Types exposed by plugins are not automatically added to the documentation as they might originate from another library and should in that case be documented via that library instead.
By marking a type as plugin API it will be included in the documentation of the plugin that defines it.
- Parameters:
type
- a GTypeflags
- a set ofGstPluginAPIFlags
to further inform cache generation.
-
typeMarkAsPluginApi
Markstype
as plugin API. This should be called inclass_init
of elements that expose new types (i.e. enums, flags or internal GObjects) via properties, signals or pad templates.Types exposed by plugins are not automatically added to the documentation as they might originate from another library and should in that case be documented via that library instead.
By marking a type as plugin API it will be included in the documentation of the plugin that defines it.
- Parameters:
type
- a GTypeflags
- a set ofGstPluginAPIFlags
to further inform cache generation.
-
updateRegistry
public static boolean updateRegistry()Forces GStreamer to re-scan its plugin paths and update the default plugin registry.Applications will almost never need to call this function, it is only useful if the application knows new plugins have been installed (or old ones removed) since the start of the application (or, to be precise, the first call to gst_init()) and the application wants to make use of any newly-installed plugins without restarting the application.
Applications should assume that the registry update is neither atomic nor thread-safe and should therefore not have any dynamic pipelines running (including the playbin and decodebin elements) and should also not create any elements or access the GStreamer registry while the update is in progress.
Note that this function may block for a significant amount of time.
- Returns:
true
if the registry has been updated successfully (does not imply that there were changes), otherwisefalse
.
-
utilArrayBinarySearch
public static MemorySegment utilArrayBinarySearch(@Nullable @Nullable MemorySegment array, int numElements, long elementSize, CompareDataFunc searchFunc, SearchMode mode, @Nullable @Nullable MemorySegment searchData) Searches insidearray
forsearchData
by using the comparison functionsearchFunc
.array
must be sorted ascending.As
searchData
is always passed as second argument tosearchFunc
it's not required thatsearchData
has the same type as the array elements.The complexity of this search function is O(log (num_elements)).
- Parameters:
array
- the sorted input arraynumElements
- number of elements in the arrayelementSize
- size of every element in bytessearchFunc
- function to compare two elements,searchData
will always be passed as second argumentmode
- search mode that should be usedsearchData
- element that should be found- Returns:
- The address of the found
element or
null
if nothing was found
-
utilCeilLog2
public static int utilCeilLog2(int v) Return a max num of log2.- Parameters:
v
- aguint32
value.- Returns:
- a computed
guint
val.
-
utilDoubleToFraction
Transforms agdouble
to a fraction and simplifies the result.- Parameters:
src
-gdouble
to transformdestN
- pointer to agint
to hold the result numeratordestD
- pointer to agint
to hold the result denominator
-
utilDumpBuffer
Dumps the buffer memory into a hex representation. Useful for debugging.- Parameters:
buf
- aGstBuffer
whose memory to dump
-
utilDumpMem
public static void utilDumpMem(byte[] mem) Dumps the memory block into a hex representation. Useful for debugging.- Parameters:
mem
- a pointer to the memory to dump
-
utilFilenameCompare
-
utilFractionAdd
public static boolean utilFractionAdd(int aN, int aD, int bN, int bD, Out<Integer> resN, Out<Integer> resD) Adds the fractionsaN
/aD
andbN
/bD
and stores the result inresN
andresD
.- Parameters:
aN
- Numerator of first valueaD
- Denominator of first valuebN
- Numerator of second valuebD
- Denominator of second valueresN
- Pointer togint
to hold the result numeratorresD
- Pointer togint
to hold the result denominator- Returns:
false
on overflow,true
otherwise.
-
utilFractionCompare
public static int utilFractionCompare(int aN, int aD, int bN, int bD) Compares the fractionsaN
/aD
andbN
/bD
and returns -1 if a < b, 0 if a = b and 1 if a > b.- Parameters:
aN
- Numerator of first valueaD
- Denominator of first valuebN
- Numerator of second valuebD
- Denominator of second value- Returns:
- -1 if a < b; 0 if a = b; 1 if a > b.
-
utilFractionMultiply
public static boolean utilFractionMultiply(int aN, int aD, int bN, int bD, Out<Integer> resN, Out<Integer> resD) Multiplies the fractionsaN
/aD
andbN
/bD
and stores the result inresN
andresD
.- Parameters:
aN
- Numerator of first valueaD
- Denominator of first valuebN
- Numerator of second valuebD
- Denominator of second valueresN
- Pointer togint
to hold the result numeratorresD
- Pointer togint
to hold the result denominator- Returns:
false
on overflow,true
otherwise.
-
utilFractionToDouble
-
utilGdoubleToGuint64
public static long utilGdoubleToGuint64(double value) -
utilGetObjectArray
Get a property of typeGST_TYPE_ARRAY
and transform it into aGValueArray
. This allow language bindings to get GST_TYPE_ARRAY properties which are otherwise not an accessible type.- Parameters:
object
- the object to set the array toname
- the name of the property to setarray
- a returnGValueArray
-
utilGetTimestamp
Get a timestamp as GstClockTime to be used for interval measurements. The timestamp should not be interpreted in any other way.- Returns:
- the timestamp
-
utilGreatestCommonDivisor
public static int utilGreatestCommonDivisor(int a, int b) Calculates the greatest common divisor ofa
andb
.- Parameters:
a
- First value asgint
b
- Second value asgint
- Returns:
- Greatest common divisor of
a
andb
-
utilGreatestCommonDivisorInt64
public static long utilGreatestCommonDivisorInt64(long a, long b) Calculates the greatest common divisor ofa
andb
.- Parameters:
a
- First value asgint64
b
- Second value asgint64
- Returns:
- Greatest common divisor of
a
andb
-
utilGroupIdNext
public static int utilGroupIdNext()Return a constantly incrementing group id.This function is used to generate a new group-id for the stream-start event.
This function never returns
GST_GROUP_ID_INVALID
(which is 0)- Returns:
- A constantly incrementing unsigned integer, which might overflow back to 0 at some point.
-
utilGuint64ToGdouble
public static double utilGuint64ToGdouble(long value) -
utilSeqnumCompare
public static int utilSeqnumCompare(int s1, int s2) Compare two sequence numbers, handling wraparound.The current implementation just returns (gint32)(
s1
-s2
).- Parameters:
s1
- A sequence number.s2
- Another sequence number.- Returns:
- A negative number if
s1
is befores2
, 0 if they are equal, or a positive number ifs1
is afters2
.
-
utilSeqnumNext
public static int utilSeqnumNext()Return a constantly incrementing sequence number.This function is used internally to GStreamer to be able to determine which events and messages are "the same". For example, elements may set the seqnum on a segment-done message to be the same as that of the last seek event, to indicate that event and the message correspond to the same segment.
This function never returns
GST_SEQNUM_INVALID
(which is 0).- Returns:
- A constantly incrementing 32-bit unsigned integer, which might overflow at some point. Use gst_util_seqnum_compare() to make sure you handle wraparound correctly.
-
utilSetObjectArg
Converts the string value to the type of the objects argument and sets the argument with it.Note that this function silently returns if
object
has no property namedname
or whenvalue
cannot be converted to the type of the property.- Parameters:
object
- the object to set the argument ofname
- the name of the argument to setvalue
- the string value to set
-
utilSetObjectArray
Transfer aGValueArray
toGST_TYPE_ARRAY
and set this value on the specified property name. This allow language bindings to set GST_TYPE_ARRAY properties which are otherwise not an accessible type.- Parameters:
object
- the object to set the array toname
- the name of the property to setarray
- aGValueArray
containing the values
-
utilSetValueFromString
Converts the string to the type of the value and sets the value with it.Note that this function is dangerous as it does not return any indication if the conversion worked or not.
- Parameters:
value
- the value to setvalueStr
- the string to get the value from
-
utilSimplifyFraction
public static void utilSimplifyFraction(MemorySegment numerator, MemorySegment denominator, int nTerms, int threshold) Calculates the simpler representation ofnumerator
anddenominator
and update both values with the resulting simplified fraction.Simplify a fraction using a simple continued fraction decomposition. The idea here is to convert fractions such as 333333/10000000 to 1/30 using 32 bit arithmetic only. The algorithm is not perfect and relies upon two arbitrary parameters to remove non-significative terms from the simple continued fraction decomposition. Using 8 and 333 for
nTerms
andthreshold
respectively seems to give nice results.- Parameters:
numerator
- First value asgint
denominator
- Second value asgint
nTerms
- non-significative terms (typical value: 8)threshold
- threshold (typical value: 333)
-
utilUint64Scale
public static long utilUint64Scale(long val, long num, long denom) Scaleval
by the rational numbernum
/denom
, avoiding overflows and underflows and without loss of precision.This function can potentially be very slow if val and num are both greater than G_MAXUINT32.
- Parameters:
val
- the number to scalenum
- the numerator of the scale ratiodenom
- the denominator of the scale ratio- Returns:
val
*num
/denom
. In the case of an overflow, this function returns G_MAXUINT64. If the result is not exactly representable as an integer it is truncated. See also gst_util_uint64_scale_round(), gst_util_uint64_scale_ceil(), gst_util_uint64_scale_int(), gst_util_uint64_scale_int_round(), gst_util_uint64_scale_int_ceil().
-
utilUint64ScaleCeil
public static long utilUint64ScaleCeil(long val, long num, long denom) Scaleval
by the rational numbernum
/denom
, avoiding overflows and underflows and without loss of precision.This function can potentially be very slow if val and num are both greater than G_MAXUINT32.
- Parameters:
val
- the number to scalenum
- the numerator of the scale ratiodenom
- the denominator of the scale ratio- Returns:
val
*num
/denom
. In the case of an overflow, this function returns G_MAXUINT64. If the result is not exactly representable as an integer, it is rounded up. See also gst_util_uint64_scale(), gst_util_uint64_scale_round(), gst_util_uint64_scale_int(), gst_util_uint64_scale_int_round(), gst_util_uint64_scale_int_ceil().
-
utilUint64ScaleInt
public static long utilUint64ScaleInt(long val, int num, int denom) Scaleval
by the rational numbernum
/denom
, avoiding overflows and underflows and without loss of precision.num
must be non-negative anddenom
must be positive.- Parameters:
val
- guint64 (such as aGstClockTime
) to scale.num
- numerator of the scale factor.denom
- denominator of the scale factor.- Returns:
val
*num
/denom
. In the case of an overflow, this function returns G_MAXUINT64. If the result is not exactly representable as an integer, it is truncated. See also gst_util_uint64_scale_int_round(), gst_util_uint64_scale_int_ceil(), gst_util_uint64_scale(), gst_util_uint64_scale_round(), gst_util_uint64_scale_ceil().
-
utilUint64ScaleIntCeil
public static long utilUint64ScaleIntCeil(long val, int num, int denom) Scaleval
by the rational numbernum
/denom
, avoiding overflows and underflows and without loss of precision.num
must be non-negative anddenom
must be positive.- Parameters:
val
- guint64 (such as aGstClockTime
) to scale.num
- numerator of the scale factor.denom
- denominator of the scale factor.- Returns:
val
*num
/denom
. In the case of an overflow, this function returns G_MAXUINT64. If the result is not exactly representable as an integer, it is rounded up. See also gst_util_uint64_scale_int(), gst_util_uint64_scale_int_round(), gst_util_uint64_scale(), gst_util_uint64_scale_round(), gst_util_uint64_scale_ceil().
-
utilUint64ScaleIntRound
public static long utilUint64ScaleIntRound(long val, int num, int denom) Scaleval
by the rational numbernum
/denom
, avoiding overflows and underflows and without loss of precision.num
must be non-negative anddenom
must be positive.- Parameters:
val
- guint64 (such as aGstClockTime
) to scale.num
- numerator of the scale factor.denom
- denominator of the scale factor.- Returns:
val
*num
/denom
. In the case of an overflow, this function returns G_MAXUINT64. If the result is not exactly representable as an integer, it is rounded to the nearest integer (half-way cases are rounded up). See also gst_util_uint64_scale_int(), gst_util_uint64_scale_int_ceil(), gst_util_uint64_scale(), gst_util_uint64_scale_round(), gst_util_uint64_scale_ceil().
-
utilUint64ScaleRound
public static long utilUint64ScaleRound(long val, long num, long denom) Scaleval
by the rational numbernum
/denom
, avoiding overflows and underflows and without loss of precision.This function can potentially be very slow if val and num are both greater than G_MAXUINT32.
- Parameters:
val
- the number to scalenum
- the numerator of the scale ratiodenom
- the denominator of the scale ratio- Returns:
val
*num
/denom
. In the case of an overflow, this function returns G_MAXUINT64. If the result is not exactly representable as an integer, it is rounded to the nearest integer (half-way cases are rounded up). See also gst_util_uint64_scale(), gst_util_uint64_scale_ceil(), gst_util_uint64_scale_int(), gst_util_uint64_scale_int_round(), gst_util_uint64_scale_int_ceil().
-
valueCanCompare
-
valueCanIntersect
Determines if intersecting two values will produce a valid result. Two values will produce a valid intersection if they have the same type.- Parameters:
value1
- a value to intersectvalue2
- another value to intersect- Returns:
true
if the values can intersect
-
valueCanSubtract
-
valueCanUnion
Determines ifvalue1
andvalue2
can be non-trivially unioned. Any two values can be trivially unioned by adding both of them to a GstValueList. However, certain types have the possibility to be unioned in a simpler way. For example, an integer range and an integer can be unioned if the integer is a subset of the integer range. If there is the possibility that two values can be unioned, this function returnstrue
.- Parameters:
value1
- a value to unionvalue2
- another value to union- Returns:
true
if there is a function allowing the two values to be unioned.
-
valueCompare
Comparesvalue1
andvalue2
. Ifvalue1
andvalue2
cannot be compared, the function returns GST_VALUE_UNORDERED. Otherwise, ifvalue1
is greater thanvalue2
, GST_VALUE_GREATER_THAN is returned. Ifvalue1
is less thanvalue2
, GST_VALUE_LESS_THAN is returned. If the values are equal, GST_VALUE_EQUAL is returned.- Parameters:
value1
- a value to comparevalue2
- another value to compare- Returns:
- comparison result
-
valueDeserialize
Tries to deserialize a string into the type specified by the given GValue. If the operation succeeds,true
is returned,false
otherwise.- Parameters:
dest
-GValue
to fill with contents of deserializationsrc
- string to deserialize- Returns:
true
on success
-
valueDeserializeWithPspec
public static boolean valueDeserializeWithPspec(Value dest, String src, @Nullable @Nullable ParamSpec pspec) Tries to deserialize a string into the type specified by the given GValue.pspec
may be used to guide the deserializing of nested members. If the operation succeeds,true
is returned,false
otherwise.- Parameters:
dest
-GValue
to fill with contents of deserializationsrc
- string to deserializepspec
- theGParamSpec
describing the expected value- Returns:
true
on success
-
valueFixate
Fixatesrc
into a new valuedest
. For ranges, the first element is taken. For lists and arrays, the first item is fixated and returned. Ifsrc
is already fixed, this function returnsfalse
.- Parameters:
dest
- theGValue
destinationsrc
- theGValue
to fixate- Returns:
true
ifdest
contains a fixated version ofsrc
.
-
valueFractionMultiply
Multiplies the twoGValue
items containing aGST_TYPE_FRACTION
and setsproduct
to the product of the two fractions.- Parameters:
product
- a GValue initialized toGST_TYPE_FRACTION
factor1
- a GValue initialized toGST_TYPE_FRACTION
factor2
- a GValue initialized toGST_TYPE_FRACTION
- Returns:
false
in case of an error (like integer overflow),true
otherwise.
-
valueFractionSubtract
Subtracts thesubtrahend
from theminuend
and setsdest
to the result.- Parameters:
dest
- a GValue initialized toGST_TYPE_FRACTION
minuend
- a GValue initialized toGST_TYPE_FRACTION
subtrahend
- a GValue initialized toGST_TYPE_FRACTION
- Returns:
false
in case of an error (like integer overflow),true
otherwise.
-
valueGetBitmask
Gets the bitmask specified byvalue
.- Parameters:
value
- a GValue initialized toGST_TYPE_BITMASK
- Returns:
- the bitmask.
-
valueGetCaps
-
valueGetCapsFeatures
Gets the contents ofvalue
.- Parameters:
value
- a GValue initialized to GST_TYPE_CAPS_FEATURES- Returns:
- the contents of
value
-
valueGetDoubleRangeMax
Gets the maximum of the range specified byvalue
.- Parameters:
value
- a GValue initialized to GST_TYPE_DOUBLE_RANGE- Returns:
- the maximum of the range
-
valueGetDoubleRangeMin
Gets the minimum of the range specified byvalue
.- Parameters:
value
- a GValue initialized to GST_TYPE_DOUBLE_RANGE- Returns:
- the minimum of the range
-
valueGetFlagsetFlags
Retrieve the flags field of a GstFlagSetvalue
.- Parameters:
value
- a GValue initialized toGST_TYPE_FLAG_SET
- Returns:
- the flags field of the flagset instance.
-
valueGetFlagsetMask
Retrieve the mask field of a GstFlagSetvalue
.- Parameters:
value
- a GValue initialized toGST_TYPE_FLAG_SET
- Returns:
- the mask field of the flagset instance.
-
valueGetFractionDenominator
Gets the denominator of the fraction specified byvalue
.- Parameters:
value
- a GValue initialized toGST_TYPE_FRACTION
- Returns:
- the denominator of the fraction.
-
valueGetFractionNumerator
Gets the numerator of the fraction specified byvalue
.- Parameters:
value
- a GValue initialized toGST_TYPE_FRACTION
- Returns:
- the numerator of the fraction.
-
valueGetFractionRangeMax
-
valueGetFractionRangeMin
-
valueGetInt64RangeMax
Gets the maximum of the range specified byvalue
.- Parameters:
value
- a GValue initialized to GST_TYPE_INT64_RANGE- Returns:
- the maximum of the range
-
valueGetInt64RangeMin
Gets the minimum of the range specified byvalue
.- Parameters:
value
- a GValue initialized to GST_TYPE_INT64_RANGE- Returns:
- the minimum of the range
-
valueGetInt64RangeStep
Gets the step of the range specified byvalue
.- Parameters:
value
- a GValue initialized to GST_TYPE_INT64_RANGE- Returns:
- the step of the range
-
valueGetIntRangeMax
Gets the maximum of the range specified byvalue
.- Parameters:
value
- a GValue initialized to GST_TYPE_INT_RANGE- Returns:
- the maximum of the range
-
valueGetIntRangeMin
Gets the minimum of the range specified byvalue
.- Parameters:
value
- a GValue initialized to GST_TYPE_INT_RANGE- Returns:
- the minimum of the range
-
valueGetIntRangeStep
Gets the step of the range specified byvalue
.- Parameters:
value
- a GValue initialized to GST_TYPE_INT_RANGE- Returns:
- the step of the range
-
valueGetStructure
-
valueInitAndCopy
-
valueIntersect
Calculates the intersection of two values. If the values have a non-empty intersection, the value representing the intersection is placed indest
, unlessnull
. If the intersection is non-empty,dest
is not modified.- Parameters:
dest
- a uninitializedGValue
that will hold the calculated intersection value. May benull
if the resulting set if not needed.value1
- a value to intersectvalue2
- another value to intersect- Returns:
true
if the intersection is non-empty
-
valueIsFixed
Tests if the given GValue, if available in a GstStructure (or any other container) contains a "fixed" (which means: one value) or an "unfixed" (which means: multiple possible values, such as data lists or data ranges) value.- Parameters:
value
- theGValue
to check- Returns:
- true if the value is "fixed".
-
valueIsSubset
-
valueRegister
Registers functions to perform calculations onGValue
items of a given type. Each type can only be added once.- Parameters:
table
- structure containing functions to register
-
valueSerialize
tries to transform the givenvalue
into a string representation that allows getting back this string later on using gst_value_deserialize().Free-function: g_free
- Parameters:
value
- aGValue
to serialize- Returns:
- the serialization for
value
ornull
if none exists
-
valueSetBitmask
Setsvalue
to the bitmask specified bybitmask
.- Parameters:
value
- a GValue initialized toGST_TYPE_BITMASK
bitmask
- the bitmask
-
valueSetCaps
-
valueSetCapsFeatures
Sets the contents ofvalue
tofeatures
.- Parameters:
value
- a GValue initialized to GST_TYPE_CAPS_FEATURESfeatures
- the features to set the value to
-
valueSetDoubleRange
Setsvalue
to the range specified bystart
andend
.- Parameters:
value
- a GValue initialized to GST_TYPE_DOUBLE_RANGEstart
- the start of the rangeend
- the end of the range
-
valueSetFlagset
Setsvalue
to the flags and mask values provided inflags
andmask
. Theflags
value indicates the values of flags, themask
represents which bits in the flag value have been set, and which are "don't care"- Parameters:
value
- a GValue initialized toGST_TYPE_FLAG_SET
flags
- The value of the flags set or unsetmask
- The mask indicate which flags bits must match for comparisons
-
valueSetFraction
Setsvalue
to the fraction specified bynumerator
overdenominator
. The fraction gets reduced to the smallest numerator and denominator, and if necessary the sign is moved to the numerator.- Parameters:
value
- a GValue initialized toGST_TYPE_FRACTION
numerator
- the numerator of the fractiondenominator
- the denominator of the fraction
-
valueSetFractionRange
Setsvalue
to the range specified bystart
andend
.- Parameters:
value
- a GValue initialized to GST_TYPE_FRACTION_RANGEstart
- the start of the range (a GST_TYPE_FRACTION GValue)end
- the end of the range (a GST_TYPE_FRACTION GValue)
-
valueSetFractionRangeFull
public static void valueSetFractionRangeFull(Value value, int numeratorStart, int denominatorStart, int numeratorEnd, int denominatorEnd) Setsvalue
to the range specified bynumeratorStart
/denominatorStart
andnumeratorEnd
/denominatorEnd
.- Parameters:
value
- a GValue initialized to GST_TYPE_FRACTION_RANGEnumeratorStart
- the numerator start of the rangedenominatorStart
- the denominator start of the rangenumeratorEnd
- the numerator end of the rangedenominatorEnd
- the denominator end of the range
-
valueSetInt64Range
Setsvalue
to the range specified bystart
andend
.- Parameters:
value
- a GValue initialized to GST_TYPE_INT64_RANGEstart
- the start of the rangeend
- the end of the range
-
valueSetInt64RangeStep
Setsvalue
to the range specified bystart
,end
andstep
.- Parameters:
value
- a GValue initialized to GST_TYPE_INT64_RANGEstart
- the start of the rangeend
- the end of the rangestep
- the step of the range
-
valueSetIntRange
Setsvalue
to the range specified bystart
andend
.- Parameters:
value
- a GValue initialized to GST_TYPE_INT_RANGEstart
- the start of the rangeend
- the end of the range
-
valueSetIntRangeStep
Setsvalue
to the range specified bystart
,end
andstep
.- Parameters:
value
- a GValue initialized to GST_TYPE_INT_RANGEstart
- the start of the rangeend
- the end of the rangestep
- the step of the range
-
valueSetStructure
-
valueSubtract
public static boolean valueSubtract(@Nullable @Nullable Value dest, Value minuend, Value subtrahend) Subtractssubtrahend
fromminuend
and stores the result indest
. Note that this means subtraction as in sets, not as in mathematics.- Parameters:
dest
- the destination value for the result if the subtraction is not empty. May benull
, in which case the resulting set will not be computed, which can give a fair speedup.minuend
- the value to subtract fromsubtrahend
- the value to subtract- Returns:
true
if the subtraction is not empty
-
valueUnion
-
version
public static void version(Out<Integer> major, Out<Integer> minor, Out<Integer> micro, Out<Integer> nano) Gets the version number of the GStreamer library.- Parameters:
major
- pointer to a guint to store the major version numberminor
- pointer to a guint to store the minor version numbermicro
- pointer to a guint to store the micro version numbernano
- pointer to a guint to store the nano version number
-
versionString
This function returns a string that is useful for describing this version of GStreamer to the outside world: user agent strings, logging, ...- Returns:
- a newly allocated string describing this version of GStreamer.
-