Package ch.bailu.gtk.gst
Klasse Gst
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Package
ch.bailu.gtk.gst.Gst
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic interface
static interface
static interface
static interface
static interface
static interface
static interface
static interface
static interface
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic int
Gets the maximum amount of memory blocks that a buffer can hold.static CapsFeatures
capsFeaturesFromString
(Str features) Creates a #GstCapsFeatures from a string representation.static Caps
capsFromString
(Str string) Converts @caps from a string representation.static int
static void
debugAddLogFunction
(Gst.OnLogFunction func, Pointer user_data, Gst.OnDestroyNotify notify) Adds the logging function to the list of logging functions.static void
debugAddRingBufferLogger
(int max_size_per_thread, int thread_timeout) Adds a memory ringbuffer based debug logger that stores up to
@max_size_per_thread bytes of logs per thread and times out threads after
@thread_timeout seconds of inactivity.static Str
debugBinToDotData
(Bin bin, int 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, int details, Str file_name) 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, int details, Str file_name) 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 Str
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
Returns a snapshot of a all categories that are currently in use .static int
Changes the coloring mode for debug output.static int
Returns the default threshold that is used for new categories.static Str
debugGetStackTrace
(int flags) static boolean
Checks if debugging output is activated.static boolean
Checks if the debugging output should be colored.static Str
debugLevelGetName
(int level) Get the string representation of a debugging levelstatic void
debugLog
(DebugCategory category, int level, Str file, Str function, int line, Object object, Str format, Object... _ellipsis) Logs the given message using the currently registered debugging handlers.static void
debugLogDefault
(DebugCategory category, int level, Str file, Str function, int line, Object object, ch.bailu.gtk.gst.DebugMessage message, Pointer user_data) The default logging handler used by GStreamer.static Str
debugLogGetLine
(DebugCategory category, int level, Str file, Str function, int line, Object object, ch.bailu.gtk.gst.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, int level, Str file, Str function, int line, Str id, Str format, Object... _ellipsis) Logs the given message using the currently registered debugging handlers.static void
debugLogIdLiteral
(DebugCategory category, int level, Str file, Str function, int line, Str id, Str message_string) Logs the given message using the currently registered debugging handlers.static void
debugLogLiteral
(DebugCategory category, int level, Str file, Str function, int line, Object object, Str message_string) Logs the given message using the currently registered debugging handlers.static Str
debugPrintObject
(Pointer ptr) Returns a string that represents @ptr.static Str
debugPrintSegment
(Segment segment) Returns a string that represents @segments.static void
If libunwind, glibc backtrace or DbgHelp are present
a stack trace is printed.static int
Removes all registered instances of the given logging functions.static int
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 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
debugSetColorMode
(int mode) Changes the coloring mode for debug output.static void
Changes the coloring mode for debug output.static void
debugSetDefaultThreshold
(int level) Sets the default threshold to the given level and updates all categories to
use this threshold.static void
debugSetThresholdForName
(Str name, int level) Sets all categories which match the given glob style pattern to the given
level.static void
debugSetThresholdFromString
(Str 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, long type) Registers a new #GstDynamicTypeFactory in the registrystatic Str
errorGetMessage
(int domain, int code) Get a string describing the error message in the current locale.static int
eventTypeGetFlags
(int type) Gets the #GstEventTypeFlags associated with @type.static Str
eventTypeGetName
(int type) Get a printable name for the given event type.static int
eventTypeToQuark
(int type) Get the unique quark for the given event type.static int
eventTypeToStickyOrdering
(int type) Converts the #GstEventType to an unsigned integer that
represents the ordering of sticky events when re-sending them.static Str
filenameToUri
(Str filename) Similar to g_filename_to_uri(), but attempts to handle relative file paths
as well.static Str
flowGetName
(int ret) Gets a string representing the given flow return.static int
flowToQuark
(int ret) Get the unique quark for the given GstFlowReturn.static int
formatGetByNick
(Str nick) Return the format registered with the given nick.static FormatDefinition
formatGetDetails
(int format) Get details about the given format.static Str
formatGetName
(int format) Get a printable name for the given format.static Iterator
Iterate all the registered formats.static int
formatRegister
(Str nick, Str description) Create a new GstFormat based on the nick or return an
already registered format with that nick.static int
formatToQuark
(int format) Get the unique quark for the given format.static ClassHandler
static Str
This helper is mostly helpful for plugins that need to
inspect the folder of the main executable to determine
their set of features.static Str
infoStrdupPrintf
(Str format, Object... _ellipsis) Allocates, fills and returns a 0-terminated string from the printf style
@format 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 a #GOptionGroup with GStreamer's argument specifications.static boolean
isCapsFeatures
(Pointer obj) Checks if @obj is a #GstCapsFeaturesstatic boolean
Use this function to check if GStreamer has been initialized with gst_init()
or gst_init_check().static int
static Structure
makeElementMessageDetails
(Str name, Object... _ellipsis) Create a #GstStructure to be used with #gst_element_message_full_with_details.static Str
messageTypeGetName
(int type) Get a printable name for the given message type.static int
messageTypeToQuark
(int type) Get the unique quark for the given message type.static boolean
metaApiTypeHasTag
(long api, int tag) Check if @api was registered with @tag.static MetaInfo
metaGetInfo
(Str impl) Lookup a previously registered meta info structure by its implementation name
@impl.static MetaInfo
metaInfoNew
(long api, Str impl, long size) Creates a new structure that needs to be filled before being
registered.static MetaInfo
metaRegister
(long api, Str impl, long size, Gst.OnMetaInitFunction init_func, Gst.OnMetaFreeFunction free_func, Gst.OnMetaTransformFunction transform_func) Register a new #GstMeta implementation.static MetaInfo
metaRegisterCustomSimple
(Str name) Simplified version of gst_meta_register_custom(), with no tags and no
transform function.static Str
padModeGetName
(int mode) Return the name of a pad mode, for use in debug messages mostly.static ParamSpec
paramSpecArray
(Str name, Str nick, Str blurb, ParamSpec element_spec, int flags) This function creates a GstArray GParamSpec for use by objects/elements
that want to expose properties of GstArray type.static ParamSpec
paramSpecFraction
(Str name, Str nick, Str blurb, int min_num, int min_denom, int max_num, int max_denom, int default_num, int default_denom, int flags) This function creates a fraction GParamSpec for use by objects/elements
that want to expose properties of fraction type.static long
static MetaInfo
Gets the global #GstMetaInfo describing the #GstParentBufferMeta meta.static Bin
parseBinFromDescription
(Str bin_description, boolean ghost_unlinked_pads) This is a convenience wrapper around gst_parse_launch() to create a
#GstBin from a gst-launch-style pipeline description.static Element
parseBinFromDescriptionFull
(Str bin_description, boolean ghost_unlinked_pads, ParseContext context, int flags) This is a convenience wrapper around gst_parse_launch() to create a
#GstBin from a gst-launch-style pipeline description.static int
Get the error quark used by the parsing subsystem.static Element
parseLaunch
(Str pipeline_description) Create a new pipeline based on command line syntax.static Element
parseLaunchFull
(Str pipeline_description, ParseContext context, int flags) Create a new pipeline based on command line syntax.static int
Get the error quark.static ch.bailu.gtk.gst.Poll
pollNew
(boolean controllable) Create a new file descriptor set.static ch.bailu.gtk.gst.Poll
Create a new poll object that can be used for scheduling cancellable
timeouts.static Str
Gets the directory for application specific presets if set by the
application.static boolean
presetSetAppDir
(Str app_dir) Sets an extra directory as an absolute path that should be considered when
looking for presets.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
(Str format, Object... _ellipsis) Outputs a formatted message via the GLib error message handler.static void
Outputs a formatted message via the GLib print handler.static long
static MetaInfo
static int
queryTypeGetFlags
(int type) Gets the #GstQueryTypeFlags associated with @type.static Str
queryTypeGetName
(int type) Get a printable name for the given query type.static int
queryTypeToQuark
(int type) Get the unique quark for the given query type.static long
static MetaInfo
Gets the global #GstMetaInfo describing the #GstReferenceTimestampMeta meta.static int
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 Str
stateChangeGetName
(int transition) Gets a string representing the given state transition.static int
static Str
streamTypeGetName
(int stype) Get a descriptive string for a given #GstStreamTypestatic boolean
Checks if the given type is already registered.static Str
tagGetDescription
(Str tag) Returns the human-readable description of this tag, You must not change or
free this string.static int
tagGetFlag
(Str tag) Gets the flag of @tag.static Str
tagGetNick
(Str tag) Returns the human-readable name of this tag, You must not change or free
this string.static long
tagGetType
(Str tag) Gets the #GType used for this tag.static boolean
tagIsFixed
(Str tag) Checks if the given tag is fixed.static boolean
tagListCopyValue
(Value dest, TagList list, Str tag) Copies the contents for the given tag into the value,
merging multiple values into one if multiple values are associated
with the tag.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
(Str name, int flag, long type, Str nick, Str blurb, Gst.OnTagMergeFunc func) Registers a new tag type for the use with GStreamer's type system.static void
tagRegisterStatic
(Str name, int flag, long type, Str nick, Str blurb, Gst.OnTagMergeFunc func) Registers a new tag type for the use with GStreamer's type system.static Str
tocEntryTypeGetNick
(int type) Converts @type to a string representation.static List
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, Str detail, Gst.OnCallback func) Register @func to be called when the trace hook @detail is getting invoked.static boolean
typeFindRegister
(Plugin plugin, Str name, int rank, Gst.OnTypeFindFunction func, Str extensions, Caps possible_caps, Pointer data, Gst.OnDestroyNotify data_notify) Registers a new typefind function to be used for typefinding.static boolean
typeIsPluginApi
(long type, Int flags) Checks if @type is plugin API.static void
typeMarkAsPluginApi
(long type, int flags) Marks @type as plugin API.static boolean
Forces GStreamer to re-scan its plugin paths and update the default
plugin registry.static Str
uriConstruct
(Str protocol, Str location) Veraltet.static int
static Uri
uriFromString
(Str uri) Parses a URI string into a new #GstUri object.static Uri
uriFromStringEscaped
(Str uri) Parses a URI string into a new #GstUri object.static Str
uriGetLocation
(Str uri) Extracts the location out of a given valid URI, ie. the protocol and "://"
are stripped from the URI, which means that the location returned includes
the hostname if one is specified.static Str
uriGetProtocol
(Str uri) Extracts the protocol out of a given valid URI.static boolean
uriHasProtocol
(Str uri, Str protocol) Checks if the protocol of a given valid URI matches @protocol.static boolean
uriIsValid
(Str uri) Tests if the given string is a valid URI identifier.static Str
uriJoinStrings
(Str base_uri, Str ref_uri) This is a convenience function to join two URI strings and return the result.static boolean
uriProtocolIsSupported
(int type, Str protocol) Checks if an element exists that supports the given URI protocol.static boolean
uriProtocolIsValid
(Str protocol) Tests if the given string is a valid protocol identifier.static Pointer
utilArrayBinarySearch
(Pointer array, int num_elements, long element_size, Gst.OnCompareDataFunc search_func, int mode, Pointer search_data, Pointer user_data) Searches inside @array for @search_data by using the comparison function
@search_func.static int
utilCeilLog2
(int v) Returns smallest integral value not less than log2(v).static void
utilDoubleToFraction
(double src, Int dest_n, Int dest_d) Transforms a #gdouble to a fraction and simplifies
the result.static void
utilDumpBuffer
(Buffer buf) Dumps the buffer memory into a hex representation.static int
utilFilenameCompare
(Str a, Str b) Compares the given filenames using natural ordering.static int
utilFloorLog2
(int v) Returns smallest integral value not bigger than log2(v).static boolean
utilFractionAdd
(int a_n, int a_d, int b_n, int b_d, Int res_n, Int res_d) Adds the fractions @a_n/@a_d and @b_n/@b_d and stores
the result in @res_n and @res_d.static int
utilFractionCompare
(int a_n, int a_d, int b_n, int b_d) Compares the fractions @a_n/@a_d and @b_n/@b_d and returns
-1 if a < b, 0 if a = b and 1 if a > b.static boolean
utilFractionMultiply
(int a_n, int a_d, int b_n, int b_d, Int res_n, Int res_d) Multiplies the fractions @a_n/@a_d and @b_n/@b_d and stores
the result in @res_n and @res_d.static void
utilFractionToDouble
(int src_n, int src_d, Dbl dest) Transforms a fraction to a #gdouble.static long
utilGdoubleToGuint64
(double value) static long
Get a timestamp as GstClockTime to be used for interval measurements.static int
utilGreatestCommonDivisor
(int a, int b) Calculates the greatest common divisor of @a
and @b.static long
utilGreatestCommonDivisorInt64
(long a, long b) Calculates the greatest common divisor of @a
and @b.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
(Object object, Str name, Str value) Converts the string value to the type of the objects argument and
sets the argument with it.static boolean
utilSetObjectArray
(Object object, Str name, ValueArray array) Transfer a #GValueArray to %GST_TYPE_ARRAY and set this value on the
specified property name.static void
utilSetValueFromString
(Value value, Str value_str) Converts the string to the type of the value and
sets the value with it.static void
utilSimplifyFraction
(Int numerator, Int denominator, int n_terms, int threshold) Calculates the simpler representation of @numerator and @denominator and
update both values with the resulting simplified fraction.static long
utilUint64Scale
(long val, long num, long denom) Scale @val by the rational number @num / @denom, avoiding overflows and
underflows and without loss of precision.static long
utilUint64ScaleCeil
(long val, long num, long denom) Scale @val by the rational number @num / @denom, avoiding overflows and
underflows and without loss of precision.static long
utilUint64ScaleInt
(long val, int num, int denom) Scale @val by the rational number @num / @denom, avoiding overflows and
underflows and without loss of precision.static long
utilUint64ScaleIntCeil
(long val, int num, int denom) Scale @val by the rational number @num / @denom, avoiding overflows and
underflows and without loss of precision.static long
utilUint64ScaleIntRound
(long val, int num, int denom) Scale @val by the rational number @num / @denom, avoiding overflows and
underflows and without loss of precision.static long
utilUint64ScaleRound
(long val, long num, long denom) Scale @val by the rational number @num / @denom, avoiding overflows and
underflows and without loss of precision.static boolean
valueCanCompare
(Value value1, Value value2) Determines if @value1 and @value2 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 subtract @subtrahend from @minuend.static boolean
valueCanUnion
(Value value1, Value value2) Determines if @value1 and @value2 can be non-trivially unioned.static int
valueCompare
(Value value1, Value value2) Compares @value1 and @value2.static boolean
valueDeserialize
(Value dest, Str src) Tries to deserialize a string into the type specified by the given GValue.static boolean
valueDeserializeWithPspec
(Value dest, Str src, ParamSpec pspec) Tries to deserialize a string into the type specified by the given GValue.static boolean
valueFixate
(Value dest, Value src) Fixate @src into a new value @dest.static boolean
valueFractionMultiply
(Value product, Value factor1, Value factor2) Multiplies the two #GValue items containing a #GST_TYPE_FRACTION and sets
@product to the product of the two fractions.static boolean
valueFractionSubtract
(Value dest, Value minuend, Value subtrahend) Subtracts the @subtrahend from the @minuend and sets @dest to the result.static long
valueGetBitmask
(Value value) Gets the bitmask specified by @value.static Caps
valueGetCaps
(Value value) Gets the contents of @value.static CapsFeatures
valueGetCapsFeatures
(Value value) Gets the contents of @value.static double
valueGetDoubleRangeMax
(Value value) Gets the maximum of the range specified by @value.static double
valueGetDoubleRangeMin
(Value value) Gets the minimum of the range specified by @value.static int
valueGetFlagsetFlags
(Value value) Retrieve the flags field of a GstFlagSet @value.static int
valueGetFlagsetMask
(Value value) Retrieve the mask field of a GstFlagSet @value.static int
valueGetFractionDenominator
(Value value) Gets the denominator of the fraction specified by @value.static int
valueGetFractionNumerator
(Value value) Gets the numerator of the fraction specified by @value.static Value
valueGetFractionRangeMax
(Value value) Gets the maximum of the range specified by @value.static Value
valueGetFractionRangeMin
(Value value) Gets the minimum of the range specified by @value.static long
valueGetInt64RangeMax
(Value value) Gets the maximum of the range specified by @value.static long
valueGetInt64RangeMin
(Value value) Gets the minimum of the range specified by @value.static long
valueGetInt64RangeStep
(Value value) Gets the step of the range specified by @value.static int
valueGetIntRangeMax
(Value value) Gets the maximum of the range specified by @value.static int
valueGetIntRangeMin
(Value value) Gets the minimum of the range specified by @value.static int
valueGetIntRangeStep
(Value value) Gets the step of the range specified by @value.static Structure
valueGetStructure
(Value value) Gets the contents of @value.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
(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 that @value1 is a subset of @value2.static void
valueRegister
(ValueTable table) Registers functions to perform calculations on #GValue items of a given
type.static Str
valueSerialize
(Value value) tries to transform the given @value into a string representation that allows
getting back this string later on using gst_value_deserialize().static void
valueSetBitmask
(Value value, long bitmask) Sets @value to the bitmask specified by @bitmask.static void
valueSetCaps
(Value value, Caps caps) Sets the contents of @value to @caps.static void
valueSetCapsFeatures
(Value value, CapsFeatures features) Sets the contents of @value to @features.static void
valueSetDoubleRange
(Value value, double start, double end) Sets @value to the range specified by @start and @end.static void
valueSetFlagset
(Value value, int flags, int mask) Sets @value to the flags and mask values provided in @flags and @mask.static void
valueSetFraction
(Value value, int numerator, int denominator) Sets @value to the fraction specified by @numerator over @denominator.static void
valueSetFractionRange
(Value value, Value start, Value end) Sets @value to the range specified by @start and @end.static void
valueSetFractionRangeFull
(Value value, int numerator_start, int denominator_start, int numerator_end, int denominator_end) Sets @value to the range specified by @numerator_start/@denominator_start
and @numerator_end/@denominator_end.static void
valueSetInt64Range
(Value value, long start, long end) Sets @value to the range specified by @start and @end.static void
valueSetInt64RangeStep
(Value value, long start, long end, long step) Sets @value to the range specified by @start, @end and @step.static void
valueSetIntRange
(Value value, int start, int end) Sets @value to the range specified by @start and @end.static void
valueSetIntRangeStep
(Value value, int start, int end, int step) Sets @value to the range specified by @start, @end and @step.static void
valueSetStructure
(Value value, Structure structure) Sets the contents of @value to @structure.static boolean
valueSubtract
(Value dest, Value minuend, Value subtrahend) Subtracts @subtrahend from @minuend and stores the result in @dest.static boolean
valueUnion
(Value dest, Value value1, Value value2) Creates a GValue corresponding to the union of @value1 and @value2.static ch.bailu.gtk.gst.VecDeque
vecDequeNew
(long initial_size) Allocates a new #GstVecDeque object with an initial
queue size of @initial_size.static ch.bailu.gtk.gst.VecDeque
vecDequeNewForStruct
(long struct_size, long initial_size) Allocates a new #GstVecDeque object for elements (e.g. structures)
of size @struct_size, with an initial queue size of @initial_size.static Str
This function returns a string that is useful for describing this version
of GStreamer to the outside world: user agent strings, logging, ...Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
-
Konstruktordetails
-
Gst
public Gst()
-
-
Methodendetails
-
getClassHandler
-
bufferGetMaxMemory
public static int bufferGetMaxMemory()Gets the maximum amount of memory blocks that a buffer can hold. This is a
compile time constant that can be queried with the function.
When more memory blocks are added, existing memory blocks will be merged
together to make room for the new block.- Gibt zurück:
- the maximum amount of memory blocks that a buffer can hold.
-
capsFeaturesFromString
Creates a #GstCapsFeatures from a string representation.- Parameter:
features
- a string representation of a #GstCapsFeatures.- Gibt zurück:
- a new #GstCapsFeatures or %NULL when the string could not be parsed.
-
capsFromString
Converts @caps from a string representation.
The implementation of serialization up to 1.20 would lead to unexpected results
when there were nested #GstCaps / #GstStructure deeper than one level.- Parameter:
string
- a string to convert to #GstCaps- Gibt zurück:
- a newly allocated #GstCaps
-
coreErrorQuark
public static int coreErrorQuark()- Gibt zurück:
-
debugAddLogFunction
public static void debugAddLogFunction(Gst.OnLogFunction func, @Nullable Pointer user_data, Gst.OnDestroyNotify notify) Adds the logging function to the list of logging functions.
Be sure to use #G_GNUC_NO_INSTRUMENT on that function, it is needed.- Parameter:
func
- the function to useuser_data
- user datanotify
- called when @user_data is not used anymore
-
debugAddRingBufferLogger
public static void debugAddRingBufferLogger(int max_size_per_thread, int thread_timeout) Adds a memory ringbuffer based debug logger that stores up to
@max_size_per_thread bytes of logs per thread and times out threads after
@thread_timeout 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.- Parameter:
max_size_per_thread
- Maximum size of log per thread in bytesthread_timeout
- 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.- Parameter:
bin
- the top-level pipeline that should be analyzeddetails
- type of #GstDebugGraphDetails to use- Gibt zurück:
- 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.
``` shell
dot -Tpng -oimage.png graph_lowlevel.dot
```- Parameter:
bin
- the top-level pipeline that should be analyzeddetails
- type of #GstDebugGraphDetails to usefile_name
- 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.- Parameter:
bin
- the top-level pipeline that should be analyzeddetails
- type of #GstDebugGraphDetails to usefile_name
- 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.- Parameter:
colorinfo
- the color info- Gibt zurück:
- 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.- Parameter:
colorinfo
- the color info- Gibt zurück:
- 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.- Gibt zurück:
- the list of debug categories
-
debugGetColorMode
public static int debugGetColorMode()Changes the coloring mode for debug output.- Gibt zurück:
- see @GstDebugColorMode for possible values.
-
debugGetDefaultThreshold
public static int debugGetDefaultThreshold()Returns the default threshold that is used for new categories.- Gibt zurück:
- the default threshold level
-
debugGetStackTrace
- Parameter:
flags
- A set of #GstStackTraceFlags to determine how the stack trace should look like. Pass #GST_STACK_TRACE_SHOW_NONE to retrieve a minimal backtrace.- Gibt zurück:
- a stack trace, if libunwind or glibc backtrace are present, else %NULL.
-
debugIsActive
public static boolean debugIsActive()Checks if debugging output is activated.- Gibt zurück:
- %TRUE, if debugging is activated
-
debugIsColored
public static boolean debugIsColored()Checks if the debugging output should be colored.- Gibt zurück:
- %TRUE, if the debug output should be colored.
-
debugLevelGetName
Get the string representation of a debugging level- Parameter:
level
- the level to get the name for- Gibt zurück:
- the name
-
debugLog
public static void debugLog(@Nonnull DebugCategory category, int level, @Nonnull Str file, @Nonnull Str function, int line, @Nullable Object object, @Nonnull Str format, Object... _ellipsis) Logs the given message using the currently registered debugging handlers.- Parameter:
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, or %NULL if noneformat
- a printf style format string_ellipsis
- optional arguments for the format
-
debugLogDefault
public static void debugLogDefault(@Nonnull DebugCategory category, int level, @Nonnull Str file, @Nonnull Str function, int line, @Nullable Object object, @Nonnull ch.bailu.gtk.gst.DebugMessage message, @Nullable Pointer user_data) 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 via
@user_data.
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);- Parameter:
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, or %NULL if nonemessage
- the actual messageuser_data
- the FILE* to log to
-
debugLogGetLine
public static Str debugLogGetLine(@Nonnull DebugCategory category, int level, @Nonnull Str file, @Nonnull Str function, int line, @Nullable Object object, @Nonnull ch.bailu.gtk.gst.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.- Parameter:
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, or %NULL if nonemessage
- the actual message- Gibt zurück:
-
debugLogId
public static void debugLogId(@Nonnull DebugCategory category, int level, @Nonnull Str file, @Nonnull Str function, int line, @Nullable Str id, @Nonnull Str format, Object... _ellipsis) Logs the given message using the currently registered debugging handlers.- Parameter:
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, or %NULL if none.format
- a printf style format string_ellipsis
- optional arguments for the format
-
debugLogIdLiteral
public static void debugLogIdLiteral(@Nonnull DebugCategory category, int level, @Nonnull Str file, @Nonnull Str function, int line, @Nullable Str id, @Nonnull Str message_string) Logs the given message using the currently registered debugging handlers.- Parameter:
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 or %NULL if nonemessage_string
- a message string
-
debugLogLiteral
public static void debugLogLiteral(@Nonnull DebugCategory category, int level, @Nonnull Str file, @Nonnull Str function, int line, @Nullable Object object, @Nonnull Str message_string) Logs the given message using the currently registered debugging handlers.- Parameter:
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, or %NULL if nonemessage_string
- a message string
-
debugPrintObject
Returns a string that represents @ptr. This is safe to call with
%GstStructure, %GstCapsFeatures, %GstMiniObject s (e.g. %GstCaps,
%GstBuffer or %GstMessage), and %GObjects (e.g. %GstElement or %GstPad).
The string representation is meant to be used for debugging purposes and
might change between GStreamer versions.
Passing other kind of pointers might or might not work and is generally
unsafe to do.- Parameter:
ptr
- the object- Gibt zurück:
- a string containing a string representation of the object
-
debugPrintSegment
Returns a string that represents @segments.
The string representation is meant to be used for debugging purposes and
might change between GStreamer versions.- Parameter:
segment
- the %GstSegment- Gibt zurück:
- a string containing a string representation of the segment
-
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.- Parameter:
func
- the log function to remove, or %NULL to remove the default log function- Gibt zurück:
- How many instances of the function were removed
-
debugRemoveLogFunctionByData
Removes all registered instances of log functions with the given user data.- Parameter:
data
- user data of the log function to remove- Gibt zurück:
- 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(). -
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.- Parameter:
active
- Whether to use debugging output or not
-
debugSetColorMode
public static void debugSetColorMode(int mode) Changes the coloring mode for debug output.
This function may be called before gst_init().- Parameter:
mode
- The coloring mode for debug output. See @GstDebugColorMode.
-
debugSetColorModeFromString
Changes the coloring mode for debug output.
This function may be called before gst_init().- Parameter:
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().- Parameter:
colored
- Whether to use colored output or not
-
debugSetDefaultThreshold
public static void debugSetDefaultThreshold(int level) Sets the default threshold to the given level and updates all categories to
use this threshold.
This function may be called before gst_init().- Parameter:
level
- level to set
-
debugSetThresholdForName
Sets all categories which match the given glob style pattern to the given
level.- Parameter:
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.- Parameter:
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 thresholds %FALSE if adding the threshold described by @list to the one already set.
-
debugUnsetThresholdForName
Resets all categories with the given name back to the default level.- Parameter:
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
Registers a new #GstDynamicTypeFactory in the registry- Parameter:
plugin
- The #GstPlugin to register @dyn_type fortype
- The #GType to register dynamically- Gibt zurück:
-
errorGetMessage
Get a string describing the error message in the current locale.- Parameter:
domain
- the GStreamer error domain this error belongs to.code
- the error code belonging to the domain.- Gibt zurück:
- a newly allocated string describing the error message (in UTF-8 encoding)
-
eventTypeGetFlags
public static int eventTypeGetFlags(int type) Gets the #GstEventTypeFlags associated with @type.- Parameter:
type
- a #GstEventType- Gibt zurück:
- a #GstEventTypeFlags.
-
eventTypeGetName
Get a printable name for the given event type. Do not modify or free.- Parameter:
type
- the event type- Gibt zurück:
- a reference to the static name of the event.
-
eventTypeToQuark
public static int eventTypeToQuark(int type) Get the unique quark for the given event type.- Parameter:
type
- the event type- Gibt zurück:
- the quark associated with the event type
-
eventTypeToStickyOrdering
public static int eventTypeToStickyOrdering(int type) Converts the #GstEventType to an unsigned integer that
represents the ordering of sticky events when re-sending them.
A lower value represents a higher-priority event.- Parameter:
type
- a #GstEventType- Gibt zurück:
- an unsigned integer
-
filenameToUri
Similar to g_filename_to_uri(), but attempts to handle relative file paths
as well. Before converting @filename 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.- Parameter:
filename
- absolute or relative file name path- Gibt zurück:
- newly-allocated URI string, or NULL on error. The caller must free the URI string with g_free() when no longer needed.
- Löst aus:
AllocationError
-
flowGetName
Gets a string representing the given flow return.- Parameter:
ret
- a #GstFlowReturn to get the name of.- Gibt zurück:
- a static string with the name of the flow return.
-
flowToQuark
public static int flowToQuark(int ret) Get the unique quark for the given GstFlowReturn.- Parameter:
ret
- a #GstFlowReturn to get the quark of.- Gibt zurück:
- the quark associated with the flow return or 0 if an invalid return was specified.
-
formatGetByNick
Return the format registered with the given nick.- Parameter:
nick
- The nick of the format- Gibt zurück:
- The format with @nick or GST_FORMAT_UNDEFINED if the format was not registered.
-
formatGetDetails
Get details about the given format.- Parameter:
format
- The format to get details of- Gibt zurück:
- The #GstFormatDefinition for @format or %NULL on failure. MT safe.
-
formatGetName
Get a printable name for the given format. Do not modify or free.- Parameter:
format
- a #GstFormat- Gibt zurück:
- a reference to the static name of the format or %NULL if the format is unknown.
-
formatIterateDefinitions
Iterate all the registered formats. The format definition is read
only.- Gibt zurück:
- a GstIterator of #GstFormatDefinition.
-
formatRegister
Create a new GstFormat based on the nick or return an
already registered format with that nick.- Parameter:
nick
- The nick of the new formatdescription
- The description of the new format- Gibt zurück:
- A new GstFormat or an already registered format with the same nick. MT safe.
-
formatToQuark
public static int formatToQuark(int format) Get the unique quark for the given format.- Parameter:
format
- a #GstFormat- Gibt zurück:
- the quark associated with the format or 0 if the format is unknown.
-
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.- Gibt zurück:
- 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 style
@format string and corresponding arguments.
See gst_info_vasprintf() for when this function is required.
Free with g_free().- Parameter:
format
- a printf style format string_ellipsis
- the printf arguments for @format- Gibt zurück:
- 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.- Parameter:
argc
- pointer to application's argcargv
- 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.- Parameter:
argc
- pointer to application's argcargv
- pointer to application's argv- Gibt zurück:
- %TRUE if GStreamer could be initialized.
- Löst aus:
AllocationError
-
initGetOptionGroup
Returns a #GOptionGroup 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).- Gibt zurück:
- a pointer to GStreamer's option group.
-
isCapsFeatures
Checks if @obj is a #GstCapsFeatures- Parameter:
obj
-- Gibt zurück:
- %TRUE if @obj is a #GstCapsFeatures %FALSE otherwise
-
isInitialized
public static boolean isInitialized()Use this function to check if GStreamer has been initialized with gst_init()
or gst_init_check().- Gibt zurück:
- %TRUE if initialization has been done, %FALSE otherwise.
-
libraryErrorQuark
public static int libraryErrorQuark()- Gibt zurück:
-
makeElementMessageDetails
Create a #GstStructure to be used with #gst_element_message_full_with_details.
%NULL terminator required.- Parameter:
name
- Name of the first field to set_ellipsis
- variable arguments in the same form as #GstStructure- Gibt zurück:
-
messageTypeGetName
Get a printable name for the given message type. Do not modify or free.- Parameter:
type
- the message type- Gibt zurück:
- a reference to the static name of the message.
-
messageTypeToQuark
public static int messageTypeToQuark(int type) Get the unique quark for the given message type.- Parameter:
type
- the message type- Gibt zurück:
- the quark associated with the message type
-
metaApiTypeHasTag
public static boolean metaApiTypeHasTag(long api, int tag) Check if @api was registered with @tag.- Parameter:
api
- an APItag
- the tag to check- Gibt zurück:
- %TRUE if @api was registered with @tag.
-
metaGetInfo
Lookup a previously registered meta info structure by its implementation name
@impl.- Parameter:
impl
- the name- Gibt zurück:
- a #GstMetaInfo with @impl, or %NULL when no such metainfo exists.
-
metaInfoNew
Creates a new structure that needs to be filled before being
registered. This structure should filled and then registered with
gst_meta_info_register().
Example:
```c
const GstMetaInfo *
gst_my_meta_get_info (void)
{
static const GstMetaInfo *meta_info = NULL;
if (g_once_init_enter ((GstMetaInfo **) & meta_info)) {
GstMetaInfo *info = gst_meta_info_new (
gst_my_meta_api_get_type (),
"GstMyMeta",
sizeof (GstMyMeta));
const GstMetaInfo *meta = NULL;
info->init_func = my_meta_init;
info->free_func = my_meta_free;
info->transform_func = my_meta_transform;
info->serialize_func = my_meta_serialize;
info->deserialize_func = my_meta_deserialize;
meta = gst_meta_info_register (info);
g_once_init_leave ((GstMetaInfo **) & meta_info, (GstMetaInfo *) meta);
}
return meta_info;
}
```- Parameter:
api
- the type of the #GstMeta APIimpl
- the name of the #GstMeta implementationsize
- the size of the #GstMeta structure- Gibt zurück:
- a new #GstMetaInfo that needs to be filled
-
metaRegister
public static MetaInfo metaRegister(long api, @Nonnull Str impl, long size, Gst.OnMetaInitFunction init_func, Gst.OnMetaFreeFunction free_func, Gst.OnMetaTransformFunction transform_func) Register a new #GstMeta implementation.
The same @info can be retrieved later with gst_meta_get_info() by using
@impl as the key.- Parameter:
api
- the type of the #GstMeta APIimpl
- the name of the #GstMeta implementationsize
- the size of the #GstMeta structureinit_func
- a #GstMetaInitFunctionfree_func
- a #GstMetaFreeFunctiontransform_func
- a #GstMetaTransformFunction- Gibt zurück:
- a #GstMetaInfo that can be used to access metadata.
-
metaRegisterCustomSimple
Simplified version of gst_meta_register_custom(), with no tags and no
transform function.- Parameter:
name
- the name of the #GstMeta implementation- Gibt zurück:
- a #GstMetaInfo that can be used to access metadata.
-
padModeGetName
Return the name of a pad mode, for use in debug messages mostly.- Parameter:
mode
- the pad mode- Gibt zurück:
- short mnemonic for pad mode @mode
-
paramSpecArray
public static ParamSpec paramSpecArray(@Nonnull Str name, @Nonnull Str nick, @Nonnull Str blurb, @Nonnull ParamSpec element_spec, int 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.- Parameter:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedelement_spec
- GParamSpec of the arrayflags
- flags for the property specified- Gibt zurück:
- a newly created parameter specification
-
paramSpecFraction
public static ParamSpec paramSpecFraction(@Nonnull Str name, @Nonnull Str nick, @Nonnull Str blurb, int min_num, int min_denom, int max_num, int max_denom, int default_num, int default_denom, int 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.- Parameter:
name
- canonical name of the property specifiednick
- nick name for the property specifiedblurb
- description of the property specifiedmin_num
- minimum value (fraction numerator)min_denom
- minimum value (fraction denominator)max_num
- maximum value (fraction numerator)max_denom
- maximum value (fraction denominator)default_num
- default value (fraction numerator)default_denom
- default value (fraction denominator)flags
- flags for the property specified- Gibt zurück:
- a newly created parameter specification
-
parentBufferMetaApiGetType
public static long parentBufferMetaApiGetType()- Gibt zurück:
-
parentBufferMetaGetInfo
Gets the global #GstMetaInfo describing the #GstParentBufferMeta meta.- Gibt zurück:
- The #GstMetaInfo
-
parseBinFromDescription
public static Bin parseBinFromDescription(@Nonnull Str bin_description, boolean ghost_unlinked_pads) throws AllocationError This is a convenience wrapper around gst_parse_launch() to create a
#GstBin 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).- Parameter:
bin_description
- command line describing the binghost_unlinked_pads
- whether to automatically create ghost pads for unlinked source or sink pads within the bin- Gibt zurück:
- a newly-created bin, or %NULL if an error occurred.
- Löst aus:
AllocationError
-
parseBinFromDescriptionFull
public static Element parseBinFromDescriptionFull(@Nonnull Str bin_description, boolean ghost_unlinked_pads, @Nullable ParseContext context, int flags) throws AllocationError This is a convenience wrapper around gst_parse_launch() to create a
#GstBin 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).- Parameter:
bin_description
- command line describing the binghost_unlinked_pads
- whether to automatically create ghost pads for unlinked source or sink pads within the bincontext
- a parse context allocated with gst_parse_context_new(), or %NULLflags
- parsing options, or #GST_PARSE_FLAG_NONE- Gibt zurück:
- a newly-created element, which is guaranteed to be a bin unless #GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS was passed, or %NULL if an error occurred.
- Löst aus:
AllocationError
-
parseErrorQuark
public static int parseErrorQuark()Get the error quark used by the parsing subsystem.- Gibt zurück:
- the quark of the parse errors.
-
parseLaunch
Create a new pipeline based on command line syntax.
Please note that you might get a return value that is not %NULL even though
the @error 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().- Parameter:
pipeline_description
- the command line describing the pipeline- Gibt zurück:
- a new element on success, %NULL on failure. If more than one toplevel element is specified by the @pipeline_description, all elements are put into a #GstPipeline, which than is returned.
- Löst aus:
AllocationError
-
parseLaunchFull
public static Element parseLaunchFull(@Nonnull Str pipeline_description, @Nullable ParseContext context, int flags) throws AllocationError Create a new pipeline based on command line syntax.
Please note that you might get a return value that is not %NULL even though
the @error 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().- Parameter:
pipeline_description
- the command line describing the pipelinecontext
- a parse context allocated with gst_parse_context_new(), or %NULLflags
- parsing options, or #GST_PARSE_FLAG_NONE- Gibt zurück:
- a new element on success, %NULL on failure. If more than one toplevel element is specified by the @pipeline_description, all elements are put into a #GstPipeline, which then is returned (unless the GST_PARSE_FLAG_PLACE_IN_BIN flag is set, in which case they are put in a #GstBin instead).
- Löst aus:
AllocationError
-
pluginErrorQuark
public static int pluginErrorQuark()Get the error quark.- Gibt zurück:
- The error quark used in GError messages
-
pollNew
public static ch.bailu.gtk.gst.Poll pollNew(boolean controllable) Create a new file descriptor set. If @controllable, it
is possible to restart or flush a call to gst_poll_wait() with
gst_poll_restart() and gst_poll_set_flushing() respectively.
Free-function: gst_poll_free- Parameter:
controllable
- whether it should be possible to control a wait.- Gibt zurück:
- a new #GstPoll, or %NULL in case of an error. Free with gst_poll_free().
-
pollNewTimer
public static ch.bailu.gtk.gst.Poll pollNewTimer()Create a new poll object that can be used for scheduling cancellable
timeouts.
A timeout is performed with gst_poll_wait(). Multiple timeouts can be
performed from different threads.
Free-function: gst_poll_free- Gibt zurück:
- a new #GstPoll, or %NULL in case of an error. Free with gst_poll_free().
-
presetGetAppDir
Gets the directory for application specific presets if set by the
application.- Gibt zurück:
- the directory or %NULL, don't free or modify the string
-
presetSetAppDir
Sets an extra directory as an absolute path that should be considered when
looking for presets. Any presets in the application dir will shadow the
system presets.- Parameter:
app_dir
- the application specific preset dir- Gibt zurück:
- %TRUE for success, %FALSE if the dir already has been set
-
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 and #GST_SEGMENT_FORMAT.
This function is primarily for printing debug output.- Parameter:
format
- a printf style format string_ellipsis
- the printf arguments for @format
-
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 and #GST_SEGMENT_FORMAT.
This function is primarily for printing debug output.- Parameter:
format
- a printf style format string_ellipsis
- the printf arguments for @format
-
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 and #GST_SEGMENT_FORMAT.
This function is primarily for printing debug output.- Parameter:
format
- a printf style format string_ellipsis
- the printf arguments for @format
-
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 and #GST_SEGMENT_FORMAT.
This function is primarily for printing debug output.- Parameter:
format
- a printf style format string_ellipsis
- the printf arguments for @format
-
protectionMetaApiGetType
public static long protectionMetaApiGetType()- Gibt zurück:
-
protectionMetaGetInfo
- Gibt zurück:
-
queryTypeGetFlags
public static int queryTypeGetFlags(int type) Gets the #GstQueryTypeFlags associated with @type.- Parameter:
type
- a #GstQueryType- Gibt zurück:
- a #GstQueryTypeFlags.
-
queryTypeGetName
Get a printable name for the given query type. Do not modify or free.- Parameter:
type
- the query type- Gibt zurück:
- a reference to the static name of the query.
-
queryTypeToQuark
public static int queryTypeToQuark(int type) Get the unique quark for the given query type.- Parameter:
type
- the query type- Gibt zurück:
- the quark associated with the query type
-
referenceTimestampMetaApiGetType
public static long referenceTimestampMetaApiGetType()- Gibt zurück:
-
referenceTimestampMetaGetInfo
Gets the global #GstMetaInfo describing the #GstReferenceTimestampMeta meta.- Gibt zurück:
- The #GstMetaInfo
-
resourceErrorQuark
public static int resourceErrorQuark()- Gibt zurück:
-
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.- Gibt zurück:
- %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.- Parameter:
enabled
- whether a custom SIGSEGV handler should be installed.
-
stateChangeGetName
Gets a string representing the given state transition.- Parameter:
transition
- a #GstStateChange to get the name of.- Gibt zurück:
- a string with the name of the state result.
-
streamErrorQuark
public static int streamErrorQuark()- Gibt zurück:
-
streamTypeGetName
Get a descriptive string for a given #GstStreamType- Parameter:
stype
- a #GstStreamType- Gibt zurück:
- A string describing the stream type
-
tagExists
Checks if the given type is already registered.- Parameter:
tag
- name of the tag- Gibt zurück:
- %TRUE if the type is already registered
-
tagGetDescription
Returns the human-readable description of this tag, You must not change or
free this string.- Parameter:
tag
- the tag- Gibt zurück:
- the human-readable description of this tag
-
tagGetFlag
Gets the flag of @tag.- Parameter:
tag
- the tag- Gibt zurück:
- the flag of this tag.
-
tagGetNick
Returns the human-readable name of this tag, You must not change or free
this string.- Parameter:
tag
- the tag- Gibt zurück:
- the human-readable name of this tag
-
tagGetType
Gets the #GType used for this tag.- Parameter:
tag
- the tag- Gibt zurück:
- the #GType of this tag
-
tagIsFixed
Checks if the given tag is fixed. A fixed tag can only contain one value.
Unfixed tags can contain lists of values.- Parameter:
tag
- tag to check- Gibt zurück:
- %TRUE, if the given tag is fixed.
-
tagListCopyValue
public static boolean tagListCopyValue(@Nonnull Value dest, @Nonnull TagList list, @Nonnull Str tag) Copies the contents for the given tag into the value,
merging multiple values into one if multiple values are associated
with the tag.
You must g_value_unset() the value after use.- Parameter:
dest
- uninitialized #GValue to copy intolist
- list to get the tag fromtag
- tag to read out- Gibt zurück:
- %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list.
-
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.- Parameter:
dest
- uninitialized GValue to store result insrc
- GValue to copy from
-
tagMergeUseFirst
This is a convenience function for the func argument of gst_tag_register().
It creates a copy of the first value from the list.- Parameter:
dest
- uninitialized GValue to store result insrc
- GValue to copy from
-
tagRegister
public static void tagRegister(@Nonnull Str name, int flag, long type, @Nonnull Str nick, @Nonnull Str blurb, Gst.OnTagMergeFunc 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, or
#GST_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().- Parameter:
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, or %NULL
-
tagRegisterStatic
public static void tagRegisterStatic(@Nonnull Str name, int flag, long type, @Nonnull Str nick, @Nonnull Str blurb, Gst.OnTagMergeFunc func) Registers a new tag type for the use with GStreamer's type system.
Same as gst_tag_register(), but @name, @nick, and @blurb 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.)- Parameter:
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, or %NULL
-
tocEntryTypeGetNick
Converts @type to a string representation.- Parameter:
type
- a #GstTocEntryType.- Gibt zurück:
- Returns a human-readable string for @type. This string is only for debugging purpose and should not be displayed in a user interface.
-
tracingGetActiveTracers
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.- Gibt zurück:
- A #GList of #GstTracer objects
-
tracingRegisterHook
public static void tracingRegisterHook(@Nonnull Tracer tracer, @Nonnull Str detail, Gst.OnCallback func) Register @func to be called when the trace hook @detail is getting invoked.
Use %NULL for @detail to register to all hooks.- Parameter:
tracer
- the tracerdetail
- the detailed hookfunc
- the callback
-
typeFindRegister
public static boolean typeFindRegister(@Nullable Plugin plugin, @Nonnull Str name, int rank, Gst.OnTypeFindFunction func, @Nullable Str extensions, @Nullable Caps possible_caps, @Nullable Pointer data, Gst.OnDestroyNotify data_notify) Registers a new typefind function to be used for typefinding. After
registering this function will be available for typefinding.
This function is typically called during an element's plugin initialization.- Parameter:
plugin
- A #GstPlugin, or %NULL for a static typefind functionname
- The name for registeringrank
- The rank (or importance) of this typefind functionfunc
- The #GstTypeFindFunction to useextensions
- Optional comma-separated list of extensions that could belong to this typepossible_caps
- Optionally the caps that could be returned when typefinding succeedsdata
- Optional user data. This user data must be available until the plugin is unloaded.data_notify
- a #GDestroyNotify that will be called on @data when the plugin is unloaded.- Gibt zurück:
- %TRUE on success, %FALSE otherwise
-
typeIsPluginApi
Checks if @type is plugin API. See gst_type_mark_as_plugin_api() for
details.- Parameter:
type
- a GTypeflags
- What #GstPluginAPIFlags the plugin was marked with- Gibt zurück:
- %TRUE if @type is plugin API or %FALSE otherwise.
-
typeMarkAsPluginApi
public static void typeMarkAsPluginApi(long type, int flags) Marks @type as plugin API. This should be called in `class_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.- Parameter:
type
- a GTypeflags
- a set of #GstPluginAPIFlags 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.- Gibt zurück:
- %TRUE if the registry has been updated successfully (does not imply that there were changes), otherwise %FALSE.
-
uriConstruct
Veraltet.Constructs a URI for a given valid protocol and location.
Free-function: g_free- Parameter:
protocol
- Protocol for URIlocation
- Location for URI- Gibt zurück:
- a new string for this URI.
-
uriErrorQuark
public static int uriErrorQuark()- Gibt zurück:
-
uriFromString
Parses a URI string into a new #GstUri object. Will return NULL if the URI
cannot be parsed.- Parameter:
uri
- The URI string to parse.- Gibt zurück:
- A new #GstUri object, or NULL.
-
uriFromStringEscaped
Parses a URI string into a new #GstUri object. Will return NULL if the URI
cannot be parsed. This is identical to gst_uri_from_string() except that
the userinfo and fragment components of the URI will not be unescaped while
parsing.
Use this when you need to extract a username and password from the userinfo
such as https://user:password@example.com since either may contain
a URI-escaped ':' character. gst_uri_from_string() will unescape the entire
userinfo component, which will make it impossible to know which ':'
delineates the username and password.
The same applies to the fragment component of the URI, such as
https://example.com/path#fragment which may contain a URI-escaped '#'.- Parameter:
uri
- The URI string to parse.- Gibt zurück:
- A new #GstUri object, or NULL.
-
uriGetLocation
Extracts the location out of a given valid URI, ie. the protocol and "://"
are stripped from the URI, which means that the location returned includes
the hostname if one is specified. The returned string must be freed using
g_free().
Free-function: g_free- Parameter:
uri
- A URI string- Gibt zurück:
- the location for this URI. Returns %NULL if the URI isn't valid. If the URI does not contain a location, an empty string is returned.
-
uriGetProtocol
Extracts the protocol out of a given valid URI. The returned string must be
freed using g_free().- Parameter:
uri
- A URI string- Gibt zurück:
- The protocol for this URI.
-
uriHasProtocol
Checks if the protocol of a given valid URI matches @protocol.- Parameter:
uri
- a URI stringprotocol
- a protocol string (e.g. "http")- Gibt zurück:
- %TRUE if the protocol matches.
-
uriIsValid
Tests if the given string is a valid URI identifier. URIs start with a valid
scheme followed by ":" and maybe a string identifying the location.- Parameter:
uri
- A URI string- Gibt zurück:
- %TRUE if the string is a valid URI
-
uriJoinStrings
This is a convenience function to join two URI strings and return the result.
The returned string should be g_free()'d after use.- Parameter:
base_uri
- The percent-encoded base URI.ref_uri
- The percent-encoded reference URI to join to the @base_uri.- Gibt zurück:
- A string representing the percent-encoded join of the two URIs.
-
uriProtocolIsSupported
Checks if an element exists that supports the given URI protocol. Note
that a positive return value does not imply that a subsequent call to
gst_element_make_from_uri() is guaranteed to work.- Parameter:
type
- Whether to check for a source or a sinkprotocol
- Protocol that should be checked for (e.g. "http" or "smb")- Gibt zurück:
- %TRUE
-
uriProtocolIsValid
Tests if the given string is a valid protocol identifier. Protocols
must consist of alphanumeric characters, '+', '-' and '.' and must
start with a alphabetic character. See RFC 3986 Section 3.1.- Parameter:
protocol
- A string- Gibt zurück:
- %TRUE if the string is a valid protocol identifier, %FALSE otherwise.
-
utilArrayBinarySearch
public static Pointer utilArrayBinarySearch(@Nullable Pointer array, int num_elements, long element_size, Gst.OnCompareDataFunc search_func, int mode, @Nullable Pointer search_data, @Nullable Pointer user_data) Searches inside @array for @search_data by using the comparison function
@search_func. @array must be sorted ascending.
As @search_data is always passed as second argument to @search_func it's
not required that @search_data has the same type as the array elements.
The complexity of this search function is O(log (num_elements)).- Parameter:
array
- the sorted input arraynum_elements
- number of elements in the arrayelement_size
- size of every element in bytessearch_func
- function to compare two elements, @search_data will always be passed as second argumentmode
- search mode that should be usedsearch_data
- element that should be founduser_data
- data to pass to @search_func- Gibt zurück:
- The address of the found element or %NULL if nothing was found
-
utilCeilLog2
public static int utilCeilLog2(int v) Returns smallest integral value not less than log2(v).- Parameter:
v
- a #guint32 value.- Gibt zurück:
- a computed #guint val.
-
utilDoubleToFraction
Transforms a #gdouble to a fraction and simplifies
the result.- Parameter:
src
- #gdouble to transformdest_n
- pointer to a #gint to hold the result numeratordest_d
- pointer to a #gint to hold the result denominator
-
utilDumpBuffer
Dumps the buffer memory into a hex representation. Useful for debugging.- Parameter:
buf
- a #GstBuffer whose memory to dump
-
utilFilenameCompare
Compares the given filenames using natural ordering.- Parameter:
a
- a filename to compare with @bb
- a filename to compare with @a- Gibt zurück:
-
utilFloorLog2
public static int utilFloorLog2(int v) Returns smallest integral value not bigger than log2(v).- Parameter:
v
- a #guint32 value.- Gibt zurück:
- a computed #guint val.
-
utilFractionAdd
public static boolean utilFractionAdd(int a_n, int a_d, int b_n, int b_d, @Nonnull Int res_n, @Nonnull Int res_d) Adds the fractions @a_n/@a_d and @b_n/@b_d and stores
the result in @res_n and @res_d.- Parameter:
a_n
- Numerator of first valuea_d
- Denominator of first valueb_n
- Numerator of second valueb_d
- Denominator of second valueres_n
- Pointer to #gint to hold the result numeratorres_d
- Pointer to #gint to hold the result denominator- Gibt zurück:
- %FALSE on overflow, %TRUE otherwise.
-
utilFractionCompare
public static int utilFractionCompare(int a_n, int a_d, int b_n, int b_d) Compares the fractions @a_n/@a_d and @b_n/@b_d and returns
-1 if a < b, 0 if a = b and 1 if a > b.- Parameter:
a_n
- Numerator of first valuea_d
- Denominator of first valueb_n
- Numerator of second valueb_d
- Denominator of second value- Gibt zurück:
- -1 if a < b; 0 if a = b; 1 if a > b.
-
utilFractionMultiply
public static boolean utilFractionMultiply(int a_n, int a_d, int b_n, int b_d, @Nonnull Int res_n, @Nonnull Int res_d) Multiplies the fractions @a_n/@a_d and @b_n/@b_d and stores
the result in @res_n and @res_d.- Parameter:
a_n
- Numerator of first valuea_d
- Denominator of first valueb_n
- Numerator of second valueb_d
- Denominator of second valueres_n
- Pointer to #gint to hold the result numeratorres_d
- Pointer to #gint to hold the result denominator- Gibt zurück:
- %FALSE on overflow, %TRUE otherwise.
-
utilFractionToDouble
Transforms a fraction to a #gdouble.- Parameter:
src_n
- Fraction numerator as #gintsrc_d
- Fraction denominator #gintdest
- pointer to a #gdouble for the result
-
utilGdoubleToGuint64
public static long utilGdoubleToGuint64(double value) - Parameter:
value
- The #gdouble value to convert guint64 double- Gibt zurück:
- @value casted to #guint64
-
utilGetTimestamp
public static long utilGetTimestamp()Get a timestamp as GstClockTime to be used for interval measurements.
The timestamp should not be interpreted in any other way.- Gibt zurück:
- the timestamp
-
utilGreatestCommonDivisor
public static int utilGreatestCommonDivisor(int a, int b) Calculates the greatest common divisor of @a
and @b.- Parameter:
a
- First value as #gintb
- Second value as #gint- Gibt zurück:
- Greatest common divisor of @a and @b
-
utilGreatestCommonDivisorInt64
public static long utilGreatestCommonDivisorInt64(long a, long b) Calculates the greatest common divisor of @a
and @b.- Parameter:
a
- First value as #gint64b
- Second value as #gint64- Gibt zurück:
- Greatest common divisor of @a and @b
-
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)- Gibt zurück:
- A constantly incrementing unsigned integer, which might overflow back to 0 at some point.
-
utilGuint64ToGdouble
public static double utilGuint64ToGdouble(long value) - Parameter:
value
- The #guint64 value to convert to double- Gibt zurück:
- @value casted to #gdouble
-
utilSeqnumCompare
public static int utilSeqnumCompare(int s1, int s2) Compare two sequence numbers, handling wraparound.
The current implementation just returns (gint32)(@s1 - @s2).- Parameter:
s1
- A sequence number.s2
- Another sequence number.- Gibt zurück:
- A negative number if @s1 is before @s2, 0 if they are equal, or a positive number if @s1 is after @s2.
-
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).- Gibt zurück:
- 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 named
@name or when @value cannot be converted to the type of the property.- Parameter:
object
- the object to set the argument ofname
- the name of the argument to setvalue
- the string value to set
-
utilSetObjectArray
public static boolean utilSetObjectArray(@Nonnull Object object, @Nonnull Str name, @Nonnull ValueArray array) Transfer a #GValueArray to %GST_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.- Parameter:
object
- the object to set the array toname
- the name of the property to setarray
- a #GValueArray containing the values- Gibt zurück:
-
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.- Parameter:
value
- the value to setvalue_str
- the string to get the value from
-
utilSimplifyFraction
public static void utilSimplifyFraction(@Nonnull Int numerator, @Nonnull Int denominator, int n_terms, int threshold) Calculates the simpler representation of @numerator and @denominator 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
@n_terms and @threshold respectively seems to give nice results.- Parameter:
numerator
- First value as #gintdenominator
- Second value as #gintn_terms
- non-significative terms (typical value: 8)threshold
- threshold (typical value: 333)
-
utilUint64Scale
public static long utilUint64Scale(long val, long num, long denom) Scale @val by the rational number @num / @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.- Parameter:
val
- the number to scalenum
- the numerator of the scale ratiodenom
- the denominator of the scale ratio- Gibt zurück:
- @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) Scale @val by the rational number @num / @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.- Parameter:
val
- the number to scalenum
- the numerator of the scale ratiodenom
- the denominator of the scale ratio- Gibt zurück:
- @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) Scale @val by the rational number @num / @denom, avoiding overflows and
underflows and without loss of precision. @num must be non-negative and
@denom must be positive.- Parameter:
val
- guint64 (such as a #GstClockTime) to scale.num
- numerator of the scale factor.denom
- denominator of the scale factor.- Gibt zurück:
- @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) Scale @val by the rational number @num / @denom, avoiding overflows and
underflows and without loss of precision. @num must be non-negative and
@denom must be positive.- Parameter:
val
- guint64 (such as a #GstClockTime) to scale.num
- numerator of the scale factor.denom
- denominator of the scale factor.- Gibt zurück:
- @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) Scale @val by the rational number @num / @denom, avoiding overflows and
underflows and without loss of precision. @num must be non-negative and
@denom must be positive.- Parameter:
val
- guint64 (such as a #GstClockTime) to scale.num
- numerator of the scale factor.denom
- denominator of the scale factor.- Gibt zurück:
- @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) Scale @val by the rational number @num / @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.- Parameter:
val
- the number to scalenum
- the numerator of the scale ratiodenom
- the denominator of the scale ratio- Gibt zurück:
- @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
Determines if @value1 and @value2 can be compared.- Parameter:
value1
- a value to comparevalue2
- another value to compare- Gibt zurück:
- %TRUE if the values can be compared
-
valueCanIntersect
Determines if intersecting two values will produce a valid result.
Two values will produce a valid intersection if they have the same
type.- Parameter:
value1
- a value to intersectvalue2
- another value to intersect- Gibt zurück:
- %TRUE if the values can intersect
-
valueCanSubtract
Checks if it's possible to subtract @subtrahend from @minuend.- Parameter:
minuend
- the value to subtract fromsubtrahend
- the value to subtract- Gibt zurück:
- %TRUE if a subtraction is possible
-
valueCanUnion
Determines if @value1 and @value2 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 returns %TRUE.- Parameter:
value1
- a value to unionvalue2
- another value to union- Gibt zurück:
- %TRUE if there is a function allowing the two values to be unioned.
-
valueCompare
Compares @value1 and @value2. If @value1 and @value2 cannot be
compared, the function returns GST_VALUE_UNORDERED. Otherwise,
if @value1 is greater than @value2, GST_VALUE_GREATER_THAN is returned.
If @value1 is less than @value2, GST_VALUE_LESS_THAN is returned.
If the values are equal, GST_VALUE_EQUAL is returned.- Parameter:
value1
- a value to comparevalue2
- another value to compare- Gibt zurück:
- 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.- Parameter:
dest
- #GValue to fill with contents of deserializationsrc
- string to deserialize- Gibt zurück:
- %TRUE on success
-
valueDeserializeWithPspec
public static boolean valueDeserializeWithPspec(@Nonnull Value dest, @Nonnull Str src, @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.- Parameter:
dest
- #GValue to fill with contents of deserializationsrc
- string to deserializepspec
- the #GParamSpec describing the expected value- Gibt zurück:
- %TRUE on success
-
valueFixate
Fixate @src into a new value @dest.
For ranges, the first element is taken. For lists and arrays, the
first item is fixated and returned.
If @src is already fixed, this function returns %FALSE.- Parameter:
dest
- the #GValue destinationsrc
- the #GValue to fixate- Gibt zurück:
- %TRUE if @dest contains a fixated version of @src.
-
valueFractionMultiply
public static boolean valueFractionMultiply(@Nonnull Value product, @Nonnull Value factor1, @Nonnull Value factor2) Multiplies the two #GValue items containing a #GST_TYPE_FRACTION and sets
@product to the product of the two fractions.- Parameter:
product
- a GValue initialized to #GST_TYPE_FRACTIONfactor1
- a GValue initialized to #GST_TYPE_FRACTIONfactor2
- a GValue initialized to #GST_TYPE_FRACTION- Gibt zurück:
- %FALSE in case of an error (like integer overflow), %TRUE otherwise.
-
valueFractionSubtract
public static boolean valueFractionSubtract(@Nonnull Value dest, @Nonnull Value minuend, @Nonnull Value subtrahend) Subtracts the @subtrahend from the @minuend and sets @dest to the result.- Parameter:
dest
- a GValue initialized to #GST_TYPE_FRACTIONminuend
- a GValue initialized to #GST_TYPE_FRACTIONsubtrahend
- a GValue initialized to #GST_TYPE_FRACTION- Gibt zurück:
- %FALSE in case of an error (like integer overflow), %TRUE otherwise.
-
valueGetBitmask
Gets the bitmask specified by @value.- Parameter:
value
- a GValue initialized to #GST_TYPE_BITMASK- Gibt zurück:
- the bitmask.
-
valueGetCaps
Gets the contents of @value. The reference count of the returned
#GstCaps will not be modified, therefore the caller must take one
before getting rid of the @value.- Parameter:
value
- a GValue initialized to GST_TYPE_CAPS- Gibt zurück:
- the contents of @value
-
valueGetCapsFeatures
Gets the contents of @value.- Parameter:
value
- a GValue initialized to GST_TYPE_CAPS_FEATURES- Gibt zurück:
- the contents of @value
-
valueGetDoubleRangeMax
Gets the maximum of the range specified by @value.- Parameter:
value
- a GValue initialized to GST_TYPE_DOUBLE_RANGE- Gibt zurück:
- the maximum of the range
-
valueGetDoubleRangeMin
Gets the minimum of the range specified by @value.- Parameter:
value
- a GValue initialized to GST_TYPE_DOUBLE_RANGE- Gibt zurück:
- the minimum of the range
-
valueGetFlagsetFlags
Retrieve the flags field of a GstFlagSet @value.- Parameter:
value
- a GValue initialized to #GST_TYPE_FLAG_SET- Gibt zurück:
- the flags field of the flagset instance.
-
valueGetFlagsetMask
Retrieve the mask field of a GstFlagSet @value.- Parameter:
value
- a GValue initialized to #GST_TYPE_FLAG_SET- Gibt zurück:
- the mask field of the flagset instance.
-
valueGetFractionDenominator
Gets the denominator of the fraction specified by @value.- Parameter:
value
- a GValue initialized to #GST_TYPE_FRACTION- Gibt zurück:
- the denominator of the fraction.
-
valueGetFractionNumerator
Gets the numerator of the fraction specified by @value.- Parameter:
value
- a GValue initialized to #GST_TYPE_FRACTION- Gibt zurück:
- the numerator of the fraction.
-
valueGetFractionRangeMax
Gets the maximum of the range specified by @value.- Parameter:
value
- a GValue initialized to GST_TYPE_FRACTION_RANGE- Gibt zurück:
- the maximum of the range
-
valueGetFractionRangeMin
Gets the minimum of the range specified by @value.- Parameter:
value
- a GValue initialized to GST_TYPE_FRACTION_RANGE- Gibt zurück:
- the minimum of the range
-
valueGetInt64RangeMax
Gets the maximum of the range specified by @value.- Parameter:
value
- a GValue initialized to GST_TYPE_INT64_RANGE- Gibt zurück:
- the maximum of the range
-
valueGetInt64RangeMin
Gets the minimum of the range specified by @value.- Parameter:
value
- a GValue initialized to GST_TYPE_INT64_RANGE- Gibt zurück:
- the minimum of the range
-
valueGetInt64RangeStep
Gets the step of the range specified by @value.- Parameter:
value
- a GValue initialized to GST_TYPE_INT64_RANGE- Gibt zurück:
- the step of the range
-
valueGetIntRangeMax
Gets the maximum of the range specified by @value.- Parameter:
value
- a GValue initialized to GST_TYPE_INT_RANGE- Gibt zurück:
- the maximum of the range
-
valueGetIntRangeMin
Gets the minimum of the range specified by @value.- Parameter:
value
- a GValue initialized to GST_TYPE_INT_RANGE- Gibt zurück:
- the minimum of the range
-
valueGetIntRangeStep
Gets the step of the range specified by @value.- Parameter:
value
- a GValue initialized to GST_TYPE_INT_RANGE- Gibt zurück:
- the step of the range
-
valueGetStructure
Gets the contents of @value.- Parameter:
value
- a GValue initialized to GST_TYPE_STRUCTURE- Gibt zurück:
- the contents of @value
-
valueInitAndCopy
Initialises the target value to be of the same type as source and then copies
the contents from source to target.- Parameter:
dest
- the target valuesrc
- the source value
-
valueIntersect
public static boolean valueIntersect(@Nullable Value dest, @Nonnull Value value1, @Nonnull Value value2) Calculates the intersection of two values. If the values have
a non-empty intersection, the value representing the intersection
is placed in @dest, unless %NULL. If the intersection is non-empty,
@dest is not modified.- Parameter:
dest
- a uninitialized #GValue that will hold the calculated intersection value. May be %NULL if the resulting set if not needed.value1
- a value to intersectvalue2
- another value to intersect- Gibt zurück:
- %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.- Parameter:
value
- the #GValue to check- Gibt zurück:
- true if the value is "fixed".
-
valueIsSubset
Check that @value1 is a subset of @value2.- Parameter:
value1
- a #GValuevalue2
- a #GValue- Gibt zurück:
- %TRUE is @value1 is a subset of @value2
-
valueRegister
Registers functions to perform calculations on #GValue items of a given
type. Each type can only be added once.- Parameter:
table
- structure containing functions to register
-
valueSerialize
tries to transform the given @value into a string representation that allows
getting back this string later on using gst_value_deserialize().
Free-function: g_free- Parameter:
value
- a #GValue to serialize- Gibt zurück:
- the serialization for @value or %NULL if none exists
-
valueSetBitmask
Sets @value to the bitmask specified by @bitmask.- Parameter:
value
- a GValue initialized to #GST_TYPE_BITMASKbitmask
- the bitmask
-
valueSetCaps
Sets the contents of @value to @caps. A reference to the
provided @caps will be taken by the @value.- Parameter:
value
- a GValue initialized to GST_TYPE_CAPScaps
- the caps to set the value to
-
valueSetCapsFeatures
Sets the contents of @value to @features.- Parameter:
value
- a GValue initialized to GST_TYPE_CAPS_FEATURESfeatures
- the features to set the value to
-
valueSetDoubleRange
Sets @value to the range specified by @start and @end.- Parameter:
value
- a GValue initialized to GST_TYPE_DOUBLE_RANGEstart
- the start of the rangeend
- the end of the range
-
valueSetFlagset
Sets @value to the flags and mask values provided in @flags and @mask.
The @flags value indicates the values of flags, the @mask represents
which bits in the flag value have been set, and which are "don't care"- Parameter:
value
- a GValue initialized to %GST_TYPE_FLAG_SETflags
- The value of the flags set or unsetmask
- The mask indicate which flags bits must match for comparisons
-
valueSetFraction
Sets @value to the fraction specified by @numerator over @denominator.
The fraction gets reduced to the smallest numerator and denominator,
and if necessary the sign is moved to the numerator.- Parameter:
value
- a GValue initialized to #GST_TYPE_FRACTIONnumerator
- the numerator of the fractiondenominator
- the denominator of the fraction
-
valueSetFractionRange
public static void valueSetFractionRange(@Nonnull Value value, @Nonnull Value start, @Nonnull Value end) Sets @value to the range specified by @start and @end.- Parameter:
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(@Nonnull Value value, int numerator_start, int denominator_start, int numerator_end, int denominator_end) Sets @value to the range specified by @numerator_start/@denominator_start
and @numerator_end/@denominator_end.- Parameter:
value
- a GValue initialized to GST_TYPE_FRACTION_RANGEnumerator_start
- the numerator start of the rangedenominator_start
- the denominator start of the rangenumerator_end
- the numerator end of the rangedenominator_end
- the denominator end of the range
-
valueSetInt64Range
Sets @value to the range specified by @start and @end.- Parameter:
value
- a GValue initialized to GST_TYPE_INT64_RANGEstart
- the start of the rangeend
- the end of the range
-
valueSetInt64RangeStep
Sets @value to the range specified by @start, @end and @step.- Parameter:
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
Sets @value to the range specified by @start and @end.- Parameter:
value
- a GValue initialized to GST_TYPE_INT_RANGEstart
- the start of the rangeend
- the end of the range
-
valueSetIntRangeStep
Sets @value to the range specified by @start, @end and @step.- Parameter:
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
Sets the contents of @value to @structure.- Parameter:
value
- a GValue initialized to GST_TYPE_STRUCTUREstructure
- the structure to set the value to
-
valueSubtract
public static boolean valueSubtract(@Nullable Value dest, @Nonnull Value minuend, @Nonnull Value subtrahend) Subtracts @subtrahend from @minuend and stores the result in @dest.
Note that this means subtraction as in sets, not as in mathematics.- Parameter:
dest
- the destination value for the result if the subtraction is not empty. May be %NULL, 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- Gibt zurück:
- %TRUE if the subtraction is not empty
-
valueUnion
Creates a GValue corresponding to the union of @value1 and @value2.- Parameter:
dest
- the destination valuevalue1
- a value to unionvalue2
- another value to union- Gibt zurück:
- %TRUE if the union succeeded.
-
vecDequeNew
public static ch.bailu.gtk.gst.VecDeque vecDequeNew(long initial_size) Allocates a new #GstVecDeque object with an initial
queue size of @initial_size.- Parameter:
initial_size
- Initial size of the new queue- Gibt zurück:
- a new #GstVecDeque object
-
vecDequeNewForStruct
public static ch.bailu.gtk.gst.VecDeque vecDequeNewForStruct(long struct_size, long initial_size) Allocates a new #GstVecDeque object for elements (e.g. structures)
of size @struct_size, with an initial queue size of @initial_size.- Parameter:
struct_size
- Size of each element (e.g. structure) in the arrayinitial_size
- Initial size of the new queue- Gibt zurück:
- a new #GstVecDeque object
-
versionString
This function returns a string that is useful for describing this version
of GStreamer to the outside world: user agent strings, logging, ...- Gibt zurück:
- a newly allocated string describing this version of GStreamer.
-