-
public void atomic_int_set (int atomic_int, int value)
Unconditionally sets the atomic integer to value.
-
public Quark core_error_quark ()
-
public void debug_add_log_function (LogFunction func, void* data)
Adds the logging function to the list of logging functions. Be sure to use G_GNUC_NO_INSTRUMENT
on that function, it is needed.
-
public void debug_bin_to_dot_file (Bin bin, DebugGraphDetails details, string prefix)
-
public void debug_bin_to_dot_file_with_ts (Bin bin, DebugGraphDetails details, string prefix)
-
public unowned string debug_construct_term_color (uint colorinfo)
Constructs a string that can be used for getting the desired color in color terminals. You need to
free the string after use. definition
-
public int debug_construct_win_color (uint 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.
-
public SList<DebugCategory> debug_get_all_categories ()
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. debug categories
-
public DebugLevel debug_get_default_threshold ()
Returns the default threshold that is used for new categories.
-
public bool debug_is_active ()
Checks if debugging output is activated.
-
public bool debug_is_colored ()
Checks if the debugging output should be colored.
-
public void debug_log (DebugCategory category, DebugLevel level, string file, string function, int line, Object object, string format)
Logs the given message using the currently registered debugging handlers.
-
public void debug_log_default (DebugCategory category, DebugLevel level, string file, string function, int line, Object object, DebugMessage message, void* unused)
The default logging handler used by GStreamer. Logging functions get called whenever a macro like
GST_DEBUG or similar is used. This function outputs the message and additional info to stderr (or the log file specified via the
GST_DEBUG_FILE environment variable). You can add other handlers by using
debug_add_log_function. And you can remove this handler by calling gst_debug_remove_log_function(gst_debug_log_default);
-
public void debug_log_valist (DebugCategory category, DebugLevel level, string file, string function, int line, Object object, string format, void* args)
Logs the given message using the currently registered debugging handlers.
-
public void debug_print_stack_trace ()
If GST_ENABLE_FUNC_INSTRUMENTATION is defined a stacktrace is available for gstreamer code, which can
be printed with this function.
-
public uint debug_remove_log_function (LogFunction func)
Removes all registered instances of the given logging functions.
-
public uint debug_remove_log_function_by_data (void* data)
Removes all registered instances of log functions with the given user data.
-
public void debug_set_active (bool active)
If activated, debugging messages are sent to the debugging handlers. It makes sense to deactivate it
for speed issues.
-
public void debug_set_colored (bool colored)
Sets or unsets the use of coloured debugging output. This function may be called before
init.
-
public void debug_set_default_threshold (DebugLevel level)
Sets the default threshold to the given level and updates all categories to use this threshold. This
function may be called before init.
-
public void debug_set_threshold_for_name (string name, DebugLevel level)
Sets all categories which match the given glob style pattern to the given level.
-
public void debug_unset_threshold_for_name (string name)
Resets all categories with the given name back to the default level.
-
public bool default_registry_check_feature_version (string feature_name, uint min_major, uint min_minor, uint min_micro)
Checks whether a plugin feature by the given name exists in the default registry and whether its
version is at least the version required. the same as the required version or newer, and false otherwise.
-
public void deinit ()
Clean up any resources created by GStreamer in 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.
-
public Type double_range_get_type ()
-
public string error_get_message (Quark domain, int code)
Get a string describing the error message in the current locale. the error message (in UTF-8 encoding)
-
public unowned string filename_to_uri (string filename) throws Error
Similar to 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.
-
public List filter_run (List list, FilterFunc func, bool first)
Iterates over the elements in list, calling func with the list item data for
each item. If func returns TRUE, data is prepended to the list of results returned. If first
is true, the search is halted after the first result is found. Since filter_run
knows nothing about the type of data, no reference will be taken (if data refers to an object) and no
copy of results. when no longer needed (the data contained in the list is a flat copy and does need to be unreferenced or freed).
-
public Quark flow_to_quark (FlowReturn ret)
Get the unique quark for the given GstFlowReturn. invalid return was specified.
-
public Format format_get_by_nick (string nick)
Return the format registered with the given nick. if the format was not registered.
-
public FormatDefinition format_get_details (Format format)
-
public Iterator<FormatDefinition> format_iterate_definitions ()
Iterate all the registered formats. The format definition is read only.
-
public Format format_register (string nick, string description)
Create a new GstFormat based on the nick or return an already registered format with that nick. with
the same nick. MT safe.
-
public Quark format_to_quark (Format format)
-
public bool formats_contains (Format formats, Format format)
See if the given format is inside the format array.
-
public Type fourcc_get_type ()
-
public Type fraction_get_type ()
-
public Type fraction_range_get_type ()
-
public void init (ref string[] argv)
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
update_registry for details and section Running
GStreamer Applications for how to disable automatic registry updates. This function should be called before calling any other
GLib functions. If this is not an option, your program must initialise the GLib thread system using g_thread_init
before any other GLib functions are called.
-
public bool init_check (ref string[] argv) throws Error
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 init instead. This function should be called
before calling any other GLib functions. If this is not an option, your program must initialise the GLib thread system using
g_thread_init before any other GLib functions are called.
-
public OptionGroup init_get_option_group ()
Returns a OptionGroup 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 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).
-
public Type int64_range_get_type ()
-
public Type int_range_get_type ()
-
public bool is_initialized ()
Use this function to check if GStreamer has been initialized with
init or init_check.
-
public bool is_tag_list (void* p)
Checks if the given pointer is a taglist.
-
public Quark library_error_quark ()
-
public void marshal_BOOLEAN__POINTER (Closure closure, Value return_value, uint n_param_values, Value param_values, void* invocation_hint, void* marshal_data)
-
public void marshal_BOOLEAN__VOID (Closure closure, Value return_value, uint n_param_values, Value param_values, void* invocation_hint, void* marshal_data)
-
public void marshal_BOXED__BOXED (Closure closure, Value return_value, uint n_param_values, Value param_values, void* invocation_hint, void* marshal_data)
-
public void marshal_POINTER__POINTER (Closure closure, Value return_value, uint n_param_values, Value param_values, void* invocation_hint, void* marshal_data)
-
public void marshal_VOID__BOXED_OBJECT (Closure closure, Value return_value, uint n_param_values, Value param_values, void* invocation_hint, void* marshal_data)
-
public void marshal_VOID__INT64 (Closure closure, Value return_value, uint n_param_values, Value param_values, void* invocation_hint, void* marshal_data)
-
public void marshal_VOID__INT_INT (Closure closure, Value return_value, uint n_param_values, Value param_values, void* invocation_hint, void* marshal_data)
-
public void marshal_VOID__OBJECT_BOXED (Closure closure, Value return_value, uint n_param_values, Value param_values, void* invocation_hint, void* marshal_data)
-
public void marshal_VOID__OBJECT_BOXED_STRING (Closure closure, Value return_value, uint n_param_values, Value param_values, void* invocation_hint, void* marshal_data)
-
public void marshal_VOID__OBJECT_OBJECT (Closure closure, Value return_value, uint n_param_values, Value param_values, void* invocation_hint, void* marshal_data)
-
public void marshal_VOID__OBJECT_OBJECT_STRING (Closure closure, Value return_value, uint n_param_values, Value param_values, void* invocation_hint, void* marshal_data)
-
public void marshal_VOID__OBJECT_PARAM (Closure closure, Value return_value, uint n_param_values, Value param_values, void* invocation_hint, void* marshal_data)
-
public void marshal_VOID__OBJECT_POINTER (Closure closure, Value return_value, uint n_param_values, Value param_values, void* invocation_hint, void* marshal_data)
-
public void marshal_VOID__OBJECT_STRING (Closure closure, Value return_value, uint n_param_values, Value param_values, void* invocation_hint, void* marshal_data)
-
public void marshal_VOID__POINTER_OBJECT (Closure closure, Value return_value, uint n_param_values, Value param_values, void* invocation_hint, void* marshal_data)
-
public void marshal_VOID__UINT_BOXED (Closure closure, Value return_value, uint n_param_values, Value param_values, void* invocation_hint, void* marshal_data)
-
public weak ParamSpec param_spec_fraction (string name, string nick, string blurb, int min_num, int min_denom, int max_num, int max_denom, int default_num, int default_denom, ParamFlags flags)
This function creates a fraction GParamSpec for use by objects/elements that want to expose properties
of fraction type. This function is typically used in connection with
install_property in a GObjects's instance_init
function.
-
public weak ParamSpec param_spec_mini_object (string name, string nick, string blurb, Type object_type, ParamFlags flags)
-
public Element? parse_bin_from_description (string bin_description, bool ghost_unlinked_pads) throws Error
This is a convenience wrapper around parse_launch
to create a Bin from a gst-launch-style pipeline description. See
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).
-
public Element? parse_bin_from_description_full (string bin_description, bool ghost_unlinked_pads, ParseContext? context, ParseFlags flags) throws Error
This is a convenience wrapper around parse_launch
to create a Bin from a gst-launch-style pipeline description. See
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).
-
public Quark parse_error_quark ()
Get the error quark used by the parsing subsystem.
-
public Element? parse_launch (string pipeline_description) throws Error
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. more than one toplevel element is specified by the pipeline_description, all elements are put
into a Pipeline, which than is returned.
-
public Element? parse_launch_full (string pipeline_description, ParseContext? context, ParseFlags flags) throws Error
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. more than one toplevel element is specified by the pipeline_description, all elements are put
into a Pipeline, which then is returned.
-
public Element? parse_launchv (string[] argv) throws Error
Create a new element based on command line syntax. An error does not mean that the pipeline could not
be constructed.
-
public Element? parse_launchv_full (string[] argv, ParseContext? context, ParseFlags flags) throws Error
Create a new element based on command line syntax. An error does not mean that the pipeline could not
be constructed. or a partially-constructed bin or element will be returned and error will be set (unless you passed
FATAL_ERRORS in flags, then null will
always be returned on failure)
-
public void print_element_args (StringBuilder buf, int indent, Element element)
Print the element argument in a human readable format in the given GString.
-
public void print_pad_caps (StringBuilder buf, int indent, Pad pad)
Write the pad capabilities in a human readable format into the given GString.
-
public Quark resource_error_quark ()
-
public bool segtrap_is_enabled ()
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 segtrap_set_enabled function. This is typically
done if the application wants to install its own handler without GStreamer interfering.
-
public void segtrap_set_enabled (bool enabled)
Applications might want to disable/enable the SIGSEGV handling of the GStreamer core. See
segtrap_is_enabled for more information.
-
public Quark stream_error_quark ()
-
public bool tag_exists (string tag)
Checks if the given type is already registered.
-
public unowned string tag_get_description (string tag)
Returns the human-readable description of this tag, You must not change or free this string.
-
public TagFlag tag_get_flag (string tag)
Gets the flag of tag.
-
public unowned string tag_get_nick (string tag)
Returns the human-readable name of this tag, You must not change or free this string.
-
public Type tag_get_type (string tag)
Gets the Type used for this tag.
-
public bool tag_is_fixed (string tag)
Checks if the given tag is fixed. A fixed tag can only contain one value. Unfixed tags can contain
lists of values.
-
public void tag_merge_strings_with_comma (Value dest, Value src)
This is a convenience function for the func argument of
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.
-
public void tag_merge_use_first (Value dest, Value src)
This is a convenience function for the func argument of
tag_register. It creates a copy of the first value from the list.
-
public void tag_register (string name, TagFlag flag, Type type, string nick, string blurb, TagMergeFunc func)
Registers a new tag type for the use with GStreamer's type system. If a type with that name is already
registered, that one is used. The old registration may have used a different type however. So don't rely on your supplied values.
that there can only be one single value for this tag in a tag list and any additional values will silenty be discarded when being
added (unless REPLACE,
REPLACE_ALL, or
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
copy_value when it is required that one or more values for a tag be
condensed into one single value. This may happen from get_string,
get_int, 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. tag_merge_strings_with_comma.
-
public bool update_registry ()
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 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. imply that there were changes), otherwise false
.
-
public unowned string uri_construct (string protocol, string location)
Constructs a URI for a given valid protocol and location. URI. Returns NULL if the given URI protocol
is not valid, or the given location is NULL.
-
public unowned string uri_get_location (string 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. The returned string must be freed using
g_free. URI. Returns NULL if the URI isn't valid. If the URI does not
contain a location, an empty string is returned.
-
public unowned string uri_get_protocol (string uri)
Extracts the protocol out of a given valid URI. The returned string must be freed using
g_free.
-
public bool uri_has_protocol (string uri, string protocol)
Checks if the protocol of a given valid URI matches protocol.
-
public bool uri_is_valid (string uri)
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.
-
public bool uri_protocol_is_supported (URIType type, string protocol)
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 make_from_uri is
guaranteed to work.
-
public bool uri_protocol_is_valid (string protocol)
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.
-
public void* util_array_binary_search (void* array, uint num_elements, size_t element_size, CompareDataFunc search_func, SearchMode mode, void* search_data)
Searches inside array for search_data by using the comparison function 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)).
-
public void util_double_to_fraction (double src, int dest_n, int dest_d)
Transforms a double to a fraction and simplifies
the result.
-
public void util_dump_mem (uchar[] mem, uint size)
Dumps the memory block into a hex representation. Useful for debugging.
-
public bool util_fraction_add (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.
-
public int util_fraction_compare (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.
-
public bool util_fraction_multiply (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.
-
public void util_fraction_to_double (int src_n, int src_d, double dest)
Transforms a fraction to a double.
-
public uint64 util_gdouble_to_guint64 (double value)
-
public ClockTime util_get_timestamp ()
Get a timestamp as GstClockTime to be used for interval meassurements. The timestamp should not be
interpreted in any other way.
-
public int util_greatest_common_divisor (int a, int b)
Calculates the greatest common divisor of a and b.
-
public double util_guint64_to_gdouble (uint64 value)
-
public int32 util_seqnum_compare (uint32 s1, uint32 s2)
Compare two sequence numbers, handling wraparound. The current implementation just returns
(gint32)(@s1 - s2). positive number if s1 is after s2.
-
public uint32 util_seqnum_next ()
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. overflow back to 0
at some point. Use util_seqnum_compare to make sure you handle wraparound
correctly.
-
public void util_set_object_arg (Object object, string name, string value)
Convertes 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
-
public void util_set_value_from_string (Value value, string value_str)
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.
-
public uint64 util_uint64_scale (uint64 val, uint64 num, uint64 denom)
-
public uint64 util_uint64_scale_ceil (uint64 val, uint64 num, uint64 denom)
-
public uint64 util_uint64_scale_int (uint64 val, int num, int denom)
-
public uint64 util_uint64_scale_int_ceil (uint64 val, int num, int denom)
-
public uint64 util_uint64_scale_int_round (uint64 val, int num, int denom)
-
public uint64 util_uint64_scale_round (uint64 val, uint64 num, uint64 denom)
-
public weak MiniObject value_dup_mini_object (Value value)
Get the contents of a
typeof (MiniObject) derived
Value, increasing its reference count. If the contents of the
Value are null, null will be returned.
-
public int64 value_get_int64_range_max (Value value)
Gets the maximum of the range specified by value.
-
public int64 value_get_int64_range_min (Value value)
Gets the minimum of the range specified by value.
-
public void value_list_merge (Value dest, Value value1, Value value2)
Merges copies of value1 and value2. Values that are not of type
GST_TYPE_LIST are treated as if they were lists of length 1. The result will be put into dest and will either
be a list that will not contain any duplicates, or a non-list type (if value1 and value2 were equal).
-
public void value_set_int64_range (Value value, int64 start, int64 end)
Sets value to the range specified by start and end.
-
public void version (out uint major, out uint minor, out uint micro, out uint nano)
Gets the version number of the GStreamer library.
-
public string version_string ()
This function returns a string that is useful for describing this version of GStreamer.