Alias for #GstMapInfo to be used with g_auto(): ```c void my_func(GstBuffer *buf) { g_auto(GstBufferMapInfo) map = GST_MAP_INFO_INIT; if (!gst_buffer_map(buf, &map, GST_MAP_READWRITE)) return; ... // No need to call gst_buffer_unmap() } ``` #GstMapInfo cannot be used with g_auto() because it is ambiguous whether it needs to be unmapped using gst_buffer_unmap() or gst_memory_unmap(). See also #GstMemoryMapInfo. A datatype to hold the handle to an outstanding sync or async clock callback. A datatype to hold a time, measured in nanoseconds. A datatype to hold a time difference, measured in nanoseconds. A type defining the type of an element factory. Alias for #GstMapInfo to be used with g_auto(): ```c void my_func(GstMemory *mem) { g_auto(GstMemoryMapInfo) map = GST_MAP_INFO_INIT; if (!gst_memory_map(mem, &map, GST_MAP_READWRITE)) return; ... // No need to call gst_memory_unmap() } ``` #GstMapInfo cannot be used with g_auto() because it is ambiguous whether it needs to be unmapped using gst_buffer_unmap() or gst_memory_unmap(). See also #GstBufferMapInfo. The allocator name for the default system memory allocator The aggregator function will combine the parameters from @params0 and @param1 and write the result back into @aggregated_params. %TRUE if the parameters were successfully aggregated, %FALSE otherwise. This structure will be updated with the combined parameters from both @params0 and @params1. a #GstStructure containing the new parameters to be aggregated. a #GstStructure containing the new parameters to be aggregated. Parameters to control the allocation of memory flags to control allocation the desired alignment of the memory the desired prefix the desired padding Create a new #GstAllocationParams on the heap. This function is for use in GStreamer language bindings. In your own code, you can just declare a #GstAllocationParams on the stack or in a struct, and call gst_allocation_params_init() to initialize it. You do not need to call gst_allocation_params_init() on the instance returned by this function. a new #GstAllocationParams Create a copy of @params. a new #GstAllocationParams. a #GstAllocationParams Free @params a #GstAllocationParams Initialize @params to its default values a #GstAllocationParams Memory is usually created by allocators with a gst_allocator_alloc() method call. When %NULL is used as the allocator, the default allocator will be used. New allocators can be registered with gst_allocator_register(). Allocators are identified by name and can be retrieved with gst_allocator_find(). gst_allocator_set_default() can be used to change the default allocator. New memory can be created with gst_memory_new_wrapped() that wraps the memory allocated elsewhere. Find a previously registered allocator with @name. When @name is %NULL, the default allocator will be returned. a #GstAllocator or %NULL when the allocator with @name was not registered. the name of the allocator Registers the memory @allocator with @name. the name of the allocator #GstAllocator Use @allocator to allocate a new memory block with memory that is at least @size big. The optional @params can specify the prefix and padding for the memory. If %NULL is passed, no flags, no extra prefix/padding and a default alignment is used. The prefix/padding will be filled with 0 if flags contains #GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED respectively. When @allocator is %NULL, the default allocator will be used. The alignment in @params is given as a bitmask so that @align + 1 equals the amount of bytes to align to. For example, to align to 8 bytes, use an alignment of 7. a new #GstMemory. a #GstAllocator to use size of the visible memory area optional parameters Free @memory that was previously allocated with gst_allocator_alloc(). a #GstAllocator to use the memory to free Use @allocator to allocate a new memory block with memory that is at least @size big. The optional @params can specify the prefix and padding for the memory. If %NULL is passed, no flags, no extra prefix/padding and a default alignment is used. The prefix/padding will be filled with 0 if flags contains #GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED respectively. When @allocator is %NULL, the default allocator will be used. The alignment in @params is given as a bitmask so that @align + 1 equals the amount of bytes to align to. For example, to align to 8 bytes, use an alignment of 7. a new #GstMemory. a #GstAllocator to use size of the visible memory area optional parameters Free @memory that was previously allocated with gst_allocator_alloc(). a #GstAllocator to use the memory to free Set the default allocator. a #GstAllocator the implementation of the GstMemoryMapFunction the implementation of the GstMemoryUnmapFunction the implementation of the GstMemoryCopyFunction the implementation of the GstMemoryShareFunction the implementation of the GstMemoryIsSpanFunction the implementation of the GstMemoryMapFullFunction. Will be used instead of @mem_map if present. (Since: 1.6) the implementation of the GstMemoryUnmapFullFunction. Will be used instead of @mem_unmap if present. (Since: 1.6) The #GstAllocator is used to create new memory. Object parent class implementation that acquires memory a new #GstMemory. a #GstAllocator to use size of the visible memory area optional parameters implementation that releases memory a #GstAllocator to use the memory to free Flags for allocators. The allocator has a custom alloc function. Only elements designed to work with this allocator should be using it, other elements should ignore it from allocation propositions. This implies %GST_ALLOCATOR_FLAG_NO_COPY. When copying a #GstMemory allocated with this allocator, the copy will instead be allocated using the default allocator. Use this when allocating a new memory is an heavy opperation that should only be done with a #GstBufferPool for example. first flag that can be used for custom purposes The #GstAtomicQueue object implements a queue that can be used from multiple threads without performing any blocking operations. Create a new atomic queue instance. @initial_size will be rounded up to the nearest power of 2 and used as the initial size of the queue. a new #GstAtomicQueue initial queue size Get the amount of items in the queue. the number of elements in the queue. a #GstAtomicQueue Peek the head element of the queue without removing it from the queue. the head element of @queue or %NULL when the queue is empty. a #GstAtomicQueue Get the head element of the queue. the head element of @queue or %NULL when the queue is empty. a #GstAtomicQueue Append @data to the tail of the queue. a #GstAtomicQueue the data Increase the refcount of @queue. a #GstAtomicQueue Unref @queue and free the memory when the refcount reaches 0. a #GstAtomicQueue Gets the list of children in a bin. a #GstBin Gets the children cookie that watches the children list. a #GstBin Check if @bin will resync its state change when elements are added and removed. A #GstBin Gets the number of children in a bin. a #GstBin Combination of all possible fields that can be copied with gst_buffer_copy_into(). Combination of all possible metadata fields that can be copied with gst_buffer_copy_into(). Gets the decoding timestamp (dts) in nanoseconds (as a #GstClockTime) of the data in the buffer. This is the timestamp when the media should be decoded or processed otherwise. Value will be %GST_CLOCK_TIME_NONE if the dts is unknown. a #GstBuffer. Tests if the dts is known. a #GstBuffer Returns the buffer decoding timestamp (dts) if valid, else the buffer presentation time (pts) a #GstBuffer. Gets the duration in nanoseconds (as a #GstClockTime) of the data in the buffer. Value will be %GST_CLOCK_TIME_NONE if the duration is unknown. a #GstBuffer. Tests if the duration is known. a #GstBuffer Returns a flags word containing #GstBufferFlags flags set on this buffer. a #GstBuffer. Gives the status of a specific flag on a buffer. a #GstBuffer. the #GstBufferFlags flag to check. Sets a buffer flag on a buffer. a #GstBuffer. the #GstBufferFlags flag to set. Clears a buffer flag. a #GstBuffer. the #GstBufferFlags flag to clear. Tests if the buffer marks a discontinuity in the stream. a #GstBuffer Gets the offset in the source file of the beginning of this buffer. a #GstBuffer. Gets the offset in the source file of the end of this buffer. a #GstBuffer. Tests if the end offset is known. a #GstBuffer Tests if the start offset is known. a #GstBuffer Constant for no-offset return results. Check if the bufferpool is flushing. Subclasses might want to check the state of the pool in the acquire function. a GstBufferPool Gets the presentation timestamp (pts) in nanoseconds (as a #GstClockTime) of the data in the buffer. This is the timestamp when the media should be presented to the user. Value will be %GST_CLOCK_TIME_NONE if the pts is unknown. a #GstBuffer.: Tests if the pts is known. a #GstBuffer #GstBin is an element that can contain other #GstElement, allowing them to be managed as a group. Pads from the child elements can be ghosted to the bin, see #GstGhostPad. This makes the bin look like any other elements and enables creation of higher-level abstraction elements. A new #GstBin is created with gst_bin_new(). Use a #GstPipeline instead if you want to create a toplevel bin because a normal bin doesn't have a bus or handle clock distribution of its own. After the bin has been created you will typically add elements to it with gst_bin_add(). You can remove elements with gst_bin_remove(). An element can be retrieved from a bin with gst_bin_get_by_name(), using the elements name. gst_bin_get_by_name_recurse_up() is mainly used for internal purposes and will query the parent bins when the element is not found in the current bin. An iterator of elements in a bin can be retrieved with gst_bin_iterate_elements(). Various other iterators exist to retrieve the elements in a bin. gst_object_unref() is used to drop your reference to the bin. The #GstBin::element-added signal is fired whenever a new element is added to the bin. Likewise the #GstBin::element-removed signal is fired whenever an element is removed from the bin. A #GstBin internally intercepts every #GstMessage posted by its children and implements the following default behaviour for each of them: * %GST_MESSAGE_EOS: This message is only posted by sinks in the PLAYING state. If all sinks posted the EOS message, this bin will post and EOS message upwards. * %GST_MESSAGE_SEGMENT_START: Just collected and never forwarded upwards. The messages are used to decide when all elements have completed playback of their segment. * %GST_MESSAGE_SEGMENT_DONE: Is posted by #GstBin when all elements that posted a SEGMENT_START have posted a SEGMENT_DONE. * %GST_MESSAGE_DURATION_CHANGED: Is posted by an element that detected a change in the stream duration. The duration change is posted to the application so that it can refetch the new duration with a duration query. Note that these messages can be posted before the bin is prerolled, in which case the duration query might fail. Note also that there might be a discrepancy (due to internal buffering/queueing) between the stream being currently displayed and the returned duration query. Applications might want to also query for duration (and changes) by listening to the %GST_MESSAGE_STREAM_START message, signaling the active start of a (new) stream. * %GST_MESSAGE_CLOCK_LOST: This message is posted by an element when it can no longer provide a clock. The default bin behaviour is to check if the lost clock was the one provided by the bin. If so and the bin is currently in the PLAYING state, the message is forwarded to the bin parent. This message is also generated when a clock provider is removed from the bin. If this message is received by the application, it should PAUSE the pipeline and set it back to PLAYING to force a new clock distribution. * %GST_MESSAGE_CLOCK_PROVIDE: This message is generated when an element can provide a clock. This mostly happens when a new clock provider is added to the bin. The default behaviour of the bin is to mark the currently selected clock as dirty, which will perform a clock recalculation the next time the bin is asked to provide a clock. This message is never sent to the application but is forwarded to the parent of the bin. * OTHERS: posted upwards. A #GstBin implements the following default behaviour for answering to a #GstQuery: * %GST_QUERY_DURATION: The bin will forward the query to all sink elements contained within and will return the maximum value. If no sinks are available in the bin, the query fails. * %GST_QUERY_POSITION: The query is sent to all sink elements in the bin and the MAXIMUM of all values is returned. If no sinks are available in the bin, the query fails. * OTHERS: the query is forwarded to all sink elements, the result of the first sink that answers the query successfully is returned. If no sink is in the bin, the query fails. A #GstBin will by default forward any event sent to it to all sink ( %GST_EVENT_TYPE_UPSTREAM ) or source ( %GST_EVENT_TYPE_DOWNSTREAM ) elements depending on the event type. If all the elements return %TRUE, the bin will also return %TRUE, else %FALSE is returned. If no elements of the required type are in the bin, the event handler will return %TRUE. Creates a new bin with the given name. a new #GstBin the name of the new bin Method to add an element to the bin. %TRUE if the @element was added the #GstBin the element to be added Method called when an element was added somewhere in the bin hierarchy. the top level #GstBin the #GstBin to which the element was added the element that was added Method called when an element was removed somewhere in the bin hierarchy. the top level #GstBin the #GstBin from which the element was removed the element that was removed Method called when an element was added to the bin. the #GstBin the element that was added Method called when an element was removed from the bin. the #GstBin the element that was removed Method to handle a message from the children. the #GstBin the message to be handled Method to remove an element from the bin. %TRUE if the @element was removed the #GstBin the element to be removed Adds the given element to the bin. Sets the element's parent, and thus takes ownership of the element. An element can only be added to one bin. If the element's pads are linked to other pads, the pads will be unlinked before the element is added to the bin. > When you add an element to an already-running pipeline, you will have to > take care to set the state of the newly-added element to the desired > state (usually PLAYING or PAUSED, same you set the pipeline to originally) > with gst_element_set_state(), or use gst_element_sync_state_with_parent(). > The bin or pipeline will not take care of this for you. %TRUE if the element could be added, %FALSE if the bin does not want to accept the element. a #GstBin the #GstElement to add Adds a %NULL-terminated list of elements to a bin. This function is equivalent to calling gst_bin_add() for each member of the list. The return value of each gst_bin_add() is ignored. a #GstBin the #GstElement element to add to the bin additional elements to add to the bin Recursively looks for elements with an unlinked pad of the given direction within the specified bin and returns an unlinked pad if one is found, or %NULL otherwise. If a pad is found, the caller owns a reference to it and should use gst_object_unref() on the pad when it is not needed any longer. unlinked pad of the given direction. bin in which to look for elements with unlinked pads whether to look for an unlinked source or sink pad Looks for an element inside the bin that implements the given interface. If such an element is found, it returns the element. You can cast this element to the given interface afterwards. If you want all elements that implement the interface, use gst_bin_iterate_all_by_interface(). This function recurses into child bins. A #GstElement inside the bin implementing the interface a #GstBin the #GType of an interface Gets the element with the given name from a bin. This function recurses into child bins. the #GstElement with the given name a #GstBin the element name to search for Gets the element with the given name from this bin. If the element is not found, a recursion is performed on the parent bin. the #GstElement with the given name a #GstBin the element name to search for the bin's suppressed #GstElementFlags. a #GstBin Looks for all elements inside the bin with the given element factory name. The function recurses inside child bins. The iterator will yield a series of #GstElement. a #GstIterator of #GstElement for all elements in the bin with the given element factory name a #GstBin the name of the #GstElementFactory Looks for all elements inside the bin that implements the given interface. You can safely cast all returned elements to the given interface. The function recurses inside child bins. The iterator will yield a series of #GstElement. a #GstIterator of #GstElement for all elements in the bin implementing the given interface a #GstBin the #GType of an interface Gets an iterator for the elements in this bin. a #GstIterator of #GstElement a #GstBin Gets an iterator for the elements in this bin. This iterator recurses into GstBin children. a #GstIterator of #GstElement a #GstBin Gets an iterator for all elements in the bin that have the #GST_ELEMENT_FLAG_SINK flag set. a #GstIterator of #GstElement a #GstBin Gets an iterator for the elements in this bin in topologically sorted order. This means that the elements are returned from the most downstream elements (sinks) to the sources. This function is used internally to perform the state changes of the bin elements and for clock selection. a #GstIterator of #GstElement a #GstBin Gets an iterator for all elements in the bin that have the #GST_ELEMENT_FLAG_SOURCE flag set. a #GstIterator of #GstElement a #GstBin Queries @bin for the current latency and reconfigures this latency on all the elements using a LATENCY event. This method is typically called on the pipeline when a #GST_MESSAGE_LATENCY is posted on the bus. This function simply emits the #GstBin::do-latency signal so any custom latency calculations will be performed. %TRUE if the latency could be queried and reconfigured. a #GstBin Removes the element from the bin, unparenting it as well. Unparenting the element means that the element will be dereferenced, so if the bin holds the only reference to the element, the element will be freed in the process of removing it from the bin. If you want the element to still exist after removing, you need to call gst_object_ref() before removing it from the bin. If the element's pads are linked to other pads, the pads will be unlinked before the element is removed from the bin. %TRUE if the element could be removed, %FALSE if the bin does not want to remove the element. a #GstBin the #GstElement to remove Removes a list of elements from a bin. This function is equivalent to calling gst_bin_remove() with each member of the list. a #GstBin the first #GstElement to remove from the bin %NULL-terminated list of elements to remove from the bin Suppresses the given flags on the bin. #GstElementFlags of a child element are propagated when it is added to the bin. When suppressed flags are set, those specified flags will not be propagated to the bin. a #GstBin the #GstElementFlags to suppress Synchronizes the state of every child of @bin with the state of @bin. See also gst_element_sync_state_with_parent(). %TRUE if syncing the state was successful for all children, otherwise %FALSE. a #GstBin If set to %TRUE, the bin will handle asynchronous state changes. This should be used only if the bin subclass is modifying the state of its children on its own. Forward all children messages, even those that would normally be filtered by the bin. This can be interesting when one wants to be notified of the EOS state of individual elements, for example. The messages are converted to an ELEMENT message with the bin as the source. The structure of the message is named `GstBinForwarded` and contains a field named `message` that contains the original forwarded #GstMessage. the number of children in this bin the list of children in this bin updated whenever @children changes internal bus for handling child messages queued and cached messages the bin is currently calculating its state the bin needs to recalculate its state (deprecated) the bin needs to select a new clock the last clock selected the element that provided @provided_clock Will be emitted after the element was added to @sub_bin. the #GstBin the element was added to the #GstElement that was added to @sub_bin Will be emitted after the element was removed from @sub_bin. the #GstBin the element was removed from the #GstElement that was removed from @sub_bin Will be emitted when the bin needs to perform latency calculations. This signal is only emitted for toplevel bins or when #GstBin:async-handling is enabled. Only one signal handler is invoked. If no signals are connected, the default handler is invoked, which will query and distribute the lowest possible latency to all sinks. Connect to this signal if the default latency calculations are not sufficient, like when you need different latencies for different sinks in the same pipeline. Will be emitted after the element was added to the bin. the #GstElement that was added to the bin Will be emitted after the element was removed from the bin. the #GstElement that was removed from the bin Subclasses can override #GstBinClass::add_element and #GstBinClass::remove_element to update the list of children in the bin. The #GstBinClass::handle_message method can be overridden to implement custom message handling. #GstBinClass::deep_element_added will be called when a new element has been added to any bin inside this bin, so it will also be called if a new child was added to a sub-bin of this bin. #GstBin implementations that override this message should chain up to the parent class implementation so the #GstBin::deep-element-added signal is emitted on all parents. bin parent class the #GstBin the element that was added the #GstBin the element that was removed %TRUE if the @element was added the #GstBin the element to be added %TRUE if the @element was removed the #GstBin the element to be removed the #GstBin the message to be handled the top level #GstBin the #GstBin to which the element was added the element that was added the top level #GstBin the #GstBin from which the element was removed the element that was removed GstBinFlags are a set of flags specific to bins. Most are set/used internally. They can be checked using the GST_OBJECT_FLAG_IS_SET() macro, and (un)set using GST_OBJECT_FLAG_SET() and GST_OBJECT_FLAG_UNSET(). Don't resync a state change when elements are added or linked in the bin Indicates whether the bin can handle elements that add/remove source pads at any point in time without first posting a no-more-pads signal. The last enum in the series of flags for bins. Derived classes can use this as first value in a list of flags. A fundamental type that describes a 64-bit bitmask Buffers are the basic unit of data transfer in GStreamer. They contain the timing and offset along with other arbitrary metadata that is associated with the #GstMemory blocks that the buffer contains. Buffers are usually created with gst_buffer_new(). After a buffer has been created one will typically allocate memory for it and add it to the buffer. The following example creates a buffer that can hold a given video frame with a given width, height and bits per plane. ``` C GstBuffer *buffer; GstMemory *memory; gint size, width, height, bpp; ... size = width * height * bpp; buffer = gst_buffer_new (); memory = gst_allocator_alloc (NULL, size, NULL); gst_buffer_insert_memory (buffer, -1, memory); ... ``` Alternatively, use gst_buffer_new_allocate() to create a buffer with preallocated data of a given size. Buffers can contain a list of #GstMemory objects. You can retrieve how many memory objects with gst_buffer_n_memory() and you can get a pointer to memory with gst_buffer_peek_memory() A buffer will usually have timestamps, and a duration, but neither of these are guaranteed (they may be set to #GST_CLOCK_TIME_NONE). Whenever a meaningful value can be given for these, they should be set. The timestamps and duration are measured in nanoseconds (they are #GstClockTime values). The buffer DTS refers to the timestamp when the buffer should be decoded and is usually monotonically increasing. The buffer PTS refers to the timestamp when the buffer content should be presented to the user and is not always monotonically increasing. A buffer can also have one or both of a start and an end offset. These are media-type specific. For video buffers, the start offset will generally be the frame number. For audio buffers, it will be the number of samples produced so far. For compressed data, it could be the byte offset in a source or destination file. Likewise, the end offset will be the offset of the end of the buffer. These can only be meaningfully interpreted if you know the media type of the buffer (the preceding CAPS event). Either or both can be set to #GST_BUFFER_OFFSET_NONE. gst_buffer_ref() is used to increase the refcount of a buffer. This must be done when you want to keep a handle to the buffer after pushing it to the next element. The buffer refcount determines the writability of the buffer, a buffer is only writable when the refcount is exactly 1, i.e. when the caller has the only reference to the buffer. To efficiently create a smaller buffer out of an existing one, you can use gst_buffer_copy_region(). This method tries to share the memory objects between the two buffers. If a plug-in wants to modify the buffer data or metadata in-place, it should first obtain a buffer that is safe to modify by using gst_buffer_make_writable(). This function is optimized so that a copy will only be made when it is necessary. Several flags of the buffer can be set and unset with the GST_BUFFER_FLAG_SET() and GST_BUFFER_FLAG_UNSET() macros. Use GST_BUFFER_FLAG_IS_SET() to test if a certain #GstBufferFlags flag is set. Buffers can be efficiently merged into a larger buffer with gst_buffer_append(). Copying of memory will only be done when absolutely needed. Arbitrary extra metadata can be set on a buffer with gst_buffer_add_meta(). Metadata can be retrieved with gst_buffer_get_meta(). See also #GstMeta. An element should either unref the buffer or push it out on a src pad using gst_pad_push() (see #GstPad). Buffers are usually freed by unreffing them with gst_buffer_unref(). When the refcount drops to 0, any memory and metadata pointed to by the buffer is unreffed as well. Buffers allocated from a #GstBufferPool will be returned to the pool when the refcount drops to 0. The #GstParentBufferMeta is a meta which can be attached to a #GstBuffer to hold a reference to another buffer that is only released when the child #GstBuffer is released. Typically, #GstParentBufferMeta is used when the child buffer is directly using the #GstMemory of the parent buffer, and wants to prevent the parent buffer from being returned to a buffer pool until the #GstMemory is available for re-use. (Since: 1.6) the parent structure pointer to the pool owner of the buffer presentation timestamp of the buffer, can be #GST_CLOCK_TIME_NONE when the pts is not known or relevant. The pts contains the timestamp when the media should be presented to the user. decoding timestamp of the buffer, can be #GST_CLOCK_TIME_NONE when the dts is not known or relevant. The dts contains the timestamp when the media should be processed. duration in time of the buffer data, can be #GST_CLOCK_TIME_NONE when the duration is not known or relevant. a media specific offset for the buffer data. For video frames, this is the frame number of this buffer. For audio samples, this is the offset of the first sample in this buffer. For file data or compressed data this is the byte offset of the first byte in this buffer. the last offset contained in this buffer. It has the same format as @offset. Creates a newly allocated buffer without any data. the new #GstBuffer. Tries to create a newly allocated buffer with data of the given size and extra parameters from @allocator. If the requested amount of memory can't be allocated, %NULL will be returned. The allocated buffer memory is not cleared. When @allocator is %NULL, the default memory allocator will be used. Note that when @size == 0, the buffer will not have memory associated with it. a new #GstBuffer the #GstAllocator to use, or %NULL to use the default allocator the size in bytes of the new buffer's data. optional parameters Creates a new buffer of size @size and fills it with a copy of @data. a new #GstBuffer data to copy into new buffer size of @data in bytes Creates a new buffer that wraps the given @data. The memory will be freed with g_free() and will be marked writable. a new #GstBuffer data to wrap allocated size of @data Creates a new #GstBuffer that wraps the given @bytes. The data inside @bytes cannot be %NULL and the resulting buffer will be marked as read only. a new #GstBuffer wrapping @bytes a #GBytes to wrap Allocates a new buffer that wraps the given memory. @data must point to @maxsize of memory, the wrapped buffer will have the region from @offset and @size visible. When the buffer is destroyed, @notify will be called with @user_data. The prefix/padding must be filled with 0 if @flags contains #GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED respectively. a new #GstBuffer #GstMemoryFlags data to wrap allocated size of @data offset in @data size of valid data user_data called with @user_data when the memory is freed Creates and adds a #GstCustomMeta for the desired @name. @name must have been successfully registered with gst_meta_register_custom(). The #GstCustomMeta that was added to the buffer a #GstBuffer the registered name of the desired custom meta Adds metadata for @info to @buffer using the parameters in @params. the metadata for the api in @info on @buffer. a #GstBuffer a #GstMetaInfo params for @info Adds a #GstParentBufferMeta to @buffer that holds a reference on @ref until the buffer is freed. The #GstParentBufferMeta that was added to the buffer a #GstBuffer a #GstBuffer to ref Attaches protection metadata to a #GstBuffer. a pointer to the added #GstProtectionMeta if successful #GstBuffer holding an encrypted sample, to which protection metadata should be added. a #GstStructure holding cryptographic information relating to the sample contained in @buffer. This function takes ownership of @info. Adds a #GstReferenceTimestampMeta to @buffer that holds a @timestamp and optionally @duration based on a specific timestamp @reference. See the documentation of #GstReferenceTimestampMeta for details. The #GstReferenceTimestampMeta that was added to the buffer a #GstBuffer identifier for the timestamp reference. timestamp duration, or %GST_CLOCK_TIME_NONE Appends all the memory from @buf2 to @buf1. The result buffer will contain a concatenation of the memory of @buf1 and @buf2. the new #GstBuffer that contains the memory of the two source buffers. the first source #GstBuffer to append. the second source #GstBuffer to append. Appends the memory block @mem to @buffer. This function takes ownership of @mem and thus doesn't increase its refcount. This function is identical to gst_buffer_insert_memory() with an index of -1. See gst_buffer_insert_memory() for more details. a #GstBuffer. a #GstMemory. Appends @size bytes at @offset from @buf2 to @buf1. The result buffer will contain a concatenation of the memory of @buf1 and the requested region of @buf2. the new #GstBuffer that contains the memory of the two source buffers. the first source #GstBuffer to append. the second source #GstBuffer to append. the offset in @buf2 the size or -1 of @buf2 Creates a copy of the given buffer. This will only copy the buffer's data to a newly allocated memory if needed (if the type of memory requires it), otherwise the underlying data is just referenced. Check gst_buffer_copy_deep() if you want to force the data to be copied to newly allocated memory. a new copy of @buf if the copy succeeded, %NULL otherwise. a #GstBuffer. Creates a copy of the given buffer. This will make a newly allocated copy of the data the source buffer contains. a new copy of @buf if the copy succeeded, %NULL otherwise. a #GstBuffer. Copies the information from @src into @dest. If @dest already contains memory and @flags contains GST_BUFFER_COPY_MEMORY, the memory from @src will be appended to @dest. @flags indicate which fields will be copied. %TRUE if the copying succeeded, %FALSE otherwise. a destination #GstBuffer a source #GstBuffer flags indicating what metadata fields should be copied. offset to copy from total size to copy. If -1, all data is copied. Creates a sub-buffer from @parent at @offset and @size. This sub-buffer uses the actual memory space of the parent buffer. This function will copy the offset and timestamp fields when the offset is 0. If not, they will be set to #GST_CLOCK_TIME_NONE and #GST_BUFFER_OFFSET_NONE. If @offset equals 0 and @size equals the total size of @buffer, the duration and offset end fields are also copied. If not they will be set to #GST_CLOCK_TIME_NONE and #GST_BUFFER_OFFSET_NONE. the new #GstBuffer or %NULL if copying failed. a #GstBuffer. the #GstBufferCopyFlags the offset into parent #GstBuffer at which the new sub-buffer begins. the size of the new #GstBuffer sub-buffer, in bytes. If -1, all data is copied. Copies @size bytes starting from @offset in @buffer to @dest. The amount of bytes extracted. This value can be lower than @size when @buffer did not contain enough data. a #GstBuffer. the offset to extract the destination address the size to extract Extracts a copy of at most @size bytes the data at @offset into newly-allocated memory. @dest must be freed using g_free() when done. a #GstBuffer the offset to extract the size to extract A pointer where the destination array will be written. Might be %NULL if the size is 0. A location where the size of @dest can be written Copies @size bytes from @src to @buffer at @offset. The amount of bytes copied. This value can be lower than @size when @buffer did not contain enough data. a #GstBuffer. the offset to fill the source address the size to fill Finds the memory blocks that span @size bytes starting from @offset in @buffer. When this function returns %TRUE, @idx will contain the index of the first memory block where the byte for @offset can be found and @length contains the number of memory blocks containing the @size remaining bytes. @skip contains the number of bytes to skip in the memory block at @idx to get to the byte for @offset. @size can be -1 to get all the memory blocks after @idx. %TRUE when @size bytes starting from @offset could be found in @buffer and @idx, @length and @skip will be filled. a #GstBuffer. an offset a size pointer to index pointer to length pointer to skip Calls @func with @user_data for each meta in @buffer. @func can modify the passed meta pointer or its contents. The return value of @func defines if this function returns or if the remaining metadata items in the buffer should be skipped. %FALSE when @func returned %FALSE for one of the metadata. a #GstBuffer a #GstBufferForeachMetaFunc to call user data passed to @func Gets all the memory blocks in @buffer. The memory blocks will be merged into one large #GstMemory. a #GstMemory that contains the merged memory. a #GstBuffer. Finds the first #GstCustomMeta on @buffer for the desired @name. the #GstCustomMeta a #GstBuffer the registered name of the custom meta to retrieve. Gets the #GstBufferFlags flags set on this buffer. the flags set on this buffer. a #GstBuffer Gets the memory block at index @idx in @buffer. a #GstMemory that contains the data of the memory block at @idx. a #GstBuffer. an index Gets @length memory blocks in @buffer starting at @idx. The memory blocks will be merged into one large #GstMemory. If @length is -1, all memory starting from @idx is merged. a #GstMemory that contains the merged data of @length blocks starting at @idx. a #GstBuffer. an index a length Gets the metadata for @api on buffer. When there is no such metadata, %NULL is returned. If multiple metadata with the given @api are attached to this buffer only the first one is returned. To handle multiple metadata with a given API use gst_buffer_iterate_meta() or gst_buffer_foreach_meta() instead and check the `meta->info.api` member for the API type. the metadata for @api on @buffer. a #GstBuffer the #GType of an API number of metas of type @api_type on @buffer. a #GstBuffer the #GType of an API Finds the first #GstReferenceTimestampMeta on @buffer that conforms to @reference. Conformance is tested by checking if the meta's reference is a subset of @reference. Buffers can contain multiple #GstReferenceTimestampMeta metadata items. the #GstReferenceTimestampMeta or %NULL when there is no such metadata on @buffer. a #GstBuffer a reference #GstCaps Gets the total size of the memory blocks in @buffer. total size of the memory blocks in @buffer. a #GstBuffer. Gets the total size of the memory blocks in @buffer. When not %NULL, @offset will contain the offset of the data in the first memory block in @buffer and @maxsize will contain the sum of the size and @offset and the amount of extra padding on the last memory block. @offset and @maxsize can be used to resize the buffer memory blocks with gst_buffer_resize(). total size of the memory blocks in @buffer. a #GstBuffer. a pointer to the offset a pointer to the maxsize Gets the total size of @length memory blocks stating from @idx in @buffer. When not %NULL, @offset will contain the offset of the data in the memory block in @buffer at @idx and @maxsize will contain the sum of the size and @offset and the amount of extra padding on the memory block at @idx + @length -1. @offset and @maxsize can be used to resize the buffer memory blocks with gst_buffer_resize_range(). total size of @length memory blocks starting at @idx in @buffer. a #GstBuffer. an index a length a pointer to the offset a pointer to the maxsize Gives the status of a specific flag on a buffer. %TRUE if all flags in @flags are found on @buffer. a #GstBuffer the #GstBufferFlags flag to check. Inserts the memory block @mem into @buffer at @idx. This function takes ownership of @mem and thus doesn't increase its refcount. Only gst_buffer_get_max_memory() can be added to a buffer. If more memory is added, existing memory blocks will automatically be merged to make room for the new memory. a #GstBuffer. the index to add the memory at, or -1 to append it to the end a #GstMemory. Checks if all memory blocks in @buffer are writable. Note that this function does not check if @buffer is writable, use gst_buffer_is_writable() to check that if needed. %TRUE if all memory blocks in @buffer are writable a #GstBuffer. Checks if @length memory blocks in @buffer starting from @idx are writable. @length can be -1 to check all the memory blocks after @idx. Note that this function does not check if @buffer is writable, use gst_buffer_is_writable() to check that if needed. %TRUE if the memory range is writable a #GstBuffer. an index a length, should not be 0 Retrieves the next #GstMeta after @current. If @state points to %NULL, the first metadata is returned. @state will be updated with an opaque state pointer The next #GstMeta or %NULL when there are no more items. a #GstBuffer an opaque state pointer Retrieves the next #GstMeta of type @meta_api_type after the current one according to @state. If @state points to %NULL, the first metadata of type @meta_api_type is returned. @state will be updated with an opaque state pointer The next #GstMeta of type @meta_api_type or %NULL when there are no more items. a #GstBuffer an opaque state pointer only return #GstMeta of this type Fills @info with the #GstMapInfo of all merged memory blocks in @buffer. @flags describe the desired access of the memory. When @flags is #GST_MAP_WRITE, @buffer should be writable (as returned from gst_buffer_is_writable()). When @buffer is writable but the memory isn't, a writable copy will automatically be created and returned. The readonly copy of the buffer memory will then also be replaced with this writable copy. The memory in @info should be unmapped with gst_buffer_unmap() after usage. %TRUE if the map succeeded and @info contains valid data. a #GstBuffer. info about the mapping flags for the mapping Fills @info with the #GstMapInfo of @length merged memory blocks starting at @idx in @buffer. When @length is -1, all memory blocks starting from @idx are merged and mapped. @flags describe the desired access of the memory. When @flags is #GST_MAP_WRITE, @buffer should be writable (as returned from gst_buffer_is_writable()). When @buffer is writable but the memory isn't, a writable copy will automatically be created and returned. The readonly copy of the buffer memory will then also be replaced with this writable copy. The memory in @info should be unmapped with gst_buffer_unmap() after usage. %TRUE if the map succeeded and @info contains valid data. a #GstBuffer. an index a length info about the mapping flags for the mapping Compares @size bytes starting from @offset in @buffer with the memory in @mem. 0 if the memory is equal. a #GstBuffer. the offset in @buffer the memory to compare the size to compare Fills @buf with @size bytes with @val starting from @offset. The amount of bytes filled. This value can be lower than @size when @buffer did not contain enough data. a #GstBuffer. the offset in @buffer the value to set the size to set Gets the amount of memory blocks that this buffer has. This amount is never larger than what gst_buffer_get_max_memory() returns. the number of memory blocks this buffer is made of. a #GstBuffer. Gets the memory block at @idx in @buffer. The memory block stays valid until the memory block in @buffer is removed, replaced or merged, typically with any call that modifies the memory in @buffer. the #GstMemory at @idx. a #GstBuffer. an index Prepends the memory block @mem to @buffer. This function takes ownership of @mem and thus doesn't increase its refcount. This function is identical to gst_buffer_insert_memory() with an index of 0. See gst_buffer_insert_memory() for more details. a #GstBuffer. a #GstMemory. Increases the refcount of the given buffer by one. Note that the refcount affects the writability of @buf and its metadata, see gst_buffer_is_writable(). It is important to note that keeping additional references to GstBuffer instances can potentially increase the number of `memcpy` operations in a pipeline. @buf a #GstBuffer. Removes all the memory blocks in @buffer. a #GstBuffer. Removes the memory block in @b at index @i. a #GstBuffer. an index Removes @length memory blocks in @buffer starting from @idx. @length can be -1, in which case all memory starting from @idx is removed. a #GstBuffer. an index a length Removes the metadata for @meta on @buffer. %TRUE if the metadata existed and was removed, %FALSE if no such metadata was on @buffer. a #GstBuffer a #GstMeta Replaces all memory in @buffer with @mem. a #GstBuffer. a #GstMemory Replaces the memory block at index @idx in @buffer with @mem. a #GstBuffer. an index a #GstMemory Replaces @length memory blocks in @buffer starting at @idx with @mem. If @length is -1, all memory starting from @idx will be removed and replaced with @mem. @buffer should be writable. a #GstBuffer. an index a length, should not be 0 a #GstMemory Sets the offset and total size of the memory blocks in @buffer. a #GstBuffer. the offset adjustment the new size or -1 to just adjust the offset Sets the total size of the @length memory blocks starting at @idx in @buffer %TRUE if resizing succeeded, %FALSE otherwise. a #GstBuffer. an index a length the offset adjustment the new size or -1 to just adjust the offset Sets one or more buffer flags on a buffer. %TRUE if @flags were successfully set on buffer. a #GstBuffer the #GstBufferFlags to set. Sets the total size of the memory blocks in @buffer. a #GstBuffer. the new size Releases the memory previously mapped with gst_buffer_map(). a #GstBuffer. a #GstMapInfo Decreases the refcount of the buffer. If the refcount reaches 0, the buffer with the associated metadata and memory will be freed. a #GstBuffer. Clears one or more buffer flags. true if @flags is successfully cleared from buffer. a #GstBuffer the #GstBufferFlags to clear 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. the maximum amount of memory blocks that a buffer can hold. Modifies a pointer to a #GstBuffer to point to a different #GstBuffer. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old buffer is unreffed, the new is reffed). Either @nbuf or the #GstBuffer pointed to by @obuf may be %NULL. %TRUE when @obuf was different from @nbuf. pointer to a pointer to a #GstBuffer to be replaced. pointer to a #GstBuffer that will replace the buffer pointed to by @obuf. A set of flags that can be provided to the gst_buffer_copy_into() function to specify which items should be copied. copy nothing flag indicating that buffer flags should be copied flag indicating that buffer pts, dts, duration, offset and offset_end should be copied flag indicating that buffer meta should be copied flag indicating that buffer memory should be reffed and appended to already existing memory. Unless the memory is marked as NO_SHARE, no actual copy of the memory is made but it is simply reffed. Add @GST_BUFFER_COPY_DEEP to force a real copy. flag indicating that buffer memory should be merged flag indicating that memory should always be copied instead of reffed A set of buffer flags used to describe properties of a #GstBuffer. the buffer is live data and should be discarded in the PAUSED state. the buffer contains data that should be dropped because it will be clipped against the segment boundaries or because it does not contain data that should be shown to the user. the buffer marks a data discontinuity in the stream. This typically occurs after a seek or a dropped buffer from a live or network source. the buffer timestamps might have a discontinuity and this buffer is a good point to resynchronize. the buffer data is corrupted. the buffer contains a media specific marker. for video this is the end of a frame boundary, for audio this is the start of a talkspurt. for RTP packets this matches the marker flag in the RTP packet header. the buffer contains header information that is needed to decode the following data. the buffer has been created to fill a gap in the stream and contains media neutral data (elements can switch to optimized code path that ignores the buffer content). the buffer can be dropped without breaking the stream, for example to reduce bandwidth. this unit cannot be decoded independently. this flag is set when memory of the buffer is added/removed Elements which write to disk or permanent storage should ensure the data is synced after writing the contents of this buffer. This buffer is important and should not be dropped. This can be used to mark important buffers, e.g. to flag RTP packets carrying keyframes or codec setup data for RTP Forward Error Correction purposes, or to prevent still video frames from being dropped by elements due to QoS. additional media specific flags can be added starting from this flag. A function that will be called from gst_buffer_foreach_meta(). The @meta field will point to a the reference of the meta. @buffer should not be modified from this callback. When this function returns %TRUE, the next meta will be returned. When %FALSE is returned, gst_buffer_foreach_meta() will return. When @meta is set to %NULL, the item will be removed from the buffer. %FALSE when gst_buffer_foreach_meta() should stop a #GstBuffer a pointer to a #GstMeta user data passed to gst_buffer_foreach_meta() Buffer lists are an object containing a list of buffers. Buffer lists are created with gst_buffer_list_new() and filled with data using gst_buffer_list_insert(). Buffer lists can be pushed on a srcpad with gst_pad_push_list(). This is interesting when multiple buffers need to be pushed in one go because it can reduce the amount of overhead for pushing each buffer individually. Creates a new, empty #GstBufferList. the new #GstBufferList. Creates a new, empty #GstBufferList. The list will have @size space preallocated so that memory reallocations can be avoided. the new #GstBufferList. an initial reserved size Calculates the size of the data contained in @list by adding the size of all buffers. the size of the data contained in @list in bytes. a #GstBufferList Creates a shallow copy of the given buffer list. This will make a newly allocated copy of the source list with copies of buffer pointers. The refcount of buffers pointed to will be increased by one. a new copy of @list. a #GstBufferList Creates a copy of the given buffer list. This will make a newly allocated copy of the buffers that the source buffer list contains. a new copy of @list. a #GstBufferList Calls @func with @data for each buffer in @list. @func can modify the passed buffer pointer or its contents. The return value of @func defines if this function returns or if the remaining buffers in the list should be skipped. %TRUE when @func returned %TRUE for each buffer in @list or when @list is empty. a #GstBufferList a #GstBufferListFunc to call user data passed to @func Gets the buffer at @idx. You must make sure that @idx does not exceed the number of buffers available. the buffer at @idx in @group. The returned buffer remains valid as long as @list is valid and buffer is not removed from the list. a #GstBufferList the index Gets the buffer at @idx, ensuring it is a writable buffer. You must make sure that @idx does not exceed the number of buffers available. the buffer at @idx in @group. The returned buffer remains valid as long as @list is valid and the buffer is not removed from the list. a (writable) #GstBufferList the index Inserts @buffer at @idx in @list. Other buffers are moved to make room for this new buffer. A -1 value for @idx will append the buffer at the end. a #GstBufferList the index a #GstBuffer Returns the number of buffers in @list. the number of buffers in the buffer list a #GstBufferList Increases the refcount of the given buffer list by one. Note that the refcount affects the writability of @list and its data, see gst_buffer_list_make_writable(). It is important to note that keeping additional references to GstBufferList instances can potentially increase the number of memcpy operations in a pipeline. @list a #GstBufferList Removes @length buffers starting from @idx in @list. The following buffers are moved to close the gap. a #GstBufferList the index the amount to remove Decreases the refcount of the buffer list. If the refcount reaches 0, the buffer list will be freed. a #GstBufferList Modifies a pointer to a #GstBufferList to point to a different #GstBufferList. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old buffer list is unreffed, the new is reffed). Either @new_list or the #GstBufferList pointed to by @old_list may be %NULL. %TRUE if @new_list was different from @old_list pointer to a pointer to a #GstBufferList to be replaced. pointer to a #GstBufferList that will replace the buffer list pointed to by @old_list. Modifies a pointer to a #GstBufferList to point to a different #GstBufferList. This function is similar to gst_buffer_list_replace() except that it takes ownership of @new_list. %TRUE if @new_list was different from @old_list pointer to a pointer to a #GstBufferList to be replaced. pointer to a #GstBufferList that will replace the bufferlist pointed to by @old_list. A function that will be called from gst_buffer_list_foreach(). The @buffer field will point to a the reference of the buffer at @idx. When this function returns %TRUE, the next buffer will be returned. When %FALSE is returned, gst_buffer_list_foreach() will return. When @buffer is set to %NULL, the item will be removed from the bufferlist. When @buffer has been made writable, the new buffer reference can be assigned to @buffer. This function is responsible for unreffing the old buffer when removing or modifying. %FALSE when gst_buffer_list_foreach() should stop pointer to the buffer the index of @buffer user data passed to gst_buffer_list_foreach() A #GstBufferPool is an object that can be used to pre-allocate and recycle buffers of the same size and with the same properties. A #GstBufferPool is created with gst_buffer_pool_new(). Once a pool is created, it needs to be configured. A call to gst_buffer_pool_get_config() returns the current configuration structure from the pool. With gst_buffer_pool_config_set_params() and gst_buffer_pool_config_set_allocator() the bufferpool parameters and allocator can be configured. Other properties can be configured in the pool depending on the pool implementation. A bufferpool can have extra options that can be enabled with gst_buffer_pool_config_add_option(). The available options can be retrieved with gst_buffer_pool_get_options(). Some options allow for additional configuration properties to be set. After the configuration structure has been configured, gst_buffer_pool_set_config() updates the configuration in the pool. This can fail when the configuration structure is not accepted. After the pool has been configured, it can be activated with gst_buffer_pool_set_active(). This will preallocate the configured resources in the pool. When the pool is active, gst_buffer_pool_acquire_buffer() can be used to retrieve a buffer from the pool. Buffers allocated from a bufferpool will automatically be returned to the pool with gst_buffer_pool_release_buffer() when their refcount drops to 0. The bufferpool can be deactivated again with gst_buffer_pool_set_active(). All further gst_buffer_pool_acquire_buffer() calls will return an error. When all buffers are returned to the pool they will be freed. Creates a new #GstBufferPool instance. a new #GstBufferPool instance Enables the option in @config. This will instruct the @bufferpool to enable the specified option on the buffers that it allocates. The options supported by @pool can be retrieved with gst_buffer_pool_get_options(). a #GstBufferPool configuration an option to add Gets the @allocator and @params from @config. %TRUE, if the values are set. a #GstBufferPool configuration a #GstAllocator, or %NULL #GstAllocationParams, or %NULL Parses an available @config and gets the option at @index of the options API array. the option at @index. a #GstBufferPool configuration position in the option array to read Gets the configuration values from @config. %TRUE if all parameters could be fetched. a #GstBufferPool configuration the caps of buffers the size of each buffer, not including prefix and padding the minimum amount of buffers to allocate. the maximum amount of buffers to allocate or 0 for unlimited. Checks if @config contains @option. %TRUE if the options array contains @option. a #GstBufferPool configuration an option Retrieves the number of values currently stored in the options array of the @config structure. the options array size as a #guint. a #GstBufferPool configuration Sets the @allocator and @params on @config. One of @allocator and @params can be %NULL, but not both. When @allocator is %NULL, the default allocator of the pool will use the values in @param to perform its allocation. When @param is %NULL, the pool will use the provided @allocator with its default #GstAllocationParams. A call to gst_buffer_pool_set_config() can update the allocator and params with the values that it is able to do. Some pools are, for example, not able to operate with different allocators or cannot allocate with the values specified in @params. Use gst_buffer_pool_get_config() to get the currently used values. a #GstBufferPool configuration a #GstAllocator #GstAllocationParams Configures @config with the given parameters. a #GstBufferPool configuration caps for the buffers the size of each buffer, not including prefix and padding the minimum amount of buffers to allocate. the maximum amount of buffers to allocate or 0 for unlimited. Validates that changes made to @config are still valid in the context of the expected parameters. This function is a helper that can be used to validate changes made by a pool to a config when gst_buffer_pool_set_config() returns %FALSE. This expects that @caps haven't changed and that @min_buffers aren't lower then what we initially expected. This does not check if options or allocator parameters are still valid, won't check if size have changed, since changing the size is valid to adapt padding. %TRUE, if the parameters are valid in this context. a #GstBufferPool configuration the excepted caps of buffers the expected size of each buffer, not including prefix and padding the expected minimum amount of buffers to allocate. the expect maximum amount of buffers to allocate or 0 for unlimited. Acquires a buffer from @pool. @buffer should point to a memory location that can hold a pointer to the new buffer. When the pool is empty, this function will by default block until a buffer is released into the pool again or when the pool is set to flushing or deactivated. @params can contain optional parameters to influence the allocation. a #GstFlowReturn such as %GST_FLOW_FLUSHING when the pool is inactive. a #GstBufferPool a location for a #GstBuffer parameters. Allocate a buffer. the default implementation allocates buffers from the configured memory allocator and with the configured parameters. All metadata that is present on the allocated buffer will be marked as #GST_META_FLAG_POOLED and #GST_META_FLAG_LOCKED and will not be removed from the buffer in #GstBufferPoolClass::reset_buffer. The buffer should have the #GST_BUFFER_FLAG_TAG_MEMORY cleared. a #GstFlowReturn to indicate whether the allocation was successful. the #GstBufferPool a location for a #GstBuffer parameters. Enter the flushing state. the #GstBufferPool Leave the flushing state. the #GstBufferPool Free a buffer. The default implementation unrefs the buffer. the #GstBufferPool the #GstBuffer to free Gets a %NULL terminated array of string with supported bufferpool options for @pool. An option would typically be enabled with gst_buffer_pool_config_add_option(). a %NULL terminated array of strings. a #GstBufferPool Releases @buffer to @pool. @buffer should have previously been allocated from @pool with gst_buffer_pool_acquire_buffer(). This function is usually called automatically when the last ref on @buffer disappears. a #GstBufferPool a #GstBuffer Reset the buffer to its state when it was freshly allocated. The default implementation will clear the flags, timestamps and will remove the metadata without the #GST_META_FLAG_POOLED flag (even the metadata with #GST_META_FLAG_LOCKED). If the #GST_BUFFER_FLAG_TAG_MEMORY was set, this function can also try to restore the memory and clear the #GST_BUFFER_FLAG_TAG_MEMORY again. the #GstBufferPool the #GstBuffer to reset Sets the configuration of the pool. If the pool is already configured, and the configuration hasn't changed, this function will return %TRUE. If the pool is active, this method will return %FALSE and active configuration will remain. Buffers allocated from this pool must be returned or else this function will do nothing and return %FALSE. @config is a #GstStructure that contains the configuration parameters for the pool. A default and mandatory set of parameters can be configured with gst_buffer_pool_config_set_params(), gst_buffer_pool_config_set_allocator() and gst_buffer_pool_config_add_option(). If the parameters in @config can not be set exactly, this function returns %FALSE and will try to update as much state as possible. The new state can then be retrieved and refined with gst_buffer_pool_get_config(). This function takes ownership of @config. %TRUE when the configuration could be set. a #GstBufferPool a #GstStructure Start the bufferpool. The default implementation will preallocate min-buffers buffers and put them in the queue. Subclasses do not need to chain up to the parent's default implementation if they don't want min-buffers based preallocation. whether the pool could be started. the #GstBufferPool Stop the bufferpool. the default implementation will free the preallocated buffers. This function is called when all the buffers are returned to the pool. whether the pool could be stopped. the #GstBufferPool Acquires a buffer from @pool. @buffer should point to a memory location that can hold a pointer to the new buffer. When the pool is empty, this function will by default block until a buffer is released into the pool again or when the pool is set to flushing or deactivated. @params can contain optional parameters to influence the allocation. a #GstFlowReturn such as %GST_FLOW_FLUSHING when the pool is inactive. a #GstBufferPool a location for a #GstBuffer parameters. Gets a copy of the current configuration of the pool. This configuration can be modified and used for the gst_buffer_pool_set_config() call. a copy of the current configuration of @pool. a #GstBufferPool Gets a %NULL terminated array of string with supported bufferpool options for @pool. An option would typically be enabled with gst_buffer_pool_config_add_option(). a %NULL terminated array of strings. a #GstBufferPool Checks if the bufferpool supports @option. %TRUE if the buffer pool contains @option. a #GstBufferPool an option Checks if @pool is active. A pool can be activated with the gst_buffer_pool_set_active() call. %TRUE when the pool is active. a #GstBufferPool Releases @buffer to @pool. @buffer should have previously been allocated from @pool with gst_buffer_pool_acquire_buffer(). This function is usually called automatically when the last ref on @buffer disappears. a #GstBufferPool a #GstBuffer Controls the active state of @pool. When the pool is inactive, new calls to gst_buffer_pool_acquire_buffer() will return with %GST_FLOW_FLUSHING. Activating the bufferpool will preallocate all resources in the pool based on the configuration of the pool. Deactivating will free the resources again when there are no outstanding buffers. When there are outstanding buffers, they will be freed as soon as they are all returned to the pool. %FALSE when the pool was not configured or when preallocation of the buffers failed. a #GstBufferPool the new active state Sets the configuration of the pool. If the pool is already configured, and the configuration hasn't changed, this function will return %TRUE. If the pool is active, this method will return %FALSE and active configuration will remain. Buffers allocated from this pool must be returned or else this function will do nothing and return %FALSE. @config is a #GstStructure that contains the configuration parameters for the pool. A default and mandatory set of parameters can be configured with gst_buffer_pool_config_set_params(), gst_buffer_pool_config_set_allocator() and gst_buffer_pool_config_add_option(). If the parameters in @config can not be set exactly, this function returns %FALSE and will try to update as much state as possible. The new state can then be retrieved and refined with gst_buffer_pool_get_config(). This function takes ownership of @config. %TRUE when the configuration could be set. a #GstBufferPool a #GstStructure Enables or disables the flushing state of a @pool without freeing or allocating buffers. a #GstBufferPool whether to start or stop flushing the parent structure whether the pool is currently gathering back outstanding buffers Additional flags to control the allocation of a buffer no flags buffer is keyframe when the bufferpool is empty, acquire_buffer will by default block until a buffer is released into the pool again. Setting this flag makes acquire_buffer return #GST_FLOW_EOS instead of blocking. buffer is discont last flag, subclasses can use private flags starting from this value. Parameters passed to the gst_buffer_pool_acquire_buffer() function to control the allocation of the buffer. The default implementation ignores the @start and @stop members but other implementations can use this extra information to decide what buffer to return. the format of @start and @stop the start position the stop position additional flags The #GstBufferPool class. Object parent class a %NULL terminated array of strings. a #GstBufferPool %TRUE when the configuration could be set. a #GstBufferPool a #GstStructure whether the pool could be started. the #GstBufferPool whether the pool could be stopped. the #GstBufferPool a #GstFlowReturn such as %GST_FLOW_FLUSHING when the pool is inactive. a #GstBufferPool a location for a #GstBuffer parameters. a #GstFlowReturn to indicate whether the allocation was successful. the #GstBufferPool a location for a #GstBuffer parameters. the #GstBufferPool the #GstBuffer to reset a #GstBufferPool a #GstBuffer the #GstBufferPool the #GstBuffer to free the #GstBufferPool the #GstBufferPool The different types of buffering methods. a small amount of data is buffered the stream is being downloaded the stream is being downloaded in a ringbuffer the stream is a live stream The #GstBus is an object responsible for delivering #GstMessage packets in a first-in first-out way from the streaming threads (see #GstTask) to the application. Since the application typically only wants to deal with delivery of these messages from one thread, the GstBus will marshall the messages between different threads. This is important since the actual streaming of media is done in another thread than the application. The GstBus provides support for #GSource based notifications. This makes it possible to handle the delivery in the glib #GMainLoop. The #GSource callback function gst_bus_async_signal_func() can be used to convert all bus messages into signal emissions. A message is posted on the bus with the gst_bus_post() method. With the gst_bus_peek() and gst_bus_pop() methods one can look at or retrieve a previously posted message. The bus can be polled with the gst_bus_poll() method. This methods blocks up to the specified timeout value until one of the specified messages types is posted on the bus. The application can then gst_bus_pop() the messages from the bus to handle them. Alternatively the application can register an asynchronous bus function using gst_bus_add_watch_full() or gst_bus_add_watch(). This function will install a #GSource in the default glib main loop and will deliver messages a short while after they have been posted. Note that the main loop should be running for the asynchronous callbacks. It is also possible to get messages from the bus without any thread marshalling with the gst_bus_set_sync_handler() method. This makes it possible to react to a message in the same thread that posted the message on the bus. This should only be used if the application is able to deal with messages from different threads. Every #GstPipeline has one bus. Note that a #GstPipeline will set its bus into flushing state when changing from READY to NULL state. Creates a new #GstBus instance. a new #GstBus instance A message has been posted on the bus. the #GstBus the message that has been posted asynchronously A message has been posted on the bus. the #GstBus the message that has been posted synchronously Adds a bus signal watch to the default main context with the default priority ( %G_PRIORITY_DEFAULT ). It is also possible to use a non-default main context set up using g_main_context_push_thread_default() (before one had to create a bus watch source and attach it to the desired main context 'manually'). After calling this statement, the bus will emit the "message" signal for each message posted on the bus. This function may be called multiple times. To clean up, the caller is responsible for calling gst_bus_remove_signal_watch() as many times as this function is called. a #GstBus on which you want to receive the "message" signal Adds a bus signal watch to the default main context with the given @priority (e.g. %G_PRIORITY_DEFAULT). It is also possible to use a non-default main context set up using g_main_context_push_thread_default() (before one had to create a bus watch source and attach it to the desired main context 'manually'). After calling this statement, the bus will emit the "message" signal for each message posted on the bus when the #GMainLoop is running. This function may be called multiple times. To clean up, the caller is responsible for calling gst_bus_remove_signal_watch() as many times as this function is called. There can only be a single bus watch per bus, you must remove any signal watch before you can set another type of watch. a #GstBus on which you want to receive the "message" signal The priority of the watch. Adds a bus watch to the default main context with the default priority ( %G_PRIORITY_DEFAULT ). It is also possible to use a non-default main context set up using g_main_context_push_thread_default() (before one had to create a bus watch source and attach it to the desired main context 'manually'). This function is used to receive asynchronous messages in the main loop. There can only be a single bus watch per bus, you must remove it before you can set a new one. The bus watch will only work if a #GMainLoop is being run. The watch can be removed using gst_bus_remove_watch() or by returning %FALSE from @func. If the watch was added to the default main context it is also possible to remove the watch using g_source_remove(). The bus watch will take its own reference to the @bus, so it is safe to unref @bus using gst_object_unref() after setting the bus watch. The event source id or 0 if @bus already got an event source. a #GstBus to create the watch for A function to call when a message is received. user data passed to @func. Adds a bus watch to the default main context with the given @priority (e.g. %G_PRIORITY_DEFAULT). It is also possible to use a non-default main context set up using g_main_context_push_thread_default() (before one had to create a bus watch source and attach it to the desired main context 'manually'). This function is used to receive asynchronous messages in the main loop. There can only be a single bus watch per bus, you must remove it before you can set a new one. The bus watch will only work if a #GMainLoop is being run. When @func is called, the message belongs to the caller; if you want to keep a copy of it, call gst_message_ref() before leaving @func. The watch can be removed using gst_bus_remove_watch() or by returning %FALSE from @func. If the watch was added to the default main context it is also possible to remove the watch using g_source_remove(). The bus watch will take its own reference to the @bus, so it is safe to unref @bus using gst_object_unref() after setting the bus watch. The event source id or 0 if @bus already got an event source. a #GstBus to create the watch for. The priority of the watch. A function to call when a message is received. user data passed to @func. the function to call when the source is removed. A helper #GstBusFunc that can be used to convert all asynchronous messages into signals. %TRUE a #GstBus the #GstMessage received user data Create watch for this bus. The #GSource will be dispatched whenever a message is on the bus. After the GSource is dispatched, the message is popped off the bus and unreffed. As with other watches, there can only be one watch on the bus, including any signal watch added with #gst_bus_add_signal_watch. a #GSource that can be added to a #GMainLoop. a #GstBus to create the watch for Instructs GStreamer to stop emitting the "sync-message" signal for this bus. See gst_bus_enable_sync_message_emission() for more information. In the event that multiple pieces of code have called gst_bus_enable_sync_message_emission(), the sync-message emissions will only be stopped after all calls to gst_bus_enable_sync_message_emission() were "cancelled" by calling this function. In this way the semantics are exactly the same as gst_object_ref() that which calls enable should also call disable. a #GstBus on which you previously called gst_bus_enable_sync_message_emission() Instructs GStreamer to emit the "sync-message" signal after running the bus's sync handler. This function is here so that code can ensure that they can synchronously receive messages without having to affect what the bin's sync handler is. This function may be called multiple times. To clean up, the caller is responsible for calling gst_bus_disable_sync_message_emission() as many times as this function is called. While this function looks similar to gst_bus_add_signal_watch(), it is not exactly the same -- this function enables *synchronous* emission of signals when messages arrive; gst_bus_add_signal_watch() adds an idle callback to pop messages off the bus *asynchronously*. The sync-message signal comes from the thread of whatever object posted the message; the "message" signal is marshalled to the main thread via the #GMainLoop. a #GstBus on which you want to receive the "sync-message" signal Gets the file descriptor from the bus which can be used to get notified about messages being available with functions like g_poll(), and allows integration into other event loops based on file descriptors. Whenever a message is available, the POLLIN / %G_IO_IN event is set. Warning: NEVER read or write anything to the returned fd but only use it for getting notifications via g_poll() or similar and then use the normal GstBus API, e.g. gst_bus_pop(). A #GstBus A GPollFD to fill Checks if there are pending messages on the bus that should be handled. %TRUE if there are messages on the bus to be handled, %FALSE otherwise. a #GstBus to check Peeks the message on the top of the bus' queue. The message will remain on the bus' message queue. the #GstMessage that is on the bus, or %NULL if the bus is empty. a #GstBus Polls the bus for messages. Will block while waiting for messages to come. You can specify a maximum time to poll with the @timeout parameter. If @timeout is negative, this function will block indefinitely. All messages not in @events will be popped off the bus and will be ignored. It is not possible to use message enums beyond #GST_MESSAGE_EXTENDED in the @events mask Because poll is implemented using the "message" signal enabled by gst_bus_add_signal_watch(), calling gst_bus_poll() will cause the "message" signal to be emitted for every message that poll sees. Thus a "message" signal handler will see the same messages that this function sees -- neither will steal messages from the other. This function will run a #GMainLoop from the default main context when polling. You should never use this function, since it is pure evil. This is especially true for GUI applications based on Gtk+ or Qt, but also for any other non-trivial application that uses the GLib main loop. As this function runs a GLib main loop, any callback attached to the default GLib main context may be invoked. This could be timeouts, GUI events, I/O events etc.; even if gst_bus_poll() is called with a 0 timeout. Any of these callbacks may do things you do not expect, e.g. destroy the main application window or some other resource; change other application state; display a dialog and run another main loop until the user clicks it away. In short, using this function may add a lot of complexity to your code through unexpected re-entrancy and unexpected changes to your application's state. For 0 timeouts use gst_bus_pop_filtered() instead of this function; for other short timeouts use gst_bus_timed_pop_filtered(); everything else is better handled by setting up an asynchronous bus watch and doing things from there. the message that was received, or %NULL if the poll timed out. a #GstBus a mask of #GstMessageType, representing the set of message types to poll for (note special handling of extended message types below) the poll timeout, as a #GstClockTime, or #GST_CLOCK_TIME_NONE to poll indefinitely. Gets a message from the bus. the #GstMessage that is on the bus, or %NULL if the bus is empty. a #GstBus to pop Gets a message matching @type from the bus. Will discard all messages on the bus that do not match @type and that have been posted before the first message that does match @type. If there is no message matching @type on the bus, all messages will be discarded. It is not possible to use message enums beyond #GST_MESSAGE_EXTENDED in the @events mask. the next #GstMessage matching @type that is on the bus, or %NULL if the bus is empty or there is no message matching @type. a #GstBus to pop message types to take into account Posts a message on the given bus. Ownership of the message is taken by the bus. %TRUE if the message could be posted, %FALSE if the bus is flushing. a #GstBus to post on the #GstMessage to post Removes a signal watch previously added with gst_bus_add_signal_watch(). a #GstBus you previously added a signal watch to Removes an installed bus watch from @bus. %TRUE on success or %FALSE if @bus has no event source. a #GstBus to remove the watch from. If @flushing, flushes out and unrefs any messages queued in the bus. Releases references to the message origin objects. Will flush future messages until gst_bus_set_flushing() sets @flushing to %FALSE. a #GstBus whether or not to flush the bus Sets the synchronous handler on the bus. The function will be called every time a new message is posted on the bus. Note that the function will be called in the same thread context as the posting object. This function is usually only called by the creator of the bus. Applications should handle messages asynchronously using the gst_bus watch and poll functions. Before 1.16.3 it was not possible to replace an existing handler and clearing an existing handler with %NULL was not thread-safe. a #GstBus to install the handler on The handler function to install User data that will be sent to the handler function. called when @user_data becomes unused A helper #GstBusSyncHandler that can be used to convert all synchronous messages into signals. %GST_BUS_PASS a #GstBus the #GstMessage received user data Gets a message from the bus, waiting up to the specified timeout. If @timeout is 0, this function behaves like gst_bus_pop(). If @timeout is #GST_CLOCK_TIME_NONE, this function will block forever until a message was posted on the bus. the #GstMessage that is on the bus after the specified timeout or %NULL if the bus is empty after the timeout expired. a #GstBus to pop a timeout Gets a message from the bus whose type matches the message type mask @types, waiting up to the specified timeout (and discarding any messages that do not match the mask provided). If @timeout is 0, this function behaves like gst_bus_pop_filtered(). If @timeout is #GST_CLOCK_TIME_NONE, this function will block forever until a matching message was posted on the bus. a #GstMessage matching the filter in @types, or %NULL if no matching message was found on the bus until the timeout expired. a #GstBus to pop from a timeout in nanoseconds, or %GST_CLOCK_TIME_NONE to wait forever message types to take into account, %GST_MESSAGE_ANY for any type Enables async message delivery support for bus watches, gst_bus_pop() and similar API. Without this only the synchronous message handlers are called. This property is used to create the child element buses in #GstBin. the parent structure A message has been posted on the bus. This signal is emitted from a #GSource added to the mainloop. this signal will only be emitted when there is a #GMainLoop running. the message that has been posted asynchronously A message has been posted on the bus. This signal is emitted from the thread that posted the message so one has to be careful with locking. This signal will not be emitted by default, you have to call gst_bus_enable_sync_message_emission() before. the message that has been posted synchronously GStreamer bus class. the parent class structure the #GstBus the message that has been posted asynchronously the #GstBus the message that has been posted synchronously The standard flags that a bus may have. The bus is currently dropping all messages offset to define more flags Specifies the type of function passed to gst_bus_add_watch() or gst_bus_add_watch_full(), which is called from the mainloop when a message is available on the bus. The message passed to the function will be unreffed after execution of this function so it should not be freed in the function. Note that this function is used as a #GSourceFunc which means that returning %FALSE will remove the #GSource from the mainloop. %FALSE if the event source should be removed. the #GstBus that sent the message the #GstMessage user data that has been given, when registering the handler Handler will be invoked synchronously, when a new message has been injected into the bus. This function is mostly used internally. Only one sync handler can be attached to a given bus. If the handler returns %GST_BUS_DROP, it should unref the message, else the message should not be unreffed by the sync handler. #GstBusSyncReply stating what to do with the message the #GstBus that sent the message the #GstMessage user data that has been given, when registering the handler The result values for a GstBusSyncHandler. drop the message pass the message to the async queue pass message to async queue, continue if message is handled Interface for an array of bytes. It is expected to be subclassed to implement @resize virtual method using language native array implementation, such as GLib's #GByteArray, C++'s `std::vector<uint8_t>` or Rust's `Vec<u8>`. @resize implementation could allocate more than requested to avoid repeated reallocations. It can return %FALSE, or be set to %NULL, in the case the array cannot grow. A pointer to an array of bytes. Number of bytes in @data. Reallocate @data. Just call the parent handler. This assumes that there is a variable named parent_class that points to the (duh!) parent class. Note that this macro is not to be used with things that return something, use the _WITH_DEFAULT version for that the name of the class cast macro for the parent type name of the function to call arguments enclosed in '( )' Same as GST_CALL_PARENT(), but in case there is no implementation, it evaluates to @def_return. the name of the class cast macro for the parent type name of the function to call arguments enclosed in '( )' default result Gets a flags word containing #GstCapsFlags flags set on this caps. a #GstCaps. Gives the status of a specific flag on a caps. a #GstCaps. the #GstCapsFlags to check. Sets a caps flag on a caps. a #GstCaps. the #GstCapsFlags to set. Clears a caps flag. a #GstCaps. the #GstCapsFlags to clear. Checks if the number of structures in the given caps is exactly one. the #GstCaps instance to check Gives access to the reference count field of the caps a #GstCaps Gets the reference count value of the caps. a #GstCaps Output an debugging message in the given category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. category to use printf-style message to output Output an debugging message belonging to the given object in the given category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. category to use the #GObject the message belongs to printf-style message to output Output an error message in the given category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. category to use printf-style message to output Output an error message belonging to the given object in the given category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. category to use the #GObject the message belongs to printf-style message to output Output an fixme message in the given category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. category to use printf-style message to output Output a fixme message belonging to the given object in the given category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. category to use the #GObject the message belongs to printf-style message to output Output an informational message in the given category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. category to use printf-style message to output Output an informational message belonging to the given object in the given category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. category to use the #GObject the message belongs to printf-style message to output Outputs a debugging message. This is the most general macro for outputting debugging messages. You will probably want to use one of the ones described below. There is no need to finish the end of the debug message with a newline character, a newline character will be added automatically. category to use the severity of the message the #GObject the message belongs to or %NULL if none A printf-style message to output Outputs a debugging message. This is the most general macro for outputting debugging messages. You will probably want to use one of the ones described below. There is no need to finish the end of the debug message with a newline character, a newline character will be added automatically. category to use the severity of the message the identifier of the object this message relates to, or %NULL if none A printf-style message to output Output an logging message in the given category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. category to use printf-style message to output Output an logging message belonging to the given object in the given category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. category to use the #GObject the message belongs to printf-style message to output Output a hexdump of @data in the given category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. category to use message string to log with the data pointer to the data to output length of the data to output Output a hexdump of @data relating to the given @id in the given category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. category to use An identifier of the message provider message string to log with the data pointer to the data to output length of the data to output Output a hexdump of @data relating to the given object in the given category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. category to use the #GObject the message belongs to message string to log with the data pointer to the data to output length of the data to output Output a tracing message in the given category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. category to use printf-style message to output Output a tracing message belonging to the given object in the given category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. category to use the #GObject the message belongs to printf-style message to output Output an warning message in the given category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. category to use printf-style message to output Output a warning message belonging to the given object in the given category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. category to use the #GObject the message belongs to printf-style message to output Check whether a GStreamer version equal to or greater than major.minor.micro is present. Note: Since version 1.22 this macro can no longer be used to check that current git version maps to the next version. So for instance, GST_CHECK_VERSION(1, 22, 0) on a git checkout of the 1.21 development version will expand to `FALSE`. a number indicating the major version a number indicating the minor version a number indicating the micro version Calculates a difference between two clock times as a #GstClockTimeDiff. The difference is calculated as @e - @s. the first time the second time Casts to a clock entry the entry to cast Gets the owner clock of the entry Use gst_clock_id_get_clock() instead. the entry to query Gets the interval of this periodic entry the entry to query The status of the entry the entry to query Gets the requested time of this entry the entry to query Gets the type of the clock entry the entry to query Gets the #GstClockFlags clock flags. the clock to query Tests if a given #GstClockTimeDiff of #gint64 represents a valid defined time. signed clock time to validate Tests if a given #GstClockTime represents a valid defined time. clock time to validate Constant to define an undefined clock time. Caps (capabilities) are lightweight refcounted objects describing media types. They are composed of an array of #GstStructure. Caps are exposed on #GstPadTemplate to describe all possible types a given pad can handle. They are also stored in the #GstRegistry along with a description of the #GstElement. Caps are exposed on the element pads using the gst_pad_query_caps() pad function. This function describes the possible types that the pad can handle or produce at runtime. A #GstCaps can be constructed with the following code fragment: ``` C GstCaps *caps = gst_caps_new_simple ("video/x-raw", "format", G_TYPE_STRING, "I420", "framerate", GST_TYPE_FRACTION, 25, 1, "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1, "width", G_TYPE_INT, 320, "height", G_TYPE_INT, 240, NULL); ``` A #GstCaps is fixed when it has no fields with ranges or lists. Use gst_caps_is_fixed() to test for fixed caps. Fixed caps can be used in a caps event to notify downstream elements of the current media type. Various methods exist to work with the media types such as subtracting or intersecting. Be aware that until 1.20 the #GstCaps / #GstStructure serialization into string had limited support for nested #GstCaps / #GstStructure fields. It could only support one level of nesting. Using more levels would lead to unexpected behavior when using serialization features, such as gst_caps_to_string() or gst_value_serialize() and their counterparts. the parent type Creates a new #GstCaps that indicates that it is compatible with any media format. the new #GstCaps Creates a new #GstCaps that is empty. That is, the returned #GstCaps contains no media formats. The #GstCaps is guaranteed to be writable. the new #GstCaps Creates a new #GstCaps that contains one #GstStructure with name @media_type. the new #GstCaps the media type of the structure Creates a new #GstCaps and adds all the structures listed as arguments. The list must be %NULL-terminated. The structures are not copied; the returned #GstCaps owns the structures. the new #GstCaps the first structure to add additional structures to add Creates a new #GstCaps and adds all the structures listed as arguments. The list must be %NULL-terminated. The structures are not copied; the returned #GstCaps owns the structures. the new #GstCaps the first structure to add additional structures to add Creates a new #GstCaps that contains one #GstStructure with name @media_type. the new #GstCaps the media type of the structure Creates a new #GstCaps that contains one #GstStructure. The structure is defined by the arguments, which have the same format as gst_structure_new(). the new #GstCaps the media type of the structure first field to set additional arguments Creates a new #GstCaps that contains one #GstStructure. The structure is defined by the arguments, which have the same format as gst_structure_new(). the new #GstCaps the media type of the structure first field to set additional arguments Creates a new #GstCaps that contains one #GstStructure with name @media_type. @media_type needs to be valid for the remaining lifetime of the process, e.g. has to be a static string. the new #GstCaps the media type of the structure Creates a new #GstCaps that contains one #GstStructure. The structure is defined by the arguments, which have the same format as gst_structure_new(). @media_type, @fieldname and all other fieldnames need to be valid for the remaining lifetime of the process, e.g. have to be static strings. the new #GstCaps the media type of the structure first field to set additional arguments Appends the structures contained in @caps2 to @caps1. The structures in @caps2 are not copied -- they are transferred to @caps1, and then @caps2 is freed. If either caps is ANY, the resulting caps will be ANY. the #GstCaps that will be appended to the #GstCaps to append Appends @structure to @caps. The structure is not copied; @caps becomes the owner of @structure. the #GstCaps that will be appended to the #GstStructure to append Appends @structure with @features to @caps. The structure is not copied; @caps becomes the owner of @structure. the #GstCaps that will be appended to the #GstStructure to append the #GstCapsFeatures to append Tries intersecting @caps1 and @caps2 and reports whether the result would not be empty %TRUE if intersection would be not empty a #GstCaps to intersect a #GstCaps to intersect Creates a new #GstCaps as a copy of the old @caps. The new caps will have a refcount of 1, owned by the caller. The structures are copied as well. Note that this function is the semantic equivalent of a gst_caps_ref() followed by a gst_caps_make_writable(). If you only want to hold on to a reference to the data, you should use gst_caps_ref(). the new #GstCaps a #GstCaps. Creates a new #GstCaps and appends a copy of the nth structure contained in @caps. the new #GstCaps the #GstCaps to copy the nth structure to copy Calls the provided function once for each structure and caps feature in the #GstCaps. In contrast to gst_caps_foreach(), the function may modify the structure and features. In contrast to gst_caps_map_in_place(), the structure and features are removed from the caps if %FALSE is returned from the function. The caps must be mutable. a #GstCaps a function to call for each field private data Modifies the given @caps into a representation with only fixed values. First the caps will be truncated and then the first structure will be fixated with gst_structure_fixate(). This function takes ownership of @caps and will call gst_caps_make_writable() on it so you must not use @caps afterwards unless you keep an additional reference to it with gst_caps_ref(). Note that it is not guaranteed that the returned caps have exactly one structure. If @caps are empty caps then the returned caps will be the empty too and contain no structure at all. Calling this function with ANY caps is not allowed. the fixated caps a #GstCaps to fixate Calls the provided function once for each structure and caps feature in the #GstCaps. The function must not modify the fields. Also see gst_caps_map_in_place() and gst_caps_filter_and_map_in_place(). %TRUE if the supplied function returns %TRUE for each call, %FALSE otherwise. a #GstCaps a function to call for each field private data Finds the features in @caps at @index, and returns it. WARNING: This function takes a `const GstCaps *`, but returns a non-const `GstCapsFeatures *`. This is for programming convenience -- the caller should be aware that features inside a constant #GstCaps should not be modified. However, if you know the caps are writable, either because you have just copied them or made them writable with gst_caps_make_writable(), you may modify the features returned in the usual way, e.g. with functions like gst_caps_features_add(). a pointer to the #GstCapsFeatures corresponding to @index a #GstCaps the index of the structure Gets the number of structures contained in @caps. the number of structures that @caps contains a #GstCaps Finds the structure in @caps at @index, and returns it. WARNING: This function takes a `const GstCaps *`, but returns a non-const `GstStructure *`. This is for programming convenience -- the caller should be aware that structures inside a constant #GstCaps should not be modified. However, if you know the caps are writable, either because you have just copied them or made them writable with gst_caps_make_writable(), you may modify the structure returned in the usual way, e.g. with functions like gst_structure_set(). a pointer to the #GstStructure corresponding to @index a #GstCaps the index of the structure Sets fields in a #GstCaps. The arguments must be passed in the same manner as gst_structure_id_str_set(), and be %NULL-terminated. the #GstCaps to set first field to set additional parameters Sets fields in a #GstCaps. The arguments must be passed in the same manner as gst_structure_id_str_set(), and be %NULL-terminated. the #GstCaps to set first field to set additional parameters Sets the given @field on all structures of @caps to the given @value. This is a convenience function for calling gst_structure_set_value() on all structures of @caps. a writable caps name of the field to set value to set the field to Creates a new #GstCaps that contains all the formats that are common to both @caps1 and @caps2. Defaults to %GST_CAPS_INTERSECT_ZIG_ZAG mode. the new #GstCaps a #GstCaps to intersect a #GstCaps to intersect Creates a new #GstCaps that contains all the formats that are common to both @caps1 and @caps2, the order is defined by the #GstCapsIntersectMode used. the new #GstCaps a #GstCaps to intersect a #GstCaps to intersect The intersection algorithm/mode to use A given #GstCaps structure is always compatible with another if every media format that is in the first is also contained in the second. That is, @caps1 is a subset of @caps2. %TRUE if @caps1 is a subset of @caps2. the #GstCaps to test the #GstCaps to test Determines if @caps represents any media format. %TRUE if @caps represents any format. the #GstCaps to test Determines if @caps represents no media formats. %TRUE if @caps represents no formats. the #GstCaps to test Checks if the given caps represent the same set of caps. %TRUE if both caps are equal. a #GstCaps another #GstCaps Tests if two #GstCaps are equal. This function only works on fixed #GstCaps. %TRUE if the arguments represent the same format the #GstCaps to test the #GstCaps to test Fixed #GstCaps describe exactly one format, that is, they have exactly one structure, and each field in the structure describes a fixed type. Examples of non-fixed types are GST_TYPE_INT_RANGE and GST_TYPE_LIST. %TRUE if @caps is fixed the #GstCaps to test Checks if the given caps are exactly the same set of caps. %TRUE if both caps are strictly equal. a #GstCaps another #GstCaps Checks if all caps represented by @subset are also represented by @superset. %TRUE if @subset is a subset of @superset a #GstCaps a potentially greater #GstCaps Checks if @structure is a subset of @caps. See gst_caps_is_subset() for more information. %TRUE if @structure is a subset of @caps a #GstCaps a potential #GstStructure subset of @caps Checks if @structure is a subset of @caps. See gst_caps_is_subset() for more information. %TRUE if @structure is a subset of @caps a #GstCaps a potential #GstStructure subset of @caps a #GstCapsFeatures for @structure Calls the provided function once for each structure and caps feature in the #GstCaps. In contrast to gst_caps_foreach(), the function may modify but not delete the structures and features. The caps must be mutable. %TRUE if the supplied function returns %TRUE for each call, %FALSE otherwise. a #GstCaps a function to call for each field private data Appends the structures contained in @caps2 to @caps1 if they are not yet expressed by @caps1. The structures in @caps2 are not copied -- they are transferred to a writable copy of @caps1, and then @caps2 is freed. If either caps is ANY, the resulting caps will be ANY. the merged caps. the #GstCaps that will take the new entries the #GstCaps to merge in Appends @structure to @caps if it is not already expressed by @caps. the merged caps. the #GstCaps to merge into the #GstStructure to merge Appends @structure with @features to @caps if its not already expressed by @caps. the merged caps. the #GstCaps to merge into the #GstStructure to merge the #GstCapsFeatures to merge Returns a #GstCaps that represents the same set of formats as @caps, but contains no lists. Each list is expanded into separate #GstStructure. This function takes ownership of @caps and will call gst_caps_make_writable() on it so you must not use @caps afterwards unless you keep an additional reference to it with gst_caps_ref(). the normalized #GstCaps a #GstCaps to normalize Adds a reference to a #GstCaps object. From this point on, until the caller calls gst_caps_unref() or gst_caps_make_writable(), it is guaranteed that the caps object will not change. This means its structures won't change, etc. To use a #GstCaps object, you must always have a refcount on it -- either the one made implicitly by e.g. gst_caps_new_simple(), or via taking one explicitly with this function. the same #GstCaps object. the #GstCaps to reference Removes the structure with the given index from the list of structures contained in @caps. the #GstCaps to remove from Index of the structure to remove Converts @caps to a string representation. This string representation can be converted back to a #GstCaps by gst_caps_from_string(). This prints the caps in human readable form. This version of the caps serialization function introduces support for nested structures and caps but the resulting strings won't be parsable with GStreamer prior to 1.20 unless #GST_SERIALIZE_FLAG_BACKWARD_COMPAT is passed as @flag. a newly allocated string representing @caps. a #GstCaps a #GstSerializeFlags Sets the @features for the structure at @index. a #GstCaps the index of the structure the #GstCapsFeatures to set Sets the @features for all the structures of @caps. a #GstCaps the #GstCapsFeatures to set Sets fields in a #GstCaps. The arguments must be passed in the same manner as gst_structure_set(), and be %NULL-terminated. the #GstCaps to set first field to set additional parameters Sets fields in a #GstCaps. The arguments must be passed in the same manner as gst_structure_set(), and be %NULL-terminated. @field and all other field names need to be valid for the remaining lifetime of the process, e.g. have to be static strings. the #GstCaps to set first field to set additional parameters Sets fields in a #GstCaps. The arguments must be passed in the same manner as gst_structure_set(), and be %NULL-terminated. @field and all other field names need to be valid for the remaining lifetime of the process, e.g. have to be static strings. the #GstCaps to set first field to set additional parameters Sets fields in a #GstCaps. The arguments must be passed in the same manner as gst_structure_set(), and be %NULL-terminated. the #GstCaps to set first field to set additional parameters Sets the given @field on all structures of @caps to the given @value. This is a convenience function for calling gst_structure_set_value() on all structures of @caps. a writable caps name of the field to set value to set the field to Sets the given @field on all structures of @caps to the given @value. This is a convenience function for calling gst_structure_set_value() on all structures of @caps. @field needs to be valid for the remaining lifetime of the process, e.g. has to be a static string. a writable caps name of the field to set value to set the field to Converts the given @caps into a representation that represents the same set of formats, but in a simpler form. Component structures that are identical are merged. Component structures that have values that can be merged are also merged. This function takes ownership of @caps and will call gst_caps_make_writable() on it if necessary, so you must not use @caps afterwards unless you keep an additional reference to it with gst_caps_ref(). This method does not preserve the original order of @caps. The simplified caps. a #GstCaps to simplify Retrieves the structure with the given index from the list of structures contained in @caps. The caller becomes the owner of the returned structure. a pointer to the #GstStructure corresponding to @index. the #GstCaps to retrieve from Index of the structure to retrieve Subtracts the @subtrahend from the @minuend. > This function does not work reliably if optional properties for caps > are included on one caps and omitted on the other. the resulting caps #GstCaps to subtract from #GstCaps to subtract Converts @caps to a string representation. This string representation can be converted back to a #GstCaps by gst_caps_from_string(). For debugging purposes its easier to do something like this: ``` C GST_LOG ("caps are %" GST_PTR_FORMAT, caps); ``` This prints the caps in human readable form. The implementation of serialization up to 1.20 would lead to unexpected results when there were nested #GstCaps / #GstStructure deeper than one level. a newly allocated string representing @caps. a #GstCaps Discards all but the first structure from @caps. Useful when fixating. This function takes ownership of @caps and will call gst_caps_make_writable() on it if necessary, so you must not use @caps afterwards unless you keep an additional reference to it with gst_caps_ref(). Note that it is not guaranteed that the returned caps have exactly one structure. If @caps is any or empty caps then the returned caps will be the same and contain no structure at all. truncated caps the #GstCaps to truncate Unrefs a #GstCaps and frees all its structures and the structures' values when the refcount reaches 0. a #GstCaps. 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. a newly allocated #GstCaps a string to convert to #GstCaps Modifies a pointer to a #GstCaps to point to a different #GstCaps. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old caps is unreffed, the new is reffed). Either @new_caps or the #GstCaps pointed to by @old_caps may be %NULL. %TRUE if @new_caps was different from @old_caps pointer to a pointer to a #GstCaps to be replaced. pointer to a #GstCaps that will replace the caps pointed to by @old_caps. Modifies a pointer to a #GstCaps to point to a different #GstCaps. This function is similar to gst_caps_replace() except that it takes ownership of @new_caps. %TRUE if @new_caps was different from @old_caps pointer to a pointer to a #GstCaps to be replaced. pointer to a #GstCaps that will replace the caps pointed to by @old_caps. #GstCapsFeatures can optionally be set on a #GstCaps to add requirements for additional features for a specific #GstStructure. Caps structures with the same name but with a non-equal set of caps features are not compatible. If a pad supports multiple sets of features it has to add multiple equal structures with different feature sets to the caps. Empty #GstCapsFeatures are equivalent with the #GstCapsFeatures that only contain #GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY. ANY #GstCapsFeatures as created by gst_caps_features_new_any() are equal to any other #GstCapsFeatures and can be used to specify that any #GstCapsFeatures would be supported, e.g. for elements that don't touch buffer memory. #GstCaps with ANY #GstCapsFeatures are considered non-fixed and during negotiation some #GstCapsFeatures have to be selected. Examples for caps features would be the requirement of a specific #GstMemory types or the requirement of having a specific #GstMeta on the buffer. Features are given as a string of the format `memory:GstMemoryTypeName` or `meta:GstMetaAPIName`. Creates a new #GstCapsFeatures with the given features. The last argument must be %NULL. a new, empty #GstCapsFeatures name of first feature to set additional features Creates a new, ANY #GstCapsFeatures. This will be equal to any other #GstCapsFeatures but caps with these are unfixed. a new, ANY #GstCapsFeatures Creates a new, empty #GstCapsFeatures. a new, empty #GstCapsFeatures Creates a new #GstCapsFeatures with the given features. The last argument must be 0. Use gst_caps_features_new_id_str(). a new, empty #GstCapsFeatures name of first feature to set additional features Creates a new #GstCapsFeatures with the given features. The last argument must be 0. a new, empty #GstCapsFeatures name of first feature to set additional features Creates a new #GstCapsFeatures with the given features. a new, empty #GstCapsFeatures name of first feature to set variable argument list Creates a new #GstCapsFeatures with the given features. Use gst_caps_features_new_id_str_valist(). a new, empty #GstCapsFeatures name of first feature to set variable argument list Creates a new #GstCapsFeatures with a single feature. a new #GstCapsFeatures The feature Creates a new #GstCapsFeatures with a single feature. @feature needs to be valid for the remaining lifetime of the process, e.g. has to be a static string. a new #GstCapsFeatures The feature Creates a new #GstCapsFeatures with the given features. The last argument must be %NULL. @feature1 and all other features need to be valid for the remaining lifetime of the process, e.g. have to be a static string. a new, empty #GstCapsFeatures name of first feature to set additional features Creates a new #GstCapsFeatures with the given features. @feature1 and all other features need to be valid for the remaining lifetime of the process, e.g. have to be a static string. a new, empty #GstCapsFeatures name of first feature to set variable argument list Creates a new #GstCapsFeatures with the given features. a new, empty #GstCapsFeatures name of first feature to set variable argument list Adds @feature to @features. a #GstCapsFeatures. a feature. Adds @feature to @features. Use gst_caps_features_add_id_str(). a #GstCapsFeatures. a feature. Adds @feature to @features. a #GstCapsFeatures. a feature. Adds @feature to @features. @feature needs to be valid for the remaining lifetime of the process, e.g. has to be a static string. a #GstCapsFeatures. a feature. Checks if @features contains @feature. %TRUE if @features contains @feature. a #GstCapsFeatures. a feature Checks if @features contains @feature. Use gst_caps_features_contains_id_str(). %TRUE if @features contains @feature. a #GstCapsFeatures. a feature Checks if @features contains @feature. %TRUE if @features contains @feature. a #GstCapsFeatures. a feature Duplicates a #GstCapsFeatures and all its values. a new #GstCapsFeatures. a #GstCapsFeatures to duplicate Frees a #GstCapsFeatures and all its values. The caps features must not have a parent when this function is called. the #GstCapsFeatures to free Returns the @i-th feature of @features. The @i-th feature of @features. a #GstCapsFeatures. index of the feature Returns the @i-th feature of @features. Use gst_caps_features_get_nth_id_str(). The @i-th feature of @features. a #GstCapsFeatures. index of the feature Returns the @i-th feature of @features. The @i-th feature of @features. a #GstCapsFeatures. index of the feature Returns the number of features in @features. The number of features in @features. a #GstCapsFeatures. Checks if @features is %GST_CAPS_FEATURES_ANY. %TRUE if @features is %GST_CAPS_FEATURES_ANY. a #GstCapsFeatures. Checks if @features1 and @features2 are equal. %TRUE if @features1 and @features2 are equal. a #GstCapsFeatures. a #GstCapsFeatures. Removes @feature from @features. a #GstCapsFeatures. a feature. Removes @feature from @features. Use gst_caps_features_remove_id_str(). a #GstCapsFeatures. a feature. Removes @feature from @features. a #GstCapsFeatures. a feature. Sets the parent_refcount field of #GstCapsFeatures. This field is used to determine whether a caps features is mutable or not. This function should only be called by code implementing parent objects of #GstCapsFeatures, as described in [the MT refcounting design document](additional/design/MT-refcounting.md). %TRUE if the parent refcount could be set. a #GstCapsFeatures a pointer to the parent's refcount Converts @features to a human-readable string representation. For debugging purposes its easier to do something like this: ``` C GST_LOG ("features is %" GST_PTR_FORMAT, features); ``` This prints the features in human readable form. a pointer to string allocated by g_malloc(). a #GstCapsFeatures Creates a #GstCapsFeatures from a string representation. a new #GstCapsFeatures or %NULL when the string could not be parsed. a string representation of a #GstCapsFeatures. A function that will be called in gst_caps_filter_and_map_in_place(). The function may modify @features and @structure, and both will be removed from the caps if %FALSE is returned. %TRUE if the features and structure should be preserved, %FALSE if it should be removed. the #GstCapsFeatures the #GstStructure user data Extra flags for a caps. Caps has no specific content, but can contain anything. A function that will be called in gst_caps_foreach(). The function may not modify @features or @structure. %TRUE if the foreach operation should continue, %FALSE if the foreach operation should stop with %FALSE. the #GstCapsFeatures the #GstStructure user data Modes of caps intersection %GST_CAPS_INTERSECT_ZIG_ZAG tries to preserve overall order of both caps by iterating on the caps' structures as the following matrix shows: ``` caps1 +------------- | 1 2 4 7 caps2 | 3 5 8 10 | 6 9 11 12 ``` Used when there is no explicit precedence of one caps over the other. e.g. tee's sink pad getcaps function, it will probe its src pad peers' for their caps and intersect them with this mode. %GST_CAPS_INTERSECT_FIRST is useful when an element wants to preserve another element's caps priority order when intersecting with its own caps. Example: If caps1 is `[A, B, C]` and caps2 is `[E, B, D, A]`, the result would be `[A, B]`, maintaining the first caps priority on the intersection. Zig-zags over both caps. Keeps the first caps order. A function that will be called in gst_caps_map_in_place(). The function may modify @features and @structure. %TRUE if the map operation should continue, %FALSE if the map operation should stop with %FALSE. the #GstCapsFeatures the #GstStructure user data This interface abstracts handling of property sets for elements with children. Imagine elements such as mixers or polyphonic generators. They all have multiple #GstPad or some kind of voice objects. Another use case are container elements like #GstBin. The element implementing the interface acts as a parent for those child objects. By implementing this interface the child properties can be accessed from the parent element by using gst_child_proxy_get() and gst_child_proxy_set(). Property names are written as `child-name::property-name`. The whole naming scheme is recursive. Thus `child1::child2::property` is valid too, if `child1` and `child2` implement the #GstChildProxy interface. Emits the #GstChildProxy::child-added signal. the parent object the newly added child the name of the new child Emits the #GstChildProxy::child-removed signal. the parent object the removed child the name of the old child Fetches a child by its number. the child object or %NULL if not found (index too high). the parent object to get the child from the child's position in the child list Looks up a child element by the given name. This virtual method has a default implementation that uses #GstObject together with gst_object_get_name(). If the interface is to be used with #GObjects, this methods needs to be overridden. the child object or %NULL if not found. the parent object to get the child from the child's name Gets the number of child objects this parent contains. the number of child objects the parent object Emits the #GstChildProxy::child-added signal. the parent object the newly added child the name of the new child Emits the #GstChildProxy::child-removed signal. the parent object the removed child the name of the old child Gets properties of the parent object and its children. the parent object name of the first property to get return location for the first property, followed optionally by more name/return location pairs, followed by %NULL Fetches a child by its number. the child object or %NULL if not found (index too high). the parent object to get the child from the child's position in the child list Looks up a child element by the given name. This virtual method has a default implementation that uses #GstObject together with gst_object_get_name(). If the interface is to be used with #GObjects, this methods needs to be overridden. the child object or %NULL if not found. the parent object to get the child from the child's name Looks up a child element by the given full-path name. Similar to gst_child_proxy_get_child_by_name(), this method searches and returns a child given a name. The difference is that this method allows a hierarchical path in the form of child1::child2::child3. In the later example this method would return a reference to child3, if found. The name should be made of element names only and should not contain any property names. the child object or %NULL if not found. the parent object to get the child from the full-path child's name Gets the number of child objects this parent contains. the number of child objects the parent object Gets a single property using the GstChildProxy mechanism. You are responsible for freeing it by calling g_value_unset() object to query name of the property a #GValue that should take the result. Gets properties of the parent object and its children. the object to query name of the first property to get return location for the first property, followed optionally by more name/return location pairs, followed by %NULL Looks up which object and #GParamSpec would be effected by the given @name. %TRUE if @target and @pspec could be found. %FALSE otherwise. In that case the values for @pspec and @target are not modified. Unref @target after usage. For plain #GObject @target is the same as @object. child proxy object to lookup the property in name of the property to look up pointer to a #GObject that takes the real object to set property on pointer to take the #GParamSpec describing the property Sets properties of the parent object and its children. the parent object name of the first property to set value for the first property, followed optionally by more name/value pairs, followed by %NULL Sets a single property using the GstChildProxy mechanism. the parent object name of the property to set new #GValue for the property Sets properties of the parent object and its children. the parent object name of the first property to set value for the first property, followed optionally by more name/value pairs, followed by %NULL Will be emitted after the @object was added to the @child_proxy. the #GObject that was added the name of the new child Will be emitted after the @object was removed from the @child_proxy. the #GObject that was removed the name of the old child #GstChildProxy interface. parent interface type. Fetch a child object by name the child object or %NULL if not found. the parent object to get the child from the child's name Fetch a child object by index the child object or %NULL if not found (index too high). the parent object to get the child from the child's position in the child list Get the number of children in @parent the number of child objects the parent object Called when @child is added to @parent the parent object the newly added child the name of the new child Called when @child is removed from @parent the parent object the removed child the name of the old child GStreamer uses a global clock to synchronize the plugins in a pipeline. Different clock implementations are possible by implementing this abstract base class or, more conveniently, by subclassing #GstSystemClock. The #GstClock returns a monotonically increasing time with the method gst_clock_get_time(). Its accuracy and base time depend on the specific clock implementation but time is always expressed in nanoseconds. Since the baseline of the clock is undefined, the clock time returned is not meaningful in itself, what matters are the deltas between two clock times. The time returned by a clock is called the absolute time. The pipeline uses the clock to calculate the running time. Usually all renderers synchronize to the global clock using the buffer timestamps, the #GST_EVENT_SEGMENT events and the element's base time, see #GstPipeline. A clock implementation can support periodic and single shot clock notifications both synchronous and asynchronous. One first needs to create a #GstClockID for the periodic or single shot notification using gst_clock_new_single_shot_id() or gst_clock_new_periodic_id(). To perform a blocking wait for the specific time of the #GstClockID use gst_clock_id_wait(). To receive a callback when the specific time is reached in the clock use gst_clock_id_wait_async(). Both these calls can be interrupted with the gst_clock_id_unschedule() call. If the blocking wait is unscheduled a return value of #GST_CLOCK_UNSCHEDULED is returned. Periodic callbacks scheduled async will be repeatedly called automatically until they are unscheduled. To schedule a sync periodic callback, gst_clock_id_wait() should be called repeatedly. The async callbacks can happen from any thread, either provided by the core or from a streaming thread. The application should be prepared for this. A #GstClockID that has been unscheduled cannot be used again for any wait operation, a new #GstClockID should be created and the old unscheduled one should be destroyed with gst_clock_id_unref(). It is possible to perform a blocking wait on the same #GstClockID from multiple threads. However, registering the same #GstClockID for multiple async notifications is not possible, the callback will only be called for the thread registering the entry last. None of the wait operations unref the #GstClockID, the owner is responsible for unreffing the ids itself. This holds for both periodic and single shot notifications. The reason being that the owner of the #GstClockID has to keep a handle to the #GstClockID to unblock the wait on FLUSHING events or state changes and if the entry would be unreffed automatically, the handle might become invalid without any notification. These clock operations do not operate on the running time, so the callbacks will also occur when not in PLAYING state as if the clock just keeps on running. Some clocks however do not progress when the element that provided the clock is not PLAYING. When a clock has the #GST_CLOCK_FLAG_CAN_SET_MASTER flag set, it can be slaved to another #GstClock with gst_clock_set_master(). The clock will then automatically be synchronized to this master clock by repeatedly sampling the master clock and the slave clock and recalibrating the slave clock with gst_clock_set_calibration(). This feature is mostly useful for plugins that have an internal clock but must operate with another clock selected by the #GstPipeline. They can track the offset and rate difference of their internal clock relative to the master clock by using the gst_clock_get_calibration() function. The master/slave synchronisation can be tuned with the #GstClock:timeout, #GstClock:window-size and #GstClock:window-threshold properties. The #GstClock:timeout property defines the interval to sample the master clock and run the calibration functions. #GstClock:window-size defines the number of samples to use when calibrating and #GstClock:window-threshold defines the minimum number of samples before the calibration is performed. Compares the two #GstClockID instances. This function can be used as a GCompareFunc when sorting ids. negative value if `a < b`; zero if `a = b`; positive value if `a > b` A #GstClockID A #GstClockID to compare with This function returns the underlying clock. a #GstClock or %NULL when the underlying clock has been freed. a #GstClockID Gets the time of the clock ID the time of the given clock id. The #GstClockID to query Increases the refcount of given @id. The same #GstClockID with increased refcount. The #GstClockID to ref Unrefs given @id. When the refcount reaches 0 the #GstClockID will be freed. The #GstClockID to unref Cancels an outstanding request with @id. This can either be an outstanding async notification or a pending sync notification. After this call, @id cannot be used anymore to receive sync or async notifications, you need to create a new #GstClockID. The id to unschedule This function returns whether @id uses @clock as the underlying clock. @clock can be NULL, in which case the return value indicates whether the underlying clock has been freed. If this is the case, the @id is no longer usable and should be freed. whether the clock @id uses the same underlying #GstClock @clock. a #GstClockID to check a #GstClock to compare against Performs a blocking wait on @id. @id should have been created with gst_clock_new_single_shot_id() or gst_clock_new_periodic_id() and should not have been unscheduled with a call to gst_clock_id_unschedule(). If the @jitter argument is not %NULL and this function returns #GST_CLOCK_OK or #GST_CLOCK_EARLY, it will contain the difference against the clock and the time of @id when this method was called. Positive values indicate how late @id was relative to the clock (in which case this function will return #GST_CLOCK_EARLY). Negative values indicate how much time was spent waiting on the clock before this function returned. the result of the blocking wait. #GST_CLOCK_EARLY will be returned if the current clock time is past the time of @id, #GST_CLOCK_OK if @id was scheduled in time. #GST_CLOCK_UNSCHEDULED if @id was unscheduled with gst_clock_id_unschedule(). The #GstClockID to wait on a pointer that will contain the jitter, can be %NULL. Registers a callback on the given #GstClockID @id with the given function and user_data. When passing a #GstClockID with an invalid time to this function, the callback will be called immediately with a time set to %GST_CLOCK_TIME_NONE. The callback will be called when the time of @id has been reached. The callback @func can be invoked from any thread, either provided by the core or from a streaming thread. The application should be prepared for this. the result of the non blocking wait. a #GstClockID to wait on The callback function User data passed in the callback #GDestroyNotify for user_data Change the resolution of the clock. Not all values might be acceptable. the new resolution the #GstClock the previous resolution the new resolution Gets the current internal time of the given clock. The time is returned unadjusted for the offset and the rate. the internal time of the clock. Or %GST_CLOCK_TIME_NONE when given invalid input. a #GstClock to query Gets the accuracy of the clock. The accuracy of the clock is the granularity of the values returned by gst_clock_get_time(). the resolution of the clock in units of #GstClockTime. a #GstClock Unblock a blocking or async wait operation. the #GstClock the entry to unschedule Perform a blocking wait on the given #GstClockEntry and return the jitter. the result of the blocking wait. #GST_CLOCK_EARLY will be returned if the current clock time is past the time of @id, #GST_CLOCK_OK if @id was scheduled in time. #GST_CLOCK_UNSCHEDULED if @id was unscheduled with gst_clock_id_unschedule(). the #GstClock the entry to wait on a pointer that will contain the jitter Perform an asynchronous wait on the given #GstClockEntry. the result of the non blocking wait. the #GstClock the entry to wait on The time @observation_external of the external or master clock and the time @observation_internal of the internal or slave clock are added to the list of observations. If enough observations are available, a linear regression algorithm is run on the observations and @clock is recalibrated. If this functions returns %TRUE, @r_squared will contain the correlation coefficient of the interpolation. A value of 1.0 means a perfect regression was performed. This value can be used to control the sampling frequency of the master and slave clocks. %TRUE if enough observations were added to run the regression algorithm. a #GstClock a time on the internal clock a time on the external clock a pointer to hold the result Add a clock observation to the internal slaving algorithm the same as gst_clock_add_observation(), and return the result of the external or master clock estimation, without updating the internal calibration. The caller can then take the results and call gst_clock_set_calibration() with the values, or some modified version of them. %TRUE if enough observations were added to run the regression algorithm. a #GstClock a time on the internal clock a time on the external clock a pointer to hold the result a location to store the internal time a location to store the external time a location to store the rate numerator a location to store the rate denominator Converts the given @internal clock time to the external time, adjusting for the rate and reference time set with gst_clock_set_calibration() and making sure that the returned time is increasing. This function should be called with the clock's OBJECT_LOCK held and is mainly used by clock subclasses. This function is the reverse of gst_clock_unadjust_unlocked(). the converted time of the clock. a #GstClock to use a clock time Converts the given @internal_target clock time to the external time, using the passed calibration parameters. This function performs the same calculation as gst_clock_adjust_unlocked() when called using the current calibration parameters, but doesn't ensure a monotonically increasing result as gst_clock_adjust_unlocked() does. Note: The @clock parameter is unused and can be NULL the converted time of the clock. a #GstClock to use a clock time a reference internal time a reference external time the numerator of the rate of the clock relative to its internal time the denominator of the rate of the clock Gets the internal rate and reference time of @clock. See gst_clock_set_calibration() for more information. @internal, @external, @rate_num, and @rate_denom can be left %NULL if the caller is not interested in the values. a #GstClock a location to store the internal time a location to store the external time a location to store the rate numerator a location to store the rate denominator Gets the current internal time of the given clock. The time is returned unadjusted for the offset and the rate. the internal time of the clock. Or %GST_CLOCK_TIME_NONE when given invalid input. a #GstClock to query Gets the master clock that @clock is slaved to or %NULL when the clock is not slaved to any master clock. a master #GstClock or %NULL when this clock is not slaved to a master clock. a #GstClock Gets the accuracy of the clock. The accuracy of the clock is the granularity of the values returned by gst_clock_get_time(). the resolution of the clock in units of #GstClockTime. a #GstClock Gets the current time of the given clock. The time is always monotonically increasing and adjusted according to the current offset and rate. the time of the clock. Or %GST_CLOCK_TIME_NONE when given invalid input. a #GstClock to query Gets the amount of time that master and slave clocks are sampled. the interval between samples. a #GstClock Checks if the clock is currently synced, by looking at whether %GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC is set. %TRUE if the clock is currently synced a GstClock Gets an ID from @clock to trigger a periodic notification. The periodic notifications will start at time @start_time and will then be fired with the given @interval. a #GstClockID that can be used to request the time notification. The #GstClockID to get a periodic notification id from the requested start time the requested interval Gets a #GstClockID from @clock to trigger a single shot notification at the requested time. a #GstClockID that can be used to request the time notification. The #GstClockID to get a single shot notification from the requested time Reinitializes the provided periodic @id to the provided start time and interval. Does not modify the reference count. %TRUE if the GstClockID could be reinitialized to the provided @time, else %FALSE. a #GstClock a #GstClockID the requested start time the requested interval Adjusts the rate and time of @clock. A rate of 1/1 is the normal speed of the clock. Values bigger than 1/1 make the clock go faster. @internal and @external are calibration parameters that arrange that gst_clock_get_time() should have been @external at internal time @internal. This internal time should not be in the future; that is, it should be less than the value of gst_clock_get_internal_time() when this function is called. Subsequent calls to gst_clock_get_time() will return clock times computed as follows: ``` C time = (internal_time - internal) * rate_num / rate_denom + external ``` This formula is implemented in gst_clock_adjust_unlocked(). Of course, it tries to do the integer arithmetic as precisely as possible. Note that gst_clock_get_time() always returns increasing values so when you move the clock backwards, gst_clock_get_time() will report the previous value until the clock catches up. a #GstClock to calibrate a reference internal time a reference external time the numerator of the rate of the clock relative to its internal time the denominator of the rate of the clock Sets @master as the master clock for @clock. @clock will be automatically calibrated so that gst_clock_get_time() reports the same time as the master clock. A clock provider that slaves its clock to a master can get the current calibration values with gst_clock_get_calibration(). @master can be %NULL in which case @clock will not be slaved anymore. It will however keep reporting its time adjusted with the last configured rate and time offsets. %TRUE if the clock is capable of being slaved to a master clock. Trying to set a master on a clock without the #GST_CLOCK_FLAG_CAN_SET_MASTER flag will make this function return %FALSE. a #GstClock a master #GstClock Sets the accuracy of the clock. Some clocks have the possibility to operate with different accuracy at the expense of more resource usage. There is normally no need to change the default resolution of a clock. The resolution of a clock can only be changed if the clock has the #GST_CLOCK_FLAG_CAN_SET_RESOLUTION flag set. the new resolution of the clock. a #GstClock The resolution to set Sets @clock to synced and emits the #GstClock::synced signal, and wakes up any thread waiting in gst_clock_wait_for_sync(). This function must only be called if %GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC is set on the clock, and is intended to be called by subclasses only. a GstClock if the clock is synced Sets the amount of time, in nanoseconds, to sample master and slave clocks a #GstClock a timeout Reinitializes the provided single shot @id to the provided time. Does not modify the reference count. %TRUE if the GstClockID could be reinitialized to the provided @time, else %FALSE. a #GstClock a #GstClockID The requested time. Converts the given @external clock time to the internal time of @clock, using the rate and reference time set with gst_clock_set_calibration(). This function should be called with the clock's OBJECT_LOCK held and is mainly used by clock subclasses. This function is the reverse of gst_clock_adjust_unlocked(). the internal time of the clock corresponding to @external. a #GstClock to use an external clock time Converts the given @external_target clock time to the internal time, using the passed calibration parameters. This function performs the same calculation as gst_clock_unadjust_unlocked() when called using the current calibration parameters. Note: The @clock parameter is unused and can be NULL the converted time of the clock. a #GstClock to use a clock time a reference internal time a reference external time the numerator of the rate of the clock relative to its internal time the denominator of the rate of the clock Waits until @clock is synced for reporting the current time. If @timeout is %GST_CLOCK_TIME_NONE it will wait forever, otherwise it will time out after @timeout nanoseconds. For asynchronous waiting, the #GstClock::synced signal can be used. This returns immediately with %TRUE if %GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC is not set on the clock, or if the clock is already synced. %TRUE if waiting was successful, or %FALSE on timeout a GstClock timeout for waiting or %GST_CLOCK_TIME_NONE the parent structure Signaled on clocks with %GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC set once the clock is synchronized, or when it completely lost synchronization. This signal will not be emitted on clocks without the flag. This signal will be emitted from an arbitrary thread, most likely not the application's main thread. if the clock is synced now The function prototype of the callback. %TRUE or %FALSE (currently unused) The clock that triggered the callback The time it was triggered The #GstClockID that expired user data passed in the gst_clock_id_wait_async() function GStreamer clock class. Override the vmethods to implement the clock functionality. the parent class structure the new resolution the #GstClock the previous resolution the new resolution the resolution of the clock in units of #GstClockTime. a #GstClock the internal time of the clock. Or %GST_CLOCK_TIME_NONE when given invalid input. a #GstClock to query the result of the blocking wait. #GST_CLOCK_EARLY will be returned if the current clock time is past the time of @id, #GST_CLOCK_OK if @id was scheduled in time. #GST_CLOCK_UNSCHEDULED if @id was unscheduled with gst_clock_id_unschedule(). the #GstClock the entry to wait on a pointer that will contain the jitter the result of the non blocking wait. the #GstClock the entry to wait on the #GstClock the entry to unschedule All pending timeouts or periodic notifies are converted into an entry. Note that GstClockEntry should be treated as an opaque structure. It must not be extended or allocated using a custom allocator. reference counter (read-only) The type of the clock entry a single shot timeout a periodic timeout request The capabilities of this clock clock can do a single sync timeout request clock can do a single async timeout request clock can do sync periodic timeout requests clock can do async periodic timeout callbacks clock's resolution can be changed clock can be slaved to a master clock clock needs to be synced before it can be used subclasses can add additional flags starting from this flag The return value of a clock operation. The operation succeeded. The operation was scheduled too late. The clockID was unscheduled The ClockID is busy A bad time was provided to a function. An error occurred Operation is not supported The ClockID is done waiting The different kind of clocks. time since Epoch monotonic time since some unspecified starting point some other time source is used (Since: 1.0.5) time since Epoch, but using International Atomic Time as reference (Since: 1.18) #GstContext is a container object used to store contexts like a device context, a display server connection and similar concepts that should be shared between multiple elements. Applications can set a context on a complete pipeline by using gst_element_set_context(), which will then be propagated to all child elements. Elements can handle these in #GstElementClass::set_context and merge them with the context information they already have. When an element needs a context it will do the following actions in this order until one step succeeds: 1. Check if the element already has a context 2. Query downstream with %GST_QUERY_CONTEXT for the context 3. Query upstream with %GST_QUERY_CONTEXT for the context 4. Post a %GST_MESSAGE_NEED_CONTEXT message on the bus with the required context types and afterwards check if a usable context was set now 5. Create a context by itself and post a %GST_MESSAGE_HAVE_CONTEXT message on the bus. Bins will catch %GST_MESSAGE_NEED_CONTEXT messages and will set any previously known context on the element that asks for it if possible. Otherwise the application should provide one if it can. #GstContext can be persistent. A persistent #GstContext is kept in elements when they reach %GST_STATE_NULL, non-persistent ones will be removed. Also, a non-persistent context won't override a previous persistent context set to an element. Creates a new context. The new context. Context type Persistent context Creates a copy of the context. Returns a copy of the context. a new copy of @context. MT safe the context to copy Gets the type of @context. The type of the context. The #GstContext. Accesses the structure of the context. The structure of the context. The structure is still owned by the context, which means that you should not modify it, free it and that the pointer becomes invalid when you free the context. The #GstContext. Checks if @context has @context_type. %TRUE if @context has @context_type. The #GstContext. Context type to check. Checks if @context is persistent. %TRUE if the context is persistent. The #GstContext. Convenience macro to increase the reference count of the context. @context (for convenience when doing assignments) the context to ref Convenience macro to decrease the reference count of the context, possibly freeing it. the context to unref Gets a writable version of the structure. The structure of the context. The structure is still owned by the context, which means that you should not free it and that the pointer becomes invalid when you free the context. This function checks if @context is writable. The #GstContext. Modifies a pointer to a #GstContext to point to a different #GstContext. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old context is unreffed, the new one is reffed). Either @new_context or the #GstContext pointed to by @old_context may be %NULL. %TRUE if @new_context was different from @old_context pointer to a pointer to a #GstContext to be replaced. pointer to a #GstContext that will replace the context pointed to by @old_context. A base class for value mapping objects that attaches control sources to #GObject properties. Such an object is taking one or more #GstControlSource instances, combines them and maps the resulting value to the type and value range of the bound property. Gets a number of #GValues for the given controlled property starting at the requested time. The array @values need to hold enough space for @n_values of #GValue. This function is useful if one wants to e.g. draw a graph of the control curve or apply a control curve sample by sample. %TRUE if the given array could be filled, %FALSE otherwise the control binding the time that should be processed the time spacing between subsequent values the number of values array to put control-values in Gets the value for the given controlled property at the requested time. the GValue of the property at the given time, or %NULL if the property isn't controlled. the control binding the time the control-change should be read from Gets a number of values for the given controlled property starting at the requested time. The array @values needs to hold enough space for @n_values of the same type as the objects property's type. This function is useful if one wants to e.g. draw a graph of the control curve or apply a control curve sample by sample. The values are unboxed and ready to be used. The similar function gst_control_binding_get_g_value_array() returns the array as #GValues and is more suitable for bindings. %TRUE if the given array could be filled, %FALSE otherwise the control binding the time that should be processed the time spacing between subsequent values the number of values array to put control-values in Sets the property of the @object, according to the #GstControlSources that handles it and for the given timestamp. If this function fails, it is most likely the application developers fault. Most probably the control sources are not setup correctly. %TRUE if the controller value could be applied to the object property, %FALSE otherwise the control binding the object that has controlled properties the time that should be processed the last time this was called Gets a number of #GValues for the given controlled property starting at the requested time. The array @values need to hold enough space for @n_values of #GValue. This function is useful if one wants to e.g. draw a graph of the control curve or apply a control curve sample by sample. %TRUE if the given array could be filled, %FALSE otherwise the control binding the time that should be processed the time spacing between subsequent values the number of values array to put control-values in Gets the value for the given controlled property at the requested time. the GValue of the property at the given time, or %NULL if the property isn't controlled. the control binding the time the control-change should be read from Gets a number of values for the given controlled property starting at the requested time. The array @values needs to hold enough space for @n_values of the same type as the objects property's type. This function is useful if one wants to e.g. draw a graph of the control curve or apply a control curve sample by sample. The values are unboxed and ready to be used. The similar function gst_control_binding_get_g_value_array() returns the array as #GValues and is more suitable for bindings. %TRUE if the given array could be filled, %FALSE otherwise the control binding the time that should be processed the time spacing between subsequent values the number of values array to put control-values in Checks if the control binding is disabled. %TRUE if the binding is inactive the control binding This function is used to disable a control binding for some time, i.e. gst_object_sync_values() will do nothing. the control binding boolean that specifies whether to disable the controller or not. Sets the property of the @object, according to the #GstControlSources that handles it and for the given timestamp. If this function fails, it is most likely the application developers fault. Most probably the control sources are not setup correctly. %TRUE if the controller value could be applied to the object property, %FALSE otherwise the control binding the object that has controlled properties the time that should be processed the last time this was called the parent structure name of the property of this binding #GParamSpec for this property The class structure of #GstControlBinding. Parent class %TRUE if the controller value could be applied to the object property, %FALSE otherwise the control binding the object that has controlled properties the time that should be processed the last time this was called the GValue of the property at the given time, or %NULL if the property isn't controlled. the control binding the time the control-change should be read from %TRUE if the given array could be filled, %FALSE otherwise the control binding the time that should be processed the time spacing between subsequent values the number of values array to put control-values in %TRUE if the given array could be filled, %FALSE otherwise the control binding the time that should be processed the time spacing between subsequent values the number of values array to put control-values in FIXME(2.0): remove, this is unused The #GstControlSource is a base class for control value sources that could be used to get timestamp-value pairs. A control source essentially is a function over time. A #GstControlSource is used by first getting an instance of a specific control-source, creating a binding for the control-source to the target property of the element and then adding the binding to the element. The binding will convert the data types and value range to fit to the bound property. For implementing a new #GstControlSource one has to implement #GstControlSourceGetValue and #GstControlSourceGetValueArray functions. These are then used by gst_control_source_get_value() and gst_control_source_get_value_array() to get values for specific timestamps. Gets the value for this #GstControlSource at a given timestamp. %FALSE if the value couldn't be returned, %TRUE otherwise. the #GstControlSource object the time for which the value should be returned the value Gets an array of values for for this #GstControlSource. Values that are undefined contain NANs. %TRUE if the given array could be filled, %FALSE otherwise the #GstControlSource object the first timestamp the time steps the number of values to fetch array to put control-values in the parent structure Function for returning a value for a given timestamp Function for returning a values array for a given timestamp The class structure of #GstControlSource. Parent class Function for returning a value for a given timestamp. %TRUE if the value was successfully calculated. the #GstControlSource instance timestamp for which a value should be calculated a value which will be set to the result. Function for returning an array of values starting at a given timestamp. %TRUE if the values were successfully calculated. the #GstControlSource instance timestamp for which a value should be calculated the time spacing between subsequent values the number of values array to put control-values in Core errors are errors inside the core GStreamer library. a general error which doesn't fit in any other category. Make sure you add a custom message to the error call. do not use this except as a placeholder for deciding where to go while developing code. use this when you do not want to implement this functionality yet. used for state change errors. used for pad-related errors. used for thread-related errors. used for negotiation-related errors. used for event-related errors. used for seek-related errors. used for caps-related errors. used for negotiation-related errors. used if a plugin is missing. used for clock related errors. used if functionality has been disabled at compile time. the number of core error types. Extra custom metadata. The @structure field is the same as returned by gst_custom_meta_get_structure(). Since 1.24 it can be serialized using gst_meta_serialize() and gst_meta_deserialize(), but only if the #GstStructure does not contain any fields that cannot be serialized, see %GST_SERIALIZE_FLAG_STRICT. parent #GstMeta #GstStructure containing custom metadata. Retrieve the #GstStructure backing a custom meta, the structure's mutability is conditioned to the writability of the #GstBuffer @meta is attached to. the #GstStructure backing @meta Checks whether the name of the custom meta is @name Whether @name is the name of the custom meta Function called for each @meta in @buffer as a result of performing a transformation that yields @transbuf. Additional @type specific transform data is passed to the function as @data. Implementations should check the @type of the transform and parse additional type specific fields in @data that should be used to update the metadata on @transbuf. %TRUE if the transform could be performed a #GstBuffer a #GstCustomMeta a #GstBuffer the transform type transform specific data. user data passed when registering the meta Output a debugging message in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. printf-style message to output 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, like this: ``` shell dot -Tpng -oimage.png graph_lowlevel.dot ``` There is also a utility called [xdot] which allows you to view the dot file directly without converting it first. The macro is only active if the environment variable `GST_DEBUG_DUMP_DOT_DIR` is set to a basepath (e.g. `/tmp`), and the GStreamer debugging subsystem is enabled (i.e., no use of `./configure --disable-gst-debug`) [xdot]: https://pypi.org/project/xdot/ the top-level pipeline that should be analyzed details to show in the graph, e.g. #GST_DEBUG_GRAPH_SHOW_ALL or one or more other #GstDebugGraphDetails flags. output base filename (e.g. "myplayer") 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. the top-level pipeline that should be analyzed details to show in the graph, e.g. #GST_DEBUG_GRAPH_SHOW_ALL or one or more other #GstDebugGraphDetails flags. output base filename (e.g. "myplayer") Defines a GstDebugCategory variable. This macro expands to nothing if debugging is disabled. the category Declares a GstDebugCategory variable as extern. Use in header files. This macro expands to nothing if debugging is disabled. the category Looks up an existing #GstDebugCategory by its @name and sets @cat. If the category is not found, but GST_CAT_DEFAULT is defined, that is assigned to @cat. Otherwise @cat will be %NULL. |[<!-- language="C" --> GST_DEBUG_CATEGORY_STATIC (gst_myplugin_debug); #define GST_CAT_DEFAULT gst_myplugin_debug GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE); ... GST_DEBUG_CATEGORY_INIT (gst_myplugin_debug, "myplugin", 0, "nice element"); GST_DEBUG_CATEGORY_GET (GST_CAT_PERFORMANCE, "GST_PERFORMANCE"); ]| the category to initialize. log category name Initializes a new #GstDebugCategory with the given properties and set to the default threshold. > This macro expands to nothing if debugging is disabled. > > When naming your category, please follow the following conventions to ensure > that the pattern matching for categories works as expected. It is not > earth-shattering if you don't follow these conventions, but it would be nice > for everyone. > > If you define a category for a plugin or a feature of it, name the category > like the feature. So if you wanted to write a "filesrc" element, you would > name the category "filesrc". Use lowercase letters only. > If you define more than one category for the same element, append an > underscore and an identifier to your categories, like this: "filesrc_cache" > > If you create a library or an application using debugging categories, use a > common prefix followed by an underscore for all your categories. GStreamer > uses the GST prefix so GStreamer categories look like "GST_STATES". Be sure > to include uppercase letters. the category to initialize. the name of the category. the colors to use for a color representation or 0 for no color. optional description of the category. Defines a static GstDebugCategory variable. This macro expands to nothing if debugging is disabled. the category Register a pointer to a function with its name, so it can later be used by GST_DEBUG_FUNCPTR_NAME(). pointer to the function to register Retrieves the name of the function, if it was previously registered with GST_DEBUG_FUNCPTR(). If not, it returns a description of the pointer. This macro returns a constant string which must not be modified or freed by the caller. address of the function of which to look up the name Output a debugging message for the given identifier in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. An identifier of the message provider printf-style message to output Output a debugging message belonging to the given object in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. the #GObject the message belongs to printf-style message to output Evaluates to 2 strings, that describe the pad. Often used in debugging statements. The pad to debug. Register a pointer to a function with its name, so it can later be used by GST_DEBUG_FUNCPTR_NAME(). Use this variant of #GST_DEBUG_FUNCPTR if you do not need to use @ptr. pointer to the function to register Define a new mini-object type with the given name name of the new type in CamelCase name of the new type This macro can be used to register a device provider into a #GstPlugin. This method will be usually called in the plugin init function but can also be called with a NULL plugin. The device provider name in lower case, with words separated by '_'. The #GstPlugin where to register the device provider. This macro can be used to declare a new device provider. It has to be used in combination with #GST_DEVICE_PROVIDER_REGISTER_DEFINE macro and must be placed outside any block to declare the device provider registration function. The device provider name in lower case, with words separated by '_'. A convenience macro to define the entry point of a device provider `gst_device_provider_register_*(GstPlugin* plugin)`. The device provider name in lower case, with words separated by '_'. Used to generate `gst_device_provider_register_*(GstPlugin* plugin)`. The public name of the device provider The #GstRank of the device provider (higher rank means more importance when autoplugging, see #GstRank) The #GType of the device provider. A convenience macro to define the entry point of a device provider `gst_device_provider_register_*(GstPlugin* plugin)` which uses register_func as the main registration method for the device provider. As an example, you may define the device provider named "device-provider" with the namespace `my` as following using `device_provider_register_custom`: ``` gboolean my_device_provider_register_custom (GstPlugin * plugin) { gboolean ret = FALSE; ret |= gst_device_provider_register (plugin, "my-device-provider", GST_RANK_PRIMARY, GST_TYPE_MY_DEVICE_PROVIDER); return TRUE; } GST_DEVICE_PROVIDER_REGISTER_DEFINE_CUSTOM (my_device_provider, my_device_provider_register_custom) ``` The device provider name in lower case, with words separated by '_'. Used to generate `gst_device_provider_register_*(GstPlugin* plugin)`. pointer to a method with the format: `gboolean register_func (GstPlugin* plugin);` This macro can be used to register a dynamic type into a #GstPlugin. This method will be usually called in the plugin init function but can also be called with a NULL plugin. The dynamic type name to register The #GstPlugin where to register the dynamic type. This macro can be used to declare a new dynamic type. It has to be used in combination with #GST_DYNAMIC_TYPE_REGISTER_DEFINE macro and must be placed outside any block to declare the type find registration function. A convenience macro to define the entry point of a dynamic type `gst_dynamic_type_register_*(GstPlugin* plugin)`. The dynamic type name in lower case, with words separated by '_'. Used to generate `gst_dynamic_type_register_*(GstPlugin* plugin)`. The #GType of the dynamic type Struct to store date, time and timezone information altogether. #GstDateTime is refcounted and immutable. Date information is handled using the [proleptic Gregorian calendar]. Provides basic creation functions and accessor functions to its fields. [proleptic Gregorian calendar]: https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar Creates a new #GstDateTime using the date and times in the gregorian calendar in the supplied timezone. @year should be from 1 to 9999, @month should be from 1 to 12, @day from 1 to 31, @hour from 0 to 23, @minutes and @seconds from 0 to 59. Note that @tzoffset is a float and was chosen so for being able to handle some fractional timezones, while it still keeps the readability of representing it in hours for most timezones. If value is -1 then all over value will be ignored. For example if @month == -1, then #GstDateTime will be created only for @year. If @day == -1, then #GstDateTime will be created for @year and @month and so on. the newly created #GstDateTime, or %NULL on error. Offset from UTC in hours. the gregorian year the gregorian month the day of the gregorian month the hour of the day the minute of the hour the second of the minute Creates a new #GstDateTime from a #GDateTime object. a newly created #GstDateTime, or %NULL if @dt is %NULL. the #GDateTime. Tries to parse common variants of ISO-8601 datetime strings into a #GstDateTime. Possible input formats are (for example): `2012-06-30T22:46:43Z`, `2012`, `2012-06`, `2012-06-30`, `2012-06-30T22:46:43-0430`, `2012-06-30T22:46Z`, `2012-06-30T22:46-0430`, `2012-06-30 22:46`, `2012-06-30 22:46:43`, `2012-06-00`, `2012-00-00`, `2012-00-30`, `22:46:43Z`, `22:46Z`, `22:46:43-0430`, `22:46-0430`, `22:46:30`, `22:46` If no date is provided, it is assumed to be "today" in the timezone provided (if any), otherwise UTC. a newly created #GstDateTime, or %NULL on error ISO 8601-formatted datetime string. Creates a new #GstDateTime using the time since Jan 1, 1970 specified by @secs. The #GstDateTime is in the local timezone. the newly created #GstDateTime, or %NULL on error. seconds from the Unix epoch Creates a new #GstDateTime using the time since Jan 1, 1970 specified by @usecs. The #GstDateTime is in the local timezone. a newly created #GstDateTime, or %NULL on error. microseconds from the Unix epoch Creates a new #GstDateTime using the time since Jan 1, 1970 specified by @secs. The #GstDateTime is in the UTC timezone. the newly created #GstDateTime, or %NULL on error. seconds from the Unix epoch Creates a new #GstDateTime using the time since Jan 1, 1970 specified by @usecs. The #GstDateTime is in UTC. a newly created #GstDateTime, or %NULL on error. microseconds from the Unix epoch Creates a new #GstDateTime using the date and times in the gregorian calendar in the local timezone. @year should be from 1 to 9999, @month should be from 1 to 12, @day from 1 to 31, @hour from 0 to 23, @minutes and @seconds from 0 to 59. If @month is -1, then the #GstDateTime created will only contain @year, and all other fields will be considered not set. If @day is -1, then the #GstDateTime created will only contain @year and @month and all other fields will be considered not set. If @hour is -1, then the #GstDateTime created will only contain @year and @month and @day, and the time fields will be considered not set. In this case @minute and @seconds should also be -1. the newly created #GstDateTime, or %NULL on error. the gregorian year the gregorian month, or -1 the day of the gregorian month, or -1 the hour of the day, or -1 the minute of the hour, or -1 the second of the minute, or -1 Creates a new #GstDateTime representing the current date and time. the newly created #GstDateTime which should be freed with gst_date_time_unref(), or %NULL on error. Creates a new #GstDateTime that represents the current instant at Universal coordinated time. the newly created #GstDateTime which should be freed with gst_date_time_unref(), or %NULL on error. Creates a new #GstDateTime using the date and times in the gregorian calendar in the local timezone. @year should be from 1 to 9999. the newly created #GstDateTime, or %NULL on error. the gregorian year Creates a new #GstDateTime using the date and times in the gregorian calendar in the local timezone. @year should be from 1 to 9999, @month should be from 1 to 12. If value is -1 then all over value will be ignored. For example if @month == -1, then #GstDateTime will created only for @year. the newly created #GstDateTime, or %NULL on error. the gregorian year the gregorian month Creates a new #GstDateTime using the date and times in the gregorian calendar in the local timezone. @year should be from 1 to 9999, @month should be from 1 to 12, @day from 1 to 31. If value is -1 then all over value will be ignored. For example if @month == -1, then #GstDateTime will created only for @year. If @day == -1, then #GstDateTime will created for @year and @month and so on. the newly created #GstDateTime, or %NULL on error. the gregorian year the gregorian month the day of the gregorian month Returns the day of the month of this #GstDateTime. The day of this #GstDateTime, or -1 if none is set. a #GstDateTime Retrieves the hour of the day represented by @datetime in the gregorian calendar. The return is in the range of 0 to 23. the hour of the day, or -1 if none is set. a #GstDateTime Retrieves the fractional part of the seconds in microseconds represented by @datetime in the gregorian calendar. the microsecond of the second, or -1 if none is set. a #GstDateTime Retrieves the minute of the hour represented by @datetime in the gregorian calendar. the minute of the hour, or -1 if none is set. a #GstDateTime Returns the month of this #GstDateTime. January is 1, February is 2, etc.. The month of this #GstDateTime, or -1 if none is set. a #GstDateTime Retrieves the second of the minute represented by @datetime in the gregorian calendar. the second represented by @datetime, or -1 if none is set. a #GstDateTime Retrieves the offset from UTC in hours that the timezone specified by @datetime represents. Timezones ahead (to the east) of UTC have positive values, timezones before (to the west) of UTC have negative values. If @datetime represents UTC time, then the offset is zero. the offset from UTC in hours, or %G_MAXFLOAT if none is set. a #GstDateTime Returns the year of this #GstDateTime. Call gst_date_time_has_year() before, to avoid warnings. The year of this #GstDateTime a #GstDateTime %TRUE if @datetime<!-- -->'s day field is set, otherwise %FALSE a #GstDateTime %TRUE if @datetime<!-- -->'s month field is set, otherwise %FALSE a #GstDateTime %TRUE if @datetime<!-- -->'s second field is set, otherwise %FALSE a #GstDateTime %TRUE if @datetime<!-- -->'s hour and minute fields are set, otherwise %FALSE a #GstDateTime %TRUE if @datetime<!-- -->'s year field is set (which should always be the case), otherwise %FALSE a #GstDateTime Atomically increments the reference count of @datetime by one. the reference @datetime a #GstDateTime Creates a new #GDateTime from a fully defined #GstDateTime object. a newly created #GDateTime, or %NULL on error or if @datetime does not have a year, month, day, hour, minute and second. GstDateTime. Create a minimal string compatible with ISO-8601. Possible output formats are (for example): `2012`, `2012-06`, `2012-06-23`, `2012-06-23T23:30Z`, `2012-06-23T23:30+0100`, `2012-06-23T23:30:59Z`, `2012-06-23T23:30:59+0100` a newly allocated string formatted according to ISO 8601 and only including the datetime fields that are valid, or %NULL in case there was an error. a #GstDateTime. Atomically decrements the reference count of @datetime by one. When the reference count reaches zero, the structure is freed. a #GstDateTime This is the struct that describes the categories. Once initialized with #GST_DEBUG_CATEGORY_INIT, its values can't be changed anymore. Removes and frees the category and all associated resources. This function can easily cause memory corruption, don't use it. #GstDebugCategory to free. Returns the color of a debug category used when printing output in this category. the color of the category. a #GstDebugCategory to get the color of. Returns the description of a debug category. the description of the category. a #GstDebugCategory to get the description of. Returns the name of a debug category. the name of the category. a #GstDebugCategory to get name of. Returns the threshold of a #GstDebugCategory. the #GstDebugLevel that is used as threshold. a #GstDebugCategory to get threshold of. Resets the threshold of the category to the default level. Debug information will only be output if the threshold is lower or equal to the level of the debugging message. Use this function to set the threshold back to where it was after using gst_debug_category_set_threshold(). a #GstDebugCategory to reset threshold of. Sets the threshold of the category to the given level. Debug information will only be output if the threshold is lower or equal to the level of the debugging message. > Do not use this function in production code, because other functions may > change the threshold of categories as side effect. It is however a nice > function to use when debugging (even from gdb). a #GstDebugCategory to set threshold of. the #GstDebugLevel threshold to set. These are some terminal style flags you can use when creating your debugging categories to make them stand out in debugging output. Use black as foreground color. Use red as foreground color. Use green as foreground color. Use yellow as foreground color. Use blue as foreground color. Use magenta as foreground color. Use cyan as foreground color. Use white as foreground color. Use black as background color. Use red as background color. Use green as background color. Use yellow as background color. Use blue as background color. Use magenta as background color. Use cyan as background color. Use white as background color. Make the output bold. Underline the output. Do not use colors in logs. Paint logs in a platform-specific way. Paint logs with UNIX terminal color codes no matter what platform GStreamer is running on. we define this to avoid a compiler warning regarding a cast from a function pointer to a void pointer (see https://bugzilla.gnome.org/show_bug.cgi?id=309253) Available details for pipeline graphs produced by GST_DEBUG_BIN_TO_DOT_FILE() and GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(). show caps-name on edges show caps-details on edges show modified parameters on elements show element states show full element parameter values even if they are very long show all the typical details that one might want show all details regardless of how large or verbose they make the resulting output The level defines the importance of a debugging message. The more important a message is, the greater the probability that the debugging system outputs it. No debugging level specified or desired. Used to deactivate debugging output. Error messages are to be used only when an error occurred that stops the application from keeping working correctly. An examples is gst_element_error, which outputs a message with this priority. It does not mean that the application is terminating as with g_error. Warning messages are to inform about abnormal behaviour that could lead to problems or weird behaviour later on. An example of this would be clocking issues ("your computer is pretty slow") or broken input data ("Can't synchronize to stream.") Fixme messages are messages that indicate that something in the executed code path is not fully implemented or handled yet. Note that this does not replace proper error handling in any way, the purpose of this message is to make it easier to spot incomplete/unfinished pieces of code when reading the debug log. Informational messages should be used to keep the developer updated about what is happening. Examples where this should be used are when a typefind function has successfully determined the type of the stream or when an mp3 plugin detects the format to be used. ("This file has mono sound.") Debugging messages should be used when something common happens that is not the expected default behavior, or something that's useful to know but doesn't happen all the time (ie. per loop iteration or buffer processed or event handled). An example would be notifications about state changes or receiving/sending of events. Log messages are messages that are very common but might be useful to know. As a rule of thumb a pipeline that is running as expected should never output anything else but LOG messages whilst processing data. Use this log level to log recurring information in chain functions and loop functions, for example. Tracing-related messages. Examples for this are referencing/dereferencing of objects. memory dump messages are used to log (small) chunks of data as memory dumps in the log. They will be displayed as hexdump with ASCII characters. The number of defined debugging levels. Get the string representation of a debugging level the name the level to get the name for Gets the string representation of a #GstDebugMessage. This function is used in debug handlers to extract the message. the string representation of a #GstDebugMessage. a debug message Get the id of the object that emitted this message. This function is used in debug handlers. Can be empty. The emitter of a #GstDebugMessage. a debug message #GstDevice are objects representing a device, they contain relevant metadata about the device, such as its class and the #GstCaps representing the media types it can produce or handle. #GstDevice are created by #GstDeviceProvider objects which can be aggregated by #GstDeviceMonitor objects. Creates the element with all of the required parameters set to use this device. a new #GstElement configured to use this device a #GstDevice name of new element, or %NULL to automatically create a unique name. Tries to reconfigure an existing element to use the device. If this function fails, then one must destroy the element and create a new one using gst_device_create_element(). Note: This should only be implemented for elements can change their device in the PLAYING state. %TRUE if the element could be reconfigured to use this device, %FALSE otherwise. a #GstDevice a #GstElement Creates the element with all of the required parameters set to use this device. a new #GstElement configured to use this device a #GstDevice name of new element, or %NULL to automatically create a unique name. Getter for the #GstCaps that this device supports. The #GstCaps supported by this device. Unref with gst_caps_unref() when done. a #GstDevice Gets the "class" of a device. This is a "/" separated list of classes that represent this device. They are a subset of the classes of the #GstDeviceProvider that produced this device. The device class. Free with g_free() after use. a #GstDevice Gets the user-friendly name of the device. The device name. Free with g_free() after use. a #GstDevice Gets the extra properties of a device. The extra properties or %NULL when there are none. Free with gst_structure_free() after use. a #GstDevice Check if @device matches all of the given classes %TRUE if @device matches. a #GstDevice a "/"-separated list of device classes to match, only match if all classes are matched Check if @factory matches all of the given classes %TRUE if @device matches. a #GstDevice a %NULL terminated array of classes to match, only match if all classes are matched Tries to reconfigure an existing element to use the device. If this function fails, then one must destroy the element and create a new one using gst_device_create_element(). Note: This should only be implemented for elements can change their device in the PLAYING state. %TRUE if the element could be reconfigured to use this device, %FALSE otherwise. a #GstDevice a #GstElement The parent #GstObject structure. The class structure for a #GstDevice object. The parent #GstObjectClass structure. Creates the fully configured element to access this device. Subclasses need to override this and return a new element. a new #GstElement configured to use this device a #GstDevice name of new element, or %NULL to automatically create a unique name. This only needs to be implemented by subclasses if the element can be reconfigured to use a different device. See the documentation for gst_device_reconfigure_element(). %TRUE if the element could be reconfigured to use this device, %FALSE otherwise. a #GstDevice a #GstElement Applications should create a #GstDeviceMonitor when they want to probe, list and monitor devices of a specific type. The #GstDeviceMonitor will create the appropriate #GstDeviceProvider objects and manage them. It will then post messages on its #GstBus for devices that have been added and removed. The device monitor will monitor all devices matching the filters that the application has set. The basic use pattern of a device monitor is as follows: |[ static gboolean my_bus_func (GstBus * bus, GstMessage * message, gpointer user_data) { GstDevice *device; gchar *name; switch (GST_MESSAGE_TYPE (message)) { case GST_MESSAGE_DEVICE_ADDED: gst_message_parse_device_added (message, &device); name = gst_device_get_display_name (device); g_print("Device added: %s\n", name); g_free (name); gst_object_unref (device); break; case GST_MESSAGE_DEVICE_REMOVED: gst_message_parse_device_removed (message, &device); name = gst_device_get_display_name (device); g_print("Device removed: %s\n", name); g_free (name); gst_object_unref (device); break; default: break; } return G_SOURCE_CONTINUE; } GstDeviceMonitor * setup_raw_video_source_device_monitor (void) { GstDeviceMonitor *monitor; GstBus *bus; GstCaps *caps; monitor = gst_device_monitor_new (); bus = gst_device_monitor_get_bus (monitor); gst_bus_add_watch (bus, my_bus_func, NULL); gst_object_unref (bus); caps = gst_caps_new_empty_simple ("video/x-raw"); gst_device_monitor_add_filter (monitor, "Video/Source", caps); gst_caps_unref (caps); gst_device_monitor_start (monitor); return monitor; } ]| Create a new #GstDeviceMonitor a new device monitor. Adds a filter for which #GstDevice will be monitored, any device that matches all these classes and the #GstCaps will be returned. If this function is called multiple times to add more filters, each will be matched independently. That is, adding more filters will not further restrict what devices are matched. The #GstCaps supported by the device as returned by gst_device_get_caps() are not intersected with caps filters added using this function. Filters must be added before the #GstDeviceMonitor is started. The id of the new filter or 0 if no provider matched the filter's classes. a device monitor device classes to use as filter or %NULL for any class the #GstCaps to filter or %NULL for ANY Gets the #GstBus of this #GstDeviceMonitor a #GstBus a #GstDeviceProvider Gets a list of devices from all of the relevant monitors. This may actually probe the hardware if the monitor is not currently started. a #GList of #GstDevice A #GstDeviceProvider Get a list of the currently selected device provider factories. This A list of device provider factory names that are currently being monitored by @monitor or %NULL when nothing is being monitored. a #GstDeviceMonitor Get if @monitor is currently showing all devices, even those from hidden providers. %TRUE when all devices will be shown. a #GstDeviceMonitor Removes a filter from the #GstDeviceMonitor using the id that was returned by gst_device_monitor_add_filter(). %TRUE of the filter id was valid, %FALSE otherwise a device monitor the id of the filter Set if all devices should be visible, even those devices from hidden providers. Setting @show_all to true might show some devices multiple times. a #GstDeviceMonitor show all devices Starts monitoring the devices, one this has succeeded, the %GST_MESSAGE_DEVICE_ADDED and %GST_MESSAGE_DEVICE_REMOVED messages will be emitted on the bus when the list of devices changes. %TRUE if the device monitoring could be started, i.e. at least a single device provider was started successfully. A #GstDeviceMonitor Stops monitoring the devices. A #GstDeviceProvider the parent #GstObject structure Opaque device monitor class structure. the parent #GstObjectClass structure A #GstDeviceProvider subclass is provided by a plugin that handles devices if there is a way to programmatically list connected devices. It can also optionally provide updates to the list of connected devices. Each #GstDeviceProvider subclass is a singleton, a plugin should normally provide a single subclass for all devices. Applications would normally use a #GstDeviceMonitor to monitor devices from all relevant providers. Create a new device providerfactory capable of instantiating objects of the @type and add the factory to @plugin. %TRUE, if the registering succeeded, %FALSE on error #GstPlugin to register the device provider with, or %NULL for a static device provider. name of device providers of this type rank of device provider (higher rank means more importance when autoplugging) GType of device provider to register Returns a list of devices that are currently available. This should never block. The devices should not have a parent and should be floating. Starts providering the devices. This will cause #GST_MESSAGE_DEVICE_ADDED and #GST_MESSAGE_DEVICE_REMOVED messages to be posted on the provider's bus when devices are added or removed from the system. Since the #GstDeviceProvider is a singleton, gst_device_provider_start() may already have been called by another user of the object, gst_device_provider_stop() needs to be called the same number of times. After this function has been called, gst_device_provider_get_devices() will return the same objects that have been received from the #GST_MESSAGE_DEVICE_ADDED messages and will no longer probe. %TRUE if the device providering could be started A #GstDeviceProvider Decreases the use-count by one. If the use count reaches zero, this #GstDeviceProvider will stop providering the devices. This needs to be called the same number of times that gst_device_provider_start() was called. A #GstDeviceProvider Posts a message on the provider's #GstBus to inform applications that a new device has been added. This is for use by subclasses. @device's reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink()). a #GstDeviceProvider a #GstDevice that has been added This function is used when @changed_device was modified into its new form @device. This will post a `DEVICE_CHANGED` message on the bus to let the application know that the device was modified. #GstDevice is immutable for MT. safety purposes so this is an "atomic" way of letting the application know when a device was modified. the new version of @changed_device the old version of the device that has been updated Posts a message on the provider's #GstBus to inform applications that a device has been removed. This is for use by subclasses. a #GstDeviceProvider a #GstDevice that has been removed Gets the #GstBus of this #GstDeviceProvider a #GstBus a #GstDeviceProvider Gets a list of devices that this provider understands. This may actually probe the hardware if the provider is not currently started. If the provider has been started, this will returned the same #GstDevice objedcts that have been returned by the #GST_MESSAGE_DEVICE_ADDED messages. a #GList of #GstDevice A #GstDeviceProvider Retrieves the factory that was used to create this device provider. the #GstDeviceProviderFactory used for creating this device provider. no refcounting is needed. a #GstDeviceProvider to request the device provider factory of. Get the provider factory names of the #GstDeviceProvider instances that are hidden by @provider. a list of hidden providers factory names or %NULL when nothing is hidden by @provider. Free with g_strfreev. a #GstDeviceProvider Get metadata with @key in @provider. the metadata for @key. provider to get metadata for the key to get Make @provider hide the devices from the factory with @name. This function is used when @provider will also provide the devices reported by provider factory @name. A monitor should stop monitoring the device provider with @name to avoid duplicate devices. a #GstDeviceProvider a provider factory name This function can be used to know if the @provider was successfully started. a #GstDeviceProvider Starts providering the devices. This will cause #GST_MESSAGE_DEVICE_ADDED and #GST_MESSAGE_DEVICE_REMOVED messages to be posted on the provider's bus when devices are added or removed from the system. Since the #GstDeviceProvider is a singleton, gst_device_provider_start() may already have been called by another user of the object, gst_device_provider_stop() needs to be called the same number of times. After this function has been called, gst_device_provider_get_devices() will return the same objects that have been received from the #GST_MESSAGE_DEVICE_ADDED messages and will no longer probe. %TRUE if the device providering could be started A #GstDeviceProvider Decreases the use-count by one. If the use count reaches zero, this #GstDeviceProvider will stop providering the devices. This needs to be called the same number of times that gst_device_provider_start() was called. A #GstDeviceProvider Make @provider unhide the devices from factory @name. This function is used when @provider will no longer provide the devices reported by provider factory @name. A monitor should start monitoring the devices from provider factory @name in order to see all devices again. a #GstDeviceProvider a provider factory name The parent #GstObject a #GList of the #GstDevice objects The structure of the base #GstDeviceProviderClass the parent #GstObjectClass structure a pointer to the #GstDeviceProviderFactory that creates this provider Returns a list of devices that are currently available. This should never block. The devices should not have a parent and should be floating. Starts monitoring for new devices. Only subclasses that can know that devices have been added or remove need to implement this method. %TRUE if the device providering could be started A #GstDeviceProvider Stops monitoring for new devices. Only subclasses that implement the start() method need to implement this method. A #GstDeviceProvider Set @key with @value as metadata in @klass. class to set metadata for the key to set the value to set Set @key with @value as metadata in @klass. Same as gst_device_provider_class_add_metadata(), but @value must be a static string or an inlined string, as it will not be copied. (GStreamer plugins will be made resident once loaded, so this function can be used even from dynamically loaded plugins.) class to set metadata for the key to set the value to set Get metadata with @key in @klass. the metadata for @key. class to get metadata for the key to get Sets the detailed information for a #GstDeviceProviderClass. > This function is for use in _class_init functions only. class to set metadata for The long English name of the device provider. E.g. "File Sink" String describing the type of device provider, as an unordered list separated with slashes ('/'). See draft-klass.txt of the design docs for more details and common types. E.g: "Sink/File" Sentence describing the purpose of the device provider. E.g: "Write stream to a file" Name and contact details of the author(s). Use \n to separate multiple author metadata. E.g: "Joe Bloggs &lt;joe.blogs at foo.com&gt;" Sets the detailed information for a #GstDeviceProviderClass. > This function is for use in _class_init functions only. Same as gst_device_provider_class_set_metadata(), but @longname, @classification, @description, and @author 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.) class to set metadata for The long English name of the element. E.g. "File Sink" String describing the type of element, as an unordered list separated with slashes ('/'). See draft-klass.txt of the design docs for more details and common types. E.g: "Sink/File" Sentence describing the purpose of the element. E.g: "Write stream to a file" Name and contact details of the author(s). Use \n to separate multiple author metadata. E.g: "Joe Bloggs &lt;joe.blogs at foo.com&gt;" #GstDeviceProviderFactory is used to create instances of device providers. A GstDeviceProviderfactory can be added to a #GstPlugin as it is also a #GstPluginFeature. Use the gst_device_provider_factory_find() and gst_device_provider_factory_get() functions to create device provider instances or use gst_device_provider_factory_get_by_name() as a convenient shortcut. Search for an device provider factory of the given name. Refs the returned device provider factory; caller is responsible for unreffing. #GstDeviceProviderFactory if found, %NULL otherwise name of factory to find Returns the device provider of the type defined by the given device provider factory. a #GstDeviceProvider or %NULL if unable to create device provider a named factory to instantiate Get a list of factories with a rank greater or equal to @minrank. The list of factories is returned by decreasing rank. a #GList of #GstDeviceProviderFactory device providers. Use gst_plugin_feature_list_free() after usage. Minimum rank Returns the device provider of the type defined by the given device providerfactory. the #GstDeviceProvider or %NULL if the device provider couldn't be created factory to instantiate Get the #GType for device providers managed by this factory. The type can only be retrieved if the device provider factory is loaded, which can be assured with gst_plugin_feature_load(). the #GType for device providers managed by this factory. factory to get managed #GType from Get the metadata on @factory with @key. the metadata with @key on @factory or %NULL when there was no metadata with the given @key. a #GstDeviceProviderFactory a key Get the available keys for the metadata on @factory. a %NULL-terminated array of key strings, or %NULL when there is no metadata. Free with g_strfreev() when no longer needed. a #GstDeviceProviderFactory Check if @factory matches all of the given @classes %TRUE if @factory matches or if @classes is %NULL. a #GstDeviceProviderFactory a "/" separate list of classes to match, only match if all classes are matched Check if @factory matches all of the given classes %TRUE if @factory matches. a #GstDeviceProviderFactory a %NULL terminated array of classes to match, only match if all classes are matched The opaque #GstDeviceProviderFactoryClass data structure. A fundamental type that describes a #gdouble range #GstDynamicTypeFactory is used to represent a type that can be automatically loaded the first time it is used. For example, a non-standard type for use in caps fields. In general, applications and plugins don't need to use the factory beyond registering the type in a plugin init function. Once that is done, the type is stored in the registry, and ready as soon as the registry is loaded. ## Registering a type for dynamic loading |[<!-- language="C" --> static gboolean plugin_init (GstPlugin * plugin) { return gst_dynamic_type_register (plugin, GST_TYPE_CUSTOM_CAPS_FIELD); } ]| Get the message bus of this element. This is not thread-safe by default (i.e. you will have to make sure the object lock is taken yourself). If in doubt use gst_element_get_bus() instead. A #GstElement to query Get the clock of this element.This is not thread-safe by default (i.e. you will have to make sure it is safe yourself). If in doubt use gst_element_get_clock() instead. A #GstElement to query Utility function that elements can use in case they encountered a fatal data processing error. The pipeline will post an error message and the application will be requested to stop further media processing. the element that generates the error like CORE, LIBRARY, RESOURCE or STREAM (see [GstGError](gsterror)) error code defined for that domain (see [GstGError](gsterror)) the message to display (format string and args enclosed in parentheses) debugging information for the message (format string and args enclosed in parentheses) Utility function that elements can use in case they encountered a fatal data processing error. The pipeline will post an error message and the application will be requested to stop further media processing. the element that generates the error like CORE, LIBRARY, RESOURCE or STREAM (see [GstGError](gsterror)) error code defined for that domain (see [GstGError](gsterror)) the message to display (format string and args enclosed in parentheses) debugging information for the message (format string and args enclosed in parentheses) optional name, type, value triplets, which will be stored in the associated GstStructure. NULL terminator required. Must be enclosed within parentheses. Elements interacting with hardware devices should specify this classifier in their metadata. You may need to put the element in "READY" state to test if the hardware is present in the system. Elements of any of the defined GST_ELEMENT_FACTORY_LIST types All sinks handling audio, video or image media types All encoders handling audio media types All elements used to 'decode' streams (decoders, demuxers, parsers, depayloaders) Elements matching any of the defined GST_ELEMENT_FACTORY_TYPE_MEDIA types Note: Do not use this if you wish to not filter against any of the defined media types. If you wish to do this, simply don't specify any GST_ELEMENT_FACTORY_TYPE_MEDIA flag. Timestamp correcting elements All encoders handling video or image media types Utility function that elements can use in case they encountered a fatal data processing error due to wrong flow processing. the element that generates the error the GstFlowReturn leading to that ERROR message Utility function that elements can use in case they want to inform the application of something noteworthy that is not an error. The pipeline will post a info message and the application will be informed. the element that generates the information like CORE, LIBRARY, RESOURCE or STREAM (see [GstGError](gsterror)) error code defined for that domain (see [GstGError](gsterror)) the message to display (format string and args enclosed in parentheses) debugging information for the message (format string and args enclosed in parentheses) Utility function that elements can use in case they want to inform the application of something noteworthy that is not an error. The pipeline will post a info message and the application will be informed. Optional name, type, value triplets may be supplied, and will be stored in the associated GstStructure. NULL terminator required. the element that generates the information like CORE, LIBRARY, RESOURCE or STREAM (see [GstGError](gsterror)) error code defined for that domain (see [GstGError](gsterror)) the message to display (format string and args enclosed in parentheses) debugging information for the message (format string and args enclosed in parentheses) optional name, type, value triplets, which will be stored in the associated GstStructure. NULL terminator required. Must be enclosed within parentheses. Check if the element is in the locked state and therefore will ignore state changes from its parent object. A #GstElement to query Name and contact details of the author(s). Use \n to separate multiple author details. E.g: "Joe Bloggs &lt;joe.blogs at foo.com&gt;" Sentence describing the purpose of the element. E.g: "Write stream to a file" Set uri pointing to user documentation. Applications can use this to show help for e.g. effects to users. Elements that bridge to certain other products can include an icon of that used product. Application can show the icon in menus/selectors to help identifying specific elements. String describing the type of element, as an unordered list separated with slashes ('/'). See draft-klass.txt of the design docs for more details and common types. E.g: "Sink/File" The long English name of the element. E.g. "File Sink" Gets the name of this element. This is not thread-safe by default (i.e. you will have to make sure the object lock is taken yourself). If in doubt use gst_element_get_name() instead. A #GstElement to query Get the pads of this elements. A #GstElement to query Get the parent object of this element. This is not thread-safe by default (i.e. you will have to make sure the object lock is taken yourself). If in doubt use gst_object_get_parent() instead. A #GstElement to query This macro can be used to register an element into a #GstPlugin. This method will be usually called in the plugin init function but can also be called with a NULL plugin, for example with a static registration of the element. It has to be used in combination with #GST_ELEMENT_REGISTER_DECLARE. ``` GstPlugin* plugin; ... GST_ELEMENT_REGISTER (stream_filter, plugin); ``` The element name in lower case, with words separated by '_'. The #GstPlugin where to register the element. This macro can be used to declare a new element. It has to be used in combination with #GST_ELEMENT_REGISTER_DEFINE macros and must be placed outside any block to declare the element registration function. As an example, you may declare the element named "stream-filter" with the namespace `my` as following: ``` GST_ELEMENT_REGISTER_DECLARE (stream_filter) ``` The element name in lower case, with words separated by '_'. A convenience macro to define the entry point of an element `gst_element_register_*(GstPlugin* plugin)`. As an example, you may define the element named "streamer-filter" with the namespace `my` as following: ``` GST_ELEMENT_REGISTER_REGISTER_DEFINE (stream_filter, "stream-filter", GST_RANK_PRIMARY, MY_TYPE_STREAM_FILTER) ``` The element name in lower case, with words separated by '_'. Used to generate `gst_element_register_*(GstPlugin* plugin)`. The public name of the element The #GstRank of the element (higher rank means more importance when autoplugging, see #GstRank) The #GType of the element. A convenience macro to define the entry point of an element `gst_element_register_*(GstPlugin* plugin)` which uses register_func as the main registration method for the element. As an example, you may define the element named "streamer-filter" with the namespace `my` as following using `element_register_custom`: ``` GST_ELEMENT_REGISTER_DEFINE_CUSTOM (my_element, element_register_custom) ``` The element name in lower case, with words separated by '_'. Used to generate `gst_element_register_*(GstPlugin* plugin)`. pointer to a method with the format: `gboolean register_func (GstPlugin* plugin);` A convenience macro to define the entry point of an element `gst_element_register_*(GstPlugin* plugin)` executing code before gst_element_register in `gst_element_register_*(GstPlugin* plugin)`. As an example, you may define the element named "stream-filter" with the namespace `my` as following: ``` #define _pre_register_init * my_stream_filter_pre_register (plugin); ; GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (stream_filter, "stream-filter", GST_RANK_PRIMARY, MY_TYPE_STREAM_FILTER, _pre_register_init) ``` The element name in lower case, with words separated by '_'. Used to generate `gst_element_register_*(GstPlugin* plugin)`. The public name of the element The #GstRank of the element (higher rank means more importance when autoplugging, see #GstRank) The #GType of the element. Custom code that gets inserted in the gst_element_register_*() function. This macro returns the start_time of the @elem. The start_time is the running_time of the pipeline when the element went to PAUSED. a #GstElement to return the start time for. Utility function that elements can use in case they encountered a non-fatal data processing problem. The pipeline will post a warning message and the application will be informed. the element that generates the warning like CORE, LIBRARY, RESOURCE or STREAM (see [GstGError](gsterror)) error code defined for that domain (see [GstGError](gsterror)) the message to display (format string and args enclosed in parentheses) debugging information for the message (format string and args enclosed in parentheses) Utility function that elements can use in case they encountered a non-fatal data processing problem. The pipeline will post a warning message and the application will be informed. the element that generates the warning like CORE, LIBRARY, RESOURCE or STREAM (see [GstGError](gsterror)) error code defined for that domain (see [GstGError](gsterror)) the message to display (format string and args enclosed in parentheses) debugging information for the message (format string and args enclosed in parentheses) optional name, type, value triplets, which will be stored in the associated GstStructure. NULL terminator required. Must be enclosed within parentheses. Output an error message in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. printf-style message to output Output an error message for the given identifier in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. An identifier of the message provider printf-style message to output Output an error message belonging to the given object in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. the #GObject the message belongs to printf-style message to output Builds a string using errno describing the previously failed system call. To be used as the debug argument in #GST_ELEMENT_ERROR. Check if an event can travel downstream. the event to query Check if an event is serialized with the data stream. the event to query Check if an event is sticky on the pads. the event to query Check if an event can travel upstream. the event to query when making custom event types, use this macro with the num and the given flags the event number to create the event flags The sequence number of @event. the event to query Get the #GstClockTime timestamp of the event. This is the time when the event was created. the event to query Get the #GstEventType of the event. the event to query The same thing as #GST_EVENT_TYPE_UPSTREAM | #GST_EVENT_TYPE_DOWNSTREAM. Get a constant string representation of the #GstEventType of the event. the event to query GstElement is the abstract base class needed to construct an element that can be used in a GStreamer pipeline. Please refer to the plugin writers guide for more information on creating #GstElement subclasses. The name of a #GstElement can be get with gst_element_get_name() and set with gst_element_set_name(). For speed, GST_ELEMENT_NAME() can be used in the core when using the appropriate locking. Do not use this in plug-ins or applications in order to retain ABI compatibility. Elements can have pads (of the type #GstPad). These pads link to pads on other elements. #GstBuffer flow between these linked pads. A #GstElement has a #GList of #GstPad structures for all their input (or sink) and output (or source) pads. Core and plug-in writers can add and remove pads with gst_element_add_pad() and gst_element_remove_pad(). An existing pad of an element can be retrieved by name with gst_element_get_static_pad(). A new dynamic pad can be created using gst_element_request_pad() with a #GstPadTemplate. An iterator of all pads can be retrieved with gst_element_iterate_pads(). Elements can be linked through their pads. If the link is straightforward, use the gst_element_link() convenience function to link two elements, or gst_element_link_many() for more elements in a row. Use gst_element_link_filtered() to link two elements constrained by a specified set of #GstCaps. For finer control, use gst_element_link_pads() and gst_element_link_pads_filtered() to specify the pads to link on each element by name. Each element has a state (see #GstState). You can get and set the state of an element with gst_element_get_state() and gst_element_set_state(). Setting a state triggers a #GstStateChange. To get a string representation of a #GstState, use gst_element_state_get_name(). You can get and set a #GstClock on an element using gst_element_get_clock() and gst_element_set_clock(). Some elements can provide a clock for the pipeline if the #GST_ELEMENT_FLAG_PROVIDE_CLOCK flag is set. With the gst_element_provide_clock() method one can retrieve the clock provided by such an element. Not all elements require a clock to operate correctly. If the #GST_ELEMENT_FLAG_REQUIRE_CLOCK() flag is set, a clock should be set on the element with gst_element_set_clock(). Note that clock selection and distribution is normally handled by the toplevel #GstPipeline so the clock functions are only to be used in very specific situations. Creates an element for handling the given URI. a new element or %NULL if none could be created Whether to create a source or a sink URI to create an element for Name of created element, can be %NULL. Create a new elementfactory capable of instantiating objects of the @type and add the factory to @plugin. %TRUE, if the registering succeeded, %FALSE on error #GstPlugin to register the element with, or %NULL for a static element. name of elements of this type rank of element (higher rank means more importance when autoplugging) GType of element to register Gets a string representing the given state change result. a string with the name of the state result. a #GstStateChangeReturn to get the name of. Gets a string representing the given state. a string with the name of the state. a #GstState to get the name of. Marks @type as "documentation should be skipped". Can be useful for dynamically registered element to be excluded from plugin documentation system. Example: ```c GType my_type; GTypeInfo my_type_info; // Fill "my_type_info" ... my_type = g_type_register_static (GST_TYPE_MY_ELEMENT, "my-type-name", &my_type_info, 0); gst_element_type_set_skip_documentation (my_type); gst_element_register (plugin, "my-plugin-feature-name", rank, my_type); ``` a #GType of element Perform @transition on @element. This function must be called with STATE_LOCK held and is mainly used internally. the #GstStateChangeReturn of the state transition. a #GstElement the requested transition Gets the state of the element. For elements that performed an ASYNC state change, as reported by gst_element_set_state(), this function will block up to the specified timeout value for the state change to complete. If the element completes the state change or goes into an error, this function returns immediately with a return value of %GST_STATE_CHANGE_SUCCESS or %GST_STATE_CHANGE_FAILURE respectively. For elements that did not return %GST_STATE_CHANGE_ASYNC, this function returns the current and pending state immediately. This function returns %GST_STATE_CHANGE_NO_PREROLL if the element successfully changed its state but is not able to provide data yet. This mostly happens for live sources that only produce data in %GST_STATE_PLAYING. While the state change return is equivalent to %GST_STATE_CHANGE_SUCCESS, it is returned to the application to signal that some sink elements might not be able to complete their state change because an element is not producing data to complete the preroll. When setting the element to playing, the preroll will complete and playback will start. %GST_STATE_CHANGE_SUCCESS if the element has no more pending state and the last state change succeeded, %GST_STATE_CHANGE_ASYNC if the element is still performing a state change or %GST_STATE_CHANGE_FAILURE if the last state change failed. MT safe. a #GstElement to get the state of. a pointer to #GstState to hold the state. Can be %NULL. a pointer to #GstState to hold the pending state. Can be %NULL. a #GstClockTime to specify the timeout for an async state change or %GST_CLOCK_TIME_NONE for infinite timeout. Use this function to signal that the element does not expect any more pads to show up in the current pipeline. This function should be called whenever pads have been added by the element itself. Elements with #GST_PAD_SOMETIMES pad templates use this in combination with autopluggers to figure out that the element is done initializing its pads. This function emits the #GstElement::no-more-pads signal. MT safe. a #GstElement Post a message on the element's #GstBus. This function takes ownership of the message; if you want to access the message after this call, you should add an additional reference before calling. %TRUE if the message was successfully posted. The function returns %FALSE if the element did not have a bus. MT safe. a #GstElement posting the message a #GstMessage to post Get the clock provided by the given element. > An element is only required to provide a clock in the PAUSED > state. Some elements can provide a clock in other states. the GstClock provided by the element or %NULL if no clock could be provided. Unref after usage. MT safe. a #GstElement to query Performs a query on the given element. For elements that don't implement a query handler, this function forwards the query to a random srcpad or to the peer of a random linked sinkpad of this element. Please note that some queries might need a running pipeline to work. %TRUE if the query could be performed. MT safe. a #GstElement to perform the query on. the #GstQuery. called when a request pad is to be released Retrieves a request pad from the element according to the provided template. Pad templates can be looked up using gst_element_factory_get_static_pad_templates(). The pad should be released with gst_element_release_request_pad(). requested #GstPad if found, otherwise %NULL. Release after usage. a #GstElement to find a request pad of. a #GstPadTemplate of which we want a pad of. the name of the request #GstPad to retrieve. Can be %NULL. the caps of the pad we want to request. Can be %NULL. Sends an event to an element. If the element doesn't implement an event handler, the event will be pushed on a random linked sink pad for downstream events or a random linked source pad for upstream events. This function takes ownership of the provided event so you should gst_event_ref() it if you want to reuse the event after this call. MT safe. %TRUE if the event was handled. Events that trigger a preroll (such as flushing seeks and steps) will emit %GST_MESSAGE_ASYNC_DONE. a #GstElement to send the event to. the #GstEvent to send to the element. Sets the bus of the element. Increases the refcount on the bus. For internal use only, unless you're testing elements. MT safe. a #GstElement to set the bus of. the #GstBus to set. Sets the clock for the element. This function increases the refcount on the clock. Any previously set clock on the object is unreffed. %TRUE if the element accepted the clock. An element can refuse a clock when it, for example, is not able to slave its internal clock to the @clock or when it requires a specific clock to operate. MT safe. a #GstElement to set the clock for. the #GstClock to set for the element. Sets the context of the element. Increases the refcount of the context. MT safe. a #GstElement to set the context of. the #GstContext to set. Sets the state of the element. This function will try to set the requested state by going through all the intermediary states and calling the class's state change function for each. This function can return #GST_STATE_CHANGE_ASYNC, in which case the element will perform the remainder of the state change asynchronously in another thread. An application can use gst_element_get_state() to wait for the completion of the state change or it can wait for a %GST_MESSAGE_ASYNC_DONE or %GST_MESSAGE_STATE_CHANGED on the bus. State changes to %GST_STATE_READY or %GST_STATE_NULL never return #GST_STATE_CHANGE_ASYNC. Result of the state change using #GstStateChangeReturn. MT safe. a #GstElement to change state of. the element's new #GstState. called immediately after a new state was set. Abort the state change of the element. This function is used by elements that do asynchronous state changes and find out something is wrong. This function should be called with the STATE_LOCK held. MT safe. a #GstElement to abort the state of. Adds a pad (link point) to @element. @pad's parent will be set to @element; see gst_object_set_parent() for refcounting information. Pads are automatically activated when added in the PAUSED or PLAYING state. The pad and the element should be unlocked when calling this function. This function will emit the #GstElement::pad-added signal on the element. %TRUE if the pad could be added. This function can fail when a pad with the same name already existed or the pad already had another parent. MT safe. a #GstElement to add the pad to. the #GstPad to add to the element. a watch id, which can be used in connection with gst_element_remove_property_notify_watch() to remove the watch again. a #GstElement to watch (recursively) for property changes name of property to watch for changes, or NULL to watch all properties whether to include the new property value in the message a watch id, which can be used in connection with gst_element_remove_property_notify_watch() to remove the watch again. a #GstElement to watch for property changes name of property to watch for changes, or NULL to watch all properties whether to include the new property value in the message Calls @func from another thread and passes @user_data to it. This is to be used for cases when a state change has to be performed from a streaming thread, directly via gst_element_set_state() or indirectly e.g. via SEEK events. Calling those functions directly from the streaming thread will cause deadlocks in many situations, as they might involve waiting for the streaming thread to shut down from this very streaming thread. MT safe. a #GstElement Function to call asynchronously from another thread Data to pass to @func GDestroyNotify for @user_data Perform @transition on @element. This function must be called with STATE_LOCK held and is mainly used internally. the #GstStateChangeReturn of the state transition. a #GstElement the requested transition Commit the state change of the element and proceed to the next pending state if any. This function is used by elements that do asynchronous state changes. The core will normally call this method automatically when an element returned %GST_STATE_CHANGE_SUCCESS from the state change function. If after calling this method the element still has not reached the pending state, the next state change is performed. This method is used internally and should normally not be called by plugins or applications. This function must be called with STATE_LOCK held. The result of the commit state change. MT safe. a #GstElement to continue the state change of. The previous state return value Creates a pad for each pad template that is always available. This function is only useful during object initialization of subclasses of #GstElement. a #GstElement to create pads for Creates a stream-id for @element by combining the upstream information with the @stream_id. This function generates an unique stream-id by getting the upstream stream-start event stream ID and appending @stream_id to it. If the element has no sinkpad it will generate an upstream stream-id by doing an URI query on the element and in the worst case just uses a random number. Source elements that don't implement the URI handler interface should ideally generate a unique, deterministic stream-id manually instead. Since stream IDs are sorted alphabetically, any numbers in the stream ID should be printed with a fixed number of characters, preceded by 0's, such as by using the format \%03u instead of \%u. A stream-id for @element. The #GstElement to create a stream-id for The stream-id Creates a stream-id for @element by combining the upstream information with the @format. This function generates an unique stream-id by getting the upstream stream-start event stream ID and appending the stream-id to it. If the element has no sinkpad it will generate an upstream stream-id by doing an URI query on the element and in the worst case just uses a random number. Source elements that don't implement the URI handler interface should ideally generate a unique, deterministic stream-id manually instead. Since stream IDs are sorted alphabetically, any numbers in the stream ID should be printed with a fixed number of characters, preceded by 0's, such as by using the format \%03u instead of \%u. A stream-id for @element. The #GstElement to create a stream-id for The stream-id Creates a stream-id for @element by combining the upstream information with the @format. This function generates an unique stream-id by getting the upstream stream-start event stream ID and appending @format to it. If the element has no sinkpad it will generate an upstream stream-id by doing an URI query on the element and in the worst case just uses a random number. Source elements that don't implement the URI handler interface should ideally generate a unique, deterministic stream-id manually instead. Since stream IDs are sorted alphabetically, any numbers in the stream ID should be printed with a fixed number of characters, preceded by 0's, such as by using the format \%03u instead of \%u. A stream-id for @element. The #GstElement to create a stream-id for The stream-id parameters for the @format string Call @func with @user_data for each of @element's pads. @func will be called exactly once for each pad that exists at the time of this call, unless one of the calls to @func returns %FALSE in which case we will stop iterating pads and return early. If new pads are added or pads are removed while pads are being iterated, this will not be taken into account until next time this function is used. %FALSE if @element had no pads or if one of the calls to @func returned %FALSE. a #GstElement to iterate pads of function to call for each pad user data passed to @func Call @func with @user_data for each of @element's sink pads. @func will be called exactly once for each sink pad that exists at the time of this call, unless one of the calls to @func returns %FALSE in which case we will stop iterating pads and return early. If new sink pads are added or sink pads are removed while the sink pads are being iterated, this will not be taken into account until next time this function is used. %FALSE if @element had no sink pads or if one of the calls to @func returned %FALSE. a #GstElement to iterate sink pads of function to call for each sink pad user data passed to @func Call @func with @user_data for each of @element's source pads. @func will be called exactly once for each source pad that exists at the time of this call, unless one of the calls to @func returns %FALSE in which case we will stop iterating pads and return early. If new source pads are added or source pads are removed while the source pads are being iterated, this will not be taken into account until next time this function is used. %FALSE if @element had no source pads or if one of the calls to @func returned %FALSE. a #GstElement to iterate source pads of function to call for each source pad user data passed to @func Returns the base time of the element. The base time is the absolute time of the clock when this element was last put to PLAYING. Subtracting the base time from the clock time gives the running time of the element. the base time of the element. MT safe. a #GstElement. Returns the bus of the element. Note that only a #GstPipeline will provide a bus for the application. the element's #GstBus. unref after usage. MT safe. a #GstElement to get the bus of. Gets the currently configured clock of the element. This is the clock as was last set with gst_element_set_clock(). Elements in a pipeline will only have their clock set when the pipeline is in the PLAYING state. the #GstClock of the element. unref after usage. MT safe. a #GstElement to get the clock of. Looks for an unlinked pad to which the given pad can link. It is not guaranteed that linking the pads will work, though it should work in most cases. This function will first attempt to find a compatible unlinked ALWAYS pad, and if none can be found, it will request a compatible REQUEST pad by looking at the templates of @element. the #GstPad to which a link can be made, or %NULL if one cannot be found. gst_object_unref() after usage. a #GstElement in which the pad should be found. the #GstPad to find a compatible one for. the #GstCaps to use as a filter. Retrieves a pad template from @element that is compatible with @compattempl. Pads from compatible templates can be linked together. a compatible #GstPadTemplate, or %NULL if none was found. No unreferencing is necessary. a #GstElement to get a compatible pad template for the #GstPadTemplate to find a compatible template for Gets the context with @context_type set on the element or NULL. MT safe. A #GstContext or NULL a #GstElement to get the context of. a name of a context to retrieve Gets the context with @context_type set on the element or NULL. A #GstContext or NULL a #GstElement to get the context of. a name of a context to retrieve Gets the contexts set on the element. MT safe. List of #GstContext a #GstElement to set the context of. Returns the current clock time of the element, as in, the time of the element's clock, or GST_CLOCK_TIME_NONE if there is no clock. the clock time of the element, or GST_CLOCK_TIME_NONE if there is no clock. a #GstElement. Returns the running time of the element. The running time is the element's clock time minus its base time. Will return GST_CLOCK_TIME_NONE if the element has no clock, or if its base time has not been set. the running time of the element, or GST_CLOCK_TIME_NONE if the element has no clock or its base time has not been set. a #GstElement. Retrieves the factory that was used to create this element. the #GstElementFactory used for creating this element or %NULL if element has not been registered (static element). no refcounting is needed. a #GstElement to request the element factory of. Get metadata with @key in @klass. the metadata for @key. class to get metadata for the key to get Retrieves a padtemplate from @element with the given name. the #GstPadTemplate with the given name, or %NULL if none was found. No unreferencing is necessary. a #GstElement to get the pad template of. the name of the #GstPadTemplate to get. Retrieves a list of the pad templates associated with @element. The list must not be modified by the calling code. the #GList of pad templates. a #GstElement to get pad templates of. The name of this function is confusing to people learning GStreamer. gst_element_request_pad_simple() aims at making it more explicit it is a simplified gst_element_request_pad(). Prefer using gst_element_request_pad_simple() which provides the exact same functionality. requested #GstPad if found, otherwise %NULL. Release after usage. a #GstElement to find a request pad of. the name of the request #GstPad to retrieve. Returns the start time of the element. The start time is the running time of the clock when this element was last put to PAUSED. Usually the start_time is managed by a toplevel element such as #GstPipeline. MT safe. the start time of the element. a #GstElement. Gets the state of the element. For elements that performed an ASYNC state change, as reported by gst_element_set_state(), this function will block up to the specified timeout value for the state change to complete. If the element completes the state change or goes into an error, this function returns immediately with a return value of %GST_STATE_CHANGE_SUCCESS or %GST_STATE_CHANGE_FAILURE respectively. For elements that did not return %GST_STATE_CHANGE_ASYNC, this function returns the current and pending state immediately. This function returns %GST_STATE_CHANGE_NO_PREROLL if the element successfully changed its state but is not able to provide data yet. This mostly happens for live sources that only produce data in %GST_STATE_PLAYING. While the state change return is equivalent to %GST_STATE_CHANGE_SUCCESS, it is returned to the application to signal that some sink elements might not be able to complete their state change because an element is not producing data to complete the preroll. When setting the element to playing, the preroll will complete and playback will start. %GST_STATE_CHANGE_SUCCESS if the element has no more pending state and the last state change succeeded, %GST_STATE_CHANGE_ASYNC if the element is still performing a state change or %GST_STATE_CHANGE_FAILURE if the last state change failed. MT safe. a #GstElement to get the state of. a pointer to #GstState to hold the state. Can be %NULL. a pointer to #GstState to hold the pending state. Can be %NULL. a #GstClockTime to specify the timeout for an async state change or %GST_CLOCK_TIME_NONE for infinite timeout. Retrieves a pad from @element by name. This version only retrieves already-existing (i.e. 'static') pads. the requested #GstPad if found, otherwise %NULL. unref after usage. MT safe. a #GstElement to find a static pad of. the name of the static #GstPad to retrieve. Checks if the state of an element is locked. If the state of an element is locked, state changes of the parent don't affect the element. This way you can leave currently unused elements inside bins. Just lock their state before changing the state from #GST_STATE_NULL. MT safe. %TRUE, if the element's state is locked. a #GstElement. Retrieves an iterator of @element's pads. The iterator should be freed after usage. Also more specialized iterators exists such as gst_element_iterate_src_pads() or gst_element_iterate_sink_pads(). The order of pads returned by the iterator will be the order in which the pads were added to the element. the #GstIterator of #GstPad. MT safe. a #GstElement to iterate pads of. Retrieves an iterator of @element's sink pads. The order of pads returned by the iterator will be the order in which the pads were added to the element. the #GstIterator of #GstPad. MT safe. a #GstElement. Retrieves an iterator of @element's source pads. The order of pads returned by the iterator will be the order in which the pads were added to the element. the #GstIterator of #GstPad. MT safe. a #GstElement. Links @src to @dest. The link must be from source to destination; the other direction will not be tried. The function looks for existing pads that aren't linked yet. It will request new pads if necessary. Such pads need to be released manually when unlinking. If multiple links are possible, only one is established. Make sure you have added your elements to a bin or pipeline with gst_bin_add() before trying to link them. %TRUE if the elements could be linked, %FALSE otherwise. a #GstElement containing the source pad. the #GstElement containing the destination pad. Links @src to @dest using the given caps as filtercaps. The link must be from source to destination; the other direction will not be tried. The function looks for existing pads that aren't linked yet. It will request new pads if necessary. If multiple links are possible, only one is established. Make sure you have added your elements to a bin or pipeline with gst_bin_add() before trying to link them. %TRUE if the pads could be linked, %FALSE otherwise. a #GstElement containing the source pad. the #GstElement containing the destination pad. the #GstCaps to filter the link, or %NULL for no filter. Chain together a series of elements. Uses gst_element_link(). Make sure you have added your elements to a bin or pipeline with gst_bin_add() before trying to link them. %TRUE on success, %FALSE otherwise. the first #GstElement in the link chain. the second #GstElement in the link chain. the %NULL-terminated list of elements to link in order. Links the two named pads of the source and destination elements. Side effect is that if one of the pads has no parent, it becomes a child of the parent of the other element. If they have different parents, the link fails. %TRUE if the pads could be linked, %FALSE otherwise. a #GstElement containing the source pad. the name of the #GstPad in source element or %NULL for any pad. the #GstElement containing the destination pad. the name of the #GstPad in destination element, or %NULL for any pad. Links the two named pads of the source and destination elements. Side effect is that if one of the pads has no parent, it becomes a child of the parent of the other element. If they have different parents, the link fails. If @caps is not %NULL, makes sure that the caps of the link is a subset of @caps. %TRUE if the pads could be linked, %FALSE otherwise. a #GstElement containing the source pad. the name of the #GstPad in source element or %NULL for any pad. the #GstElement containing the destination pad. the name of the #GstPad in destination element or %NULL for any pad. the #GstCaps to filter the link, or %NULL for no filter. Links the two named pads of the source and destination elements. Side effect is that if one of the pads has no parent, it becomes a child of the parent of the other element. If they have different parents, the link fails. Calling gst_element_link_pads_full() with @flags == %GST_PAD_LINK_CHECK_DEFAULT is the same as calling gst_element_link_pads() and the recommended way of linking pads with safety checks applied. This is a convenience function for gst_pad_link_full(). %TRUE if the pads could be linked, %FALSE otherwise. a #GstElement containing the source pad. the name of the #GstPad in source element or %NULL for any pad. the #GstElement containing the destination pad. the name of the #GstPad in destination element, or %NULL for any pad. the #GstPadLinkCheck to be performed when linking pads. Brings the element to the lost state. The current state of the element is copied to the pending state so that any call to gst_element_get_state() will return %GST_STATE_CHANGE_ASYNC. An ASYNC_START message is posted. If the element was PLAYING, it will go to PAUSED. The element will be restored to its PLAYING state by the parent pipeline when it prerolls again. This is mostly used for elements that lost their preroll buffer in the %GST_STATE_PAUSED or %GST_STATE_PLAYING state after a flush, they will go to their pending state again when a new preroll buffer is queued. This function can only be called when the element is currently not in error or an async state change. This function is used internally and should normally not be called from plugins or applications. a #GstElement the state is lost of Post an error, warning or info message on the bus from inside an element. @type must be of #GST_MESSAGE_ERROR, #GST_MESSAGE_WARNING or #GST_MESSAGE_INFO. MT safe. a #GstElement to send message from the #GstMessageType the GStreamer GError domain this message belongs to the GError code belonging to the domain an allocated text string to be used as a replacement for the default message connected to code, or %NULL an allocated debug message to be used as a replacement for the default debugging information, or %NULL the source code file where the error was generated the source code function where the error was generated the source code line where the error was generated Post an error, warning or info message on the bus from inside an element. @type must be of #GST_MESSAGE_ERROR, #GST_MESSAGE_WARNING or #GST_MESSAGE_INFO. a #GstElement to send message from the #GstMessageType the GStreamer GError domain this message belongs to the GError code belonging to the domain an allocated text string to be used as a replacement for the default message connected to code, or %NULL an allocated debug message to be used as a replacement for the default debugging information, or %NULL the source code file where the error was generated the source code function where the error was generated the source code line where the error was generated optional details structure Use this function to signal that the element does not expect any more pads to show up in the current pipeline. This function should be called whenever pads have been added by the element itself. Elements with #GST_PAD_SOMETIMES pad templates use this in combination with autopluggers to figure out that the element is done initializing its pads. This function emits the #GstElement::no-more-pads signal. MT safe. a #GstElement Post a message on the element's #GstBus. This function takes ownership of the message; if you want to access the message after this call, you should add an additional reference before calling. %TRUE if the message was successfully posted. The function returns %FALSE if the element did not have a bus. MT safe. a #GstElement posting the message a #GstMessage to post Get the clock provided by the given element. > An element is only required to provide a clock in the PAUSED > state. Some elements can provide a clock in other states. the GstClock provided by the element or %NULL if no clock could be provided. Unref after usage. MT safe. a #GstElement to query Performs a query on the given element. For elements that don't implement a query handler, this function forwards the query to a random srcpad or to the peer of a random linked sinkpad of this element. Please note that some queries might need a running pipeline to work. %TRUE if the query could be performed. MT safe. a #GstElement to perform the query on. the #GstQuery. Queries an element to convert @src_val in @src_format to @dest_format. %TRUE if the query could be performed. a #GstElement to invoke the convert query on. a #GstFormat to convert from. a value to convert. the #GstFormat to convert to. a pointer to the result. Queries an element (usually top-level pipeline or playbin element) for the total stream duration in nanoseconds. This query will only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING state). The application will receive an ASYNC_DONE message on the pipeline bus when that is the case. If the duration changes for some reason, you will get a DURATION_CHANGED message on the pipeline bus, in which case you should re-query the duration using this function. %TRUE if the query could be performed. a #GstElement to invoke the duration query on. the #GstFormat requested A location in which to store the total duration, or %NULL. Queries an element (usually top-level pipeline or playbin element) for the stream position in nanoseconds. This will be a value between 0 and the stream duration (if the stream duration is known). This query will usually only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING state). The application will receive an ASYNC_DONE message on the pipeline bus when that is the case. If one repeatedly calls this function one can also create a query and reuse it in gst_element_query(). %TRUE if the query could be performed. a #GstElement to invoke the position query on. the #GstFormat requested a location in which to store the current position, or %NULL. Makes the element free the previously requested pad as obtained with gst_element_request_pad(). This does not unref the pad. If the pad was created by using gst_element_request_pad(), gst_element_release_request_pad() needs to be followed by gst_object_unref() to free the @pad. MT safe. a #GstElement to release the request pad of. the #GstPad to release. Removes @pad from @element. @pad will be destroyed if it has not been referenced elsewhere using gst_object_unparent(). This function is used by plugin developers and should not be used by applications. Pads that were dynamically requested from elements with gst_element_request_pad() should be released with the gst_element_release_request_pad() function instead. Pads are not automatically deactivated so elements should perform the needed steps to deactivate the pad in case this pad is removed in the PAUSED or PLAYING state. See gst_pad_set_active() for more information about deactivating pads. The pad and the element should be unlocked when calling this function. This function will emit the #GstElement::pad-removed signal on the element. %TRUE if the pad could be removed. Can return %FALSE if the pad does not belong to the provided element. MT safe. a #GstElement to remove pad from. the #GstPad to remove from the element. a #GstElement being watched for property changes watch id to remove Retrieves a request pad from the element according to the provided template. Pad templates can be looked up using gst_element_factory_get_static_pad_templates(). The pad should be released with gst_element_release_request_pad(). requested #GstPad if found, otherwise %NULL. Release after usage. a #GstElement to find a request pad of. a #GstPadTemplate of which we want a pad of. the name of the request #GstPad to retrieve. Can be %NULL. the caps of the pad we want to request. Can be %NULL. Retrieves a pad from the element by name (e.g. "src_\%d"). This version only retrieves request pads. The pad should be released with gst_element_release_request_pad(). This method is slower than manually getting the pad template and calling gst_element_request_pad() if the pads should have a specific name (e.g. @name is "src_1" instead of "src_\%u"). Note that this function was introduced in GStreamer 1.20 in order to provide a better name to gst_element_get_request_pad(). Prior to 1.20, users should use gst_element_get_request_pad() which provides the same functionality. requested #GstPad if found, otherwise %NULL. Release after usage. a #GstElement to find a request pad of. the name of the request #GstPad to retrieve. Sends a seek event to an element. See gst_event_new_seek() for the details of the parameters. The seek event is sent to the element using gst_element_send_event(). MT safe. %TRUE if the event was handled. Flushing seeks will trigger a preroll, which will emit %GST_MESSAGE_ASYNC_DONE. a #GstElement to send the event to. The new playback rate The format of the seek values The optional seek flags. The type and flags for the new start position The value of the new start position The type and flags for the new stop position The value of the new stop position Simple API to perform a seek on the given element, meaning it just seeks to the given position relative to the start of the stream. For more complex operations like segment seeks (e.g. for looping) or changing the playback rate or seeking relative to the last configured playback segment you should use gst_element_seek(). In a completely prerolled PAUSED or PLAYING pipeline, seeking is always guaranteed to return %TRUE on a seekable media type or %FALSE when the media type is certainly not seekable (such as a live stream). Some elements allow for seeking in the READY state, in this case they will store the seek event and execute it when they are put to PAUSED. If the element supports seek in READY, it will always return %TRUE when it receives the event in the READY state. %TRUE if the seek operation succeeded. Flushing seeks will trigger a preroll, which will emit %GST_MESSAGE_ASYNC_DONE. a #GstElement to seek on a #GstFormat to execute the seek in, such as #GST_FORMAT_TIME seek options; playback applications will usually want to use GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT here position to seek to (relative to the start); if you are doing a seek in #GST_FORMAT_TIME this value is in nanoseconds - multiply with #GST_SECOND to convert seconds to nanoseconds or with #GST_MSECOND to convert milliseconds to nanoseconds. Sends an event to an element. If the element doesn't implement an event handler, the event will be pushed on a random linked sink pad for downstream events or a random linked source pad for upstream events. This function takes ownership of the provided event so you should gst_event_ref() it if you want to reuse the event after this call. MT safe. %TRUE if the event was handled. Events that trigger a preroll (such as flushing seeks and steps) will emit %GST_MESSAGE_ASYNC_DONE. a #GstElement to send the event to. the #GstEvent to send to the element. Set the base time of an element. See gst_element_get_base_time(). MT safe. a #GstElement. the base time to set. Sets the bus of the element. Increases the refcount on the bus. For internal use only, unless you're testing elements. MT safe. a #GstElement to set the bus of. the #GstBus to set. Sets the clock for the element. This function increases the refcount on the clock. Any previously set clock on the object is unreffed. %TRUE if the element accepted the clock. An element can refuse a clock when it, for example, is not able to slave its internal clock to the @clock or when it requires a specific clock to operate. MT safe. a #GstElement to set the clock for. the #GstClock to set for the element. Sets the context of the element. Increases the refcount of the context. MT safe. a #GstElement to set the context of. the #GstContext to set. Locks the state of an element, so state changes of the parent don't affect this element anymore. Note that this is racy if the state lock of the parent bin is not taken. The parent bin might've just checked the flag in another thread and as the next step proceed to change the child element's state. MT safe. %TRUE if the state was changed, %FALSE if bad parameters were given or the elements state-locking needed no change. a #GstElement %TRUE to lock the element's state Set the start time of an element. The start time of the element is the running time of the element when it last went to the PAUSED state. In READY or after a flushing seek, it is set to 0. Toplevel elements like #GstPipeline will manage the start_time and base_time on its children. Setting the start_time to #GST_CLOCK_TIME_NONE on such a toplevel element will disable the distribution of the base_time to the children and can be useful if the application manages the base_time itself, for example if you want to synchronize capture from multiple pipelines, and you can also ensure that the pipelines have the same clock. MT safe. a #GstElement. the base time to set. Sets the state of the element. This function will try to set the requested state by going through all the intermediary states and calling the class's state change function for each. This function can return #GST_STATE_CHANGE_ASYNC, in which case the element will perform the remainder of the state change asynchronously in another thread. An application can use gst_element_get_state() to wait for the completion of the state change or it can wait for a %GST_MESSAGE_ASYNC_DONE or %GST_MESSAGE_STATE_CHANGED on the bus. State changes to %GST_STATE_READY or %GST_STATE_NULL never return #GST_STATE_CHANGE_ASYNC. Result of the state change using #GstStateChangeReturn. MT safe. a #GstElement to change state of. the element's new #GstState. Tries to change the state of the element to the same as its parent. If this function returns %FALSE, the state of element is undefined. %TRUE, if the element's state could be synced to the parent's state. MT safe. a #GstElement. Unlinks all source pads of the source element with all sink pads of the sink element to which they are linked. If the link has been made using gst_element_link(), it could have created an requestpad, which has to be released using gst_element_release_request_pad(). the source #GstElement to unlink. the sink #GstElement to unlink. Unlinks a series of elements. Uses gst_element_unlink(). the first #GstElement in the link chain. the second #GstElement in the link chain. the %NULL-terminated list of elements to unlink in order. Unlinks the two named pads of the source and destination elements. This is a convenience function for gst_pad_unlink(). a (transfer none): #GstElement containing the source pad. the name of the #GstPad in source element. a #GstElement containing the destination pad. the name of the #GstPad in destination element. Used to serialize execution of gst_element_set_state() Used to signal completion of a state change Used to detect concurrent execution of gst_element_set_state() and gst_element_get_state() the target state of an element as set by the application the current state of an element the next state of an element, can be #GST_STATE_VOID_PENDING if the element is in the correct state. the final state the element should go to, can be #GST_STATE_VOID_PENDING if the element is in the correct state the last return value of an element state change the bus of the element. This bus is provided to the element by the parent element or the application. A #GstPipeline has a bus of its own. the clock of the element. This clock is usually provided to the element by the toplevel #GstPipeline. the time of the clock right before the element is set to PLAYING. Subtracting @base_time from the current clock time in the PLAYING state will yield the running_time against the clock. the running_time of the last PAUSED state number of pads of the element, includes both source and sink pads. list of pads number of source pads of the element. list of source pads number of sink pads of the element. list of sink pads updated whenever the a pad is added or removed list of contexts This signals that the element will not generate more dynamic pads. Note that this signal will usually be emitted from the context of the streaming thread. a new #GstPad has been added to the element. Note that this signal will usually be emitted from the context of the streaming thread. Also keep in mind that if you add new elements to the pipeline in the signal handler you will need to set them to the desired target state with gst_element_set_state() or gst_element_sync_state_with_parent(). the pad that has been added a #GstPad has been removed from the element the pad that has been removed Callback prototype used in #gst_element_call_async The #GstElement this function has been called against Data passed in the function where that callback has been passed GStreamer element class. Override the vmethods to implement the element functionality. the parent class structure metadata for elements of this class the #GstElementFactory that creates these elements a #GList of #GstPadTemplate the number of padtemplates changed whenever the padtemplates change a #GstElement called when a new pad is requested requested #GstPad if found, otherwise %NULL. Release after usage. a #GstElement to find a request pad of. a #GstPadTemplate of which we want a pad of. the name of the request #GstPad to retrieve. Can be %NULL. the caps of the pad we want to request. Can be %NULL. called when a request pad is to be released get the state of the element %GST_STATE_CHANGE_SUCCESS if the element has no more pending state and the last state change succeeded, %GST_STATE_CHANGE_ASYNC if the element is still performing a state change or %GST_STATE_CHANGE_FAILURE if the last state change failed. MT safe. a #GstElement to get the state of. a pointer to #GstState to hold the state. Can be %NULL. a pointer to #GstState to hold the pending state. Can be %NULL. a #GstClockTime to specify the timeout for an async state change or %GST_CLOCK_TIME_NONE for infinite timeout. set a new state on the element Result of the state change using #GstStateChangeReturn. MT safe. a #GstElement to change state of. the element's new #GstState. called by @set_state to perform an incremental state change the #GstStateChangeReturn of the state transition. a #GstElement the requested transition called immediately after a new state was set. set a #GstBus on the element a #GstElement to set the bus of. the #GstBus to set. gets the #GstClock provided by the element the GstClock provided by the element or %NULL if no clock could be provided. Unref after usage. MT safe. a #GstElement to query set the #GstClock on the element %TRUE if the element accepted the clock. An element can refuse a clock when it, for example, is not able to slave its internal clock to the @clock or when it requires a specific clock to operate. MT safe. a #GstElement to set the clock for. the #GstClock to set for the element. send a #GstEvent to the element %TRUE if the event was handled. Events that trigger a preroll (such as flushing seeks and steps) will emit %GST_MESSAGE_ASYNC_DONE. a #GstElement to send the event to. the #GstEvent to send to the element. perform a #GstQuery on the element %TRUE if the query could be performed. MT safe. a #GstElement to perform the query on. the #GstQuery. called when a message is posted on the element. Chain up to the parent class' handler to have it posted on the bus. %TRUE if the message was successfully posted. The function returns %FALSE if the element did not have a bus. MT safe. a #GstElement posting the message a #GstMessage to post set a #GstContext on the element a #GstElement to set the context of. the #GstContext to set. Set @key with @value as metadata in @klass. class to set metadata for the key to set the value to set Adds a padtemplate to an element class. This is mainly used in the _class_init functions of classes. If a pad template with the same name as an already existing one is added the old one is replaced by the new one. @templ's reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink()) the #GstElementClass to add the pad template to. a #GstPadTemplate to add to the element class. Set @key with @value as metadata in @klass. Same as gst_element_class_add_metadata(), but @value must be a static string or an inlined string, as it will not be copied. (GStreamer plugins will be made resident once loaded, so this function can be used even from dynamically loaded plugins.) class to set metadata for the key to set the value to set Adds a pad template to an element class based on the static pad template @templ. This is mainly used in the _class_init functions of element implementations. If a pad template with the same name already exists, the old one is replaced by the new one. the #GstElementClass to add the pad template to. #GstStaticPadTemplate to add as pad template to the element class. Adds a pad template to an element class based on the static pad template @templ. This is mainly used in the _class_init functions of element implementations. If a pad template with the same name already exists, the old one is replaced by the new one. the #GstElementClass to add the pad template to. #GstStaticPadTemplate to add as pad template to the element class. The #GType of the pad to create Get metadata with @key in @klass. the metadata for @key. class to get metadata for the key to get Retrieves a padtemplate from @element_class with the given name. > If you use this function in the GInstanceInitFunc of an object class > that has subclasses, make sure to pass the g_class parameter of the > GInstanceInitFunc here. the #GstPadTemplate with the given name, or %NULL if none was found. No unreferencing is necessary. a #GstElementClass to get the pad template of. the name of the #GstPadTemplate to get. Retrieves a list of the pad templates associated with @element_class. The list must not be modified by the calling code. > If you use this function in the GInstanceInitFunc of an object class > that has subclasses, make sure to pass the g_class parameter of the > GInstanceInitFunc here. the #GList of pad templates. a #GstElementClass to get pad templates of. Sets the detailed information for a #GstElementClass. > This function is for use in _class_init functions only. class to set metadata for The long English name of the element. E.g. "File Sink" String describing the type of element, as an unordered list separated with slashes ('/'). See draft-klass.txt of the design docs for more details and common types. E.g: "Sink/File" Sentence describing the purpose of the element. E.g: "Write stream to a file" Name and contact details of the author(s). Use \n to separate multiple author metadata. E.g: "Joe Bloggs &lt;joe.blogs at foo.com&gt;" Sets the detailed information for a #GstElementClass. > This function is for use in _class_init functions only. Same as gst_element_class_set_metadata(), but @longname, @classification, @description, and @author 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.) class to set metadata for The long English name of the element. E.g. "File Sink" String describing the type of element, as an unordered list separated with slashes ('/'). See draft-klass.txt of the design docs for more details and common types. E.g: "Sink/File" Sentence describing the purpose of the element. E.g: "Write stream to a file" Name and contact details of the author(s). Use \n to separate multiple author metadata. E.g: "Joe Bloggs &lt;joe.blogs at foo.com&gt;" #GstElementFactory is used to create instances of elements. A GstElementFactory can be added to a #GstPlugin as it is also a #GstPluginFeature. Use the gst_element_factory_find() and gst_element_factory_create() functions to create element instances or use gst_element_factory_make() as a convenient shortcut. The following code example shows you how to create a GstFileSrc element. ## Using an element factory |[<!-- language="C" --> #include <gst/gst.h> GstElement *src; GstElementFactory *srcfactory; gst_init (&argc, &argv); srcfactory = gst_element_factory_find ("filesrc"); g_return_if_fail (srcfactory != NULL); src = gst_element_factory_create (srcfactory, "src"); g_return_if_fail (src != NULL); ... ]| Search for an element factory of the given name. Refs the returned element factory; caller is responsible for unreffing. #GstElementFactory if found, %NULL otherwise name of factory to find Filter out all the elementfactories in @list that can handle @caps in the given direction. If @subsetonly is %TRUE, then only the elements whose pads templates are a complete superset of @caps will be returned. Else any element whose pad templates caps can intersect with @caps will be returned. a #GList of #GstElementFactory elements that match the given requisites. Use #gst_plugin_feature_list_free after usage. a #GList of #GstElementFactory to filter a #GstCaps a #GstPadDirection to filter on whether to filter on caps subsets or not. Get a list of factories that match the given @type. Only elements with a rank greater or equal to @minrank will be returned. The list of factories is returned by decreasing rank. a #GList of #GstElementFactory elements. Use gst_plugin_feature_list_free() after usage. a #GstElementFactoryListType Minimum rank Create a new element of the type defined by the given element factory. If name is %NULL, then the element will receive a guaranteed unique name, consisting of the element factory name and a number. If name is given, it will be given the name supplied. new #GstElement or %NULL if unable to create element a named factory to instantiate name of new element, or %NULL to automatically create a unique name Create a new element of the type defined by the given element factory. The supplied list of properties, will be passed at object construction. new #GstElement or %NULL if unable to create element a named factory to instantiate name of first property %NULL terminated list of properties Create a new element of the type defined by the given element factory. The supplied list of properties, will be passed at object construction. new #GstElement or %NULL if unable to create element a named factory to instantiate name of first property list of properties Create a new element of the type defined by the given elementfactory. The supplied list of properties, will be passed at object construction. new #GstElement or %NULL if the element couldn't be created a named factory to instantiate count of properties array of properties names array of associated properties values Checks if the factory can sink all possible capabilities. %TRUE if the caps are fully compatible. factory to query the caps to check Checks if the factory can sink any possible capability. %TRUE if the caps have a common subset. factory to query the caps to check Checks if the factory can src all possible capabilities. %TRUE if the caps are fully compatible. factory to query the caps to check Checks if the factory can src any possible capability. %TRUE if the caps have a common subset. factory to query the caps to check Create a new element of the type defined by the given elementfactory. It will be given the name supplied, since all elements require a name as their first argument. new #GstElement or %NULL if the element couldn't be created factory to instantiate name of new element, or %NULL to automatically create a unique name Create a new element of the type defined by the given elementfactory. The supplied list of properties, will be passed at object construction. new #GstElement or %NULL if the element couldn't be created factory to instantiate name of the first property %NULL terminated list of properties Create a new element of the type defined by the given elementfactory. The supplied list of properties, will be passed at object construction. new #GstElement or %NULL if the element couldn't be created factory to instantiate name of the first property list of properties Create a new element of the type defined by the given elementfactory. The supplied list of properties, will be passed at object construction. new #GstElement or %NULL if the element couldn't be created factory to instantiate count of properties array of properties names array of associated properties values Get the #GType for elements managed by this factory. The type can only be retrieved if the element factory is loaded, which can be assured with gst_plugin_feature_load(). the #GType for elements managed by this factory or 0 if the factory is not loaded. factory to get managed #GType from Get the metadata on @factory with @key. the metadata with @key on @factory or %NULL when there was no metadata with the given @key. a #GstElementFactory a key Get the available keys for the metadata on @factory. a %NULL-terminated array of key strings, or %NULL when there is no metadata. Free with g_strfreev() when no longer needed. a #GstElementFactory Gets the number of pad_templates in this factory. the number of pad_templates a #GstElementFactory Queries whether registered element managed by @factory needs to be excluded from documentation system or not. %TRUE if documentation should be skipped a #GstElementFactory to query documentation skip Gets the #GList of #GstStaticPadTemplate for this factory. the static pad templates a #GstElementFactory Gets a %NULL-terminated array of protocols this element supports or %NULL if no protocols are supported. You may not change the contents of the returned array, as it is still owned by the element factory. Use g_strdupv() to make a copy of the protocol string array if you need to. the supported protocols or %NULL a #GstElementFactory Gets the type of URIs the element supports or #GST_URI_UNKNOWN if none. type of URIs this element supports a #GstElementFactory Check if @factory implements the interface with name @interfacename. %TRUE when @factory implement the interface. a #GstElementFactory an interface name Check if @factory is of the given types. %TRUE if @factory is of @type. a #GstElementFactory a #GstElementFactoryListType The standard flags that an element may have. ignore state changes from parent the element is a sink the element is a source. the element can provide a clock the element requires a clock the element can use an index offset to define more flags Function called for each pad when using gst_element_foreach_sink_pad(), gst_element_foreach_src_pad(), or gst_element_foreach_pad(). %FALSE to stop iterating pads, %TRUE to continue the #GstElement a #GstPad user data passed to the foreach function The event class provides factory methods to construct events for sending and functions to query (parse) received events. Events are usually created with gst_event_new_*() which takes event-type specific parameters as arguments. To send an event application will usually use gst_element_send_event() and elements will use gst_pad_send_event() or gst_pad_push_event(). The event should be unreffed with gst_event_unref() if it has not been sent. Events that have been received can be parsed with their respective gst_event_parse_*() functions. It is valid to pass %NULL for unwanted details. Events are passed between elements in parallel to the data stream. Some events are serialized with buffers, others are not. Some events only travel downstream, others only upstream. Some events can travel both upstream and downstream. The events are used to signal special conditions in the datastream such as EOS (end of stream) or the start of a new stream-segment. Events are also used to flush the pipeline of any pending data. Most of the event API is used inside plugins. Applications usually only construct and use seek events. To do that gst_event_new_seek() is used to create a seek event. It takes the needed parameters to specify seeking time and mode. |[<!-- language="C" --> GstEvent *event; gboolean result; ... // construct a seek event to play the media from second 2 to 5, flush // the pipeline to decrease latency. event = gst_event_new_seek (1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET, 2 * GST_SECOND, GST_SEEK_TYPE_SET, 5 * GST_SECOND); ... result = gst_element_send_event (pipeline, event); if (!result) g_warning ("seek failed"); ... ]| the parent structure the #GstEventType of the event the timestamp of the event the sequence number of the event Create a new buffersize event. The event is sent downstream and notifies elements that they should provide a buffer of the specified dimensions. When the @async flag is set, a thread boundary is preferred. a new #GstEvent buffer format minimum buffer size maximum buffer size thread behavior Create a new CAPS event for @caps. The caps event can only travel downstream synchronized with the buffer flow and contains the format of the buffers that will follow after the event. the new CAPS event. a #GstCaps Create a new custom-typed event. This can be used for anything not handled by other event-specific functions to pass an event to another element. Make sure to allocate an event type with the #GST_EVENT_MAKE_TYPE macro, assigning a free number and filling in the correct direction and serialization flags. New custom events can also be created by subclassing the event type if needed. the new custom event. The type of the new event the structure for the event. The event will take ownership of the structure. Create a new EOS event. The eos event can only travel downstream synchronized with the buffer flow. Elements that receive the EOS event on a pad can return #GST_FLOW_EOS as a #GstFlowReturn when data after the EOS event arrives. The EOS event will travel down to the sink elements in the pipeline which will then post the #GST_MESSAGE_EOS on the bus after they have finished playing any buffered data. When all sinks have posted an EOS message, an EOS message is forwarded to the application. The EOS event itself will not cause any state transitions of the pipeline. the new EOS event. Allocate a new flush start event. The flush start event can be sent upstream and downstream and travels out-of-bounds with the dataflow. It marks pads as being flushing and will make them return #GST_FLOW_FLUSHING when used for data flow with gst_pad_push(), gst_pad_chain(), gst_pad_get_range() and gst_pad_pull_range(). Any event (except a #GST_EVENT_FLUSH_STOP) received on a flushing pad will return %FALSE immediately. Elements should unlock any blocking functions and exit their streaming functions as fast as possible when this event is received. This event is typically generated after a seek to flush out all queued data in the pipeline so that the new media is played as soon as possible. a new flush start event. Allocate a new flush stop event. The flush stop event can be sent upstream and downstream and travels serialized with the dataflow. It is typically sent after sending a FLUSH_START event to make the pads accept data again. Elements can process this event synchronized with the dataflow since the preceding FLUSH_START event stopped the dataflow. This event is typically generated to complete a seek and to resume dataflow. a new flush stop event. if time should be reset Create a new GAP event. A gap event can be thought of as conceptually equivalent to a buffer to signal that there is no data for a certain amount of time. This is useful to signal a gap to downstream elements which may wait for data, such as muxers or mixers or overlays, especially for sparse streams such as subtitle streams. the new GAP event. the start time (pts) of the gap the duration of the gap Create a new instant-rate-change event. This event is sent by seek handlers (e.g. demuxers) when receiving a seek with the %GST_SEEK_FLAG_INSTANT_RATE_CHANGE and signals to downstream elements that the playback rate in the existing segment should be immediately multiplied by the @rate_multiplier factor. The flags provided replace any flags in the existing segment, for the flags within the %GST_SEGMENT_INSTANT_FLAGS set. Other GstSegmentFlags are ignored and not transferred in the event. the new instant-rate-change event. the multiplier to be applied to the playback rate A new subset of segment flags to replace in segments Create a new instant-rate-sync-time event. This event is sent by the pipeline to notify elements handling the instant-rate-change event about the running-time when the new rate should be applied. The running time may be in the past when elements handle this event, which can lead to switching artifacts. The magnitude of those depends on the exact timing of event delivery to each element and the magnitude of the change in playback rate being applied. The @running_time and @upstream_running_time are the same if this is the first instant-rate adjustment, but will differ for later ones to compensate for the accumulated offset due to playing at a rate different to the one indicated in the playback segments. the new instant-rate-sync-time event. the new playback rate multiplier to be applied Running time when the rate change should be applied The upstream-centric running-time when the rate change should be applied. Create a new latency event. The event is sent upstream from the sinks and notifies elements that they should add an additional @latency to the running time before synchronising against the clock. The latency is mostly used in live sinks and is always expressed in the time format. a new #GstEvent the new latency value Create a new navigation event from the given description. a new #GstEvent description of the event. The event will take ownership of the structure. See #GstNavigation for more specific constructors. Creates a new event containing information specific to a particular protection system (uniquely identified by @system_id), by which that protection system can acquire key(s) to decrypt a protected stream. In order for a decryption element to decrypt media protected using a specific system, it first needs all the protection system specific information necessary to acquire the decryption key(s) for that stream. The functions defined here enable this information to be passed in events from elements that extract it (e.g., ISOBMFF demuxers, MPEG DASH demuxers) to protection decrypter elements that use it. Events containing protection system specific information are created using #gst_event_new_protection, and they can be parsed by downstream elements using #gst_event_parse_protection. In Common Encryption, protection system specific information may be located within ISOBMFF files, both in movie (moov) boxes and movie fragment (moof) boxes; it may also be contained in ContentProtection elements within MPEG DASH MPDs. The events created by #gst_event_new_protection contain data identifying from which of these locations the encapsulated protection system specific information originated. This origin information is required as some protection systems use different encodings depending upon where the information originates. The events returned by gst_event_new_protection() are implemented in such a way as to ensure that the most recently-pushed protection info event of a particular @origin and @system_id will be stuck to the output pad of the sending element. a #GST_EVENT_PROTECTION event. a string holding a UUID that uniquely identifies a protection system. a #GstBuffer holding protection system specific information. The reference count of the buffer will be incremented by one. a string indicating where the protection information carried in the event was extracted from. The allowed values of this string will depend upon the protection scheme. Allocate a new qos event with the given values. The QOS event is generated in an element that wants an upstream element to either reduce or increase its rate because of high/low CPU load or other resource usage such as network performance or throttling. Typically sinks generate these events for each buffer they receive. @type indicates the reason for the QoS event. #GST_QOS_TYPE_OVERFLOW is used when a buffer arrived in time or when the sink cannot keep up with the upstream datarate. #GST_QOS_TYPE_UNDERFLOW is when the sink is not receiving buffers fast enough and thus has to drop late buffers. #GST_QOS_TYPE_THROTTLE is used when the datarate is artificially limited by the application, for example to reduce power consumption. @proportion indicates the real-time performance of the streaming in the element that generated the QoS event (usually the sink). The value is generally computed based on more long term statistics about the streams timestamps compared to the clock. A value < 1.0 indicates that the upstream element is producing data faster than real-time. A value > 1.0 indicates that the upstream element is not producing data fast enough. 1.0 is the ideal @proportion value. The proportion value can safely be used to lower or increase the quality of the element. @diff is the difference against the clock in running time of the last buffer that caused the element to generate the QOS event. A negative value means that the buffer with @timestamp arrived in time. A positive value indicates how late the buffer with @timestamp was. When throttling is enabled, @diff will be set to the requested throttling interval. @timestamp is the timestamp of the last buffer that cause the element to generate the QOS event. It is expressed in running time and thus an ever increasing value. The upstream element can use the @diff and @timestamp values to decide whether to process more buffers. For positive @diff, all buffers with timestamp <= @timestamp + @diff will certainly arrive late in the sink as well. A (negative) @diff value so that @timestamp + @diff would yield a result smaller than 0 is not allowed. The application can use general event probes to intercept the QoS event and implement custom application specific QoS handling. a new QOS event. the QoS type the proportion of the qos message The time difference of the last Clock sync The timestamp of the buffer Create a new reconfigure event. The purpose of the reconfigure event is to travel upstream and make elements renegotiate their caps or reconfigure their buffer pools. This is useful when changing properties on elements or changing the topology of the pipeline. a new #GstEvent Allocate a new seek event with the given parameters. The seek event configures playback of the pipeline between @start to @stop at the speed given in @rate, also called a playback segment. The @start and @stop values are expressed in @format. A @rate of 1.0 means normal playback rate, 2.0 means double speed. Negatives values means backwards playback. A value of 0.0 for the rate is not allowed and should be accomplished instead by PAUSING the pipeline. A pipeline has a default playback segment configured with a start position of 0, a stop position of -1 and a rate of 1.0. The currently configured playback segment can be queried with #GST_QUERY_SEGMENT. @start_type and @stop_type specify how to adjust the currently configured start and stop fields in playback segment. Adjustments can be made relative or absolute to the last configured values. A type of #GST_SEEK_TYPE_NONE means that the position should not be updated. When the rate is positive and @start has been updated, playback will start from the newly configured start position. For negative rates, playback will start from the newly configured stop position (if any). If the stop position is updated, it must be different from -1 (#GST_CLOCK_TIME_NONE) for negative rates. It is not possible to seek relative to the current playback position, to do this, PAUSE the pipeline, query the current playback position with #GST_QUERY_POSITION and update the playback segment current position with a #GST_SEEK_TYPE_SET to the desired position. a new seek event. The new playback rate The format of the seek values The optional seek flags The type and flags for the new start position The value of the new start position The type and flags for the new stop position The value of the new stop position Create a new SEGMENT event for @segment. The segment event can only travel downstream synchronized with the buffer flow and contains timing information and playback properties for the buffers that will follow. The segment event marks the range of buffers to be processed. All data not within the segment range is not to be processed. This can be used intelligently by plugins to apply more efficient methods of skipping unneeded data. The valid range is expressed with the @start and @stop values. The time value of the segment is used in conjunction with the start value to convert the buffer timestamps into the stream time. This is usually done in sinks to report the current stream_time. @time represents the stream_time of a buffer carrying a timestamp of @start. @time cannot be -1. @start cannot be -1, @stop can be -1. If there is a valid @stop given, it must be greater or equal the @start, including when the indicated playback @rate is < 0. The @applied_rate value provides information about any rate adjustment that has already been made to the timestamps and content on the buffers of the stream. (@rate * @applied_rate) should always equal the rate that has been requested for playback. For example, if an element has an input segment with intended playback @rate of 2.0 and applied_rate of 1.0, it can adjust incoming timestamps and buffer content by half and output a segment event with @rate of 1.0 and @applied_rate of 2.0 After a segment event, the buffer stream time is calculated with: time + (TIMESTAMP(buf) - start) * ABS (rate * applied_rate) the new SEGMENT event. a #GstSegment Create a new segment-done event. This event is sent by elements that finish playback of a segment as a result of a segment seek. a new #GstEvent The format of the position being done The position of the segment being done Allocate a new select-streams event. The select-streams event requests the specified @streams to be activated. The list of @streams corresponds to the "Stream ID" of each stream to be activated. Those ID can be obtained via the #GstStream objects present in #GST_EVENT_STREAM_START, #GST_EVENT_STREAM_COLLECTION or #GST_MESSAGE_STREAM_COLLECTION. Note: The list of @streams can not be empty. a new select-streams event. the list of streams to activate Create a new sink-message event. The purpose of the sink-message event is to instruct a sink to post the message contained in the event synchronized with the stream. @name is used to store multiple sticky events on one pad. a new #GstEvent a name for the event the #GstMessage to be posted Create a new step event. The purpose of the step event is to instruct a sink to skip @amount (expressed in @format) of media. It can be used to implement stepping through the video frame by frame or for doing fast trick modes. A rate of <= 0.0 is not allowed. Pause the pipeline, for the effect of rate = 0.0 or first reverse the direction of playback using a seek event to get the same effect as rate < 0.0. The @flush flag will clear any pending data in the pipeline before starting the step operation. The @intermediate flag instructs the pipeline that this step operation is part of a larger step operation. a new #GstEvent the format of @amount the amount of data to step the step rate flushing steps intermediate steps Create a new STREAM_COLLECTION event. The stream collection event can only travel downstream synchronized with the buffer flow. Source elements, demuxers and other elements that manage collections of streams and post #GstStreamCollection messages on the bus also send this event downstream on each pad involved in the collection, so that activation of a new collection can be tracked through the downstream data flow. the new STREAM_COLLECTION event. Active collection for this data flow Create a new Stream Group Done event. The stream-group-done event can only travel downstream synchronized with the buffer flow. Elements that receive the event on a pad should handle it mostly like EOS, and emit any data or pending buffers that would depend on more data arriving and unblock, since there won't be any more data. This event is followed by EOS at some point in the future, and is generally used when switching pads - to unblock downstream so that new pads can be exposed before sending EOS on the existing pads. the new stream-group-done event. the group id of the stream group which is ending Create a new STREAM_START event. The stream start event can only travel downstream synchronized with the buffer flow. It is expected to be the first event that is sent for a new stream. Source elements, demuxers and other elements that create new streams are supposed to send this event as the first event of a new stream. It should not be sent after a flushing seek or in similar situations and is used to mark the beginning of a new logical stream. Elements combining multiple streams must ensure that this event is only forwarded downstream once and not for every single input stream. The @stream_id should be a unique string that consists of the upstream stream-id, / as separator and a unique stream-id for this specific stream. A new stream-id should only be created for a stream if the upstream stream is split into (potentially) multiple new streams, e.g. in a demuxer, but not for every single element in the pipeline. gst_pad_create_stream_id() or gst_pad_create_stream_id_printf() can be used to create a stream-id. There are no particular semantics for the stream-id, though it should be deterministic (to support stream matching) and it might be used to order streams (besides any information conveyed by stream flags). the new STREAM_START event. Identifier for this stream Generates a metadata tag event from the given @taglist. The scope of the taglist specifies if the taglist applies to the complete medium or only to this specific stream. As the tag event is a sticky event, elements should merge tags received from upstream with a given scope with their own tags with the same scope and create a new tag event from it. a new #GstEvent metadata list. The event will take ownership of the taglist. Generate a TOC event from the given @toc. The purpose of the TOC event is to inform elements that some kind of the TOC was found. a new #GstEvent. #GstToc structure. whether @toc was updated or not. Generate a TOC select event with the given @uid. The purpose of the TOC select event is to start playback based on the TOC's entry with the given @uid. a new #GstEvent. UID in the TOC to start playback from. Copy the event using the event specific copy function. the new event The event to copy Parses a segment @event and copies the #GstSegment into the location given by @segment. The event to parse a pointer to a #GstSegment Retrieve the accumulated running time offset of the event. Events passing through #GstPads that have a running time offset set via gst_pad_set_offset() will get their offset adjusted according to the pad's offset. If the event contains any information that related to the running time, this information will need to be updated before usage with this offset. The event's running time offset MT safe. A #GstEvent. Retrieve the sequence number of a event. Events have ever-incrementing sequence numbers, which may also be set explicitly via gst_event_set_seqnum(). Sequence numbers are typically used to indicate that a event corresponds to some other set of events or messages, for example an EOS event corresponding to a SEEK event. It is considered good practice to make this correspondence when possible, though it is not required. Note that events and messages share the same sequence number incrementor; two events or messages will never have the same sequence number unless that correspondence was made explicitly. The event's sequence number. MT safe. A #GstEvent. Access the structure of the event. The structure of the event. The structure is still owned by the event, which means that you should not free it and that the pointer becomes invalid when you free the event. MT safe. The #GstEvent. Checks if @event has the given @name. This function is usually used to check the name of a custom event. %TRUE if @name matches the name of the event structure. The #GstEvent. name to check Checks if @event has the given @name. This function is usually used to check the name of a custom event. Use gst_event_has_name(). %TRUE if @name matches the name of the event structure. The #GstEvent. name to check as a GQuark Get the format, minsize, maxsize and async-flag in the buffersize event. The event to query A pointer to store the format in A pointer to store the minsize in A pointer to store the maxsize in A pointer to store the async-flag in Get the caps from @event. The caps remains valid as long as @event remains valid. The event to parse A pointer to the caps Parse the FLUSH_STOP event and retrieve the @reset_time member. The event to parse if time should be reset Extract timestamp and duration from a new GAP event. a #GstEvent of type #GST_EVENT_GAP location where to store the start time (pts) of the gap, or %NULL location where to store the duration of the gap, or %NULL Retrieve the gap flags that may have been set on a gap event with gst_event_set_gap_flags(). a #GstEvent of type #GST_EVENT_GAP a #GstGapFlags or %NULL %TRUE if a group id was set on the event and could be parsed, %FALSE otherwise. a stream-start event address of variable where to store the group id Extract rate and flags from an instant-rate-change event. a #GstEvent of type #GST_EVENT_INSTANT_RATE_CHANGE location in which to store the rate multiplier of the instant-rate-change event, or %NULL location in which to store the new segment flags of the instant-rate-change event, or %NULL Extract the rate multiplier and running times from an instant-rate-sync-time event. a #GstEvent of type #GST_EVENT_INSTANT_RATE_CHANGE location where to store the rate of the instant-rate-sync-time event, or %NULL location in which to store the running time of the instant-rate-sync-time event, or %NULL location in which to store the upstream running time of the instant-rate-sync-time event, or %NULL Get the latency in the latency event. The event to query A pointer to store the latency in. Parses an event containing protection system specific information and stores the results in @system_id, @data and @origin. The data stored in @system_id, @origin and @data are valid until @event is released. a #GST_EVENT_PROTECTION event. pointer to store the UUID string uniquely identifying a content protection system. pointer to store a #GstBuffer holding protection system specific information. pointer to store a value that indicates where the protection information carried by @event was extracted from. Get the type, proportion, diff and timestamp in the qos event. See gst_event_new_qos() for more information about the different QoS values. @timestamp will be adjusted for any pad offsets of pads it was passing through. The event to query A pointer to store the QoS type in A pointer to store the proportion in A pointer to store the diff in A pointer to store the timestamp in Parses a seek @event and stores the results in the given result locations. a seek event result location for the rate result location for the stream format result location for the #GstSeekFlags result location for the #GstSeekType of the start position result location for the start position expressed in @format result location for the #GstSeekType of the stop position result location for the stop position expressed in @format Retrieve the trickmode interval that may have been set on a seek event with gst_event_set_seek_trickmode_interval(). interval Parses a segment @event and stores the result in the given @segment location. @segment remains valid only until the @event is freed. Don't modify the segment and make a copy if you want to modify it or store it for later use. The event to parse a pointer to a #GstSegment Extracts the position and format from the segment done message. A valid #GstEvent of type GST_EVENT_SEGMENT_DONE. Result location for the format, or %NULL Result location for the position, or %NULL Parse the SELECT_STREAMS event and retrieve the contained streams. The event to parse the streams Parse the sink-message event. Unref @msg after usage. The event to query a pointer to store the #GstMessage in. Parse the step event. The event to query a pointer to store the format in a pointer to store the amount in a pointer to store the rate in a pointer to store the flush boolean in a pointer to store the intermediate boolean in Parse a stream-start @event and extract the #GstStream from it. a stream-start event address of variable to store the stream Retrieve new #GstStreamCollection from STREAM_COLLECTION event @event. a stream-collection event pointer to store the collection. a stream-start event address of variable where to store the stream flags Parse a stream-group-done @event and store the result in the given @group_id location. a stream-group-done event. address of variable to store the group id into Parse a stream-id @event and store the result in the given @stream_id location. The string stored in @stream_id must not be modified and will remain valid only until @event gets freed. Make a copy if you want to modify it or store it for later use. a stream-start event. pointer to store the stream-id Parses a tag @event and stores the results in the given @taglist location. No reference to the taglist will be returned, it remains valid only until the @event is freed. Don't modify or free the taglist, make a copy if you want to modify it or store it for later use. a tag event pointer to metadata list Parse a TOC @event and store the results in the given @toc and @updated locations. a TOC event. pointer to #GstToc structure. pointer to store TOC updated flag. Parse a TOC select @event and store the results in the given @uid location. a TOC select event. storage for the selection UID. Increase the refcount of this event. @event (for convenience when doing assignments) The event to refcount Sets @flags on @event to give additional information about the reason for the #GST_EVENT_GAP. a #GstEvent of type #GST_EVENT_GAP a #GstGapFlags All streams that have the same group id are supposed to be played together, i.e. all streams inside a container file should have the same group id but different stream ids. The group id should change each time the stream is started, resulting in different group ids each time a file is played for example. Use gst_util_group_id_next() to get a new group id. a stream-start event the group id to set Set the running time offset of a event. See gst_event_get_running_time_offset() for more information. MT safe. A #GstEvent. A the new running time offset Sets a trickmode interval on a (writable) seek event. Elements that support TRICKMODE_KEY_UNITS seeks SHOULD use this as the minimal interval between each frame they may output. Set the sequence number of a event. This function might be called by the creator of a event to indicate that the event relates to other events or messages. See gst_event_get_seqnum() for more information. MT safe. A #GstEvent. A sequence number. Set the @stream on the stream-start @event a stream-start event the stream object to set a stream-start event the stream flags to set Decrease the refcount of an event, freeing it if the refcount reaches 0. the event to refcount Get a writable version of the structure. The structure of the event. The structure is still owned by the event, which means that you should not free it and that the pointer becomes invalid when you free the event. This function ensures that @event is writable, and if so, will never return %NULL. MT safe. A writable #GstEvent. Modifies a pointer to a #GstEvent to point to a different #GstEvent. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old event is unreffed, the new one is reffed). Either @new_event or the #GstEvent pointed to by @old_event may be %NULL. %TRUE if @new_event was different from @old_event pointer to a pointer to a #GstEvent to be replaced. pointer to a #GstEvent that will replace the event pointed to by @old_event. Atomically replace the #GstEvent pointed to by @old_event with %NULL and return the original event. the #GstEvent that was in @old_event pointer to a pointer to a #GstEvent to be stolen. Modifies a pointer to a #GstEvent to point to a different #GstEvent. This function is similar to gst_event_replace() except that it takes ownership of @new_event. Either @new_event or the #GstEvent pointed to by @old_event may be %NULL. %TRUE if @new_event was different from @old_event pointer to a pointer to a #GstEvent to be stolen. pointer to a #GstEvent that will replace the event pointed to by @old_event. #GstEventType lists the standard event types that can be sent in a pipeline. The custom event types can be used for private messages between elements that can't be expressed using normal GStreamer buffer passing semantics. Custom events carry an arbitrary #GstStructure. Specific custom events are distinguished by the name of the structure. unknown event. Start a flush operation. This event clears all data from the pipeline and unblock all streaming threads. Stop a flush operation. This event resets the running-time of the pipeline. Event to mark the start of a new stream. Sent before any other serialized event and only sent at the start of a new stream, not after flushing seeks. #GstCaps event. Notify the pad of a new media type. A new media segment follows in the dataflow. The segment events contains information for clipping buffers and converting buffer timestamps to running-time and stream-time. A new #GstStreamCollection is available (Since: 1.10) A new set of metadata tags has been found in the stream. Notification of buffering requirements. Currently not used yet. An event that sinks turn into a message. Used to send messages that should be emitted in sync with rendering. Indicates that there is no more data for the stream group ID in the message. Sent before EOS in some instances and should be handled mostly the same. (Since: 1.10) End-Of-Stream. No more data is to be expected to follow without either a STREAM_START event, or a FLUSH_STOP and a SEGMENT event. An event which indicates that a new table of contents (TOC) was found or updated. An event which indicates that new or updated encryption information has been found in the stream. Marks the end of a segment playback. Marks a gap in the datastream. Notify downstream that a playback rate override should be applied as soon as possible. (Since: 1.18) A quality message. Used to indicate to upstream elements that the downstream elements should adjust their processing rate. A request for a new playback position and rate. Navigation events are usually used for communicating user requests, such as mouse or keyboard movements, to upstream elements. Notification of new latency adjustment. Sinks will use the latency information to adjust their synchronisation. A request for stepping through the media. Sinks will usually execute the step operation. A request for upstream renegotiating caps and reconfiguring. A request for a new playback position based on TOC entry's UID. A request to select one or more streams (Since: 1.10) Sent by the pipeline to notify elements that handle the instant-rate-change event about the running-time when the rate multiplier should be applied (or was applied). (Since: 1.18) Upstream custom event Downstream custom event that travels in the data flow. Custom out-of-band downstream event. Custom sticky downstream event. Custom upstream or downstream event. In-band when travelling downstream. Custom upstream or downstream out-of-band event. Gets the #GstEventTypeFlags associated with @type. a #GstEventTypeFlags. a #GstEventType Get a printable name for the given event type. Do not modify or free. a reference to the static name of the event. the event type Get the unique quark for the given event type. the quark associated with the event type the event 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. an unsigned integer a #GstEventType #GstEventTypeFlags indicate the aspects of the different #GstEventType values. You can get the type flags of a #GstEventType with the gst_event_type_get_flags() function. Set if the event can travel upstream. Set if the event can travel downstream. Set if the event should be serialized with data flow. Set if the event is sticky on the pads. Multiple sticky events can be on a pad, each identified by the event name. Output a fixme message in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. printf-style message to output Output a fixme message for the given identifier in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. An identifier of the message provider printf-style message to output Output a fixme message belonging to the given object in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. the #GObject the message belongs to printf-style message to output A mask value with all bits set, for use as a GstFlagSet mask where all flag bits must match exactly The PERCENT format is between 0 and this value The value used to scale down the reported PERCENT format value to its real value. Can be used together with #GST_FOURCC_FORMAT to properly output a #guint32 fourcc value in a printf\()-style text message. a #guint32 fourcc value to output Can be used together with #GST_FOURCC_ARGS to properly output a #guint32 fourcc value in a printf\()-style text message. |[ printf ("fourcc: %" GST_FOURCC_FORMAT "\n", GST_FOURCC_ARGS (fcc)); ]| A fundamental type that describes a 32-bit flag bitfield, with 32-bit mask indicating which of the bits in the field are explicitly set. Create a new sub-class of #GST_TYPE_FLAG_SET which will pretty-print the human-readable flags when serializing, for easier debugging. a #GType of a #G_TYPE_FLAGS type. The result of passing data to a pad. Note that the custom return values should not be exposed outside of the element scope. Pre-defined custom success code. Pre-defined custom success code (define your custom success code to this to avoid compiler warnings). Elements can use values starting from this (and higher) to define custom success codes. Data passing was ok. Pad is not linked. Pad is flushing. Pad is EOS. Pad is not negotiated. Some (fatal) error occurred. Element generating this error should post an error message using GST_ELEMENT_ERROR() with more details. This operation is not supported. Elements can use values starting from this (and lower) to define custom error codes. Pre-defined custom error code (define your custom error code to this to avoid compiler warnings). Pre-defined custom error code. Standard predefined formats undefined format the default format of the pad/element. This can be samples for raw audio, frames/fields for raw video (some, but not all, elements support this; use @GST_FORMAT_TIME if you don't have a good reason to query for samples/frames) bytes time in nanoseconds buffers (few, if any, elements implement this as of May 2009) percentage of stream (few, if any, elements implement this as of May 2009) Return the format registered with the given nick. The format with @nick or GST_FORMAT_UNDEFINED if the format was not registered. The nick of the format Get details about the given format. The #GstFormatDefinition for @format or %NULL on failure. MT safe. The format to get details of Get a printable name for the given format. Do not modify or free. a reference to the static name of the format or %NULL if the format is unknown. a #GstFormat Iterate all the registered formats. The format definition is read only. a GstIterator of #GstFormatDefinition. Create a new GstFormat based on the nick or return an already registered format with that nick. A new GstFormat or an already registered format with the same nick. MT safe. The nick of the new format The description of the new format Get the unique quark for the given format. the quark associated with the format or 0 if the format is unknown. a #GstFormat A format definition The unique id of this format A short nick of the format A longer description of the format A quark for the nick A fundamental type that describes a fraction of an integer numerator over an integer denominator A fundamental type that describes a #GstFractionRange range A value which is guaranteed to never be returned by gst_util_group_id_next(). Can be used as a default value in variables used to store group_id. The different flags that can be set on #GST_EVENT_GAP events. See gst_event_set_gap_flags() for details. The #GST_EVENT_GAP signals missing data, for example because of packet loss. GhostPads are useful when organizing pipelines with #GstBin like elements. The idea here is to create hierarchical element graphs. The bin element contains a sub-graph. Now one would like to treat the bin-element like any other #GstElement. This is where GhostPads come into play. A GhostPad acts as a proxy for another pad. Thus the bin can have sink and source ghost-pads that are associated with sink and source pads of the child elements. If the target pad is known at creation time, gst_ghost_pad_new() is the function to use to get a ghost-pad. Otherwise one can use gst_ghost_pad_new_no_target() to create the ghost-pad and use gst_ghost_pad_set_target() to establish the association later on. Note that GhostPads add overhead to the data processing of a pipeline. Create a new ghostpad with @target as the target. The direction will be taken from the target pad. @target must be unlinked. Will ref the target. a new #GstPad, or %NULL in case of an error. the name of the new pad, or %NULL to assign a default name the pad to ghost. Create a new ghostpad with @target as the target. The direction will be taken from the target pad. The template used on the ghostpad will be @template. Will ref the target. a new #GstPad, or %NULL in case of an error. the name of the new pad, or %NULL to assign a default name. the pad to ghost. the #GstPadTemplate to use on the ghostpad. Create a new ghostpad without a target with the given direction. A target can be set on the ghostpad later with the gst_ghost_pad_set_target() function. The created ghostpad will not have a padtemplate. a new #GstPad, or %NULL in case of an error. the name of the new pad, or %NULL to assign a default name. the direction of the ghostpad Create a new ghostpad based on @templ, without setting a target. The direction will be taken from the @templ. a new #GstPad, or %NULL in case of an error. the name of the new pad, or %NULL to assign a default name the #GstPadTemplate to create the ghostpad from. Invoke the default activate mode function of a ghost pad. %TRUE if the operation was successful. the #GstPad to activate or deactivate. the parent of @pad or %NULL the requested activation mode whether the pad should be active or not. Invoke the default activate mode function of a proxy pad that is owned by a ghost pad. %TRUE if the operation was successful. the #GstPad to activate or deactivate. the parent of @pad or %NULL the requested activation mode whether the pad should be active or not. Finish initialization of a newly allocated ghost pad. This function is most useful in language bindings and when subclassing #GstGhostPad; plugin and application developers normally will not call this function. Call this function directly after a call to g_object_new (GST_TYPE_GHOST_PAD, "direction", @dir, ..., NULL). This function is deprecated since 1.18 and does nothing anymore. %TRUE if the construction succeeds, %FALSE otherwise. the newly allocated ghost pad Get the target pad of @gpad. Unref target pad after usage. the target #GstPad, can be %NULL if the ghostpad has no target set. Unref target pad after usage. the #GstGhostPad Set the new target of the ghostpad @gpad. Any existing target is unlinked and links to the new target are established. if @newtarget is %NULL the target will be cleared. %TRUE if the new target could be set. This function can return %FALSE when the internal pads could not be linked. the #GstGhostPad the new pad target Output an informational message in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. printf-style message to output Output an informational message for the given identifier the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. An identifier of the message provider printf-style message to output Output an informational message belonging to the given object in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. the #GObject the message belongs to printf-style message to output Macro to cast to a #GstIterator the #GstIterator value Macro to get the cookie of a #GstIterator. The cookie of the iterator is the value of the master cookie when the iterator was created. Whenever the iterator is iterated, the value is compared to the value of the master cookie. If they are different, a concurrent modification happened to the iterator and a resync is needed. the #GstIterator to get the cookie of Macro to get the lock protecting the datastructure being iterated. the #GstIterator to get the lock of Macro to get a pointer to where the master cookie is stored. The master cookie protects the structure being iterated and gets updated whenever the datastructure changes. the #GstIterator to get the master cookie of A #GstIdStr is string type optimized for short strings and used for structure names, structure field names and in other places. Strings up to 16 bytes (including NUL terminator) are stored inline, other strings are stored on the heap. ```cpp GstIdStr s = GST_ID_STR_INIT; gst_id_str_set (&s, "Hello, World!"); g_print ("%s\n", gst_id_str_as_str (&s)); gst_id_str_clear (&s); ``` Returns a newly heap allocated empty string. A heap-allocated string. the NUL-terminated string representation of @s. A %GstIdStr Clears @s and sets it to the empty string. A %GstIdStr Copies @s into newly allocated heap memory. A heap-allocated copy of @s. A %GstIdStr Copies @s into @d. The destination %GstIdStr The source %GstIdStr Frees @s. This should only be called for heap-allocated #GstIdStr. A heap allocated %GstIdStr Returns the length of @s, exluding the NUL-terminator. This is equivalent to calling `strcmp()` but potentially faster. A %GstIdStr Initializes a (usually stack-allocated) id string @s. The newly-initialized id string will contain an empty string by default as value. A %GstIdStr Compares @s1 and @s2 for equality. %TRUE if @s1 and @s2 are equal. A %GstIdStr A %GstIdStr Compares @s1 and @s2 for equality. %TRUE if @s1 and @s2 are equal. A %GstIdStr A string Compares @s1 and @s2 with length @len for equality. @s2 does not have to be NUL-terminated and @len should not include the NUL-terminator. This is generally faster than gst_id_str_is_equal_to_str() if the length is already known. %TRUE if @s1 and @s2 are equal. A %GstIdStr A string Length of @s2. Moves @s into @d and resets @s. The destination %GstIdStr The source %GstIdStr Sets @s to the string @value. A %GstIdStr A NUL-terminated string Sets @s to the string @value. @value needs to be valid for the remaining lifetime of the process, e.g. has to be a static string. A %GstIdStr A NUL-terminated string Sets @s to the string @value of length @len. @value needs to be valid for the remaining lifetime of the process, e.g. has to be a static string. @value must be NUL-terminated and @len should not include the NUL-terminator. A %GstIdStr A string Length of the string Sets @s to the string @value of length @len. @value does not have to be NUL-terminated and @len should not include the NUL-terminator. A %GstIdStr A string Length of the string A fundamental type that describes a #gint64 range A fundamental type that describes a #gint range A GstIterator is used to retrieve multiple objects from another object in a threadsafe way. Various GStreamer objects provide access to their internal structures using an iterator. Note that if calling a GstIterator function results in your code receiving a refcounted object (with, say, g_value_get_object()), the refcount for that object will not be increased. Your code is responsible for taking a reference if it wants to continue using it later. The basic use pattern of an iterator is as follows: |[<!-- language="C" --> GstIterator *it = _get_iterator(object); GValue item = G_VALUE_INIT; done = FALSE; while (!done) { switch (gst_iterator_next (it, &item)) { case GST_ITERATOR_OK: ...get/use/change item here... g_value_reset (&item); break; case GST_ITERATOR_RESYNC: ...rollback changes to items... gst_iterator_resync (it); break; case GST_ITERATOR_ERROR: ...wrong parameters were given... done = TRUE; break; case GST_ITERATOR_DONE: done = TRUE; break; } } g_value_unset (&item); gst_iterator_free (it); ]| The function to copy the iterator The function to get the next item in the iterator The function to be called for each item retrieved The function to call when a resync is needed. The function to call when the iterator is freed The iterator that is currently pushed with gst_iterator_push() The type of the object that this iterator will return The lock protecting the data structure and the cookie. The cookie; the value of the master_cookie when this iterator was created. A pointer to the master cookie. the size of the iterator Create a new iterator. This function is mainly used for objects implementing the next/resync/free function to iterate a data structure. For each item retrieved, the @item function is called with the lock held. The @free function is called when the iterator is freed. the new #GstIterator. MT safe. the size of the iterator structure #GType of children pointer to a #GMutex. pointer to a guint32 that is changed when the items in the iterator changed. copy function function to get next item function to call on each item retrieved function to resync the iterator function to free the iterator Create a new iterator designed for iterating @list. The list you iterate is usually part of a data structure @owner and is protected with @lock. The iterator will use @lock to retrieve the next item of the list and it will then call the @item function before releasing @lock again. When a concurrent update to the list is performed, usually by @owner while holding @lock, @master_cookie will be updated. The iterator implementation will notice the update of the cookie and will return %GST_ITERATOR_RESYNC to the user of the iterator in the next call to gst_iterator_next(). the new #GstIterator for @list. MT safe. #GType of elements pointer to a #GMutex protecting the list. pointer to a guint32 that is incremented when the list is changed. pointer to the list object owning the list function to call on each item retrieved This #GstIterator is a convenient iterator for the common case where a #GstIterator needs to be returned but only a single object has to be considered. This happens often for the #GstPadIterIntLinkFunction. the new #GstIterator for @object. #GType of the passed object object that this iterator should return Copy the iterator and its state. a new copy of @it. a #GstIterator Create a new iterator from an existing iterator. The new iterator will only return those elements that match the given compare function @func. The first parameter that is passed to @func is the #GValue of the current iterator element and the second parameter is @user_data. @func should return 0 for elements that should be included in the filtered iterator. When this iterator is freed, @it will also be freed. a new #GstIterator. MT safe. The #GstIterator to filter the compare function to select elements user data passed to the compare function Find the first element in @it that matches the compare function @func. @func should return 0 when the element is found. The first parameter to @func will be the current element of the iterator and the second parameter will be @user_data. The result will be stored in @elem if a result is found. The iterator will not be freed. This function will return %FALSE if an error happened to the iterator or if the element wasn't found. Returns %TRUE if the element was found, else %FALSE. MT safe. The #GstIterator to iterate the compare function to use pointer to a #GValue where to store the result user data passed to the compare function Folds @func over the elements of @iter. That is to say, @func will be called as @func (object, @ret, @user_data) for each object in @it. The normal use of this procedure is to accumulate the results of operating on the objects in @ret. This procedure can be used (and is used internally) to implement the gst_iterator_foreach() and gst_iterator_find_custom() operations. The fold will proceed as long as @func returns %TRUE. When the iterator has no more arguments, %GST_ITERATOR_DONE will be returned. If @func returns %FALSE, the fold will stop, and %GST_ITERATOR_OK will be returned. Errors or resyncs will cause fold to return %GST_ITERATOR_ERROR or %GST_ITERATOR_RESYNC as appropriate. The iterator will not be freed. A #GstIteratorResult, as described above. MT safe. The #GstIterator to fold over the fold function the seed value passed to the fold function user data passed to the fold function Iterate over all element of @it and call the given function @func for each element. the result call to gst_iterator_fold(). The iterator will not be freed. MT safe. The #GstIterator to iterate the function to call for each element. user data passed to the function Free the iterator. MT safe. The #GstIterator to free Get the next item from the iterator in @elem. Only when this function returns %GST_ITERATOR_OK, @elem will contain a valid value. @elem must have been initialized to the type of the iterator or initialized to zeroes with g_value_unset(). The caller is responsible for unsetting or resetting @elem with g_value_unset() or g_value_reset() after usage. When this function returns %GST_ITERATOR_DONE, no more elements can be retrieved from @it. A return value of %GST_ITERATOR_RESYNC indicates that the element list was concurrently updated. The user of @it should call gst_iterator_resync() to get the newly updated list. A return value of %GST_ITERATOR_ERROR indicates an unrecoverable fatal error. The result of the iteration. Unset @elem after usage. MT safe. The #GstIterator to iterate pointer to hold next element Pushes @other iterator onto @it. All calls performed on @it are forwarded to @other. If @other returns %GST_ITERATOR_DONE, it is popped again and calls are handled by @it again. This function is mainly used by objects implementing the iterator next function to recurse into substructures. When gst_iterator_resync() is called on @it, @other will automatically be popped. MT safe. The #GstIterator to use The #GstIterator to push Resync the iterator. this function is mostly called after gst_iterator_next() returned %GST_ITERATOR_RESYNC. When an iterator was pushed on @it, it will automatically be popped again with this function. MT safe. The #GstIterator to resync This function will be called when creating a copy of @it and should create a copy of all custom iterator fields or increase their reference counts. The original iterator The copied iterator A function to be passed to gst_iterator_fold(). %TRUE if the fold should continue, %FALSE if it should stop. the item to fold a #GValue collecting the result data passed to gst_iterator_fold() A function that is called by gst_iterator_foreach() for every element. The item User data This function will be called when the iterator is freed. Implementors of a #GstIterator should implement this function and pass it to the constructor of the custom iterator. The function will be called with the iterator lock held. the iterator The result of a #GstIteratorItemFunction. Skip this item Return item Stop after this item. The function that will be called after the next item of the iterator has been retrieved. This function can be used to skip items or stop the iterator. The function will be called with the iterator lock held. the result of the operation. the iterator the item being retrieved. The function that will be called when the next element of the iterator should be retrieved. Implementors of a #GstIterator should implement this function and pass it to the constructor of the custom iterator. The function will be called with the iterator lock held. the result of the operation. the iterator a pointer to hold the next item The result of gst_iterator_next(). No more items in the iterator An item was retrieved Datastructure changed while iterating An error happened This function will be called whenever a concurrent update happened to the iterated datastructure. The implementor of the iterator should restart the iterator from the beginning and clean up any state it might have. Implementors of a #GstIterator should implement this function and pass it to the constructor of the custom iterator. The function will be called with the iterator lock held. the iterator To be used in GST_PLUGIN_DEFINE if unsure about the licence. GstLockFlags value alias for GST_LOCK_FLAG_READ | GST_LOCK_FLAG_WRITE Output a logging message in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. printf-style message to output Output a logging message for the given identifier in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. An identifier of the message provider printf-style message to output Output a logging message belonging to the given object in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. the #GObject the message belongs to printf-style message to output Library errors are for errors from the library being used by elements (initializing, finalizing, settings, ...) a general error which doesn't fit in any other category. Make sure you add a custom message to the error call. do not use this except as a placeholder for deciding where to go while developing code. used when the library could not be opened. used when the library could not be closed. used when the library doesn't accept settings. used when the library generated an encoding error. the number of library error types. Flags used when locking miniobjects lock for read access lock for write access lock for exclusive access first flag that can be used for custom purposes Function prototype for a logging function that can be registered with gst_debug_add_log_function(). Use G_GNUC_NO_INSTRUMENT on that function. a #GstDebugCategory a #GstDebugLevel file name function name line number a #GObject the message user data for the log function Transform four characters into a #guint32 fourcc value with host endianness. |[ guint32 fourcc = GST_MAKE_FOURCC ('M', 'J', 'P', 'G'); ]| the first character the second character the third character the fourth character GstMapFlags value alias for GST_MAP_READ | GST_MAP_WRITE Output a hexdump of @data. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. message string to log with the data pointer to the data to output length of the data to output Output a logging message belonging to the given object in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. An identifier of the message provider message string to log with the data pointer to the data to output length of the data to output Output a logging message belonging to the given object in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. the #GObject the message belongs to message string to log with the data pointer to the data to output length of the data to output A flags word containing #GstMemoryFlags flags set on @mem a #GstMemory. Gives the status of a specific flag on a @mem. a #GstMemory. the #GstMemoryFlags to check. Clear a specific flag on a @mem. a #GstMemory. the #GstMemoryFlags to clear. Check if @mem can't be mapped via gst_memory_map() without any preconditions a #GstMemory. Check if @mem cannot be shared between buffers a #GstMemory. Check if @mem is physically contiguous. a #GstMemory. Check if @mem is readonly. a #GstMemory. Check if the padding in @mem is 0 filled. a #GstMemory. Check if the prefix in @mem is 0 filled. a #GstMemory. Get the sequence number of @message. a #GstMessage Get the object that posted @message. a #GstMessage Get the name of the object that posted @message. Returns "(NULL)" if the message has no source object set. a #GstMessage Get the timestamp of @message. This is the timestamp when the message was created. a #GstMessage Get the #GstMessageType of @message. a #GstMessage Check if the message is in the extended message group a #GstMessage Get a constant string representation of the #GstMessageType of @message. a #GstMessage A flags word containing #GstMetaFlags flags set on @meta a #GstMeta. Gives the status of a specific flag on a metadata. a #GstMeta. the #GstMetaFlags to check. Sets a metadata flag on a metadata. a #GstMeta. the #GstMetaFlags to set. Clears a metadata flag. a #GstMeta. the #GstMetaFlags to clear. This metadata stays relevant until a deep copy is made. This metadata stays relevant as long as memory layout is unchanged. In hindsight, this tag should have been called "memory-layout". Check if the transform type is a copy transform a transform type This macro returns the entire set of flags for the mini-object. MiniObject to return flags for. This macro checks to see if the given flag is set. MiniObject to check for flags. Flag to check for This macro sets the given bits. MiniObject to set flag in. Flag to set, can by any number of bits in guint32. This macro unsets the given bits. MiniObject to unset flag in. Flag to set, must be a single bit in guint32. Check if @obj is lockable. A lockable object can be locked and unlocked with gst_mini_object_lock() and gst_mini_object_unlock(). a #GstMiniObject Get access to the reference count field of the mini-object. a #GstMiniObject Get the reference count value of the mini-object. a #GstMiniObject This macro returns the type of the mini-object. MiniObject to return type for. Constant that defines one GStreamer millisecond. Flags used when mapping memory map for read access map for write access first flag that can be used for custom purposes A structure containing the result of a map operation such as gst_memory_map(). It contains the data and size. #GstMapInfo cannot be used with g_auto() because it is ambiguous whether it needs to be unmapped using gst_buffer_unmap() or gst_memory_unmap(). Instead, #GstBufferMapInfo and #GstMemoryMapInfo can be used in that case. a pointer to the mapped memory flags used when mapping the memory a pointer to the mapped data the valid size in @data the maximum bytes in @data extra private user_data that the implementation of the memory can use to store extra info. GstMemory is a lightweight refcounted object that wraps a region of memory. They are typically used to manage the data of a #GstBuffer. A GstMemory object has an allocated region of memory of maxsize. The maximum size does not change during the lifetime of the memory object. The memory also has an offset and size property that specifies the valid range of memory in the allocated region. Memory is usually created by allocators with a gst_allocator_alloc() method call. When %NULL is used as the allocator, the default allocator will be used. New allocators can be registered with gst_allocator_register(). Allocators are identified by name and can be retrieved with gst_allocator_find(). gst_allocator_set_default() can be used to change the default allocator. New memory can be created with gst_memory_new_wrapped() that wraps the memory allocated elsewhere. Refcounting of the memory block is performed with gst_memory_ref() and gst_memory_unref(). The size of the memory can be retrieved and changed with gst_memory_get_sizes() and gst_memory_resize() respectively. Getting access to the data of the memory is performed with gst_memory_map(). The call will return a pointer to offset bytes into the region of memory. After the memory access is completed, gst_memory_unmap() should be called. Memory can be copied with gst_memory_copy(), which will return a writable copy. gst_memory_share() will create a new memory block that shares the memory with an existing memory block at a custom offset and with a custom size. Memory can be efficiently merged when gst_memory_is_span() returns %TRUE. parent structure pointer to the #GstAllocator parent memory block the maximum size allocated the alignment of the memory the offset where valid data starts the size of valid data Allocate a new memory block that wraps the given @data. The prefix/padding must be filled with 0 if @flags contains #GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED respectively. a new #GstMemory. #GstMemoryFlags data to wrap allocated size of @data offset in @data size of valid data user_data called with @user_data when the memory is freed Return a copy of @size bytes from @mem starting from @offset. This copy is guaranteed to be writable. @size can be set to -1 to return a copy from @offset to the end of the memory region. a new copy of @mem if the copy succeeded, %NULL otherwise. a #GstMemory offset to copy from size to copy, or -1 to copy to the end of the memory region Get the current @size, @offset and @maxsize of @mem. the current size of @mem a #GstMemory pointer to offset pointer to maxsize Initializes a newly allocated @mem with the given parameters. This function will call gst_mini_object_init() with the default memory parameters. a #GstMemory #GstMemoryFlags the #GstAllocator the parent of @mem the total size of the memory the alignment of the memory The offset in the memory the size of valid data in the memory Check if @mem1 and mem2 share the memory with a common parent memory object and that the memory is contiguous. If this is the case, the memory of @mem1 and @mem2 can be merged efficiently by performing gst_memory_share() on the parent object from the returned @offset. %TRUE if the memory is contiguous and of a common parent. a #GstMemory a #GstMemory a pointer to a result offset Check if @mem if allocated with an allocator for @mem_type. %TRUE if @mem was allocated from an allocator for @mem_type. a #GstMemory a memory type Create a #GstMemory object that is mapped with @flags. If @mem is mappable with @flags, this function returns the mapped @mem directly. Otherwise a mapped copy of @mem is returned. This function takes ownership of old @mem and returns a reference to a new #GstMemory. a #GstMemory object mapped with @flags or %NULL when a mapping is not possible. a #GstMemory pointer for info mapping flags Fill @info with the pointer and sizes of the memory in @mem that can be accessed according to @flags. This function can return %FALSE for various reasons: - the memory backed by @mem is not accessible with the given @flags. - the memory was already mapped with a different mapping. @info and its contents remain valid for as long as @mem is valid and until gst_memory_unmap() is called. For each gst_memory_map() call, a corresponding gst_memory_unmap() call should be done. %TRUE if the map operation was successful. a #GstMemory pointer for info mapping flags Increase the refcount of this memory. @memory (for convenience when doing assignments) The memory to refcount Resize the memory region. @mem should be writable and offset + size should be less than the maxsize of @mem. #GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED will be cleared when offset or padding is increased respectively. a #GstMemory a new offset a new size Return a shared copy of @size bytes from @mem starting from @offset. No memory copy is performed and the memory region is simply shared. The result is guaranteed to be non-writable. @size can be set to -1 to return a shared copy from @offset to the end of the memory region. a new #GstMemory. a #GstMemory offset to share from size to share, or -1 to share to the end of the memory region Release the memory obtained with gst_memory_map() a #GstMemory a #GstMapInfo Decrease the refcount of a memory, freeing it if the refcount reaches 0. the memory to refcount Copy @size bytes from @mem starting at @offset and return them wrapped in a new GstMemory object. If @size is set to -1, all bytes starting at @offset are copied. a new #GstMemory object wrapping a copy of the requested region in @mem. a #GstMemory an offset a size or -1 Flags for wrapped memory. memory is readonly. It is not allowed to map the memory with #GST_MAP_WRITE. memory must not be shared. Copies will have to be made when this memory needs to be shared between buffers. (DEPRECATED: do not use in new code, instead you should create a custom GstAllocator for memory pooling instead of relying on the GstBuffer they were originally attached to.) the memory prefix is filled with 0 bytes the memory padding is filled with 0 bytes the memory is physically contiguous. (Since: 1.2) the memory can't be mapped via gst_memory_map() without any preconditions. (Since: 1.2) first flag that can be used for custom purposes Check if @mem1 and @mem2 occupy contiguous memory and return the offset of @mem1 in the parent buffer in @offset. %TRUE if @mem1 and @mem2 are in contiguous memory. a #GstMemory a #GstMemory a result offset Get the memory of @mem that can be accessed according to the mode specified in @info's flags. The function should return a pointer that contains at least @maxsize bytes. a pointer to memory of which at least @maxsize bytes can be accessed according to the access pattern in @info's flags. a #GstMemory the #GstMapInfo to map with size to map Get the memory of @mem that can be accessed according to the mode specified in @flags. The function should return a pointer that contains at least @maxsize bytes. a pointer to memory of which at least @maxsize bytes can be accessed according to the access pattern in @flags. a #GstMemory size to map access mode for the memory Share @size bytes from @mem starting at @offset and return them wrapped in a new GstMemory object. If @size is set to -1, all bytes starting at @offset are shared. This function does not make a copy of the bytes in @mem. a new #GstMemory object sharing the requested region in @mem. a #GstMemory an offset a size or -1 Release the pointer previously retrieved with gst_memory_map() with @info. a #GstMemory a #GstMapInfo Release the pointer previously retrieved with gst_memory_map(). a #GstMemory Messages are implemented as a subclass of #GstMiniObject with a generic #GstStructure as the content. This allows for writing custom messages without requiring an API change while allowing a wide range of different types of messages. Messages are posted by objects in the pipeline and are passed to the application using the #GstBus. The basic use pattern of posting a message on a #GstBus is as follows: |[<!-- language="C" --> gst_bus_post (bus, gst_message_new_eos()); ]| A #GstElement usually posts messages on the bus provided by the parent container using gst_element_post_message(). the parent structure the #GstMessageType of the message the timestamp of the message the src of the message the sequence number of the message Create a new application-typed message. GStreamer will never create these messages; they are a gift from us to you. Enjoy. The new application message. MT safe. The object originating the message. the structure for the message. The message will take ownership of the structure. The message is posted when elements completed an ASYNC state change. @running_time contains the time of the desired running_time when this elements goes to PLAYING. A value of #GST_CLOCK_TIME_NONE for @running_time means that the element has no clock interaction and thus doesn't care about the running_time of the pipeline. The new async_done message. MT safe. The object originating the message. the desired running_time This message is posted by elements when they start an ASYNC state change. The new async_start message. MT safe. The object originating the message. Create a new buffering message. This message can be posted by an element that needs to buffer data before it can continue processing. @percent should be a value between 0 and 100. A value of 100 means that the buffering completed. When @percent is < 100 the application should PAUSE a PLAYING pipeline. When @percent is 100, the application can set the pipeline (back) to PLAYING. The application must be prepared to receive BUFFERING messages in the PREROLLING state and may only set the pipeline to PLAYING after receiving a message with @percent set to 100, which can happen after the pipeline completed prerolling. MT safe. The new buffering message. The object originating the message. The buffering percent Create a clock lost message. This message is posted whenever the clock is not valid anymore. If this message is posted by the pipeline, the pipeline will select a new clock again when it goes to PLAYING. It might therefore be needed to set the pipeline to PAUSED and PLAYING again. The new clock lost message. MT safe. The object originating the message. the clock that was lost Create a clock provide message. This message is posted whenever an element is ready to provide a clock or lost its ability to provide a clock (maybe because it paused or became EOS). This message is mainly used internally to manage the clock selection. the new provide clock message. MT safe. The object originating the message. the clock it provides %TRUE if the sender can provide a clock Create a new custom-typed message. This can be used for anything not handled by other message-specific functions to pass a message to the app. The structure field can be %NULL. The new message. MT safe. The #GstMessageType to distinguish messages The object originating the message. the structure for the message. The message will take ownership of the structure. Creates a new device-added message. The device-added message is produced by #GstDeviceProvider or a #GstDeviceMonitor. They announce the appearance of monitored devices. a newly allocated #GstMessage The #GstObject that created the message The new #GstDevice Creates a new device-changed message. The device-changed message is produced by #GstDeviceProvider or a #GstDeviceMonitor. They announce that a device properties has changed and @device represent the new modified version of @changed_device. a newly allocated #GstMessage The #GstObject that created the message The newly created device representing @changed_device with its new configuration. The old version of the device. Creates a new device-removed message. The device-removed message is produced by #GstDeviceProvider or a #GstDeviceMonitor. They announce the disappearance of monitored devices. a newly allocated #GstMessage The #GstObject that created the message The removed #GstDevice Create a new duration changed message. This message is posted by elements that know the duration of a stream when the duration changes. This message is received by bins and is used to calculate the total duration of a pipeline. The new duration-changed message. MT safe. The object originating the message. Create a new element-specific message. This is meant as a generic way of allowing one-way communication from an element to an application, for example "the firewire cable was unplugged". The format of the message should be documented in the element's documentation. The structure field can be %NULL. The new element message. MT safe. The object originating the message. The structure for the message. The message will take ownership of the structure. Create a new eos message. This message is generated and posted in the sink elements of a GstBin. The bin will only forward the EOS message to the application if all sinks have posted an EOS message. The new eos message. MT safe. The object originating the message. Create a new error message. The message will copy @error and @debug. This message is posted by element when a fatal event occurred. The pipeline will probably (partially) stop. The application receiving this message should stop the pipeline. the new error message. MT safe. The object originating the message. The GError for this message. A debugging string. Create a new error message. The message will copy @error and @debug. This message is posted by element when a fatal event occurred. The pipeline will probably (partially) stop. The application receiving this message should stop the pipeline. the new error message. The object originating the message. The GError for this message. A debugging string. A GstStructure with details This message is posted when an element has a new local #GstContext. The new have-context message. MT safe. The object originating the message. the context Create a new info message. The message will make copies of @error and @debug. the new info message. MT safe. The object originating the message. The GError for this message. A debugging string. Create a new info message. The message will make copies of @error and @debug. the new warning message. The object originating the message. The GError for this message. A debugging string. A GstStructure with details Creates a new instant-rate-request message. Elements handling the instant-rate-change event must post this message. The message is handled at the pipeline, and allows the pipeline to select the running time when the rate change should happen and to send an @GST_EVENT_INSTANT_RATE_SYNC_TIME event to notify the elements in the pipeline. a newly allocated #GstMessage The #GstObject that posted the message the rate multiplier factor that should be applied This message can be posted by elements when their latency requirements have changed. The new latency message. MT safe. The object originating the message. This message is posted when an element needs a specific #GstContext. The new need-context message. MT safe. The object originating the message. The context type that is needed Create a new clock message. This message is posted whenever the pipeline selects a new clock for the pipeline. The new new clock message. MT safe. The object originating the message. the new selected clock Progress messages are posted by elements when they use an asynchronous task to perform actions triggered by a state change. @code contains a well defined string describing the action. @text should contain a user visible string detailing the current action. The new qos message. The object originating the message. a #GstProgressType a progress code free, user visible text describing the progress a newly allocated #GstMessage The #GstObject whose property changed (may or may not be a #GstElement) name of the property that changed new property value, or %NULL A QOS message is posted on the bus whenever an element decides to drop a buffer because of QoS reasons or whenever it changes its processing strategy because of QoS reasons (quality adjustments such as processing at lower accuracy). This message can be posted by an element that performs synchronisation against the clock (live) or it could be dropped by an element that performs QoS because of QOS events received from a downstream element (!live). @running_time, @stream_time, @timestamp, @duration should be set to the respective running-time, stream-time, timestamp and duration of the (dropped) buffer that generated the QoS event. Values can be left to GST_CLOCK_TIME_NONE when unknown. The new qos message. MT safe. The object originating the message. if the message was generated by a live element the running time of the buffer that generated the message the stream time of the buffer that generated the message the timestamps of the buffer that generated the message the duration of the buffer that generated the message Creates a new redirect message and adds a new entry to it. Redirect messages are posted when an element detects that the actual data has to be retrieved from a different location. This is useful if such a redirection cannot be handled inside a source element, for example when HTTP 302/303 redirects return a non-HTTP URL. The redirect message can hold multiple entries. The first one is added when the redirect message is created, with the given location, tag_list, entry_struct arguments. Use gst_message_add_redirect_entry() to add more entries. Each entry has a location, a tag list, and a structure. All of these are optional. The tag list and structure are useful for additional metadata, such as bitrate statistics for the given location. By default, message recipients should treat entries in the order they are stored. The recipient should therefore try entry \#0 first, and if this entry is not acceptable or working, try entry \#1 etc. Senders must make sure that they add entries in this order. However, recipients are free to ignore the order and pick an entry that is "best" for them. One example would be a recipient that scans the entries for the one with the highest bitrate tag. The specified location string is copied. However, ownership over the tag list and structure are transferred to the message. a newly allocated #GstMessage The #GstObject whose property changed (may or may not be a #GstElement) location string for the new entry tag list for the new entry structure for the new entry This message can be posted by elements when they want to have their state changed. A typical use case would be an audio server that wants to pause the pipeline because a higher priority stream is being played. the new request state message. MT safe. The object originating the message. The new requested state This message is posted when the pipeline running-time should be reset to @running_time, like after a flushing seek. The new reset_time message. MT safe. The object originating the message. the requested running-time Create a new segment done message. This message is posted by elements that finish playback of a segment as a result of a segment seek. This message is received by the application after all elements that posted a segment_start have posted the segment_done. the new segment done message. MT safe. The object originating the message. The format of the position being done The position of the segment being done Create a new segment message. This message is posted by elements that start playback of a segment as a result of a segment seek. This message is not received by the application but is used for maintenance reasons in container elements. the new segment start message. MT safe. The object originating the message. The format of the position being played The position of the segment being played Create a state change message. This message is posted whenever an element changed its state. the new state change message. MT safe. The object originating the message. the previous state the new (current) state the pending (target) state Create a state dirty message. This message is posted whenever an element changed its state asynchronously and is used internally to update the states of container objects. the new state dirty message. MT safe. The object originating the message This message is posted by elements when they complete a part, when @intermediate set to %TRUE, or a complete step operation. @duration will contain the amount of time (in GST_FORMAT_TIME) of the stepped @amount of media in format @format. the new step_done message. MT safe. The object originating the message. the format of @amount the amount of stepped data the rate of the stepped amount is this an flushing step is this an intermediate step the duration of the data the step caused EOS This message is posted by elements when they accept or activate a new step event for @amount in @format. @active is set to %FALSE when the element accepted the new step event and has queued it for execution in the streaming threads. @active is set to %TRUE when the element has activated the step operation and is now ready to start executing the step in the streaming thread. After this message is emitted, the application can queue a new step operation in the element. The new step_start message. MT safe. The object originating the message. if the step is active or queued the format of @amount the amount of stepped data the rate of the stepped amount is this an flushing step is this an intermediate step Creates a new stream-collection message. The message is used to announce new #GstStreamCollection a newly allocated #GstMessage The #GstObject that created the message The #GstStreamCollection Create a new stream_start message. This message is generated and posted in the sink elements of a GstBin. The bin will only forward the STREAM_START message to the application if all sinks have posted an STREAM_START message. The new stream_start message. MT safe. The object originating the message. Create a new stream status message. This message is posted when a streaming thread is created/destroyed or when the state changed. the new stream status message. MT safe. The object originating the message. The stream status type. the owner element of @src. Creates a new steams-selected message. The message is used to announce that an array of streams has been selected. This is generally in response to a #GST_EVENT_SELECT_STREAMS event, or when an element (such as decodebin3) makes an initial selection of streams. The message also contains the #GstStreamCollection to which the various streams belong to. Users of gst_message_new_streams_selected() can add the selected streams with gst_message_streams_selected_add(). a newly allocated #GstMessage The #GstObject that created the message The #GstStreamCollection Create a new structure change message. This message is posted when the structure of a pipeline is in the process of being changed, for example when pads are linked or unlinked. @src should be the sinkpad that unlinked or linked. the new structure change message. MT safe. The object originating the message. The change type. The owner element of @src. Whether the structure change is busy. Create a new tag message. The message will take ownership of the tag list. The message is posted by elements that discovered a new taglist. the new tag message. MT safe. The object originating the message. the tag list for the message. Create a new TOC message. The message is posted by elements that discovered or updated a TOC. a new TOC message. MT safe. the object originating the message. #GstToc structure for the message. whether TOC was updated or not. Create a new warning message. The message will make copies of @error and @debug. the new warning message. MT safe. The object originating the message. The GError for this message. A debugging string. Create a new warning message. The message will make copies of @error and @debug. the new warning message. The object originating the message. The GError for this message. A debugging string. A GstStructure with details Creates and appends a new entry. The specified location string is copied. However, ownership over the tag list and structure are transferred to the message. a #GstMessage of type %GST_MESSAGE_REDIRECT location string for the new entry tag list for the new entry structure for the new entry Creates a copy of the message. Returns a copy of the message. a new copy of @msg. MT safe the message to copy Returns the optional details structure of the message. May be NULL if none. The returned structure must not be freed. The details, or NULL if none. A #GstMessage the number of entries stored in the message a #GstMessage of type %GST_MESSAGE_REDIRECT Retrieve the sequence number of a message. Messages have ever-incrementing sequence numbers, which may also be set explicitly via gst_message_set_seqnum(). Sequence numbers are typically used to indicate that a message corresponds to some other set of messages or events, for example a SEGMENT_DONE message corresponding to a SEEK event. It is considered good practice to make this correspondence when possible, though it is not required. Note that events and messages share the same sequence number incrementor; two events or messages will never have the same sequence number unless that correspondence was made explicitly. The message's sequence number. MT safe. A #GstMessage. Extracts the object managing the streaming thread from @message. a GValue containing the object that manages the streaming thread. This object is usually of type GstTask but other types can be added in the future. The object remains valid as long as @message is valid. A valid #GstMessage of type GST_MESSAGE_STREAM_STATUS. Access the structure of the message. The structure of the message. The structure is still owned by the message, which means that you should not free it and that the pointer becomes invalid when you free the message. MT safe. The #GstMessage. Checks if @message has the given @name. This function is usually used to check the name of a custom message. %TRUE if @name matches the name of the message structure. The #GstMessage. name to check Extract the running_time from the async_done message. MT safe. A valid #GstMessage of type GST_MESSAGE_ASYNC_DONE. Result location for the running_time or %NULL Extracts the buffering percent from the GstMessage. see also gst_message_new_buffering(). MT safe. A valid #GstMessage of type GST_MESSAGE_BUFFERING. Return location for the percent. Extracts the buffering stats values from @message. A valid #GstMessage of type GST_MESSAGE_BUFFERING. a buffering mode, or %NULL the average input rate, or %NULL the average output rate, or %NULL amount of buffering time left in milliseconds, or %NULL Extracts the lost clock from the GstMessage. The clock object returned remains valid until the message is freed. MT safe. A valid #GstMessage of type GST_MESSAGE_CLOCK_LOST. a pointer to hold the lost clock Extracts the clock and ready flag from the GstMessage. The clock object returned remains valid until the message is freed. MT safe. A valid #GstMessage of type GST_MESSAGE_CLOCK_PROVIDE. a pointer to hold a clock object, or %NULL a pointer to hold the ready flag, or %NULL Parse a context type from an existing GST_MESSAGE_NEED_CONTEXT message. a #gboolean indicating if the parsing succeeded. a GST_MESSAGE_NEED_CONTEXT type message the context type, or %NULL Parses a device-added message. The device-added message is produced by #GstDeviceProvider or a #GstDeviceMonitor. It announces the appearance of monitored devices. a #GstMessage of type %GST_MESSAGE_DEVICE_ADDED A location where to store a pointer to the new #GstDevice, or %NULL Parses a device-changed message. The device-changed message is produced by #GstDeviceProvider or a #GstDeviceMonitor. It announces the disappearance of monitored devices. * It announce that a device properties has changed and @device represents the new modified version of @changed_device. a #GstMessage of type %GST_MESSAGE_DEVICE_CHANGED A location where to store a pointer to the updated version of the #GstDevice, or %NULL A location where to store a pointer to the old version of the #GstDevice, or %NULL Parses a device-removed message. The device-removed message is produced by #GstDeviceProvider or a #GstDeviceMonitor. It announces the disappearance of monitored devices. a #GstMessage of type %GST_MESSAGE_DEVICE_REMOVED A location where to store a pointer to the removed #GstDevice, or %NULL Extracts the GError and debug string from the GstMessage. The values returned in the output arguments are copies; the caller must free them when done. Typical usage of this function might be: |[<!-- language="C" --> ... switch (GST_MESSAGE_TYPE (msg)) { case GST_MESSAGE_ERROR: { GError *err = NULL; gchar *dbg_info = NULL; gst_message_parse_error (msg, &err, &dbg_info); g_printerr ("ERROR from element %s: %s\n", GST_OBJECT_NAME (msg->src), err->message); g_printerr ("Debugging info: %s\n", (dbg_info) ? dbg_info : "none"); g_error_free (err); g_free (dbg_info); break; } ... } ... ]| MT safe. A valid #GstMessage of type GST_MESSAGE_ERROR. location for the GError location for the debug message, or %NULL Returns the optional details structure, may be NULL if none. The returned structure must not be freed. The message object A pointer to the returned details Returns the details structure if present or will create one if not present. The returned structure must not be freed. The writable message object A pointer to the returned details Extract the group from the STREAM_START message. %TRUE if the message had a group id set, %FALSE otherwise MT safe. A valid #GstMessage of type GST_MESSAGE_STREAM_START. Result location for the group id or %NULL Extract the context from the HAVE_CONTEXT message. MT safe. A valid #GstMessage of type GST_MESSAGE_HAVE_CONTEXT. Result location for the context or %NULL Extracts the GError and debug string from the GstMessage. The values returned in the output arguments are copies; the caller must free them when done. MT safe. A valid #GstMessage of type GST_MESSAGE_INFO. location for the GError location for the debug message, or %NULL Returns the optional details structure, may be NULL if none The returned structure must not be freed. The message object A pointer to the returned details Returns the details structure if present or will create one if not present. The returned structure must not be freed. The writable message object A pointer to the returned details Parses the rate_multiplier from the instant-rate-request message. a #GstMessage of type %GST_MESSAGE_INSTANT_RATE_REQUEST return location for the rate, or %NULL Extracts the new clock from the GstMessage. The clock object returned remains valid until the message is freed. MT safe. A valid #GstMessage of type GST_MESSAGE_NEW_CLOCK. a pointer to hold the selected new clock Parses the progress @type, @code and @text. A valid #GstMessage of type GST_MESSAGE_PROGRESS. location for the type location for the code location for the text Parses a property-notify message. These will be posted on the bus only when set up with gst_element_add_property_notify_watch() or gst_element_add_property_deep_notify_watch(). a #GstMessage of type %GST_MESSAGE_PROPERTY_NOTIFY location where to store a pointer to the object whose property got changed, or %NULL return location for the name of the property that got changed, or %NULL return location for the new value of the property that got changed, or %NULL. This will only be set if the property notify watch was told to include the value when it was set up Extract the timestamps and live status from the QoS message. The returned values give the running_time, stream_time, timestamp and duration of the dropped buffer. Values of GST_CLOCK_TIME_NONE mean unknown values. MT safe. A valid #GstMessage of type GST_MESSAGE_QOS. if the message was generated by a live element the running time of the buffer that generated the message the stream time of the buffer that generated the message the timestamps of the buffer that generated the message the duration of the buffer that generated the message Extract the QoS stats representing the history of the current continuous pipeline playback period. When @format is @GST_FORMAT_UNDEFINED both @dropped and @processed are invalid. Values of -1 for either @processed or @dropped mean unknown values. MT safe. A valid #GstMessage of type GST_MESSAGE_QOS. Units of the 'processed' and 'dropped' fields. Video sinks and video filters will use GST_FORMAT_BUFFERS (frames). Audio sinks and audio filters will likely use GST_FORMAT_DEFAULT (samples). Total number of units correctly processed since the last state change to READY or a flushing operation. Total number of units dropped since the last state change to READY or a flushing operation. Extract the QoS values that have been calculated/analysed from the QoS data MT safe. A valid #GstMessage of type GST_MESSAGE_QOS. The difference of the running-time against the deadline. Long term prediction of the ideal rate relative to normal rate to get optimal quality. An element dependent integer value that specifies the current quality level of the element. The default maximum quality is 1000000. Parses the location and/or structure from the entry with the given index. The index must be between 0 and gst_message_get_num_redirect_entries() - 1. Returned pointers are valid for as long as this message exists. a #GstMessage of type %GST_MESSAGE_REDIRECT index of the entry to parse return location for the pointer to the entry's location string, or %NULL return location for the pointer to the entry's tag list, or %NULL return location for the pointer to the entry's structure, or %NULL Extract the requested state from the request_state message. MT safe. A valid #GstMessage of type GST_MESSAGE_REQUEST_STATE. Result location for the requested state or %NULL Extract the running-time from the RESET_TIME message. MT safe. A valid #GstMessage of type GST_MESSAGE_RESET_TIME. Result location for the running_time or %NULL Extracts the position and format from the segment done message. MT safe. A valid #GstMessage of type GST_MESSAGE_SEGMENT_DONE. Result location for the format, or %NULL Result location for the position, or %NULL Extracts the position and format from the segment start message. MT safe. A valid #GstMessage of type GST_MESSAGE_SEGMENT_START. Result location for the format, or %NULL Result location for the position, or %NULL Extracts the old and new states from the GstMessage. Typical usage of this function might be: |[<!-- language="C" --> ... switch (GST_MESSAGE_TYPE (msg)) { case GST_MESSAGE_STATE_CHANGED: { GstState old_state, new_state; gst_message_parse_state_changed (msg, &old_state, &new_state, NULL); g_print ("Element %s changed state from %s to %s.\n", GST_OBJECT_NAME (msg->src), gst_element_state_get_name (old_state), gst_element_state_get_name (new_state)); break; } ... } ... ]| MT safe. a valid #GstMessage of type GST_MESSAGE_STATE_CHANGED the previous state, or %NULL the new (current) state, or %NULL the pending (target) state, or %NULL Extract the values the step_done message. MT safe. A valid #GstMessage of type GST_MESSAGE_STEP_DONE. result location for the format result location for the amount result location for the rate result location for the flush flag result location for the intermediate flag result location for the duration result location for the EOS flag Extract the values from step_start message. MT safe. A valid #GstMessage of type GST_MESSAGE_STEP_DONE. result location for the active flag result location for the format result location for the amount result location for the rate result location for the flush flag result location for the intermediate flag Parses a stream-collection message. a #GstMessage of type %GST_MESSAGE_STREAM_COLLECTION A location where to store a pointer to the #GstStreamCollection, or %NULL Extracts the stream status type and owner the GstMessage. The returned owner remains valid for as long as the reference to @message is valid and should thus not be unreffed. MT safe. A valid #GstMessage of type GST_MESSAGE_STREAM_STATUS. A pointer to hold the status type The owner element of the message source Parses a streams-selected message. a #GstMessage of type %GST_MESSAGE_STREAMS_SELECTED A location where to store a pointer to the #GstStreamCollection, or %NULL Extracts the change type and completion status from the GstMessage. MT safe. A valid #GstMessage of type GST_MESSAGE_STRUCTURE_CHANGE. A pointer to hold the change type The owner element of the message source a pointer to hold whether the change is in progress or has been completed Extracts the tag list from the GstMessage. The tag list returned in the output argument is a copy; the caller must free it when done. Typical usage of this function might be: |[<!-- language="C" --> ... switch (GST_MESSAGE_TYPE (msg)) { case GST_MESSAGE_TAG: { GstTagList *tags = NULL; gst_message_parse_tag (msg, &tags); g_print ("Got tags from element %s\n", GST_OBJECT_NAME (msg->src)); handle_tags (tags); gst_tag_list_unref (tags); break; } ... } ... ]| MT safe. A valid #GstMessage of type GST_MESSAGE_TAG. return location for the tag-list. Extract the TOC from the #GstMessage. The TOC returned in the output argument is a copy; the caller must free it with gst_toc_unref() when done. MT safe. a valid #GstMessage of type GST_MESSAGE_TOC. return location for the TOC. return location for the updated flag. Extracts the GError and debug string from the GstMessage. The values returned in the output arguments are copies; the caller must free them when done. MT safe. A valid #GstMessage of type GST_MESSAGE_WARNING. location for the GError location for the debug message, or %NULL Returns the optional details structure, may be NULL if none The returned structure must not be freed. The message object A pointer to the returned details Returns the details structure if present or will create one if not present. The returned structure must not be freed. The writable message object A pointer to the returned details Convenience macro to increase the reference count of the message. @msg (for convenience when doing assignments) the message to ref Configures the buffering stats values in @message. A valid #GstMessage of type GST_MESSAGE_BUFFERING. a buffering mode the average input rate the average output rate amount of buffering time left in milliseconds Add @details to @message. Will fail if the message already has details set on it or if it is not writable. A #GstMessage A GstStructure with details Sets the group id on the stream-start message. All streams that have the same group id are supposed to be played together, i.e. all streams inside a container file should have the same group id but different stream ids. The group id should change each time the stream is started, resulting in different group ids each time a file is played for example. MT safe. the message the group id Set the QoS stats representing the history of the current continuous pipeline playback period. When @format is @GST_FORMAT_UNDEFINED both @dropped and @processed are invalid. Values of -1 for either @processed or @dropped mean unknown values. MT safe. A valid #GstMessage of type GST_MESSAGE_QOS. Units of the 'processed' and 'dropped' fields. Video sinks and video filters will use GST_FORMAT_BUFFERS (frames). Audio sinks and audio filters will likely use GST_FORMAT_DEFAULT (samples). Total number of units correctly processed since the last state change to READY or a flushing operation. Total number of units dropped since the last state change to READY or a flushing operation. Set the QoS values that have been calculated/analysed from the QoS data MT safe. A valid #GstMessage of type GST_MESSAGE_QOS. The difference of the running-time against the deadline. Long term prediction of the ideal rate relative to normal rate to get optimal quality. An element dependent integer value that specifies the current quality level of the element. The default maximum quality is 1000000. Set the sequence number of a message. This function might be called by the creator of a message to indicate that the message relates to other messages or events. See gst_message_get_seqnum() for more information. MT safe. A #GstMessage. A sequence number. Configures the object handling the streaming thread. This is usually a GstTask object but other objects might be added in the future. A valid #GstMessage of type GST_MESSAGE_STREAM_STATUS. the object controlling the streaming Adds the @stream to the @message. a #GstMessage of type %GST_MESSAGE_STREAMS_SELECTED a #GstStream to add to @message Returns the number of streams contained in the @message. The number of streams contained within. a #GstMessage of type %GST_MESSAGE_STREAMS_SELECTED Retrieves the #GstStream with index @index from the @message. A #GstStream a #GstMessage of type %GST_MESSAGE_STREAMS_SELECTED Index of the stream to retrieve Convenience macro to decrease the reference count of the message, possibly freeing it. the message to unref Returns the details structure of the @message. If not present it will be created. Use this function (instead of gst_message_get_details()) if you want to write to the @details structure. The returned structure must not be freed. The details, or NULL if none. A writable #GstMessage Get a writable version of the structure. The structure of the message. The structure is still owned by the message, which means that you should not free it and that the pointer becomes invalid when you free the message. This function ensures that @message is writable, and if so, will never return %NULL. MT safe. A writable #GstMessage. Modifies a pointer to a #GstMessage to point to a different #GstMessage. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old message is unreffed, the new one is reffed). Either @new_message or the #GstMessage pointed to by @old_message may be %NULL. %TRUE if @new_message was different from @old_message pointer to a pointer to a #GstMessage to be replaced. pointer to a #GstMessage that will replace the message pointed to by @old_message. Modifies a pointer to a #GstMessage to point to a different #GstMessage. This function is similar to gst_message_replace() except that it takes ownership of @new_message. %TRUE if @new_message was different from @old_message pointer to a pointer to a #GstMessage to be replaced. pointer to a #GstMessage that will replace the message pointed to by @old_message. The different message types that are available. an undefined message end-of-stream reached in a pipeline. The application will only receive this message in the PLAYING state and every time it sets a pipeline to PLAYING that is in the EOS state. The application can perform a flushing seek in the pipeline, which will undo the EOS state again. an error occurred. When the application receives an error message it should stop playback of the pipeline and not assume that more data will be played. It is possible to specify a redirection url to the error messages by setting a `redirect-location` field into the error message, application or high level bins might use the information as required. a warning occurred. an info message occurred a tag was found. the pipeline is buffering. When the application receives a buffering message in the PLAYING state for a non-live pipeline it must PAUSE the pipeline until the buffering completes, when the percentage field in the message is 100%. For live pipelines, no action must be performed and the buffering percentage can be used to inform the user about the progress. a state change happened an element changed state in a streaming thread. This message is deprecated. a stepping operation finished. an element notifies its capability of providing a clock. This message is used internally and never forwarded to the application. The current clock as selected by the pipeline became unusable. The pipeline will select a new clock on the next PLAYING state change. The application should set the pipeline to PAUSED and back to PLAYING when this message is received. a new clock was selected in the pipeline. the structure of the pipeline changed. This message is used internally and never forwarded to the application. status about a stream, emitted when it starts, stops, errors, etc.. message posted by the application, possibly via an application-specific element. element-specific message, see the specific element's documentation pipeline started playback of a segment. This message is used internally and never forwarded to the application. pipeline completed playback of a segment. This message is forwarded to the application after all elements that posted @GST_MESSAGE_SEGMENT_START posted a GST_MESSAGE_SEGMENT_DONE message. The duration of a pipeline changed. The application can get the new duration with a duration query. Posted by elements when their latency changes. The application should recalculate and distribute a new latency. Posted by elements when they start an ASYNC #GstStateChange. This message is not forwarded to the application but is used internally. Posted by elements when they complete an ASYNC #GstStateChange. The application will only receive this message from the toplevel pipeline. Posted by elements when they want the pipeline to change state. This message is a suggestion to the application which can decide to perform the state change on (part of) the pipeline. A stepping operation was started. A buffer was dropped or an element changed its processing strategy for Quality of Service reasons. A progress message. A new table of contents (TOC) was found or previously found TOC was updated. Message to request resetting the pipeline's running time from the pipeline. This is an internal message which applications will likely never receive. Message indicating start of a new stream. Useful e.g. when using playbin in gapless playback mode, to get notified when the next title actually starts playing (which will be some time after the URI for the next title has been set). Message indicating that an element wants a specific context (Since: 1.2) Message indicating that an element created a context (Since: 1.2) Message is an extended message type (see below). These extended message IDs can't be used directly with mask-based API like gst_bus_poll() or gst_bus_timed_pop_filtered(), but you can still filter for GST_MESSAGE_EXTENDED and then check the result for the specific type. (Since: 1.4) Message indicating a #GstDevice was added to a #GstDeviceProvider (Since: 1.4) Message indicating a #GstDevice was removed from a #GstDeviceProvider (Since: 1.4) Message indicating a #GObject property has changed (Since: 1.10) Message indicating a new #GstStreamCollection is available (Since: 1.10) Message indicating the active selection of #GstStreams has changed (Since: 1.10) Message indicating to request the application to try to play the given URL(s). Useful if for example a HTTP 302/303 response is received with a non-HTTP URL inside. (Since: 1.10) Message indicating a #GstDevice was changed a #GstDeviceProvider (Since: 1.16) Message sent by elements to request the running time from the pipeline when an instant rate change should be applied (which may be in the past when the answer arrives). (Since: 1.18) mask for all of the above messages. Get a printable name for the given message type. Do not modify or free. a reference to the static name of the message. the message type Get the unique quark for the given message type. the quark associated with the message type the message type The #GstMeta structure should be included as the first member of a #GstBuffer metadata structure. The structure defines the API of the metadata and should be accessible to all elements using the metadata. A metadata API is registered with gst_meta_api_type_register() which takes a name for the metadata API and some tags associated with the metadata. With gst_meta_api_type_has_tag() one can check if a certain metadata API contains a given tag. Multiple implementations of a metadata API can be registered. To implement a metadata API, gst_meta_register() should be used. This function takes all parameters needed to create, free and transform metadata along with the size of the metadata. The function returns a #GstMetaInfo structure that contains the information for the implementation of the API. A specific implementation can be retrieved by name with gst_meta_get_info(). See #GstBuffer for how the metadata can be added, retrieved and removed from buffers. extra flags for the metadata pointer to the #GstMetaInfo Meta sequence number compare function. Can be used as #GCompareFunc or a #GCompareDataFunc. a negative number if @meta1 comes before @meta2, 0 if both metas have an equal sequence number, or a positive integer if @meta1 comes after @meta2. a #GstMeta a #GstMeta Gets seqnum for this meta. a #GstMeta Serialize @meta into a format that can be stored or transmitted and later deserialized by gst_meta_deserialize(). This is only supported for meta that implements #GstMetaInfo.serialize_func, %FALSE is returned otherwise. Upon failure, @data->data pointer could have been reallocated, but @data->len won't be modified. This is intended to be able to append multiple metas into the same #GByteArray. Since serialization size is often the same for every buffer, caller may want to remember the size of previous data to preallocate the next. %TRUE on success, %FALSE otherwise. a #GstMeta #GstByteArrayInterface to append serialization data Same as gst_meta_serialize() but with a #GByteArray instead of #GstByteArrayInterface. %TRUE on success, %FALSE otherwise. a #GstMeta #GByteArray to append serialization data When a element like `tee` decides the allocation, each downstream element may fill different parameters and pass them to gst_query_add_allocation_meta(). In order to keep these parameters, a merge operation is needed. This aggregate function can combine the parameters from @params0 and @param1, and write the result back into @aggregated_params. %TRUE if the parameters were successfully aggregated, %FALSE otherwise. the GType of the API for which the parameters are being aggregated. This structure will be updated with the combined parameters from both @params0 and @params1. a #GstStructure containing the new parameters to be aggregated. a #GstStructure containing the new parameters to be aggregated. an array of tags as strings. an API Check if @api was registered with @tag. %TRUE if @api was registered with @tag. an API the tag to check Register and return a GType for the @api and associate it with @tags. a unique GType for @api. an API to register tags for @api This function sets the aggregator function for a specific API type. the #GType of the API for which the aggregator function is being set. the aggregator function to be associated with the given API type. Recreate a #GstMeta from serialized data returned by gst_meta_serialize() and add it to @buffer. Note that the meta must have been previously registered by calling one of `gst_*_meta_get_info ()` functions. @consumed is set to the number of bytes that can be skipped from @data to find the next meta serialization, if any. In case of parsing error that does not allow to determine that size, @consumed is set to 0. the metadata owned by @buffer, or %NULL. a #GstBuffer serialization data obtained from gst_meta_serialize() size of @data total size used by this meta, could be less than @size Lookup a previously registered meta info structure by its implementation name @impl. a #GstMetaInfo with @impl, or %NULL when no such metainfo exists. the name Register a new #GstMeta implementation. The same @info can be retrieved later with gst_meta_get_info() by using @impl as the key. a #GstMetaInfo that can be used to access metadata. the type of the #GstMeta API the name of the #GstMeta implementation the size of the #GstMeta structure a #GstMetaInitFunction a #GstMetaFreeFunction a #GstMetaTransformFunction Register a new custom #GstMeta implementation, backed by an opaque structure holding a #GstStructure. The registered info can be retrieved later with gst_meta_get_info() by using @name as the key. The backing #GstStructure can be retrieved with gst_custom_meta_get_structure(), its mutability is conditioned by the writability of the buffer the meta is attached to. When @transform_func is %NULL, the meta and its backing #GstStructure will always be copied when the transform operation is copy, other operations are discarded, copy regions are ignored. a #GstMetaInfo that can be used to access metadata. the name of the #GstMeta implementation tags for @api a #GstMetaTransformFunction user data passed to @transform_func #GDestroyNotify for user_data Simplified version of gst_meta_register_custom(), with no tags and no transform function. a #GstMetaInfo that can be used to access metadata. the name of the #GstMeta implementation Clears the content of the meta. This will be called by the GstBufferPool when a pooled buffer is returned. a #GstBuffer a #GstMeta Recreate a #GstMeta from serialized data returned by #GstMetaSerializeFunction and add it to @buffer. the metadata owned by @buffer, or %NULL. #GstMetaInfo of the meta a #GstBuffer data obtained from #GstMetaSerializeFunction size of data to avoid buffer overflow Extra metadata flags. no flags metadata should not be modified metadata is managed by a bufferpool metadata should not be removed additional flags can be added starting from this flag. Function called when @meta is freed in @buffer. a #GstMeta a #GstBuffer The #GstMetaInfo provides information about a specific metadata structure. tag identifying the metadata structure and api type identifying the implementor of the api size of the metadata function for initializing the metadata function for freeing the metadata function for transforming the metadata Function for serializing the metadata, or %NULL if not supported by this meta. Function for deserializing the metadata, or %NULL if not supported by this meta. Function for clearing the metadata, or %NULL if not supported by this meta. This is called by the buffer pool when a buffer is returned for pooled metas. whether @info was registered as a #GstCustomMeta with gst_meta_register_custom() Registers a new meta. Use the structure returned by gst_meta_info_new(), it consumes it and the structure shouldnt be used after. The one returned by the function can be kept. the registered meta a new #GstMetaInfo created by gst_meta_info_new() 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; } ``` a new #GstMetaInfo that needs to be filled the type of the #GstMeta API the name of the #GstMeta implementation the size of the #GstMeta structure Function called when @meta is initialized in @buffer. a #GstMeta parameters passed to the init function a #GstBuffer Serialize @meta into a format that can be stored or transmitted and later deserialized by #GstMetaDeserializeFunction. By default version is set to 0, it should be bumped if incompatible changes are made to the format so %GstMetaDeserializeFunction can deserialize each version. %TRUE on success, %FALSE otherwise. a #GstMeta #GstByteArrayInterface to append serialization data version of the serialization format Extra data passed to a "gst-copy" transform #GstMetaTransformFunction. %TRUE if only region is copied the offset to copy, 0 if @region is %FALSE, otherwise > 0 the size to copy, -1 or the buffer size when @region is %FALSE Function called for each @meta in @buffer as a result of performing a transformation on @transbuf. Additional @type specific transform data is passed to the function as @data. Implementations should check the @type of the transform and parse additional type specific fields in @data that should be used to update the metadata on @transbuf. %TRUE if the transform could be performed a #GstBuffer a #GstMeta a #GstBuffer the transform type transform specific data. #GstMiniObject is a simple structure that can be used to implement refcounted types. Subclasses will include #GstMiniObject as the first member in their structure and then call gst_mini_object_init() to initialize the #GstMiniObject fields. gst_mini_object_ref() and gst_mini_object_unref() increment and decrement the refcount respectively. When the refcount of a mini-object reaches 0, the dispose function is called first and when this returns %TRUE, the free function of the miniobject is called. A copy can be made with gst_mini_object_copy(). gst_mini_object_is_writable() will return %TRUE when the refcount of the object is exactly 1 and there is no parent or a single parent exists and is writable itself, meaning the current caller has the only reference to the object. gst_mini_object_make_writable() will return a writable version of the object, which might be a new copy when the refcount was not 1. Opaque data can be associated with a #GstMiniObject with gst_mini_object_set_qdata() and gst_mini_object_get_qdata(). The data is meant to be specific to the particular object and is not automatically copied with gst_mini_object_copy() or similar methods. A weak reference can be added and remove with gst_mini_object_weak_ref() and gst_mini_object_weak_unref() respectively. the GType of the object atomic refcount atomic state of the locks extra flags. a copy function a dispose function the free function This adds @parent as a parent for @object. Having one ore more parents affects the writability of @object: if a @parent is not writable, @object is also not writable, regardless of its refcount. @object is only writable if all the parents are writable and its own refcount is exactly 1. Note: This function does not take ownership of @parent and also does not take an additional reference. It is the responsibility of the caller to remove the parent again at a later time. a #GstMiniObject a parent #GstMiniObject Creates a copy of the mini-object. MT safe the new mini-object if copying is possible, %NULL otherwise. the mini-object to copy This function gets back user data pointers stored via gst_mini_object_set_qdata(). The user data pointer set, or %NULL The GstMiniObject to get a stored user data pointer from A #GQuark, naming the user data pointer Initializes a mini-object with the desired type and copy/dispose/free functions. a #GstMiniObject initial #GstMiniObjectFlags the #GType of the mini-object to create the copy function, or %NULL the dispose function, or %NULL the free function or %NULL If @mini_object has the LOCKABLE flag set, check if the current EXCLUSIVE lock on @object is the only one, this means that changes to the object will not be visible to any other object. If the LOCKABLE flag is not set, check if the refcount of @mini_object is exactly 1, meaning that no other reference exists to the object and that the object is therefore writable. Modification of a mini-object should only be done after verifying that it is writable. %TRUE if the object is writable. the mini-object to check Lock the mini-object with the specified access mode in @flags. %TRUE if @object could be locked. the mini-object to lock #GstLockFlags Checks if a mini-object is writable. If not, a writable copy is made and returned. This gives away the reference to the original mini object, and returns a reference to the new object. MT safe a writable mini-object (which may or may not be the same as @mini_object) or %NULL if copying is required but not possible. the mini-object to make writable Increase the reference count of the mini-object. Note that the refcount affects the writability of @mini-object, see gst_mini_object_is_writable(). It is important to note that keeping additional references to GstMiniObject instances can potentially increase the number of memcpy operations in a pipeline, especially if the miniobject is a #GstBuffer. the mini-object. the mini-object This removes @parent as a parent for @object. See gst_mini_object_add_parent(). a #GstMiniObject a parent #GstMiniObject This sets an opaque, named pointer on a miniobject. The name is specified through a #GQuark (retrieved e.g. via g_quark_from_static_string()), and the pointer can be gotten back from the @object with gst_mini_object_get_qdata() until the @object is disposed. Setting a previously set user data pointer, overrides (frees) the old pointer set, using %NULL as pointer essentially removes the data stored. @destroy may be specified which is called with @data as argument when the @object is disposed, or the data is being overwritten by a call to gst_mini_object_set_qdata() with the same @quark. a #GstMiniObject A #GQuark, naming the user data pointer An opaque user data pointer Function to invoke with @data as argument, when @data needs to be freed This function gets back user data pointers stored via gst_mini_object_set_qdata() and removes the data from @object without invoking its `destroy()` function (if any was set). The user data pointer set, or %NULL The GstMiniObject to get a stored user data pointer from A #GQuark, naming the user data pointer Unlock the mini-object with the specified access mode in @flags. the mini-object to unlock #GstLockFlags Decreases the reference count of the mini-object, possibly freeing the mini-object. the mini-object Adds a weak reference callback to a mini object. Weak references are used for notification when a mini object is finalized. They are called "weak references" because they allow you to safely hold a pointer to the mini object without calling gst_mini_object_ref() (gst_mini_object_ref() adds a strong reference, that is, forces the object to stay alive). #GstMiniObject to reference weakly callback to invoke before the mini object is freed extra data to pass to notify Removes a weak reference callback from a mini object. #GstMiniObject to remove a weak reference from callback to search for data to search for Atomically modifies a pointer to point to a new mini-object. The reference count of @olddata is decreased and the reference count of @newdata is increased. Either @newdata and the value pointed to by @olddata may be %NULL. %TRUE if @newdata was different from @olddata pointer to a pointer to a mini-object to be replaced pointer to new mini-object Replace the current #GstMiniObject pointer to by @olddata with %NULL and return the old value. the #GstMiniObject at @oldata pointer to a pointer to a mini-object to be stolen Modifies a pointer to point to a new mini-object. The modification is done atomically. This version is similar to gst_mini_object_replace() except that it does not increase the refcount of @newdata and thus takes ownership of @newdata. Either @newdata and the value pointed to by @olddata may be %NULL. %TRUE if @newdata was different from @olddata pointer to a pointer to a mini-object to be replaced pointer to new mini-object Function prototype for methods to create copies of instances. reference to cloned instance. MiniObject to copy Function prototype for when a miniobject has lost its last refcount. Implementation of the mini object are allowed to revive the passed object by doing a gst_mini_object_ref(). If the object is not revived after the dispose function, the function should return %TRUE and the memory associated with the object is freed. %TRUE if the object should be cleaned up. MiniObject to dispose Flags for the mini object the object can be locked and unlocked with gst_mini_object_lock() and gst_mini_object_unlock(). the object is permanently locked in READONLY mode. Only read locks can be performed on the object. the object is expected to stay alive even after gst_deinit() has been called and so should be ignored by leak detection tools. (Since: 1.10) first flag that can be used by subclasses. Virtual function prototype for methods to free resources used by mini-objects. MiniObject to free A #GstMiniObjectNotify function can be added to a mini object as a callback that gets triggered when gst_mini_object_unref() drops the last ref and @obj is about to be freed. data that was provided when the notify was added the mini object Constant that defines one GStreamer nanosecond Declare a #GMutexLocker variable with g_autoptr() and lock the object. The mutex will be unlocked automatically when leaving the scope. ``` c { GST_OBJECT_AUTO_LOCK (obj, locker); obj->stuff_with_lock(); if (cond) { // No need to unlock return; } // Unlock before end of scope g_clear_pointer (&locker, g_mutex_locker_free); obj->stuff_without_lock(); } ``` a #GstObject to lock a variable name to be declared This macro returns the entire set of flags for the object. a #GstObject This macro checks to see if the given flag is set. a #GstObject Flag to check for This macro sets the given bits. a #GstObject Flag to set This macro unsets the given bits. a #GstObject Flag to set Acquire a reference to the mutex of this object. a #GstObject This macro will obtain a lock on the object, making serialization possible. It blocks until the lock can be obtained. a #GstObject to lock Get the name of this object. This is not thread-safe by default (i.e. you will have to make sure the object lock is taken yourself). If in doubt use gst_object_get_name() instead. a #GstObject Get the parent of this object. This is not thread-safe by default (i.e. you will have to make sure the object lock is taken yourself). If in doubt use gst_object_get_parent() instead. a #GstObject Get access to the reference count field of the object. a #GstObject Get the reference count value of the object. a #GstObject This macro will try to obtain a lock on the object, but will return with %FALSE if it can't get it immediately. a #GstObject. This macro releases a lock on the object. a #GstObject to unlock. #GstObject provides a root for the object hierarchy tree filed in by the GStreamer library. It is currently a thin wrapper on top of #GInitiallyUnowned. It is an abstract class that is not very usable on its own. #GstObject gives us basic refcounting, parenting functionality and locking. Most of the functions are just extended for special GStreamer needs and can be found under the same name in the base class of #GstObject which is #GObject (e.g. g_object_ref() becomes gst_object_ref()). Since #GstObject derives from #GInitiallyUnowned, it also inherits the floating reference. Be aware that functions such as gst_bin_add() and gst_element_add_pad() take ownership of the floating reference. In contrast to #GObject instances, #GstObject adds a name property. The functions gst_object_set_name() and gst_object_get_name() are used to set/get the name of the object. ## controlled properties Controlled properties offers a lightweight way to adjust gobject properties over stream-time. It works by using time-stamped value pairs that are queued for element-properties. At run-time the elements continuously pull value changes for the current stream-time. What needs to be changed in a #GstElement? Very little - it is just two steps to make a plugin controllable! * mark gobject-properties paramspecs that make sense to be controlled, by GST_PARAM_CONTROLLABLE. * when processing data (get, chain, loop function) at the beginning call gst_object_sync_values(element,timestamp). This will make the controller update all GObject properties that are under its control with the current values based on the timestamp. What needs to be done in applications? Again it's not a lot to change. * create a #GstControlSource. csource = gst_interpolation_control_source_new (); g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL); * Attach the #GstControlSource on the controller to a property. gst_object_add_control_binding (object, gst_direct_control_binding_new (object, "prop1", csource)); * Set the control values gst_timed_value_control_source_set ((GstTimedValueControlSource *)csource,0 * GST_SECOND, value1); gst_timed_value_control_source_set ((GstTimedValueControlSource *)csource,1 * GST_SECOND, value2); * start your pipeline Checks to see if there is any object named @name in @list. This function does not do any locking of any kind. You might want to protect the provided list with the lock of the owner of the list. This function will lock each #GstObject in the list to compare the name, so be careful when passing a list with a locked object. %TRUE if a #GstObject named @name does not appear in @list, %FALSE if it does. MT safe. Grabs and releases the LOCK of each object in the list. a list of #GstObject to check through the name to search for A default deep_notify signal callback for an object. The user data should contain a pointer to an array of strings that should be excluded from the notify. The default handler will print the new value of the property using g_print. MT safe. This function grabs and releases @object's LOCK for getting its path string. the #GObject that signalled the notify. a #GstObject that initiated the notify. a #GParamSpec of the property. a set of user-specified properties to exclude or %NULL to show all changes. Increase the reference count of @object, and possibly remove the floating reference, if @object has a floating reference. In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one. For more background on "floating references" please see the #GObject documentation. a #GstObject to sink Atomically modifies a pointer to point to a new object. The reference count of @oldobj is decreased and the reference count of @newobj is increased. Either @newobj and the value pointed to by @oldobj may be %NULL. %TRUE if @newobj was different from @oldobj pointer to a place of a #GstObject to replace a new #GstObject default signal handler Attach the #GstControlBinding to the object. If there already was a #GstControlBinding for this property it will be replaced. The object's reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink()) %FALSE if the given @binding has not been setup for this object or has been setup for a non suitable property, %TRUE otherwise. the controller object the #GstControlBinding that should be used A default error function that uses g_printerr() to display the error message and the optional debug string.. The default handler will simply print the error string using g_print. the #GstObject that initiated the error. the GError. an additional debug information string, or %NULL Gets the corresponding #GstControlBinding for the property. This should be unreferenced again after use. the #GstControlBinding for @property_name or %NULL if the property is not controlled. the object name of the property Obtain the control-rate for this @object. Audio processing #GstElement objects will use this rate to sub-divide their processing loop and call gst_object_sync_values() in between. The length of the processing segment should be up to @control-rate nanoseconds. If the @object is not under property control, this will return %GST_CLOCK_TIME_NONE. This allows the element to avoid the sub-dividing. The control-rate is not expected to change if the element is in %GST_STATE_PAUSED or %GST_STATE_PLAYING. the control rate in nanoseconds the object that has controlled properties Gets a number of #GValues for the given controlled property starting at the requested time. The array @values need to hold enough space for @n_values of #GValue. This function is useful if one wants to e.g. draw a graph of the control curve or apply a control curve sample by sample. %TRUE if the given array could be filled, %FALSE otherwise the object that has controlled properties the name of the property to get the time that should be processed the time spacing between subsequent values the number of values array to put control-values in Returns a copy of the name of @object. Caller should g_free() the return value after usage. For a nameless object, this returns %NULL, which you can safely g_free() as well. Free-function: g_free the name of @object. g_free() after usage. MT safe. This function grabs and releases @object's LOCK. a #GstObject Returns the parent of @object. This function increases the refcount of the parent object so you should gst_object_unref() it after usage. parent of @object, this can be %NULL if @object has no parent. unref after usage. MT safe. Grabs and releases @object's LOCK. a #GstObject Generates a string describing the path of @object in the object hierarchy. Only useful (or used) for debugging. Free-function: g_free a string describing the path of @object. You must g_free() the string after usage. MT safe. Grabs and releases the #GstObject's LOCK for all objects in the hierarchy. a #GstObject Gets the value for the given controlled property at the requested time. the GValue of the property at the given time, or %NULL if the property isn't controlled. the object that has controlled properties the name of the property to get the time the control-change should be read from Gets a number of values for the given controlled property starting at the requested time. The array @values need to hold enough space for @n_values of the same type as the objects property's type. This function is useful if one wants to e.g. draw a graph of the control curve or apply a control curve sample by sample. The values are unboxed and ready to be used. The similar function gst_object_get_g_value_array() returns the array as #GValues and is better suites for bindings. %TRUE if the given array could be filled, %FALSE otherwise the object that has controlled properties the name of the property to get the time that should be processed the time spacing between subsequent values the number of values array to put control-values in Check if the @object has active controlled properties. %TRUE if the object has active controlled properties the object that has controlled properties Check if @object has an ancestor @ancestor somewhere up in the hierarchy. One can e.g. check if a #GstElement is inside a #GstPipeline. Use gst_object_has_as_ancestor() instead. MT safe. Grabs and releases @object's locks. %TRUE if @ancestor is an ancestor of @object. a #GstObject to check a #GstObject to check as ancestor Check if @object has an ancestor @ancestor somewhere up in the hierarchy. One can e.g. check if a #GstElement is inside a #GstPipeline. %TRUE if @ancestor is an ancestor of @object. MT safe. Grabs and releases @object's locks. a #GstObject to check a #GstObject to check as ancestor Check if @parent is the parent of @object. E.g. a #GstElement can check if it owns a given #GstPad. %FALSE if either @object or @parent is %NULL. %TRUE if @parent is the parent of @object. Otherwise %FALSE. MT safe. Grabs and releases @object's locks. a #GstObject to check a #GstObject to check as parent Increments the reference count on @object. This function does not take the lock on @object because it relies on atomic refcounting. This object returns the input parameter to ease writing constructs like : result = gst_object_ref (object->parent); A pointer to @object a #GstObject to reference Removes the corresponding #GstControlBinding. If it was the last ref of the binding, it will be disposed. %TRUE if the binding could be removed. the object the binding This function is used to disable the control bindings on a property for some time, i.e. gst_object_sync_values() will do nothing for the property. the object that has controlled properties property to disable boolean that specifies whether to disable the controller or not. This function is used to disable all controlled properties of the @object for some time, i.e. gst_object_sync_values() will do nothing. the object that has controlled properties boolean that specifies whether to disable the controller or not. Change the control-rate for this @object. Audio processing #GstElement objects will use this rate to sub-divide their processing loop and call gst_object_sync_values() in between. The length of the processing segment should be up to @control-rate nanoseconds. The control-rate should not change if the element is in %GST_STATE_PAUSED or %GST_STATE_PLAYING. the object that has controlled properties the new control-rate in nanoseconds. Sets the name of @object, or gives @object a guaranteed unique name (if @name is %NULL). This function makes a copy of the provided name, so the caller retains ownership of the name it sent. %TRUE if the name could be set. Since Objects that have a parent cannot be renamed, this function returns %FALSE in those cases. MT safe. This function grabs and releases @object's LOCK. a #GstObject new name of object Sets the parent of @object to @parent. The object's reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink()). %TRUE if @parent could be set or %FALSE when @object already had a parent or @object and @parent are the same. MT safe. Grabs and releases @object's LOCK. a #GstObject new parent of object Returns a suggestion for timestamps where buffers should be split to get best controller results. Returns the suggested timestamp or %GST_CLOCK_TIME_NONE if no control-rate was set. the object that has controlled properties Sets the properties of the object, according to the #GstControlSources that (maybe) handle them and for the given timestamp. If this function fails, it is most likely the application developers fault. Most probably the control sources are not setup correctly. %TRUE if the controller values could be applied to the object properties, %FALSE otherwise the object that has controlled properties the time that should be processed Clear the parent of @object, removing the associated reference. This function decreases the refcount of @object. MT safe. Grabs and releases @object's lock. a #GstObject to unparent Decrements the reference count on @object. If reference count hits zero, destroy @object. This function does not take the lock on @object as it relies on atomic refcounting. The unref method should never be called with the LOCK held since this might deadlock the dispose function. a #GstObject to unreference The parent of the object. Please note, that when changing the 'parent' property, we don't emit #GObject::notify and #GstObject::deep-notify signals due to locking issues. In some cases one can use #GstBin::element-added or #GstBin::element-removed signals on the parent to achieve a similar effect. object LOCK The name of the object this object's parent, weak ref flags for this object The deep notify signal is used to be notified of property changes. It is typically attached to the toplevel bin to receive notifications from all the elements contained in that bin. the object that originated the signal the property that changed GStreamer base object class. parent separator used by gst_object_get_path_string() default signal handler The standard flags that an gstobject may have. the object is expected to stay alive even after gst_deinit() has been called and so should be ignored by leak detection tools. (Since: 1.10) Flag that's set when the object has been constructed. This can be used by API such as base class setters to differentiate between the case where they're called from a subclass's instance init function (and where the object isn't fully constructed yet, and so one shouldn't do anything but set values in the instance structure), and the case where the object is constructed. subclasses can add additional flags starting from this flag Get the #GstPadActivateFunction from @pad. a #GstPad Get the #GstPadActivateModeFunction from the given @pad. a #GstPad Get the #GstPadChainFunction from the given @pad. a #GstPad Get the #GstPadChainListFunction from the given @pad. a #GstPad Get the #GstPadDirection of the given @pad. Accessor macro, use gst_pad_get_direction() instead. a #GstPad Get the private data of @pad, which is usually some pad- or stream-specific structure created by the element and set on the pad when creating it. No locking is performed in this function. a #GstPad Get the #GstPadEventFullFunction from the given @pad, which is the function that handles events on the pad. You can use this to set your own event handling function on a pad after you create it. If your element derives from a base class, use the base class's virtual functions instead. a #GstPad Get the #GstPadEventFunction from the given @pad, which is the function that handles events on the pad. You can use this to set your own event handling function on a pad after you create it. If your element derives from a base class, use the base class's virtual functions instead. a #GstPad Get the #GstPadGetRangeFunction from the given @pad. a #GstPad Get the stream lock of @pad. The stream lock is protecting the resources used in the data processing functions of @pad. Accessor macro, use GST_PAD_STREAM_LOCK() and GST_PAD_STREAM_UNLOCK() instead to take/release the pad's stream lock. a #GstPad Check if the given @pad has pending events. This is used internally by GStreamer. a #GstPad Check if the pad's accept intersect flag is set. The default accept-caps handler will check if the caps intersect the query-caps result instead of checking for a subset. This is interesting for parser elements that can accept incompletely specified caps. a #GstPad Check if the pad's accept caps operation will use the pad template caps. The default accept-caps will do a query caps to get the caps, which might be querying downstream causing unnecessary overhead. It is recommended to implement a proper accept-caps query handler or to use this flag to prevent recursive accept-caps handling. a #GstPad a #GstPad Check if the dataflow on a @pad is blocked. Use gst_pad_is_blocked() instead. a #GstPad Check if the @pad is currently blocking on a buffer or event. Use gst_pad_is_blocking() instead. a #GstPad Check if the @pad is in EOS state. a #GstPad Check if the given @pad is using fixed caps, which means that once the caps are set on the @pad, the caps query function will only return those caps. See gst_pad_use_fixed_caps(). a #GstPad Check if the given @pad is flushing. a #GstPad a #GstPad Check if the given @pad is set as proxy allocation which means that the default query handler will forward allocation queries to the internally linked @pads instead of discarding them. a #GstPad Check if the given @pad is set to proxy caps. This means that the default event and query handler will forward all events and queries to the internally linked @pads instead of discarding them. a #GstPad Check if the given @pad is set to proxy scheduling queries, which means that the default query handler will forward scheduling queries to the internally linked @pads instead of discarding them. a #GstPad a #GstPad a #GstPad Get the #GstPadIterIntLinkFunction from the given @pad. a #GstPad Gets the last flow return on this pad a #GstPad Get the #GstPadLinkFunction for the given @pad. a #GstPad Macro to test if the given #GstPadLinkReturn value indicates a failed link step. the #GstPadLinkReturn value Macro to test if the given #GstPadLinkReturn value indicates a successful link step. the #GstPadLinkReturn value Get the #GstPadMode of pad, which will be GST_PAD_MODE_NONE if the pad has not been activated yet, and otherwise either GST_PAD_MODE_PUSH or GST_PAD_MODE_PULL depending on which mode the pad was activated in. a #GstPad Get name of the given pad. No locking is performed in this function, use gst_pad_get_name() instead. a #GstPad Check if there is a parent object before calling into the @pad callbacks. This is used internally by GStreamer. a #GstPad Check if the @pad should be reconfigured/renegotiated. The flag has to be unset manually after reconfiguration happened. Use gst_pad_needs_reconfigure() or gst_pad_check_reconfigure() instead. a #GstPad Get the @pad #GstPadTemplate. It describes the possible media types a @pad or an element factory can handle. a #GstPad Get the @pad parent. No locking is performed in this function, use gst_pad_get_parent() instead. a #GstPad Return the pad's peer member. This member is a pointer to the linked @pad. No locking is performed in this function, use gst_pad_get_peer() instead. a #GstPad Get the #GstPadQueryFunction from @pad, which is the function that handles queries on the pad. You can use this to set your own query handling function on a pad after you create it. If your element derives from a base class, use the base class's virtual functions instead. a #GstPad Set @pad to by default accept caps by intersecting the result instead of checking for a subset. This is interesting for parser elements that can accept incompletely specified caps. a #GstPad Set @pad to by default use the pad template caps to compare with the accept caps instead of using a caps query result. a #GstPad Set the given @pad to flushing state, which means it will not accept any more events, queries or buffers, and return GST_FLOW_FLUSHING if any buffers are pushed on it. This usually happens when the pad is shut down or when a flushing seek happens. This is used inside GStreamer when flush start/stop events pass through pads, or when an element state is changed and pads are activated or deactivated. a #GstPad Set @pad to proxy allocation queries, which means that the default query handler will forward allocation queries to the internally linked @pads instead of discarding them. Set this if the element always outputs data in the exact same format as it receives as input. This is just for convenience to avoid implementing some standard query handling code in an element. a #GstPad Set @pad to proxy caps, so that all caps-related events and queries are proxied down- or upstream to the other side of the element automatically. Set this if the element always outputs data in the exact same format as it receives as input. This is just for convenience to avoid implementing some standard event and query handling code in an element. a #GstPad Set @pad to proxy scheduling queries, which means that the default query handler will forward scheduling queries to the internally linked @pads instead of discarding them. You will usually want to handle scheduling queries explicitly if your element supports multiple scheduling modes. a #GstPad Declare a #GRecMutexLocker variable with g_autoptr() and lock the pad. The recursive mutex will be unlocked automatically when leaving the scope. ``` c { GST_PAD_STREAM_AUTO_LOCK (pad, locker); gst_pad_push_event(pad, event1); if (cond) { // No need to unlock return; } // Unlock before end of scope g_clear_pointer (&locker, g_rec_mutex_locker_free); gst_pad_push_event(pad, event2); } ``` a #GstPad a variable name to be declared Take the pad's stream lock. The stream lock is recursive and will be taken when buffers or serialized downstream events are pushed on a pad. a #GstPad Try to take the pad's stream lock, and return %TRUE if the lock could be taken, and otherwise %FALSE. a #GstPad Release the pad's stream lock. a #GstPad Get the #GstTask of @pad. Accessor macro used by GStreamer. Use the gst_pad_start_task(), gst_pad_stop_task() and gst_pad_pause_task() functions instead. a #GstPad Get a handle to the padtemplate #GstCaps the template to query Get the #GstPadDirection of the padtemplate. the template to query Get the #GType of the padtemplate the template to query Check if the properties of the padtemplate are fixed the template to query Get the nametemplate of the padtemplate. the template to query Get the #GstPadPresence of the padtemplate. the template to query Get the #GstPadUnlinkFunction from the given @pad. a #GstPad Unset accept intersect flag. a #GstPad Unset accept template flag. a #GstPad Unset the flushing flag. a #GstPad Unset proxy allocation flag. a #GstPad Unset proxy caps flag. a #GstPad Unset proxy scheduling flag. a #GstPad Use this flag on GObject properties of GstObject to indicate that they might not be available depending on environment such as OS, device, etc, so such properties will be installed conditionally only if the GstObject is able to support it. Use this flag on GObject properties to signal they can make sense to be. controlled over time. This hint is used by the GstController. Use this flag on GObject properties of GstObject to indicate that during `gst-inspect` and friends, the default value should be used as default instead of the current value. Use this flag on GObject properties of GstElements to indicate that they can be changed when the element is in the PAUSED or lower state. This flag implies GST_PARAM_MUTABLE_READY. Use this flag on GObject properties of GstElements to indicate that they can be changed when the element is in the PLAYING or lower state. This flag implies GST_PARAM_MUTABLE_PAUSED. Use this flag on GObject properties of GstElements to indicate that they can be changed when the element is in the READY or lower state. Bits based on GST_PARAM_USER_SHIFT can be used by 3rd party applications. This macro needs to be used to define the entry point and meta data of a plugin. One would use this macro to export a plugin, so that it can be used by other applications. The macro uses a define named PACKAGE for the #GstPluginDesc,source field. When using autoconf, this is usually set automatically via the AC_INIT macro, and set in config.h. If you are not using autoconf, you will need to define PACKAGE yourself and set it to a short mnemonic string identifying your application/package, e.g. 'someapp' or 'my-plugins-foo. If defined, the GST_PACKAGE_RELEASE_DATETIME will also be used for the #GstPluginDesc,release_datetime field. major version number of the gstreamer-core that plugin was compiled for minor version number of the gstreamer-core that plugin was compiled for short, but unique name of the plugin information about the purpose of the plugin function pointer to the plugin_init method with the signature of <code>static gboolean plugin_init (GstPlugin * plugin)</code>. full version string (e.g. VERSION from config.h) under which licence the package has been released, e.g. GPL, LGPL. the package-name (e.g. PACKAGE_NAME from config.h) a description from where the package comes from (e.g. the homepage URL) Debug the plugin feature names in @list. a #GList of plugin features This macro can be used to initialize statically linked plugins. It is necessary to call this macro before the plugin can be used. It has to be used in combination with GST_PLUGIN_STATIC_REGISTER and must be placed outside any block to declare the plugin initialization function. short, but unique name of the plugin This macro can be used to initialize statically linked plugins. It is necessary to call this macro before the plugin can be used. It has to be used in combination with GST_PLUGIN_STATIC_DECLARE and calls the plugin initialization function. short, but unique name of the plugin The field name in a GstCaps that is used to signal the UUID of the protection system. The protection system value of the unspecified UUID. In some cases the system protection ID is not present in the contents or in their metadata, as encrypted WebM. This define is used to set the value of the "system_id" field in GstProtectionEvent, with this value, the application will use an external information to choose which protection system to use. Example: The matroskademux uses this value in the case of encrypted WebM, the application will choose the appropriate protection system based on the information received through EME API. printf format type used to debug GStreamer types. You can use this in combination with GStreamer's debug logging system as well as the functions gst_info_vasprintf(), gst_info_strdup_vprintf() and gst_info_strdup_printf() to pretty-print the following types: #GstCaps, #GstStructure, #GstCapsFeatures, #GstTagList, #GstDateTime, #GstBuffer, #GstBufferList, #GstMessage, #GstEvent, #GstQuery, #GstContext, #GstPad, #GstObject. All #GObject types will be printed as typename plus pointer, and everything else will simply be printed as pointer address. This can only be used on types whose size is >= sizeof(gpointer). A #GstElement is linked to other elements via "pads", which are extremely light-weight generic link points. Pads have a #GstPadDirection, source pads produce data, sink pads consume data. Pads are typically created from a #GstPadTemplate with gst_pad_new_from_template() and are then added to a #GstElement. This usually happens when the element is created but it can also happen dynamically based on the data that the element is processing or based on the pads that the application requests. Pads without pad templates can be created with gst_pad_new(), which takes a direction and a name as an argument. If the name is %NULL, then a guaranteed unique name will be assigned to it. A #GstElement creating a pad will typically use the various gst_pad_set_*_function\() calls to register callbacks for events, queries or dataflow on the pads. gst_pad_get_parent() will retrieve the #GstElement that owns the pad. After two pads are retrieved from an element by gst_element_get_static_pad(), the pads can be linked with gst_pad_link(). (For quick links, you can also use gst_element_link(), which will make the obvious link for you if it's straightforward.). Pads can be unlinked again with gst_pad_unlink(). gst_pad_get_peer() can be used to check what the pad is linked to. Before dataflow is possible on the pads, they need to be activated with gst_pad_set_active(). gst_pad_query() and gst_pad_peer_query() can be used to query various properties of the pad and the stream. To send a #GstEvent on a pad, use gst_pad_send_event() and gst_pad_push_event(). Some events will be sticky on the pad, meaning that after they pass on the pad they can be queried later with gst_pad_get_sticky_event() and gst_pad_sticky_events_foreach(). gst_pad_get_current_caps() and gst_pad_has_current_caps() are convenience functions to query the current sticky CAPS event on a pad. GstElements will use gst_pad_push() and gst_pad_pull_range() to push out or pull in a buffer. The dataflow, events and queries that happen on a pad can be monitored with probes that can be installed with gst_pad_add_probe(). gst_pad_is_blocked() can be used to check if a block probe is installed on the pad. gst_pad_is_blocking() checks if the blocking probe is currently blocking the pad. gst_pad_remove_probe() is used to remove a previously installed probe and unblock blocking probes if any. Pad have an offset that can be retrieved with gst_pad_get_offset(). This offset will be applied to the running_time of all data passing over the pad. gst_pad_set_offset() can be used to change the offset. Convenience functions exist to start, pause and stop the task on a pad with gst_pad_start_task(), gst_pad_pause_task() and gst_pad_stop_task() respectively. Creates a new pad with the given name in the given direction. If name is %NULL, a guaranteed unique name (across all pads) will be assigned. This function makes a copy of the name so you can safely free the name. a new #GstPad. MT safe. the name of the new pad. the #GstPadDirection of the pad. Creates a new pad with the given name from the given static template. If name is %NULL, a guaranteed unique name (across all pads) will be assigned. This function makes a copy of the name so you can safely free the name. a new #GstPad. the #GstStaticPadTemplate to use the name of the pad Creates a new pad with the given name from the given template. If name is %NULL, a guaranteed unique name (across all pads) will be assigned. This function makes a copy of the name so you can safely free the name. a new #GstPad. the pad template to use the name of the pad Gets a string representing the given pad-link return. a static string with the name of the pad-link return. a #GstPadLinkReturn to get the name of. Activates or deactivates the given pad in @mode via dispatching to the pad's activatemodefunc. For use from within pad activation functions only. If you don't know what this is, you probably don't want to call it. %TRUE if the operation was successful. MT safe. the #GstPad to activate or deactivate. the requested activation mode whether or not the pad should be active. Be notified of different states of pads. The provided callback is called for every state that matches @mask. Probes are called in groups: First GST_PAD_PROBE_TYPE_BLOCK probes are called, then others, then finally GST_PAD_PROBE_TYPE_IDLE. The only exception here are GST_PAD_PROBE_TYPE_IDLE probes that are called immediately if the pad is already idle while calling gst_pad_add_probe(). In each of the groups, probes are called in the order in which they were added. an id or 0 if no probe is pending. The id can be used to remove the probe with gst_pad_remove_probe(). When using GST_PAD_PROBE_TYPE_IDLE it can happen that the probe can be run immediately and if the probe returns GST_PAD_PROBE_REMOVE this functions returns 0. MT safe. the #GstPad to add the probe to the probe mask #GstPadProbeCallback that will be called with notifications of the pad state user data passed to the callback #GDestroyNotify for user_data Checks if the source pad and the sink pad are compatible so they can be linked. %TRUE if the pads can be linked. the source #GstPad. the sink #GstPad. Chain a buffer to @pad. The function returns #GST_FLOW_FLUSHING if the pad was flushing. If the buffer type is not acceptable for @pad (as negotiated with a preceding GST_EVENT_CAPS event), this function returns #GST_FLOW_NOT_NEGOTIATED. The function proceeds calling the chain function installed on @pad (see gst_pad_set_chain_function()) and the return value of that function is returned to the caller. #GST_FLOW_NOT_SUPPORTED is returned if @pad has no chain function. In all cases, success or failure, the caller loses its reference to @buffer after calling this function. a #GstFlowReturn from the pad. MT safe. a sink #GstPad, returns GST_FLOW_ERROR if not. the #GstBuffer to send, return GST_FLOW_ERROR if not. Chain a bufferlist to @pad. The function returns #GST_FLOW_FLUSHING if the pad was flushing. If @pad was not negotiated properly with a CAPS event, this function returns #GST_FLOW_NOT_NEGOTIATED. The function proceeds calling the chainlist function installed on @pad (see gst_pad_set_chain_list_function()) and the return value of that function is returned to the caller. #GST_FLOW_NOT_SUPPORTED is returned if @pad has no chainlist function. In all cases, success or failure, the caller loses its reference to @list after calling this function. MT safe. a #GstFlowReturn from the pad. a sink #GstPad, returns GST_FLOW_ERROR if not. the #GstBufferList to send, return GST_FLOW_ERROR if not. Check and clear the #GST_PAD_FLAG_NEED_RECONFIGURE flag on @pad and return %TRUE if the flag was set. %TRUE is the GST_PAD_FLAG_NEED_RECONFIGURE flag was set on @pad. the #GstPad to check Creates a stream-id for the source #GstPad @pad by combining the upstream information with the optional @stream_id of the stream of @pad. @pad must have a parent #GstElement and which must have zero or one sinkpad. @stream_id can only be %NULL if the parent element of @pad has only a single source pad. This function generates an unique stream-id by getting the upstream stream-start event stream ID and appending @stream_id to it. If the element has no sinkpad it will generate an upstream stream-id by doing an URI query on the element and in the worst case just uses a random number. Source elements that don't implement the URI handler interface should ideally generate a unique, deterministic stream-id manually instead. Since stream IDs are sorted alphabetically, any numbers in the stream ID should be printed with a fixed number of characters, preceded by 0's, such as by using the format \%03u instead of \%u. A stream-id for @pad. g_free() after usage. A source #GstPad Parent #GstElement of @pad The stream-id Creates a stream-id for the source #GstPad @pad by combining the upstream information with the optional @stream_id of the stream of @pad. @pad must have a parent #GstElement and which must have zero or one sinkpad. @stream_id can only be %NULL if the parent element of @pad has only a single source pad. This function generates an unique stream-id by getting the upstream stream-start event stream ID and appending @stream_id to it. If the element has no sinkpad it will generate an upstream stream-id by doing an URI query on the element and in the worst case just uses a random number. Source elements that don't implement the URI handler interface should ideally generate a unique, deterministic stream-id manually instead. A stream-id for @pad. g_free() after usage. A source #GstPad Parent #GstElement of @pad The stream-id parameters for the @stream_id format string Creates a stream-id for the source #GstPad @pad by combining the upstream information with the optional @stream_id of the stream of @pad. @pad must have a parent #GstElement and which must have zero or one sinkpad. @stream_id can only be %NULL if the parent element of @pad has only a single source pad. This function generates an unique stream-id by getting the upstream stream-start event stream ID and appending @stream_id to it. If the element has no sinkpad it will generate an upstream stream-id by doing an URI query on the element and in the worst case just uses a random number. Source elements that don't implement the URI handler interface should ideally generate a unique, deterministic stream-id manually instead. A stream-id for @pad. g_free() after usage. A source #GstPad Parent #GstElement of @pad The stream-id parameters for the @stream_id format string Invokes the default event handler for the given pad. The EOS event will pause the task associated with @pad before it is forwarded to all internally linked pads, The event is sent to all pads internally linked to @pad. This function takes ownership of @event. %TRUE if the event was sent successfully. a #GstPad to call the default event handler on. the parent of @pad or %NULL the #GstEvent to handle. Calls @forward for all internally linked pads of @pad. This function deals with dynamically changing internal pads and will make sure that the @forward function is only called once for each pad. When @forward returns %TRUE, no further pads will be processed. %TRUE if one of the dispatcher functions returned %TRUE. a #GstPad a #GstPadForwardFunction user data passed to @forward Gets the capabilities of the allowed media types that can flow through @pad and its peer. The allowed capabilities is calculated as the intersection of the results of calling gst_pad_query_caps() on @pad and its peer. The caller owns a reference on the resulting caps. the allowed #GstCaps of the pad link. Unref the caps when you no longer need it. This function returns %NULL when @pad has no peer. MT safe. a #GstPad. Gets the capabilities currently configured on @pad with the last #GST_EVENT_CAPS event. the current caps of the pad with incremented ref-count or %NULL when pad has no caps. Unref after usage. a #GstPad to get the current capabilities of. Gets the direction of the pad. The direction of the pad is decided at construction time so this function does not take the LOCK. the #GstPadDirection of the pad. MT safe. a #GstPad to get the direction of. Gets the private data of a pad. No locking is performed in this function. a #gpointer to the private data. the #GstPad to get the private data of. Gets the #GstFlowReturn return from the last data passed by this pad. the #GstPad Get the offset applied to the running time of @pad. @pad has to be a source pad. the offset. a #GstPad Gets the template for @pad. the #GstPadTemplate from which this pad was instantiated, or %NULL if this pad has no template. Unref after usage. a #GstPad. Gets the capabilities for @pad's template. the #GstCaps of this pad template. Unref after usage. a #GstPad to get the template capabilities from. Gets the parent of @pad, cast to a #GstElement. If a @pad has no parent or its parent is not an element, return %NULL. the parent of the pad. The caller has a reference on the parent, so unref when you're finished with it. MT safe. a pad Gets the peer of @pad. This function refs the peer pad so you need to unref it after use. the peer #GstPad. Unref after usage. MT safe. a #GstPad to get the peer of. When @pad is flushing this function returns #GST_FLOW_FLUSHING immediately and @buffer is %NULL. Calls the getrange function of @pad, see #GstPadGetRangeFunction for a description of a getrange function. If @pad has no getrange function installed (see gst_pad_set_getrange_function()) this function returns #GST_FLOW_NOT_SUPPORTED. If @buffer points to a variable holding %NULL, a valid new #GstBuffer will be placed in @buffer when this function returns #GST_FLOW_OK. The new buffer must be freed with gst_buffer_unref() after usage. When @buffer points to a variable that points to a valid #GstBuffer, the buffer will be filled with the result data when this function returns #GST_FLOW_OK. If the provided buffer is larger than @size, only @size bytes will be filled in the result buffer and its size will be updated accordingly. Note that less than @size bytes can be returned in @buffer when, for example, an EOS condition is near or when @buffer is not large enough to hold @size bytes. The caller should check the result buffer size to get the result size. When this function returns any other result value than #GST_FLOW_OK, @buffer will be unchanged. This is a lowlevel function. Usually gst_pad_pull_range() is used. a #GstFlowReturn from the pad. MT safe. a src #GstPad, returns #GST_FLOW_ERROR if not. The start offset of the buffer The length of the buffer a pointer to hold the #GstBuffer, returns #GST_FLOW_ERROR if %NULL. If there is a single internal link of the given pad, this function will return it. Otherwise, it will return NULL. a #GstPad, or %NULL if @pad has none or more than one internal links. Unref returned pad with gst_object_unref(). the #GstPad to get the internal link of. Returns a new reference of the sticky event of type @event_type from the event. a #GstEvent of type @event_type or %NULL when no event of @event_type was on @pad. Unref after usage. the #GstPad to get the event from. the #GstEventType that should be retrieved. the index of the event Returns the current #GstStream for the @pad, or %NULL if none has been set yet, i.e. the pad has not received a stream-start event yet. This is a convenience wrapper around gst_pad_get_sticky_event() and gst_event_parse_stream(). the current #GstStream for @pad, or %NULL. unref the returned stream when no longer needed. A source #GstPad Returns the current stream-id for the @pad, or %NULL if none has been set yet, i.e. the pad has not received a stream-start event yet. This is a convenience wrapper around gst_pad_get_sticky_event() and gst_event_parse_stream_start(). The returned stream-id string should be treated as an opaque string, its contents should not be interpreted. a newly-allocated copy of the stream-id for @pad, or %NULL. g_free() the returned string when no longer needed. A source #GstPad Get @pad task state. If no task is currently set, #GST_TASK_STOPPED is returned. The current state of @pad's task. the #GstPad to get task state from Check if @pad has caps set on it with a #GST_EVENT_CAPS event. %TRUE when @pad has caps associated with it. a #GstPad to check Query if a pad is active %TRUE if the pad is active. MT safe. the #GstPad to query Checks if the pad is blocked or not. This function returns the last requested state of the pad. It is not certain that the pad is actually blocking at this point (see gst_pad_is_blocking()). %TRUE if the pad is blocked. MT safe. the #GstPad to query Checks if the pad is blocking or not. This is a guaranteed state of whether the pad is actually blocking on a #GstBuffer or a #GstEvent. %TRUE if the pad is blocking. MT safe. the #GstPad to query Checks if a @pad is linked to another pad or not. %TRUE if the pad is linked, %FALSE otherwise. MT safe. pad to check Gets an iterator for the pads to which the given pad is linked to inside of the parent element. Each #GstPad element yielded by the iterator will have its refcount increased, so unref after use. Free-function: gst_iterator_free a new #GstIterator of #GstPad or %NULL when the pad does not have an iterator function configured. Use gst_iterator_free() after usage. the GstPad to get the internal links of. Iterate the list of pads to which the given pad is linked to inside of the parent element. This is the default handler, and thus returns an iterator of all of the pads inside the parent element with opposite direction. The caller must free this iterator after use with gst_iterator_free(). a #GstIterator of #GstPad, or %NULL if @pad has no parent. Unref each returned pad with gst_object_unref(). the #GstPad to get the internal links of. the parent of @pad or %NULL Links the source pad and the sink pad. A result code indicating if the connection worked or what went wrong. MT Safe. the source #GstPad to link. the sink #GstPad to link. Links the source pad and the sink pad. This variant of #gst_pad_link provides a more granular control on the checks being done when linking. While providing some considerable speedups the caller of this method must be aware that wrong usage of those flags can cause severe issues. Refer to the documentation of #GstPadLinkCheck for more information. MT Safe. A result code indicating if the connection worked or what went wrong. the source #GstPad to link. the sink #GstPad to link. the checks to validate when linking Links @src to @sink, creating any #GstGhostPad's in between as necessary. This is a convenience function to save having to create and add intermediate #GstGhostPad's as required for linking across #GstBin boundaries. If @src or @sink pads don't have parent elements or do not share a common ancestor, the link will fail. whether the link succeeded. a #GstPad a #GstPad Links @src to @sink, creating any #GstGhostPad's in between as necessary. This is a convenience function to save having to create and add intermediate #GstGhostPad's as required for linking across #GstBin boundaries. If @src or @sink pads don't have parent elements or do not share a common ancestor, the link will fail. Calling gst_pad_link_maybe_ghosting_full() with @flags == %GST_PAD_LINK_CHECK_DEFAULT is the recommended way of linking pads with safety checks applied. whether the link succeeded. a #GstPad a #GstPad some #GstPadLinkCheck flags Mark a pad for needing reconfiguration. The next call to gst_pad_check_reconfigure() will return %TRUE after this call. the #GstPad to mark Check the #GST_PAD_FLAG_NEED_RECONFIGURE flag on @pad and return %TRUE if the flag was set. %TRUE is the GST_PAD_FLAG_NEED_RECONFIGURE flag is set on @pad. the #GstPad to check Pause the task of @pad. This function will also wait until the function executed by the task is finished if this function is not called from the task function. a %TRUE if the task could be paused or %FALSE when the pad has no task. the #GstPad to pause the task of Performs gst_pad_query() on the peer of @pad. The caller is responsible for both the allocation and deallocation of the query structure. %TRUE if the query could be performed. This function returns %FALSE if @pad has no peer. a #GstPad to invoke the peer query on. the #GstQuery to perform. Check if the peer of @pad accepts @caps. If @pad has no peer, this function returns %TRUE. %TRUE if the peer of @pad can accept the caps or @pad has no peer. a #GstPad to check the peer of a #GstCaps to check on the pad Gets the capabilities of the peer connected to this pad. Similar to gst_pad_query_caps(). When called on srcpads @filter contains the caps that upstream could produce in the order preferred by upstream. When called on sinkpads @filter contains the caps accepted by downstream in the preferred order. @filter might be %NULL but if it is not %NULL the returned caps will be a subset of @filter. the caps of the peer pad with incremented ref-count. When there is no peer pad, this function returns @filter or, when @filter is %NULL, ANY caps. a #GstPad to get the capabilities of. a #GstCaps filter, or %NULL. Queries the peer pad of a given sink pad to convert @src_val in @src_format to @dest_format. %TRUE if the query could be performed. a #GstPad, on whose peer pad to invoke the convert query on. Must be a sink pad. a #GstFormat to convert from. a value to convert. the #GstFormat to convert to. a pointer to the result. Queries the peer pad of a given sink pad for the total stream duration. %TRUE if the query could be performed. a #GstPad on whose peer pad to invoke the duration query on. Must be a sink pad. the #GstFormat requested a location in which to store the total duration, or %NULL. Queries the peer of a given sink pad for the stream position. %TRUE if the query could be performed. a #GstPad on whose peer to invoke the position query on. Must be a sink pad. the #GstFormat requested a location in which to store the current position, or %NULL. Checks if all internally linked pads of @pad accepts the caps in @query and returns the intersection of the results. This function is useful as a default accept caps query function for an element that can handle any stream format, but requires caps that are acceptable for all opposite pads. %TRUE if @query could be executed a #GstPad to proxy. an ACCEPT_CAPS #GstQuery. Calls gst_pad_query_caps() for all internally linked pads of @pad and returns the intersection of the results. This function is useful as a default caps query function for an element that can handle any stream format, but requires all its pads to have the same caps. Two such elements are tee and adder. %TRUE if @query could be executed a #GstPad to proxy. a CAPS #GstQuery. Pulls a @buffer from the peer pad or fills up a provided buffer. This function will first trigger the pad block signal if it was installed. When @pad is not linked #GST_FLOW_NOT_LINKED is returned else this function returns the result of gst_pad_get_range() on the peer pad. See gst_pad_get_range() for a list of return values and for the semantics of the arguments of this function. If @buffer points to a variable holding %NULL, a valid new #GstBuffer will be placed in @buffer when this function returns #GST_FLOW_OK. The new buffer must be freed with gst_buffer_unref() after usage. When this function returns any other result value, @buffer will still point to %NULL. When @buffer points to a variable that points to a valid #GstBuffer, the buffer will be filled with the result data when this function returns #GST_FLOW_OK. When this function returns any other result value, @buffer will be unchanged. If the provided buffer is larger than @size, only @size bytes will be filled in the result buffer and its size will be updated accordingly. Note that less than @size bytes can be returned in @buffer when, for example, an EOS condition is near or when @buffer is not large enough to hold @size bytes. The caller should check the result buffer size to get the result size. a #GstFlowReturn from the peer pad. MT safe. a sink #GstPad, returns GST_FLOW_ERROR if not. The start offset of the buffer The length of the buffer a pointer to hold the #GstBuffer, returns GST_FLOW_ERROR if %NULL. Pushes a buffer to the peer of @pad. This function will call installed block probes before triggering any installed data probes. The function proceeds calling gst_pad_chain() on the peer pad and returns the value from that function. If @pad has no peer, #GST_FLOW_NOT_LINKED will be returned. In all cases, success or failure, the caller loses its reference to @buffer after calling this function. a #GstFlowReturn from the peer pad. MT safe. a source #GstPad, returns #GST_FLOW_ERROR if not. the #GstBuffer to push returns GST_FLOW_ERROR if not. Sends the event to the peer of the given pad. This function is mainly used by elements to send events to their peer elements. This function takes ownership of the provided event so you should gst_event_ref() it if you want to reuse the event after this call. %TRUE if the event was handled. MT safe. a #GstPad to push the event to. the #GstEvent to send to the pad. Pushes a buffer list to the peer of @pad. This function will call installed block probes before triggering any installed data probes. The function proceeds calling the chain function on the peer pad and returns the value from that function. If @pad has no peer, #GST_FLOW_NOT_LINKED will be returned. If the peer pad does not have any installed chainlist function every group buffer of the list will be merged into a normal #GstBuffer and chained via gst_pad_chain(). In all cases, success or failure, the caller loses its reference to @list after calling this function. a #GstFlowReturn from the peer pad. MT safe. a source #GstPad, returns #GST_FLOW_ERROR if not. the #GstBufferList to push returns GST_FLOW_ERROR if not. Dispatches a query to a pad. The query should have been allocated by the caller via one of the type-specific allocation functions. The element that the pad belongs to is responsible for filling the query with an appropriate response, which should then be parsed with a type-specific query parsing function. Again, the caller is responsible for both the allocation and deallocation of the query structure. Please also note that some queries might need a running pipeline to work. %TRUE if the query could be performed. a #GstPad to invoke the default query on. the #GstQuery to perform. Check if the given pad accepts the caps. %TRUE if the pad can accept the caps. a #GstPad to check a #GstCaps to check on the pad Gets the capabilities this pad can produce or consume. Note that this method doesn't necessarily return the caps set by sending a gst_event_new_caps() - use gst_pad_get_current_caps() for that instead. gst_pad_query_caps returns all possible caps a pad can operate with, using the pad's CAPS query function, If the query fails, this function will return @filter, if not %NULL, otherwise ANY. When called on sinkpads @filter contains the caps that upstream could produce in the order preferred by upstream. When called on srcpads @filter contains the caps accepted by downstream in the preferred order. @filter might be %NULL but if it is not %NULL the returned caps will be a subset of @filter. Note that this function does not return writable #GstCaps, use gst_caps_make_writable() before modifying the caps. the caps of the pad with incremented ref-count. a #GstPad to get the capabilities of. suggested #GstCaps, or %NULL Queries a pad to convert @src_val in @src_format to @dest_format. %TRUE if the query could be performed. a #GstPad to invoke the convert query on. a #GstFormat to convert from. a value to convert. the #GstFormat to convert to. a pointer to the result. Invokes the default query handler for the given pad. The query is sent to all pads internally linked to @pad. Note that if there are many possible sink pads that are internally linked to @pad, only one will be sent the query. Multi-sinkpad elements should implement custom query handlers. %TRUE if the query was performed successfully. a #GstPad to call the default query handler on. the parent of @pad or %NULL the #GstQuery to handle. Queries a pad for the total stream duration. %TRUE if the query could be performed. a #GstPad to invoke the duration query on. the #GstFormat requested a location in which to store the total duration, or %NULL. Queries a pad for the stream position. %TRUE if the query could be performed. a #GstPad to invoke the position query on. the #GstFormat requested A location in which to store the current position, or %NULL. Remove the probe with @id from @pad. MT safe. the #GstPad with the probe the probe id to remove Sends the event to the pad. This function can be used by applications to send events in the pipeline. If @pad is a source pad, @event should be an upstream event. If @pad is a sink pad, @event should be a downstream event. For example, you would not send a #GST_EVENT_EOS on a src pad; EOS events only propagate downstream. Furthermore, some downstream events have to be serialized with data flow, like EOS, while some can travel out-of-band, like #GST_EVENT_FLUSH_START. If the event needs to be serialized with data flow, this function will take the pad's stream lock while calling its event function. To find out whether an event type is upstream, downstream, or downstream and serialized, see #GstEventTypeFlags, gst_event_type_get_flags(), #GST_EVENT_IS_UPSTREAM, #GST_EVENT_IS_DOWNSTREAM, and #GST_EVENT_IS_SERIALIZED. Note that in practice that an application or plugin doesn't need to bother itself with this information; the core handles all necessary locks and checks. This function takes ownership of the provided event so you should gst_event_ref() it if you want to reuse the event after this call. %TRUE if the event was handled. a #GstPad to send the event to. the #GstEvent to send to the pad. Sets the given activate function for @pad. The activate function will dispatch to gst_pad_activate_mode() to perform the actual activation. Only makes sense to set on sink pads. Call this function if your sink pad can start a pull-based task. a #GstPad. the #GstPadActivateFunction to set. user_data passed to @notify notify called when @activate will not be used anymore. Sets the given activate_mode function for the pad. An activate_mode function prepares the element for data passing. a #GstPad. the #GstPadActivateModeFunction to set. user_data passed to @notify notify called when @activatemode will not be used anymore. Activates or deactivates the given pad. Normally called from within core state change functions. If @active, makes sure the pad is active. If it is already active, either in push or pull mode, just return. Otherwise dispatches to the pad's activate function to perform the actual activation. If not @active, calls gst_pad_activate_mode() with the pad's current mode and a %FALSE argument. %TRUE if the operation was successful. MT safe. the #GstPad to activate or deactivate. whether or not the pad should be active. Sets the given chain function for the pad. The chain function is called to process a #GstBuffer input buffer. see #GstPadChainFunction for more details. a sink #GstPad. the #GstPadChainFunction to set. user_data passed to @notify notify called when @chain will not be used anymore. Sets the given chain list function for the pad. The chainlist function is called to process a #GstBufferList input buffer list. See #GstPadChainListFunction for more details. a sink #GstPad. the #GstPadChainListFunction to set. user_data passed to @notify notify called when @chainlist will not be used anymore. Set the given private data gpointer on the pad. This function can only be used by the element that owns the pad. No locking is performed in this function. the #GstPad to set the private data of. The private data to attach to the pad. Sets the given event handler for the pad. a #GstPad of either direction. the #GstPadEventFullFunction to set. user_data passed to @notify notify called when @event will not be used anymore. Sets the given event handler for the pad. a #GstPad of either direction. the #GstPadEventFunction to set. user_data passed to @notify notify called when @event will not be used anymore. Sets the given getrange function for the pad. The getrange function is called to produce a new #GstBuffer to start the processing pipeline. see #GstPadGetRangeFunction for a description of the getrange function. a source #GstPad. the #GstPadGetRangeFunction to set. user_data passed to @notify notify called when @get will not be used anymore. Sets the given internal link iterator function for the pad. a #GstPad of either direction. the #GstPadIterIntLinkFunction to set. user_data passed to @notify notify called when @iterintlink will not be used anymore. Sets the given link function for the pad. It will be called when the pad is linked with another pad. The return value #GST_PAD_LINK_OK should be used when the connection can be made. The return value #GST_PAD_LINK_REFUSED should be used when the connection cannot be made for some reason. If @link is installed on a source pad, it should call the #GstPadLinkFunction of the peer sink pad, if present. a #GstPad. the #GstPadLinkFunction to set. user_data passed to @notify notify called when @link will not be used anymore. Set the offset that will be applied to the running time of @pad. Upon next buffer, every sticky events (notably segment) will be pushed again with their running time adjusted. For that reason this is only reliable on source pads. a #GstPad the offset Set the given query function for the pad. a #GstPad of either direction. the #GstPadQueryFunction to set. user_data passed to @notify notify called when @query will not be used anymore. Sets the given unlink function for the pad. It will be called when the pad is unlinked. Note that the pad's lock is already held when the unlink function is called, so most pad functions cannot be called from within the callback. a #GstPad. the #GstPadUnlinkFunction to set. user_data passed to @notify notify called when @unlink will not be used anymore. Starts a task that repeatedly calls @func with @user_data. This function is mostly used in pad activation functions to start the dataflow. The #GST_PAD_STREAM_LOCK of @pad will automatically be acquired before @func is called. a %TRUE if the task could be started. the #GstPad to start the task of the task function to call user data passed to the task function called when @user_data is no longer referenced Iterates all sticky events on @pad and calls @foreach_func for every event. If @foreach_func returns %FALSE the iteration is immediately stopped. the #GstPad that should be used for iteration. the #GstPadStickyEventsForeachFunction that should be called for every event. the optional user data. Stop the task of @pad. This function will also make sure that the function executed by the task will effectively stop if not called from the GstTaskFunction. This function will deadlock if called from the GstTaskFunction of the task. Use gst_task_pause() instead. Regardless of whether the pad has a task, the stream lock is acquired and released so as to ensure that streaming through this pad has finished. a %TRUE if the task could be stopped or %FALSE on error. the #GstPad to stop the task of Store the sticky @event on @pad #GST_FLOW_OK on success, #GST_FLOW_FLUSHING when the pad was flushing or #GST_FLOW_EOS when the pad was EOS. a #GstPad a #GstEvent Unlinks the source pad from the sink pad. Will emit the #GstPad::unlinked signal on both pads. %TRUE if the pads were unlinked. This function returns %FALSE if the pads were not linked together. MT safe. the source #GstPad to unlink. the sink #GstPad to unlink. A helper function you can use that sets the FIXED_CAPS flag This way the default CAPS query will always return the negotiated caps or in case the pad is not negotiated, the padtemplate caps. The negotiated caps are the caps of the last CAPS event that passed on the pad. Use this function on a pad that, once it negotiated to a CAPS, cannot be renegotiated to something else. the pad to use The offset that will be applied to the running time of the pad. private data owned by the parent element padtemplate for this pad the direction of the pad, cannot change after creating the pad. Signals that a pad has been linked to the peer pad. the peer pad that has been connected Signals that a pad has been unlinked from the peer pad. the peer pad that has been disconnected This function is called when the pad is activated during the element READY to PAUSED state change. By default this function will call the activate function that puts the pad in push mode but elements can override this function to activate the pad in pull mode if they wish. %TRUE if the pad could be activated. a #GstPad the parent of @pad The prototype of the push and pull activate functions. %TRUE if the pad could be activated or deactivated. a #GstPad the parent of @pad the requested activation mode of @pad activate or deactivate the pad. A function that will be called on sinkpads when chaining buffers. The function typically processes the data contained in the buffer and either consumes the data or passes it on to the internally linked pad(s). The implementer of this function receives a refcount to @buffer and should gst_buffer_unref() when the buffer is no longer needed. When a chain function detects an error in the data stream, it must post an error on the bus and return an appropriate #GstFlowReturn value. #GST_FLOW_OK for success the sink #GstPad that performed the chain. the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set, @parent is guaranteed to be not-%NULL and remain valid during the execution of this function. the #GstBuffer that is chained, not %NULL. A function that will be called on sinkpads when chaining buffer lists. The function typically processes the data contained in the buffer list and either consumes the data or passes it on to the internally linked pad(s). The implementer of this function receives a refcount to @list and should gst_buffer_list_unref() when the list is no longer needed. When a chainlist function detects an error in the data stream, it must post an error on the bus and return an appropriate #GstFlowReturn value. #GST_FLOW_OK for success the sink #GstPad that performed the chain. the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set, @parent is guaranteed to be not-%NULL and remain valid during the execution of this function. the #GstBufferList that is chained, not %NULL. The direction of a pad. direction is unknown. the pad is a source pad. the pad is a sink pad. Function signature to handle an event for the pad. This variant is for specific elements that will take into account the last downstream flow return (from a pad push), in which case they can return it. %GST_FLOW_OK if the event was handled properly, or any other #GstFlowReturn dependent on downstream state. the #GstPad to handle the event. the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set, @parent is guaranteed to be not-%NULL and remain valid during the execution of this function. the #GstEvent to handle. Function signature to handle an event for the pad. %TRUE if the pad could handle the event. the #GstPad to handle the event. the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set, @parent is guaranteed to be not-%NULL and remain valid during the execution of this function. the #GstEvent to handle. Pad state flags is dataflow on a pad blocked is pad flushing is pad in EOS state is pad currently blocking on a buffer or event ensure that there is a parent object before calling into the pad callbacks. the pad should be reconfigured/renegotiated. The flag has to be unset manually after reconfiguration happened. the pad has pending events the pad is using fixed caps. This means that once the caps are set on the pad, the default caps query function will only return those caps. the default event and query handler will forward all events and queries to the internally linked pads instead of discarding them. the default query handler will forward allocation queries to the internally linked pads instead of discarding them. the default query handler will forward scheduling queries to the internally linked pads instead of discarding them. the default accept-caps handler will check it the caps intersect the query-caps result instead of checking for a subset. This is interesting for parsers that can accept incompletely specified caps. the default accept-caps handler will use the template pad caps instead of query caps to compare with the accept caps. Use this in combination with %GST_PAD_FLAG_ACCEPT_INTERSECT. (Since: 1.6) offset to define more flags A forward function is called for all internally linked pads, see gst_pad_forward(). %TRUE if the dispatching procedure has to be stopped. the #GstPad that is forwarded. the gpointer to optional user data. This function will be called on source pads when a peer element request a buffer at the specified @offset and @length. If this function returns #GST_FLOW_OK, the result buffer will be stored in @buffer. The contents of @buffer is invalid for any other return value. This function is installed on a source pad with gst_pad_set_getrange_function() and can only be called on source pads after they are successfully activated with gst_pad_activate_mode() with the #GST_PAD_MODE_PULL. @offset and @length are always given in byte units. @offset must normally be a value between 0 and the length in bytes of the data available on @pad. The length (duration in bytes) can be retrieved with a #GST_QUERY_DURATION or with a #GST_QUERY_SEEKING. Any @offset larger or equal than the length will make the function return #GST_FLOW_EOS, which corresponds to EOS. In this case @buffer does not contain a valid buffer. The buffer size of @buffer will only be smaller than @length when @offset is near the end of the stream. In all other cases, the size of @buffer must be exactly the requested size. It is allowed to call this function with a 0 @length and valid @offset, in which case @buffer will contain a 0-sized buffer and the function returns #GST_FLOW_OK. When this function is called with a -1 @offset, the sequentially next buffer of length @length in the stream is returned. When this function is called with a -1 @length, a buffer with a default optimal length is returned in @buffer. The length might depend on the value of @offset. #GST_FLOW_OK for success and a valid buffer in @buffer. Any other return value leaves @buffer undefined. the src #GstPad to perform the getrange on. the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set, @parent is guaranteed to be not-%NULL and remain valid during the execution of this function. the offset of the range the length of the range a memory location to hold the result buffer, cannot be %NULL. The signature of the internal pad link iterator function. a new #GstIterator that will iterate over all pads that are linked to the given pad on the inside of the parent element. the caller must call gst_iterator_free() after usage. The #GstPad to query. the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set, @parent is guaranteed to be not-%NULL and remain valid during the execution of this function. The amount of checking to be done when linking pads. @GST_PAD_LINK_CHECK_CAPS and @GST_PAD_LINK_CHECK_TEMPLATE_CAPS are mutually exclusive. If both are specified, expensive but safe @GST_PAD_LINK_CHECK_CAPS are performed. > Only disable some of the checks if you are 100% certain you know the link > will not fail because of hierarchy/caps compatibility failures. If uncertain, > use the default checks (%GST_PAD_LINK_CHECK_DEFAULT) or the regular methods > for linking the pads. Don't check hierarchy or caps compatibility. Check the pads have same parents/grandparents. Could be omitted if it is already known that the two elements that own the pads are in the same bin. Check if the pads are compatible by using their template caps. This is much faster than @GST_PAD_LINK_CHECK_CAPS, but would be unsafe e.g. if one pad has %GST_CAPS_ANY. Check if the pads are compatible by comparing the caps returned by gst_pad_query_caps(). Disables pushing a reconfigure event when pads are linked. The default checks done when linking pads (i.e. the ones used by gst_pad_link()). Function signature to handle a new link on the pad. the result of the link with the specified peer. the #GstPad that is linked. the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set, @parent is guaranteed to be not-%NULL and remain valid during the execution of this function. the peer #GstPad of the link Result values from gst_pad_link and friends. link succeeded pads have no common grandparent pad was already linked pads have wrong direction pads do not have common format pads cannot cooperate in scheduling refused for some reason The status of a GstPad. After activating a pad, which usually happens when the parent element goes from READY to PAUSED, the GstPadMode defines if the pad operates in push or pull mode. Pad will not handle dataflow Pad handles dataflow in downstream push mode Pad handles dataflow in upstream pull mode Return the name of a pad mode, for use in debug messages mostly. short mnemonic for pad mode @mode the pad mode Indicates when this pad will become available. the pad is always available the pad will become available depending on the media stream the pad is only available on request with gst_element_request_pad(). Callback used by gst_pad_add_probe(). Gets called to notify about the current blocking type. The callback is allowed to modify the data pointer in @info. a #GstPadProbeReturn the #GstPad that is blocked #GstPadProbeInfo the gpointer to optional user data. Info passed in the #GstPadProbeCallback. the current probe type the id of the probe type specific data, check the @type field to know the datatype. This field can be %NULL. offset of pull probe, this field is valid when @type contains #GST_PAD_PROBE_TYPE_PULL size of pull probe, this field is valid when @type contains #GST_PAD_PROBE_TYPE_PULL The #GstBuffer from the probe a #GstPadProbeInfo The #GstBufferList from the probe a #GstPadProbeInfo The #GstEvent from the probe a #GstPadProbeInfo The #GstQuery from the probe a #GstPadProbeInfo Different return values for the #GstPadProbeCallback. drop data in data probes. For push mode this means that the data item is not sent downstream. For pull mode, it means that the data item is not passed upstream. In both cases, no other probes are called for this item and %GST_FLOW_OK or %TRUE is returned to the caller. normal probe return value. This leaves the probe in place, and defers decisions about dropping or passing data to other probes, if any. If there are no other probes, the default behaviour for the probe type applies ('block' for blocking probes, and 'pass' for non-blocking probes). remove this probe, passing the data. For blocking probes this will cause data flow to unblock, unless there are also other blocking probes installed. pass the data item in the block probe and block on the next item. Note, that if there are multiple pad probes installed and any probe returns PASS, the data will be passed. Data has been handled in the probe and will not be forwarded further. For events and buffers this is the same behaviour as %GST_PAD_PROBE_DROP (except that in this case you need to unref the buffer or event yourself). For queries it will also return %TRUE to the caller. The probe can also modify the #GstFlowReturn value by using the #GST_PAD_PROBE_INFO_FLOW_RETURN() accessor. Note that the resulting query must contain valid entries. Since: 1.6 The different probing types that can occur. When either one of @GST_PAD_PROBE_TYPE_IDLE or @GST_PAD_PROBE_TYPE_BLOCK is used, the probe will be a blocking probe. invalid probe type probe idle pads and block while the callback is called probe and block pads probe buffers probe buffer lists probe downstream events probe upstream events probe flush events. This probe has to be explicitly enabled and is not included in the @@GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM or @@GST_PAD_PROBE_TYPE_EVENT_UPSTREAM probe types. probe downstream queries probe upstream queries probe push probe pull probe and block at the next opportunity, at data flow or when idle probe downstream data (buffers, buffer lists, and events) probe upstream data (events) probe upstream and downstream data (buffers, buffer lists, and events) probe and block downstream data (buffers, buffer lists, and events) probe and block upstream data (events) probe upstream and downstream events probe upstream and downstream queries probe upstream events and queries and downstream buffers, buffer lists, events and queries probe push and pull The signature of the query function. %TRUE if the query could be performed. the #GstPad to query. the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set, @parent is guaranteed to be not-%NULL and remain valid during the execution of this function. the #GstQuery object to execute Callback used by gst_pad_sticky_events_foreach(). When this function returns %TRUE, the next event will be returned. When %FALSE is returned, gst_pad_sticky_events_foreach() will return. When @event is set to %NULL, the item will be removed from the list of sticky events. @event can be replaced by assigning a new reference to it. This function is responsible for unreffing the old event when removing or modifying. %TRUE if the iteration should continue the #GstPad. a sticky #GstEvent. the #gpointer to optional user data. Padtemplates describe the possible media types a pad or an elementfactory can handle. This allows for both inspection of handled types before loading the element plugin as well as identifying pads on elements that are not yet created (request or sometimes pads). Pad and PadTemplates have #GstCaps attached to it to describe the media type they are capable of dealing with. gst_pad_template_get_caps() or GST_PAD_TEMPLATE_CAPS() are used to get the caps of a padtemplate. It's not possible to modify the caps of a padtemplate after creation. PadTemplates have a #GstPadPresence property which identifies the lifetime of the pad and that can be retrieved with GST_PAD_TEMPLATE_PRESENCE(). Also the direction of the pad can be retrieved from the #GstPadTemplate with GST_PAD_TEMPLATE_DIRECTION(). The GST_PAD_TEMPLATE_NAME_TEMPLATE () is important for GST_PAD_REQUEST pads because it has to be used as the name in the gst_element_request_pad_simple() call to instantiate a pad from this template. Padtemplates can be created with gst_pad_template_new() or with gst_static_pad_template_get (), which creates a #GstPadTemplate from a #GstStaticPadTemplate that can be filled with the convenient GST_STATIC_PAD_TEMPLATE() macro. A padtemplate can be used to create a pad (see gst_pad_new_from_template() or gst_pad_new_from_static_template ()) or to add to an element class (see gst_element_class_add_static_pad_template ()). The following code example shows the code to create a pad from a padtemplate. |[<!-- language="C" --> GstStaticPadTemplate my_template = GST_STATIC_PAD_TEMPLATE ( "sink", // the name of the pad GST_PAD_SINK, // the direction of the pad GST_PAD_ALWAYS, // when this pad will be present GST_STATIC_CAPS ( // the capabilities of the padtemplate "audio/x-raw, " "channels = (int) [ 1, 6 ]" ) ); void my_method (void) { GstPad *pad; pad = gst_pad_new_from_static_template (&my_template, "sink"); ... } ]| The following example shows you how to add the padtemplate to an element class, this is usually done in the class_init of the class: |[<!-- language="C" --> static void my_element_class_init (GstMyElementClass *klass) { GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); gst_element_class_add_static_pad_template (gstelement_class, &my_template); } ]| Creates a new pad template with a name according to the given template and with the given arguments. a new #GstPadTemplate. the name template. the #GstPadDirection of the template. the #GstPadPresence of the pad. a #GstCaps set for the template. Converts a #GstStaticPadTemplate into a #GstPadTemplate with a type. a new #GstPadTemplate. the static pad template The #GType of the pad to create Creates a new pad template with a name according to the given template and with the given arguments. a new #GstPadTemplate. the name template. the #GstPadDirection of the template. the #GstPadPresence of the pad. a #GstCaps set for the template. The #GType of the pad to create Emit the pad-created signal for this template when created by this pad. a #GstPadTemplate that has been created the #GstPad that created it Gets the capabilities of the pad template. the #GstCaps of the pad template. Unref after usage. a #GstPadTemplate to get capabilities of. See gst_pad_template_set_documentation_caps(). The caps to document. For convenience, this will return gst_pad_template_get_caps() when no documentation caps were set. the pad template to get documented capabilities on Emit the pad-created signal for this template when created by this pad. a #GstPadTemplate that has been created the #GstPad that created it Certain elements will dynamically construct the caps of their pad templates. In order not to let environment-specific information into the documentation, element authors should use this method to expose "stable" caps to the reader. the pad template to set documented capabilities on the documented capabilities The capabilities of the pad described by the pad template. The direction of the pad described by the pad template. The type of the pad described by the pad template. The name template of the pad template. When the pad described by the pad template will become available. This signal is fired when an element creates a pad from this template. the pad that was created. a #GstPadTemplate that has been created the #GstPad that created it Flags for the padtemplate first flag that can be used by subclasses. Function signature to handle a unlinking the pad prom its peer. The pad's lock is already held when the unlink function is called, so most pad functions cannot be called from within the callback. the #GstPad that is linked. the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT flag is set, @parent is guaranteed to be not-%NULL and remain valid during the execution of this function. A fundamental type that describes a #GParamSpec for arrays of values A fundamental type that describes a #GParamSpec for fractional properties A GParamSpec derived structure for arrays of values. super class the #GParamSpec of the type of values in the array A GParamSpec derived structure that contains the meta data for fractional properties. super class minimal numerator minimal denominator maximal numerator maximal denominator default numerator default denominator The #GstParentBufferMeta is a #GstMeta which can be attached to a #GstBuffer to hold a reference to another buffer that is only released when the child #GstBuffer is released. Typically, #GstParentBufferMeta is used when the child buffer is directly using the #GstMemory of the parent buffer, and wants to prevent the parent buffer from being returned to a buffer pool until the #GstMemory is available for re-use. the parent #GstMeta structure the #GstBuffer on which a reference is being held. Gets the global #GstMetaInfo describing the #GstParentBufferMeta meta. The #GstMetaInfo Opaque structure. Allocates a parse context for use with gst_parse_launch_full() or gst_parse_launchv_full(). Free-function: gst_parse_context_free a newly-allocated parse context. Free with gst_parse_context_free() when no longer needed. Copies the @context. A copied #GstParseContext a #GstParseContext Frees a parse context previously allocated with gst_parse_context_new(). a #GstParseContext Retrieve missing elements from a previous run of gst_parse_launch_full() or gst_parse_launchv_full(). Will only return results if an error code of %GST_PARSE_ERROR_NO_SUCH_ELEMENT was returned. a %NULL-terminated array of element factory name strings of missing elements. Free with g_strfreev() when no longer needed. a #GstParseContext The different parsing errors that can occur. A syntax error occurred. The description contained an unknown element An element did not have a specified property There was an error linking two pads. There was an error setting a property An empty bin was specified. An empty description was specified A delayed link did not get resolved. Get the error quark used by the parsing subsystem. the quark of the parse errors. Parsing options. Do not use any special parsing options. Always return %NULL when an error occurs (default behaviour is to return partially constructed bins or elements in some cases) If a bin only has a single element, just return the element. If more than one toplevel element is described by the pipeline description string, put them in a #GstBin instead of a #GstPipeline. (Since: 1.10) A #GstPipeline is a special #GstBin used as the toplevel container for the filter graph. The #GstPipeline will manage the selection and distribution of a global #GstClock as well as provide a #GstBus to the application. gst_pipeline_new() is used to create a pipeline. when you are done with the pipeline, use gst_object_unref() to free its resources including all added #GstElement objects (if not otherwise referenced). Elements are added and removed from the pipeline using the #GstBin methods like gst_bin_add() and gst_bin_remove() (see #GstBin). Before changing the state of the #GstPipeline (see #GstElement) a #GstBus should be retrieved with gst_pipeline_get_bus(). This #GstBus should then be used to receive #GstMessage from the elements in the pipeline. Listening to the #GstBus is necessary for retrieving error messages from the #GstPipeline and otherwise the #GstPipeline might stop without any indication, why. Furthermore, the #GstPipeline posts messages even if nobody listens on the #GstBus, which will pile up and use up memory. By default, a #GstPipeline will automatically flush the pending #GstBus messages when going to the NULL state to ensure that no circular references exist when no messages are read from the #GstBus. This behaviour can be changed with gst_pipeline_set_auto_flush_bus(). When the #GstPipeline performs the PAUSED to PLAYING state change it will select a clock for the elements. The clock selection algorithm will by default select a clock provided by an element that is most upstream (closest to the source). For live pipelines (ones that return #GST_STATE_CHANGE_NO_PREROLL from the gst_element_set_state() call) this will select the clock provided by the live source. For normal pipelines this will select a clock provided by the sinks (most likely the audio sink). If no element provides a clock, a default #GstSystemClock is used. The clock selection can be controlled with the gst_pipeline_use_clock() method, which will enforce a given clock on the pipeline. With gst_pipeline_auto_clock() the default clock selection algorithm can be restored. A #GstPipeline maintains a running time for the elements. The running time is defined as the difference between the current clock time and the base time. When the pipeline goes to READY or a flushing seek is performed on it, the running time is reset to 0. When the pipeline is set from PLAYING to PAUSED, the current clock time is sampled and used to configure the base time for the elements when the pipeline is set to PLAYING again. The effect is that the running time (as the difference between the clock time and the base time) will count how much time was spent in the PLAYING state. This default behaviour can be changed with the gst_element_set_start_time() method. Create a new pipeline with the given name. newly created GstPipeline MT safe. name of new pipeline Let @pipeline select a clock automatically. This is the default behaviour. Use this function if you previous forced a fixed clock with gst_pipeline_use_clock() and want to restore the default pipeline clock selection algorithm. MT safe. a #GstPipeline Check if @pipeline will automatically flush messages when going to the NULL state. whether the pipeline will automatically flush its bus when going from READY to NULL state or not. MT safe. a #GstPipeline Gets the #GstBus of @pipeline. The bus allows applications to receive #GstMessage packets. a #GstBus, unref after usage. MT safe. a #GstPipeline Gets the current clock used by @pipeline. Users of object oriented languages should use gst_pipeline_get_pipeline_clock() to avoid confusion with gst_element_get_clock() which has a different behavior. Unlike gst_element_get_clock(), this function will always return a clock, even if the pipeline is not in the PLAYING state. a #GstClock, unref after usage. a #GstPipeline Return the configured latency on @pipeline. @pipeline configured latency, or %GST_CLOCK_TIME_NONE if none has been configured because @pipeline did not reach the PLAYING state yet. MT safe. a #GstPipeline Get the configured delay (see gst_pipeline_set_delay()). The configured delay. MT safe. a #GstPipeline Gets the latency that should be configured on the pipeline. See gst_pipeline_set_latency(). Latency to configure on the pipeline or GST_CLOCK_TIME_NONE a #GstPipeline Gets the current clock used by @pipeline. Unlike gst_element_get_clock(), this function will always return a clock, even if the pipeline is not in the PLAYING state. a #GstClock, unref after usage. a #GstPipeline Check if @pipeline is live. %TRUE if @pipeline is live, %FALSE if not or if it did not reach the PAUSED state yet. MT safe. a #GstPipeline Usually, when a pipeline goes from READY to NULL state, it automatically flushes all pending messages on the bus, which is done for refcounting purposes, to break circular references. This means that applications that update state using (async) bus messages (e.g. do certain things when a pipeline goes from PAUSED to READY) might not get to see messages when the pipeline is shut down, because they might be flushed before they can be dispatched in the main thread. This behaviour can be disabled using this function. It is important that all messages on the bus are handled when the automatic flushing is disabled else memory leaks will be introduced. MT safe. a #GstPipeline whether or not to automatically flush the bus when the pipeline goes from READY to NULL state Set the clock for @pipeline. The clock will be distributed to all the elements managed by the pipeline. %TRUE if the clock could be set on the pipeline. %FALSE if some element did not accept the clock. MT safe. a #GstPipeline the clock to set Set the expected delay needed for all elements to perform the PAUSED to PLAYING state change. @delay will be added to the base time of the elements so that they wait an additional @delay amount of time before starting to process buffers and cannot be #GST_CLOCK_TIME_NONE. This option is used for tuning purposes and should normally not be used. MT safe. a #GstPipeline the delay Sets the latency that should be configured on the pipeline. Setting GST_CLOCK_TIME_NONE will restore the default behaviour of using the minimum latency from the LATENCY query. Setting this is usually not required and the pipeline will figure out an appropriate latency automatically. Setting a too low latency, especially lower than the minimum latency from the LATENCY query, will most likely cause the pipeline to fail. a #GstPipeline latency to configure Force @pipeline to use the given @clock. The pipeline will always use the given clock even if new clock providers are added to this pipeline. If @clock is %NULL all clocking will be disabled which will make the pipeline run as fast as possible. MT safe. a #GstPipeline the clock to use Whether or not to automatically flush all messages on the pipeline's bus when going from READY to NULL state. Please see gst_pipeline_set_auto_flush_bus() for more information on this option. The expected delay needed for elements to spin up to the PLAYING state expressed in nanoseconds. see gst_pipeline_set_delay() for more information on this option. Latency to configure on the pipeline. See gst_pipeline_set_latency(). The fixed clock of the pipeline, used when GST_PIPELINE_FLAG_FIXED_CLOCK is set. The stream time of the pipeline. A better name for this property would be the running_time, the total time spent in the PLAYING state without being flushed. (deprecated, use the start_time on GstElement). Extra delay added to base_time to compensate for computing delays when setting elements to PLAYING. Pipeline flags this pipeline works with a fixed clock offset to define more flags GStreamer is extensible, so #GstElement instances can be loaded at runtime. A plugin system can provide one or more of the basic GStreamer #GstPluginFeature subclasses. A plugin should export a symbol `gst_plugin_desc` that is a struct of type #GstPluginDesc. the plugin loader will check the version of the core library the plugin was linked against and will create a new #GstPlugin. It will then call the #GstPluginInitFunc function that was provided in the `gst_plugin_desc`. Once you have a handle to a #GstPlugin (e.g. from the #GstRegistry), you can add any object that subclasses #GstPluginFeature. Usually plugins are always automatically loaded so you don't need to call gst_plugin_load() explicitly to bring it into memory. There are options to statically link plugins to an app or even use GStreamer without a plugin repository in which case gst_plugin_load() can be needed to bring the plugin into memory. Unrefs each member of @list, then frees the list. list of #GstPlugin Load the named plugin. Refs the plugin. a reference to a loaded plugin, or %NULL on error. name of plugin to load Loads the given plugin and refs it. Caller needs to unref after use. a reference to the existing loaded GstPlugin, a reference to the newly-loaded GstPlugin, or %NULL if an error occurred. the plugin filename to load Registers a static plugin, ie. a plugin which is private to an application or library and contained within the application or library (as opposed to being shipped as a separate module file). You must make sure that GStreamer has been initialised (with gst_init() or via gst_init_get_option_group()) before calling this function. %TRUE if the plugin was registered correctly, otherwise %FALSE. the major version number of the GStreamer core that the plugin was compiled for, you can just use GST_VERSION_MAJOR here the minor version number of the GStreamer core that the plugin was compiled for, you can just use GST_VERSION_MINOR here a unique name of the plugin (ideally prefixed with an application- or library-specific namespace prefix in order to avoid name conflicts in case a similar plugin with the same name ever gets added to GStreamer) description of the plugin pointer to the init function of this plugin. version string of the plugin effective license of plugin. Must be one of the approved licenses (see #GstPluginDesc above) or the plugin will not be registered. source module plugin belongs to shipped package plugin belongs to URL to provider of plugin Registers a static plugin, ie. a plugin which is private to an application or library and contained within the application or library (as opposed to being shipped as a separate module file) with a #GstPluginInitFullFunc which allows user data to be passed to the callback function (useful for bindings). You must make sure that GStreamer has been initialised (with gst_init() or via gst_init_get_option_group()) before calling this function. %TRUE if the plugin was registered correctly, otherwise %FALSE. the major version number of the GStreamer core that the plugin was compiled for, you can just use GST_VERSION_MAJOR here the minor version number of the GStreamer core that the plugin was compiled for, you can just use GST_VERSION_MINOR here a unique name of the plugin (ideally prefixed with an application- or library-specific namespace prefix in order to avoid name conflicts in case a similar plugin with the same name ever gets added to GStreamer) description of the plugin pointer to the init function with user data of this plugin. version string of the plugin effective license of plugin. Must be one of the approved licenses (see #GstPluginDesc above) or the plugin will not be registered. source module plugin belongs to shipped package plugin belongs to URL to provider of plugin gpointer to user data Make GStreamer aware of external dependencies which affect the feature set of this plugin (ie. the elements or typefinders associated with it). GStreamer will re-inspect plugins with external dependencies whenever any of the external dependencies change. This is useful for plugins which wrap other plugin systems, e.g. a plugin which wraps a plugin-based visualisation library and makes visualisations available as GStreamer elements, or a codec loader which exposes elements and/or caps dependent on what external codec libraries are currently installed. a #GstPlugin %NULL-terminated array of environment variables affecting the feature set of the plugin (e.g. an environment variable containing paths where to look for additional modules/plugins of a library), or %NULL. Environment variable names may be followed by a path component which will be added to the content of the environment variable, e.g. "HOME/.mystuff/plugins". %NULL-terminated array of directories/paths where dependent files may be, or %NULL. %NULL-terminated array of file names (or file name suffixes, depending on @flags) to be used in combination with the paths from @paths and/or the paths extracted from the environment variables in @env_vars, or %NULL. optional flags, or #GST_PLUGIN_DEPENDENCY_FLAG_NONE Make GStreamer aware of external dependencies which affect the feature set of this plugin (ie. the elements or typefinders associated with it). GStreamer will re-inspect plugins with external dependencies whenever any of the external dependencies change. This is useful for plugins which wrap other plugin systems, e.g. a plugin which wraps a plugin-based visualisation library and makes visualisations available as GStreamer elements, or a codec loader which exposes elements and/or caps dependent on what external codec libraries are currently installed. Convenience wrapper function for gst_plugin_add_dependency() which takes simple strings as arguments instead of string arrays, with multiple arguments separated by predefined delimiters (see above). the #GstPlugin one or more environment variables (separated by ':', ';' or ','), or %NULL. Environment variable names may be followed by a path component which will be added to the content of the environment variable, e.g. "HOME/.mystuff/plugins:MYSTUFF_PLUGINS_PATH" one ore more directory paths (separated by ':' or ';' or ','), or %NULL. Example: "/usr/lib/mystuff/plugins" one or more file names or file name suffixes (separated by commas), or %NULL optional flags, or #GST_PLUGIN_DEPENDENCY_FLAG_NONE a #GstPlugin the status error message a #GstPlugin the status info message a #GstPlugin the status warning message Gets the plugin specific data cache. If it is %NULL there is no cached data stored. This is the case when the registry is getting rebuilt. The cached data as a #GstStructure or %NULL. a plugin Get the long descriptive name of the plugin the long name of the plugin plugin to get long name of get the filename of the plugin the filename of the plugin plugin to get the filename of get the license of the plugin the license of the plugin plugin to get the license of Get the short name of the plugin the name of the plugin plugin to get the name of get the URL where the plugin comes from the origin of the plugin plugin to get the origin of get the package the plugin belongs to. the package of the plugin plugin to get the package of Get the release date (and possibly time) in form of a string, if available. For normal GStreamer plugin releases this will usually just be a date in the form of "YYYY-MM-DD", while pre-releases and builds from git may contain a time component after the date as well, in which case the string will be formatted like "YYYY-MM-DDTHH:MMZ" (e.g. "2012-04-30T09:30Z"). There may be plugins that do not have a valid release date set on them. the date string of the plugin, or %NULL if not available. plugin to get the release date of get the source module the plugin belongs to. the source of the plugin plugin to get the source of an array of plugin status error messages, or NULL a #GstPlugin an array of plugin status info messages, or NULL a #GstPlugin an array of plugin status warning messages, or NULL a #GstPlugin get the version of the plugin the version of the plugin plugin to get the version of queries if the plugin is loaded into memory %TRUE is loaded, %FALSE otherwise plugin to query Loads @plugin. Note that the *return value* is the loaded plugin; @plugin is untouched. The normal use pattern of this function goes like this: |[ GstPlugin *loaded_plugin; loaded_plugin = gst_plugin_load (plugin); // presumably, we're no longer interested in the potentially-unloaded plugin gst_object_unref (plugin); plugin = loaded_plugin; ]| a reference to a loaded plugin, or %NULL on error. plugin to load Adds plugin specific data to cache. Passes the ownership of the structure to the @plugin. The cache is flushed every time the registry is rebuilt. a plugin a structure containing the data to cache Ignore enum members when generating the plugins cache. This is useful if the members of the enum are generated dynamically, in order not to expose incorrect documentation to the end user. Flags used in connection with gst_plugin_add_dependency(). no special flags recurse into subdirectories use paths argument only if none of the environment variables is set interpret filename argument as filter suffix and check all matching files in the directory interpret filename argument as filter prefix and check all matching files in the directory. Since: 1.8. interpret non-absolute paths as relative to the main executable directory. Since 1.14. A plugin should export a variable of this type called plugin_desc. The plugin loader will use the data provided there to initialize the plugin. The @licence parameter must be one of: LGPL, GPL, QPL, GPL/QPL, MPL, BSD, MIT/X11, Proprietary, unknown. the major version number of core that plugin was compiled for the minor version number of core that plugin was compiled for a unique name of the plugin description of plugin pointer to the init function of this plugin. version of the plugin effective license of plugin source module plugin belongs to shipped package plugin belongs to URL to provider of plugin date time string in ISO 8601 format (or rather, a subset thereof), or %NULL. Allowed are the following formats: "YYYY-MM-DD" and "YYY-MM-DDTHH:MMZ" (with 'T' a separator and 'Z' indicating UTC/Zulu time). This field should be set via the GST_PACKAGE_RELEASE_DATETIME preprocessor macro. The plugin loading errors The plugin could not be loaded The plugin has unresolved dependencies The plugin has already be loaded from a different file Get the error quark. The error quark used in GError messages This is a base class for anything that can be added to a #GstPlugin. Copies the list of features. Caller should call @gst_plugin_feature_list_free when done with the list. a copy of @list, with each feature's reference count incremented. list of #GstPluginFeature Debug the plugin feature names in @list. a #GList of plugin features Unrefs each member of @list, then frees the list. list of #GstPluginFeature Compares the two given #GstPluginFeature instances. This function can be used as a #GCompareFunc when sorting by rank and then by name. negative value if the rank of p1 > the rank of p2 or the ranks are equal but the name of p1 comes before the name of p2; zero if the rank and names are equal; positive value if the rank of p1 < the rank of p2 or the ranks are equal but the name of p2 comes before the name of p1 a #GstPluginFeature a #GstPluginFeature Checks whether the given plugin feature is at least the required version. Note: Since version 1.24 this function no longer returns %TRUE if the version is a git development version (e.g. 1.23.0.1) and the check is for the "next" micro version, that is it will no longer return %TRUE for e.g. 1.23.0.1 if the check is for 1.23.1. It is still possible to parse the nano version from the string and do this check that way if needed. %TRUE if the plugin feature has at least the required version, otherwise %FALSE. a feature minimum required major version minimum required minor version minimum required micro version Get the plugin that provides this feature. the plugin that provides this feature, or %NULL. Unref with gst_object_unref() when no longer needed. a feature Get the name of the plugin that provides this feature. the name of the plugin that provides this feature, or %NULL if the feature is not associated with a plugin. a feature Gets the rank of a plugin feature. The rank of the feature a feature Loads the plugin containing @feature if it's not already loaded. @feature is unaffected; use the return value instead. Normally this function is used like this: |[<!-- language="C" --> GstPluginFeature *loaded_feature; loaded_feature = gst_plugin_feature_load (feature); // presumably, we're no longer interested in the potentially-unloaded feature gst_object_unref (feature); feature = loaded_feature; ]| a reference to the loaded feature, or %NULL on error the plugin feature to check Specifies a rank for a plugin feature, so that autoplugging uses the most appropriate feature. feature to rank rank value - higher number means more priority rank A function that can be used with e.g. gst_registry_feature_filter() to get a list of pluginfeature that match certain criteria. %TRUE for a positive match, %FALSE otherwise the pluginfeature to check the user_data that has been passed on e.g. gst_registry_feature_filter() A function that can be used with e.g. gst_registry_plugin_filter() to get a list of plugins that match certain criteria. %TRUE for a positive match, %FALSE otherwise the plugin to check the user_data that has been passed on e.g. gst_registry_plugin_filter() The plugin loading state Temporarily loaded plugins The plugin won't be scanned (again) A plugin should provide a pointer to a function of either #GstPluginInitFunc or this type in the plugin_desc struct. The function will be called by the loader at startup. One would then register each #GstPluginFeature. This version allows user data to be passed to init function (useful for bindings). %TRUE if plugin initialised successfully The plugin object extra data A plugin should provide a pointer to a function of this type in the plugin_desc struct. This function will be called by the loader at startup. One would then register each #GstPluginFeature. %TRUE if plugin initialised successfully The plugin object A #GstPoll keeps track of file descriptors much like fd_set (used with select ()) or a struct pollfd array (used with poll ()). Once created with gst_poll_new(), the set can be used to wait for file descriptors to be readable and/or writable. It is possible to make this wait be controlled by specifying %TRUE for the @controllable flag when creating the set (or later calling gst_poll_set_controllable()). New file descriptors are added to the set using gst_poll_add_fd(), and removed using gst_poll_remove_fd(). Controlling which file descriptors should be waited for to become readable and/or writable are done using gst_poll_fd_ctl_read(), gst_poll_fd_ctl_write() and gst_poll_fd_ctl_pri(). Use gst_poll_wait() to wait for the file descriptors to actually become readable and/or writable, or to timeout if no file descriptor is available in time. The wait can be controlled by calling gst_poll_restart() and gst_poll_set_flushing(). Once the file descriptor set has been waited for, one can use gst_poll_fd_has_closed() to see if the file descriptor has been closed, gst_poll_fd_has_error() to see if it has generated an error, gst_poll_fd_can_read() to see if it is possible to read from the file descriptor, and gst_poll_fd_can_write() to see if it is possible to write to it. Add a file descriptor to the file descriptor set. %TRUE if the file descriptor was successfully added to the set. a file descriptor set. a file descriptor. Check if @fd in @set has data to be read. %TRUE if the descriptor has data to be read. a file descriptor set. a file descriptor. Check if @fd in @set can be used for writing. %TRUE if the descriptor can be used for writing. a file descriptor set. a file descriptor. Control whether the descriptor @fd in @set will be monitored for exceptional conditions (POLLPRI). Not implemented on Windows (will just return %FALSE there). %TRUE if the descriptor was successfully updated. a file descriptor set. a file descriptor. a new status. Control whether the descriptor @fd in @set will be monitored for readability. %TRUE if the descriptor was successfully updated. a file descriptor set. a file descriptor. a new status. Control whether the descriptor @fd in @set will be monitored for writability. %TRUE if the descriptor was successfully updated. a file descriptor set. a file descriptor. a new status. Check if @fd in @set has closed the connection. %TRUE if the connection was closed. a file descriptor set. a file descriptor. Check if @fd in @set has an error. %TRUE if the descriptor has an error. a file descriptor set. a file descriptor. Check if @fd in @set has an exceptional condition (POLLPRI). Not implemented on Windows (will just return %FALSE there). %TRUE if the descriptor has an exceptional condition. a file descriptor set. a file descriptor. Mark @fd as ignored so that the next call to gst_poll_wait() will yield the same result for @fd as last time. This function must be called if no operation (read/write/recv/send/etc.) will be performed on @fd before the next call to gst_poll_wait(). The reason why this is needed is because the underlying implementation might not allow querying the fd more than once between calls to one of the re-enabling operations. a file descriptor set. a file descriptor. Free a file descriptor set. a file descriptor set. Get a GPollFD for the reading part of the control socket. This is useful when integrating with a GSource and GMainLoop. a #GstPoll a #GPollFD Read a byte from the control socket of the controllable @set. This function only works for timer #GstPoll objects created with gst_poll_new_timer(). %TRUE on success. %FALSE when when there was no byte to read or reading the byte failed. If there was no byte to read, and only then, errno will contain EWOULDBLOCK or EAGAIN. For all other values of errno this always signals a critical error. a #GstPoll. Remove a file descriptor from the file descriptor set. %TRUE if the file descriptor was successfully removed from the set. a file descriptor set. a file descriptor. Restart any gst_poll_wait() that is in progress. This function is typically used after adding or removing descriptors to @set. If @set is not controllable, then this call will have no effect. This function only works for non-timer #GstPoll objects created with gst_poll_new(). a #GstPoll. When @controllable is %TRUE, this function ensures that future calls to gst_poll_wait() will be affected by gst_poll_restart() and gst_poll_set_flushing(). This function only works for non-timer #GstPoll objects created with gst_poll_new(). %TRUE if the controllability of @set could be updated. a #GstPoll. new controllable state. When @flushing is %TRUE, this function ensures that current and future calls to gst_poll_wait() will return -1, with errno set to EBUSY. Unsetting the flushing state will restore normal operation of @set. This function only works for non-timer #GstPoll objects created with gst_poll_new(). a #GstPoll. new flushing state. Wait for activity on the file descriptors in @set. This function waits up to the specified @timeout. A timeout of #GST_CLOCK_TIME_NONE waits forever. For #GstPoll objects created with gst_poll_new(), this function can only be called from a single thread at a time. If called from multiple threads, -1 will be returned with errno set to EPERM. This is not true for timer #GstPoll objects created with gst_poll_new_timer(), where it is allowed to have multiple threads waiting simultaneously. The number of #GstPollFD in @set that have activity or 0 when no activity was detected after @timeout. If an error occurs, -1 is returned and errno is set. a #GstPoll. a timeout in nanoseconds. Write a byte to the control socket of the controllable @set. This function is mostly useful for timer #GstPoll objects created with gst_poll_new_timer(). It will make any current and future gst_poll_wait() function return with 1, meaning the control socket is set. After an equal amount of calls to gst_poll_read_control() have been performed, calls to gst_poll_wait() will block again until their timeout expired. This function only works for timer #GstPoll objects created with gst_poll_new_timer(). %TRUE on success. %FALSE when when the byte could not be written. errno contains the detailed error code but will never be EAGAIN, EINTR or EWOULDBLOCK. %FALSE always signals a critical error. a #GstPoll. 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 a new #GstPoll, or %NULL in case of an error. Free with gst_poll_free(). whether it should be possible to control a wait. 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 a new #GstPoll, or %NULL in case of an error. Free with gst_poll_free(). A file descriptor object. a file descriptor Initializes @fd. Alternatively you can initialize it with #GST_POLL_FD_INIT. a #GstPollFD This interface offers methods to query and manipulate parameter preset sets. A preset is a bunch of property settings, together with meta data and a name. The name of a preset serves as key for subsequent method calls to manipulate single presets. All instances of one type will share the list of presets. The list is created on demand, if presets are not used, the list is not created. The interface comes with a default implementation that serves most plugins. Wrapper plugins will override most methods to implement support for the native preset format of those wrapped plugins. One method that is useful to be overridden is gst_preset_get_property_names(). With that one can control which properties are saved and in which order. When implementing support for read-only presets, one should set the vmethods for gst_preset_save_preset() and gst_preset_delete_preset() to %NULL. Applications can use gst_preset_is_editable() to check for that. The default implementation supports presets located in a system directory, application specific directory and in the users home directory. When getting a list of presets individual presets are read and overlaid in 1) system, 2) application and 3) user order. Whenever an earlier entry is newer, the later entries will be updated. Since 1.8 you can also provide extra paths where to find presets through the GST_PRESET_PATH environment variable. Presets found in those paths will be considered as "app presets". Gets the directory for application specific presets if set by the application. the directory or %NULL, don't free or modify the string 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. %TRUE for success, %FALSE if the dir already has been set the application specific preset dir Delete the given preset. %TRUE for success, %FALSE if e.g. there is no preset with that @name a #GObject that implements #GstPreset preset name to remove Gets the @value for an existing meta data @tag. Meta data @tag names can be something like e.g. "comment". Returned values need to be released when done. %TRUE for success, %FALSE if e.g. there is no preset with that @name or no value for the given @tag a #GObject that implements #GstPreset preset name meta data item name value Get a copy of preset names as a %NULL terminated string array. list with names, use g_strfreev() after usage. a #GObject that implements #GstPreset Get a the names of the GObject properties that can be used for presets. an array of property names which should be freed with g_strfreev() after use. a #GObject that implements #GstPreset Load the given preset. %TRUE for success, %FALSE if e.g. there is no preset with that @name a #GObject that implements #GstPreset preset name to load Renames a preset. If there is already a preset by the @new_name it will be overwritten. %TRUE for success, %FALSE if e.g. there is no preset with @old_name a #GObject that implements #GstPreset current preset name new preset name Save the current object settings as a preset under the given name. If there is already a preset by this @name it will be overwritten. %TRUE for success, %FALSE a #GObject that implements #GstPreset preset name to save Sets a new @value for an existing meta data item or adds a new item. Meta data @tag names can be something like e.g. "comment". Supplying %NULL for the @value will unset an existing value. %TRUE for success, %FALSE if e.g. there is no preset with that @name a #GObject that implements #GstPreset preset name meta data item name new value Delete the given preset. %TRUE for success, %FALSE if e.g. there is no preset with that @name a #GObject that implements #GstPreset preset name to remove Gets the @value for an existing meta data @tag. Meta data @tag names can be something like e.g. "comment". Returned values need to be released when done. %TRUE for success, %FALSE if e.g. there is no preset with that @name or no value for the given @tag a #GObject that implements #GstPreset preset name meta data item name value Get a copy of preset names as a %NULL terminated string array. list with names, use g_strfreev() after usage. a #GObject that implements #GstPreset Get a the names of the GObject properties that can be used for presets. an array of property names which should be freed with g_strfreev() after use. a #GObject that implements #GstPreset Check if one can add new presets, change existing ones and remove presets. %TRUE if presets are editable or %FALSE if they are static a #GObject that implements #GstPreset Load the given preset. %TRUE for success, %FALSE if e.g. there is no preset with that @name a #GObject that implements #GstPreset preset name to load Renames a preset. If there is already a preset by the @new_name it will be overwritten. %TRUE for success, %FALSE if e.g. there is no preset with @old_name a #GObject that implements #GstPreset current preset name new preset name Save the current object settings as a preset under the given name. If there is already a preset by this @name it will be overwritten. %TRUE for success, %FALSE a #GObject that implements #GstPreset preset name to save Sets a new @value for an existing meta data item or adds a new item. Meta data @tag names can be something like e.g. "comment". Supplying %NULL for the @value will unset an existing value. %TRUE for success, %FALSE if e.g. there is no preset with that @name a #GObject that implements #GstPreset preset name meta data item name new value #GstPreset interface. parent interface type. virtual method to get list of presets list with names, use g_strfreev() after usage. a #GObject that implements #GstPreset virtual methods to get properties that are persistent an array of property names which should be freed with g_strfreev() after use. a #GObject that implements #GstPreset virtual methods to load a preset into properties %TRUE for success, %FALSE if e.g. there is no preset with that @name a #GObject that implements #GstPreset preset name to load virtual methods to save properties into a preset %TRUE for success, %FALSE a #GObject that implements #GstPreset preset name to save virtual methods to rename a preset %TRUE for success, %FALSE if e.g. there is no preset with @old_name a #GObject that implements #GstPreset current preset name new preset name virtual methods to remove a preset %TRUE for success, %FALSE if e.g. there is no preset with that @name a #GObject that implements #GstPreset preset name to remove virtual methods to set textual meta data to a preset %TRUE for success, %FALSE if e.g. there is no preset with that @name a #GObject that implements #GstPreset preset name meta data item name new value virtual methods to get textual meta data from a preset %TRUE for success, %FALSE if e.g. there is no preset with that @name or no value for the given @tag a #GObject that implements #GstPreset preset name meta data item name value The type of a %GST_MESSAGE_PROGRESS. The progress messages inform the application of the status of asynchronous tasks. A new task started. A task completed and a new one continues. A task completed. A task was canceled. A task caused an error. An error message is also posted on the bus. The #GstPromise object implements the container for values that may be available later. i.e. a Future or a Promise in <https://en.wikipedia.org/wiki/Futures_and_promises>. As with all Future/Promise-like functionality, there is the concept of the producer of the value and the consumer of the value. A #GstPromise is created with gst_promise_new() by the consumer and passed to the producer to avoid thread safety issues with the change callback. A #GstPromise can be replied to with a value (or an error) by the producer with gst_promise_reply(). The exact value returned is defined by the API contract of the producer and %NULL may be a valid reply. gst_promise_interrupt() is for the consumer to indicate to the producer that the value is not needed anymore and producing that value can stop. The @GST_PROMISE_RESULT_EXPIRED state set by a call to gst_promise_expire() indicates to the consumer that a value will never be produced and is intended to be called by a third party that implements some notion of message handling such as #GstBus. A callback can also be installed at #GstPromise creation for result changes with gst_promise_new_with_change_func(). The change callback can be used to chain #GstPromises's together as in the following example. |[<!-- language="C" --> const GstStructure *reply; GstPromise *p; if (gst_promise_wait (promise) != GST_PROMISE_RESULT_REPLIED) return; // interrupted or expired value reply = gst_promise_get_reply (promise); if (error in reply) return; // propagate error p = gst_promise_new_with_change_func (another_promise_change_func, user_data, notify); pass p to promise-using API ]| Each #GstPromise starts out with a #GstPromiseResult of %GST_PROMISE_RESULT_PENDING and only ever transitions once into one of the other #GstPromiseResult's. In order to support multi-threaded code, gst_promise_reply(), gst_promise_interrupt() and gst_promise_expire() may all be from different threads with some restrictions and the final result of the promise is whichever call is made first. There are two restrictions on ordering: 1. That gst_promise_reply() and gst_promise_interrupt() cannot be called after gst_promise_expire() 2. That gst_promise_reply() and gst_promise_interrupt() cannot be called twice. The change function set with gst_promise_new_with_change_func() is called directly from either the gst_promise_reply(), gst_promise_interrupt() or gst_promise_expire() and can be called from an arbitrary thread. #GstPromise using APIs can restrict this to a single thread or a subset of threads but that is entirely up to the API that uses #GstPromise. parent #GstMiniObject a new #GstPromise @func will be called exactly once when transitioning out of %GST_PROMISE_RESULT_PENDING into any of the other #GstPromiseResult states. a new #GstPromise a #GstPromiseChangeFunc to call argument to call @func with notification function that @user_data is no longer needed Expire a @promise. This will wake up any waiters with %GST_PROMISE_RESULT_EXPIRED. Called by a message loop when the parent message is handled and/or destroyed (possibly unanswered). a #GstPromise Retrieve the reply set on @promise. @promise must be in %GST_PROMISE_RESULT_REPLIED and the returned structure is owned by @promise The reply set on @promise a #GstPromise Interrupt waiting for a @promise. This will wake up any waiters with %GST_PROMISE_RESULT_INTERRUPTED. Called when the consumer does not want the value produced anymore. a #GstPromise Increases the refcount of the given @promise by one. @promise a #GstPromise. Set a reply on @promise. This will wake up any waiters with %GST_PROMISE_RESULT_REPLIED. Called by the producer of the value to indicate success (or failure). If @promise has already been interrupted by the consumer, then this reply is not visible to the consumer. a #GstPromise a #GstStructure with the the reply contents Decreases the refcount of the promise. If the refcount reaches 0, the promise will be freed. a #GstPromise. Wait for @promise to move out of the %GST_PROMISE_RESULT_PENDING state. If @promise is not in %GST_PROMISE_RESULT_PENDING then it will return immediately with the current result. the result of the promise a #GstPromise a #GstPromise user data The result of a #GstPromise Initial state. Waiting for transition to any other state. Interrupted by the consumer as it doesn't want the value anymore. A producer marked a reply The promise expired (the carrying object lost all refs) and the promise will never be fulfilled. Metadata type that holds information about a sample from a protection-protected track, including the information needed to decrypt it (if it is encrypted). the parent #GstMeta. the cryptographic information needed to decrypt the sample. Invoke the default chain function of the proxy pad. a #GstFlowReturn from the pad. a sink #GstPad, returns GST_FLOW_ERROR if not. the parent of @pad or %NULL the #GstBuffer to send, return GST_FLOW_ERROR if not. Invoke the default chain list function of the proxy pad. a #GstFlowReturn from the pad. a sink #GstPad, returns GST_FLOW_ERROR if not. the parent of @pad or %NULL the #GstBufferList to send, return GST_FLOW_ERROR if not. Invoke the default getrange function of the proxy pad. a #GstFlowReturn from the pad. a src #GstPad, returns #GST_FLOW_ERROR if not. the parent of @pad The start offset of the buffer The length of the buffer a pointer to hold the #GstBuffer, returns #GST_FLOW_ERROR if %NULL. Invoke the default iterate internal links function of the proxy pad. a #GstIterator of #GstPad, or %NULL if @pad has no parent. Unref each returned pad with gst_object_unref(). the #GstPad to get the internal links of. the parent of @pad or %NULL Get the internal pad of @pad. Unref target pad after usage. The internal pad of a #GstGhostPad is the internally used pad of opposite direction, which is used to link to the target. the target #GstProxyPad, can be %NULL. Unref target pad after usage. the #GstProxyPad The different types of QoS events that can be given to the gst_event_new_qos() method. The QoS event type that is produced when upstream elements are producing data too quickly and the element can't keep up processing the data. Upstream should reduce their production rate. This type is also used when buffers arrive early or in time. The QoS event type that is produced when upstream elements are producing data too slowly and need to speed up their production rate. The QoS event type that is produced when the application enabled throttling to limit the data rate. Check if an query can travel downstream. the query to query Check if an query is serialized with the data stream. the query to query Check if an query can travel upstream. the query to query when making custom query types, use this macro with the num and the given flags the query number to create the query flags Get the #GstQueryType of the query. the query to query The same thing as #GST_QUERY_TYPE_UPSTREAM | #GST_QUERY_TYPE_DOWNSTREAM. Get a constant string representation of the #GstQueryType of the query. the query to query Queries can be performed on pads (gst_pad_query()) and elements (gst_element_query()). Please note that some queries might need a running pipeline to work. Queries can be created using the gst_query_new_*() functions. Query values can be set using gst_query_set_*(), and parsed using gst_query_parse_*() helpers. The following example shows how to query the duration of a pipeline: |[<!-- language="C" --> GstQuery *query; gboolean res; query = gst_query_new_duration (GST_FORMAT_TIME); res = gst_element_query (pipeline, query); if (res) { gint64 duration; gst_query_parse_duration (query, NULL, &duration); g_print ("duration = %"GST_TIME_FORMAT, GST_TIME_ARGS (duration)); } else { g_print ("duration query failed..."); } gst_query_unref (query); ]| The parent #GstMiniObject type the #GstQueryType Constructs a new query object for querying if @caps are accepted. Free-function: gst_query_unref() a new #GstQuery a fixed #GstCaps Constructs a new query object for querying the allocation properties. Free-function: gst_query_unref() a new #GstQuery the negotiated caps return a pool Constructs a new query object for querying the bitrate. Free-function: gst_query_unref() a new #GstQuery Constructs a new query object for querying the buffering status of a stream. Free-function: gst_query_unref() a new #GstQuery the default #GstFormat for the new query Constructs a new query object for querying the caps. The CAPS query should return the allowable caps for a pad in the context of the element's state, its link to other elements, and the devices or files it has opened. These caps must be a subset of the pad template caps. In the NULL state with no links, the CAPS query should ideally return the same caps as the pad template. In rare circumstances, an object property can affect the caps returned by the CAPS query, but this is discouraged. For most filters, the caps returned by CAPS query is directly affected by the allowed caps on other pads. For demuxers and decoders, the caps returned by the srcpad's getcaps function is directly related to the stream data. Again, the CAPS query should return the most specific caps it reasonably can, since this helps with autoplugging. The @filter is used to restrict the result caps, only the caps matching @filter should be returned from the CAPS query. Specifying a filter might greatly reduce the amount of processing an element needs to do. Free-function: gst_query_unref() a new #GstQuery a filter Constructs a new query object for querying the pipeline-local context. Free-function: gst_query_unref() a new #GstQuery Context type to query Constructs a new convert query object. Use gst_query_unref() when done with it. A convert query is used to ask for a conversion between one format and another. Free-function: gst_query_unref() a #GstQuery the source #GstFormat for the new query the value to convert the target #GstFormat Constructs a new custom query object. Use gst_query_unref() when done with it. Free-function: gst_query_unref() a new #GstQuery the query type a structure for the query Constructs a new query object for querying the drain state. Free-function: gst_query_unref() a new #GstQuery Constructs a new stream duration query object to query in the given format. Use gst_query_unref() when done with it. A duration query will give the total length of the stream. Free-function: gst_query_unref() a new #GstQuery the #GstFormat for this duration query Constructs a new query object for querying formats of the stream. Free-function: gst_query_unref() a new #GstQuery Constructs a new latency query object. Use gst_query_unref() when done with it. A latency query is usually performed by sinks to compensate for additional latency introduced by elements in the pipeline. Free-function: gst_query_unref() a #GstQuery Constructs a new query stream position query object. Use gst_query_unref() when done with it. A position query is used to query the current position of playback in the streams, in some format. Free-function: gst_query_unref() a new #GstQuery the default #GstFormat for the new query Constructs a new query object for querying the scheduling properties. Free-function: gst_query_unref() a new #GstQuery Constructs a new query object for querying seeking properties of the stream. Free-function: gst_query_unref() a new #GstQuery the default #GstFormat for the new query Constructs a new segment query object. Use gst_query_unref() when done with it. A segment query is used to discover information about the currently configured segment for playback. Free-function: gst_query_unref() a new #GstQuery the #GstFormat for the new query Constructs a new query object for querying the stream selection capability. Free-function: gst_query_unref() a new #GstQuery Constructs a new query URI query object. Use gst_query_unref() when done with it. An URI query is used to query the current URI that is used by the source or sink. Free-function: gst_query_unref() a new #GstQuery Add @api with @params as one of the supported metadata API to @query. a GST_QUERY_ALLOCATION type query #GstQuery the metadata API API specific parameters Add @allocator and its @params as a supported memory allocator. a GST_QUERY_ALLOCATION type query #GstQuery the memory allocator a #GstAllocationParams Set the pool parameters in @query. A valid #GstQuery of type GST_QUERY_ALLOCATION. the #GstBufferPool the buffer size the min buffers the max buffers Set the buffering-ranges array field in @query. The current last start position of the array should be inferior to @start. a #gboolean indicating if the range was added or not. a GST_QUERY_BUFFERING type query #GstQuery start position of the range stop position of the range Add @mode as one of the supported scheduling modes to @query. a GST_QUERY_SCHEDULING type query #GstQuery a #GstPadMode Copies the given query using the copy function of the parent #GstStructure. Free-function: gst_query_unref a new copy of @q. a #GstQuery to copy. Check if @query has metadata @api set. When this function returns %TRUE, @index will contain the index where the requested API and the parameters can be found. %TRUE when @api is in the list of metadata. a GST_QUERY_ALLOCATION type query #GstQuery the metadata API the index Retrieve the number of values currently stored in the meta API array of the query's structure. the metadata API array size as a #guint. a GST_QUERY_ALLOCATION type query #GstQuery Retrieve the number of values currently stored in the allocator params array of the query's structure. If no memory allocator is specified, the downstream element can handle the default memory allocator. The first memory allocator in the query should be generic and allow mapping to system memory, all following allocators should be ordered by preference with the preferred one first. the allocator array size as a #guint. a GST_QUERY_ALLOCATION type query #GstQuery Retrieve the number of values currently stored in the pool array of the query's structure. the pool array size as a #guint. a GST_QUERY_ALLOCATION type query #GstQuery Retrieve the number of values currently stored in the buffered-ranges array of the query's structure. the range array size as a #guint. a GST_QUERY_BUFFERING type query #GstQuery Retrieve the number of values currently stored in the scheduling mode array of the query's structure. the scheduling mode array size as a #guint. a GST_QUERY_SCHEDULING type query #GstQuery Get the structure of a query. the #GstStructure of the query. The structure is still owned by the query and will therefore be freed when the query is unreffed. a #GstQuery Check if @query has scheduling mode set. > When checking if upstream supports pull mode, it is usually not > enough to just check for GST_PAD_MODE_PULL with this function, you > also want to check whether the scheduling flags returned by > gst_query_parse_scheduling() have the seeking flag set (meaning > random access is supported, not only sequential pulls). %TRUE when @mode is in the list of scheduling modes. a GST_QUERY_SCHEDULING type query #GstQuery the scheduling mode Check if @query has scheduling mode set and @flags is set in query scheduling flags. %TRUE when @mode is in the list of scheduling modes and @flags are compatible with query flags. a GST_QUERY_SCHEDULING type query #GstQuery the scheduling mode #GstSchedulingFlags Get the caps from @query. The caps remains valid as long as @query remains valid. The query to parse A pointer to the caps Parse the result from @query and store in @result. a GST_QUERY_ACCEPT_CAPS type query #GstQuery location for the result Parse an allocation query, writing the requested caps in @caps and whether a pool is needed in @need_pool, if the respective parameters are non-%NULL. Pool details can be retrieved using gst_query_get_n_allocation_pools() and gst_query_parse_nth_allocation_pool(). a #GstQuery The #GstCaps Whether a #GstBufferPool is needed Get the results of a bitrate query. See also gst_query_set_bitrate(). a GST_QUERY_BITRATE type #GstQuery The resulting bitrate in bits per second Get the percentage of buffered data. This is a value between 0 and 100. The @busy indicator is %TRUE when the buffering is in progress. A valid #GstQuery of type GST_QUERY_BUFFERING. if buffering is busy, or %NULL a buffering percent, or %NULL Parse an available query, writing the format into @format, and other results into the passed parameters, if the respective parameters are non-%NULL a GST_QUERY_BUFFERING type query #GstQuery the format to set for the @segment_start and @segment_end values, or %NULL the start to set, or %NULL the stop to set, or %NULL estimated total amount of download time remaining in milliseconds, or %NULL Extracts the buffering stats values from @query. A valid #GstQuery of type GST_QUERY_BUFFERING. a buffering mode, or %NULL the average input rate, or %NULL the average output rat, or %NULL amount of buffering time left in milliseconds, or %NULL Get the filter from the caps @query. The caps remains valid as long as @query remains valid. The query to parse A pointer to the caps filter Get the caps result from @query. The caps remains valid as long as @query remains valid. The query to parse A pointer to the caps Get the context from the context @query. The context remains valid as long as @query remains valid. The query to parse A pointer to store the #GstContext Parse a context type from an existing GST_QUERY_CONTEXT query. a #gboolean indicating if the parsing succeeded. a GST_QUERY_CONTEXT type query the context type, or %NULL Parse a convert query answer. Any of @src_format, @src_value, @dest_format, and @dest_value may be %NULL, in which case that value is omitted. a #GstQuery the storage for the #GstFormat of the source value, or %NULL the storage for the source value, or %NULL the storage for the #GstFormat of the destination value, or %NULL the storage for the destination value, or %NULL Parse a duration query answer. Write the format of the duration into @format, and the value into @duration, if the respective variables are non-%NULL. a #GstQuery the storage for the #GstFormat of the duration value, or %NULL. the storage for the total duration, or %NULL. Parse a latency query answer. a #GstQuery storage for live or %NULL the storage for the min latency or %NULL the storage for the max latency or %NULL Parse the number of formats in the formats @query. a #GstQuery the number of formats in this query. Parse an available query and get the metadata API at @index of the metadata API array. a #GType of the metadata API at @index. a GST_QUERY_ALLOCATION type query #GstQuery position in the metadata API array to read API specific parameters Parse an available query and get the allocator and its params at @index of the allocator array. a GST_QUERY_ALLOCATION type query #GstQuery position in the allocator array to read variable to hold the result parameters for the allocator Get the pool parameters in @query. Unref @pool with gst_object_unref() when it's not needed any more. A valid #GstQuery of type GST_QUERY_ALLOCATION. index to parse the #GstBufferPool the buffer size the min buffers the max buffers Parse an available query and get the start and stop values stored at the @index of the buffered ranges array. a #gboolean indicating if the parsing succeeded. a GST_QUERY_BUFFERING type query #GstQuery position in the buffered-ranges array to read the start position to set, or %NULL the stop position to set, or %NULL Parse the format query and retrieve the @nth format from it into @format. If the list contains less elements than @nth, @format will be set to GST_FORMAT_UNDEFINED. a #GstQuery the nth format to retrieve. a pointer to store the nth format Parse an available query and get the scheduling mode at @index of the scheduling modes array. a #GstPadMode of the scheduling mode at @index. a GST_QUERY_SCHEDULING type query #GstQuery position in the scheduling modes array to read Parse a position query, writing the format into @format, and the position into @cur, if the respective parameters are non-%NULL. a #GstQuery the storage for the #GstFormat of the position values (may be %NULL) the storage for the current position (may be %NULL) Set the scheduling properties. A valid #GstQuery of type GST_QUERY_SCHEDULING. #GstSchedulingFlags the suggested minimum size of pull requests the suggested maximum size of pull requests: the suggested alignment of pull requests Parse a seeking query, writing the format into @format, and other results into the passed parameters, if the respective parameters are non-%NULL a GST_QUERY_SEEKING type query #GstQuery the format to set for the @segment_start and @segment_end values, or %NULL the seekable flag to set, or %NULL the segment_start to set, or %NULL the segment_end to set, or %NULL Parse a segment query answer. Any of @rate, @format, @start_value, and @stop_value may be %NULL, which will cause this value to be omitted. See gst_query_set_segment() for an explanation of the function arguments. a #GstQuery the storage for the rate of the segment, or %NULL the storage for the #GstFormat of the values, or %NULL the storage for the start value, or %NULL the storage for the stop value, or %NULL Get the results of a selectable query. See also gst_query_set_selectable(). a GST_QUERY_SELECTABLE type #GstQuery The resulting stream selection capability Parse an URI query, writing the URI into @uri as a newly allocated string, if the respective parameters are non-%NULL. Free the string with g_free() after usage. a #GstQuery the storage for the current URI (may be %NULL) Parse an URI query, writing the URI into @uri as a newly allocated string, if the respective parameters are non-%NULL. Free the string with g_free() after usage. a #GstQuery the storage for the redirect URI (may be %NULL) Parse an URI query, and set @permanent to %TRUE if there is a redirection and it should be considered permanent. If a redirection is permanent, applications should update their internal storage of the URI, otherwise they should make all future requests to the original URI. a #GstQuery if the URI redirection is permanent (may be %NULL) Increases the refcount of the given query by one. @q a #GstQuery to increase the refcount of. Remove the metadata API at @index of the metadata API array. a GST_QUERY_ALLOCATION type query #GstQuery position in the metadata API array to remove Remove the allocation param at @index of the allocation param array. a GST_QUERY_ALLOCATION type query #GstQuery position in the allocation param array to remove Remove the allocation pool at @index of the allocation pool array. a GST_QUERY_ALLOCATION type query #GstQuery position in the allocation pool array to remove Set @result as the result for the @query. a GST_QUERY_ACCEPT_CAPS type query #GstQuery the result to set Set the results of a bitrate query. The nominal bitrate is the average bitrate expected over the length of the stream as advertised in file headers (or similar). a GST_QUERY_BITRATE type #GstQuery the nominal bitrate in bits per second Set the percentage of buffered data. This is a value between 0 and 100. The @busy indicator is %TRUE when the buffering is in progress. A valid #GstQuery of type GST_QUERY_BUFFERING. if buffering is busy a buffering percent Set the available query result fields in @query. a #GstQuery the format to set for the @start and @stop values the start to set the stop to set estimated total amount of download time remaining in milliseconds Configures the buffering stats values in @query. A valid #GstQuery of type GST_QUERY_BUFFERING. a buffering mode the average input rate the average output rate amount of buffering time left in milliseconds Set the @caps result in @query. The query to use A pointer to the caps Answer a context query by setting the requested context. a #GstQuery with query type GST_QUERY_CONTEXT the requested #GstContext Answer a convert query by setting the requested values. a #GstQuery the source #GstFormat the source value the destination #GstFormat the destination value Answer a duration query by setting the requested value in the given format. a #GstQuery the #GstFormat for the duration the duration of the stream Set the formats query result fields in @query. The number of formats passed must be equal to @n_formats. a #GstQuery the number of formats to set. A number of @GstFormats equal to @n_formats. Set the formats query result fields in @query. The number of formats passed in the @formats array must be equal to @n_formats. a #GstQuery the number of formats to set. an array containing @n_formats @GstFormat values. Answer a latency query by setting the requested values in the given format. a #GstQuery if there is a live element upstream the minimal latency of the upstream elements the maximal latency of the upstream elements Parse an available query and get the allocator and its params at @index of the allocator array. a GST_QUERY_ALLOCATION type query #GstQuery position in the allocator array to set new allocator to set parameters for the allocator Set the pool parameters in @query. A valid #GstQuery of type GST_QUERY_ALLOCATION. index to modify the #GstBufferPool the buffer size the min buffers the max buffers Answer a position query by setting the requested value in the given format. a #GstQuery with query type GST_QUERY_POSITION the requested #GstFormat the position to set Set the scheduling properties. A valid #GstQuery of type GST_QUERY_SCHEDULING. #GstSchedulingFlags the suggested minimum size of pull requests the suggested maximum size of pull requests the suggested alignment of pull requests Set the seeking query result fields in @query. a #GstQuery the format to set for the @segment_start and @segment_end values the seekable flag to set the segment_start to set the segment_end to set Answer a segment query by setting the requested values. The normal playback segment of a pipeline is 0 to duration at the default rate of 1.0. If a seek was performed on the pipeline to play a different segment, this query will return the range specified in the last seek. @start_value and @stop_value will respectively contain the configured playback range start and stop values expressed in @format. The values are always between 0 and the duration of the media and @start_value <= @stop_value. @rate will contain the playback rate. For negative rates, playback will actually happen from @stop_value to @start_value. a #GstQuery the rate of the segment the #GstFormat of the segment values (@start_value and @stop_value) the start value the stop value Set the results of a selectable query. If the element answering the query can handle stream selection, @selectable should be set to %TRUE. a GST_QUERY_SELECTABLE type #GstQuery Whether the element can handle stream selection. Answer a URI query by setting the requested URI. a #GstQuery with query type GST_QUERY_URI the URI to set Answer a URI query by setting the requested URI redirection. a #GstQuery with query type GST_QUERY_URI the URI to set Answer a URI query by setting the requested URI redirection to permanent or not. a #GstQuery with query type %GST_QUERY_URI whether the redirect is permanent or not Decreases the refcount of the query. If the refcount reaches 0, the query will be freed. a #GstQuery to decrease the refcount of. Get the structure of a query. This method should be called with a writable @query so that the returned structure is guaranteed to be writable. the #GstStructure of the query. The structure is still owned by the query and will therefore be freed when the query is unreffed. a #GstQuery Modifies a pointer to a #GstQuery to point to a different #GstQuery. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old query is unreffed, the new one is reffed). Either @new_query or the #GstQuery pointed to by @old_query may be %NULL. %TRUE if @new_query was different from @old_query pointer to a pointer to a #GstQuery to be replaced. pointer to a #GstQuery that will replace the query pointed to by @old_query. Modifies a pointer to a #GstQuery to point to a different #GstQuery. This function is similar to gst_query_replace() except that it takes ownership of @new_query. Either @new_query or the #GstQuery pointed to by @old_query may be %NULL. %TRUE if @new_query was different from @old_query pointer to a pointer to a #GstQuery to be stolen. pointer to a #GstQuery that will replace the query pointed to by @old_query. Standard predefined Query types unknown query type current position in stream total duration of the stream latency of stream current jitter of stream current rate of the stream seeking capabilities segment start/stop positions convert values between formats query supported formats for convert query available media for efficient seeking. a custom application or element defined query. query the URI of the source or sink. the buffer allocation properties the scheduling properties the accept caps query the caps query wait till all serialized data is consumed downstream query the pipeline-local context from downstream or upstream (since 1.2) the bitrate query (since 1.16) Query stream selection capability. Gets the #GstQueryTypeFlags associated with @type. a #GstQueryTypeFlags. a #GstQueryType Get a printable name for the given query type. Do not modify or free. a reference to the static name of the query. the query type Get the unique quark for the given query type. the quark associated with the query type the query type #GstQueryTypeFlags indicate the aspects of the different #GstQueryType values. You can get the type flags of a #GstQueryType with the gst_query_type_get_flags() function. Set if the query can travel upstream. Set if the query can travel downstream. Set if the query should be serialized with data flow. Read a 16 bit unsigned integer value in big endian format from the memory buffer. memory location Read a 16 bit unsigned integer value in little endian format from the memory buffer. memory location Read a 24 bit unsigned integer value in big endian format from the memory buffer. memory location Read a 24 bit unsigned integer value in little endian format from the memory buffer. memory location Read a 32 bit unsigned integer value in big endian format from the memory buffer. memory location Read a 32 bit unsigned integer value in little endian format from the memory buffer. memory location Read a 64 bit unsigned integer value in big endian format from the memory buffer. memory location Read a 64 bit unsigned integer value in little endian format from the memory buffer. memory location Read an 8 bit unsigned integer value from the memory buffer. memory location Rounds an integer value down to the next multiple of 128. integer value to round down Rounds an integer value down to the next multiple of 16. integer value to round down Rounds an integer value down to the next multiple of 2. integer value to round down Rounds an integer value down to the next multiple of 32. integer value to round down Rounds an integer value down to the next multiple of 4. integer value to round down Rounds an integer value down to the next multiple of 64. integer value to round down Rounds an integer value down to the next multiple of 8. integer value to round down Rounds an integer value down to the next multiple of @align. @align MUST be a power of two. integrer value to round down a power of two to round down to Rounds an integer value up to the next multiple of 128. integer value to round up Rounds an integer value up to the next multiple of 16. integer value to round up Rounds an integer value up to the next multiple of 2. integer value to round up Rounds an integer value up to the next multiple of 32. integer value to round up Rounds an integer value up to the next multiple of 4. integer value to round up Rounds an integer value up to the next multiple of 64. integer value to round up Rounds an integer value up to the next multiple of 8. integer value to round up Rounds an integer value up to the next multiple of @align. @align MUST be a power of two. integrer value to round up a power of two to round up to Element priority ranks. Defines the order in which the autoplugger (or similar rank-picking mechanisms, such as e.g. gst_element_make_from_uri()) will choose this element over an alternative one with the same function. These constants serve as a rough guidance for defining the rank of a #GstPluginFeature. Any value is valid, including values bigger than @GST_RANK_PRIMARY. will be chosen last or not at all unlikely to be chosen likely to be chosen will be chosen first #GstReferenceTimestampMeta can be used to attach alternative timestamps and possibly durations to a #GstBuffer. These are generally not according to the pipeline clock and could be e.g. the NTP timestamp when the media was captured. The reference is stored as a #GstCaps in @reference. Examples of valid references would be * `timestamp/x-drivername-stream`: for timestamps that are locally generated by some driver named `drivername` when generating the stream, e.g. based on a frame counter * `timestamp/x-ntp, host=pool.ntp.org, port=123`: for timestamps based on a specific NTP server. Note that the host/port parameters might not always be given. * `timestamp/x-ptp, version=IEEE1588-2008, domain=1`: for timestamps based on a given PTP clock. * `timestamp/x-unix`: for timestamps based on the UNIX epoch according to the local clock. Since 1.24 it can be serialized using gst_meta_serialize() and gst_meta_deserialize(). the parent #GstMeta structure identifier for the timestamp reference. timestamp duration, or %GST_CLOCK_TIME_NONE Gets the global #GstMetaInfo describing the #GstReferenceTimestampMeta meta. The #GstMetaInfo One registry holds the metadata of a set of plugins. <emphasis role="bold">Design:</emphasis> The #GstRegistry object is a list of plugins and some functions for dealing with them. Each #GstPlugin is matched 1-1 with a file on disk, and may or may not be loaded at a given time. The primary source, at all times, of plugin information is each plugin file itself. Thus, if an application wants information about a particular plugin, or wants to search for a feature that satisfies given criteria, the primary means of doing so is to load every plugin and look at the resulting information that is gathered in the default registry. Clearly, this is a time consuming process, so we cache information in the registry file. The format and location of the cache file is internal to gstreamer. On startup, plugins are searched for in the plugin search path. The following locations are checked in this order: * location from --gst-plugin-path commandline option. * the GST_PLUGIN_PATH environment variable. * the GST_PLUGIN_SYSTEM_PATH environment variable. * default locations (if GST_PLUGIN_SYSTEM_PATH is not set). Those default locations are: `$XDG_DATA_HOME/gstreamer-$GST_API_VERSION/plugins/` and `$prefix/libs/gstreamer-$GST_API_VERSION/`. [$XDG_DATA_HOME](http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) defaults to `$HOME/.local/share`. The registry cache file is loaded from `$XDG_CACHE_HOME/gstreamer-$GST_API_VERSION/registry-$ARCH.bin` (where $XDG_CACHE_HOME defaults to `$HOME/.cache`) or the file listed in the `GST_REGISTRY` env var. One reason to change the registry location is for testing. For each plugin that is found in the plugin search path, there could be 3 possibilities for cached information: * the cache may not contain information about a given file. * the cache may have stale information. * the cache may have current information. In the first two cases, the plugin is loaded and the cache updated. In addition to these cases, the cache may have entries for plugins that are not relevant to the current process. These are marked as not available to the current process. If the cache is updated for whatever reason, it is marked dirty. A dirty cache is written out at the end of initialization. Each entry is checked to make sure the information is minimally valid. If not, the entry is simply dropped. ## Implementation notes: The "cache" and "registry" are different concepts and can represent different sets of plugins. For various reasons, at init time, the cache is stored in the default registry, and plugins not relevant to the current process are marked with the %GST_PLUGIN_FLAG_CACHED bit. These plugins are removed at the end of initialization. By default GStreamer will perform scanning and rebuilding of the registry file using a helper child process. Applications might want to disable this behaviour with the gst_registry_fork_set_enabled() function, in which case new plugins are scanned (and loaded) into the application process. %TRUE if GStreamer will use the child helper process when rebuilding the registry. Applications might want to disable/enable spawning of a child helper process when rebuilding the registry. See gst_registry_fork_is_enabled() for more information. whether rebuilding the registry can use a temporary child helper process. Retrieves the singleton plugin registry. The caller does not own a reference on the registry, as it is alive as long as GStreamer is initialized. the #GstRegistry. Add the feature to the registry. The feature-added signal will be emitted. @feature's reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink()) %TRUE on success. MT safe. the registry to add the plugin to the feature to add Add the plugin to the registry. The plugin-added signal will be emitted. @plugin's reference count will be incremented, and any floating reference will be removed (see gst_object_ref_sink()) %TRUE on success. MT safe. the registry to add the plugin to the plugin to add Checks whether a plugin feature by the given name exists in @registry and whether its version is at least the version required. %TRUE if the feature could be found and the version is the same as the required version or newer, and %FALSE otherwise. a #GstRegistry the name of the feature (e.g. "oggdemux") the minimum major version number the minimum minor version number the minimum micro version number Runs a filter against all features of the plugins in the registry and returns a GList with the results. If the first flag is set, only the first match is returned (as a list with a single object). a #GList of #GstPluginFeature. Use gst_plugin_feature_list_free() after usage. MT safe. registry to query the filter to use only return first match user data passed to the filter function Find the pluginfeature with the given name and type in the registry. the pluginfeature with the given name and type or %NULL if the plugin was not found. gst_object_unref() after usage. MT safe. the registry to search the pluginfeature name to find the pluginfeature type to find Find the plugin with the given name in the registry. The plugin will be reffed; caller is responsible for unreffing. the plugin with the given name or %NULL if the plugin was not found. gst_object_unref() after usage. MT safe. the registry to search the plugin name to find Retrieves a #GList of #GstPluginFeature of @type. a #GList of #GstPluginFeature of @type. Use gst_plugin_feature_list_free() after use MT safe. a #GstRegistry a #GType. Retrieves a #GList of features of the plugin with name @name. a #GList of #GstPluginFeature. Use gst_plugin_feature_list_free() after usage. a #GstRegistry. a plugin name. Returns the registry's feature list cookie. This changes every time a feature is added or removed from the registry. the feature list cookie. the registry Get a copy of all plugins registered in the given registry. The refcount of each element in the list in incremented. a #GList of #GstPlugin. Use gst_plugin_list_free() after usage. MT safe. the registry to search Look up a plugin in the given registry with the given filename. If found, plugin is reffed. the #GstPlugin if found, or %NULL if not. gst_object_unref() after usage. the registry to look up in the name of the file to look up Find a #GstPluginFeature with @name in @registry. a #GstPluginFeature with its refcount incremented, use gst_object_unref() after usage. MT safe. a #GstRegistry a #GstPluginFeature name Runs a filter against all plugins in the registry and returns a #GList with the results. If the first flag is set, only the first match is returned (as a list with a single object). Every plugin is reffed; use gst_plugin_list_free() after use, which will unref again. a #GList of #GstPlugin. Use gst_plugin_list_free() after usage. MT safe. registry to query the filter to use only return first match user data passed to the filter function Remove the feature from the registry. MT safe. the registry to remove the feature from the feature to remove Remove the plugin from the registry. MT safe. the registry to remove the plugin from the plugin to remove Scan the given path for plugins to add to the registry. The syntax of the path is specific to the registry. %TRUE if registry changed the registry to add found plugins to the path to scan Signals that a feature has been added to the registry (possibly replacing a previously-added one by the same name) the feature that has been added Signals that a plugin has been added to the registry (possibly replacing a previously-added one by the same name) the plugin that has been added Resource errors are for any resource used by an element: memory, files, network connections, process space, ... They're typically used by source and sink elements. a general error which doesn't fit in any other category. Make sure you add a custom message to the error call. do not use this except as a placeholder for deciding where to go while developing code. used when the resource could not be found. used when resource is busy. used when resource fails to open for reading. used when resource fails to open for writing. used when resource cannot be opened for both reading and writing, or either (but unspecified which). used when the resource can't be closed. used when the resource can't be read from. used when the resource can't be written to. used when a seek on the resource fails. used when a synchronize on the resource fails. used when settings can't be manipulated on. used when the resource has no space left. used when the resource can't be opened due to missing authorization. (Since: 1.2.4) the number of resource error types. Constant that defines one GStreamer second. printf format type used to debug GStreamer segments. You can use this in combination with GStreamer's debug logging system as well as the functions gst_info_vasprintf(), gst_info_strdup_vprintf() and gst_info_strdup_printf() to pretty-print #GstSegment structures. This can only be used on pointers to GstSegment structures. A value which is guaranteed to never be returned by gst_util_seqnum_next(). Can be used as a default value in variables used to store seqnum. This macro returns the current #GstState of the element. a #GstElement to return state for. Get the conditional used to signal the completion of a state change. a #GstElement Get a reference to the state lock of @elem. This lock is used by the core. It is taken while getting or setting the state, during state changes, and while finalizing. a #GstElement Given a current state @cur and a target state @pending, calculate the next (intermediate) #GstState. A starting #GstState A target #GstState This macro returns the next #GstState of the element. a #GstElement to return the next state for. This macro returns the currently pending #GstState of the element. a #GstElement to return the pending state for. This macro returns the last #GstStateChangeReturn value. a #GstElement to return the last state result for. This macro returns the target #GstState of the element. a #GstElement to return the target state for. Given a current state @cur and a next state @next, calculate the associated #GstStateChange transition. A current state A next state Given a state transition @trans, extract the current #GstState. A #GstStateChange Given a state transition @trans, extract the next #GstState. A #GstStateChange Creates a new #GstCaps static caps from an input string. This can be used in pad templates. the string describing the caps Convenience macro to fill the values of a #GstStaticPadTemplate structure. Example: |[<!-- language="C" --> static GstStaticPadTemplate my_src_template = * GST_STATIC_PAD_TEMPLATE("src", GST_PAD_SRC, GST_PAD_ALWAYS, , GST_STATIC_CAPS_ANY); ]| the name template of the pad the GstPadDirection of the pad the GstPadPresence of the pad the GstStaticCaps of the pad printf format type used to debug GStreamer signed time value pointers. You can use this in combination with GStreamer's debug logging system as well as the functions gst_info_vasprintf(), gst_info_strdup_vprintf() and gst_info_strdup_printf() to pretty-print signed time (pointers to #GstClockTimeDiff or #gint64). Formats @t for the #GST_STIME_FORMAT format string. Note: @t will be evaluated more than once. a #GstClockTimeDiff or #gint64 A string that can be used in printf-like format strings to display a signed #GstClockTimeDiff or #gint64 value in `h:m:s` format. Use GST_TIME_ARGS() to construct the matching arguments. Example: ``` C printf("%" GST_STIME_FORMAT "\n", GST_STIME_ARGS(ts)); ``` Transform an input string into a #guint32 fourcc value with host endianness. Caller is responsible for ensuring the input string consists of at least four characters. |[ guint32 fourcc = GST_STR_FOURCC ("MJPG"); ]| a string with at least four characters Macro to use when a string must not be %NULL, but may be %NULL. If the string is %NULL, "(NULL)" is printed instead. In GStreamer printf string arguments may not be %NULL, because on some platforms (ie Solaris) the libc crashes in that case. This includes debugging strings. The string to check. A #GstSample is a small object containing data, a type, timing and extra arbitrary information. Create a new #GstSample with the provided details. Free-function: gst_sample_unref the new #GstSample. gst_sample_unref() after usage. a #GstBuffer, or %NULL a #GstCaps, or %NULL a #GstSegment, or %NULL a #GstStructure, or %NULL Create a copy of the given sample. This will also make a newly allocated copy of the data the source sample contains. a new copy of @sample. a #GstSample. Get the buffer associated with @sample the buffer of @sample or %NULL when there is no buffer. The buffer remains valid as long as @sample is valid. If you need to hold on to it for longer than that, take a ref to the buffer with gst_buffer_ref(). a #GstSample Get the buffer list associated with @sample the buffer list of @sample or %NULL when there is no buffer list. The buffer list remains valid as long as @sample is valid. If you need to hold on to it for longer than that, take a ref to the buffer list with gst_mini_object_ref (). a #GstSample Get the caps associated with @sample the caps of @sample or %NULL when there is no caps. The caps remain valid as long as @sample is valid. If you need to hold on to the caps for longer than that, take a ref to the caps with gst_caps_ref(). a #GstSample Get extra information associated with @sample. the extra info of @sample. The info remains valid as long as @sample is valid. a #GstSample Get the segment associated with @sample the segment of @sample. The segment remains valid as long as @sample is valid. a #GstSample Increases the refcount of the given sample by one. @sample a #GstSample Set the buffer associated with @sample. @sample must be writable. A #GstSample A #GstBuffer Set the buffer list associated with @sample. @sample must be writable. a #GstSample a #GstBufferList Set the caps associated with @sample. @sample must be writable. A #GstSample A #GstCaps Set the info structure associated with @sample. @sample must be writable, and @info must not have a parent set already. A #GstSample A #GstStructure Set the segment associated with @sample. @sample must be writable. A #GstSample A #GstSegment Decreases the refcount of the sample. If the refcount reaches 0, the sample will be freed. a #GstSample The different scheduling flags. if seeking is possible if sequential access is recommended if bandwidth is limited and buffering possible (since 1.2) The different search modes. Only search for exact matches. Search for an exact match or the element just before. Search for an exact match or the element just after. Flags to be used with gst_element_seek() or gst_event_new_seek(). All flags can be used together. A non flushing seek might take some time to perform as the currently playing data in the pipeline will not be cleared. An accurate seek might be slower for formats that don't have any indexes or timestamp markers in the stream. Specifying this flag might require a complete scan of the file in those cases. When performing a segment seek: after the playback of the segment completes, no EOS will be emitted by the element that performed the seek, but a %GST_MESSAGE_SEGMENT_DONE message will be posted on the bus by the element. When this message is posted, it is possible to send a new seek event to continue playback. With this seek method it is possible to perform seamless looping or simple linear editing. When only changing the playback rate and not the direction, the %GST_SEEK_FLAG_INSTANT_RATE_CHANGE flag can be used for a non-flushing seek to signal that the rate change should be applied immediately. This requires special support in the seek handlers (e.g. demuxers) and any elements synchronizing to the clock, and in general can't work in all cases (for example UDP streaming where the delivery rate is controlled by a remote server). The instant-rate-change mode supports changing the trickmode-related GST_SEEK_ flags, but can't be used in conjunction with other seek flags that affect the new playback position - as the playback position will not be changing. When doing fast forward (rate > 1.0) or fast reverse (rate < -1.0) trickmode playback, the %GST_SEEK_FLAG_TRICKMODE flag can be used to instruct decoders and demuxers to adjust the playback rate by skipping frames. This can improve performance and decrease CPU usage because not all frames need to be decoded. Beyond that, the %GST_SEEK_FLAG_TRICKMODE_KEY_UNITS flag can be used to request that decoders skip all frames except key units, and %GST_SEEK_FLAG_TRICKMODE_NO_AUDIO flags can be used to request that audio decoders do no decoding at all, and simple output silence. The %GST_SEEK_FLAG_SNAP_BEFORE flag can be used to snap to the previous relevant location, and the %GST_SEEK_FLAG_SNAP_AFTER flag can be used to select the next relevant location. If %GST_SEEK_FLAG_KEY_UNIT is specified, the relevant location is a keyframe. If both flags are specified, the nearest of these locations will be selected. If none are specified, the implementation is free to select whichever it wants. The before and after here are in running time, so when playing backwards, the next location refers to the one that will played in next, and not the one that is located after in the actual source stream. Also see part-seeking.txt in the GStreamer design documentation for more details on the meaning of these flags and the behaviour expected of elements that handle them. no flag flush pipeline accurate position is requested, this might be considerably slower for some formats. seek to the nearest keyframe. This might be faster but less accurate. perform a segment seek. when doing fast forward or fast reverse playback, allow elements to skip frames instead of generating all frames. (Since: 1.6) Deprecated backward compatibility flag, replaced by %GST_SEEK_FLAG_TRICKMODE go to a location before the requested position, if %GST_SEEK_FLAG_KEY_UNIT this means the keyframe at or before the requested position the one at or before the seek target. go to a location after the requested position, if %GST_SEEK_FLAG_KEY_UNIT this means the keyframe at of after the requested position. go to a position near the requested position, if %GST_SEEK_FLAG_KEY_UNIT this means the keyframe closest to the requested position, if both keyframes are at an equal distance, behaves like %GST_SEEK_FLAG_SNAP_BEFORE. when doing fast forward or fast reverse playback, request that elements only decode keyframes and skip all other content, for formats that have keyframes. (Since: 1.6) when doing fast forward or fast reverse playback, request that audio decoder elements skip decoding and output only gap events or silence. (Since: 1.6) When doing fast forward or fast reverse playback, request that elements only decode keyframes and forward predicted frames and skip all other content (for example B-Frames), for formats that have keyframes and forward predicted frames. (Since: 1.18) Signals that a rate change should be applied immediately. Only valid if start/stop position are GST_CLOCK_TIME_NONE, the playback direction does not change and the seek is not flushing. (Since: 1.18) The different types of seek events. When constructing a seek event with gst_event_new_seek() or when doing gst_segment_do_seek (). no change in position is required absolute position is requested relative position to duration is requested This helper structure holds the relevant values for tracking the region of interest in a media file, called a segment. The structure can be used for two purposes: * performing seeks (handling seek events) * tracking playback regions (handling newsegment events) The segment is usually configured by the application with a seek event which is propagated upstream and eventually handled by an element that performs the seek. The configured segment is then propagated back downstream with a newsegment event. This information is then used to clip media to the segment boundaries. A segment structure is initialized with gst_segment_init(), which takes a #GstFormat that will be used as the format of the segment values. The segment will be configured with a start value of 0 and a stop/duration of -1, which is undefined. The default rate and applied_rate is 1.0. The public duration field contains the duration of the segment. When using the segment for seeking, the start and time members should normally be left to their default 0 value. The stop position is left to -1 unless explicitly configured to a different value after a seek event. The current position in the segment should be set by changing the position member in the structure. For elements that perform seeks, the current segment should be updated with the gst_segment_do_seek() and the values from the seek event. This method will update all the segment fields. The position field will contain the new playback position. If the start_type was different from GST_SEEK_TYPE_NONE, playback continues from the position position, possibly with updated flags or rate. For elements that want to use #GstSegment to track the playback region, update the segment fields with the information from the newsegment event. The gst_segment_clip() method can be used to check and clip the media data to the segment boundaries. For elements that want to synchronize to the pipeline clock, gst_segment_to_running_time() can be used to convert a timestamp to a value that can be used to synchronize to the clock. This function takes into account the base as well as any rate or applied_rate conversions. For elements that need to perform operations on media data in stream_time, gst_segment_to_stream_time() can be used to convert a timestamp and the segment info to stream time (which is always between 0 and the duration of the stream). flags for this segment the playback rate of the segment is set in response to a seek event and, without any seek, the value should be `1.0`. This value is used by elements that synchronize buffer [running times](additional/design/synchronisation.md#running-time) on the clock (usually the sink elements), leading to consuming buffers faster (for a value `> 1.0`) or slower (for `0.0 < value < 1.0`) than normal playback speed. The rate also defines the playback direction, meaning that when the value is lower than `0.0`, the playback happens in reverse, and the [stream-time](additional/design/synchronisation.md#stream-time) is going backward. The `rate` value should never be `0.0`. The applied rate is the rate that has been applied to the stream. The effective/resulting playback rate of a stream is `rate * applied_rate`. The applied rate can be set by source elements when a server is sending the stream with an already modified playback speed rate. Filter elements that modify the stream in a way that modifies the playback speed should also modify the applied rate. For example the #videorate element when its #videorate:rate property is set will set the applied rate of the segment it pushed downstream. Also #scaletempo applies the input segment rate to the stream and outputs a segment with rate=1.0 and applied_rate=<inputsegment.rate>. the unit used for all of the segment's values. the running time (plus elapsed time, see offset) of the segment [start](GstSegment.start) ([stop](GstSegment.stop) if rate < 0.0). the offset expresses the elapsed time (in buffer timestamps) before a seek with its start (stop if rate < 0.0) seek type set to #GST_SEEK_TYPE_NONE, the value is set to the position of the segment at the time of the seek. the start time of the segment (in buffer timestamps) [(PTS)](GstBuffer.pts), that is the timestamp of the first buffer to output inside the segment (last one during reverse playback). For example decoders will [clip](gst_segment_clip) out the buffers before the start time. the stop time of the segment (in buffer timestamps) [(PTS)](GstBuffer.pts), that is the timestamp of the last buffer to output inside the segment (first one during reverse playback). For example decoders will [clip](gst_segment_clip) out buffers after the stop time. the stream time of the segment [start](GstSegment.start) ([stop](GstSegment.stop) if rate < 0.0). the buffer timestamp position in the segment is supposed to be updated by elements such as sources, demuxers or parsers to track progress by setting it to the last pushed buffer' end time ([timestamp](GstBuffer.pts) + #GstBuffer.duration) for that specific segment. The position is used when reconfiguring the segment with #gst_segment_do_seek when the seek is only updating the segment (see [offset](GstSegment.offset)). the duration of the segment is the maximum absolute difference between #GstSegment.start and #GstSegment.stop if stop is not set, otherwise it should be the difference between those two values. This should be set by elements that know the overall stream duration (like demuxers) and will be used when seeking with #GST_SEEK_TYPE_END. Allocate a new #GstSegment structure and initialize it using gst_segment_init(). Free-function: gst_segment_free a new #GstSegment, free with gst_segment_free(). Clip the given @start and @stop values to the segment boundaries given in @segment. @start and @stop are compared and clipped to @segment start and stop values. If the function returns %FALSE, @start and @stop are known to fall outside of @segment and @clip_start and @clip_stop are not updated. When the function returns %TRUE, @clip_start and @clip_stop will be updated. If @clip_start or @clip_stop are different from @start or @stop respectively, the region fell partially in the segment. Note that when @stop is -1, @clip_stop will be set to the end of the segment. Depending on the use case, this may or may not be what you want. %TRUE if the given @start and @stop times fall partially or completely in @segment, %FALSE if the values are completely outside of the segment. a #GstSegment structure. the format of the segment. the start position in the segment the stop position in the segment the clipped start position in the segment the clipped stop position in the segment Create a copy of given @segment. Free-function: gst_segment_free a new #GstSegment, free with gst_segment_free(). a #GstSegment Copy the contents of @src into @dest. a #GstSegment a #GstSegment Update the segment structure with the field values of a seek event (see gst_event_new_seek()). After calling this method, the segment field position and time will contain the requested new position in the segment. The new requested position in the segment depends on @rate and @start_type and @stop_type. For positive @rate, the new position in the segment is the new @segment start field when it was updated with a @start_type different from #GST_SEEK_TYPE_NONE. If no update was performed on @segment start position (#GST_SEEK_TYPE_NONE), @start is ignored and @segment position is unmodified. For negative @rate, the new position in the segment is the new @segment stop field when it was updated with a @stop_type different from #GST_SEEK_TYPE_NONE. If no stop was previously configured in the segment, the duration of the segment will be used to update the stop position. If no update was performed on @segment stop position (#GST_SEEK_TYPE_NONE), @stop is ignored and @segment position is unmodified. The applied rate of the segment will be set to 1.0 by default. If the caller can apply a rate change, it should update @segment rate and applied_rate after calling this function. @update will be set to %TRUE if a seek should be performed to the segment position field. This field can be %FALSE if, for example, only the @rate has been changed but not the playback position. %TRUE if the seek could be performed. a #GstSegment structure. the rate of the segment. the format of the segment. the segment flags for the segment the seek method the seek start value the seek method the seek stop value boolean holding whether position was updated. Free the allocated segment @segment. a #GstSegment The start/position fields are set to 0 and the stop/duration fields are set to -1 (unknown). The default rate of 1.0 and no flags are set. Initialize @segment to its default values. a #GstSegment structure. the format of the segment. Checks for two segments being equal. Equality here is defined as perfect equality, including floating point values. %TRUE if the segments are equal, %FALSE otherwise. a #GstSegment structure. a #GstSegment structure. Adjust the values in @segment so that @offset is applied to all future running-time calculations. %TRUE if the segment could be updated successfully. If %FALSE is returned, @offset is not in @segment. a #GstSegment structure. the format of the segment. the offset to apply in the segment Convert @running_time into a position in the segment so that gst_segment_to_running_time() with that position returns @running_time. the position in the segment for @running_time. This function returns -1 when @running_time is -1 or when it is not inside @segment. a #GstSegment structure. the format of the segment. the running_time in the segment Translate @running_time to the segment position using the currently configured segment. Compared to gst_segment_position_from_running_time() this function can return negative segment position. This function is typically used by elements that need to synchronize buffers against the clock or each other. @running_time can be any value and the result of this function for values outside of the segment is extrapolated. When 1 is returned, @running_time resulted in a positive position returned in @position. When this function returns -1, the returned @position was < 0, and the value in the position variable should be negated to get the real negative segment position. a 1 or -1 on success, 0 on failure. a #GstSegment structure. the format of the segment. the running-time the resulting position in the segment Convert @stream_time into a position in the segment so that gst_segment_to_stream_time() with that position returns @stream_time. the position in the segment for @stream_time. This function returns -1 when @stream_time is -1 or when it is not inside @segment. a #GstSegment structure. the format of the segment. the stream_time in the segment Translate @stream_time to the segment position using the currently configured segment. Compared to gst_segment_position_from_stream_time() this function can return negative segment position. This function is typically used by elements that need to synchronize buffers against the clock or each other. @stream_time can be any value and the result of this function for values outside of the segment is extrapolated. When 1 is returned, @stream_time resulted in a positive position returned in @position. When this function returns -1, the returned @position should be negated to get the real negative segment position. a 1 or -1 on success, 0 on failure. a #GstSegment structure. the format of the segment. the stream-time the resulting position in the segment Adjust the start/stop and base values of @segment such that the next valid buffer will be one with @running_time. %TRUE if the segment could be updated successfully. If %FALSE is returned, @running_time is -1 or not in @segment. a #GstSegment structure. the format of the segment. the running_time in the segment Convert @running_time into a position in the segment so that gst_segment_to_running_time() with that position returns @running_time. Use gst_segment_position_from_running_time() instead. the position in the segment for @running_time. This function returns -1 when @running_time is -1 or when it is not inside @segment. a #GstSegment structure. the format of the segment. the running_time in the segment Translate @position to the total running time using the currently configured segment. Position is a value between @segment start and stop time. This function is typically used by elements that need to synchronize to the global clock in a pipeline. The running time is a constantly increasing value starting from 0. When gst_segment_init() is called, this value will reset to 0. This function returns -1 if the position is outside of @segment start and stop. the position as the total running time or -1 when an invalid position was given. a #GstSegment structure. the format of the segment. the position in the segment Translate @position to the total running time using the currently configured segment. Compared to gst_segment_to_running_time() this function can return negative running-time. This function is typically used by elements that need to synchronize buffers against the clock or each other. @position can be any value and the result of this function for values outside of the segment is extrapolated. When 1 is returned, @position resulted in a positive running-time returned in @running_time. When this function returns -1, the returned @running_time should be negated to get the real negative running time. a 1 or -1 on success, 0 on failure. a #GstSegment structure. the format of the segment. the position in the segment result running-time Translate @position to stream time using the currently configured segment. The @position value must be between @segment start and stop value. This function is typically used by elements that need to operate on the stream time of the buffers it receives, such as effect plugins. In those use cases, @position is typically the buffer timestamp or clock time that one wants to convert to the stream time. The stream time is always between 0 and the total duration of the media stream. the position in stream_time or -1 when an invalid position was given. a #GstSegment structure. the format of the segment. the position in the segment Translate @position to the total stream time using the currently configured segment. Compared to gst_segment_to_stream_time() this function can return negative stream-time. This function is typically used by elements that need to synchronize buffers against the clock or each other. @position can be any value and the result of this function for values outside of the segment is extrapolated. When 1 is returned, @position resulted in a positive stream-time returned in @stream_time. When this function returns -1, the returned @stream_time should be negated to get the real negative stream time. a 1 or -1 on success, 0 on failure. a #GstSegment structure. the format of the segment. the position in the segment result stream-time Flags for the GstSegment structure. Currently mapped to the corresponding values of the seek flags. no flags reset the pipeline running_time to the segment running_time perform skip playback (Since: 1.6) Deprecated backward compatibility flag, replaced by @GST_SEGMENT_FLAG_TRICKMODE send SEGMENT_DONE instead of EOS Decode only keyframes, where possible (Since: 1.6) Decode only keyframes or forward predicted frames, where possible (Since: 1.18) Do not decode any audio, where possible (Since: 1.6) No special flags specified. Serialize using the old format for nested structures. Serialization fails if a value cannot be serialized instead of using placeholder "NULL" value (e.g. pointers, objects). The #GstSharedTaskPool object. Create a new shared task pool. The shared task pool will queue tasks on a maximum number of threads, 1 by default. Do not use a #GstSharedTaskPool to manage potentially inter-dependent tasks such as pad tasks, as having one task waiting on another to return before returning would cause obvious deadlocks if they happen to share the same thread. a new #GstSharedTaskPool. gst_object_unref() after usage. the maximum number of threads @pool is configured to spawn a #GstSharedTaskPool Update the maximal number of threads the @pool may spawn. When the maximal number of threads is reduced, existing threads are not immediately shut down, see g_thread_pool_set_max_threads(). Setting @max_threads to 0 effectively freezes the pool. a #GstSharedTaskPool Maximum number of threads to spawn. The #GstSharedTaskPoolClass object. Try to retrieve the minimum information available, which may be none on some platforms (Since: 1.18) Try to retrieve as much information as possible, including source information when getting the stack trace The possible states an element can be in. States can be changed using gst_element_set_state() and checked using gst_element_get_state(). no pending state. the NULL state or initial state of an element. the element is ready to go to PAUSED. the element is PAUSED, it is ready to accept and process data. Sink elements however only accept one buffer and then block. the element is PLAYING, the #GstClock is running and the data is flowing. These are the different state changes an element goes through. %GST_STATE_NULL &rArr; %GST_STATE_PLAYING is called an upwards state change and %GST_STATE_PLAYING &rArr; %GST_STATE_NULL a downwards state change. state change from NULL to READY. * The element must check if the resources it needs are available. Device sinks and -sources typically try to probe the device to constrain their caps. * The element opens the device (in case feature need to be probed). state change from READY to PAUSED. * The element pads are activated in order to receive data in PAUSED. Streaming threads are started. * Some elements might need to return %GST_STATE_CHANGE_ASYNC and complete the state change when they have enough information. It is a requirement for sinks to return %GST_STATE_CHANGE_ASYNC and complete the state change when they receive the first buffer or %GST_EVENT_EOS (preroll). Sinks also block the dataflow when in PAUSED. * A pipeline resets the running_time to 0. * Live sources return %GST_STATE_CHANGE_NO_PREROLL and don't generate data. state change from PAUSED to PLAYING. * Most elements ignore this state change. * The pipeline selects a #GstClock and distributes this to all the children before setting them to PLAYING. This means that it is only allowed to synchronize on the #GstClock in the PLAYING state. * The pipeline uses the #GstClock and the running_time to calculate the base_time. The base_time is distributed to all children when performing the state change. * Sink elements stop blocking on the preroll buffer or event and start rendering the data. * Sinks can post %GST_MESSAGE_EOS in the PLAYING state. It is not allowed to post %GST_MESSAGE_EOS when not in the PLAYING state. * While streaming in PAUSED or PLAYING elements can create and remove sometimes pads. * Live sources start generating data and return %GST_STATE_CHANGE_SUCCESS. state change from PLAYING to PAUSED. * Most elements ignore this state change. * The pipeline calculates the running_time based on the last selected #GstClock and the base_time. It stores this information to continue playback when going back to the PLAYING state. * Sinks unblock any #GstClock wait calls. * When a sink does not have a pending buffer to play, it returns #GST_STATE_CHANGE_ASYNC from this state change and completes the state change when it receives a new buffer or an %GST_EVENT_EOS. * Any queued %GST_MESSAGE_EOS items are removed since they will be reposted when going back to the PLAYING state. The EOS messages are queued in #GstBin containers. * Live sources stop generating data and return %GST_STATE_CHANGE_NO_PREROLL. state change from PAUSED to READY. * Sinks unblock any waits in the preroll. * Elements unblock any waits on devices * Chain or get_range functions return %GST_FLOW_FLUSHING. * The element pads are deactivated so that streaming becomes impossible and all streaming threads are stopped. * The sink forgets all negotiated formats * Elements remove all sometimes pads state change from READY to NULL. * Elements close devices * Elements reset any internal state. state change from NULL to NULL. (Since: 1.14) state change from READY to READY, This might happen when going to PAUSED asynchronously failed, in that case elements should make sure they are in a proper, coherent READY state. (Since: 1.14) state change from PAUSED to PAUSED. This might happen when elements were in PLAYING state and 'lost state', they should make sure to go back to real 'PAUSED' state (prerolling for example). (Since: 1.14) state change from PLAYING to PLAYING. (Since: 1.14) Gets a string representing the given state transition. a string with the name of the state result. a #GstStateChange to get the name of. The possible return values from a state change function such as gst_element_set_state(). Only @GST_STATE_CHANGE_FAILURE is a real failure. the state change failed the state change succeeded the state change will happen asynchronously the state change succeeded but the element cannot produce data in %GST_STATE_PAUSED. This typically happens with live sources. Data structure to initialize #GstCaps from a string description usually used in conjunction with GST_STATIC_CAPS() and gst_static_caps_get() to instantiate a #GstCaps. the cached #GstCaps a string describing a caps Cleans up the cached caps contained in @static_caps. the #GstStaticCaps to clean Converts a #GstStaticCaps to a #GstCaps. a pointer to the #GstCaps. Since the core holds an additional ref to the returned caps, use gst_caps_make_writable() on the returned caps to modify it. the #GstStaticCaps to convert Structure describing the #GstStaticPadTemplate. the name of the template the direction of the template the presence of the template the caps of the template. Converts a #GstStaticPadTemplate into a #GstPadTemplate. a new #GstPadTemplate. the static pad template Gets the capabilities of the static pad template. the #GstCaps of the static pad template. Unref after usage. Since the core holds an additional ref to the returned caps, use gst_caps_make_writable() on the returned caps to modify it. a #GstStaticPadTemplate to get capabilities of. A high-level object representing a single stream. It might be backed, or not, by an actual flow of data in a pipeline (#GstPad). A #GstStream does not care about data changes (such as decoding, encoding, parsing,...) as long as the underlying data flow corresponds to the same high-level flow (ex: a certain audio track). A #GstStream contains all the information pertinent to a stream, such as stream-id, tags, caps, type, ... Elements can subclass a #GstStream for internal usage (to contain information pertinent to streams of data). Create a new #GstStream for the given @stream_id, @caps, @type and @flags The new #GstStream the id for the new stream. If %NULL, a new one will be automatically generated the #GstCaps of the stream the #GstStreamType of the stream the #GstStreamFlags of the stream Retrieve the caps for @stream, if any The #GstCaps for @stream a #GstStream Retrieve the current stream flags for @stream The #GstStreamFlags for @stream a #GstStream Returns the stream ID of @stream. the stream ID of @stream. Only valid during the lifetime of @stream. a #GstStream Retrieve the stream type for @stream The #GstStreamType for @stream a #GstStream Retrieve the tags for @stream, if any The #GstTagList for @stream a #GstStream Set the caps for the #GstStream a #GstStream a #GstCaps Set the @flags for the @stream. a #GstStream the flags to set on @stream Set the stream type of @stream a #GstStream the type to set on @stream Set the tags for the #GstStream a #GstStream a #GstTagList The #GstCaps of the #GstStream. The unique identifier of the #GstStream. Can only be set at construction time. The #GstStreamType of the #GstStream. Can only be set at construction time. The #GstTagList of the #GstStream. The Stream Identifier for this #GstStream GstStream class structure the parent class structure A collection of #GstStream that are available. A #GstStreamCollection will be provided by elements that can make those streams available. Applications can use the collection to show the user what streams are available by using %gst_stream_collection_get_stream() Once posted, a #GstStreamCollection is immutable. Updates are made by sending a new #GstStreamCollection message, which may or may not share some of the #GstStream objects from the collection it replaces. The receiver can check the sender of a stream collection message to know which collection is obsoleted. Several elements in a pipeline can provide #GstStreamCollection. Applications can activate streams from a collection by using the #GST_EVENT_SELECT_STREAMS event on a pipeline, bin or element. Create a new #GstStreamCollection. The new #GstStreamCollection. The stream id of the parent stream default signal handler for the stream-notify signal Add the given @stream to the @collection. %TRUE if the @stream was properly added, else %FALSE a #GstStreamCollection the #GstStream to add Get the number of streams this collection contains The number of streams that @collection contains a #GstStreamCollection Retrieve the #GstStream with index @index from the collection. The caller should not modify the returned #GstStream A #GstStream a #GstStreamCollection Index of the stream to retrieve Returns the upstream id of the @collection. The upstream id a #GstStreamCollection stream-id The stream notify signal is used to be notified of property changes to streams within the collection. the #GstStream that originated the signal the property that changed GstStreamCollection class structure the parent class structure default signal handler for the stream-notify signal Stream errors are for anything related to the stream being processed: format errors, media type errors, ... They're typically used by decoders, demuxers, converters, ... a general error which doesn't fit in any other category. Make sure you add a custom message to the error call. do not use this except as a placeholder for deciding where to go while developing code. use this when you do not want to implement this functionality yet. used when the element doesn't know the stream's type. used when the element doesn't handle this type of stream. used when there's no codec to handle the stream's type. used when decoding fails. used when encoding fails. used when demuxing fails. used when muxing fails. used when the stream is of the wrong format (for example, wrong caps). used when the stream is encrypted and can't be decrypted because this is not supported by the element. used when the stream is encrypted and can't be decrypted because no suitable key is available. the number of stream error types. This stream has no special attributes This stream is a sparse stream (e.g. a subtitle stream), data may flow only in irregular intervals with large gaps in between. This stream should be selected by default. This flag may be used by demuxers to signal that a stream should be selected by default in a playback scenario. This stream should not be selected by default. This flag may be used by demuxers to signal that a stream should not be selected by default in a playback scenario, but only if explicitly selected by the user (e.g. an audio track for the hard of hearing or a director's commentary track). The type of a %GST_MESSAGE_STREAM_STATUS. The stream status messages inform the application of new streaming threads and their status. A new thread need to be created. a thread entered its loop function a thread left its loop function a thread is destroyed a thread is started a thread is paused a thread is stopped #GstStreamType describes a high level classification set for flows of data in #GstStream objects. Note that this is a flag, and therefore users should not assume it will be a single value. Do not use the equality operator for checking whether a stream is of a certain type. The stream is of unknown (unclassified) type. The stream is of audio data The stream carries video data The stream is a muxed container type The stream contains subtitle / subpicture data. Get a descriptive string for a given #GstStreamType A string describing the stream type a #GstStreamType A #GstStructure is a collection of key/value pairs. The keys are expressed as GQuarks and the values can be of any GType. In addition to the key/value pairs, a #GstStructure also has a name. The name starts with a letter and can be filled by letters, numbers and any of "/-_.:". #GstStructure is used by various GStreamer subsystems to store information in a flexible and extensible way. A #GstStructure does not have a refcount because it usually is part of a higher level object such as #GstCaps, #GstMessage, #GstEvent, #GstQuery. It provides a means to enforce mutability using the refcount of the parent with the gst_structure_set_parent_refcount() method. A #GstStructure can be created with gst_structure_new_empty() or gst_structure_new(), which both take a name and an optional set of key/value pairs along with the types of the values. Field values can be changed with gst_structure_set_value() or gst_structure_set(). Field values can be retrieved with gst_structure_get_value() or the more convenient gst_structure_get_*() functions. Fields can be removed with gst_structure_remove_field() or gst_structure_remove_fields(). Strings in structures must be ASCII or UTF-8 encoded. Other encodings are not allowed. Strings may be %NULL however. ## The serialization format GstStructure serialization format serialize the GstStructure name, keys/GType/values in a comma separated list with the structure name as first field without value followed by separated key/value pairs in the form `key=value`, for example: ``` a-structure, key=value ```` The values type will be inferred if not explicitly specified with the `(GTypeName)value` syntax, for example the following struct will have one field called 'is-string' which has the string 'true' as a value: ``` a-struct, field-is-string=(string)true, field-is-boolean=true ``` *Note*: without specifying `(string), `field-is-string` type would have been inferred as boolean. *Note*: we specified `(string)` as a type even if `gchararray` is the actual GType name as for convenience some well known types have been aliased or abbreviated. To avoid specifying the type, you can give some hints to the "type system". For example to specify a value as a double, you should add a decimal (ie. `1` is an `int` while `1.0` is a `double`). *Note*: when a structure is serialized with #gst_structure_to_string, all values are explicitly typed. Some types have special delimiters: - [GstValueArray](GST_TYPE_ARRAY) are inside "less and greater than" (`<` and `>`). For example `a-structure, array=<1, 2, 3> - Ranges are inside brackets (`[` and `]`). For example `a-structure, range=[1, 6, 2]` 1 being the min value, 6 the maximum and 2 the step. To specify a #GST_TYPE_INT64_RANGE you need to explicitly specify it like: `a-structure, a-int64-range=(gint64) [1, 5]` - [GstValueList](GST_TYPE_LIST) are inside curly brackets (`{` and `}`). For example `a-structure, list={1, 2, 3}` Structures are delimited either by a null character `\0` or a semicolon `;` the latter allowing to store multiple structures in the same string (see #GstCaps). Quotes are used as "default" delimiters and can be used around any types that don't use other delimiters (for example `a-struct, i=(int)"1"`). They are use to allow adding spaces or special characters (such as delimiters, semicolumns, etc..) inside strings and you can use backslashes `\` to escape characters inside them, for example: ``` a-struct, special="\"{[(;)]}\" can be used inside quotes" ``` They also allow for nested structure, such as: ``` a-struct, nested=(GstStructure)"nested-struct, nested=true" ``` Since 1.20, nested structures and caps can be specified using brackets (`[` and `]`), for example: ``` a-struct, nested=[nested-struct, nested=true] ``` > *note*: gst_structure_to_string() won't use that syntax for backward > compatibility reason, gst_structure_serialize_full() has been added for > that purpose. the GType of a structure Creates a #GstStructure from a string representation. If end is not %NULL, a pointer to the place inside the given string where parsing ended will be returned. Free-function: gst_structure_free a new #GstStructure or %NULL when the string could not be parsed. Free with gst_structure_free() after use. a string representation of a #GstStructure. pointer to store the end of the string in. Creates a new #GstStructure with the given name. Parses the list of variable arguments and sets fields to the values listed. Variable arguments should be passed as field name, field type, and value. Last variable argument should be %NULL. Free-function: gst_structure_free a new #GstStructure name of new structure name of first field to set additional arguments Creates a new, empty #GstStructure with the given @name. See gst_structure_set_name() for constraints on the @name parameter. Free-function: gst_structure_free a new, empty #GstStructure name of new structure Creates a #GstStructure from a string representation. If end is not %NULL, a pointer to the place inside the given string where parsing ended will be returned. The current implementation of serialization will lead to unexpected results when there are nested #GstCaps / #GstStructure deeper than one level unless the gst_structure_serialize() function is used (without #GST_SERIALIZE_FLAG_BACKWARD_COMPAT) Free-function: gst_structure_free a new #GstStructure or %NULL when the string could not be parsed. Free with gst_structure_free() after use. a string representation of a #GstStructure Creates a new #GstStructure with the given name as a GQuark, followed by fieldname quark, GType, argument(s) "triplets" in the same format as gst_structure_id_set(). Basically a convenience wrapper around gst_structure_new_id_empty() and gst_structure_id_set(). The last variable argument must be %NULL (or 0). Free-function: gst_structure_free Use gst_structure_new_id_str(). a new #GstStructure name of new structure the GQuark for the name of the field to set variable arguments Creates a new, empty #GstStructure with the given name as a GQuark. Free-function: gst_structure_free Use gst_structure_new_id_str_empty(). a new, empty #GstStructure name of new structure Creates a new #GstStructure with the given name as a GQuark, followed by fieldname GstIdStr, GType, argument(s) "triplets" in the same format as gst_structure_id_str_set(). Basically a convenience wrapper around gst_structure_new_id_str_empty() and gst_structure_id_str_set(). The last variable argument must be %NULL (or 0). Free-function: gst_structure_free a new #GstStructure name of new structure the GstIdStr for the name of the field to set variable arguments Creates a new, empty #GstStructure with the given name. Free-function: gst_structure_free a new, empty #GstStructure name of new structure Creates a new #GstStructure with the given @name. Structure fields are set according to the varargs in a manner similar to gst_structure_new_id_str(). Free-function: gst_structure_free a new #GstStructure name of new structure name of first field to set variable argument list Creates a new #GstStructure with the given name. Parses the list of variable arguments and sets fields to the values listed. Variable arguments should be passed as field name, field type, and value. Last variable argument should be %NULL. @name, @firstfield and all field names need to be valid for the remaining lifetime of the process, e.g. have to be a static string. Free-function: gst_structure_free a new #GstStructure name of new structure name of first field to set additional arguments Creates a new, empty #GstStructure with the given @name. See gst_structure_set_name() for constraints on the @name parameter. @name needs to be valid for the remaining lifetime of the process, e.g. has to be a static string. Free-function: gst_structure_free a new, empty #GstStructure name of new structure Creates a new #GstStructure with the given @name. Structure fields are set according to the varargs in a manner similar to gst_structure_new(). See gst_structure_set_name() for constraints on the @name parameter. @name, @firstfield and all field names need to be valid for the remaining lifetime of the process, e.g. have to be a static string. Free-function: gst_structure_free a new #GstStructure name of new structure name of first field to set variable argument list Creates a new #GstStructure with the given @name. Structure fields are set according to the varargs in a manner similar to gst_structure_new(). See gst_structure_set_name() for constraints on the @name parameter. Free-function: gst_structure_free a new #GstStructure name of new structure name of first field to set variable argument list Tries intersecting @struct1 and @struct2 and reports whether the result would not be empty. %TRUE if intersection would not be empty a #GstStructure a #GstStructure Duplicates a #GstStructure and all its fields and values. Free-function: gst_structure_free a new #GstStructure. a #GstStructure to duplicate Calls the provided function once for each field in the #GstStructure. In contrast to gst_structure_foreach(), the function may modify the fields. In contrast to gst_structure_map_in_place(), the field is removed from the structure if %FALSE is returned from the function. The structure must be mutable. Use gst_structure_filter_and_map_in_place_id_str(). a #GstStructure a function to call for each field private data Calls the provided function once for each field in the #GstStructure. In contrast to gst_structure_foreach_id_str(), the function may modify the fields. In contrast to gst_structure_map_in_place_id_str(), the field is removed from the structure if %FALSE is returned from the function. The structure must be mutable. a #GstStructure a function to call for each field private data Fixate all values in @structure using gst_value_fixate(). @structure will be modified in-place and should be writable. a #GstStructure Fixates a #GstStructure by changing the given field with its fixated value. %TRUE if the structure field could be fixated a #GstStructure a field in @structure Fixates a #GstStructure by changing the given @field_name field to the given @target boolean if that field is not fixed yet. %TRUE if the structure could be fixated a #GstStructure a field in @structure the target value of the fixation Fixates a #GstStructure by changing the given field to the nearest double to @target that is a subset of the existing field. %TRUE if the structure could be fixated a #GstStructure a field in @structure the target value of the fixation Fixates a #GstStructure by changing the given field to the nearest fraction to @target_numerator/@target_denominator that is a subset of the existing field. %TRUE if the structure could be fixated a #GstStructure a field in @structure The numerator of the target value of the fixation The denominator of the target value of the fixation Fixates a #GstStructure by changing the given field to the nearest integer to @target that is a subset of the existing field. %TRUE if the structure could be fixated a #GstStructure a field in @structure the target value of the fixation Fixates a #GstStructure by changing the given @field_name field to the given @target string if that field is not fixed yet. %TRUE if the structure could be fixated a #GstStructure a field in @structure the target value of the fixation Calls the provided function once for each field in the #GstStructure. The function must not modify the fields. Also see gst_structure_map_in_place() and gst_structure_filter_and_map_in_place(). Use gst_structure_foreach_id_str(). %TRUE if the supplied function returns %TRUE For each of the fields, %FALSE otherwise. a #GstStructure a function to call for each field private data Calls the provided function once for each field in the #GstStructure. The function must not modify the fields. Also see gst_structure_map_in_place_id_str() and gst_structure_filter_and_map_in_place_id_str(). %TRUE if the supplied function returns %TRUE For each of the fields, %FALSE otherwise. a #GstStructure a function to call for each field private data Frees a #GstStructure and all its fields and values. The structure must not have a parent when this function is called. the #GstStructure to free Parses the variable arguments and reads fields from @structure accordingly. Variable arguments should be in the form field name, field type (as a GType), pointer(s) to a variable(s) to hold the return value(s). The last variable argument should be %NULL. For refcounted (mini)objects you will receive a new reference which you must release with a suitable _unref\() when no longer needed. For strings and boxed types you will receive a copy which you will need to release with either g_free() or the suitable function for the boxed type. %FALSE if there was a problem reading any of the fields (e.g. because the field requested did not exist, or was of a type other than the type specified), otherwise %TRUE. a #GstStructure the name of the first field to read variable arguments This is useful in language bindings where unknown #GValue types are not supported. This function will convert the %GST_TYPE_ARRAY into a newly allocated #GValueArray and return it through @array. Be aware that this is slower then getting the #GValue directly. %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain a %GST_TYPE_ARRAY, this function returns %FALSE. a #GstStructure the name of a field a pointer to a #GValueArray Sets the boolean pointed to by @value corresponding to the value of the given field. Caller is responsible for making sure the field exists and has the correct type. %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain a boolean, this function returns %FALSE. a #GstStructure the name of a field a pointer to a #gboolean to set Sets the clock time pointed to by @value corresponding to the clock time of the given field. Caller is responsible for making sure the field exists and has the correct type. %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain a #GstClockTime, this function returns %FALSE. a #GstStructure the name of a field a pointer to a #GstClockTime to set Sets the date pointed to by @value corresponding to the date of the given field. Caller is responsible for making sure the field exists and has the correct type. On success @value will point to a newly-allocated copy of the date which should be freed with g_date_free() when no longer needed (note: this is inconsistent with e.g. gst_structure_get_string() which doesn't return a copy of the string). %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain a data, this function returns %FALSE. a #GstStructure the name of a field a pointer to a #GDate to set Sets the datetime pointed to by @value corresponding to the datetime of the given field. Caller is responsible for making sure the field exists and has the correct type. On success @value will point to a reference of the datetime which should be unreffed with gst_date_time_unref() when no longer needed (note: this is inconsistent with e.g. gst_structure_get_string() which doesn't return a copy of the string). %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain a data, this function returns %FALSE. a #GstStructure the name of a field a pointer to a #GstDateTime to set Sets the double pointed to by @value corresponding to the value of the given field. Caller is responsible for making sure the field exists and has the correct type. %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain a double, this function returns %FALSE. a #GstStructure the name of a field a pointer to a gdouble to set Sets the int pointed to by @value corresponding to the value of the given field. Caller is responsible for making sure the field exists, has the correct type and that the enumtype is correct. %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain an enum of the given type, this function returns %FALSE. a #GstStructure the name of a field the enum type of a field a pointer to an int to set Finds the field with the given name, and returns the type of the value it contains. If the field is not found, G_TYPE_INVALID is returned. the #GValue of the field a #GstStructure the name of the field Sets the unsigned int pointed to by @value corresponding to the value of the given field. Caller is responsible for making sure the field exists, has the correct type and that the flagstype is correct. %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain flags or did not contain flags of the given type, this function returns %FALSE. a #GstStructure the name of a field the flags type of a field a pointer to an unsigned int to set Read the GstFlagSet flags and mask out of the structure into the provided pointers. %TRUE if the values could be set correctly. If there was no field with @fieldname or the existing field did not contain a GstFlagSet, this function returns %FALSE. a #GstStructure the name of a field a pointer to a guint for the flags field a pointer to a guint for the mask field Sets the integers pointed to by @value_numerator and @value_denominator corresponding to the value of the given field. Caller is responsible for making sure the field exists and has the correct type. %TRUE if the values could be set correctly. If there was no field with @fieldname or the existing field did not contain a GstFraction, this function returns %FALSE. a #GstStructure the name of a field a pointer to an int to set a pointer to an int to set Sets the int pointed to by @value corresponding to the value of the given field. Caller is responsible for making sure the field exists and has the correct type. %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain an int, this function returns %FALSE. a #GstStructure the name of a field a pointer to an int to set Sets the #gint64 pointed to by @value corresponding to the value of the given field. Caller is responsible for making sure the field exists and has the correct type. %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain a #gint64, this function returns %FALSE. a #GstStructure the name of a field a pointer to a #gint64 to set This is useful in language bindings where unknown #GValue types are not supported. This function will convert the %GST_TYPE_LIST into a newly allocated GValueArray and return it through @array. Be aware that this is slower then getting the #GValue directly. %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain a %GST_TYPE_LIST, this function returns %FALSE. a #GstStructure the name of a field a pointer to a #GValueArray Get the name of @structure as a string. the name of the structure. a #GstStructure Get the name of @structure as a GQuark. Use gst_structure_get_name_id_str(). the quark representing the name of the structure. a #GstStructure Get the name of @structure as a GstIdStr. the name of the structure. a #GstStructure Finds the field corresponding to @fieldname, and returns the string contained in the field's value. Caller is responsible for making sure the field exists and has the correct type. The string should not be modified, and remains valid until the next call to a gst_structure_*() function with the given structure. a pointer to the string or %NULL when the field did not exist or did not contain a string. a #GstStructure the name of a field Sets the uint pointed to by @value corresponding to the value of the given field. Caller is responsible for making sure the field exists and has the correct type. %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain a uint, this function returns %FALSE. a #GstStructure the name of a field a pointer to a uint to set Sets the #guint64 pointed to by @value corresponding to the value of the given field. Caller is responsible for making sure the field exists and has the correct type. %TRUE if the value could be set correctly. If there was no field with @fieldname or the existing field did not contain a #guint64, this function returns %FALSE. a #GstStructure the name of a field a pointer to a #guint64 to set Parses the variable arguments and reads fields from @structure accordingly. valist-variant of gst_structure_get(). Look at the documentation of gst_structure_get() for more details. %TRUE, or %FALSE if there was a problem reading any of the fields a #GstStructure the name of the first field to read variable arguments Get the value of the field with name @fieldname. the #GValue corresponding to the field with the given name. a #GstStructure the name of the field to get Check if @structure contains a field named @fieldname. %TRUE if the structure contains a field with the given name a #GstStructure the name of a field Check if @structure contains a field named @fieldname and with GType @type. %TRUE if the structure contains a field with the given name and type a #GstStructure the name of a field the type of a value Checks if the structure has the given name %TRUE if @name matches the name of the structure. a #GstStructure structure name to check for Parses the variable arguments and reads fields from @structure accordingly. Variable arguments should be in the form field id quark, field type (as a GType), pointer(s) to a variable(s) to hold the return value(s). The last variable argument should be %NULL (technically it should be a 0 quark, but we require %NULL so compilers that support it can check for the %NULL terminator and warn if it's not there). This function is just like gst_structure_get() only that it is slightly more efficient since it saves the string-to-quark lookup in the global quark hashtable. For refcounted (mini)objects you will receive a new reference which you must release with a suitable _unref\() when no longer needed. For strings and boxed types you will receive a copy which you will need to release with either g_free() or the suitable function for the boxed type. Use gst_structure_id_str_get(). %FALSE if there was a problem reading any of the fields (e.g. because the field requested did not exist, or was of a type other than the type specified), otherwise %TRUE. a #GstStructure the quark of the first field to read variable arguments Parses the variable arguments and reads fields from @structure accordingly. valist-variant of gst_structure_id_get(). Look at the documentation of gst_structure_id_get() for more details. Use gst_structure_id_str_get_valist(). %TRUE, or %FALSE if there was a problem reading any of the fields a #GstStructure the quark of the first field to read variable arguments Get the value of the field with GQuark @field. the #GValue corresponding to the field with the given name identifier. a #GstStructure the #GQuark of the field to get Check if @structure contains a field named @field. Use gst_structure_id_str_has_field(). %TRUE if the structure contains a field with the given name a #GstStructure #GQuark of the field name Check if @structure contains a field named @field and with GType @type. Use gst_structure_id_str_has_field_typed(). %TRUE if the structure contains a field with the given name and type a #GstStructure #GQuark of the field name the type of a value Identical to gst_structure_set, except that field names are passed using the GQuark for the field name. This allows more efficient setting of the structure if the caller already knows the associated quark values. The last variable argument must be %NULL. Use gst_structure_id_str_set(). a #GstStructure the GQuark for the name of the field to set variable arguments va_list form of gst_structure_id_set(). Use gst_structure_id_str_set_valist(). a #GstStructure the name of the field to set variable arguments Sets the field with the given GQuark @field to @value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed. Use gst_structure_id_str_set_value(). a #GstStructure a #GQuark representing a field the new value of the field Parses the variable arguments and reads fields from @structure accordingly. Variable arguments should be in the form field name (as GstIdStr), field type (as a GType), pointer(s) to a variable(s) to hold the return value(s). The last variable argument should be %NULL. For refcounted (mini)objects you will receive a new reference which you must release with a suitable _unref\() when no longer needed. For strings and boxed types you will receive a copy which you will need to release with either g_free() or the suitable function for the boxed type. %FALSE if there was a problem reading any of the fields (e.g. because the field requested did not exist, or was of a type other than the type specified), otherwise %TRUE. a #GstStructure the name of the first field to read variable arguments Finds the field with the given name, and returns the type of the value it contains. If the field is not found, G_TYPE_INVALID is returned. the #GValue of the field a #GstStructure the name of the field Parses the variable arguments and reads fields from @structure accordingly. valist-variant of gst_structure_id_str_get(). Look at the documentation of gst_structure_id_str_get() for more details. %TRUE, or %FALSE if there was a problem reading any of the fields a #GstStructure the name of the first field to read variable arguments Get the value of the field with name @fieldname. the #GValue corresponding to the field with the given name. a #GstStructure the name of the field to get Check if @structure contains a field named @fieldname. %TRUE if the structure contains a field with the given name a #GstStructure the name of a field Check if @structure contains a field named @fieldname and with GType @type. %TRUE if the structure contains a field with the given name and type a #GstStructure the name of a field the type of a value Get the name (as a GstIdStr) of the given field number, counting from 0 onwards. the name of the given field number a #GstStructure the index to get the name of Removes the field with the given name. If the field with the given name does not exist, the structure is unchanged. a #GstStructure the name of the field to remove Removes the fields with the given names. If a field does not exist, the argument is ignored. a #GstStructure the name of the field to remove %NULL-terminated list of more fieldnames to remove va_list form of gst_structure_id_str_remove_fields(). a #GstStructure the name of the field to remove %NULL-terminated list of more fieldnames to remove Identical to gst_structure_set, except that field names are passed using a GstIdStr for the field name. This allows more efficient setting of the structure if the caller already owns the associated GstIdStr values or if they can be built from static literals. The last variable argument must be %NULL. a #GstStructure the the name of the field to set variable arguments va_list form of gst_structure_id_str_set(). a #GstStructure the name of the field to set variable arguments Sets the field with the given name @field to @value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed. a #GstStructure the name of the field to set the new value of the field Sets the field with the given GstIdStr @field to @value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed. a #GstStructure the name of the field to set the new value of the field Sets the field with the given GQuark @field to @value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed. Use gst_structure_id_str_take_value(). a #GstStructure a #GQuark representing a field the new value of the field Intersects @struct1 and @struct2 and returns the intersection. Intersection of @struct1 and @struct2 a #GstStructure a #GstStructure Tests if the two #GstStructure are equal. %TRUE if the two structures have the same name and field. a #GstStructure. a #GstStructure. Checks if @subset is a subset of @superset, i.e. has the same structure name and for all fields that are existing in @superset, @subset has a value that is a subset of the value in @superset. %TRUE if @subset is a subset of @superset a #GstStructure a potentially greater #GstStructure Calls the provided function once for each field in the #GstStructure. In contrast to gst_structure_foreach(), the function may modify but not delete the fields. The structure must be mutable. Use gst_structure_map_in_place_id_str(). %TRUE if the supplied function returns %TRUE For each of the fields, %FALSE otherwise. a #GstStructure a function to call for each field private data Calls the provided function once for each field in the #GstStructure. In contrast to gst_structure_foreach_id_str(), the function may modify but not delete the fields. The structure must be mutable. %TRUE if the supplied function returns %TRUE For each of the fields, %FALSE otherwise. a #GstStructure a function to call for each field private data Get the number of fields in the structure. the number of fields in the structure a #GstStructure Get the name of the given field number, counting from 0 onwards. the name of the given field number a #GstStructure the index to get the name of Removes all fields in a GstStructure. a #GstStructure Removes the field with the given name. If the field with the given name does not exist, the structure is unchanged. a #GstStructure the name of the field to remove Removes the fields with the given names. If a field does not exist, the argument is ignored. a #GstStructure the name of the field to remove %NULL-terminated list of more fieldnames to remove va_list form of gst_structure_remove_fields(). a #GstStructure the name of the field to remove %NULL-terminated list of more fieldnames to remove Converts @structure to a human-readable string representation. This version of the caps serialization function introduces support for nested structures and caps but the resulting strings won't be parsable with GStreamer prior to 1.20 unless #GST_SERIALIZE_FLAG_BACKWARD_COMPAT is passed as @flag. %GST_SERIALIZE_FLAG_STRICT flags is not allowed because it would make this function nullable which is an API break for bindings. Use gst_structure_serialize_full() instead. Free-function: g_free Use gst_structure_serialize_full() instead. a pointer to string allocated by g_malloc(). g_free() after usage. a #GstStructure The flags to use to serialize structure Alias for gst_structure_serialize() but with nullable annotation because it can return %NULL when %GST_SERIALIZE_FLAG_STRICT flag is set. a pointer to string allocated by g_malloc(). g_free() after usage. a #GstStructure The flags to use to serialize structure Parses the variable arguments and sets fields accordingly. Fields that weren't already part of the structure are added as needed. Variable arguments should be in the form field name, field type (as a GType), value(s). The last variable argument should be %NULL. a #GstStructure the name of the field to set variable arguments This is useful in language bindings where unknown GValue types are not supported. This function will convert a @array to %GST_TYPE_ARRAY and set the field specified by @fieldname. Be aware that this is slower then using %GST_TYPE_ARRAY in a #GValue directly. a #GstStructure the name of a field a pointer to a #GValueArray This is useful in language bindings where unknown GValue types are not supported. This function will convert a @array to %GST_TYPE_LIST and set the field specified by @fieldname. Be aware that this is slower then using %GST_TYPE_LIST in a #GValue directly. a #GstStructure the name of a field a pointer to a #GValueArray Sets the name of the structure to the given @name. The string provided is copied before being used. It must not be empty, start with a letter and can be followed by letters, numbers and any of "/-_.:". a #GstStructure the new name of the structure Sets the name of the structure to the given @name. The string provided is copied before being used. It must not be empty, start with a letter and can be followed by letters, numbers and any of "/-_.:". a #GstStructure the new name of the structure Sets the name of the structure to the given @name. The string provided is copied before being used. It must not be empty, start with a letter and can be followed by letters, numbers and any of "/-_.:". @name needs to be valid for the remaining lifetime of the process, e.g. has to be a static string. a #GstStructure the new name of the structure Sets the parent_refcount field of #GstStructure. This field is used to determine whether a structure is mutable or not. This function should only be called by code implementing parent objects of #GstStructure, as described in the MT Refcounting section of the design documents. %TRUE if the parent refcount could be set. a #GstStructure a pointer to the parent's refcount Parses the variable arguments and sets fields accordingly. Fields that weren't already part of the structure are added as needed. Variable arguments should be in the form field name, field type (as a GType), value(s). The last variable argument should be %NULL. @fieldname and all other field names needs to be valid for the remaining lifetime of the process, e.g. has to be a static string. a #GstStructure the name of the field to set variable arguments va_list form of gst_structure_set_static_str(). @fieldname and all other field names needs to be valid for the remaining lifetime of the process, e.g. has to be a static string. a #GstStructure the name of the field to set variable arguments va_list form of gst_structure_set(). a #GstStructure the name of the field to set variable arguments Sets the field with the given name @field to @value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed. a #GstStructure the name of the field to set the new value of the field Sets the field with the given name @field to @value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed. @fieldname needs to be valid for the remaining lifetime of the process, e.g. has to be a static string. a #GstStructure the name of the field to set the new value of the field Sets the field with the given name @field to @value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed. The function will take ownership of @value. a #GstStructure the name of the field to set the new value of the field Sets the field with the given name @field to @value. If the field does not exist, it is created. If the field exists, the previous value is replaced and freed. The function will take ownership of @value. @fieldname needs to be valid for the remaining lifetime of the process, e.g. has to be a static string. a #GstStructure the name of the field to set the new value of the field Converts @structure to a human-readable string representation. For debugging purposes its easier to do something like this: |[<!-- language="C" --> GST_LOG ("structure is %" GST_PTR_FORMAT, structure); ]| This prints the structure in human readable form. This function will lead to unexpected results when there are nested #GstCaps / #GstStructure deeper than one level, you should user gst_structure_serialize_full() instead for those cases. Free-function: g_free a pointer to string allocated by g_malloc(). g_free() after usage. a #GstStructure Atomically modifies a pointer to point to a new structure. The #GstStructure @oldstr_ptr is pointing to is freed and @newstr is taken ownership over. Either @newstr and the value pointed to by @oldstr_ptr may be %NULL. It is a programming error if both @newstr and the value pointed to by @oldstr_ptr refer to the same, non-%NULL structure. %TRUE if @newstr was different from @oldstr_ptr pointer to a place of a #GstStructure to take a new #GstStructure The type of a %GST_MESSAGE_STRUCTURE_CHANGE. Pad linking is starting or done. Pad unlinking is starting or done. A function that will be called in gst_structure_filter_and_map_in_place(). The function may modify @value, and the value will be removed from the structure if %FALSE is returned. %TRUE if the field should be preserved, %FALSE if it should be removed. the #GQuark of the field name the #GValue of the field user data A function that will be called in gst_structure_filter_and_map_in_place_id_str(). The function may modify @value, and the value will be removed from the structure if %FALSE is returned. %TRUE if the field should be preserved, %FALSE if it should be removed. the #GstIdStr field name the #GValue of the field user data A function that will be called in gst_structure_foreach(). The function may not modify @value. %TRUE if the foreach operation should continue, %FALSE if the foreach operation should stop with %FALSE. the #GQuark of the field name the #GValue of the field user data A function that will be called in gst_structure_foreach_id_str(). The function may not modify @value. %TRUE if the foreach operation should continue, %FALSE if the foreach operation should stop with %FALSE. the #GstIdStr field name the #GValue of the field user data A function that will be called in gst_structure_map_in_place(). The function may modify @value. %TRUE if the map operation should continue, %FALSE if the map operation should stop with %FALSE. the #GQuark of the field name the #GValue of the field user data A function that will be called in gst_structure_map_in_place_id_str(). The function may modify @value. %TRUE if the map operation should continue, %FALSE if the map operation should stop with %FALSE. the #GstIdStr field name the #GValue of the field user data The GStreamer core provides a GstSystemClock based on the system time. Asynchronous callbacks are scheduled from an internal thread. Clock implementors are encouraged to subclass this systemclock as it implements the async notification. Subclasses can however override all of the important methods for sync and async notifications to implement their own callback methods or blocking wait operations. Get a handle to the default system clock. The refcount of the clock will be increased so you need to unref the clock after usage. the default clock. MT safe. Sets the default system clock that can be obtained with gst_system_clock_obtain(). This is mostly used for testing and debugging purposes when you want to have control over the time reported by the default system clock. MT safe. a #GstClock album containing this data (string) The album name as it should be displayed, e.g. 'The Jazz Guitar' The artist of the entire album, as it should be displayed. The artist of the entire album, as it should be sorted. album gain in db (double) peak of the album (double) album containing this data, as used for sorting (string) The album name as it should be sorted, e.g. 'Jazz Guitar, The' count of discs inside collection this disc belongs to (unsigned integer) disc number inside a collection (unsigned integer) Arbitrary application data (sample) Some formats allow applications to add their own arbitrary data into files. This data is application dependent. Name of the application used to create the media (string) person(s) responsible for the recording (string) The artist name as it should be displayed, e.g. 'Jimi Hendrix' or 'The Guitar Heroes' person(s) responsible for the recording, as used for sorting (string) The artist name as it should be sorted, e.g. 'Hendrix, Jimi' or 'Guitar Heroes, The' generic file attachment (sample) (sample taglist should specify the content type and if possible set "filename" to the file name of the attachment) codec the audio data is stored in (string) number of beats per minute in audio (double) exact or average bitrate in bits/s (unsigned integer) codec the data is stored in (string) free text commenting the data (string) person(s) who composed the recording (string) The composer's name, used for sorting (string) conductor/performer refinement (string) contact information (string) container format the data is stored in (string) Unique identifier for the audio, video or text track this tag is associated with. The mappings for several container formats are defined in the [Sourcing In-band Media Resource Tracks from Media Containers into HTML specification](https://dev.w3.org/html5/html-sourcing-inband-tracks/). copyright notice of the data (string) URI to location where copyright details can be found (string) date the data was created (#GDate structure) date and time the data was created (#GstDateTime structure) short text describing the content of the data (string) Manufacturer of the device used to create the media (string) Model of the device used to create the media (string) length in GStreamer time units (nanoseconds) (unsigned 64-bit integer) name of the person or organisation that encoded the file. May contain a copyright message if the person or organisation also holds the copyright (string) Note: do not use this field to describe the encoding application. Use #GST_TAG_APPLICATION_NAME or #GST_TAG_COMMENT for that. encoder used to encode this stream (string) version of the encoder used to encode this stream (unsigned integer) key/value text commenting the data (string) Must be in the form of 'key=comment' or 'key[lc]=comment' where 'lc' is an ISO-639 language code. This tag is used for unknown Vorbis comment tags, unknown APE tags and certain ID3v2 comment fields. genre this data belongs to (string) Indicates the direction the device is pointing to when capturing a media. It is represented as degrees in floating point representation, 0 means the geographic north, and increases clockwise (double from 0 to 360) See also #GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION The city (english name) where the media has been produced (string). The country (english name) where the media has been produced (string). geo elevation of where the media has been recorded or produced in meters according to WGS84 (zero is average sea level) (double). Represents the expected error on the horizontal positioning in meters (double). geo latitude location of where the media has been recorded or produced in degrees according to WGS84 (zero at the equator, negative values for southern latitudes) (double). geo longitude location of where the media has been recorded or produced in degrees according to WGS84 (zero at the prime meridian in Greenwich/UK, negative values for western longitudes). (double). Indicates the movement direction of the device performing the capture of a media. It is represented as degrees in floating point representation, 0 means the geographic north, and increases clockwise (double from 0 to 360) See also #GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION Speed of the capturing device when performing the capture. Represented in m/s. (double) See also #GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION human readable descriptive location of where the media has been recorded or produced. (string). A location 'smaller' than GST_TAG_GEO_LOCATION_CITY that specifies better where the media has been produced. (e.g. the neighborhood) (string). This tag has been added as this is how it is handled/named in XMP's Iptc4xmpcore schema. Groups together media that are related and spans multiple tracks. An example are multiple pieces of a concerto. (string) Homepage for this media (i.e. artist or movie homepage) (string) image (sample) (sample taglist should specify the content type and preferably also set "image-type" field as `GstTagImageType`) Represents the 'Orientation' tag from EXIF. Defines how the image should be rotated and mirrored for display. (string) This tag has a predefined set of allowed values: "rotate-0" "rotate-90" "rotate-180" "rotate-270" "flip-rotate-0" "flip-rotate-90" "flip-rotate-180" "flip-rotate-270" The naming is adopted according to a possible transformation to perform on the image to fix its orientation, obviously equivalent operations will yield the same result. Rotations indicated by the values are in clockwise direction and 'flip' means an horizontal mirroring. Information about the people behind a remix and similar interpretations of another existing piece (string) International Standard Recording Code - see http://www.ifpi.org/isrc/ (string) comma separated keywords describing the content (string). ISO-639-2 or ISO-639-1 code for the language the content is in (string) There is utility API in libgsttag in gst-plugins-base to obtain a translated language name from the language code: `gst_tag_get_language_name()` Name of the language the content is in (string) Free-form name of the language the content is in, if a language code is not available. This tag should not be set in addition to a language code. It is undefined what language or locale the language name is in. license of data (string) URI to location where license details can be found (string) Origin of media as a URI (location, where the original of the file or stream is hosted) (string) The lyrics of the media (string) maximum bitrate in bits/s (unsigned integer) [Midi note number](http://en.wikipedia.org/wiki/Note#Note_designation_in_accordance_with_octave_name) of the audio track. This is useful for sample instruments and in particular for multi-samples. minimum bitrate in bits/s (unsigned integer) nominal bitrate in bits/s (unsigned integer). The actual bitrate might be different from this target bitrate. organization (string) person(s) performing (string) image that is meant for preview purposes, e.g. small icon-sized version (sample) (sample taglist should specify the content type) Any private data that may be contained in tags (sample). It is represented by #GstSample in which #GstBuffer contains the binary data and the sample's info #GstStructure may contain any extra information that identifies the origin or meaning of the data. Private frames in ID3v2 tags ('PRIV' frames) will be represented using this tag, in which case the GstStructure will be named "ID3PrivateFrame" and contain a field named "owner" of type string which contains the owner-identification string from the tag. Name of the label or publisher (string) reference level of track and album gain values (double) serial number of track (unsigned integer) Number of the episode within a season/show (unsigned integer) Name of the show, used for displaying (string) Number of the season of a show/series (unsigned integer) Name of the show, used for sorting (string) codec/format the subtitle data is stored in (string) commonly used title (string) The title as it should be displayed, e.g. 'The Doll House' commonly used title, as used for sorting (string) The title as it should be sorted, e.g. 'Doll House, The' count of tracks inside collection this track belongs to (unsigned integer) track gain in db (double) track number inside a collection (unsigned integer) peak of the track (double) Rating attributed by a person (likely the application user). The higher the value, the more the user likes this media (unsigned int from 0 to 100) version of this data (string) codec the video data is stored in (string) Send a broadcast signal to all waiting task conds Task to broadcast Get access to the cond of the task. Task to get the cond of Get access to the task lock. Task to get the lock of Signal the task cond Task to signal Get access to the state of the task. Task to get the state of Wait for the task cond to be signalled Task to wait for printf format type used to debug GStreamer ClockTime pointers. You can use this in combination with GStreamer's debug logging system as well as the functions gst_info_vasprintf(), gst_info_strdup_vprintf() and gst_info_strdup_printf() to pretty-print #GstClockTime pointers. This can only be used on pointers to GstClockTime values. Converts a struct timespec (see `man pselect`) to a #GstClockTime. the timespec to convert Converts a GTimeVal to a #GstClockTime. the timeval to convert Formats @t for the #GST_TIME_FORMAT format string. Note: @t will be evaluated more than once. a #GstClockTime Converts a #GstClockTime to milliseconds (1/1000 of a second). the time Converts a #GstClockTime to nanoseconds (1/1000000000 of a second). the time Converts a #GstClockTime to seconds. the time Converts a #GstClockTime to microseconds (1/1000000 of a second). the time A string that can be used in printf-like format strings to display a #GstClockTime value in `h:m:s` format. Use GST_TIME_ARGS() to construct the matching arguments. Example: ``` C printf("%" GST_TIME_FORMAT "\n", GST_TIME_ARGS(ts)); ``` Converts a #GstClockTime to a struct timespec (see `man pselect`) The #GstClockTime to convert The target timespec Converts a #GstClockTime to a GTimeVal > on many 32-bit systems, a timeval has a range of only 2^32 - 1 seconds, > which is about 68 years. Expect trouble if you want to schedule stuff > in your pipeline for 2038. This macro asserts that this case does not > happen. The #GstClockTime to convert The target timeval Checks if @entry_type indicates that its #GstTocEntry is an alternative. The #GstTocEntryType from a #GstTocEntry Checks if @entry_type indicates that its #GstTocEntry is a sequence. The #GstTocEntryType from a #GstTocEntry Special value for the repeat_count set in gst_toc_entry_set_loop() or returned by gst_toc_entry_set_loop() to indicate infinite looping. Output a tracing message in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. printf-style message to output Output a tracing message for the given identifier in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. An identifier of the message provider printf-style message to output Output a tracing message belonging to the given object in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. the #GObject the message belongs to printf-style message to output This macro can be used to register a type find into a #GstPlugin. This method will be usually called in the plugin init function but can also be called with a NULL plugin. The type find name in lower case, with words separated by '_'. The #GstPlugin where to register the type find. This macro can be used to declare a new type find. It has to be used in combination with #GST_TYPE_FIND_REGISTER_DEFINE macro and must be placed outside any block to declare the type find registration function. The type find name in lower case, with words separated by '_'. A convenience macro to define the entry point of a type find `gst_type_find_register_*(GstPlugin* plugin)`. The type find name in lower case, with words separated by '_'. Used to generate `gst_type_find_register_*(GstPlugin* plugin)`. The public name of the type find The #GstRank of the type find (higher rank means more importance when autoplugging, see #GstRank) The #GstTypeFindFunction to use Optional comma-separated list of extensions that could belong to this type Optionally the caps that could be returned when typefinding succeeds Optional user data. This user data must be available until the plugin is unloaded. a #GDestroyNotify that will be called on @data when the plugin is unloaded. A convenience macro to define the entry point of a type find `gst_type_find_register_*(GstPlugin* plugin)` which uses register_func as the main registration method for the type find. As an example, you may define the type find named "custom-typefind" as following using `type_find_register_custom`: ``` GST_TYPE_FIND_REGISTER_DEFINE_CUSTOM (plugin, type_find_register_custom) ``` The type find name in lower case, with words separated by '_'. Used to generate `gst_type_find_register_*(GstPlugin* plugin)`. pointer to a method with the format: `gboolean register_func (GstPlugin* plugin);` Extra tag flags used when registering tags. undefined flag tag is meta data tag is encoded tag is decoded number of tag flags A function that will be called in gst_tag_list_foreach(). The function may not modify the tag list. the #GstTagList a name of a tag in @list user data List of tags and values used to describe media metadata. Strings in structures must be ASCII or UTF-8 encoded. Other encodings are not allowed. Strings must not be empty or %NULL. the parent type Creates a new taglist and appends the values for the given tags. It expects tag-value pairs like gst_tag_list_add(), and a %NULL terminator after the last pair. The type of the values is implicit and is documented in the API reference, but can also be queried at runtime with gst_tag_get_type(). It is an error to pass a value of a type not matching the tag type into this function. The tag list will make copies of any arguments passed (e.g. strings, buffers). After creation you might also want to set a #GstTagScope on the returned taglist to signal if the contained tags are global or stream tags. By default stream scope is assumes. See gst_tag_list_set_scope(). Free-function: gst_tag_list_unref a new #GstTagList. Free with gst_tag_list_unref() when no longer needed. tag %NULL-terminated list of values to set Creates a new empty GstTagList. Free-function: gst_tag_list_unref An empty tag list Deserializes a tag list. a new #GstTagList, or %NULL in case of an error. a string created with gst_tag_list_to_string() Just like gst_tag_list_new(), only that it takes a va_list argument. Useful mostly for language bindings. Free-function: gst_tag_list_unref a new #GstTagList. Free with gst_tag_list_unref() when no longer needed. tag / value pairs to set Sets the values for the given tags using the specified mode. list to set tags in the mode to use tag %NULL-terminated list of values to set Sets the values for the given tags using the specified mode. list to set tags in the mode to use tag tag / value pairs to set Sets the GValues for the given tags using the specified mode. list to set tags in the mode to use tag tag / GValue pairs to set Sets the GValue for a given tag using the specified mode. list to set tags in the mode to use tag GValue for this tag Sets the GValues for the given tags using the specified mode. list to set tags in the mode to use tag GValues to set Creates a new #GstTagList as a copy of the old @taglist. The new taglist will have a refcount of 1, owned by the caller, and will be writable as a result. Note that this function is the semantic equivalent of a gst_tag_list_ref() followed by a gst_tag_list_make_writable(). If you only want to hold on to a reference to the data, you should use gst_tag_list_ref(). When you are finished with the taglist, call gst_tag_list_unref() on it. the new #GstTagList a #GstTagList. Calls the given function for each tag inside the tag list. Note that if there is no tag, the function won't be called at all. list to iterate over function to be called for each tag user specified data Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag. %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out location for the result Gets the value that is at the given index for the given tag in the given list. %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out number of entry to read out location for the result Copies the first date for the given tag in the taglist into the variable pointed to by @value. Free the date with g_date_free() when it is no longer needed. Free-function: g_date_free %TRUE, if a date was copied, %FALSE if the tag didn't exist in the given list or if it was %NULL. a #GstTagList to get the tag from tag to read out address of a GDate pointer variable to store the result into Gets the date that is at the given index for the given tag in the given list and copies it into the variable pointed to by @value. Free the date with g_date_free() when it is no longer needed. Free-function: g_date_free %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list or if it was %NULL. a #GstTagList to get the tag from tag to read out number of entry to read out location for the result Copies the first datetime for the given tag in the taglist into the variable pointed to by @value. Unref the date with gst_date_time_unref() when it is no longer needed. Free-function: gst_date_time_unref %TRUE, if a datetime was copied, %FALSE if the tag didn't exist in the given list or if it was %NULL. a #GstTagList to get the tag from tag to read out address of a #GstDateTime pointer variable to store the result into Gets the datetime that is at the given index for the given tag in the given list and copies it into the variable pointed to by @value. Unref the datetime with gst_date_time_unref() when it is no longer needed. Free-function: gst_date_time_unref %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list or if it was %NULL. a #GstTagList to get the tag from tag to read out number of entry to read out location for the result Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag. %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out location for the result Gets the value that is at the given index for the given tag in the given list. %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out number of entry to read out location for the result Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag. %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out location for the result Gets the value that is at the given index for the given tag in the given list. %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out number of entry to read out location for the result Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag. %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out location for the result Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag. %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out location for the result Gets the value that is at the given index for the given tag in the given list. %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out number of entry to read out location for the result Gets the value that is at the given index for the given tag in the given list. %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out number of entry to read out location for the result Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag. %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out location for the result Gets the value that is at the given index for the given tag in the given list. %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out number of entry to read out location for the result Copies the first sample for the given tag in the taglist into the variable pointed to by @sample. Free the sample with gst_sample_unref() when it is no longer needed. You can retrieve the buffer from the sample using gst_sample_get_buffer() and the associated caps (if any) with gst_sample_get_caps(). Free-function: gst_sample_unref %TRUE, if a sample was returned, %FALSE if the tag didn't exist in the given list or if it was %NULL. a #GstTagList to get the tag from tag to read out address of a GstSample pointer variable to store the result into Gets the sample that is at the given index for the given tag in the given list and copies it into the variable pointed to by @sample. Free the sample with gst_sample_unref() when it is no longer needed. You can retrieve the buffer from the sample using gst_sample_get_buffer() and the associated caps (if any) with gst_sample_get_caps(). Free-function: gst_sample_unref %TRUE, if a sample was copied, %FALSE if the tag didn't exist in the given list or if it was %NULL. a #GstTagList to get the tag from tag to read out number of entry to read out address of a GstSample pointer variable to store the result into Gets the scope of @list. The scope of @list a #GstTagList Copies the contents for the given tag into the value, possibly merging multiple values into one if multiple values are associated with the tag. Use gst_tag_list_get_string_index (list, tag, 0, value) if you want to retrieve the first string associated with this tag unmodified. The resulting string in @value will be in UTF-8 encoding and should be freed by the caller using g_free when no longer needed. The returned string is also guaranteed to be non-%NULL and non-empty. Free-function: g_free %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out location for the result Gets the value that is at the given index for the given tag in the given list. The resulting string in @value will be in UTF-8 encoding and should be freed by the caller using g_free when no longer needed. The returned string is also guaranteed to be non-%NULL and non-empty. Free-function: g_free %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out number of entry to read out location for the result Checks how many value are stored in this tag list for the given tag. The number of tags stored a taglist the tag to query Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag. %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out location for the result Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag. %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out location for the result Gets the value that is at the given index for the given tag in the given list. %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out number of entry to read out location for the result Gets the value that is at the given index for the given tag in the given list. %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out number of entry to read out location for the result Gets the value that is at the given index for the given tag in the given list. The GValue for the specified entry or %NULL if the tag wasn't available or the tag doesn't have as many entries a #GstTagList tag to read out number of entry to read out Inserts the tags of the @from list into the first list using the given mode. list to merge into list to merge from the mode to use Checks if the given taglist is empty. %TRUE if the taglist is empty, otherwise %FALSE. A #GstTagList. Checks if the two given taglists are equal. %TRUE if the taglists are equal, otherwise %FALSE a #GstTagList. a #GstTagList. Merges the two given lists into a new list. If one of the lists is %NULL, a copy of the other is returned. If both lists are %NULL, %NULL is returned. Free-function: gst_tag_list_unref the new list first list to merge second list to merge the mode to use Get the number of tags in @list. The number of tags in @list. A #GstTagList. Get the name of the tag in @list at @index. The name of the tag at @index. A #GstTagList. the index Peeks at the value that is at the given index for the given tag in the given list. The resulting string in @value will be in UTF-8 encoding and doesn't need to be freed by the caller. The returned string is also guaranteed to be non-%NULL and non-empty. %TRUE, if a value was set, %FALSE if the tag didn't exist in the given list. a #GstTagList to get the tag from tag to read out number of entry to read out location for the result Add a reference to a #GstTagList mini object. From this point on, until the caller calls gst_tag_list_unref() or gst_tag_list_make_writable(), it is guaranteed that the taglist object will not change. To use a #GstTagList object, you must always have a refcount on it -- either the one made implicitly by e.g. gst_tag_list_new(), or via taking one explicitly with this function. the same #GstTagList mini object. the #GstTagList to reference Removes the given tag from the taglist. list to remove tag from tag to remove Sets the scope of @list to @scope. By default the scope of a taglist is stream scope. a #GstTagList new scope for @list Serializes a tag list to a string. a newly-allocated string. The string must be freed with g_free() when no longer needed. a #GstTagList Unref a #GstTagList, and and free all its memory when the refcount reaches 0. a #GstTagList. 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. %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. uninitialized #GValue to copy into list to get the tag from tag to read out Modifies a pointer to a #GstTagList to point to a different #GstTagList. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old tag list is unreffed, the new is reffed). Either @new_taglist or the #GstTagList pointed to by @old_taglist may be %NULL. %TRUE if @new_taglist was different from @old_taglist pointer to a pointer to a #GstTagList to be replaced. pointer to a #GstTagList that will replace the tag list pointed to by @old_taglist. Modifies a pointer to a #GstTagList to point to a different #GstTagList. This function is similar to gst_tag_list_replace() except that it takes ownership of @new_taglist. %TRUE if @new_taglist was different from @old_taglist pointer to a pointer to a #GstTagList to be replaced. pointer to a #GstTagList that will replace the taglist pointed to by @old_taglist. A function for merging multiple values of a tag used when registering tags. the destination #GValue the source #GValue The different tag merging modes are basically replace, overwrite and append, but they can be seen from two directions. Given two taglists: (A) the tags already in the element and (B) the ones that are supplied to the element ( e.g. via gst_tag_setter_merge_tags() / gst_tag_setter_add_tags() or a %GST_EVENT_TAG), how are these tags merged? In the table below this is shown for the cases that a tag exists in the list (A) or does not exists (!A) and combinations thereof. | merge mode | A + B | A + !B | !A + B | !A + !B | | ----------- | ----- | ------ | ------ | ------- | | REPLACE_ALL | B | ø | B | ø | | REPLACE | B | A | B | ø | | APPEND | A, B | A | B | ø | | PREPEND | B, A | A | B | ø | | KEEP | A | A | B | ø | | KEEP_ALL | A | A | ø | ø | undefined merge mode replace all tags (clear list and append) replace tags append tags prepend tags keep existing tags keep all existing tags the number of merge modes GstTagScope specifies if a taglist applies to the complete medium or only to one single stream. tags specific to this single stream global tags for the complete medium Element interface that allows setting of media metadata. Elements that support changing a stream's metadata will implement this interface. Examples of such elements are 'vorbisenc', 'theoraenc' and 'id3v2mux'. If you just want to retrieve metadata in your application then all you need to do is watch for tag messages on your pipeline's bus. This interface is only for setting metadata, not for extracting it. To set tags from the application, find tagsetter elements and set tags using e.g. gst_tag_setter_merge_tags() or gst_tag_setter_add_tags(). Also consider setting the #GstTagMergeMode that is used for tag events that arrive at the tagsetter element (default mode is to keep existing tags). The application should do that before the element goes to %GST_STATE_PAUSED. Elements implementing the #GstTagSetter interface often have to merge any tags received from upstream and the tags set by the application via the interface. This can be done like this: |[<!-- language="C" --> GstTagMergeMode merge_mode; const GstTagList *application_tags; const GstTagList *event_tags; GstTagSetter *tagsetter; GstTagList *result; tagsetter = GST_TAG_SETTER (element); merge_mode = gst_tag_setter_get_tag_merge_mode (tagsetter); application_tags = gst_tag_setter_get_tag_list (tagsetter); event_tags = (const GstTagList *) element->event_tags; GST_LOG_OBJECT (tagsetter, "merging tags, merge mode = %d", merge_mode); GST_LOG_OBJECT (tagsetter, "event tags: %" GST_PTR_FORMAT, event_tags); GST_LOG_OBJECT (tagsetter, "set tags: %" GST_PTR_FORMAT, application_tags); result = gst_tag_list_merge (application_tags, event_tags, merge_mode); GST_LOG_OBJECT (tagsetter, "final tags: %" GST_PTR_FORMAT, result); ]| Adds the given tag / value pairs on the setter using the given merge mode. The list must be terminated with %NULL. a #GstTagSetter the mode to use tag to set tag / value pairs to set Adds the given tag / GValue pairs on the setter using the given merge mode. The list must be terminated with %NULL. a #GstTagSetter the mode to use tag to set tag / GValue pairs to set Adds the given tag / GValue pair on the setter using the given merge mode. a #GstTagSetter the mode to use tag to set GValue to set for the tag Adds the given tag / GValue pairs on the setter using the given merge mode. The list must be terminated with %NULL. a #GstTagSetter the mode to use tag to set more tag / GValue pairs to set Adds the given tag / value pairs on the setter using the given merge mode. The list must be terminated with %NULL. a #GstTagSetter the mode to use tag to set more tag / value pairs to set Returns the current list of tags the setter uses. The list should not be modified or freed. This function is not thread-safe. a current snapshot of the taglist used in the setter or %NULL if none is used. a #GstTagSetter Queries the mode by which tags inside the setter are overwritten by tags from events the merge mode used inside the element. a #GstTagSetter Merges the given list into the setter's list using the given mode. a #GstTagSetter a tag list to merge from the mode to merge with Reset the internal taglist. Elements should call this from within the state-change handler. a #GstTagSetter Sets the given merge mode that is used for adding tags from events to tags specified by this interface. The default is #GST_TAG_MERGE_KEEP, which keeps the tags set with this interface and discards tags from events. a #GstTagSetter The mode with which tags are added #GstTagSetterInterface interface. parent interface type. #GstTask is used by #GstElement and #GstPad to provide the data passing threads in a #GstPipeline. A #GstPad will typically start a #GstTask to push or pull data to/from the peer pads. Most source elements start a #GstTask to push data. In some cases a demuxer element can start a #GstTask to pull data from a peer element. This is typically done when the demuxer can perform random access on the upstream peer element for improved performance. Although convenience functions exist on #GstPad to start/pause/stop tasks, it might sometimes be needed to create a #GstTask manually if it is not related to a #GstPad. Before the #GstTask can be run, it needs a #GRecMutex that can be set with gst_task_set_lock(). The task can be started, paused and stopped with gst_task_start(), gst_task_pause() and gst_task_stop() respectively or with the gst_task_set_state() function. A #GstTask will repeatedly call the #GstTaskFunction with the user data that was provided when creating the task with gst_task_new(). While calling the function it will acquire the provided lock. The provided lock is released when the task pauses or stops. Stopping a task with gst_task_stop() will not immediately make sure the task is not running anymore. Use gst_task_join() to make sure the task is completely stopped and the thread is stopped. After creating a #GstTask, use gst_object_unref() to free its resources. This can only be done when the task is not running anymore. Task functions can send a #GstMessage to send out-of-band data to the application. The application can receive messages from the #GstBus in its mainloop. For debugging purposes, the task will configure its object name as the thread name on Linux. Please note that the object name should be configured before the task is started; changing the object name after the task has been started, has no effect on the thread name. Create a new Task that will repeatedly call the provided @func with @user_data as a parameter. Typically the task will run in a new thread. The function cannot be changed after the task has been created. You must create a new #GstTask to change the function. This function will not yet create and start a thread. Use gst_task_start() or gst_task_pause() to create and start the GThread. Before the task can be used, a #GRecMutex must be configured using the gst_task_set_lock() function. This lock will always be acquired while @func is called. A new #GstTask. MT safe. The #GstTaskFunction to use User data to pass to @func the function to call when @user_data is no longer needed. Wait for all tasks to be stopped. This is mainly used internally to ensure proper cleanup of internal data structures in test suites. MT safe. Get the #GstTaskPool that this task will use for its streaming threads. MT safe. the #GstTaskPool used by @task. gst_object_unref() after usage. a #GstTask Get the current state of the task. The #GstTaskState of the task MT safe. The #GstTask to query Joins @task. After this call, it is safe to unref the task and clean up the lock set with gst_task_set_lock(). The task will automatically be stopped with this call. This function cannot be called from within a task function as this would cause a deadlock. The function will detect this and print a g_warning. %TRUE if the task could be joined. MT safe. The #GstTask to join Pauses @task. This method can also be called on a task in the stopped state, in which case a thread will be started and will remain in the paused state. This function does not wait for the task to complete the paused state. %TRUE if the task could be paused. MT safe. The #GstTask to pause Resume @task in case it was paused. If the task was stopped, it will remain in that state and this function will return %FALSE. %TRUE if the task could be resumed. MT safe. The #GstTask to resume Call @enter_func when the task function of @task is entered. @user_data will be passed to @enter_func and @notify will be called when @user_data is no longer referenced. The #GstTask to use a #GstTaskThreadFunc user data passed to @enter_func called when @user_data is no longer referenced Call @leave_func when the task function of @task is left. @user_data will be passed to @leave_func and @notify will be called when @user_data is no longer referenced. The #GstTask to use a #GstTaskThreadFunc user data passed to @leave_func called when @user_data is no longer referenced Set the mutex used by the task. The mutex will be acquired before calling the #GstTaskFunction. This function has to be called before calling gst_task_pause() or gst_task_start(). MT safe. The #GstTask to use The #GRecMutex to use Set @pool as the new GstTaskPool for @task. Any new streaming threads that will be created by @task will now use @pool. MT safe. a #GstTask a #GstTaskPool Sets the state of @task to @state. The @task must have a lock associated with it using gst_task_set_lock() when going to GST_TASK_STARTED or GST_TASK_PAUSED or this function will return %FALSE. MT safe. %TRUE if the state could be changed. a #GstTask the new task state Starts @task. The @task must have a lock associated with it using gst_task_set_lock() or this function will return %FALSE. %TRUE if the task could be started. MT safe. The #GstTask to start Stops @task. This method merely schedules the task to stop and will not wait for the task to have completely stopped. Use gst_task_join() to stop and wait for completion. %TRUE if the task could be stopped. MT safe. The #GstTask to stop the state of the task used to pause/resume the task The lock taken when iterating the task function the function executed by this task user_data passed to the task function GDestroyNotify for @user_data a flag indicating that the task is running A function that will repeatedly be called in the thread created by a #GstTask. user data passed to the function This object provides an abstraction for creating threads. The default implementation uses a regular GThreadPool to start tasks. Subclasses can be made to create custom threads. Create a new default task pool. The default task pool will use a regular GThreadPool for threads. a new #GstTaskPool. gst_object_unref() after usage. Wait for all tasks to be stopped. This is mainly used internally to ensure proper cleanup of internal data structures in test suites. MT safe. a #GstTaskPool Dispose of the handle returned by gst_task_pool_push(). This does not need to be called with the default implementation as the default #GstTaskPoolClass::push implementation always returns %NULL. This does not need to be called either when calling gst_task_pool_join(), but should be called when joining is not necessary, but gst_task_pool_push() returned a non-%NULL value. This method should only be called with the same @pool instance that provided @id. a #GstTaskPool the id Join a task and/or return it to the pool. @id is the id obtained from gst_task_pool_push(). The default implementation does nothing, as the default #GstTaskPoolClass::push implementation always returns %NULL. This method should only be called with the same @pool instance that provided @id. a #GstTaskPool the id Prepare the taskpool for accepting gst_task_pool_push() operations. MT safe. a #GstTaskPool Start the execution of a new thread from @pool. a pointer that should be used for the gst_task_pool_join function. This pointer can be %NULL, you must check @error to detect errors. If the pointer is not %NULL and gst_task_pool_join() is not used, call gst_task_pool_dispose_handle() instead. a #GstTaskPool the function to call data to pass to @func Wait for all tasks to be stopped. This is mainly used internally to ensure proper cleanup of internal data structures in test suites. MT safe. a #GstTaskPool Dispose of the handle returned by gst_task_pool_push(). This does not need to be called with the default implementation as the default #GstTaskPoolClass::push implementation always returns %NULL. This does not need to be called either when calling gst_task_pool_join(), but should be called when joining is not necessary, but gst_task_pool_push() returned a non-%NULL value. This method should only be called with the same @pool instance that provided @id. a #GstTaskPool the id Join a task and/or return it to the pool. @id is the id obtained from gst_task_pool_push(). The default implementation does nothing, as the default #GstTaskPoolClass::push implementation always returns %NULL. This method should only be called with the same @pool instance that provided @id. a #GstTaskPool the id Prepare the taskpool for accepting gst_task_pool_push() operations. MT safe. a #GstTaskPool Start the execution of a new thread from @pool. a pointer that should be used for the gst_task_pool_join function. This pointer can be %NULL, you must check @error to detect errors. If the pointer is not %NULL and gst_task_pool_join() is not used, call gst_task_pool_dispose_handle() instead. a #GstTaskPool the function to call data to pass to @func The #GstTaskPoolClass object. the parent class structure prepare the threadpool a #GstTaskPool make sure all threads are stopped a #GstTaskPool start a new thread a pointer that should be used for the gst_task_pool_join function. This pointer can be %NULL, you must check @error to detect errors. If the pointer is not %NULL and gst_task_pool_join() is not used, call gst_task_pool_dispose_handle() instead. a #GstTaskPool the function to call data to pass to @func join a thread a #GstTaskPool the id a #GstTaskPool the id Task function, see gst_task_pool_push(). user data for the task function The different states a task can be in the task is started and running the task is stopped the task is paused Custom GstTask thread callback functions that can be installed. The #GstTask The #GThread user data Structure for storing a timestamp and a value. timestamp of the value change the corresponding value #GstToc functions are used to create/free #GstToc and #GstTocEntry structures. Also they are used to convert #GstToc into #GstStructure and vice versa. #GstToc lets you to inform other elements in pipeline or application that playing source has some kind of table of contents (TOC). These may be chapters, editions, angles or other types. For example: DVD chapters, Matroska chapters or cue sheet TOC. Such TOC will be useful for applications to display instead of just a playlist. Using TOC is very easy. Firstly, create #GstToc structure which represents root contents of the source. You can also attach TOC-specific tags to it. Then fill it with #GstTocEntry entries by appending them to the #GstToc using gst_toc_append_entry(), and appending subentries to a #GstTocEntry using gst_toc_entry_append_sub_entry(). Note that root level of the TOC can contain only either editions or chapters. You should not mix them together at the same level. Otherwise you will get serialization /deserialization errors. Make sure that no one of the entries has negative start and stop values. Use gst_event_new_toc() to create a new TOC #GstEvent, and gst_event_parse_toc() to parse received TOC event. Use gst_event_new_toc_select() to create a new TOC select #GstEvent, and gst_event_parse_toc_select() to parse received TOC select event. The same rule for the #GstMessage: gst_message_new_toc() to create new TOC #GstMessage, and gst_message_parse_toc() to parse received TOC message. TOCs can have global scope or current scope. Global scope TOCs contain all entries that can possibly be selected using a toc select event, and are what an application is usually interested in. TOCs with current scope only contain the parts of the TOC relevant to the currently selected/playing stream; the current scope TOC is used by downstream elements such as muxers to write correct TOC entries when transcoding files, for example. When playing a DVD, the global TOC would contain a hierarchy of all titles, chapters and angles, for example, while the current TOC would only contain the chapters for the currently playing title if playback of a specific title was requested. Applications and plugins should not rely on TOCs having a certain kind of structure, but should allow for different alternatives. For example, a simple CUE sheet embedded in a file may be presented as a flat list of track entries, or could have a top-level edition node (or some other alternative type entry) with track entries underneath that node; or even multiple top-level edition nodes (or some other alternative type entries) each with track entries underneath, in case the source file has extracted a track listing from different sources). Create a new #GstToc structure. newly allocated #GstToc structure, free it with gst_toc_unref(). scope of this TOC Appends the #GstTocEntry @entry to @toc. A #GstToc instance A #GstTocEntry Find #GstTocEntry with given @uid in the @toc. #GstTocEntry with specified @uid from the @toc, or %NULL if not found. #GstToc to search in. UID to find #GstTocEntry with. Gets the list of #GstTocEntry of @toc. A #GList of #GstTocEntry for @entry A #GstToc instance scope of @toc a #GstToc instance Gets the tags for @toc. A #GstTagList for @entry A #GstToc instance Merge @tags into the existing tags of @toc using @mode. A #GstToc instance A #GstTagList or %NULL A #GstTagMergeMode Set a #GstTagList with tags for the complete @toc. A #GstToc instance A #GstTagList or %NULL Create new #GstTocEntry structure. newly allocated #GstTocEntry structure, free it with gst_toc_entry_unref(). entry type. unique ID (UID) in the whole TOC. Appends the #GstTocEntry @subentry to @entry. A #GstTocEntry instance A #GstTocEntry @entry's entry type a #GstTocEntry Get @loop_type and @repeat_count values from the @entry and write them into appropriate storages. Loops are e.g. used by sampled instruments. GStreamer is not automatically applying the loop. The application can process this meta data and use it e.g. to send a seek-event to loop a section. %TRUE if all non-%NULL storage pointers were filled with appropriate values, %FALSE otherwise. #GstTocEntry to get values from. the storage for the loop_type value, leave %NULL if not need. the storage for the repeat_count value, leave %NULL if not need. Gets the parent #GstTocEntry of @entry. The parent #GstTocEntry of @entry A #GstTocEntry instance Get @start and @stop values from the @entry and write them into appropriate storages. %TRUE if all non-%NULL storage pointers were filled with appropriate values, %FALSE otherwise. #GstTocEntry to get values from. the storage for the start value, leave %NULL if not need. the storage for the stop value, leave %NULL if not need. Gets the sub-entries of @entry. A #GList of #GstTocEntry of @entry A #GstTocEntry instance Gets the tags for @entry. A #GstTagList for @entry A #GstTocEntry instance Gets the parent #GstToc of @entry. The parent #GstToc of @entry A #GstTocEntry instance Gets the UID of @entry. The UID of @entry A #GstTocEntry instance %TRUE if @entry's type is an alternative type, otherwise %FALSE a #GstTocEntry %TRUE if @entry's type is a sequence type, otherwise %FALSE a #GstTocEntry Merge @tags into the existing tags of @entry using @mode. A #GstTocEntry instance A #GstTagList or %NULL A #GstTagMergeMode Set @loop_type and @repeat_count values for the @entry. #GstTocEntry to set values. loop_type value to set. repeat_count value to set. Set @start and @stop values for the @entry. #GstTocEntry to set values. start value to set. stop value to set. Set a #GstTagList with tags for the complete @entry. A #GstTocEntry instance A #GstTagList or %NULL The different types of TOC entries (see #GstTocEntry). There are two types of TOC entries: alternatives or parts in a sequence. entry is an angle (i.e. an alternative) entry is a version (i.e. alternative) entry is an edition (i.e. alternative) invalid entry type value entry is a title (i.e. a part of a sequence) entry is a track (i.e. a part of a sequence) entry is a chapter (i.e. a part of a sequence) Converts @type to a string representation. Returns a human-readable string for @type. This string is only for debugging purpose and should not be displayed in a user interface. a #GstTocEntryType. How a #GstTocEntry should be repeated. By default, entries are played a single time. single forward playback repeat forward repeat backward repeat forward and backward The scope of a TOC. global TOC representing all selectable options (this is what applications are usually interested in) TOC for the currently active/selected stream (this is a TOC representing the current stream from start to EOS, and is what a TOC writer / muxer is usually interested in; it will usually be a subset of the global TOC, e.g. just the chapters of the current title, or the chapters selected for playback from the current title) Element interface that allows setting of the TOC. Elements that support some kind of chapters or editions (or tracks like in the FLAC cue sheet) will implement this interface. If you just want to retrieve the TOC in your application then all you need to do is watch for TOC messages on your pipeline's bus (or you can perform TOC query). This interface is only for setting TOC data, not for extracting it. To set TOC from the application, find proper tocsetter element and set TOC using gst_toc_setter_set_toc(). Elements implementing the #GstTocSetter interface can extend existing TOC by getting extend UID for that (you can use gst_toc_find_entry() to retrieve it) with any TOC entries received from downstream. Return current TOC the setter uses. The TOC should not be modified without making it writable first. TOC set, or %NULL. Unref with gst_toc_unref() when no longer needed a #GstTocSetter. Reset the internal TOC. Elements should call this from within the state-change handler. a #GstTocSetter. Set the given TOC on the setter. Previously set TOC will be unreffed before setting a new one. a #GstTocSetter. a #GstToc to set. #GstTocSetterInterface interface. parent interface type. Tracing modules will subclass #GstTracer and register through gst_tracer_register(). Modules can attach to various hook-types - see gst_tracing_register_hook(). When invoked they receive hook specific contextual data, which they must not modify. Create a new tracer-factory capable of instantiating objects of the @type and add the factory to @plugin. %TRUE, if the registering succeeded, %FALSE on error A #GstPlugin, or %NULL for a static typefind function The name for registering GType of tracer to register Use gst_tracer_factory_get_list() to get a list of tracer factories known to GStreamer. Gets the list of all registered tracer factories. You must free the list using gst_plugin_feature_list_free(). The returned factories are sorted by factory name. Free-function: gst_plugin_feature_list_free the list of all registered #GstTracerFactory. Get the #GType for elements managed by this factory. The type can only be retrieved if the element factory is loaded, which can be assured with gst_plugin_feature_load(). the #GType for tracers managed by this factory or 0 if the factory is not loaded. factory to get managed #GType from Tracing modules will create instances of this class to announce the data they will log and create a log formatter. Create a new tracer record. The record instance can be used to efficiently log entries using gst_tracer_record_log(). %NULL terminator required after the last argument. The @name without the ".class" suffix will be used for the log records. There must be fields for each value that gets logged where the field name is the value name. The field must be a #GstStructure describing the value. The sub structure must contain a field called 'type' of %G_TYPE_GTYPE that contains the GType of the value. The resulting #GstTracerRecord will take ownership of the field structures. The way to deal with optional values is to log an additional boolean before the optional field, that if %TRUE signals that the optional field is valid and %FALSE signals that the optional field should be ignored. One must still log a placeholder value for the optional field though. Please also note, that pointer type values must not be NULL - the underlying serialisation can not handle that right now. > Please note that this is still under discussion and subject to change. a new #GstTracerRecord name of new record, must end on ".class". name of first field to set additional arguments Serialzes the trace event into the log. Right now this is using the gstreamer debug log with the level TRACE (7) and the category "GST_TRACER". > Please note that this is still under discussion and subject to change. the tracer-record the args as described in the spec- Flag that describe the value. These flags help applications processing the logs to understand the values. no flags the value is optional. When using this flag one need to have an additional boolean arg before this value in the var-args list passed to gst_tracer_record_log(). the value is a combined figure, since the start of tracing. Examples are averages or timestamps. Tracing record will contain fields that contain a measured value or extra meta-data. One such meta data are values that tell where a measurement was taken. This enumerating declares to which scope such a meta data field relates to. If it is e.g. %GST_TRACER_VALUE_SCOPE_PAD, then each of the log events may contain values for different #GstPads. the value is related to the process the value is related to a thread the value is related to an #GstElement the value is related to a #GstPad The following functions allow you to detect the media type of an unknown stream. Method to peek data. Method to suggest #GstCaps with a given probability. The data used by the caller of the typefinding function. Returns the length of current data. Get the length of the data stream. The length of the data stream, or 0 if it is not available. The #GstTypeFind the function was called with Returns the @size bytes of the stream to identify beginning at offset. If offset is a positive number, the offset is relative to the beginning of the stream, if offset is a negative number the offset is relative to the end of the stream. The returned memory is valid until the typefinding function returns and must not be freed. the requested data, or %NULL if that data is not available. The #GstTypeFind object the function was called with The offset The number of bytes to return If a #GstTypeFindFunction calls this function it suggests the caps with the given probability. A #GstTypeFindFunction may supply different suggestions in one call. It is up to the caller of the #GstTypeFindFunction to interpret these values. The #GstTypeFind object the function was called with The probability in percent that the suggestion is right The fixed #GstCaps to suggest If a #GstTypeFindFunction calls this function it suggests caps of the given @media_type with the given @probability. This function is similar to gst_type_find_suggest_simple(), but uses a #GstCaps with no fields. The #GstTypeFind object the function was called with The probability in percent that the suggestion is right the media type of the suggested caps If a #GstTypeFindFunction calls this function it suggests the caps with the given probability. A #GstTypeFindFunction may supply different suggestions in one call. It is up to the caller of the #GstTypeFindFunction to interpret these values. This function is similar to gst_type_find_suggest(), only that instead of passing a #GstCaps argument you can create the caps on the fly in the same way as you can with gst_caps_new_simple(). Make sure you terminate the list of arguments with a %NULL argument and that the values passed have the correct type (in terms of width in bytes when passed to the vararg function - this applies particularly to gdouble and guint64 arguments). The #GstTypeFind object the function was called with The probability in percent that the suggestion is right the media type of the suggested caps first field of the suggested caps, or %NULL additional arguments to the suggested caps in the same format as the arguments passed to gst_structure_new() (ie. triplets of field name, field GType and field value). If @fieldname is %NULL, this list must be exactly one %NULL. 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. %TRUE on success, %FALSE otherwise A #GstPlugin, or %NULL for a static typefind function The name for registering The rank (or importance) of this typefind function The #GstTypeFindFunction to use Optional comma-separated list of extensions that could belong to this type Optionally the caps that could be returned when typefinding succeeds Optional user data. This user data must be available until the plugin is unloaded. a #GDestroyNotify that will be called on @data when the plugin is unloaded. These functions allow querying information about registered typefind functions. How to create and register these functions is described in the section <link linkend="gstreamer-Writing-typefind-functions"> "Writing typefind functions"</link>. The following example shows how to write a very simple typefinder that identifies the given data. You can get quite a bit more complicated than that though. |[<!-- language="C" --> typedef struct { guint8 *data; guint size; guint probability; GstCaps *data; } MyTypeFind; static void my_peek (gpointer data, gint64 offset, guint size) { MyTypeFind *find = (MyTypeFind *) data; if (offset >= 0 && offset + size <= find->size) { return find->data + offset; } return NULL; } static void my_suggest (gpointer data, guint probability, GstCaps *caps) { MyTypeFind *find = (MyTypeFind *) data; if (probability > find->probability) { find->probability = probability; gst_caps_replace (&find->caps, caps); } } static GstCaps * find_type (guint8 *data, guint size) { GList *walk, *type_list; MyTypeFind find = {data, size, 0, NULL}; GstTypeFind gst_find = {my_peek, my_suggest, &find, }; walk = type_list = gst_type_find_factory_get_list (); while (walk) { GstTypeFindFactory *factory = GST_TYPE_FIND_FACTORY (walk->data); walk = g_list_next (walk) gst_type_find_factory_call_function (factory, &gst_find); } g_list_free (type_list); return find.caps; }; ]| Gets the list of all registered typefind factories. You must free the list using gst_plugin_feature_list_free(). The returned factories are sorted by highest rank first, and then by factory name. Free-function: gst_plugin_feature_list_free the list of all registered #GstTypeFindFactory. Calls the #GstTypeFindFunction associated with this factory. A #GstTypeFindFactory a properly setup #GstTypeFind entry. The get_data and suggest_type members must be set. Gets the #GstCaps associated with a typefind factory. the #GstCaps associated with this factory A #GstTypeFindFactory Gets the extensions associated with a #GstTypeFindFactory. The returned array should not be changed. If you need to change stuff in it, you should copy it using g_strdupv(). This function may return %NULL to indicate a 0-length list. a %NULL-terminated array of extensions associated with this factory A #GstTypeFindFactory Check whether the factory has a typefind function. Typefind factories without typefind functions are a last-effort fallback mechanism to e.g. assume a certain media type based on the file extension. %TRUE if the factory has a typefind functions set, otherwise %FALSE A #GstTypeFindFactory A function that will be called by typefinding. A #GstTypeFind structure optional data to pass to the function The probability of the typefind function. Higher values have more certainty in doing a reliable typefind. type undetected. unlikely typefind. possible type detected. likely a type was detected. nearly certain that a type was detected. very certain a type was detected. Different URI-related errors that can occur. The protocol is not supported There was a problem with the URI Could not set or change the URI because the URI handler was in a state where that is not possible or not permitted There was a problem with the entity that the URI references The #GstURIHandler is an interface that is implemented by Source and Sink #GstElement to unify handling of URI. An application can use the following functions to quickly get an element that handles the given URI for reading or writing (gst_element_make_from_uri()). Source and Sink plugins should implement this interface when possible. Gets the currently handled URI. the URI currently handled by the @handler. Returns %NULL if there are no URI currently handled. The returned string must be freed with g_free() when no longer needed. A #GstURIHandler Tries to set the URI of the given handler. %TRUE if the URI was set successfully, else %FALSE. A #GstURIHandler URI to set Gets the list of protocols supported by @handler. This list may not be modified. the supported protocols. Returns %NULL if the @handler isn't implemented properly, or the @handler doesn't support any protocols. A #GstURIHandler. Gets the currently handled URI. the URI currently handled by the @handler. Returns %NULL if there are no URI currently handled. The returned string must be freed with g_free() when no longer needed. A #GstURIHandler Gets the type of the given URI handler the #GstURIType of the URI handler. Returns #GST_URI_UNKNOWN if the @handler isn't implemented correctly. A #GstURIHandler. Tries to set the URI of the given handler. %TRUE if the URI was set successfully, else %FALSE. A #GstURIHandler URI to set Any #GstElement using this interface should implement these methods. The parent interface type Method to tell whether the element handles source or sink URI. Method to return the list of protocols handled by the element. Method to return the URI currently handled by the element. the URI currently handled by the @handler. Returns %NULL if there are no URI currently handled. The returned string must be freed with g_free() when no longer needed. A #GstURIHandler Method to set a new URI. %TRUE if the URI was set successfully, else %FALSE. A #GstURIHandler URI to set The different types of URI direction. The URI direction is unknown The URI is a consumer. The URI is a producer. Value for #GstUri<!-- -->.port to indicate no port number. Tests if the type direction is valid. A #GstURIType Constant that defines one GStreamer microsecond. A #GstUri object can be used to parse and split a URI string into its constituent parts. Two #GstUri objects can be joined to make a new #GstUri using the algorithm described in RFC3986. Creates a new #GstUri object with the given URI parts. The path and query strings will be broken down into their elements. All strings should not be escaped except where indicated. A new #GstUri object. The scheme for the new URI. The user-info for the new URI. The host name for the new URI. The port number for the new URI or %GST_URI_NO_PORT. The path for the new URI with '/' separating path elements. The query string for the new URI with '&' separating query elements. Elements containing '&' characters should encode them as "&percnt;26". The fragment name for the new URI. Append a path onto the end of the path in the URI. The path is not normalized, call #gst_uri_normalize() to normalize the path. %TRUE if the path was appended successfully. The #GstUri to modify. Relative path to append to the end of the current path. Append a single path segment onto the end of the URI path. %TRUE if the path was appended successfully. The #GstUri to modify. The path segment string to append to the URI path. Create a new #GstUri object with the same data as this #GstUri object. If @uri is %NULL then returns %NULL. A new #GstUri object which is a copy of this #GstUri or %NULL. This #GstUri object. Compares two #GstUri objects to see if they represent the same normalized URI. %TRUE if the normalized versions of the two URI's would be equal. First #GstUri to compare. Second #GstUri to compare. Like gst_uri_from_string() but also joins with a base URI. A new #GstUri object. The base URI to join the new URI with. The URI string to parse. Get the fragment name from the URI or %NULL if it doesn't exist. If @uri is %NULL then returns %NULL. The host name from the #GstUri object or %NULL. This #GstUri object. Get the host name from the URI or %NULL if it doesn't exist. If @uri is %NULL then returns %NULL. The host name from the #GstUri object or %NULL. This #GstUri object. Get the media fragment table from the URI, as defined by "Media Fragments URI 1.0". Hash table returned by this API is a list of "key-value" pairs, and the each pair is generated by splitting "URI fragment" per "&" sub-delims, then "key" and "value" are split by "=" sub-delims. The "key" returned by this API may be undefined keyword by standard. A value may be %NULL to indicate that the key should appear in the fragment string in the URI, but does not have a value. Free the returned #GHashTable with #g_hash_table_unref() when it is no longer required. Modifying this hash table does not affect the fragment in the URI. See more about Media Fragments URI 1.0 (W3C) at https://www.w3.org/TR/media-frags/ The fragment hash table from the URI. The #GstUri to get the fragment table from. Extract the path string from the URI object. The path from the URI. Once finished with the string should be g_free()'d. The #GstUri to get the path from. Get a list of path segments from the URI. A #GList of path segment strings or %NULL if no path segments are available. Free the list when no longer needed with g_list_free_full(list, g_free). The #GstUri to get the path from. Extract the path string from the URI object as a percent encoded URI path. The path from the URI. Once finished with the string should be g_free()'d. The #GstUri to get the path from. Get the port number from the URI or %GST_URI_NO_PORT if it doesn't exist. If @uri is %NULL then returns %GST_URI_NO_PORT. The port number from the #GstUri object or %GST_URI_NO_PORT. This #GstUri object. Get a list of the query keys from the URI. A list of keys from the URI query. Free the list with g_list_free(). The #GstUri to examine. Get a percent encoded URI query string from the @uri. A percent encoded query string. Use g_free() when no longer needed. The #GstUri to get the query string from. Get a percent encoded URI query string from the @uri, with query parameters in the order provided by the @keys list. Only parameter keys in the list will be added to the resulting URI string. This method can be used by retrieving the keys with gst_uri_get_query_keys() and then sorting the list, for example. A percent encoded query string. Use g_free() when no longer needed. The #GstUri to get the query string from. A GList containing the query argument key strings. Get the query table from the URI. Keys and values in the table are freed with g_free when they are deleted. A value may be %NULL to indicate that the key should appear in the query string in the URI, but does not have a value. Free the returned #GHashTable with #g_hash_table_unref() when it is no longer required. Modifying this hash table will modify the query in the URI. The query hash table from the URI. The #GstUri to get the query table from. Get the value associated with the @query_key key. Will return %NULL if the key has no value or if the key does not exist in the URI query table. Because %NULL is returned for both missing keys and keys with no value, you should use gst_uri_query_has_key() to determine if a key is present in the URI query. The value for the given key, or %NULL if not found. The #GstUri to examine. The key to lookup. Get the scheme name from the URI or %NULL if it doesn't exist. If @uri is %NULL then returns %NULL. The scheme from the #GstUri object or %NULL. This #GstUri object. Get the userinfo (usually in the form "username:password") from the URI or %NULL if it doesn't exist. If @uri is %NULL then returns %NULL. The userinfo from the #GstUri object or %NULL. This #GstUri object. Tests the @uri to see if it is normalized. A %NULL @uri is considered to be normalized. TRUE if the URI is normalized or is %NULL. The #GstUri to test to see if it is normalized. Check if it is safe to write to this #GstUri. Check if the refcount of @uri is exactly 1, meaning that no other reference exists to the #GstUri and that the #GstUri is therefore writable. Modification of a #GstUri should only be done after verifying that it is writable. %TRUE if it is safe to write to the object. The #GstUri object to test. Join a reference URI onto a base URI using the method from RFC 3986. If either URI is %NULL then the other URI will be returned with the ref count increased. A #GstUri which represents the base with the reference URI joined on. The base URI to join another to. The reference URI to join onto the base URI. Make the #GstUri writable. Checks if @uri is writable, and if so the original object is returned. If not, then a writable copy is made and returned. This gives away the reference to @uri and returns a reference to the new #GstUri. If @uri is %NULL then %NULL is returned. A writable version of @uri. The #GstUri object to make writable. Like gst_uri_new(), but joins the new URI onto a base URI. The new URI joined onto @base. The base URI to join the new URI to. The scheme for the new URI. The user-info for the new URI. The host name for the new URI. The port number for the new URI or %GST_URI_NO_PORT. The path for the new URI with '/' separating path elements. The query string for the new URI with '&' separating query elements. Elements containing '&' characters should encode them as "&percnt;26". The fragment name for the new URI. Normalization will remove extra path segments ("." and "..") from the URI. It will also convert the scheme and host name to lower case and any percent-encoded values to uppercase. The #GstUri object must be writable. Check with gst_uri_is_writable() or use gst_uri_make_writable() first. TRUE if the URI was modified. The #GstUri to normalize. Check if there is a query table entry for the @query_key key. %TRUE if @query_key exists in the URI query table. The #GstUri to examine. The key to lookup. Add a reference to this #GstUri object. See gst_mini_object_ref() for further info. This object with the reference count incremented. This #GstUri object. Remove an entry from the query table by key. %TRUE if the key existed in the table and was removed. The #GstUri to modify. The key to remove. Sets the fragment string in the URI. Use a value of %NULL in @fragment to unset the fragment string. %TRUE if the fragment was set/unset successfully. The #GstUri to modify. The fragment string to set. Set or unset the host for the URI. %TRUE if the host was set/unset successfully. The #GstUri to modify. The new host string to set or %NULL to unset. Sets or unsets the path in the URI. %TRUE if the path was set successfully. The #GstUri to modify. The new path to set with path segments separated by '/', or use %NULL to unset the path. Replace the path segments list in the URI. %TRUE if the path segments were set successfully. The #GstUri to modify. The new path list to set. Sets or unsets the path in the URI. %TRUE if the path was set successfully. The #GstUri to modify. The new percent encoded path to set with path segments separated by '/', or use %NULL to unset the path. Set or unset the port number for the URI. %TRUE if the port number was set/unset successfully. The #GstUri to modify. The new port number to set or %GST_URI_NO_PORT to unset. Sets or unsets the query table in the URI. %TRUE if the query table was set successfully. The #GstUri to modify. The new percent encoded query string to use to populate the query table, or use %NULL to unset the query table. Set the query table to use in the URI. The old table is unreferenced and a reference to the new one is used instead. A value if %NULL for @query_table will remove the query string from the URI. %TRUE if the new table was successfully used for the query table. The #GstUri to modify. The new query table to use. This inserts or replaces a key in the query table. A @query_value of %NULL indicates that the key has no associated value, but will still be present in the query string. %TRUE if the query table was successfully updated. The #GstUri to modify. The key for the query entry. The value for the key. Set or unset the scheme for the URI. %TRUE if the scheme was set/unset successfully. The #GstUri to modify. The new scheme to set or %NULL to unset the scheme. Set or unset the user information for the URI. %TRUE if the user information was set/unset successfully. The #GstUri to modify. The new user-information string to set or %NULL to unset. Convert the URI to a string. Returns the URI as held in this object as a #gchar* nul-terminated string. The caller should g_free() the string once they are finished with it. The string is put together as described in RFC 3986. The string version of the URI. This #GstUri to convert to a string. Convert the URI to a string, with the query arguments in a specific order. Only the keys in the @keys list will be added to the resulting string. Returns the URI as held in this object as a #gchar* nul-terminated string. The caller should g_free() the string once they are finished with it. The string is put together as described in RFC 3986. The string version of the URI. This #GstUri to convert to a string. A GList containing the query argument key strings. Decrement the reference count to this #GstUri object. If the reference count drops to 0 then finalize this object. See gst_mini_object_unref() for further info. This #GstUri object. Constructs a URI for a given valid protocol and location. Free-function: g_free Use GstURI instead. a new string for this URI. Protocol for URI Location for URI Parses a URI string into a new #GstUri object. Will return NULL if the URI cannot be parsed. A new #GstUri object, or NULL. The URI string to parse. 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 '#'. A new #GstUri object, or NULL. The URI string to parse. 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 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. A URI string Extracts the protocol out of a given valid URI. The returned string must be freed using g_free(). The protocol for this URI. A URI string Checks if the protocol of a given valid URI matches @protocol. %TRUE if the protocol matches. a URI string a protocol string (e.g. "http") 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. %TRUE if the string is a valid URI A URI string This is a convenience function to join two URI strings and return the result. The returned string should be g_free()'d after use. A string representing the percent-encoded join of the two URIs. The percent-encoded base URI. The percent-encoded reference URI to join to the @base_uri. 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. %TRUE Whether to check for a source or a sink Protocol that should be checked for (e.g. "http" or "smb") 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. %TRUE if the string is a valid protocol identifier, %FALSE otherwise. A string Indicates that the first value provided to a comparison function (gst_value_compare()) is equal to the second one. Indicates that the first value provided to a comparison function (gst_value_compare()) is greater than the second one. Checks if the given #GValue contains a #GstValueArray value. the #GValue to check Checks if the given #GValue contains a #GstBitmask value. the #GValue to check Checks if the given #GValue contains a #GstBuffer value. the #GValue to check Checks if the given #GValue contains a #GstCaps value. the #GValue to check Checks if the given #GValue contains a #GstCapsFeatures value. the #GValue to check Checks if the given #GValue contains a #GstDateTime value. the #GValue to check Checks if the given #GValue contains a #GstDoubleRange value. the #GValue to check Checks if the given #GValue contains a #GstFlagSet value. the #GValue to check Checks if the given #GValue contains a #GstFraction value. the #GValue to check Checks if the given #GValue contains a #GstFractionRange value. the #GValue to check Checks if the given #GValue contains a #GstInt64Range value. the #GValue to check Checks if the given #GValue contains a #GstIntRange value. the #GValue to check Checks if the given #GValue contains a #GstValueList value. the #GValue to check Checks if the given #GValue contains a #GstSample value. the #GValue to check Checks if the given #GValue contains a #GstStructure value. the #GValue to check Indicates that the first value provided to a comparison function (gst_value_compare()) is lesser than the second one. Indicates that the comparison function (gst_value_compare()) can not determine a order for the two provided values. The major version of GStreamer at compile time: The micro version of GStreamer at compile time: The minor version of GStreamer at compile time: The nano version of GStreamer at compile time: Actual releases have 0, GIT versions have 1, prerelease versions have 2-... A fundamental type that describes an ordered list of #GValue Appends @append_value to the GstValueArray in @value. a #GValue of type #GST_TYPE_ARRAY the value to append Appends @append_value to the GstValueArray in @value. a #GValue of type #GST_TYPE_ARRAY the value to append Gets the number of values contained in @value. the number of values a #GValue of type #GST_TYPE_ARRAY Gets the value that is a member of the array contained in @value and has the index @index. the value at the given index a #GValue of type #GST_TYPE_ARRAY index of value to get from the array Initializes and pre-allocates a #GValue of type #GST_TYPE_ARRAY. The #GValue structure that has been passed in A zero-filled (uninitialized) #GValue structure The number of entries to pre-allocate in the array Prepends @prepend_value to the GstValueArray in @value. a #GValue of type #GST_TYPE_ARRAY the value to prepend Used together with gst_value_compare() to compare #GValue items. one of GST_VALUE_LESS_THAN, GST_VALUE_EQUAL, GST_VALUE_GREATER_THAN or GST_VALUE_UNORDERED first value for comparison second value for comparison Used by gst_value_deserialize() to parse a non-binary form into the #GValue. %TRUE for success a #GValue a string Used by gst_value_deserialize_with_pspec() to parse a non-binary form into the #GValue. %TRUE for success a #GValue a string a #GParamSpec describing the expected value A fundamental type that describes an unordered list of #GValue Appends @append_value to the GstValueList in @value. a #GValue of type #GST_TYPE_LIST the value to append Appends @append_value to the GstValueList in @value. a #GValue of type #GST_TYPE_LIST the value to append Concatenates copies of @value1 and @value2 into a list. Values that are not of type #GST_TYPE_LIST are treated as if they were lists of length 1. @dest will be initialized to the type #GST_TYPE_LIST. an uninitialized #GValue to take the result a #GValue a #GValue Gets the number of values contained in @value. the number of values a #GValue of type #GST_TYPE_LIST Gets the value that is a member of the list contained in @value and has the index @index. the value at the given index a #GValue of type #GST_TYPE_LIST index of value to get from the list Initializes and pre-allocates a #GValue of type #GST_TYPE_LIST. The #GValue structure that has been passed in A zero-filled (uninitialized) #GValue structure The number of entries to pre-allocate in the list 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). an uninitialized #GValue to take the result a #GValue a #GValue Prepends @prepend_value to the GstValueList in @value. a #GValue of type #GST_TYPE_LIST the value to prepend Used by gst_value_serialize() to obtain a non-binary form of the #GValue. Free-function: g_free the string representation of the value a #GValue VTable for the #GValue @type. a #GType a #GstValueCompareFunc a #GstValueSerializeFunc a #GstValueDeserializeFunc a #GstValueDeserializeWithPSpecFunc #GstVecDeque is an object that provides standard double-ended queue (deque) functionality based on an array instead of linked lists. This reduces the overhead caused by memory management by a large factor. Clears queue @array and frees all memory associated to it. a #GstVecDeque object Drops the queue element at position @idx from queue @array. the dropped element a #GstVecDeque object index to drop Drops the queue element at position @idx from queue @array and copies the data of the element or structure that was removed into @p_struct if @p_struct is set (not NULL). TRUE on success, or FALSE on error a #GstVecDeque object index to drop address into which to store the data of the dropped structure, or NULL Finds an element in the queue @array, either by comparing every element with @func or by looking up @data if no compare function @func is provided, and returning the index of the found element. Index of the found element or -1 if nothing was found. a #GstVecDeque object comparison function, or %NULL to find @data by value data for comparison function Frees queue @array and all memory associated to it. a #GstVecDeque object Returns the length of the queue @array the length of the queue @array. a #GstVecDeque object Checks if the queue @array is empty. %TRUE if the queue @array is empty a #GstVecDeque object Returns the head of the queue @array and does not remove it from the queue. The head of the queue a #GstVecDeque object Returns the head of the queue @array without removing it from the queue. pointer to element or struct, or NULL if @array was empty. The data pointed to by the returned pointer stays valid only as long as the queue array is not modified further! a #GstVecDeque object Returns the item at @idx in @array, but does not remove it from the queue. The item, or %NULL if @idx was out of bounds Returns the item at @idx in @array, but does not remove it from the queue. The item, or %NULL if @idx was out of bounds Returns the tail of the queue @array, but does not remove it from the queue. The tail of the queue a #GstVecDeque object Returns the tail of the queue @array, but does not remove it from the queue. The tail of the queue a #GstVecDeque object Returns and head of the queue @array and removes it from the queue. The head of the queue a #GstVecDeque object Returns the head of the queue @array and removes it from the queue. pointer to element or struct, or NULL if @array was empty. The data pointed to by the returned pointer stays valid only as long as the queue array is not modified further! a #GstVecDeque object Returns the tail of the queue @array and removes it from the queue. The tail of the queue a #GstVecDeque object Returns the tail of the queue @array and removes it from the queue. The tail of the queue a #GstVecDeque object Pushes @data to the queue @array, finding the correct position by comparing @data with each array element using @func. This has a time complexity of O(n), so depending on the size of the queue and expected access patterns, a different data structure might be better. Assumes that the array is already sorted. If it is not, make sure to call gst_vec_deque_sort() first. a #GstVecDeque object object to push comparison function data for comparison function Pushes the element at address @p_struct into the queue @array (copying the contents of a structure of the struct_size specified when creating the queue into the array), finding the correct position by comparing the element at @p_struct with each element in the array using @func. This has a time complexity of O(n), so depending on the size of the queue and expected access patterns, a different data structure might be better. Assumes that the array is already sorted. If it is not, make sure to call gst_vec_deque_sort() first. a #GstVecDeque object address of element or structure to push into the queue comparison function data for comparison function Pushes @data to the tail of the queue @array. a #GstVecDeque object object to push Sets a function to clear an element of @array. The @clear_func will be called when an element in the array data segment is removed and when the array is freed and data segment is deallocated as well. @clear_func will be passed a pointer to the element to clear, rather than the element itself. Note that in contrast with other uses of #GDestroyNotify functions, @clear_func is expected to clear the contents of the array element it is given, but not free the element itself. a #GstVecDeque object a function to clear an element of @array Sorts the queue @array by comparing elements against each other using the provided @compare_func. a #GstVecDeque object comparison function data for comparison function Allocates a new #GstVecDeque object with an initial queue size of @initial_size. a new #GstVecDeque object Initial size of the new queue Allocates a new #GstVecDeque object for elements (e.g. structures) of size @struct_size, with an initial queue size of @initial_size. a new #GstVecDeque object Size of each element (e.g. structure) in the array Initial size of the new queue Output a warning message in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. printf-style message to output Output a warning message for the given identifier in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. An identifier of the message provider printf-style message to output Output a warning message belonging to the given object in the default category. There is no need to finish the end of the message string with a newline character, a newline character will be added automatically. the #GObject the message belongs to printf-style message to output Store a 16 bit unsigned integer value in big endian format into the memory buffer. memory location value to store Store a 16 bit unsigned integer value in little endian format into the memory buffer. memory location value to store Store a 24 bit unsigned integer value in big endian format into the memory buffer. memory location value to store Store a 24 bit unsigned integer value in little endian format into the memory buffer. memory location value to store Store a 32 bit unsigned integer value in big endian format into the memory buffer. memory location value to store Store a 32 bit unsigned integer value in little endian format into the memory buffer. memory location value to store Store a 64 bit unsigned integer value in big endian format into the memory buffer. memory location value to store Store a 64 bit unsigned integer value in little endian format into the memory buffer. memory location value to store Store an 8 bit unsigned integer value into the memory buffer. memory location value to store 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. the maximum amount of memory blocks that a buffer can hold. Finds and returns a #GstParentBufferMeta if one exists on the buffer a #GstBuffer Tests if you can safely write to a buffer's metadata or its memory array. It is only safe to change buffer metadata when the current reference is writable, i.e. nobody can see the modifications you will make. a #GstBuffer Append @b at the end of @l. a #GstBufferList a #GstBuffer Tests if you can safely add buffers and groups into a buffer list. a #GstBufferList Makes a writable buffer list from the given buffer list. If the source buffer list is already writable, this will simply return the same buffer list. A copy will otherwise be made using gst_buffer_list_copy(). a #GstBufferList Modifies a pointer to a #GstBufferList to point to a different #GstBufferList. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old buffer list is unreffed, the new is reffed). Either @new_list or the #GstBufferList pointed to by @old_list may be %NULL. %TRUE if @new_list was different from @old_list pointer to a pointer to a #GstBufferList to be replaced. pointer to a #GstBufferList that will replace the buffer list pointed to by @old_list. Modifies a pointer to a #GstBufferList to point to a different #GstBufferList. This function is similar to gst_buffer_list_replace() except that it takes ownership of @new_list. %TRUE if @new_list was different from @old_list pointer to a pointer to a #GstBufferList to be replaced. pointer to a #GstBufferList that will replace the bufferlist pointed to by @old_list. Returns a writable copy of @buf. If the source buffer is already writable, this will simply return the same buffer. Use this function to ensure that a buffer can be safely modified before making changes to it, including changing the metadata such as PTS/DTS. If the reference count of the source buffer @buf is exactly one, the caller is the sole owner and this function will return the buffer object unchanged. If there is more than one reference on the object, a copy will be made using gst_buffer_copy(). The passed-in @buf will be unreffed in that case, and the caller will now own a reference to the new returned buffer object. Note that this just copies the buffer structure itself, the underlying memory is not copied if it can be shared amongst multiple buffers. In short, this function unrefs the buf in the argument and refs the buffer that it returns. Don't access the argument after calling this function unless you have an additional reference to it. a #GstBuffer Modifies a pointer to a #GstBuffer to point to a different #GstBuffer. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old buffer is unreffed, the new is reffed). Either @nbuf or the #GstBuffer pointed to by @obuf may be %NULL. %TRUE when @obuf was different from @nbuf. pointer to a pointer to a #GstBuffer to be replaced. pointer to a #GstBuffer that will replace the buffer pointed to by @obuf. Calculates the linear regression of the values @xy and places the result in @m_num, @m_denom, @b and @xbase, representing the function y(x) = m_num/m_denom * (x - xbase) + b that has the least-square distance from all points @x and @y. @r_squared will contain the remaining error. If @temp is not %NULL, it will be used as temporary space for the function, in which case the function works without any allocation at all. If @temp is %NULL, an allocation will take place. @temp should have at least the same amount of memory allocated as @xy, i.e. 2*n*sizeof(GstClockTime). > This function assumes (x,y) values with reasonable large differences > between them. It will not calculate the exact results if the differences > between neighbouring values are too small due to not being able to > represent sub-integer values during the calculations. %TRUE if the linear regression was successfully calculated Pairs of (x,y) values Temporary scratch space used by the function number of (x,y) pairs numerator of calculated slope denominator of calculated slope Offset at Y-axis Offset at X-axis R-squared Creates a #GstCapsFeatures from a string representation. a new #GstCapsFeatures or %NULL when the string could not be parsed. a string representation of a #GstCapsFeatures. 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. a newly allocated #GstCaps a string to convert to #GstCaps Tests if you can safely modify @caps. It is only safe to modify caps when there is only one owner of the caps - ie, the object is writable. a #GstCaps Returns a writable copy of @caps. If there is only one reference count on @caps, the caller must be the owner, and so this function will return the caps object unchanged. If on the other hand there is more than one reference on the object, a new caps object will be returned. The caller's reference on @caps will be removed, and instead the caller will own a reference to the returned object. In short, this function unrefs the caps in the argument and refs the caps that it returns. Don't access the argument after calling this function. See also: gst_caps_ref(). a #GstCaps Modifies a pointer to a #GstCaps to point to a different #GstCaps. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old caps is unreffed, the new is reffed). Either @new_caps or the #GstCaps pointed to by @old_caps may be %NULL. %TRUE if @new_caps was different from @old_caps pointer to a pointer to a #GstCaps to be replaced. pointer to a #GstCaps that will replace the caps pointed to by @old_caps. Modifies a pointer to a #GstCaps to point to a different #GstCaps. This function is similar to gst_caps_replace() except that it takes ownership of @new_caps. %TRUE if @new_caps was different from @old_caps pointer to a pointer to a #GstCaps to be replaced. pointer to a #GstCaps that will replace the caps pointed to by @old_caps. Clears a reference to a #GstBuffer. @buf_ptr must not be %NULL. If the reference is %NULL then this function does nothing. Otherwise, the reference count of the buffer is decreased and the pointer is set to %NULL. a pointer to a #GstBuffer reference Clears a reference to a #GstBufferList. @list_ptr must not be %NULL. If the reference is %NULL then this function does nothing. Otherwise, the reference count of the list is decreased and the pointer is set to %NULL. a pointer to a #GstBufferList reference Clears a reference to a #GstCaps. @caps_ptr must not be %NULL. If the reference is %NULL then this function does nothing. Otherwise, the reference count of the caps is decreased and the pointer is set to %NULL. a pointer to a #GstCaps reference Clears a reference to a #GstContext. @context_ptr must not be `NULL`. If the reference is `NULL` then this function does nothing. Otherwise, the reference count of the context is decreased and the pointer is set to `NULL`. a pointer to a #GstContext reference Clears a reference to a #GstEvent. @event_ptr must not be %NULL. If the reference is %NULL then this function does nothing. Otherwise, the reference count of the event is decreased and the pointer is set to %NULL. a pointer to a #GstEvent reference Clears a reference to a #GstMessage. @msg_ptr must not be %NULL. If the reference is %NULL then this function does nothing. Otherwise, the reference count of the message is decreased and the pointer is set to %NULL. a pointer to a #GstMessage reference Clears a reference to a #GstMiniObject. @object_ptr must not be %NULL. If the reference is %NULL then this function does nothing. Otherwise, the reference count of the object is decreased using gst_mini_object_unref() and the pointer is set to %NULL. A macro is also included that allows this function to be used without pointer casts. a pointer to a #GstMiniObject reference Clears a reference to a #GstObject. @object_ptr must not be %NULL. If the reference is %NULL then this function does nothing. Otherwise, the reference count of the object is decreased using gst_object_unref() and the pointer is set to %NULL. A macro is also included that allows this function to be used without pointer casts. a pointer to a #GstObject reference Clears a reference to a #GstPromise. @promise_ptr must not be `NULL`. If the reference is `NULL` then this function does nothing. Otherwise, the reference count of the promise is decreased and the pointer is set to `NULL`. a pointer to a #GstPromise reference Clears a reference to a #GstQuery. @query_ptr must not be %NULL. If the reference is %NULL then this function does nothing. Otherwise, the reference count of the query is decreased and the pointer is set to %NULL. a pointer to a #GstQuery reference Clears a reference to a #GstSample @sample_ptr must not be %NULL. If the reference is %NULL then this function does nothing. Otherwise, the reference count of the sample is decreased and the pointer is set to %NULL. a pointer to a #GstSample reference Clears a reference to a #GstStructure. @structure_ptr must not be %NULL. If the reference is %NULL then this function does nothing. Otherwise, the structure is free'd using gst_structure_free() and the pointer is set to %NULL. A macro is also included that allows this function to be used without pointer casts. a pointer to a #GstStructure reference Clears a reference to a #GstTagList. @taglist_ptr must not be %NULL. If the reference is %NULL then this function does nothing. Otherwise, the reference count of the taglist is decreased and the pointer is set to %NULL. a pointer to a #GstTagList reference Clears a reference to a #GstUri. @uri_ptr must not be %NULL. If the reference is %NULL then this function does nothing. Otherwise, the reference count of the uri is decreased and the pointer is set to %NULL. a pointer to a #GstUri reference Tests if you can safely write into a context's structure or validly modify the seqnum and timestamp fields. a #GstContext Checks if a context is writable. If not, a writable copy is made and returned. the context to make writable Modifies a pointer to a #GstContext to point to a different #GstContext. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old context is unreffed, the new one is reffed). Either @new_context or the #GstContext pointed to by @old_context may be %NULL. %TRUE if @new_context was different from @old_context pointer to a pointer to a #GstContext to be replaced. pointer to a #GstContext that will replace the context pointed to by @old_context. Adds the logging function to the list of logging functions. Be sure to use #G_GNUC_NO_INSTRUMENT on that function, it is needed. the function to use user data called when @user_data is not used anymore 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. Maximum size of log per thread in bytes Timeout for threads in seconds 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. a string containing the pipeline in graphviz dot format. the top-level pipeline that should be analyzed type of #GstDebugGraphDetails to use 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 ``` the top-level pipeline that should be analyzed type of #GstDebugGraphDetails to use output base filename (e.g. "myplayer") 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. the top-level pipeline that should be analyzed type of #GstDebugGraphDetails to use output base filename (e.g. "myplayer") Constructs a string that can be used for getting the desired color in color terminals. You need to free the string after use. a string containing the color definition the color info 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. an integer containing the color definition the color info 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. the list of debug categories Changes the coloring mode for debug output. see @GstDebugColorMode for possible values. Returns the default threshold that is used for new categories. the default threshold level a stack trace, if libunwind or glibc backtrace are present, else %NULL. A set of #GstStackTraceFlags to determine how the stack trace should look like. Pass #GST_STACK_TRACE_SHOW_NONE to retrieve a minimal backtrace. Checks if debugging output is activated. %TRUE, if debugging is activated Checks if the debugging output should be colored. %TRUE, if the debug output should be colored. Get the string representation of a debugging level the name the level to get the name for Logs the given message using the currently registered debugging handlers. category to log level of the message is in the file that emitted the message, usually the __FILE__ identifier the function that emitted the message the line from that the message was emitted, usually __LINE__ the object this message relates to, or %NULL if none a printf style format string optional arguments for the format 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); category to log level of the message the file that emitted the message, usually the __FILE__ identifier the function that emitted the message the line from that the message was emitted, usually __LINE__ the object this message relates to, or %NULL if none the actual message the FILE* to log to 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. category to log level of the message the file that emitted the message, usually the __FILE__ identifier the function that emitted the message the line from that the message was emitted, usually __LINE__ the object this message relates to, or %NULL if none the actual message Logs the given message using the currently registered debugging handlers. category to log level of the message is in the file that emitted the message, usually the __FILE__ identifier the function that emitted the message the line from that the message was emitted, usually __LINE__ the identifier of the object this message relates to, or %NULL if none. a printf style format string optional arguments for the format Logs the given message using the currently registered debugging handlers. category to log level of the message is in the file that emitted the message, usually the __FILE__ identifier the function that emitted the message the line from that the message was emitted, usually __LINE__ the identifier of the object this message relates to or %NULL if none a message string Logs the given message using the currently registered debugging handlers. category to log level of the message is in the file that emitted the message, usually the __FILE__ identifier the function that emitted the message the line from that the message was emitted, usually __LINE__ the identifier of the object this message relates to or %NULL if none. a printf style format string optional arguments for the format Logs the given message using the currently registered debugging handlers. category to log level of the message is in the file that emitted the message, usually the __FILE__ identifier the function that emitted the message the line from that the message was emitted, usually __LINE__ the object this message relates to, or %NULL if none a message string Logs the given message using the currently registered debugging handlers. category to log level of the message is in the file that emitted the message, usually the __FILE__ identifier the function that emitted the message the line from that the message was emitted, usually __LINE__ the object this message relates to, or %NULL if none a printf style format string optional arguments for the format 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. a string containing a string representation of the object the object Returns a string that represents @segments. The string representation is meant to be used for debugging purposes and might change between GStreamer versions. a string containing a string representation of the segment the %GstSegment If libunwind, glibc backtrace or DbgHelp are present a stack trace is printed. Removes all registered instances of the given logging functions. How many instances of the function were removed the log function to remove, or %NULL to remove the default log function Removes all registered instances of log functions with the given user data. How many instances of the function were removed user data of the log function to remove Removes any previously added ring buffer logger with gst_debug_add_ring_buffer_logger(). Fetches the current logs per thread from the ring buffer logger. See gst_debug_add_ring_buffer_logger() for details. NULL-terminated array of strings with the debug output per thread 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. Whether to use debugging output or not Changes the coloring mode for debug output. This function may be called before gst_init(). The coloring mode for debug output. See @GstDebugColorMode. Changes the coloring mode for debug output. This function may be called before gst_init(). The coloring mode for debug output. One of the following: "on", "auto", "off", "disable", "unix". 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(). Whether to use colored output or not Sets the default threshold to the given level and updates all categories to use this threshold. This function may be called before gst_init(). level to set Sets all categories which match the given glob style pattern to the given level. name of the categories to set level to set them to 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. comma-separated list of "category:level" pairs to be used as debug logging levels %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. Resets all categories with the given name back to the default level. name of the categories to set These utility functions help with generating dot graphs which can be rendered with [graphviz] to multiple formats. [graphviz]: https://graphviz.org/ 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. Registers a new #GstDynamicTypeFactory in the registry The #GstPlugin to register @dyn_type for The #GType to register dynamically Returns a copy of the name of @elem. Caller should g_free() the return value after usage. For a nameless element, this returns %NULL, which you can safely g_free() as well. a #GstElement to get the name of @elem. Get the parent of an element. a #GstElement to get the parent of. Sets the name of the element, getting rid of the old name if there was one. a #GstElement to set the name of. the new name Sets the parent of an element. a #GstElement to set the parent of. the new parent #GstObject of the element. Get a string describing the error message in the current locale. a newly allocated string describing the error message (in UTF-8 encoding) the GStreamer error domain this error belongs to. the error code belonging to the domain. Tests if you can safely write data into a event's structure or validly modify the seqnum and timestamp field. a #GstEvent Makes a writable event from the given event. If the source event is already writable, this will simply return the same event. A copy will otherwise be made using gst_event_copy(). a #GstEvent Modifies a pointer to a #GstEvent to point to a different #GstEvent. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old event is unreffed, the new one is reffed). Either @new_event or the #GstEvent pointed to by @old_event may be %NULL. %TRUE if @new_event was different from @old_event pointer to a pointer to a #GstEvent to be replaced. pointer to a #GstEvent that will replace the event pointed to by @old_event. Atomically replace the #GstEvent pointed to by @old_event with %NULL and return the original event. the #GstEvent that was in @old_event pointer to a pointer to a #GstEvent to be stolen. Modifies a pointer to a #GstEvent to point to a different #GstEvent. This function is similar to gst_event_replace() except that it takes ownership of @new_event. Either @new_event or the #GstEvent pointed to by @old_event may be %NULL. %TRUE if @new_event was different from @old_event pointer to a pointer to a #GstEvent to be stolen. pointer to a #GstEvent that will replace the event pointed to by @old_event. Gets the #GstEventTypeFlags associated with @type. a #GstEventTypeFlags. a #GstEventType Get a printable name for the given event type. Do not modify or free. a reference to the static name of the event. the event type Get the unique quark for the given event type. the quark associated with the event type the event 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. an unsigned integer a #GstEventType 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. newly-allocated URI string, or NULL on error. The caller must free the URI string with g_free() when no longer needed. absolute or relative file name path Gets a string representing the given flow return. a static string with the name of the flow return. a #GstFlowReturn to get the name of. Get the unique quark for the given GstFlowReturn. the quark associated with the flow return or 0 if an invalid return was specified. a #GstFlowReturn to get the quark of. Return the format registered with the given nick. The format with @nick or GST_FORMAT_UNDEFINED if the format was not registered. The nick of the format Get details about the given format. The #GstFormatDefinition for @format or %NULL on failure. MT safe. The format to get details of Get a printable name for the given format. Do not modify or free. a reference to the static name of the format or %NULL if the format is unknown. a #GstFormat Iterate all the registered formats. The format definition is read only. a GstIterator of #GstFormatDefinition. Create a new GstFormat based on the nick or return an already registered format with that nick. A new GstFormat or an already registered format with the same nick. MT safe. The nick of the new format The description of the new format Get the unique quark for the given format. the quark associated with the format or 0 if the format is unknown. a #GstFormat See if the given format is inside the format array. %TRUE if the format is found inside the array The format array to search the format to find Convert @value to a guint64. the #gdouble value to convert 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. The path of the executable that initialized GStreamer, or %NULL if it could not be determined. GStreamer is a framework for constructing graphs of various filters (termed elements here) that will handle streaming media. Any discrete (packetizable) media type is supported, with provisions for automatically determining source type. Formatting/framing information is provided with a powerful negotiation framework. Plugins are heavily used to provide for all elements, allowing one to construct plugins outside of the GST library, even released binary-only if license require (please don't). GStreamer covers a wide range of use cases including: playback, recording, editing, serving streams, voice over ip and video calls. The `GStreamer` library should be initialized with gst_init() before it can be used. You should pass pointers to the main `argc` and `argv` variables so that GStreamer can process its own command line options, as shown in the following example. ## Initializing the gstreamer library ``` C int main (int argc, char *argv[]) { // initialize the GStreamer library gst_init (&argc, &argv); ... } ``` It's allowed to pass two %NULL pointers to gst_init() in case you don't want to pass the command line args to GStreamer. You can also use #GOptionContext to initialize your own parameters as shown in the next code fragment: ## Initializing own parameters when initializing GStreamer ``` C static gboolean stats = FALSE; ... int main (int argc, char *argv[]) { GOptionEntry options[] = { {"tags", 't', 0, G_OPTION_ARG_NONE, &tags, N_("Output tags (also known as metadata)"), NULL}, {NULL} }; ctx = g_option_context_new ("[ADDITIONAL ARGUMENTS]"); g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE); g_option_context_add_group (ctx, gst_init_get_option_group ()); if (!g_option_context_parse (ctx, &argc, &argv, &err)) { g_print ("Error initializing: %s\n", GST_STR_NULL (err->message)); exit (1); } g_option_context_free (ctx); ... } ``` Use gst_version() to query the library version at runtime or use the GST_VERSION_* macros to find the version at compile time. Optionally gst_version_string() returns a printable string. The gst_deinit() call is used to clean up all internal resources used by GStreamer. It is mostly used in unit tests to check for leaks. Please do not use these in new code. These symbols are only available by defining GST_DISABLE_DEPRECATED. This can be done in CFLAGS for compiling old code. GStreamer elements can throw non-fatal warnings and fatal errors. Higher-level elements and applications can programmatically filter the ones they are interested in or can recover from, and have a default handler handle the rest of them. The rest of this section will use the term "error" to mean both (non-fatal) warnings and (fatal) errors; they are treated similarly. Errors from elements are the combination of a #GError and a debug string. The #GError contains: - a domain type: CORE, LIBRARY, RESOURCE or STREAM - a code: an enum value specific to the domain - a translated, human-readable message - a non-translated additional debug string, which also contains - file and line information Elements do not have the context required to decide what to do with errors. As such, they should only inform about errors, and stop their processing. In short, an element doesn't know what it is being used for. It is the application or compound element using the given element that has more context about the use of the element. Errors can be received by listening to the #GstBus of the element/pipeline for #GstMessage objects with the type %GST_MESSAGE_ERROR or %GST_MESSAGE_WARNING. The thrown errors should be inspected, and filtered if appropriate. An application is expected to, by default, present the user with a dialog box (or an equivalent) showing the error message. The dialog should also allow a way to get at the additional debug information, so the user can provide bug reporting information. A compound element is expected to forward errors by default higher up the hierarchy; this is done by default in the same way as for other types of #GstMessage. When applications or compound elements trigger errors that they can recover from, they can filter out these errors and take appropriate action. For example, an application that gets an error from xvimagesink that indicates all XVideo ports are taken, the application can attempt to use another sink instead. Elements throw errors using the #GST_ELEMENT_ERROR convenience macro: ## Throwing an error |[ GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, (_("No file name specified for reading.")), (NULL)); ]| Things to keep in mind: * Don't go off inventing new error codes. The ones currently provided should be enough. If you find your type of error does not fit the current codes, you should use FAILED. * Don't provide a message if the default one suffices. this keeps messages more uniform. Use (%NULL) - not forgetting the parentheses. * If you do supply a custom message, it should be marked for translation. The message should start with a capital and end with a period. The message should describe the error in short, in a human-readable form, and without any complex technical terms. A user interface will present this message as the first thing a user sees. Details, technical info, ... should go in the debug string. * The debug string can be as you like. Again, use (%NULL) if there's nothing to add - file and line number will still be passed. #GST_ERROR_SYSTEM can be used as a shortcut to give debug information on a system call error. GstFormats functions are used to register a new format to the gstreamer core. Formats can be used to perform seeking or conversions/query operations. GStreamer's debugging subsystem is an easy way to get information about what the application is doing. It is not meant for programming errors. Use GLib methods (g_warning and friends) for that. The debugging subsystem works only after GStreamer has been initialized - for example by calling gst_init(). The debugging subsystem is used to log informational messages while the application runs. Each messages has some properties attached to it. Among these properties are the debugging category, the severity (called "level" here) and an optional #GObject it belongs to. Each of these messages is sent to all registered debugging handlers, which then handle the messages. GStreamer attaches a default handler on startup, which outputs requested messages to stderr. Messages are output by using shortcut macros like #GST_DEBUG, #GST_CAT_ERROR_OBJECT or similar. These all expand to calling gst_debug_log() with the right parameters. The only thing a developer will probably want to do is define his own categories. This is easily done with 3 lines. At the top of your code, declare the variables and set the default category. |[<!-- language="C" --> GST_DEBUG_CATEGORY_STATIC (my_category); // define category (statically) #define GST_CAT_DEFAULT my_category // set as default ]| After that you only need to initialize the category. |[<!-- language="C" --> GST_DEBUG_CATEGORY_INIT (my_category, "my category", 0, "This is my very own"); ]| Initialization must be done before the category is used first. Plugins do this in their plugin_init function, libraries and applications should do that during their initialization. The whole debugging subsystem can be disabled at build time with passing the --disable-gst-debug switch to configure. If this is done, every function, macro and even structs described in this file evaluate to default values or nothing at all. So don't take addresses of these functions or use other tricks. If you must do that for some reason, there is still an option. If the debugging subsystem was compiled out, GST_DISABLE_GST_DEBUG is defined in <gst/gst.h>, so you can check that before doing your trick. Disabling the debugging subsystem will give you a slight (read: unnoticeable) speed increase and will reduce the size of your compiled code. The GStreamer library itself becomes around 10% smaller. Please note that there are naming conventions for the names of debugging categories. These are explained at GST_DEBUG_CATEGORY_INIT(). GParamSpec implementations specific to GStreamer. These function allow to create a pipeline based on the syntax used in the gst-launch-1.0 utility (see man-page for syntax documentation). Please note that these functions take several measures to create somewhat dynamic pipelines. Due to that such pipelines are not always reusable (set the state to NULL and back to PLAYING). The GstProtectionMeta class enables the information needed to decrypt a #GstBuffer to be attached to that buffer. Typically, a demuxer element would attach GstProtectionMeta objects to the buffers that it pushes downstream. The demuxer would parse the protection information for a video/audio frame from its input data and use this information to populate the #GstStructure @info field, which is then encapsulated in a GstProtectionMeta object and attached to the corresponding output buffer using the gst_buffer_add_protection_meta() function. The information in this attached GstProtectionMeta would be used by a downstream decrypter element to recover the original unencrypted frame. In addition to the #GstProtectionMeta demuxers signal encrypted streams with specific caps. The caps #GstStructure name will usually depend on the encryption scheme, for instance Common Encryption will be signaled with `application/x-cenc`. To prevent loss of information the media type of the decrypted stream will be stored in a `original-media-type` string field. Downstream elements can re-use that information, for instance decryptors can set their source pad caps according to the `original-media-type` received on their sink pad. A #GstStream is a high-level object defining a stream of data which is, or can be, present in a #GstPipeline. It is defined by a unique identifier, a "Stream ID". A #GstStream does not automatically imply the stream is present within a pipeline or element. Any element that can introduce new streams in a pipeline should create the appropriate #GstStream object, and can convey that object via the %GST_EVENT_STREAM_START event and/or the #GstStreamCollection. Elements that do not modify the nature of the stream can add extra information on it (such as enrich the #GstCaps, or #GstTagList). This is typically done by parsing elements. GValue implementations specific to GStreamer. Note that operations on the same #GValue from multiple threads may lead to undefined behaviour. Use the GST_VERSION_* macros e.g. when defining own plugins. The GStreamer runtime checks if these plugin and core version match and refuses to use a plugin compiled against a different version of GStreamer. You can also use the macros to keep the GStreamer version information in your application. Use the gst_version() function if you want to know which version of GStreamer you are currently linked against. The version macros get defined by including "gst/gst.h". Convert @value to a gdouble. the #guint64 value to convert 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(). a newly allocated null terminated string or %NULL on any error a printf style format string the printf arguments for @format Allocates, fills and returns a null terminated string from the printf style @format string and @args. See gst_info_vasprintf() for when this function is required. Free with g_free(). a newly allocated null terminated string or %NULL on any error a printf style format string the va_list of printf arguments for @format Allocates and fills a string large enough (including the terminating null byte) to hold the specified printf style @format and @args. This function deals with the GStreamer specific printf specifiers #GST_PTR_FORMAT and #GST_SEGMENT_FORMAT. If you do not have these specifiers in your @format string, you do not need to use this function and can use alternatives such as g_vasprintf(). Free @result with g_free(). the length of the string allocated into @result or -1 on any error the resulting string a printf style format string the va_list of printf arguments for @format 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. pointer to application's argc pointer to application's argv 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. %TRUE if GStreamer could be initialized. pointer to application's argc pointer to application's argv 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). a pointer to GStreamer's option group. Checks if @obj is a #GstCapsFeatures %TRUE if @obj is a #GstCapsFeatures %FALSE otherwise Use this function to check if GStreamer has been initialized with gst_init() or gst_init_check(). %TRUE if initialization has been done, %FALSE otherwise. Create a #GstStructure to be used with #gst_element_message_full_with_details. %NULL terminator required. Name of the first field to set variable arguments in the same form as #GstStructure Returns a writable copy of @m. If the source memory is already writable, this will simply return the same memory. a #GstMemory Tests if you can safely write into a message's structure or validly modify the seqnum and timestamp fields. a #GstMessage Checks if a message is writable. If not, a writable copy is made and returned. the message to make writable Modifies a pointer to a #GstMessage to point to a different #GstMessage. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old message is unreffed, the new one is reffed). Either @new_message or the #GstMessage pointed to by @old_message may be %NULL. %TRUE if @new_message was different from @old_message pointer to a pointer to a #GstMessage to be replaced. pointer to a #GstMessage that will replace the message pointed to by @old_message. Modifies a pointer to a #GstMessage to point to a different #GstMessage. This function is similar to gst_message_replace() except that it takes ownership of @new_message. %TRUE if @new_message was different from @old_message pointer to a pointer to a #GstMessage to be replaced. pointer to a #GstMessage that will replace the message pointed to by @old_message. Get a printable name for the given message type. Do not modify or free. a reference to the static name of the message. the message type Get the unique quark for the given message type. the quark associated with the message type the message type When a element like `tee` decides the allocation, each downstream element may fill different parameters and pass them to gst_query_add_allocation_meta(). In order to keep these parameters, a merge operation is needed. This aggregate function can combine the parameters from @params0 and @param1, and write the result back into @aggregated_params. %TRUE if the parameters were successfully aggregated, %FALSE otherwise. the GType of the API for which the parameters are being aggregated. This structure will be updated with the combined parameters from both @params0 and @params1. a #GstStructure containing the new parameters to be aggregated. a #GstStructure containing the new parameters to be aggregated. an array of tags as strings. an API Check if @api was registered with @tag. %TRUE if @api was registered with @tag. an API the tag to check Register and return a GType for the @api and associate it with @tags. a unique GType for @api. an API to register tags for @api Recreate a #GstMeta from serialized data returned by gst_meta_serialize() and add it to @buffer. Note that the meta must have been previously registered by calling one of `gst_*_meta_get_info ()` functions. @consumed is set to the number of bytes that can be skipped from @data to find the next meta serialization, if any. In case of parsing error that does not allow to determine that size, @consumed is set to 0. the metadata owned by @buffer, or %NULL. a #GstBuffer serialization data obtained from gst_meta_serialize() size of @data total size used by this meta, could be less than @size Lookup a previously registered meta info structure by its implementation name @impl. a #GstMetaInfo with @impl, or %NULL when no such metainfo exists. the name 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; } ``` a new #GstMetaInfo that needs to be filled the type of the #GstMeta API the name of the #GstMeta implementation the size of the #GstMeta structure Register a new #GstMeta implementation. The same @info can be retrieved later with gst_meta_get_info() by using @impl as the key. a #GstMetaInfo that can be used to access metadata. the type of the #GstMeta API the name of the #GstMeta implementation the size of the #GstMeta structure a #GstMetaInitFunction a #GstMetaFreeFunction a #GstMetaTransformFunction Register a new custom #GstMeta implementation, backed by an opaque structure holding a #GstStructure. The registered info can be retrieved later with gst_meta_get_info() by using @name as the key. The backing #GstStructure can be retrieved with gst_custom_meta_get_structure(), its mutability is conditioned by the writability of the buffer the meta is attached to. When @transform_func is %NULL, the meta and its backing #GstStructure will always be copied when the transform operation is copy, other operations are discarded, copy regions are ignored. a #GstMetaInfo that can be used to access metadata. the name of the #GstMeta implementation tags for @api a #GstMetaTransformFunction user data passed to @transform_func #GDestroyNotify for user_data Simplified version of gst_meta_register_custom(), with no tags and no transform function. a #GstMetaInfo that can be used to access metadata. the name of the #GstMeta implementation Atomically modifies a pointer to point to a new mini-object. The reference count of @olddata is decreased and the reference count of @newdata is increased. Either @newdata and the value pointed to by @olddata may be %NULL. %TRUE if @newdata was different from @olddata pointer to a pointer to a mini-object to be replaced pointer to new mini-object Replace the current #GstMiniObject pointer to by @olddata with %NULL and return the old value. the #GstMiniObject at @oldata pointer to a pointer to a mini-object to be stolen Modifies a pointer to point to a new mini-object. The modification is done atomically. This version is similar to gst_mini_object_replace() except that it does not increase the refcount of @newdata and thus takes ownership of @newdata. Either @newdata and the value pointed to by @olddata may be %NULL. %TRUE if @newdata was different from @olddata pointer to a pointer to a mini-object to be replaced pointer to new mini-object Get a copy of the name of the pad. g_free() after usage. MT safe. the pad to get the name from Get the parent of @pad. This function increases the refcount of the parent object so you should gst_object_unref() it after usage. Can return %NULL if the pad did not have a parent. MT safe. the pad to get the parent of Return the name of a pad mode, for use in debug messages mostly. short mnemonic for pad mode @mode the pad mode Calls gst_pad_set_activate_function_full() with %NULL for the user_data and notify. a #GstPad. the #GstPadActivateFunction to set. Calls gst_pad_set_activatemode_function_full() with %NULL for the user_data and notify. a #GstPad. the #GstPadActivateModeFunction to set. Calls gst_pad_set_chain_function_full() with %NULL for the user_data and notify. a sink #GstPad. the #GstPadChainFunction to set. Calls gst_pad_set_chain_list_function_full() with %NULL for the user_data and notify. a sink #GstPad. the #GstPadChainListFunction to set. Calls gst_pad_set_event_full_function_full() with %NULL for the user_data and notify. a #GstPad of either direction. the #GstPadEventFullFunction to set. Calls gst_pad_set_event_function_full() with %NULL for the user_data and notify. a #GstPad of either direction. the #GstPadEventFunction to set. Calls gst_pad_set_getrange_function_full() with %NULL for the user_data and notify. a source #GstPad. the #GstPadGetRangeFunction to set. Calls gst_pad_set_iterate_internal_links_function_full() with %NULL for the user_data and notify. a #GstPad of either direction. the #GstPadIterIntLinkFunction to set. Calls gst_pad_set_link_function_full() with %NULL for the user_data and notify. a #GstPad. the #GstPadLinkFunction to set. Calls gst_pad_set_query_function_full() with %NULL for the user_data and notify. a #GstPad of either direction. the #GstPadQueryFunction to set. Calls gst_pad_set_unlink_function_full() with %NULL for the user_data and notify. a #GstPad. the #GstPadUnlinkFunction to set. 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. a newly created parameter specification canonical name of the property specified nick name for the property specified description of the property specified GParamSpec of the array flags for the property specified 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. a newly created parameter specification canonical name of the property specified nick name for the property specified description of the property specified minimum value (fraction numerator) minimum value (fraction denominator) maximum value (fraction numerator) maximum value (fraction denominator) default value (fraction numerator) default value (fraction denominator) flags for the property specified Gets the global #GstMetaInfo describing the #GstParentBufferMeta meta. The #GstMetaInfo 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). a newly-created bin, or %NULL if an error occurred. command line describing the bin whether to automatically create ghost pads for unlinked source or sink pads within the bin 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). 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. command line describing the bin whether to automatically create ghost pads for unlinked source or sink pads within the bin a parse context allocated with gst_parse_context_new(), or %NULL parsing options, or #GST_PARSE_FLAG_NONE Get the error quark used by the parsing subsystem. the quark of the parse errors. 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(). 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. the command line describing the pipeline 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(). 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). the command line describing the pipeline a parse context allocated with gst_parse_context_new(), or %NULL parsing options, or #GST_PARSE_FLAG_NONE Create a new element based on command line syntax. @error will contain an error message if an erroneous pipeline is specified. An error does not mean that the pipeline could not be constructed. a new element on success and %NULL on failure. null-terminated array of arguments Create a new element based on command line syntax. @error will contain an error message if an erroneous pipeline is specified. An error does not mean that the pipeline could not be constructed. a new element on success; on failure, either %NULL or a partially-constructed bin or element will be returned and @error will be set (unless you passed #GST_PARSE_FLAG_FATAL_ERRORS in @flags, then %NULL will always be returned on failure) null-terminated array of arguments a parse context allocated with gst_parse_context_new(), or %NULL parsing options, or #GST_PARSE_FLAG_NONE Get the error quark. The error quark used in GError messages Returns the name of @feature. For a nameless plugin feature, this returns %NULL. a #GstPluginFeature to get the name of @feature. Sets the name of the plugin feature, getting rid of the old name if there was one. a #GstPluginFeature to set the name of. the new name 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 a new #GstPoll, or %NULL in case of an error. Free with gst_poll_free(). whether it should be possible to control a wait. 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 a new #GstPoll, or %NULL in case of an error. Free with gst_poll_free(). Gets the directory for application specific presets if set by the application. the directory or %NULL, don't free or modify the string 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. %TRUE for success, %FALSE if the dir already has been set the application specific preset dir 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. a printf style format string the printf arguments for @format 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. a printf style format string the printf arguments for @format 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. a printf style format string the printf arguments for @format 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. a printf style format string the printf arguments for @format Iterates the supplied list of UUIDs and checks the GstRegistry for all the decryptors supporting one of the supplied UUIDs. A null terminated array containing all the @system_identifiers supported by the set of available decryptors, or %NULL if no matches were found. A null terminated array of strings that contains the UUID values of each protection system that is to be checked. Iterates the supplied list of UUIDs and checks the GstRegistry for an element that supports one of the supplied UUIDs. If more than one element matches, the system ID of the highest ranked element is selected. One of the strings from @system_identifiers that indicates the highest ranked element that implements the protection system indicated by that system ID, or %NULL if no element has been found. A null terminated array of strings that contains the UUID values of each protection system that is to be checked. Tests if you can safely write data into a query's structure. a #GstQuery Makes a writable query from the given query. a #GstQuery to make writable Modifies a pointer to a #GstQuery to point to a different #GstQuery. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old query is unreffed, the new one is reffed). Either @new_query or the #GstQuery pointed to by @old_query may be %NULL. %TRUE if @new_query was different from @old_query pointer to a pointer to a #GstQuery to be replaced. pointer to a #GstQuery that will replace the query pointed to by @old_query. Modifies a pointer to a #GstQuery to point to a different #GstQuery. This function is similar to gst_query_replace() except that it takes ownership of @new_query. Either @new_query or the #GstQuery pointed to by @old_query may be %NULL. %TRUE if @new_query was different from @old_query pointer to a pointer to a #GstQuery to be stolen. pointer to a #GstQuery that will replace the query pointed to by @old_query. Gets the #GstQueryTypeFlags associated with @type. a #GstQueryTypeFlags. a #GstQueryType Get a printable name for the given query type. Do not modify or free. a reference to the static name of the query. the query type Get the unique quark for the given query type. the quark associated with the query type the query type Gets the global #GstMetaInfo describing the #GstReferenceTimestampMeta meta. The #GstMetaInfo Tests if you can safely set the buffer and / or buffer list of @sample. A #GstSample Returns a writable copy of @sample. If the source sample is already writable, this will simply return the same sample. Use this function to ensure that a sample can be safely modified before making changes to it, for example before calling gst_sample_set_buffer() If the reference count of the source sample @sample is exactly one, the caller is the sole owner and this function will return the sample object unchanged. If there is more than one reference on the object, a copy will be made using gst_sample_copy(). The passed-in @sample will be unreffed in that case, and the caller will now own a reference to the new returned sample object. In short, this function unrefs the sample in the argument and refs the sample that it returns. Don't access the argument after calling this function unless you have an additional reference to it. A #GstSample 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. %TRUE if GStreamer is allowed to install a custom SIGSEGV handler. Applications might want to disable/enable the SIGSEGV handling of the GStreamer core. See gst_segtrap_is_enabled() for more information. whether a custom SIGSEGV handler should be installed. Gets a string representing the given state transition. a string with the name of the state result. a #GstStateChange to get the name of. Get a descriptive string for a given #GstStreamType A string describing the stream type a #GstStreamType Atomically modifies a pointer to point to a new structure. The #GstStructure @oldstr_ptr is pointing to is freed and @newstr is taken ownership over. Either @newstr and the value pointed to by @oldstr_ptr may be %NULL. It is a programming error if both @newstr and the value pointed to by @oldstr_ptr refer to the same, non-%NULL structure. %TRUE if @newstr was different from @oldstr_ptr pointer to a place of a #GstStructure to take a new #GstStructure Checks if the given type is already registered. %TRUE if the type is already registered name of the tag Returns the human-readable description of this tag, You must not change or free this string. the human-readable description of this tag the tag Gets the flag of @tag. the flag of this tag. the tag Returns the human-readable name of this tag, You must not change or free this string. the human-readable name of this tag the tag Gets the #GType used for this tag. the #GType of this tag the tag Checks if the given tag is fixed. A fixed tag can only contain one value. Unfixed tags can contain lists of values. %TRUE, if the given tag is fixed. tag to check 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. %TRUE, if a value was copied, %FALSE if the tag didn't exist in the given list. uninitialized #GValue to copy into list to get the tag from tag to read out Tests if you can safely modify @taglist. It is only safe to modify taglist when there is only one owner of the taglist - ie, the refcount is 1. a #GstTagList Returns a writable copy of @taglist. If there is only one reference count on @taglist, the caller must be the owner, and so this function will return the taglist object unchanged. If on the other hand there is more than one reference on the object, a new taglist object will be returned (which will be a copy of @taglist). The caller's reference on @taglist will be removed, and instead the caller will own a reference to the returned object. In short, this function unrefs the taglist in the argument and refs the taglist that it returns. Don't access the argument after calling this function. See also: gst_tag_list_ref(). a #GstTagList Modifies a pointer to a #GstTagList to point to a different #GstTagList. The modification is done atomically (so this is useful for ensuring thread safety in some cases), and the reference counts are updated appropriately (the old tag list is unreffed, the new is reffed). Either @new_taglist or the #GstTagList pointed to by @old_taglist may be %NULL. %TRUE if @new_taglist was different from @old_taglist pointer to a pointer to a #GstTagList to be replaced. pointer to a #GstTagList that will replace the tag list pointed to by @old_taglist. Modifies a pointer to a #GstTagList to point to a different #GstTagList. This function is similar to gst_tag_list_replace() except that it takes ownership of @new_taglist. %TRUE if @new_taglist was different from @old_taglist pointer to a pointer to a #GstTagList to be replaced. pointer to a #GstTagList that will replace the taglist pointed to by @old_taglist. 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. uninitialized GValue to store result in GValue to copy from This is a convenience function for the func argument of gst_tag_register(). It creates a copy of the first value from the list. uninitialized GValue to store result in GValue to copy from 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(). the name or identifier string a flag describing the type of tag info the type this data is in human-readable name a human-readable description about this tag function for merging multiple values of this tag, or %NULL 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.) the name or identifier string (string constant) a flag describing the type of tag info the type this data is in human-readable name or short description (string constant) a human-readable description for this tag (string constant) function for merging multiple values of this tag, or %NULL Copy #GstToc with all subentries (deep copy). #GstToc to copy. Copy #GstTocEntry with all subentries (deep copy). #GstTocEntry to copy. Converts @type to a string representation. Returns a human-readable string for @type. This string is only for debugging purpose and should not be displayed in a user interface. a #GstTocEntryType. 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. A #GList of #GstTracer objects Register @func to be called when the trace hook @detail is getting invoked. Use %NULL for @detail to register to all hooks. the tracer the detailed hook the callback 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. %TRUE on success, %FALSE otherwise A #GstPlugin, or %NULL for a static typefind function The name for registering The rank (or importance) of this typefind function The #GstTypeFindFunction to use Optional comma-separated list of extensions that could belong to this type Optionally the caps that could be returned when typefinding succeeds Optional user data. This user data must be available until the plugin is unloaded. a #GDestroyNotify that will be called on @data when the plugin is unloaded. Checks if @type is plugin API. See gst_type_mark_as_plugin_api() for details. %TRUE if @type is plugin API or %FALSE otherwise. a GType What #GstPluginAPIFlags the plugin was marked with 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. a GType a set of #GstPluginAPIFlags to further inform cache generation. 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. %TRUE if the registry has been updated successfully (does not imply that there were changes), otherwise %FALSE. Constructs a URI for a given valid protocol and location. Free-function: g_free Use GstURI instead. a new string for this URI. Protocol for URI Location for URI Parses a URI string into a new #GstUri object. Will return NULL if the URI cannot be parsed. A new #GstUri object, or NULL. The URI string to parse. 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 '#'. A new #GstUri object, or NULL. The URI string to parse. 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 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. A URI string Extracts the protocol out of a given valid URI. The returned string must be freed using g_free(). The protocol for this URI. A URI string Checks if the protocol of a given valid URI matches @protocol. %TRUE if the protocol matches. a URI string a protocol string (e.g. "http") 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. %TRUE if the string is a valid URI A URI string This is a convenience function to join two URI strings and return the result. The returned string should be g_free()'d after use. A string representing the percent-encoded join of the two URIs. The percent-encoded base URI. The percent-encoded reference URI to join to the @base_uri. 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. %TRUE Whether to check for a source or a sink Protocol that should be checked for (e.g. "http" or "smb") 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. %TRUE if the string is a valid protocol identifier, %FALSE otherwise. A string 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)). The address of the found element or %NULL if nothing was found the sorted input array number of elements in the array size of every element in bytes function to compare two elements, @search_data will always be passed as second argument search mode that should be used element that should be found data to pass to @search_func Returns smallest integral value not less than log2(v). a computed #guint val. a #guint32 value. Transforms a #gdouble to a fraction and simplifies the result. #gdouble to transform pointer to a #gint to hold the result numerator pointer to a #gint to hold the result denominator Dumps the buffer memory into a hex representation. Useful for debugging. a #GstBuffer whose memory to dump Dumps the memory block into a hex representation. Useful for debugging. a pointer to the memory to dump the size of the memory block to dump Compares the given filenames using natural ordering. a filename to compare with @b a filename to compare with @a Returns smallest integral value not bigger than log2(v). a computed #guint val. Adds the fractions @a_n/@a_d and @b_n/@b_d and stores the result in @res_n and @res_d. %FALSE on overflow, %TRUE otherwise. Numerator of first value Denominator of first value Numerator of second value Denominator of second value Pointer to #gint to hold the result numerator Pointer to #gint to hold the result denominator 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. -1 if a < b; 0 if a = b; 1 if a > b. Numerator of first value Denominator of first value Numerator of second value Denominator of second value Multiplies the fractions @a_n/@a_d and @b_n/@b_d and stores the result in @res_n and @res_d. %FALSE on overflow, %TRUE otherwise. Numerator of first value Denominator of first value Numerator of second value Denominator of second value Pointer to #gint to hold the result numerator Pointer to #gint to hold the result denominator Transforms a fraction to a #gdouble. Fraction numerator as #gint Fraction denominator #gint pointer to a #gdouble for the result @value casted to #guint64 The #gdouble value to convert guint64 double Get a property of type %GST_TYPE_ARRAY and transform it into a #GValueArray. This allow language bindings to get GST_TYPE_ARRAY properties which are otherwise not an accessible type. the object to set the array to the name of the property to set a return #GValueArray Get a timestamp as GstClockTime to be used for interval measurements. The timestamp should not be interpreted in any other way. the timestamp Calculates the greatest common divisor of @a and @b. Greatest common divisor of @a and @b First value as #gint Second value as #gint Calculates the greatest common divisor of @a and @b. Greatest common divisor of @a and @b First value as #gint64 Second value as #gint64 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) A constantly incrementing unsigned integer, which might overflow back to 0 at some point. @value casted to #gdouble The #guint64 value to convert to double Compare two sequence numbers, handling wraparound. The current implementation just returns (gint32)(@s1 - @s2). A negative number if @s1 is before @s2, 0 if they are equal, or a positive number if @s1 is after @s2. A sequence number. Another sequence number. 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). 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. 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. the object to set the argument of the name of the argument to set the string value to set 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. the object to set the array to the name of the property to set a #GValueArray containing the values 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. the value to set the string to get the value from 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. First value as #gint Second value as #gint non-significative terms (typical value: 8) threshold (typical value: 333) 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. @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(). the number to scale the numerator of the scale ratio the denominator of the scale ratio 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. @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(). the number to scale the numerator of the scale ratio the denominator of the scale ratio 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. @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(). guint64 (such as a #GstClockTime) to scale. numerator of the scale factor. denominator of the scale factor. 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. @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(). guint64 (such as a #GstClockTime) to scale. numerator of the scale factor. denominator of the scale factor. 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. @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(). guint64 (such as a #GstClockTime) to scale. numerator of the scale factor. denominator of the scale factor. 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. @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(). the number to scale the numerator of the scale ratio the denominator of the scale ratio Determines if @value1 and @value2 can be compared. %TRUE if the values can be compared a value to compare another value to compare Determines if intersecting two values will produce a valid result. Two values will produce a valid intersection if they have the same type. %TRUE if the values can intersect a value to intersect another value to intersect Checks if it's possible to subtract @subtrahend from @minuend. %TRUE if a subtraction is possible the value to subtract from the value to subtract 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. %TRUE if there is a function allowing the two values to be unioned. a value to union another value to union 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. comparison result a value to compare another value to compare Tries to deserialize a string into the type specified by the given GValue. If the operation succeeds, %TRUE is returned, %FALSE otherwise. %TRUE on success #GValue to fill with contents of deserialization string to deserialize 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. %TRUE on success #GValue to fill with contents of deserialization string to deserialize the #GParamSpec describing the expected value 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. %TRUE if @dest contains a fixated version of @src. the #GValue destination the #GValue to fixate Multiplies the two #GValue items containing a #GST_TYPE_FRACTION and sets @product to the product of the two fractions. %FALSE in case of an error (like integer overflow), %TRUE otherwise. a GValue initialized to #GST_TYPE_FRACTION a GValue initialized to #GST_TYPE_FRACTION a GValue initialized to #GST_TYPE_FRACTION Subtracts the @subtrahend from the @minuend and sets @dest to the result. %FALSE in case of an error (like integer overflow), %TRUE otherwise. a GValue initialized to #GST_TYPE_FRACTION a GValue initialized to #GST_TYPE_FRACTION a GValue initialized to #GST_TYPE_FRACTION Gets the bitmask specified by @value. the bitmask. a GValue initialized to #GST_TYPE_BITMASK Receives a #GstBuffer as the value of @v. Does not return a reference to the buffer, so the pointer is only valid for as long as the caller owns a reference to @v. a #GValue to query 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. the contents of @value a GValue initialized to GST_TYPE_CAPS Gets the contents of @value. the contents of @value a GValue initialized to GST_TYPE_CAPS_FEATURES Gets the maximum of the range specified by @value. the maximum of the range a GValue initialized to GST_TYPE_DOUBLE_RANGE Gets the minimum of the range specified by @value. the minimum of the range a GValue initialized to GST_TYPE_DOUBLE_RANGE Retrieve the flags field of a GstFlagSet @value. the flags field of the flagset instance. a GValue initialized to #GST_TYPE_FLAG_SET Retrieve the mask field of a GstFlagSet @value. the mask field of the flagset instance. a GValue initialized to #GST_TYPE_FLAG_SET Gets the denominator of the fraction specified by @value. the denominator of the fraction. a GValue initialized to #GST_TYPE_FRACTION Gets the numerator of the fraction specified by @value. the numerator of the fraction. a GValue initialized to #GST_TYPE_FRACTION Gets the maximum of the range specified by @value. the maximum of the range a GValue initialized to GST_TYPE_FRACTION_RANGE Gets the minimum of the range specified by @value. the minimum of the range a GValue initialized to GST_TYPE_FRACTION_RANGE Gets the maximum of the range specified by @value. the maximum of the range a GValue initialized to GST_TYPE_INT64_RANGE Gets the minimum of the range specified by @value. the minimum of the range a GValue initialized to GST_TYPE_INT64_RANGE Gets the step of the range specified by @value. the step of the range a GValue initialized to GST_TYPE_INT64_RANGE Gets the maximum of the range specified by @value. the maximum of the range a GValue initialized to GST_TYPE_INT_RANGE Gets the minimum of the range specified by @value. the minimum of the range a GValue initialized to GST_TYPE_INT_RANGE Gets the step of the range specified by @value. the step of the range a GValue initialized to GST_TYPE_INT_RANGE Receives a #GstSample as the value of @v. Does not return a reference to the sample, so the pointer is only valid for as long as the caller owns a reference to @v. a #GValue to query Gets the contents of @value. the contents of @value a GValue initialized to GST_TYPE_STRUCTURE Initialises the target value to be of the same type as source and then copies the contents from source to target. the target value the source value 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. %TRUE if the intersection is non-empty a uninitialized #GValue that will hold the calculated intersection value. May be %NULL if the resulting set if not needed. a value to intersect another value to intersect 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. true if the value is "fixed". the #GValue to check Check that @value1 is a subset of @value2. %TRUE is @value1 is a subset of @value2 a #GValue a #GValue Registers functions to perform calculations on #GValue items of a given type. Each type can only be added once. structure containing functions to register 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 the serialization for @value or %NULL if none exists a #GValue to serialize Sets @value to the bitmask specified by @bitmask. a GValue initialized to #GST_TYPE_BITMASK the bitmask Sets @b as the value of @v. Caller retains reference to buffer. a #GValue to receive the data a #GstBuffer to assign to the GstValue Sets the contents of @value to @caps. A reference to the provided @caps will be taken by the @value. a GValue initialized to GST_TYPE_CAPS the caps to set the value to Sets the contents of @value to @features. a GValue initialized to GST_TYPE_CAPS_FEATURES the features to set the value to Sets @value to the range specified by @start and @end. a GValue initialized to GST_TYPE_DOUBLE_RANGE the start of the range the end of the range 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" a GValue initialized to %GST_TYPE_FLAG_SET The value of the flags set or unset The mask indicate which flags bits must match for comparisons 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. a GValue initialized to #GST_TYPE_FRACTION the numerator of the fraction the denominator of the fraction Sets @value to the range specified by @start and @end. a GValue initialized to GST_TYPE_FRACTION_RANGE the start of the range (a GST_TYPE_FRACTION GValue) the end of the range (a GST_TYPE_FRACTION GValue) Sets @value to the range specified by @numerator_start/@denominator_start and @numerator_end/@denominator_end. a GValue initialized to GST_TYPE_FRACTION_RANGE the numerator start of the range the denominator start of the range the numerator end of the range the denominator end of the range Sets @value to the range specified by @start and @end. a GValue initialized to GST_TYPE_INT64_RANGE the start of the range the end of the range Sets @value to the range specified by @start, @end and @step. a GValue initialized to GST_TYPE_INT64_RANGE the start of the range the end of the range the step of the range Sets @value to the range specified by @start and @end. a GValue initialized to GST_TYPE_INT_RANGE the start of the range the end of the range Sets @value to the range specified by @start, @end and @step. a GValue initialized to GST_TYPE_INT_RANGE the start of the range the end of the range the step of the range Sets @b as the value of @v. Caller retains reference to sample. a #GValue to receive the data a #GstSample to assign to the GstValue Sets the contents of @value to @structure. a GValue initialized to GST_TYPE_STRUCTURE the structure to set the value to Subtracts @subtrahend from @minuend and stores the result in @dest. Note that this means subtraction as in sets, not as in mathematics. %TRUE if the subtraction is not empty 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. the value to subtract from the value to subtract Sets @b as the value of @v. Caller gives away reference to buffer. a #GValue to receive the data a #GstBuffer to assign to the GstValue Sets @b as the value of @v. Caller gives away reference to sample. a #GValue to receive the data a #GstSample to assign to the GstValue Creates a GValue corresponding to the union of @value1 and @value2. %TRUE if the union succeeded. the destination value a value to union another value to union Allocates a new #GstVecDeque object with an initial queue size of @initial_size. a new #GstVecDeque object Initial size of the new queue Allocates a new #GstVecDeque object for elements (e.g. structures) of size @struct_size, with an initial queue size of @initial_size. a new #GstVecDeque object Size of each element (e.g. structure) in the array Initial size of the new queue Gets the version number of the GStreamer library. pointer to a guint to store the major version number pointer to a guint to store the minor version number pointer to a guint to store the micro version number pointer to a guint to store the nano version number This function returns a string that is useful for describing this version of GStreamer to the outside world: user agent strings, logging, ... a newly allocated string describing this version of GStreamer.