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. The status of a GstPad. After activating a pad, which usually happens when the parent element goes from READY to PAUSED, the GstActivateMode defines if the pad operates in push or pull mode. The main tracing object Print the status of the given GstAllocTrace. Enable the given features on the given GstAllocTrace object. flags to set Flags indicating which tracing feature to enable. Flags for an association entry. The #GstAtomicQueue object implements a queue that can be used from multiple threads without performing any blocking operations. Get the amount of items in the queue. the number of elements in the queue. 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. Get the head element of the queue. the head element of @queue or NULL when the queue is empty. Append @data to the tail of the queue. the data Increase the refcount of @queue. Unref @queue and free the memory when the refcount reaches 0. #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. <refsect2><title>Notes</title> <para> A #GstBin internally intercepts every #GstMessage posted by its children and implements the following default behaviour for each of them: <variablelist> <varlistentry> <term>GST_MESSAGE_EOS</term> <listitem><para>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.</para></listitem> </varlistentry> <varlistentry> <term>GST_MESSAGE_SEGMENT_START</term> <listitem><para>just collected and never forwarded upwards. The messages are used to decide when all elements have completed playback of their segment.</para></listitem> </varlistentry> <varlistentry> <term>GST_MESSAGE_SEGMENT_DONE</term> <listitem><para> Is posted by #GstBin when all elements that posted a SEGMENT_START have posted a SEGMENT_DONE.</para></listitem> </varlistentry> <varlistentry> <term>GST_MESSAGE_DURATION</term> <listitem><para> Is posted by an element that detected a change in the stream duration. The default bin behaviour is to clear any cached duration values so that the next duration query will perform a full duration recalculation. 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. </para></listitem> </varlistentry> <varlistentry> <term>GST_MESSAGE_CLOCK_LOST</term> <listitem><para> 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. </para></listitem> </varlistentry> <varlistentry> <term>GST_MESSAGE_CLOCK_PROVIDE</term> <listitem><para> 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 tot the application but is forwarded to the parent of the bin. </para></listitem> </varlistentry> <varlistentry> <term>OTHERS</term> <listitem><para> posted upwards.</para></listitem> </varlistentry> </variablelist> A #GstBin implements the following default behaviour for answering to a #GstQuery: <variablelist> <varlistentry> <term>GST_QUERY_DURATION</term> <listitem><para>If the query has been asked before with the same format and the bin is a toplevel bin (ie. has no parent), use the cached previous value. If no previous value was cached, the query is sent to all sink elements in the bin and the MAXIMUM of all values is returned. If the bin is a toplevel bin the value is cached. If no sinks are available in the bin, the query fails. </para></listitem> </varlistentry> <varlistentry> <term>GST_QUERY_POSITION</term> <listitem><para>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. </para></listitem> </varlistentry> <varlistentry> <term>OTHERS</term> <listitem><para>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.</para></listitem> </varlistentry> </variablelist> A #GstBin will by default forward any event sent to it to all sink elements. If all the sinks return TRUE, the bin will also return TRUE, else FALSE is returned. If no sinks are in the bin, the event handler will return TRUE. </para> </refsect2> Last reviewed on 2006-04-28 (0.10.6) Creates a new bin with the given name. a new #GstBin the name of the new bin 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. <note> 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. </note> MT safe. the bin does not want to accept the element. TRUE if the element could be added, FALSE if 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. the #GstElement element 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, or NULL. whether to look for an unlinked source or sink pad 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, or NULL. 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. MT safe. Caller owns returned reference. A #GstElement inside the bin implementing the interface the #GType of an interface Gets the element with the given name from a bin. This function recurses into child bins. Returns NULL if no element with the given name is found in the bin. MT safe. Caller owns returned reference. the #GstElement with the given name, or NULL 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. Returns NULL if: - no element with the given name is found in the bin MT safe. Caller owns returned reference. the #GstElement with the given name, or NULL the element name to search for 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 that should be unreffed after use. Each element yielded by the iterator will have its refcount increased, so unref after use. MT safe. Caller owns returned value. in the bin implementing the given interface, or NULL a #GstIterator of #GstElement for all elements the #GType of an interface Gets an iterator for the elements in this bin. Each element yielded by the iterator will have its refcount increased, so unref after use. MT safe. Caller owns returned value. a #GstIterator of #GstElement, or NULL Gets an iterator for the elements in this bin. This iterator recurses into GstBin children. Each element yielded by the iterator will have its refcount increased, so unref after use. MT safe. Caller owns returned value. a #GstIterator of #GstElement, or NULL Gets an iterator for all elements in the bin that have the #GST_ELEMENT_IS_SINK flag set. Each element yielded by the iterator will have its refcount increased, so unref after use. MT safe. Caller owns returned value. a #GstIterator of #GstElement, or NULL 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. Each element yielded by the iterator will have its refcount increased, so unref after use. MT safe. Caller owns returned value. a #GstIterator of #GstElement, or NULL Gets an iterator for all elements in the bin that have the #GST_ELEMENT_IS_SOURCE flag set. Each element yielded by the iterator will have its refcount increased, so unref after use. MT safe. Caller owns returned value. a #GstIterator of #GstElement, or NULL Query @bin for the current latency using and reconfigures this latency to all the elements with 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 'do-latency' signal so any custom latency calculations will be performed. %TRUE if the latency could be queried and reconfigured. 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. MT safe. the bin does not want to remove the element. TRUE if the element could be removed, FALSE if the #GstElement to remove Remove a list of elements from a bin. This function is equivalent to calling gst_bin_remove() with each member of the list. the first #GstElement to remove from the bin 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' of type GST_TYPE_MESSAGE that contains the original forwarded message. Will be emitted when the bin needs to perform latency calculations. This signal is only emited for toplevel bins or when 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 the @add_element and @remove_element to update the list of children in the bin. The @handle_message method can be overridden to implement custom message handling. @handle_message takes ownership of the message, just like #gst_element_post_message. 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 (). Buffers are the basic unit of data transfer in GStreamer. The #GstBuffer type provides all the state necessary to define a region of memory as part of a stream. Sub-buffers are also supported, allowing a smaller region of a buffer to become its own buffer, with mechanisms in place to ensure that neither memory space goes away prematurely. Buffers are usually created with gst_buffer_new(). After a buffer has been created one will typically allocate memory for it and set the size of the buffer data. The following example creates a buffer that can hold a given video frame with a given width, height and bits per plane. <example> <title>Creating a buffer for a video frame</title> <programlisting> GstBuffer *buffer; gint size, width, height, bpp; ... size = width * height * bpp; buffer = gst_buffer_new (); GST_BUFFER_SIZE (buffer) = size; GST_BUFFER_MALLOCDATA (buffer) = g_malloc (size); GST_BUFFER_DATA (buffer) = GST_BUFFER_MALLOCDATA (buffer); ... </programlisting> </example> Alternatively, use gst_buffer_new_and_alloc() to create a buffer with preallocated data of a given size. The data pointed to by the buffer can be retrieved with the GST_BUFFER_DATA() macro. The size of the data can be found with GST_BUFFER_SIZE(). For buffers of size 0, the data pointer is undefined (usually NULL) and should never be used. If an element knows what pad you will push the buffer out on, it should use gst_pad_alloc_buffer() instead to create a buffer. This allows downstream elements to provide special buffers to write in, like hardware buffers. A buffer has a pointer to a #GstCaps describing the media type of the data in the buffer. Attach caps to the buffer with gst_buffer_set_caps(); this is typically done before pushing out a buffer using gst_pad_push() so that the downstream element knows the type of the buffer. A buffer will usually have a timestamp, 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 timestamp and duration are measured in nanoseconds (they are #GstClockTime values). 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 #GstCaps set on it). 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. To efficiently create a smaller buffer out of an existing one, you can use gst_buffer_create_sub(). If a plug-in wants to modify the buffer data 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. A plugin that only wishes to modify the metadata of a buffer, such as the offset, timestamp or caps, should use gst_buffer_make_metadata_writable(), which will create a subbuffer of the original buffer to ensure the caller has sole ownership, and not copy the buffer data. 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 #GstBufferFlag is set. Buffers can be efficiently merged into a larger buffer with gst_buffer_merge() and gst_buffer_span() if the gst_buffer_is_span_fast() function returns TRUE. 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 data pointed to by GST_BUFFER_MALLOCDATA() will also be freed. Last reviewed on August 11th, 2006 (0.10.10) Creates a newly allocated buffer without any data. MT safe. the new #GstBuffer. Creates a newly allocated buffer with data of the given size. The buffer memory is not cleared. If the requested amount of memory can't be allocated, the program will abort. Use gst_buffer_try_new_and_alloc() if you want to handle this case gracefully or have gotten the size to allocate from an untrusted source such as a media stream. Note that when @size == 0, the buffer data pointer will be NULL. MT safe. the new #GstBuffer. the size in bytes of the new buffer's data. Tries to create a newly allocated buffer with data of the given size. If the requested amount of memory can't be allocated, NULL will be returned. The buffer memory is not cleared. Note that when @size == 0, the buffer data pointer will be NULL. MT safe. be allocated. a new #GstBuffer, or NULL if the memory couldn't the size in bytes of the new buffer's data. Copies the metadata from @src into @dest. The data, size and mallocdata fields are not copied. all the metadata fields. This function is typically called from a custom buffer copy function after creating @dest and setting the data, size, mallocdata. a source #GstBuffer flags indicating what metadata fields should be 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. MT safe. invalid. the new #GstBuffer or NULL if the arguments were the offset into parent #GstBuffer at which the new sub-buffer begins. the size of the new #GstBuffer sub-buffer, in bytes. Gets the media type of the buffer. This can be NULL if there is no media type attached to this buffer. Returns NULL if there were no caps on this buffer. a reference to the #GstCaps. unref after usage. Similar to gst_buffer_is_writable, but this only ensures that the refcount of the buffer is 1, indicating that the caller is the sole owner and can change the buffer metadata, such as caps and timestamps. TRUE if the metadata is writable. Determines whether a gst_buffer_span() can be done without copying the contents, that is, whether the data areas are contiguous sub-buffers of the same buffer. MT safe. FALSE if a copy would be required. TRUE if the buffers are contiguous, the second #GstBuffer. Create a new buffer that is the concatenation of the two source buffers, and unrefs the original source buffers. If the buffers point to contiguous areas of memory, the buffer is created without copying the data. This is a convenience function for C programmers. See also gst_buffer_merge(), which does the same thing without unreffing the input parameters. Language bindings without explicit reference counting should not wrap this function. the source buffers. the new #GstBuffer which is the concatenation of the second source #GstBuffer. Similar to gst_buffer_make_writable, but does not ensure that the buffer data array is writable. Instead, this just ensures that the returned buffer is solely owned by the caller, by creating a subbuffer of the original buffer if necessary. After calling this function, @buf should not be referenced anymore. The result of this function has guaranteed writable metadata. may or may not be the same as @buf. a new #GstBuffer with writable metadata, which Create a new buffer that is the concatenation of the two source buffers. The original source buffers will not be modified or unref'd. Make sure you unref the source buffers if they are not used anymore afterwards. If the buffers point to contiguous areas of memory, the buffer is created without copying the data. of the source buffers. the new #GstBuffer which is the concatenation the second source #GstBuffer to merge. Sets the media type on the buffer. The refcount of the caps will be increased and any previous caps on the buffer will be unreffed. a #GstCaps. Creates a new buffer that consists of part of buf1 and buf2. Logically, buf1 and buf2 are concatenated into a single larger buffer, and a new buffer is created at the given offset inside this space, with a given length. If the two source buffers are children of the same larger buffer, and are contiguous, the new buffer will be a child of the shared parent, and thus no copying is necessary. you can use gst_buffer_is_span_fast() to determine if a memcpy will be needed. MT safe. buffers, or NULL if the arguments are invalid. the new #GstBuffer that spans the two source the offset in the first buffer from where the new buffer should start. the second source #GstBuffer to merge. the total length of the new buffer. Copies additional information (the timestamp, duration, and offset start and end) from one buffer to the other. This function does not copy any buffer flags or caps and is equivalent to gst_buffer_copy_metadata(@dest, @src, GST_BUFFER_COPY_TIMESTAMPS). control. buffer to stamp from A set of flags that can be provided to the gst_buffer_copy_metadata() function to specify which metadata fields should be copied. A set of buffer flags used to describe properties of a #GstBuffer. Buffer lists are units of grouped scatter/gather data transfer in GStreamer. Buffer lists are created with gst_buffer_list_new() and filled with data using a #GstBufferListIterator. The iterator has no current buffer; its cursor position lies between buffers, immediately before the buffer that would be returned by gst_buffer_list_iterator_next(). After iterating to the end of a group the iterator must be advanced to the next group by a call to gst_buffer_list_iterator_next_group() before any further calls to gst_buffer_list_iterator_next() can return buffers again. The cursor position of a newly created iterator lies before the first group; a call to gst_buffer_list_iterator_next_group() is necessary before calls to gst_buffer_list_iterator_next() can return buffers. <informalfigure> <programlisting> +--- group0 ----------------------+--- group1 ------------+ | buffer0 buffer1 buffer2 | buffer3 buffer4 | ^ ^ ^ ^ ^ ^ ^ ^ Iterator positions between buffers </programlisting> </informalfigure> The gst_buffer_list_iterator_remove(), gst_buffer_list_iterator_steal(), gst_buffer_list_iterator_take() and gst_buffer_list_iterator_do() functions are not defined in terms of the cursor position; they operate on the last element returned from gst_buffer_list_iterator_next(). The basic use pattern of creating a buffer list with an iterator is as follows: <example> <title>Creating a buffer list</title> <programlisting> GstBufferList *list; GstBufferListIterator *it; list = gst_buffer_list_new (); it = gst_buffer_list_iterate (list); gst_buffer_list_iterator_add_group (it); gst_buffer_list_iterator_add (it, header1); gst_buffer_list_iterator_add (it, data1); gst_buffer_list_iterator_add_group (it); gst_buffer_list_iterator_add (it, header2); gst_buffer_list_iterator_add (it, data2); gst_buffer_list_iterator_add_group (it); gst_buffer_list_iterator_add (it, header3); gst_buffer_list_iterator_add (it, data3); ... gst_buffer_list_iterator_free (it); </programlisting> </example> The basic use pattern of iterating over a buffer list is as follows: <example> <title>Iterating a buffer list</title> <programlisting> GstBufferListIterator *it; it = gst_buffer_list_iterate (list); while (gst_buffer_list_iterator_next_group (it)) { while ((buffer = gst_buffer_list_iterator_next (it)) != NULL) { do_something_with_buffer (buffer); } } gst_buffer_list_iterator_free (it); </programlisting> </example> The basic use pattern of modifying a buffer in a list is as follows: <example> <title>Modifying the data of the first buffer in a list</title> <programlisting> GstBufferListIterator *it; list = gst_buffer_list_make_writable (list); it = gst_buffer_list_iterate (list); if (gst_buffer_list_iterator_next_group (it)) { GstBuffer *buf buf = gst_buffer_list_iterator_next (it); if (buf != NULL) { buf = gst_buffer_list_iterator_do (it, (GstBufferListDoFunction) gst_mini_object_make_writable, NULL); modify_data (GST_BUFFER_DATA (buf)); } } gst_buffer_list_iterator_free (it); </programlisting> </example> Creates a new, empty #GstBufferList. The caller is responsible for unreffing the returned #GstBufferList. after usage. the new #GstBufferList. gst_buffer_list_unref() Call @func with @data for each buffer in @list. of @func define if this function returns or if the remaining buffers in a group should be skipped. a #GstBufferListFunc to call user data passed to @func Get the buffer at @idx in @group. Note that this function is not efficient for iterating over the entire list. Use an iterator or gst_buffer_list_foreach() instead. is no buffer. The buffer remains valid as long as @list is valid. the buffer at @idx in @group or NULL when there the group the index in @group Iterate the buffers in @list. The owner of the iterator must also be the owner of a reference to @list while the returned iterator is in use. a new #GstBufferListIterator of the buffers in Returns the number of groups in @list. the number of groups in the buffer list A function for accessing the last buffer returned by gst_buffer_list_iterator_next(). The function can leave @buffer in the list, replace @buffer in the list or remove @buffer from the list, depending on the return value. If the function returns NULL, @buffer will be removed from the list, otherwise @buffer will be replaced with the returned buffer. The last buffer returned by gst_buffer_list_iterator_next() will be replaced with the buffer returned from the function. The function takes ownership of unreffed. If NULL is returned, the buffer will be removed from the list. The list must be writable. to remove @buffer from the list the buffer to replace @buffer in the list, or NULL the #GstBuffer user data 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 in @group. When this function returns #GST_BUFFER_LIST_CONTINUE, the next buffer will be returned. When #GST_BUFFER_LIST_SKIP_GROUP is returned, all remaining buffers in the current group will be skipped and the first buffer of the next group is returned (if any). When GST_BUFFER_LIST_END 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. a #GstBufferListItem pointer the buffer the group index of @buffer the index in @group of @buffer user data passed to gst_buffer_list_foreach() The result of the #GstBufferListFunc. Opaque iterator for a #GstBufferList. Inserts @buffer into the #GstBufferList iterated with @it. The buffer is inserted into the current group, immediately before the buffer that would be returned by gst_buffer_list_iterator_next(). The buffer is inserted before the implicit cursor, a subsequent call to gst_buffer_list_iterator_next() will return the buffer after the inserted buffer, if any. This function takes ownership of @buffer. a #GstBuffer Inserts a new, empty group into the #GstBufferList iterated with @it. The group is inserted immediately before the group that would be returned by gst_buffer_list_iterator_next_group(). A subsequent call to gst_buffer_list_iterator_next_group() will advance the iterator to the group after the inserted group, if any. Inserts @list of buffers into the #GstBufferList iterated with @it. The list is inserted into the current group, immediately before the buffer that would be returned by gst_buffer_list_iterator_next(). The list is inserted before the implicit cursor, a subsequent call to gst_buffer_list_iterator_next() will return the buffer after the last buffer of the inserted list, if any. This function takes ownership of @list and all its buffers. a #GList of buffers Calls the given function for the last buffer returned by gst_buffer_list_iterator_next(). gst_buffer_list_iterator_next() must have been called on @it before this function is called. gst_buffer_list_iterator_remove() and gst_buffer_list_iterator_steal() must not have been called since the last call to gst_buffer_list_iterator_next(). See #GstBufferListDoFunction for more details. the return value from @do_func the function to be called the gpointer to optional user data. Free the iterator. Merge a buffer list group into a normal #GstBuffer by copying its metadata and memcpying its data into consecutive memory. All buffers in the current group after the implicit cursor will be merged into one new buffer. The metadata of the new buffer will be a copy of the metadata of the buffer that would be returned by gst_buffer_list_iterator_next(). If there is no buffer in the current group after the implicit cursor, NULL will be returned. This function will not move the implicit cursor or in any other way affect the state of the iterator @it or the list. or NULL a new #GstBuffer, gst_buffer_unref() after usage, Returns the number of buffers left to iterate in the current group. I.e. the number of calls that can be made to gst_buffer_list_iterator_next() before it returns NULL. This function will not move the implicit cursor or in any other way affect the state of the iterator @it. the number of buffers left to iterate in the current group Returns the next buffer in the list iterated with @it. If the iterator is at the end of a group, NULL will be returned. This function may be called repeatedly to iterate through the current group. The caller will not get a new ref to the returned #GstBuffer and must not unref it. buffer list, or NULL the next buffer in the current group of the Advance the iterator @it to the first buffer in the next group. If the iterator is at the last group, FALSE will be returned. This function may be called repeatedly to iterate through the groups in a buffer list. the iterator was already at the last group TRUE if the iterator could be advanced to the next group, FALSE if Removes the last buffer returned by gst_buffer_list_iterator_next() from the #GstBufferList iterated with @it. gst_buffer_list_iterator_next() must have been called on @it before this function is called. This function can only be called once per call to gst_buffer_list_iterator_next(). The removed buffer is unreffed. Returns the last buffer returned by gst_buffer_list_iterator_next() without modifying the refcount of the buffer. gst_buffer_list_iterator_next() the last buffer returned by Replaces the last buffer returned by gst_buffer_list_iterator_next() with this function is called. gst_buffer_list_iterator_remove() must not have been called since the last call to gst_buffer_list_iterator_next(). This function unrefs the replaced buffer if it has not been stolen with gst_buffer_list_iterator_steal() and takes ownership of @buffer (i.e. the refcount of @buffer is not increased). a #GstBuffer The different types of buffering methods. 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 mainloop. 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. Last reviewed on 2006-03-12 (0.10.5) Creates a new #GstBus instance. a new #GstBus instance Adds a bus signal watch to the default main context with the default priority (%G_PRIORITY_DEFAULT). Since 0.10.33 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. MT safe. Adds a bus signal watch to the default main context with the given @priority (e.g. %G_PRIORITY_DEFAULT). Since 0.10.33 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 main loop 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 most remove all signal watch before you can set another type of watch. MT safe. The priority of the watch. Adds a bus watch to the default main context with the default priority (%G_PRIORITY_DEFAULT). Since 0.10.33 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 watch can be removed using g_source_remove() or by returning FALSE from @func. MT safe. The event source id. 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). Since 0.10.33 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. 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 g_source_remove() or by returning FALSE from @func. MT safe. The event source id. 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 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. a #GSource that can be added to a mainloop. 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. MT safe. 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 <emphasis>synchronous</emphasis> emission of signals when messages arrive; gst_bus_add_signal_watch() adds an idle callback to pop messages off the bus <emphasis>asynchronously</emphasis>. 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 main loop. MT safe. Check if there are pending messages on the bus that should be handled. otherwise. MT safe. TRUE if there are messages on the bus to be handled, FALSE Peek the message on the top of the bus' queue. The message will remain on the bus' message queue. A reference is returned, and needs to be unreffed by the caller. bus is empty. MT safe. the #GstMessage that is on the bus, or NULL if the Poll 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 All messages not in @events will be popped off the bus and will be ignored. 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 main loop 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. poll timed out. The message is taken from the bus and needs to be unreffed with gst_message_unref() after usage. the message that was received, or NULL if the a mask of #GstMessageType, representing the set of message types to poll for. the poll timeout, as a #GstClockTimeDiff, or -1 to poll indefinitely. Get a message from the bus. bus is empty. The message is taken from the bus and needs to be unreffed with gst_message_unref() after usage. MT safe. the #GstMessage that is on the bus, or NULL if the Get 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. the bus, or NULL if the bus is empty or there is no message matching gst_message_unref() after usage. MT safe. the next #GstMessage matching @type that is on message types to take into account Post a message on the given bus. Ownership of the message is taken by the bus. MT safe. TRUE if the message could be posted, FALSE if the bus is flushing. the #GstMessage to post Removes a signal watch previously added with gst_bus_add_signal_watch(). MT safe. If @flushing, flush out and unref 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. MT safe. 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. You cannot replace an existing sync_handler. You can pass NULL to this function, which will clear the existing handler. The handler function to install User data that will be sent to the handler function. A helper GstBusSyncHandler that can be used to convert all synchronous messages into signals. GST_BUS_PASS the #GstMessage received user data Get 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. specified timeout or NULL if the bus is empty after the timeout expired. The message is taken from the bus and needs to be unreffed with gst_message_unref() after usage. MT safe. the #GstMessage that is on the bus after the a timeout Get 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 matching message was posted on the bus. or NULL if no matching message was found on the bus until the timeout expired. The message is taken from the bus and needs to be unreffed with gst_message_unref() after usage. MT safe. a #GstMessage matching the filter in @types, a timeout in nanoseconds, or GST_CLOCK_TIME_NONE to wait forever message types to take into account, GST_MESSAGE_ANY for any type 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 mainloop 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 set up gst_bus_sync_signal_handler() as a sync handler if you want this signal to be emitted when a message is posted on the bus, like this: <programlisting> gst_bus_set_sync_handler (bus, gst_bus_sync_signal_handler, yourdata); </programlisting> the message that has been posted synchronously The standard flags that a bus may have. 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. Caps (capabilities) are lighweight 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_get_caps() pad function. This function describes the possible types that the pad can handle or produce at runtime. Caps are also attached to buffers to describe to content of the data pointed to by the buffer with gst_buffer_set_caps(). Caps attached to a #GstBuffer allow for format negotiation upstream and downstream. A #GstCaps can be constructed with the following code fragment: <example> <title>Creating caps</title> <programlisting> GstCaps *caps; caps = gst_caps_new_simple ("video/x-raw-yuv", "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('I', '4', '2', '0'), "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); </programlisting> </example> A #GstCaps is fixed when it has no properties with ranges or lists. Use gst_caps_is_fixed() to test for fixed caps. Only fixed caps can be set on a #GstPad or #GstBuffer. Various methods exist to work with the media types such as subtracting or intersecting. Last reviewed on 2007-02-13 (0.10.10) 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. Caller is responsible for unreffing the returned caps. the new #GstCaps 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 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. The structure is defined by the arguments, which have the same format as gst_structure_new(). Caller is responsible for unreffing the returned caps. the new #GstCaps the media type of the structure first field to set Appends the structures contained in @caps2 to @caps1. The structures in freed. If either caps is ANY, the resulting caps will be ANY. the #GstCaps to append Appends @structure to @caps. The structure is not copied; @caps becomes the owner of @structure. the #GstStructure 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 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(). When you are finished with the caps, call gst_caps_unref() on it. the new #GstCaps Creates a new #GstCaps and appends a copy of the nth structure contained in @caps. the new #GstCaps the nth structure to copy Modifies the given @caps inplace 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. TRUE, if the caps could be simplified Gets the number of structures contained in @caps. the number of structures that @caps contains Finds the structure in @caps that has the index @index, and returns it. 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(). You do not need to free or unref the structure returned, it belongs to the #GstCaps. to @index a pointer to the #GstStructure corresponding the index of the structure 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 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 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 Determines if @caps represents any media format. TRUE if @caps represents any format. Determines if @caps represents no media formats. TRUE if @caps represents no formats. Checks if the given caps represent the same set of caps. <note>This function does not work reliably if optional properties for caps are included on one caps and omitted on the other.</note> This function deals correctly with passing NULL for any of the caps. TRUE if both caps are equal. 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 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 Checks if all caps represented by @subset are also represented by @superset. <note>This function does not work reliably if optional properties for caps are included on one caps and omitted on the other.</note> %TRUE if @subset is a subset of @superset a potentially greater #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 the same #GstCaps object. 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 @caps1, and then @caps2 is freed. If either caps is ANY, the resulting caps will be ANY. the #GstCaps to merge in Appends @structure to @caps if its not already expressed by @caps. The structure is not copied; @caps becomes the owner of @structure. the #GstStructure to merge Creates a new #GstCaps that represents the same set of formats as the new #GstCaps Add 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. removes the stucture with the given index from the list of structures contained in @caps. Index of the structure to remove Serializes a #GstCaps to XML and adds it as a child node of @parent. a XML node pointer a XML parent node Sets fields in a #GstCaps. The arguments must be passed in the same manner as gst_structure_set(), and be NULL-terminated. <note>Prior to GStreamer version 0.10.26, this function failed when of GStreamer, you may only call this function when GST_CAPS_IS_SIMPLE() is %TRUE for @caps.</note> first field to set Sets fields in a #GstCaps. The arguments must be passed in the same manner as gst_structure_set(), and be NULL-terminated. <note>Prior to GStreamer version 0.10.26, this function failed when of GStreamer, you may only call this function when GST_CAPS_IS_SIMPLE() is %TRUE for @caps.</note> 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. name of the field to set value to set the field to Retrieves the stucture with the given index from the list of structures contained in @caps. The caller becomes the owner of the returned structure. to @index. a pointer to the #GstStructure corresponding Index of the structure to retrieve Subtracts the @subtrahend from the @minuend. <note>This function does not work reliably if optional properties for caps are included on one caps and omitted on the other.</note> the resulting caps #GstCaps to substract 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: |[ GST_LOG ("caps are %" GST_PTR_FORMAT, caps); ]| This prints the caps in human readble form. a newly allocated string representing @caps. Destructively discard all but the first structure from @caps. Useful when fixating. @caps must be writable. Creates a new #GstCaps that contains all the formats that are in either @caps1 and @caps2. the new #GstCaps a #GstCaps to union Unref a #GstCaps and and free all its structures and the structures' values when the refcount reaches 0. Extra flags for a caps. Modes of caps intersection 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. another element's caps priority order when intersecting with its own caps. would be [A, B], maintaining the first caps priority on the intersection. 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. Fetches a child by its number. too high). Unref after usage. MT safe. the child object or %NULL if not found (index the childs position in the child list Gets the number of child objects this parent contains. MT safe. the number of child objects Fetches a child by its number. too high). Unref after usage. MT safe. the child object or %NULL if not found (index the childs position in the child list Looks up a child element by the given name. Implementors can use #GstObject together with gst_object_get_name() after usage. MT safe. the child object or %NULL if not found. Unref the childs name Gets the number of child objects this parent contains. MT safe. the number of child objects #GstChildProxy interface. the child object or %NULL if not found (index the childs position in the child list the number of child objects 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 newsegment 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 the 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 it is 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 the 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. Last reviewed on 2009-05-21 (0.10.24) Compares the two #GstClockID instances. This function can be used as a GCompareFunc when sorting ids. MT safe. negative value if a < b; zero if a = b; positive value if a > b A #GstClockID A #GstClockID to compare with Get the time of the clock ID MT safe. the time of the given clock id. The #GstClockID to query Increase the refcount of given @id. MT safe. The same #GstClockID with increased refcount. The #GstClockID to ref Unref given @id. When the refcount reaches 0 the #GstClockID will be freed. MT safe. The #GstClockID to unref Cancel 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. MT safe. The id to unschedule Perform a blocking wait on @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. if the current clock time is past the time of @id, #GST_CLOCK_OK if unscheduled with gst_clock_id_unschedule(). MT safe. the result of the blocking wait. #GST_CLOCK_EARLY will be returned The #GstClockID to wait on a pointer that will contain the jitter, can be %NULL. Register 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. MT safe. the result of the non blocking wait. a #GstClockID to wait on The callback function User data passed in the callback Register 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. MT safe. 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 Gets the current internal time of the given clock. The time is returned unadjusted for the offset and the rate. given invalid input. MT safe. the internal time of the clock. Or GST_CLOCK_TIME_NONE when Get the accuracy of the clock. The accuracy of the clock is the granularity of the values returned by gst_clock_get_time(). MT safe. the resolution of the clock in units of #GstClockTime. The time @master of the master clock and the time @slave of the 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. regression algorithm. MT safe. %TRUE if enough observations were added to run the a time on the slave a time on the master a pointer to hold the result 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 clock time Gets the internal rate and reference time of @clock. See gst_clock_set_calibration() for more information. caller is not interested in the values. MT safe. 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. given invalid input. MT safe. the internal time of the clock. Or GST_CLOCK_TIME_NONE when Get the master clock that @clock is slaved to or %NULL when the clock is not slaved to any master clock. not slaved to a master clock. Unref after usage. MT safe. a master #GstClock or %NULL when this clock is Get the accuracy of the clock. The accuracy of the clock is the granularity of the values returned by gst_clock_get_time(). MT safe. the resolution of the clock in units of #GstClockTime. Gets the current time of the given clock. The time is always monotonically increasing and adjusted according to the current offset and rate. given invalid input. MT safe. the time of the clock. Or GST_CLOCK_TIME_NONE when Get 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. @id should be unreffed after usage. time notification. MT safe. a #GstClockID that can be used to request the the requested start time the requested interval Get a #GstClockID from @clock to trigger a single shot notification at the requested time. The single shot id should be unreffed after usage. time notification. MT safe. a #GstClockID that can be used to request the 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 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. 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: <programlisting> time = (internal_time - internal) * rate_num / rate_denom + external </programlisting> 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. MT safe. 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 Set @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(). however keep reporting its time adjusted with the last configured rate and time offsets. Trying to set a master on a clock without the #GST_CLOCK_FLAG_CAN_SET_MASTER flag will make this function return %FALSE. MT safe. %TRUE if the clock is capable of being slaved to a master clock. a master #GstClock Set 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. The resolution to set 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 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. an external clock time 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 resolution of the clock in units of #GstClockTime. the internal time of the clock. Or GST_CLOCK_TIME_NONE when 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. The type of the clock entry The capabilities of this clock The return value of a clock operation. The different kind of clocks. A function to create a copy of some object or increase its reference count. a copy of the object or the same object with increased reference count The object to copy Core errors are errors inside the core GStreamer library. 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. Creates a new #GstDateTime using the date and times in the gregorian calendar in the supplied timezone. 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 represeting it in hours for most timezones. the newly created #GstDateTime 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 using the time since Jan 1, 1970 specified by the newly created #GstDateTime seconds from the Unix epoch Creates a new #GstDateTime using the time since Jan 1, 1970 specified by the newly created #GstDateTime seconds from the Unix epoch Creates a new #GstDateTime using the date and times in the gregorian calendar in the local timezone. 1 to 31, @hour from 0 to 23, @minutes and @seconds from 0 to 59. the newly created #GstDateTime 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 representing the current date and time. be freed with gst_date_time_unref(). the newly created #GstDateTime which should Creates a new #GstDateTime that represents the current instant at Universal coordinated time. be freed with gst_date_time_unref(). the newly created #GstDateTime which should Returns the day of this #GstDateTime. The day of this #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 Retrieves the fractional part of the seconds in microseconds represented by the microsecond of the second Retrieves the minute of the hour represented by @datetime in the gregorian calendar. the minute of the hour Returns the month of this #GstDateTime. January is 1, February is 2, etc.. The month of this #GstDateTime Retrieves the second of the minute represented by @datetime in the gregorian calendar. the second represented by @datetime 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 Returns the year of this #GstDateTime The year of this #GstDateTime Atomically increments the reference count of @datetime by one. the reference @datetime Atomically decrements the reference count of @datetime by one. When the reference count reaches zero, the structure is freed. 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. Returns the color of a debug category used when printing output in this category. the color of the category. Returns the description of a debug category. the description of the category. Returns the name of a debug category. the name of the category. Returns the threshold of a #GstDebugCategory. the #GstDebugLevel that is used as threshold. 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(). 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. <note><para> 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). </para></note> 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. Available details for pipeline graphs produced by GST_DEBUG_BIN_TO_DOT_FILE() and GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(). 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. Gets the string representation of a #GstDebugMessage. This function is used in debug handlers to extract the message. the string representation of a #GstDebugMessage. 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. All elements 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(). A pad of an element can be retrieved by name with gst_element_get_pad(). 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 gst_element_provides_clock() returns %TRUE. 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 gst_element_requires_clock() returns %TRUE, a clock should be set on the element with gst_element_set_clock(). Note that clock slection and distribution is normally handled by the toplevel #GstPipeline so the clock functions are only to be used in very specific situations. Last reviewed on 2009-05-29 (0.10.24) 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 TRUE, if the registering succeeded, FALSE on error #GstPlugin to register the element with, or NULL for a static element (note that passing NULL only works in GStreamer 0.10.13 and later) 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. result. a string with the name of the state 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. Perform @transition on @element. This function must be called with STATE_LOCK held and is mainly used internally. the #GstStateChangeReturn of the state transition. the requested transition Gets the index from the element. element. unref after usage. MT safe. a #GstIndex or %NULL when no index was set on the Get an array of query types from the element. If the element doesn't implement a query types function, the query will be forwarded to the peer of a random linked sink pad. be freed or modified. MT safe. An array of #GstQueryType elements that should not 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. 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. %GST_STATE_CHANGE_SUCCESS if the element has no more pending state 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. Get the clock provided by the given element. <note>An element is only required to provide a clock in the PAUSED state. Some elements can provide a clock in other states.</note> if no clock could be provided. Unref after usage. MT safe. the GstClock provided by the element or %NULL 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. MT safe. TRUE if the query could be performed. the #GstQuery. 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 upstream events or a random linked source pad for downstream events. This function takes owership 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. 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. 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. clock when it, for example, is not able to slave its internal clock to the MT safe. %TRUE if the element accepted the clock. An element can refuse a the #GstClock to set for the element. Set @index on the element. The refcount of the index will be increased, any previously set index is unreffed. MT safe. a #GstIndex. 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 state change message on the bus. State changes to %GST_STATE_READY or %GST_STATE_NULL never return #GST_STATE_CHANGE_ASYNC. MT safe. Result of the state change using #GstStateChangeReturn. the element's new #GstState. 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. 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 not automatically activated so elements should perform the needed steps to activate the pad in case this pad is added in the PAUSED or PLAYING state. See gst_pad_set_active() for more information about activating pads. The pad and the element should be unlocked when calling this function. This function will emit the #GstElement::pad-added signal on the element. a pad with the same name already existed or the pad already had another parent. MT safe. %TRUE if the pad could be added. This function can fail when the #GstPad to add to the 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. 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. MT safe. The result of the commit state change. The previous state return value Creates a pad for each pad template that is always available. This function is only useful during object intialization of subclasses of #GstElement. Posts a message to the bus that new tags were found, and pushes an event to all sourcepads. Takes ownership of the @list. This is a utility method for elements. Applications should use the #GstTagSetter interface. list of tags. Posts a message to the bus that new tags were found and pushes the tags as event. Takes ownership of the @list. This is a utility method for elements. Applications should use the #GstTagSetter interface. pad on which to push tag-event the taglist to post on the bus and create event from 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. MT safe. the base time of the element. Returns the bus of the element. Note that only a #GstPipeline will provide a bus for the application. MT safe. the element's #GstBus. unref after usage. Gets the currently configured clock of the element. This is the clock as was last set with gst_element_set_clock(). MT safe. the #GstClock of the element. unref after usage. 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. if one cannot be found. gst_object_unref() after usage. the #GstPad to which a link can be made, or %NULL 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. was found. No unreferencing is necessary. a compatible #GstPadTemplate, or NULL if none the #GstPadTemplate to find a compatible template for Retrieves the factory that was used to create this element. element. no refcounting is needed. the #GstElementFactory used for creating this Gets the index from the element. element. unref after usage. MT safe. a #GstIndex or %NULL when no index was set on the Retrieves a pad from @element by name. Tries gst_element_get_static_pad() first, then gst_element_get_request_pad(). to the result pad should be released with gst_object_unref() in case of a static pad or gst_element_release_request_pad() in case of a request pad. Use gst_element_get_static_pad() or gst_element_get_request_pad() instead. depending on the type of the pad. the #GstPad if found, otherwise %NULL. Unref or Release after usage, the name of the pad to retrieve. Get an array of query types from the element. If the element doesn't implement a query types function, the query will be forwarded to the peer of a random linked sink pad. be freed or modified. MT safe. An array of #GstQueryType elements that should not Retrieves a pad from the element by name. This version only retrieves request pads. The pad should be released with gst_element_release_request_pad(). This method is slow and will be deprecated in the future. New code should use gst_element_request_pad() with the requested template. Release after usage. requested #GstPad if found, otherwise %NULL. 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. 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. 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. %GST_STATE_CHANGE_SUCCESS if the element has no more pending state 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. unref after usage. MT safe. the requested #GstPad if found, otherwise %NULL. the name of the static #GstPad to retrieve. Test whether the given element implements a certain interface of type iface_type, and test whether it is supported for this specific instance. whether or not the element implements the interface. (final) type of the interface which we want to be implemented Queries if the element can be indexed. MT safe. TRUE if the element can be indexed. 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. Retrieves an iterattor of @element's pads. The iterator should be freed after usage. after use. MT safe. the #GstIterator of #GstPad. Unref each pad Retrieves an iterator of @element's sink pads. after use. MT safe. the #GstIterator of #GstPad. Unref each pad Retrieves an iterator of @element's source pads. after use. MT safe. the #GstIterator of #GstPad. Unref each pad 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 manualy 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. 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. 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 second #GstElement in the link chain. 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. 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. 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. 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. This function calls gst_element_lost_state_full() with the new_base_time set to %TRUE. This function is used internally and should normally not be called from plugins or applications. MT safe. 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 with indication to distribute a new base_time to the element when @new_base_time is %TRUE. 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. MT safe. if a new base time should be distributed Post an error, warning or info message on the bus from inside an element. #GST_MESSAGE_INFO. MT safe. 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 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. 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. %FALSE if the element did not have a bus. MT safe. %TRUE if the message was successfully posted. The function returns a #GstMessage to post Get the clock provided by the given element. <note>An element is only required to provide a clock in the PAUSED state. Some elements can provide a clock in other states.</note> if no clock could be provided. Unref after usage. MT safe. the GstClock provided by the element or %NULL Query if the element provides a clock. A #GstClock provided by an element can be used as the global #GstClock for the pipeline. An element that can provide a clock is only required to do so in the PAUSED state, this means when it is fully negotiated and has allocated the resources to operate the clock. MT safe. %TRUE if the element provides a clock 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. MT safe. TRUE if the query could be performed. the #GstQuery. Queries an element to convert @src_val in @src_format to @dest_format. TRUE if the query could be performed. a #GstFormat to convert from. a value to convert. a pointer to the #GstFormat to convert to. a pointer to the result. Queries an element for the total stream duration. TRUE if the query could be performed. a pointer to the #GstFormat asked for. On return contains the #GstFormat used. A location in which to store the total duration, or NULL. Queries an element for the stream position. If one repeatedly calls this function one can also create and reuse it in gst_element_query(). TRUE if the query could be performed. a pointer to the #GstFormat asked for. On return contains the #GstFormat used. a location in which to store the current position, or NULL. Makes the element free the previously requested pad as obtained with gst_element_get_request_pad(). This does not unref the pad. If the pad was created by using gst_element_get_request_pad(), gst_element_release_request_pad() needs to be followed by gst_object_unref() to free the @pad. MT safe. 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_get_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. pad does not belong to the provided element. MT safe. %TRUE if the pad could be removed. Can return %FALSE if the the #GstPad to remove from the element. Retrieves a request pad from the element according to the provided template. If the @caps are specified and the element implements thew new request_new_pad_full virtual method, the element will use them to select which pad to create. The pad should be released with gst_element_release_request_pad(). Release after usage. requested #GstPad if found, otherwise %NULL. 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. Query if the element requires a clock. MT safe. %TRUE if the element requires a clock 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. The new playback rate The format of the seek values The optional seek flags. The type and flags for the new current position The value of the new current 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. executed instantly though) %TRUE if the seek operation succeeded (the seek might not always be 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 upstream events or a random linked source pad for downstream events. This function takes owership 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. the #GstEvent to send to the element. Set the base time of an element. See gst_element_get_base_time(). MT safe. 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. 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. clock when it, for example, is not able to slave its internal clock to the MT safe. %TRUE if the element accepted the clock. An element can refuse a the #GstClock to set for the element. Set @index on the element. The refcount of the index will be increased, any previously set index is unreffed. MT safe. a #GstIndex. Locks the state of an element, so state changes of the parent don't affect this element anymore. MT safe. or the elements state-locking needed no change. TRUE if the state was changed, FALSE if bad parameters were given 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. 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 state change message on the bus. State changes to %GST_STATE_READY or %GST_STATE_NULL never return #GST_STATE_CHANGE_ASYNC. MT safe. Result of the state change using #GstStateChangeReturn. 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. MT safe. TRUE, if the element's state could be synced to the parent's state. 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 sink #GstElement to unlink. Unlinks a series of elements. Uses gst_element_unlink(). the second #GstElement in the link chain. Unlinks the two named pads of the source and destination elements. This is a convenience function for gst_pad_unlink(). the name of the #GstPad in source element. a #GstElement containing the destination pad. the name of the #GstPad in destination element. 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 GStreamer element class. Override the vmethods to implement the element functionality. %GST_STATE_CHANGE_SUCCESS if the element has no more pending state 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. Result of the state change using #GstStateChangeReturn. the element's new #GstState. the #GstStateChangeReturn of the state transition. the requested transition the #GstBus to set. the GstClock provided by the element or %NULL %TRUE if the element accepted the clock. An element can refuse a the #GstClock to set for the element. a #GstIndex or %NULL when no index was set on the a #GstIndex. %TRUE if the event was handled. the #GstEvent to send to the element. An array of #GstQueryType elements that should not TRUE if the query could be performed. the #GstQuery. Adds a padtemplate to an element class. This is mainly used in the _base_init functions of classes. a #GstPadTemplate to add to the element class. Retrieves a padtemplate from @element_class with the given name. <note>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.</note> if none was found. No unreferencing is necessary. the #GstPadTemplate with the given name, or %NULL 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. <note>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.</note> pad templates. the #GList of Adds a list of standardized properties with types to the @klass. the id is for the property switch in your get_prop method, and the flags determine readability / writeability. the name of the first property. in a NULL terminated Sets the detailed information for a #GstElementClass. <note>This function is for use in _base_init functions only.</note> The @details are copied. details to set Sets the detailed information for a #GstElementClass. Simpler version of gst_element_class_set_details() that generates less linker overhead. <note>This function is for use in _base_init functions only.</note> The detail parameter strings are copied into the #GstElementDetails for the element class. 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 details. E.g: "Joe Bloggs &lt;joe.blogs at foo.com&gt;" Set uri pointing to user documentation. Applications can use this to show help for e.g. effects to users. uri of element documentation 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. name of an icon This struct defines the public information about a #GstElement. It contains meta-data about the element that is mostly for the benefit of editors. The @klass member can be used by applications to filter elements based on functionality. #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. <example> <title>Using an element factory</title> <programlisting language="c"> #include &lt;gst/gst.h&gt; GstElement *src; GstElementFactory *srcfactory; gst_init (&amp;argc, &amp;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); ... </programlisting> </example> Last reviewed on 2005-11-23 (0.9.5) 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. #GstElementFactory elements that match the given requisits. Use #gst_plugin_feature_list_free after usage. a #GList of 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. #GstElementFactory elements. Use gst_plugin_feature_list_free() after usage. a #GList of 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 Checks if the factory can sink all possible capabilities. %TRUE if the caps are fully compatible. the caps to check Checks if the factory can sink any possible capability. %TRUE if the caps have a common subset. the caps to check Checks if the factory can sink the given capability. %TRUE if it can sink the capabilities the caps to check Checks if the factory can src all possible capabilities. %TRUE if the caps are fully compatible. the caps to check Checks if the factory can src any possible capability. %TRUE if the caps have a common subset. the caps to check Checks if the factory can source the given capability. %TRUE if it can src the capabilities 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. be created new #GstElement or NULL if the element couldn't name of new element Gets the author for this factory. the author Gets the description for this factory. the description Gets documentation uri for this factory if set. the documentation uri 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 factory is not loaded. the #GType for elements managed by this factory or 0 if Gets icon name for this factory if set. the icon name Gets the class for this factory. the class Gets the longname for this factory the longname Gets the number of pad_templates in this factory. the number of pad_templates Gets the #GList of #GstStaticPadTemplate for this factory. static pad templates the 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. or NULL the supported protocols Gets the type of URIs the element supports or #GST_URI_UNKNOWN if none. type of URIs this element supports Check if @factory implements the interface with name @interfacename. #TRUE when @factory implement the interface. an interface name Check if @factory if of the given types. %TRUE if @factory is of @type. a #GstElementFactoryListType The standard flags that an element may have. 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 specity seeking time and mode. <example> <title>performing a seek on a pipeline</title> <programlisting> 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"); ... </programlisting> </example> Last reviewed on 2006-09-6 (0.10.10) 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 prefered. a new #GstEvent buffer format minimum buffer size maximum buffer size thread behavior 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_UNEXPECTED 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_WRONG_STATE when used for data flow with gst_pad_push(), gst_pad_chain(), gst_pad_alloc_buffer(), 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 preceeding FLUSH_START event stopped the dataflow. This event is typically generated to complete a seek and to resume dataflow. a new flush stop event. 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. Allocate a new newsegment event with the given format/values tripplets This method calls gst_event_new_new_segment_full() passing a default value of 1.0 for applied_rate a new newsegment event. is this segment an update to a previous one a new rate for playback The format of the segment values the start value of the segment the stop value of the segment stream position Allocate a new newsegment event with the given format/values triplets. The newsegment 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 position 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. 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 newsegment event with @rate of 1.0 and @applied_rate of 2.0 After a newsegment event, the buffer stream time is calculated with: position + (TIMESTAMP(buf) - start) * ABS (rate * applied_rate) a new newsegment event. Whether this segment is an update to a previous one A new rate for playback The rate factor which has already been applied The format of the segment values The start value of the segment The stop value of the segment stream position Allocate a new qos event with the given values. This function calls gst_event_new_qos_full() with the type set to #GST_QOS_TYPE_OVERFLOW when diff is negative (buffers are in time) and #GST_QOS_TYPE_UNDERFLOW when @diff is positive (buffers are late). a new QOS event. the proportion of the qos message The time difference of the last Clock sync The timestamp of the buffer 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. 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. 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. 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. 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 possitive @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 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 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 if updated, it must be different from -1 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 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. a new #GstEvent 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 or reverse the playback direction of the pipeline to get the same effect. 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 Generates a metadata tag event from the given @taglist. a new #GstEvent metadata list. The event will take ownership of the taglist. 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 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 not have the same sequence number unless that correspondence was made explicitly. MT safe. The event's sequence number. Access the structure of the event. 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 structure of the event. The structure is still 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. name to check Get the format, minsize, maxsize and async-flag in the buffersize event. 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 latency in the latency event. A pointer to store the latency in. Get the update flag, rate, format, start, stop and position in the newsegment event. In general, gst_event_parse_new_segment_full() should be used instead of this, to also retrieve the applied_rate value of the segment. See gst_event_new_new_segment_full() for a full description of the newsegment event. A pointer to the update flag of the segment A pointer to the rate of the segment A pointer to the format of the newsegment values A pointer to store the start value in A pointer to store the stop value in A pointer to store the stream time in Get the update, rate, applied_rate, format, start, stop and position in the newsegment event. See gst_event_new_new_segment_full() for a full description of the newsegment event. A pointer to the update flag of the segment A pointer to the rate of the segment A pointer to the applied_rate of the segment A pointer to the format of the newsegment values A pointer to store the start value in A pointer to store the stop value in A pointer to store the stream time in Get the proportion, diff and timestamp in the qos event. See gst_event_new_qos() for more information about the different QoS values. A pointer to store the proportion in A pointer to store the diff in A pointer to store the timestamp in Get the type, proportion, diff and timestamp in the qos event. See gst_event_new_qos_full() for more information about the different QoS values. 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. 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 postion expressed in @format result location for the #GstSeekType of the stop position result location for the stop postion expressed in @format Parse the sink-message event. Unref @msg after usage. a pointer to store the #GstMessage in. Parse the step event. 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 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. pointer to metadata list 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 sequence number. #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. #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. Function prototype for a filter callback that can be use in gst_filter_run(). The function should apply its filtering to @obj. Additional data passed to gst_filter_run() are in @data. %TRUE for success. the object filter data sent yet) (unused/unimplemented). this error should post an error message with more details. this (and higher) to define custom success codes. Since 0.10.7. custom success code to this to avoid compiler warnings). Since 0.10.29. this (and lower) to define custom error codes. Since 0.10.7. custom error code to this to avoid compiler warnings). Since 0.10.29. The result of passing data to a pad. Note that the custom return values should not be exposed outside of the element scope and are available since 0.10.7. Standard predefined formats A format definition 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. Last reviewed on 2005-11-18 (0.9.5) 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. 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). %TRUE if the construction succeeds, %FALSE otherwise. Get the target pad of @gpad. Unref target pad after usage. has no target set. Unref target pad after usage. the target #GstPad, can be NULL if the ghostpad 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. can return FALSE when the internal pads could not be linked. TRUE if the new target could be set. This function the new pad target Provides interface functionality on per instance basis and not per class basis, which is the case for gobject. GstIndex is used to generate a stream index of one or more elements in a pipeline. Elements will overload the set_index and get_index virtual methods in #GstElement. When streaming data, the element will add index entries if it has an index set. Each element that adds to the index will do that using a writer_id. The writer_id is obtained from gst_index_get_writer_id(). The application that wants to index the stream will create a new index object using gst_index_new() or gst_index_factory_make(). The index is assigned to a specific element, a bin or the whole pipeline. This will cause indexable elements to add entires to the index while playing. Create a new dummy index object. Use gst_element_set_index() to assign that to an element or pipeline. This index is not storing anything, but will still emit e.g. the #GstIndex::entry-added signal. a new index object Tell the index that the writer with the given id is done with this index and is not going to write any more entries to it. the writer that commited the index Before entries can be added to the index, a writer should obtain a unique id. The methods to add new entries to the index require this id as an argument. The application can implement a custom function to map the writer object to a string. That string will be used to register or look up an id in the index. <note> The caller must not hold @writer's #GST_OBJECT_LOCK, as the default resolver may call functions that take the object lock as well, and the lock is not recursive. </note> TRUE if the writer would be mapped to an id. Associate given format/value pairs with each other. Be sure to pass gint64 values to this functions varargs, you might want to use a gint64 cast to be sure. a pointer to the newly added entry in the index. the id of the index writer optinal flags for this entry the format of the value the value Associate given format/value pairs with each other. a pointer to the newly added entry in the index. the id of the index writer optinal flags for this entry number of associations list of associations Adds a format entry into the index. This function is used to map dynamic GstFormat ids to their original format key. a pointer to the newly added entry in the index. the id of the index writer the format to add to the index Add an id entry into the index. a pointer to the newly added entry in the index. the id of the index writer the description of the index writer Add the given object to the index with the given key. This function is not yet implemented. a pointer to the newly added entry in the index. the id of the index writer a key for the object the GType of the object a pointer to the object to add Tell the index that the writer with the given id is done with this index and is not going to write any more entries to it. the writer that commited the index Finds the given format/value in the index value was not found. the entry associated with the value or NULL if the the id of the index writer The lookup method to use Flags for the entry the format of the value the value to find Finds the given format/value in the index with the given compare function and user_data. value was not found. the entry associated with the value or NULL if the the id of the index writer The lookup method to use Flags for the entry the format of the value the value to find the function used to compare entries user data passed to the compare function Get the certainty of the given index. the certainty of the index. Get the id of the current group. the id of the current group. Before entries can be added to the index, a writer should obtain a unique id. The methods to add new entries to the index require this id as an argument. The application can implement a custom function to map the writer object to a string. That string will be used to register or look up an id in the index. <note> The caller must not hold @writer's #GST_OBJECT_LOCK, as the default resolver may call functions that take the object lock as well, and the lock is not recursive. </note> TRUE if the writer would be mapped to an id. the GstObject to allocate an id for a pointer to a gint to hold the id Create a new group for the given index. It will be set as the current group. the id of the newly created group. Set the certainty of the given index. the certainty to set Lets the app register a custom filter function so that it can select what entries should be stored in the index. the filter to register data passed to the filter function Lets the app register a custom filter function so that it can select what entries should be stored in the index. the filter to register data passed to the filter function function to call when @user_data is unset Set the current groupnumber to the given argument. did not exist. TRUE if the operation succeeded, FALSE if the group the groupnumber to set Lets the app register a custom function to map index ids to writer descriptions. the resolver to register data passed to the resolver function Lets the app register a custom function to map index ids to writer descriptions. the resolver to register data passed to the resolver function destroy function for @user_data Is emitted when a new entry is added to the index. The entry added to the index. An association in an entry. The certainty of a group in the index. TRUE if the writer would be mapped to an id. the writer that commited the index The basic element of an index. Gets alternative formats associated with the indexentry. format. TRUE if there was a value associated with the given the format of the value the find a pointer to store the value Copies an entry and returns the result. a newly allocated #GstIndexEntry. Free the memory used by the given entry. The different types of entries in the index. GstIndexFactory is used to dynamically create GstIndex implementations. Create a new indexfactory with the given parameters a new #GstIndexFactory. name of indexfactory to create long description of indexfactory to create the GType of the GstIndex element of this factory Search for an indexfactory of the given name. #GstIndexFactory if found, NULL otherwise name of indexfactory to find Create a new #GstIndex instance from the indexfactory with the given name. a new #GstIndex instance. the name of the factory used to create the instance Create a new #GstIndex instance from the given indexfactory. a new #GstIndex instance. Removes the index from the global list. Function to filter out entries in the index. to the index, %FALSE otherwise. This function should return %TRUE if the entry is to be added The index being queried The entry to be added. User data passed to the function. Flags for this index A group of related entries in an index. Specify the method to find an index entry in the index. Function to resolve ids to writer descriptions. %TRUE if an id could be assigned to the writer. the index being queried. The object that wants to write A description of the writer. user_data as registered The method used to resolve index writers 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. In general, whenever calling a GstIterator function results in your code receiving a refcounted object, the refcount for that object will have been increased. Your code is responsible for unrefing that object after use. The basic use pattern of an iterator is as follows: <example> <title>Using an iterator</title> <programlisting> it = _get_iterator(object); done = FALSE; while (!done) { switch (gst_iterator_next (it, &amp;item)) { case GST_ITERATOR_OK: ... use/change item here... gst_object_unref (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; } } gst_iterator_free (it); </programlisting> </example> Last reviewed on 2009-06-16 (0.10.24) Create a new iterator from an existing iterator. The new iterator will only return those elements that match the given compare function @func. in the iterator. When this iterator is freed, @it will also be freed. MT safe. a new #GstIterator. 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. the refcount of a refcounted object will be increased before @func is called, and should be unrefed after use in @func unless it is the matching element. The iterator will not be freed. This function will return NULL if an error happened to the iterator. function or NULL when no element matched. MT safe. The element in the iterator that matches the compare the compare function to use 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 before @func is called, and it should be unrefed after use in @func. 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. MT safe. A #GstIteratorResult, as described above. 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. As in gst_iterator_fold(), the refcount of a refcounted object will be increased before @func is called, and should be unrefed after use. freed. MT safe. the result call to gst_iterator_fold(). The iterator will not be the function to call for each element. user data passed to the function Free the iterator. MT safe. Get the next item from the iterator in @elem. Only when this function returns %GST_ITERATOR_OK, @elem will contain a valid value. For iterators that return refcounted objects, the returned object will have its refcount increased and should therefore be unreffed 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. is a refcounted object. MT safe. The result of the iteration. Unref @elem after usage if this 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 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 function that will be called when a #GList iterator is freed. The owner of the #GList iterator can then clean up its resources. the owner of the 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() 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. The function that will be called after the next item of the iterator has been retrieved. This function will typically increase the refcount of the item or make a copy. 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 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(). 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 Library errors are for errors from the library being used by elements (initializing, finalizing, settings, ...) 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 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: <example> <title>Posting a #GstMessage</title> <programlisting> gst_bus_post (bus, gst_message_new_eos()); </programlisting> </example> A #GstElement usually posts messages on the bus provided by the parent container using gst_element_post_message(). Last reviewed on 2005-11-09 (0.9.4) Create a new application-typed message. GStreamer will never create these messages; they are a gift from us to you. Enjoy. MT safe. The new application message. 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. MT safe. The new async_done message. The object originating the message. This message is posted by elements when they start an ASYNC state change. PLAYING. MT safe. The new async_start message. The object originating the message. if a new base_time should be set on the element 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 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. MT safe. The new clock lost message. 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. MT safe. the new provide clock message. 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. MT safe. The new message. The #GstMessageType to distinguish messages The object originating the message. the structure for the message. The message will take ownership of the structure. Create a new duration message. This message is posted by elements that know the duration of a stream in a specific format. This message is received by bins and is used to calculate the total duration of a pipeline. Elements may post a duration message with a duration of GST_CLOCK_TIME_NONE to indicate that the duration has changed and the cached duration should be discarded. The new duration can then be retrieved via a query. MT safe. The new duration message. The object originating the message. The format of the duration The new duration 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. MT safe. The new element message. 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. MT safe. The new eos message. The object originating the message. Create a new error message. The message will copy @error and occured. The pipeline will probably (partially) stop. The application receiving this message should stop the pipeline. MT safe. the new error message. 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 MT safe. the new info message. The object originating the message. The GError for this message. A debugging string. This message can be posted by elements when their latency requirements have changed. MT safe. The new latency message. The object originating the message. Create a new clock message. This message is posted whenever the pipeline selectes a new clock for the pipeline. MT safe. The new new clock message. 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. The new qos message. The object originating the message. a #GstProgressType a progress code free, user visible text describing the progress 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). 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. MT safe. The new qos message. 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 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. MT safe. the new requst state message. the object originating the message. The new requested state 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. MT safe. the new segment done message. 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. MT safe. the new segment start message. 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. MT safe. the new state change message. 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. MT safe. the new state dirty message. 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. MT safe. the new step_done message. 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. queued it for execution in the streaming threads. is now ready to start executing the step in the streaming thread. After this message is emited, the application can queue a new step operation in the element. MT safe. The new step_start message. 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 Create a new stream status message. This message is posted when a streaming thread is created/destroyed or when the state changed. MT safe. the new stream status message. The object originating the message. The stream status type. the owner element of @src. 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. MT safe. the new structure change message. 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. MT safe. the new tag message. The object originating the message. the tag list for the message. 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. MT safe. the new tag message. the object originating the message. the originating pad for the tag. the tag list for the message. Create a new warning message. The message will make copies of @error and MT safe. The new warning message. The object originating the message. The GError for this message. A debugging string. 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 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 not have the same sequence number unless that correspondence was made explicitly. MT safe. The message's sequence number. Extracts the object managing the streaming thread from @message. 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 GValue containing the object that manages the streaming thread. Access the structure of the message. 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 structure of the message. The structure is Extract the new_base_time from the async_start message. MT safe. Result location for the new_base_time or NULL Extracts the buffering percent from the GstMessage. see also gst_message_new_buffering(). MT safe. Return location for the percent. Extracts the buffering stats values from @message. 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 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 pointer to hold a clock object, or NULL a pointer to hold the ready flag, or NULL Extracts the duration and format from the duration message. The duration might be GST_CLOCK_TIME_NONE, which indicates that the duration has changed. Applications should always use a query to retrieve the duration of a pipeline. MT safe. Result location for the format, or NULL Result location for the duration, 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: |[ ... switch (GST_MESSAGE_TYPE (msg)) { GError *err = NULL; gchar *dbg_info = NULL; gst_message_parse_error (msg, &amp;err, &amp;dbg_info); GST_OBJECT_NAME (msg->src), err->message); g_error_free (err); g_free (dbg_info); break; } ... } ... ]| MT safe. location for the GError location for the debug message, 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. location for the GError location for the debug message, or NULL Extracts the new clock from the GstMessage. The clock object returned remains valid until the message is freed. MT safe. a pointer to hold the selected new clock Parses the progress @type, @code and @text. location for the type location for the code location for the text 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. 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. 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. 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. Extract the requested state from the request_state message. MT safe. Result location for the requested state or NULL Extracts the position and format from the segment start message. MT safe. 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. 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: |[ ... switch (GST_MESSAGE_TYPE (msg)) { GstState old_state, new_state; gst_message_parse_state_changed (msg, &amp;old_state, &amp;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. 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. 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. 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 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 pointer to hold the status type The owner element of the message source Extracts the change type and completion status from the GstMessage. MT safe. 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: |[ ... switch (GST_MESSAGE_TYPE (msg)) { GstTagList *tags = NULL; gst_message_parse_tag (msg, &amp;tags); g_print ("Got tags from element %s\n", GST_OBJECT_NAME (msg->src)); handle_tags (tags); gst_tag_list_free (tags); break; } ... } ... ]| MT safe. return location for the tag-list. 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. MT safe. location where the originating pad is stored, unref after usage return location for the tag-list. 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. location for the GError location for the debug message, or NULL Configures the buffering stats values in @message. a buffering mode the average input rate the average output rate amount of buffering time left in milliseconds 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. 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. 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 sequence number. Configures the object handling the streaming thread. This is usually a GstTask object but other objects might be added in the future. the object controlling the streaming The different message types that are available. #GstMiniObject is a baseclass like #GObject, but has been stripped down of features to be fast and small. It offers sub-classing and ref-counting in the same way as #GObject does. It has no properties and no signal-support though. Last reviewed on 2005-11-23 (0.9.5) Creates a new mini-object of the desired type. MT safe the new mini-object. the #GType of the mini-object to create Modifies a pointer to point to a new mini-object. The modification is done atomically, and the reference counts are updated correctly. Either @newdata and the value pointed to by @olddata may be NULL. pointer to a pointer to a mini-object to be replaced pointer to new mini-object Creates a copy of the mini-object. MT safe the new mini-object. Checks if a mini-object is writable. A mini-object is writable if the reference count is one and the #GST_MINI_OBJECT_FLAG_READONLY flag is not set. Modification of a mini-object should only be done after verifying that it is writable. MT safe TRUE if the object is writable. 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 is writable. a mini-object (possibly the same pointer) that Increase the reference count of the mini-object. Note that the refcount affects the writeability 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. Decreases the reference count of the mini-object, possibly freeing the mini-object. Virtual function prototype for methods to create copies of instances. reference to cloned instance. MiniObject to copy Virtual function prototype for methods to free ressources used by mini-objects. Subclasses 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 finalize function, the memory associated with the object is freed. MiniObject to finalize Flags for the mini object #GstObject provides a root for the object hierarchy tree filed in by the GStreamer library. It is currently a thin wrapper on top of #GObject. 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 function 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()). The most interesting difference between #GstObject and #GObject is the "floating" reference count. A #GObject is created with a reference count of 1, owned by the creator of the #GObject. (The owner of a reference is the code section that has the right to call gst_object_unref() in order to remove that reference.) A #GstObject is created with a reference count of 1 also, but it isn't owned by anyone; Instead, the initial reference count of a #GstObject is "floating". The floating reference can be removed by anyone at any time, by calling gst_object_sink(). gst_object_sink() does nothing if an object is already sunk (has no floating reference). When you add a #GstElement to its parent container, the parent container will do this: <informalexample> <programlisting> gst_object_ref (GST_OBJECT (child_element)); gst_object_sink (GST_OBJECT (child_element)); </programlisting> </informalexample> This means that the container now owns a reference to the child element (since it called gst_object_ref()), and the child element has no floating reference. The purpose of the floating reference is to keep the child element alive until you add it to a parent container, which then manages the lifetime of the object itself: <informalexample> <programlisting> element = gst_element_factory_make (factoryname, name); // element has one floating reference to keep it alive gst_bin_add (GST_BIN (bin), element); // element has one non-floating reference owned by the container </programlisting> </informalexample> Another effect of this is, that calling gst_object_unref() on a bin object, will also destoy all the #GstElement objects in it. The same is true for calling gst_bin_remove(). Special care has to be taken for all methods that gst_object_sink() an object since if the caller of those functions had a floating reference to the object, the object reference is now invalid. 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. Last reviewed on 2005-11-09 (0.9.4) 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 carefull when passing a list with a locked object. FALSE if it does. MT safe. Grabs and releases the LOCK of each object in the list. TRUE if a #GstObject named @name does not appear in @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. (array zero-terminated=1) (element-type gchar*) (allow-none):a set of user-specified properties to exclude or NULL to show all changes. 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 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. MT safe. This function grabs and releases @object lock. a #GstObject to sink Unrefs the #GstObject pointed to by @oldobj, refs @newobj and puts @newobj in *@oldobj. Be carefull when calling this function, it does not take any locks. You might want to lock the object owning @oldobj pointer before calling this function. Make sure not to LOCK @oldobj because it might be unreffed which could cause a deadlock when it is disposed. pointer to a place of a #GstObject to replace a new #GstObject If @object was floating, the #GST_OBJECT_FLOATING flag is removed and @object is unreffed. When @object was not floating, this function does nothing. Any newly created object has a refcount of 1 and is floating. This function should be used when creating a new object to symbolically 'take ownership' of @object. This done by first doing a gst_object_ref() to keep a reference to @object and then gst_object_sink() to remove and unref any floating references to @object. Use gst_object_set_parent() to have this done for you. MT safe. This function grabs and releases @object lock. a #GstObject to sink 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 Restores @object with the data from the parent XML node. The XML node to load @object from Saves @object into the parent XML node. the new xmlNodePtr with the saved object The parent XML node to save @object into A default error function. The default handler will simply print the error string using g_print. the GError. an additional debug information string, or NULL 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. MT safe. This function grabs and releases @object's LOCK. the name of @object. g_free() after usage. Returns a copy of the name prefix of @object. Caller should g_free() the return value after usage. For a prefixless object, this returns NULL, which you can safely g_free() as well. MT safe. This function grabs and releases @object's LOCK. for anything. the name prefix of @object. g_free() after usage. Returns the parent of @object. This function increases the refcount of the parent object so you should gst_object_unref() it after usage. has no parent. unref after usage. MT safe. Grabs and releases @object's LOCK. parent of @object, this can be NULL if @object Generates a string describing the path of @object in the object hierarchy. Only useful (or used) for debugging. g_free() the string after usage. MT safe. Grabs and releases the #GstObject's LOCK for all objects in the hierarchy. a string describing the path of @object. You must Check if @object has an ancestor @ancestor somewhere up in the hierarchy. One can e.g. check if a #GstElement is inside a #GstPipeline. MT safe. Grabs and releases @object's locks. TRUE if @ancestor is an ancestor of @object. a #GstObject to check as ancestor Restores @object with the data from the parent XML node. The XML node to load @object from Saves @object into the parent XML node. the new xmlNodePtr with the saved object The parent XML node to save @object into 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. a parent cannot be renamed, this function returns FALSE in those cases. MT safe. This function grabs and releases @object's LOCK. TRUE if the name could be set. Since Objects that have new name of object Sets the name prefix of @object to @name_prefix. This function makes a copy of the provided name prefix, so the caller retains ownership of the name prefix it sent. MT safe. This function grabs and releases @object's LOCK. for anything. new name prefix 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_sink()). This function causes the parent-set signal to be emitted when the parent was successfully set. already had a parent or @object and @parent are the same. MT safe. Grabs and releases @object's LOCK. TRUE if @parent could be set or FALSE when @object new parent of object Clear the parent of @object, removing the associated reference. This function decreases the refcount of @object. MT safe. Grabs and releases @object's lock. 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 Trigered whenever a new object is saved to XML. You can connect to this signal to insert custom XML tags into the core XML. the xmlNodePtr of the parent node Emitted when the parent of an object is set. the new parent Emitted when the parent of an object is unset. the old parent GStreamer base object class. the new xmlNodePtr with the saved object The parent XML node to save @object into The XML node to load @object from The standard flags that an gstobject may have. A #GstElement is linked to other elements via "pads", which are extremely light-weight generic link points. After two pads are retrieved from an element with gst_element_get_pad(), the pads can be link 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 are typically created from a #GstPadTemplate with gst_pad_new_from_template(). Pads have #GstCaps attached to it to describe the media type they are capable of dealing with. gst_pad_get_caps() and gst_pad_set_caps() are used to manipulate the caps of the pads. Pads created from a pad template cannot set capabilities that are incompatible with the pad template capabilities. 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. gst_pad_get_parent() will retrieve the #GstElement that owns the pad. A #GstElement creating a pad will typically use the various gst_pad_set_*_function() calls to register callbacks for various events on the pads. GstElements will use gst_pad_push() and gst_pad_pull_range() to push out or pull in a buffer. To send a #GstEvent on a pad, use gst_pad_send_event() and gst_pad_push_event(). Last reviewed on 2006-07-06 (0.10.9) 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. MT safe. a new #GstPad, or NULL in case of an error. 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, or NULL in case of an error. the #GstStaticPadTemplate to use the name of the element 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, or NULL in case of an error. the pad template to use the name of the element Reads the pad definition from the XML node and links the given pad in the element to a pad of an element up in the hierarchy. an #xmlNodePtr to read the description from. the #GstObject element that owns the pad. Check if the given pad accepts the caps. TRUE if the pad can accept the caps. a #GstCaps to check on the pad Activates or deactivates the given pad in pull mode via dispatching to the pad's activatepullfunc. For use from within pad activation functions only. When called on sink pads, will first proxy the call to the peer pad, which is expected to activate its internally linked pads from within its activate_pull function. If you don't know what this is, you probably don't want to call it. MT safe. TRUE if the operation was successful. whether or not the pad should be active. Activates or deactivates the given pad in push mode via dispatching to the pad's activatepushfunc. For use from within pad activation functions only. If you don't know what this is, you probably don't want to call it. MT safe. %TRUE if the operation was successful. whether the pad should be active or not. Adds a probe that will be called for all buffers passing through a pad. See gst_pad_add_data_probe() for more information. The handler id function to call when buffers are passed over pad data to pass along with the handler Adds a probe that will be called for all buffers passing through a pad. See gst_pad_add_data_probe() for more information. The @notify function is called when the probe is disconnected and usually used to free @data. The handler id function to call when buffer are passed over pad data to pass along with the handler function to call when the probe is disconnected, or NULL Adds a "data probe" to a pad. This function will be called whenever data passes through a pad. In this case data means both events and buffers. The probe will be called with the data as an argument, meaning @handler should have the same callback signature as the #GstPad::have-data signal. Note that the data will have a reference count greater than 1, so it will be immutable -- you must not change it. For source pads, the probe will be called after the blocking function, if any (see gst_pad_set_blocked_async()), but before looking up the peer to chain to. For sink pads, the probe function will be called before configuring the sink with new caps, if any, and before calling the pad's chain function. Your data probe should return TRUE to let the data continue to flow, or FALSE to drop it. Dropping data is rarely useful, but occasionally comes in handy with events. Although probes are implemented internally by connecting @handler to the have-data signal on the pad, if you want to remove a probe it is insufficient to only call g_signal_handler_disconnect on the returned handler id. To remove a probe, use the appropriate function, such as gst_pad_remove_data_probe(). The handler id. function to call when data is passed over pad data to pass along with the handler Adds a "data probe" to a pad. This function will be called whenever data passes through a pad. In this case data means both events and buffers. The probe will be called with the data as an argument, meaning @handler should have the same callback signature as the #GstPad::have-data signal. Note that the data will have a reference count greater than 1, so it will be immutable -- you must not change it. For source pads, the probe will be called after the blocking function, if any (see gst_pad_set_blocked_async()), but before looking up the peer to chain to. For sink pads, the probe function will be called before configuring the sink with new caps, if any, and before calling the pad's chain function. Your data probe should return TRUE to let the data continue to flow, or FALSE to drop it. Dropping data is rarely useful, but occasionally comes in handy with events. Although probes are implemented internally by connecting @handler to the have-data signal on the pad, if you want to remove a probe it is insufficient to only call g_signal_handler_disconnect on the returned handler id. To remove a probe, use the appropriate function, such as gst_pad_remove_data_probe(). The @notify function is called when the probe is disconnected and usually used to free @data. The handler id. function to call when data is passed over pad data to pass along with the handler function to call when the probe is disconnected, or NULL Adds a probe that will be called for all events passing through a pad. See gst_pad_add_data_probe() for more information. The handler id function to call when events are passed over pad data to pass along with the handler Adds a probe that will be called for all events passing through a pad. See gst_pad_add_data_probe() for more information. The @notify function is called when the probe is disconnected and usually used to free @data. The handler id function to call when events are passed over pad data to pass along with the handler, or NULL function to call when probe is disconnected, or NULL Allocates a new, empty buffer optimized to push to pad @pad. This function only works if @pad is a source pad and has a peer. A new, empty #GstBuffer will be put in the @buf argument. You need to check the caps of the buffer after performing this function and renegotiate to the format if needed. If the caps changed, it is possible that the buffer returned in @buf is not of the right size for the new format, @buf needs to be unreffed and reallocated if this is the case. result code other than #GST_FLOW_OK is an error and @buf should not be used. An error can occur if the pad is not connected or when the downstream peer elements cannot provide an acceptable buffer. MT safe. a result code indicating success of the operation. Any the offset of the new buffer in the stream the size of the new buffer the caps of the new buffer a newly allocated buffer In addition to the function gst_pad_alloc_buffer(), this function automatically calls gst_pad_set_caps() when the caps of the newly allocated buffer are different from the @pad caps. After a renegotiation, the size of the new buffer returned in @buf could be of the wrong size for the new format and must be unreffed an reallocated in that case. result code other than #GST_FLOW_OK is an error and @buf should not be used. An error can occur if the pad is not connected or when the downstream peer elements cannot provide an acceptable buffer. MT safe. a result code indicating success of the operation. Any the offset of the new buffer in the stream the size of the new buffer the caps of the new buffer a newly allocated buffer Checks if the source pad and the sink pad are compatible so they can be linked. TRUE if the pads can be linked. the sink #GstPad. Chain a buffer to @pad. The function returns #GST_FLOW_WRONG_STATE if the pad was flushing. If the caps on @buffer are different from the current caps on @pad, this function will call any setcaps function (see gst_pad_set_setcaps_function()) installed on @pad. If the new caps are not acceptable for @pad, 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. MT safe. a #GstFlowReturn from the pad. the #GstBuffer to send, return GST_FLOW_ERROR if not. Chain a bufferlist to @pad. The function returns #GST_FLOW_WRONG_STATE if the pad was flushing. If the caps on the first buffer of @list are different from the current caps on @pad, this function will call any setcaps function (see gst_pad_set_setcaps_function()) installed on @pad. If the new caps are not acceptable for @pad, 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. the #GstBufferList to send, return GST_FLOW_ERROR if not. Checks if a gst_pad_pull_range() can be performed on the peer source pad. This function is used by plugins that want to check if they can use random access on the peer source pad. The peer sourcepad can implement a custom #GstPadCheckGetRangeFunction if it needs to perform some logic to determine if pull_range is possible. MT safe. a gboolean with the result. Invokes the given dispatcher function on each respective peer of all pads that are internally linked to the given pad. The GstPadDispatcherFunction should return TRUE when no further pads need to be processed. TRUE if one of the dispatcher functions returned TRUE. the #GstPadDispatcherFunction to call. gpointer user data passed to the dispatcher function. Invokes the default event handler for the given pad. End-of-stream and discontinuity events are handled specially, and then the event 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 an event. Multi-sinkpad elements should implement custom event handlers. TRUE if the event was sent succesfully. the #GstEvent to handle. Fixate a caps on the given pad. Modifies the caps in place, so you should make sure that the caps are actually writable (see gst_caps_make_writable()). the #GstCaps to fixate Gets the capabilities of the allowed media types that can flow through The allowed capabilities is calculated as the intersection of the results of calling gst_pad_get_caps() on @pad and its peer. The caller owns a reference on the resulting caps. caps when you no longer need it. This function returns NULL when @pad has no peer. MT safe. the allowed #GstCaps of the pad link. Unref the Gets the capabilities this pad can produce or consume. Note that this method doesn't necessarily return the caps set by gst_pad_set_caps() - use GST_PAD_CAPS() for that instead. gst_pad_get_caps returns all possible caps a pad can operate with, using the pad's get_caps function; this returns the pad template caps if not explicitly set. MT safe. a newly allocated copy of the #GstCaps of this pad Gets the capabilities this pad can produce or consume. Preferred function if one only wants to read or intersect the caps. the caps of the pad with incremented ref-count. Gets the direction of the pad. The direction of the pad is decided at construction time so this function does not take the LOCK. MT safe. the #GstPadDirection of the pad. Gets the private data of a pad. No locking is performed in this function. a #gpointer to the private data. A helper function you can use as a GetCaps function that will return the currently negotiated caps or the padtemplate when NULL. the currently negotiated caps or the padtemplate. Gets a list of pads to which the given pad is linked to inside of the parent element. The caller must free this list after use. Not MT safe. of pads, free with g_list_free(). could become invalid by the time the application accesses them. It's also possible that the list changes while handling the pads, which the caller of this function is unable to know. Use the thread-safe gst_pad_iterate_internal_links() instead. a newly allocated #GList Gets a list of pads to which the given pad is linked to inside of the parent element. This is the default handler, and thus returns a list of all of the pads inside the parent element with opposite direction. The caller must free this list after use with g_list_free(). of pads, or NULL if the pad has no parent. Not MT safe. could become invalid by the time the application accesses them. It's also possible that the list changes while handling the pads, which the caller of this function is unable to know. Use the thread-safe gst_pad_iterate_internal_links_default() instead. a newly allocated #GList Gets the capabilities of the media type that currently flows through @pad and its peer. This function can be used on both src and sinkpads. Note that srcpads are always negotiated before sinkpads so it is possible that the negotiated caps on the srcpad do not match the negotiated caps of the peer. the caps when you no longer need it. This function returns NULL when the @pad has no peer or is not negotiated yet. MT safe. the negotiated #GstCaps of the pad link. Unref Gets the template for @pad. instantiated, or %NULL if this pad has no template. the #GstPadTemplate from which this pad was Gets the capabilities for @pad's template. to keep a reference on the caps, make a copy (see gst_caps_copy ()). the #GstCaps of this pad template. If you intend Gets the parent of @pad, cast to a #GstElement. If a @pad has no parent or its parent is not an element, return NULL. reference on the parent, so unref when you're finished with it. MT safe. the parent of the pad. The caller has a Gets the peer of @pad. This function refs the peer pad so you need to unref it after use. MT safe. the peer #GstPad. Unref after usage. Get an array of supported queries that can be performed on this pad. of #GstQueryType. a zero-terminated array Invoke the default dispatcher for the query types on the pad. of #GstQueryType, or NULL if none of the internally-linked pads has a query types function. a zero-terminated array When @pad is flushing this function returns #GST_FLOW_WRONG_STATE immediatly 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. This is a lowlevel function. Usualy gst_pad_pull_range() is used. MT safe. a #GstFlowReturn from the pad. The start offset of the buffer The length of the buffer a pointer to hold the #GstBuffer, returns #GST_FLOW_ERROR if %NULL. Query if a pad is active MT safe. TRUE if the pad is active. 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()). MT safe. TRUE if the pad is blocked. 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. MT safe. TRUE if the pad is blocking. Checks if a @pad is linked to another pad or not. MT safe. TRUE if the pad is linked, FALSE otherwise. 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. pad does not have an iterator function configured. Use gst_iterator_free() after usage. a new #GstIterator of #GstPad or %NULL when the 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(). returned pad with gst_object_unref(). a #GstIterator of #GstPad, or NULL if @pad has no parent. Unref each Links the source pad and the sink pad. what went wrong. MT Safe. A result code indicating if the connection worked or 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. what went wrong. A result code indicating if the connection worked or the sink #GstPad to link. the checks to validate when linking 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. has no task. a TRUE if the task could be paused or FALSE when the pad 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 #GstCaps to check on the pad Gets the capabilities of the peer connected to this pad. Similar to gst_pad_get_caps(). peer pad. Use gst_caps_unref() to get rid of it. This function returns %NULL if there is no peer pad. a newly allocated copy of the #GstCaps of the Gets the capabilities of the peer connected to this pad. Preferred function if one only wants to read or intersect the caps. the caps of the pad with incremented ref-count Performs gst_pad_query() on the peer of @pad. The caller is responsible for both the allocation and deallocation of the query structure. if @pad has no peer. TRUE if the query could be performed. This function returns %FALSE the #GstQuery to perform. Calls gst_pad_get_allowed_caps() for every other pad belonging to the same element as @pad, and returns the intersection of the results. This function is useful as a default getcaps 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. the intersection of the other pads' allowed caps. Calls gst_pad_set_caps() for every other pad belonging to the same element as @pad. If gst_pad_set_caps() fails on any pad, the proxy setcaps fails. May be used only during negotiation. TRUE if sucessful the #GstCaps to link with Pulls a @buffer from the peer pad. 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. configured on @pad. Renegotiation within a running pull-mode pipeline is not supported. When this function returns #GST_FLOW_OK, @buffer will contain a valid #GstBuffer that should be freed with gst_buffer_unref() after usage. #GST_FLOW_OK is returned. MT safe. a #GstFlowReturn from the peer pad. 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 an installed pad block before triggering any installed pad probes. If the caps on @buffer are different from the currently configured caps on gst_pad_set_setcaps_function()). In case of failure to renegotiate the new format, this function returns #GST_FLOW_NOT_NEGOTIATED. 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. MT safe. a #GstFlowReturn from the peer pad. 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 owership 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. the #GstEvent to send to the pad. Pushes a buffer list to the peer of @pad. This function will call an installed pad block before triggering any installed pad probes. If the caps on the first buffer in the first group of @list are different from the currently configured caps on @pad, this function will call any installed setcaps function on @pad (see gst_pad_set_setcaps_function()). In case of failure to renegotiate the new format, this function returns #GST_FLOW_NOT_NEGOTIATED. If there are any probes installed on @pad every group of the buffer list will be merged into a normal #GstBuffer and pushed via gst_pad_push and the buffer list will be unreffed. 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. MT safe. a #GstFlowReturn from the peer pad. 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. the #GstQuery to perform. Queries a pad to convert @src_val in @src_format to @dest_format. TRUE if the query could be performed. a #GstFormat to convert from. a value to convert. a pointer to 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 Multi-sinkpad elements should implement custom query handlers. TRUE if the query was performed succesfully. the #GstQuery to handle. Queries a pad for the total stream duration. TRUE if the query could be performed. a pointer to the #GstFormat asked for. On return contains the #GstFormat used. a location in which to store the total duration, 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 #GstFormat to convert from. a value to convert. a pointer to 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 pointer to the #GstFormat asked for. On return contains the #GstFormat used. 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 pointer to the #GstFormat asked for. On return contains the #GstFormat used. a location in which to store the current position, or NULL. Queries a pad for the stream position. TRUE if the query could be performed. a pointer to the #GstFormat asked for. On return contains the #GstFormat used. A location in which to store the current position, or NULL. Removes a buffer probe from @pad. handler id returned from gst_pad_add_buffer_probe Removes a data probe from @pad. handler id returned from gst_pad_add_data_probe Removes an event probe from @pad. handler id returned from gst_pad_add_event_probe 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 owership 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. the #GstEvent to send to the pad. Sets the given acceptcaps function for the pad. The acceptcaps function will be called to check if the pad can accept the given caps. Setting the acceptcaps function to NULL restores the default behaviour of allowing any caps that matches the caps from gst_pad_get_caps(). the #GstPadAcceptCapsFunction to set. Sets the given activate function for @pad. The activate function will dispatch to gst_pad_activate_push() or gst_pad_activate_pull() 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. the #GstPadActivateFunction to set. Sets the given activate_pull function for the pad. An activate_pull function prepares the element and any upstream connections for pulling. See XXX part-activation.txt for details. the #GstPadActivateModeFunction to set. Sets the given activate_push function for the pad. An activate_push function prepares the element for pushing. See XXX part-activation.txt for details. the #GstPadActivateModeFunction to set. 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, checks the pad's current mode and calls gst_pad_activate_push() or gst_pad_activate_pull(), as appropriate, with a FALSE argument. MT safe. #TRUE if the operation was successful. whether or not the pad should be active. Blocks or unblocks the dataflow on a pad. This function is a shortcut for gst_pad_set_blocked_async() with a NULL callback. <note> Pad blocks are only possible for source pads in push mode and sink pads in pull mode. </note> wrong parameters were passed or the pad was already in the requested state. MT safe. TRUE if the pad could be blocked. This function can fail if the boolean indicating we should block or unblock Blocks or unblocks the dataflow on a pad. The provided callback is called when the operation succeeds; this happens right before the next attempt at pushing a buffer on the pad. This can take a while as the pad can only become blocked when real dataflow is happening. When the pipeline is stalled, for example in PAUSED, this can take an indeterminate amount of time. You can pass NULL as the callback to make this call block. Be careful with this blocking call as it might not return for reasons stated above. <note> Pad block handlers are only called for source pads in push mode and sink pads in pull mode. </note> wrong parameters were passed or the pad was already in the requested state. MT safe. TRUE if the pad could be blocked. This function can fail if the boolean indicating whether the pad should be blocked or unblocked #GstPadBlockCallback that will be called when the operation succeeds user data passed to the callback Blocks or unblocks the dataflow on a pad. The provided callback is called when the operation succeeds; this happens right before the next attempt at pushing a buffer on the pad. This can take a while as the pad can only become blocked when real dataflow is happening. When the pipeline is stalled, for example in PAUSED, this can take an indeterminate amount of time. You can pass NULL as the callback to make this call block. Be careful with this blocking call as it might not return for reasons stated above. <note> Pad block handlers are only called for source pads in push mode and sink pads in pull mode. </note> wrong parameters were passed or the pad was already in the requested state. MT safe. TRUE if the pad could be blocked. This function can fail if the boolean indicating whether the pad should be blocked or unblocked #GstPadBlockCallback that will be called when the operation succeeds user data passed to the callback #GDestroyNotify for user_data Sets the given bufferalloc function for the pad. Note that the bufferalloc function can only be set on sinkpads. the #GstPadBufferAllocFunction to set. Sets the capabilities of this pad. The caps must be fixed. Any previous caps on the pad will be unreffed. This function refs the caps so you should unref if as soon as you don't need it anymore. It is possible to set NULL caps, which will make the pad unnegotiated again. or bad parameters were provided to this function. MT safe. TRUE if the caps could be set. FALSE if the caps were not fixed a #GstCaps to set. Sets the given chain function for the pad. The chain function is called to process a #GstBuffer input buffer. see #GstPadChainFunction for more details. the #GstPadChainFunction to set. 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. the #GstPadChainListFunction to set. Sets the given checkgetrange function for the pad. Implement this function on a pad if you dynamically support getrange based scheduling on the pad. the #GstPadCheckGetRangeFunction to set. 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 private data to attach to the pad. Sets the given event handler for the pad. the #GstPadEventFunction to set. Sets the given fixatecaps function for the pad. The fixatecaps function will be called whenever the default values for a GstCaps needs to be filled in. the #GstPadFixateCapsFunction to set. Sets the given getcaps function for the pad. @getcaps 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, @getcaps should ideally return the same caps as the pad template. In rare circumstances, an object property can affect the caps returned by @getcaps, but this is discouraged. You do not need to call this function if @pad's allowed caps are always the same as the pad template caps. This can only be true if the padtemplate has fixed simple caps. For most filters, the caps returned by @getcaps 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, helps with autoplugging. Note that the return value from @getcaps is owned by the caller, so the caller should unref the caps after usage. the #GstPadGetCapsFunction to set. 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. the #GstPadGetRangeFunction to set. Sets the given internal link function for the pad. the #GstPadIntLinkFunction to set. Sets the given internal link iterator function for the pad. the #GstPadIterIntLinkFunction to set. 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. the #GstPadLinkFunction to set. Set the given query function for the pad. the #GstPadQueryFunction to set. Set the given query type function for the pad. the #GstPadQueryTypeFunction to set. Sets the given setcaps function for the pad. The setcaps function will be called whenever a buffer with a new media type is pushed or pulled from the pad. The pad/element needs to update its internal structures to process the new media type. If this new type is not acceptable, the setcaps function should return FALSE. the #GstPadSetCapsFunction to set. Sets the given unlink function for the pad. It will be called when the pad is unlinked. the #GstPadUnlinkFunction to set. Starts a task that repeatedly calls @func with @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 task function to call data passed to the task function 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. Unlinks the source pad from the sink pad. Will emit the #GstPad::unlinked signal on both pads. the pads were not linked together. MT safe. TRUE if the pads were unlinked. This function returns FALSE if the sink #GstPad to unlink. A helper function you can use that sets the pad. This way the function will always return the negotiated caps or in case the pad is not negotiated, the padtemplate caps. Use this function on a pad that, once gst_pad_set_caps() has been called on it, cannot be renegotiated to something else. Signals that new data is available on the pad. This signal is used internally for implementing pad probes. See gst_pad_add_*_probe functions. %TRUE to keep the data, %FALSE to drop it new data Signals that a pad has been linked to the peer pad. the peer pad that has been connected Signals that a pad connection has been requested. Signals that a pad has been unlinked from the peer pad. the peer pad that has been disconnected Check if @pad can accept @caps. By default this function will see if @caps intersect with the result from gst_pad_get_caps() by can be overridden to perform extra checks. TRUE if the caps can be accepted by the pad. the #GstPad to check the #GstCaps to check 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 prototype of the push and pull activate functions. TRUE if the pad could be activated or deactivated. a #GstPad activate or deactivate the pad. Callback used by gst_pad_set_blocked_async(). Gets called when the blocking operation succeeds. the #GstPad that is blockend or unblocked. blocking state for the pad the gpointer to optional user data. Ask the sinkpad @pad to allocate a buffer with @offset, @size and @caps. The result will be stored in @buf. The purpose of this function is to allocate a buffer that is optimal to be processed by @pad. The function is mostly overridden by elements that can provide a hardware buffer in order to avoid additional memcpy operations. The function can return a buffer that has caps different from the requested new caps. If a format change was requested, the returned buffer will be one to hold the data of said new caps, so its size might be different from the requested When this function returns anything else than #GST_FLOW_OK, the buffer allocation failed and @buf does not contain valid data. If the function returns #GST_FLOW_OK and the @buf is NULL, a #GstBuffer will be created with @caps, @offset and @size. By default this function returns a new buffer of @size and with @caps containing purely malloced data. The buffer should be freed with gst_buffer_unref() after usage. value means @buf does not hold a valid buffer. #GST_FLOW_OK if @buf contains a valid buffer, any other return a sink #GstPad the desired offset of the buffer the desired size of the buffer the desired caps of the buffer pointer to hold the allocated buffer. 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 #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 #GstBufferList that is chained, not %NULL. Check if @pad can be activated in pull mode. This function will be deprecated after 0.10; use the seeking query to check if a pad can support random access. TRUE if the pad can operate in pull mode. a #GstPad The direction of a pad. A dispatcher function is called for all internally linked pads, see gst_pad_dispatcher(). TRUE if the dispatching procedure has to be stopped. the #GstPad that is dispatched. the gpointer to optional user data. Function signature to handle an event for the pad. TRUE if the pad could handle the event. the #GstPad to handle the event. the #GstEvent to handle. Given possibly unfixed caps @caps, let @pad use its default prefered format to make a fixed caps. @caps should be writable. By default this function will pick the first value of any ranges or lists in the caps but elements can override this function to perform other behaviour. a #GstPad the #GstCaps to fixate Pad state flags Returns a copy of the capabilities of the specified pad. By default this function will return the pad template capabilities, but can optionally be overridden by elements. a newly allocated copy #GstCaps of the pad. the #GstPad to get the capabilities of. 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_pull(). 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_UNEXPECTED, 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. return value leaves @buffer undefined. #GST_FLOW_OK for success and a valid buffer in @buffer. Any other the src #GstPad to perform the getrange on. 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 function. the inside of the parent element. The caller must call g_list_free() on it after use. a newly allocated #GList of pads that are linked to the given pad on The #GstPad to query. The signature of the internal pad link iterator function. linked to the given pad on the inside of the parent element. the caller must call gst_iterator_free() after usage. Since 0.10.21 a new #GstIterator that will iterate over all pads that are The #GstPad to query. 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. <warning><para> 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. </para></warning> 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 peer #GstPad of the link Result values from gst_pad_link and friends. Indicates when this pad will become available. The signature of the query function. TRUE if the query could be performed. the #GstPad to query. the #GstQuery object to execute The signature of the query types function. a constant array of query types a #GstPad to query Set @caps on @pad. By default this function updates the caps of the pad but the function can be overriden by elements to perform extra actions or verifications. TRUE if the caps could be set on the pad. the #GstPad to set the capabilities of. the #GstCaps to set 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_get_request_pad() 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_pad_template ()). The following code example shows the code to create a pad from a padtemplate. <example> <title>Create a pad from a padtemplate</title> <programlisting> 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-int, " "channels = (int) [ 1, 6 ]" ) ); void my_method (void) { GstPad *pad; pad = gst_pad_new_from_static_template (&amp;my_template, "sink"); ... } </programlisting> </example> The following example shows you how to add the padtemplate to an element class, this is usually done in the base_init of the class: <informalexample> <programlisting> static void my_element_base_init (gpointer g_class) { GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&amp;my_template)); } </programlisting> </informalexample> Last reviewed on 2006-02-14 (0.10.3) Creates a new pad template with a name according to the given template and with the given arguments. This functions takes ownership of the provided caps, so be sure to not use them afterwards. a new #GstPadTemplate. the name template. the #GstPadDirection of the template. the #GstPadPresence of the pad. a #GstCaps set for the template. The caps are taken ownership of. Emit the pad-created signal for this template when created by this pad. the #GstPad that created it Gets the capabilities of the pad template. keep a reference to the caps, take a ref (see gst_caps_ref ()). the #GstCaps of the pad template. If you need to Emit the pad-created signal for this template when created by this pad. the #GstPad that created it The capabilities of the pad described by the pad template. The direction 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. the #GstPad that created it Flags for the padtemplate Function signature to handle a unlinking the pad prom its peer. the #GstPad that is linked. 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 A GParamSpec derived structure that contains the meta data for fractional properties. A %GParamSpec derived structure that contains the meta data for %GstMiniObject properties. Opaque structure. Allocates a parse context for use with gst_parse_launch_full() or gst_parse_launchv_full(). gst_parse_context_free() when no longer needed. a newly-allocated parse context. Free with Frees a parse context previously allocated with gst_parse_context_new(). 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. NULL-terminated array of element factory name strings of missing elements. Free with g_strfreev() when no longer needed. a The different parsing errors that can occur. Parsing options. 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. It will also implement a default behavour for managing seek events (see gst_element_seek()). 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 can be retrieved with gst_pipeline_get_bus(). This bus can then be used to receive #GstMessage from the elements in the pipeline. 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. When sending a flushing seek event to a GstPipeline (see gst_element_seek()), it will make sure that the pipeline is properly PAUSED and resumed as well as set the new running time to 0 when the seek succeeded. Last reviewed on 2009-05-29 (0.10.24) Create a new pipeline with the given name. MT safe. newly created GstPipeline 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. Check if @pipeline will automatically flush messages when going to the NULL state. going from READY to NULL state or not. MT safe. whether the pipeline will automatically flush its bus when Gets the #GstBus of @pipeline. The bus allows applications to receive #GstMessage packets. MT safe. a #GstBus, unref after usage. Gets the current clock used by @pipeline. a #GstClock, unref after usage. Get the configured delay (see gst_pipeline_set_delay()). MT safe. The configured delay. Gets the last running time of @pipeline. If the pipeline is PLAYING, the returned time is the running time used to configure the element's base time in the PAUSED->PLAYING state. If the pipeline is PAUSED, the returned time is the running time when the pipeline was paused. This function returns #GST_CLOCK_TIME_NONE if the pipeline was configured to not handle the management of the element's base time (see gst_pipeline_set_new_stream_time()). MT safe. gst_element_get_start_time(). a #GstClockTime. 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. 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. some element did not accept the clock. MT safe. TRUE if the clock could be set on the pipeline. FALSE if 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. the delay Set the new start time of @pipeline to @time. The start time is used to set the base time on the elements (see gst_element_set_base_time()) in the PAUSED->PLAYING state transition. Setting @time to #GST_CLOCK_TIME_NONE will disable the pipeline's management of element base time. The application will then be responsible for performing base time distribution. This is sometimes useful if you want to synchronize capture from multiple pipelines, and you can also ensure that the pipelines have the same clock. MT safe. gst_element_set_start_time(). the new running time to set 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. 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. Pipeline flags GStreamer is extensible, so #GstElement instances can be loaded at runtime. A plugin system can provide one or more of the basic <application>GStreamer</application> #GstPluginFeature subclasses. A plugin should export a symbol <symbol>gst_plugin_desc</symbol> 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 <symbol>gst_plugin_desc</symbol>. 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 automaticlly 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. Get the error quark. The error quark used in GError messages 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. reference to the newly-loaded GstPlugin, or NULL if an error occurred. a reference to the existing loaded GstPlugin, a 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. NULL-terminated array of environent 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. NULL-terminated array of file names (or file name suffixes, depending on @flags) to be used in combination with the paths from 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). one or more environent 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 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. Get the long descriptive name of the plugin the long name of the plugin get the filename of the plugin the filename of the plugin get the license of the plugin the license of the plugin Gets the #GModule of the plugin. If the plugin isn't loaded yet, NULL is returned. plugin isn't loaded yet. module belonging to the plugin or NULL if the Get the short name of the plugin the name of the plugin get the URL where the plugin comes from the origin of the plugin get the package the plugin belongs to. the package of the plugin get the source module the plugin belongs to. the source of the plugin get the version of the plugin the version of the plugin queries if the plugin is loaded into memory TRUE is loaded, FALSE otherwise Loads @plugin. Note that the *return value* is the loaded plugin; @plugin is untouched. The normal use pattern of this function goes like this: <programlisting> 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; </programlisting> a reference to a loaded plugin, or NULL on error. A standard filter that returns TRUE when the plugin is of the given name. TRUE if the plugin is of the given name. the name of the plugin 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 structure containing the data to cache Flags used in connection with gst_plugin_add_dependency(). 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. BSD, MIT/X11, Proprietary, unknown. The plugin loading errors 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. with each feature's reference count incremented. a copy of @list, 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. 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 after the name of p1 negative value if the rank of p1 > the rank of p2 or the ranks are a #GstPluginFeature a #GstPluginFeature Checks whether the given plugin feature is at least the required version the required version, otherwise #FALSE. #TRUE if the plugin feature has at least minimum required major version minimum required minor version minimum required micro version Gets the name of a plugin feature. the name Gets the rank of a plugin feature. The rank of the 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: |[ 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 Sets the name of a plugin feature. The name uniquely identifies a feature within all features of the same type. Renaming a plugin feature is not allowed. A copy is made of the name so you should free the supplied @name after calling this function. the name to set Specifies a rank for a plugin feature, so that autoplugging uses the most appropriate feature. rank value - higher number means more priority rank Compares type and name of plugin feature. Can be used with gst_filter_run(). TRUE if equal. the type and name to check against 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 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 writeable. 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 writeable are done using gst_poll_fd_ctl_read() and gst_poll_fd_ctl_write(). Use gst_poll_wait() to wait for the file descriptors to actually become readable and/or writeable, 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. Check if @fd in @set has data to be read. %TRUE if the descriptor has data to be read. 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. Control whether the descriptor @fd in @set will be monitored for readability. %TRUE if the descriptor was successfully updated. 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. a new status. Check if @fd in @set has closed the connection. %TRUE if the connection was closed. a file descriptor. Check if @fd in @set has an error. %TRUE if the descriptor has an error. 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. Free 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 #GPollFD Read a byte from the control socket of the controllable @set. This function is mostly useful for timer #GstPoll objects created with gst_poll_new_timer(). was no byte to read. %TRUE on success. %FALSE when @set is not controllable or when there Remove a file descriptor from the file descriptor set. %TRUE if the file descriptor was successfully removed from the 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. 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(). %TRUE if the controllability of @set could be updated. 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. 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. activity was detected after @timeout. If an error occurs, -1 is returned and errno is set. The number of #GstPollFD in @set that have activity or 0 when no 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. byte could not be written. %TRUE on success. %FALSE when @set is not controllable or when the A file descriptor object. Initializes @fd. Alternatively you can initialize it with #GST_POLL_FD_INIT. 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. Delete the given preset. %TRUE for success, %FALSE if e.g. there is no preset with that @name 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. or no value for the given @tag %TRUE for success, %FALSE if e.g. there is no preset with that @name preset name meta data item name value Get a copy of preset names as a NULL terminated string array. list with names, ue g_strfreev() after usage. Get a the names of the GObject properties that can be used for presets. array of property names which should be freed with g_strfreev() after use. an Load the given preset. %TRUE for success, %FALSE if e.g. there is no preset with that @name 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 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 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 %TRUE for success, %FALSE if e.g. there is no preset with that @name 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 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. or no value for the given @tag %TRUE for success, %FALSE if e.g. there is no preset with that @name preset name meta data item name value Get a copy of preset names as a NULL terminated string array. list with names, ue g_strfreev() after usage. Get a the names of the GObject properties that can be used for presets. array of property names which should be freed with g_strfreev() after use. an Load the given preset. %TRUE for success, %FALSE if e.g. there is no preset with that @name 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 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 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 %TRUE for success, %FALSE if e.g. there is no preset with that @name preset name meta data item name new value #GstPreset interface. an %TRUE for success, %FALSE if e.g. there is no preset with that @name preset name to load %TRUE for success, %FALSE preset name to save %TRUE for success, %FALSE if e.g. there is no preset with @old_name current preset name new preset name %TRUE for success, %FALSE if e.g. there is no preset with that @name preset name to remove %TRUE for success, %FALSE if e.g. there is no preset with that @name preset name meta data item name new value %TRUE for success, %FALSE if e.g. there is no preset with that @name preset name meta data item name value The type of a %GST_MESSAGE_PROGRESS. The progress messages inform the application of the status of assynchronous tasks. The different types of QoS events that can be given to the gst_event_new_qos_full() method. GstQuery functions are used to register new query types to the gstreamer core and use them. 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: <example> <title>Query duration on a pipeline</title> <programlisting> 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, &amp;duration); g_print ("duration = %"GST_TIME_FORMAT, GST_TIME_ARGS (duration)); } else { g_print ("duration query failed..."); } gst_query_unref (query); </programlisting> </example> Last reviewed on 2006-02-14 (0.10.4) Constructs a new custom application query object. Use gst_query_unref() when done with it. a new #GstQuery the query type a structure for the query Constructs a new query object for querying the buffering status of a stream. a new #GstQuery the default #GstFormat for the new 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. a #GstQuery the source #GstFormat for the new query the value to convert the target #GstFormat 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. a new #GstQuery the #GstFormat for this duration query Constructs a new query object for querying formats of the stream. 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. 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. a new #GstQuery the default #GstFormat for the new query Constructs a new query object for querying seeking properties of the stream. 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. a new #GstQuery the #GstFormat for the new query 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. a new #GstQuery Get the query type registered with @nick. if the query was not registered. The query registered with @nick or #GST_QUERY_NONE The nick of the query Get details about the given #GstQueryType. The #GstQueryTypeDefinition for @type or NULL on failure. 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 a #GstIterator of all the registered query types. The definitions iterated over are read only. a #GstIterator of #GstQueryTypeDefinition. Create a new GstQueryType based on the nick or return an already registered query with that nick with the same nick. A new GstQueryType or an already registered query The nick of the new query The description of the new query Get the unique quark for the given query type. the quark associated with the query type the query type See if the given #GstQueryType is inside the @types query types array. TRUE if the type is found inside the array The query array to search the #GstQueryType to find 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. start position of the range stop position of the range Retrieve the number of values currently stored in the buffered-ranges array of the query's structure. the range array size as a #guint. Get the structure of a query. still owned by the query and will therefore be freed when the query is unreffed. the #GstStructure of the query. The structure is 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. 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 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, or NULL Extracts the buffering stats values from @query. a buffering mode, or NULL the average input rate, or NULL the average output rat, or NULLe amount of buffering time left, 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. 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. the storage for the #GstFormat of the duration value, or NULL. the storage for the total duration, or NULL. Parse the number of formats in the formats @query. the number of formats in this query. Parse the format query and retrieve the @nth format from it into set to GST_FORMAT_UNDEFINED. the nth format to retrieve. a pointer to store the nth format Parse a latency query answer. storage for live or NULL the storage for the min latency or NULL the storage for the max latency or NULL 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. position in the buffered-ranges array to read the start position to set, or NULL the stop position to set, or NULL Parse a position query, writing the format into @format, and the position into @cur, if the respective parameters are non-NULL. the storage for the #GstFormat of the position values (may be NULL) the storage for the current position (may be NULL) Parse a seeking query, writing the format into @format, and other results into the passed parameters, if the respective parameters are non-NULL 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 See gst_query_set_segment() for an explanation of the function arguments. 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 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. the storage for the current URI (may be NULL) 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. if buffering is busy a buffering percent Set the available query result fields in @query. the format to set for the @start and @stop values the start to set the stop to set estimated total amount of download time Configures the buffering stats values in @query. a buffering mode the average input rate the average output rate amount of buffering time left Answer a convert query by setting the requested values. 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. 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. the number of formats to set. Set the formats query result fields in @query. The number of formats passed in the @formats array must be equal to @n_formats. the number of formats to set. an array containing @n_formats Answer a latency query by setting the requested values in the given format. if there is a live element upstream the minimal latency of the live element the maximal latency of the live element Answer a position query by setting the requested value in the given format. the requested #GstFormat the position to set Set the seeking query result fields in @query. 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. playback range start and stop values expressed in @format. The values are always between 0 and the duration of the media and negative rates, playback will actually happen from @stop_value to the rate of the segment the #GstFormat of the segment values (@start_value and @stop_value) the start value the stop value Answer a URI query by setting the requested URI. the URI to set Standard predefined Query types A Query Type definition 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 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. There may be multiple #GstRegistry objects, but the "default registry" is the only object that has any meaning to the core. The registry file is actually a cache of plugin information. This is unlike versions prior to 0.10, where the registry file was the primary source of plugin information, and was created by the gst-register command. 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: <itemizedlist> <listitem> <para>location from --gst-plugin-path commandline option.</para> </listitem> <listitem> <para>the GST_PLUGIN_PATH environment variable.</para> </listitem> <listitem> <para>the GST_PLUGIN_SYSTEM_PATH environment variable.</para> </listitem> <listitem> <para>default locations (if GST_PLUGIN_SYSTEM_PATH is not set). Those default locations are: <filename>~/.gstreamer-$GST_MAJORMINOR/plugins/</filename> and <filename>$prefix/libs/gstreamer-$GST_MAJORMINOR/</filename>. </para> </listitem> </itemizedlist> The registry cache file is loaded from <filename>~/.gstreamer-$GST_MAJORMINOR/registry-$ARCH.bin</filename> 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: <itemizedlist> <listitem> <para>the cache may not contain information about a given file.</para> </listitem> <listitem> <para>the cache may have stale information.</para> </listitem> <listitem> <para>the cache may have current information.</para> </listitem> </itemizedlist> 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. <emphasis role="bold">Implementation notes:</emphasis> The "cache" and "default 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 intitialization. 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. rebuilding the registry. %TRUE if GStreamer will use the child helper process when 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 default registry. The caller does not own a reference on the registry, as it is alive as long as GStreamer is initialized. The default #GstRegistry. Add the feature to the registry. The feature-added signal will be emitted. This function sinks @feature. MT safe. TRUE on success. the feature to add Add the given path to the registry. The syntax of the path is specific to the registry. If the path has already been added, do nothing. the path to add to the registry Add the plugin to the registry. The plugin-added signal will be emitted. This function will sink @plugin. MT safe. TRUE on success. the plugin to add 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). #GstPluginFeature. Use gst_plugin_feature_list_free() after usage. MT safe. a #GList of 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. or NULL if the plugin was not found. gst_object_unref() after usage. MT safe. the pluginfeature with the given name and type 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. plugin was not found. gst_object_unref() after usage. MT safe. the plugin with the given name or NULL if the the plugin name to find Retrieves a #GList of #GstPluginFeature of @type. #GstPluginFeature of @type. Use gst_plugin_feature_list_free() after use MT safe. a #GList of a #GType. Retrieves a #GList of features of the plugin with name @name. #GstPluginFeature. Use gst_plugin_feature_list_free() after usage. a #GList of a plugin name. Returns the registrys feature list cookie. This changes every time a feature is added or removed from the registry. the feature list cookie. Get the list of paths for the given registry. strings. g_list_free after use. MT safe. A #GList of paths as Get a copy of all plugins registered in the given registry. The refcount of each element in the list in incremented. Use gst_plugin_list_free() after usage. MT safe. a #GList of #GstPlugin. Look up a plugin in the given registry with the given filename. If found, plugin is reffed. gst_object_unref() after usage. the #GstPlugin if found, or NULL if not. the name of the file to look up Find a #GstPluginFeature with @name in @registry. use gst_object_unref() after usage. MT safe. a #GstPluginFeature with its refcount incremented, 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. Use gst_plugin_list_free() after usage. MT safe. a #GList of #GstPlugin. the filter to use only return first match user data passed to the filter function Remove the feature from the registry. MT safe. the feature to remove Remove the plugin from the registry. MT safe. 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 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. The different search modes. 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. no EOS will be emmited 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 seemless looping or simple linear editing. When doing fast forward (rate > 1.0) or fast reverse (rate < -1.0) trickmode playback, the @GST_SEEK_FLAG_SKIP 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. 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. The different types of seek events. When constructing a seek event with gst_event_new_seek(), a format, a seek method and optional flags are to be provided. The seek event is then inserted into the graph with gst_pad_send_event() or gst_element_send_event(). 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: <itemizedlist> <listitem><para>performing seeks (handling seek events)</para></listitem> <listitem><para>tracking playback regions (handling newsegment events)</para></listitem> </itemizedlist> 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. If the segment is used for managing seeks, the segment duration should be set with gst_segment_set_duration(). 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 with the gst_segment_set_last_stop(). The public last_stop field contains the last set stop position in the segment. For elements that perform seeks, the current segment should be updated with the gst_segment_set_seek() and the values from the seek event. This method will update all the segment fields. The last_stop field will contain the new playback position. If the cur_type was different from GST_SEEK_TYPE_NONE, playback continues from the last_stop position, possibly with updated flags or rate. For elements that want to use #GstSegment to track the playback region, use gst_segment_set_newsegment() to 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 all accumulated segments 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). Last reviewed on 2007-05-17 (0.10.13) Allocate a new #GstSegment structure and initialize it using gst_segment_init(). 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. completely in @segment, FALSE if the values are completely outside of the segment. TRUE if the given @start and @stop times fall partially or 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. a new #GstSegment, free with gst_segment_free(). Free the allocated segment @segment. The start/last_stop positions 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. the format of the segment. Set the duration of the segment to @duration. This function is mainly used by elements that perform seeking and know the total duration of the segment. This field should be set to allow seeking requests relative to the duration. the format of the segment. the duration of the segment info or -1 if unknown. Set the last observed stop position in the segment to @position. This field should be set to allow seeking requests relative to the current playing position. the format of the segment. the position Update the segment structure with the field values of a new segment event and with a default applied_rate of 1.0. flag indicating a new segment is started or updated the rate of the segment. the format of the segment. the new start value the new stop value the new stream time Update the segment structure with the field values of a new segment event. flag indicating a new segment is started or updated the rate of the segment. the applied rate of the segment. the format of the segment. the new start value the new stop value the new stream time Adjust the start/stop and accum values of @segment such that the next valid buffer will be one with @running_time. returned, @running_time is -1 or not in @segment. %TRUE if the segment could be updated successfully. If %FALSE is the format of the segment. the running_time in the segment Update the segment structure with the field values of a seek event (see gst_event_new_seek()). After calling this method, the segment field last_stop 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 last_stop 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), 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. last_stop field. This field can be FALSE if, for example, only the @rate has been changed but not the playback position. the rate of the segment. the format of the segment. the seek flags for the segment the seek method the seek start value the seek method the seek stop value boolean holding whether last_stop was updated. Convert @running_time into a position in the segment so that gst_segment_to_running_time() with that position returns @running_time. -1 when @running_time is -1 or when it is not inside @segment. the position in the segment for @running_time. This function returns the format of the segment. the running_time in the segment Translate @position to the total running time using the currently configured and previously accumulated segments. 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 runnning 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. was given. the position as the total running time or -1 when an invalid position the format of the segment. the position in the segment 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. was given. the position in stream_time or -1 when an invalid position the format of the segment. the position in the segment The possible states an element can be in. States can be changed using gst_element_set_state() and checked using gst_element_get_state(). 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. The possible return values from a state change function. Only Datastructure to initialize #GstCaps from a string description usually used in conjunction with GST_STATIC_CAPS() and gst_static_caps_get() to instantiate a #GstCaps. Converts a #GstStaticCaps to a #GstCaps. Since the core holds an additional ref to the returned caps, use gst_caps_make_writable() on the returned caps to modify it. a pointer to the #GstCaps. Unref after usage. Structure describing the #GstStaticPadTemplate. Converts a #GstStaticPadTemplate into a #GstPadTemplate. a new #GstPadTemplate. Gets the capabilities 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. the #GstCaps of the static pad template. Stream errors are for anything related to the stream being processed: format errors, media type errors, ... They're typically used by decoders, demuxers, converters, ... The type of a %GST_MESSAGE_STREAM_STATUS. The stream status messages inform the application of new streaming threads and their status. 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 folled 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. 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_empty_new() 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 must not be empty either, but may be NULL. Last reviewed on 2009-06-08 (0.10.23) Creates a new, empty #GstStructure with the given @name. See gst_structure_set_name() for constraints on the @name parameter. a new, empty #GstStructure name of new structure Creates a new, empty #GstStructure with the given name as a GQuark. a new, empty #GstStructure name of new structure 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_id_empty_new() and gst_structure_id_set(). The last variable argument must be NULL (or 0). a new #GstStructure name of new structure the GQuark for the name of the field to set 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. a new #GstStructure name of new structure name of first field to set 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. a new #GstStructure name of new structure name of first field to set variable argument list Duplicates a #GstStructure and all its fields and values. a new #GstStructure. Fixates a #GstStructure by changing the given @field_name field to the given TRUE if the structure could be fixated 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 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 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 field in @structure the target value of the fixation Fixates a #GstStructure by changing the given @field_name field to the given TRUE if the structure could be fixated 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(). FALSE otherwise. TRUE if the supplied function returns TRUE For each of the fields, 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. 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 acquire your own reference which you must release with a suitable _unref() when no longer needed. For strings and boxed types you will acquire a copy which you will need to release with either g_free() or the suiteable function for the boxed type. because the field requested did not exist, or was of a type other than the type specified), otherwise TRUE. FALSE if there was a problem reading any of the fields (e.g. the name of the first field to read 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. with @fieldname or the existing field did not contain a boolean, this function returns FALSE. TRUE if the value could be set correctly. If there was no field 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. with @fieldname or the existing field did not contain a #GstClockTime, this function returns FALSE. TRUE if the value could be set correctly. If there was no field 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 inconsistent with e.g. gst_structure_get_string() which doesn't return a copy of the string). with @fieldname or the existing field did not contain a data, this function returns FALSE. TRUE if the value could be set correctly. If there was no field 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). with @fieldname or the existing field did not contain a data, this function returns FALSE. TRUE if the value could be set correctly. If there was no field 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. with @fieldname or the existing field did not contain a double, this function returns FALSE. TRUE if the value could be set correctly. If there was no field 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. with @fieldname or the existing field did not contain an enum of the given type, this function returns FALSE. TRUE if the value could be set correctly. If there was no field 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 the name of the field Sets the Fourcc 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. with @fieldname or the existing field did not contain a fourcc, this function returns FALSE. TRUE if the value could be set correctly. If there was no field the name of a field a pointer to a 32bit unsigned int to set 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. with @fieldname or the existing field did not contain a GstFraction, this function returns FALSE. TRUE if the values could be set correctly. If there was no field 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. with @fieldname or the existing field did not contain an int, this function returns %FALSE. %TRUE if the value could be set correctly. If there was no field the name of a field a pointer to an int to set Get the name of @structure as a string. the name of the structure. Get the name of @structure as a GQuark. the quark representing the name of the structure. 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. or did not contain a string. a pointer to the string or NULL when the field did not exist 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. with @fieldname or the existing field did not contain a uint, this function returns %FALSE. %TRUE if the value could be set correctly. If there was no field the name of a field a pointer to a uint 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 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. 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 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 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. 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 acquire your own reference which you must release with a suitable _unref() when no longer needed. For strings and boxed types you will acquire a copy which you will need to release with either g_free() or the suiteable function for the boxed type. because the field requested did not exist, or was of a type other than the type specified), otherwise TRUE. FALSE if there was a problem reading any of the fields (e.g. the quark of the first field to read 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. TRUE, or FALSE if there was a problem reading any of the fields the quark of the first field to read variable arguments Get the value of the field with GQuark @field. identifier. the #GValue corresponding to the field with the given name the #GQuark of the field to get Check if @structure contains a field named @field. TRUE if the structure contains a field with the given name #GQuark of the field name Check if @structure contains a field named @field and with GType @type. TRUE if the structure contains a field with the given name and type #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. the GQuark for the name of the field to set va_list form of gst_structure_id_set(). 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. a #GQuark representing a field 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. a #GQuark representing a field the new value of the field 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. FALSE otherwise. TRUE if the supplied function returns TRUE For each of the fields, a function to call for each field private data Get the number of fields in the structure. the number of fields in the structure Get the name of the given field number, counting from 0 onwards. the name of the given field number the index to get the name of Removes all fields in a GstStructure. Removes the field with the given name. If the field with the given name does not exist, the structure is unchanged. the name of the field to remove Removes the fields with the given names. If a field does not exist, the argument is ignored. the name of the field to remove va_list form of gst_structure_remove_fields(). the name of the field to remove NULL-terminated list of more fieldnames to remove Parses the variable arguments and sets fields accordingly. Variable arguments should be in the form field name, field type (as a GType), value(s). The last variable argument should be NULL. the name of the field to set 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 "/-_.:". 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. a pointer to the parent's refcount va_list form of gst_structure_set(). 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. 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. 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: |[ GST_LOG ("structure is %" GST_PTR_FORMAT, structure); ]| This prints the structure in human readble form. g_free() after usage. (transfer full)L a pointer to string allocated by g_malloc(). The type of a %GST_MESSAGE_STRUCTURE_CHANGE. A function that will be called in gst_structure_foreach(). The function may not modify @value. the foreach operation should stop with FALSE. TRUE if the foreach operation should continue, FALSE if 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(). The function may modify @value. the map operation should stop with FALSE. TRUE if the map operation should continue, FALSE if the #GQuark of the 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. Last reviewed on 2006-03-08 (0.10.4) 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. MT safe. the default clock. Extra tag flags used when registering tags. 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 must be in ASCII or UTF-8 encoding. No other encodings are allowed. Last reviewed on 2009-06-09 (0.10.23) Creates a new empty GstTagList. An empty tag list 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). when no longer needed. a new #GstTagList. Free with gst_tag_list_free() tag Just like gst_tag_list_new_full(), only that it takes a va_list argument. Useful mostly for language bindings. when no longer needed. a new #GstTagList. Free with gst_tag_list_free() tag / value pairs to set Sets the values for the given tags using the specified mode. the mode to use tag Sets the values for the given tags using the specified mode. the mode to use tag tag / value pairs to set Sets the GValues for the given tags using the specified mode. the mode to use tag tag / GValue pairs to set Sets the GValue for a given tag using the specified mode. the mode to use tag GValue for this tag Sets the GValues for the given tags using the specified mode. the mode to use tag Copies a given #GstTagList. copy of the given list 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. function to be called for each tag user specified data Frees the given list and all associated values. Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the tag to read out number of entry to read out location for the result Copies the first buffer for the given tag in the taglist into the variable pointed to by @value. Free the buffer with gst_buffer_unref() when it is no longer needed. given list or if it was #NULL. TRUE, if a buffer was copied, FALSE if the tag didn't exist in the tag to read out address of a GstBuffer pointer variable to store the result into Gets the buffer 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 buffer with gst_buffer_unref() when it is no longer needed. given list or if it was #NULL. TRUE, if a buffer was copied, FALSE if the tag didn't exist in the tag to read out number of entry to read out address of a GstBuffer pointer variable to store the result into Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list or if it was #NULL. TRUE, if a date was copied, FALSE if the tag didn't exist in the 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. given list or if it was #NULL. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. thegiven list or if it was #NULL. TRUE, if a datetime was copied, FALSE if the tag didn't exist in 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. given list or if it was #NULL. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the tag to read out number of entry to read out location for the result 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. Since 0.10.24 the returned string is also guaranteed to be non-NULL and non-empty. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. Since 0.10.24 the returned string is also guaranteed to be non-NULL and non-empty. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the 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. tag wasn't available or the tag doesn't have as many entries The GValue for the specified entry or NULL if the 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 from the mode to use Checks if the given taglist is empty. TRUE if the taglist is empty, otherwise FALSE. 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. the new list second list to merge the mode to use 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. given list. TRUE, if a value was set, FALSE if the tag didn't exist in the tag to read out number of entry to read out location for the result Removes the given tag from the taglist. tag to remove 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, 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. <table frame="all" colsep="1" rowsep="1"> <title>merge mode</title> <tgroup cols='5' align='left'> <thead> <row> <entry>merge mode</entry> <entry>A + B</entry> <entry>A + !B</entry> <entry>!A + B</entry> <entry>!A + !B</entry> </row> </thead> <tbody> <row> <entry>REPLACE_ALL</entry> <entry>B</entry> <entry>-</entry> <entry>B</entry> <entry>-</entry> </row> <row> <entry>REPLACE</entry> <entry>B</entry> <entry>A</entry> <entry>B</entry> <entry>-</entry> </row> <row> <entry>APPEND</entry> <entry>A, B</entry> <entry>A</entry> <entry>B</entry> <entry>-</entry> </row> <row> <entry>PREPEND</entry> <entry>B, A</entry> <entry>A</entry> <entry>B</entry> <entry>-</entry> </row> <row> <entry>KEEP</entry> <entry>A</entry> <entry>A</entry> <entry>B</entry> <entry>-</entry> </row> <row> <entry>KEEP_ALL</entry> <entry>A</entry> <entry>A</entry> <entry>-</entry> <entry>-</entry> </row> </tbody> </tgroup> </table> 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: |[ 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); result = gst_tag_list_merge (application_tags, event_tags, merge_mode); ]| Last reviewed on 2006-05-18 (0.10.6) Adds the given tag / value pairs on the setter using the given merge mode. The list must be terminated with NULL. 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. 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. 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. the mode to use tag to set Adds the given tag / value pairs on the setter using the given merge mode. The list must be terminated with NULL. the mode to use tag 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. setter or NULL if none is used. a current snapshot of the taglist used in the Queries the mode by which tags inside the setter are overwritten by tags from events the merge mode used inside the element. Merges the given list into the setter's list using the given mode. 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. 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. The mode with which tags are added #GstTagSetterIFace interface. #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 #GStaticRecMutex 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_create(). 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 it 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 perposes, 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. Last reviewed on 2010-03-15 (0.10.29) 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. Create a new Task that will repeatedly call the provided @func with @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 #GStaticRecMutex must be configured using the gst_task_set_lock() function. This lock will always be acquired while MT safe. A new #GstTask. The #GstTaskFunction to use User data to pass to @func Get the #GstTaskPool that this task will use for its streaming threads. MT safe. after usage. the #GstTaskPool used by @task. gst_object_unref() Get the current state of the task. MT safe. The #GstTaskState of the task 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. MT safe. %TRUE if the task could be joined. 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. MT safe. %TRUE if the task could be paused. 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 #GMutex 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 #GstTaskPool Changes the priority of @task to @priority. MT safe. a new priority for @task 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. the new task state Set callbacks which will be executed when a new thread is needed, the thread function is entered and left and when the thread is joined. By default a thread for @task will be created from a default thread pool. Objects can use custom GThreads or can perform additional configuration of the threads (such as changing the thread priority) by installing callbacks. MT safe. a #GstTaskThreadCallbacks pointer user data passed to the callbacks called when @user_data is no longer referenced Starts @task. The @task must have a lock associated with it using gst_task_set_lock() or this function will return %FALSE. MT safe. %TRUE if the task could be started. 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. MT safe. %TRUE if the task could be stopped. 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. Last reviewed on 2009-04-23 (0.10.24) 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. Join a task and/or return it to the pool. @id is the id obtained from gst_task_pool_push(). the id Prepare the taskpool for accepting gst_task_pool_push() operations. MT safe. Start the execution of a new thread from @pool. function. This pointer can be NULL, you must check @error to detect errors. a pointer that should be used for the gst_task_pool_join 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. Join a task and/or return it to the pool. @id is the id obtained from gst_task_pool_push(). the id Prepare the taskpool for accepting gst_task_pool_push() operations. MT safe. Start the execution of a new thread from @pool. function. This pointer can be NULL, you must check @error to detect errors. a pointer that should be used for the gst_task_pool_join the function to call data to pass to @func The #GstTaskPoolClass object. a pointer that should be used for the gst_task_pool_join the function to call data to pass to @func the id Task function, see gst_task_pool_push(). user data for the task function The different states a task can be in Custom GstTask thread callback functions that can be installed. Traces allows to track object allocation. They provide a instance counter per #GType. The counter is incremented for each object allocated and decremented it when it's freed. <example> <title>Tracing object instances</title> <programlisting> // trace un-freed object instances gst_alloc_trace_set_flags_all (GST_ALLOC_TRACE_LIVE); if (!gst_alloc_trace_available ()) { g_warning ("Trace not available (recompile with trace enabled)."); } gst_alloc_trace_print_live (); // do something here gst_alloc_trace_print_live (); </programlisting> </example> Last reviewed on 2005-11-21 (0.9.5) Flush an close the previously allocated @trace. Flush any pending trace entries in @trace to the trace file. flushed. Set the default #GstTrace to @trace. Flush any pending trace entries in @trace to the trace file, formatted as a text line with timestamp and sequence numbers. flushed. The following functions allow you to detect the media type of an unknown stream. Last reviewed on 2005-11-09 (0.9.4) Get the length of the data stream. The length of the data stream, or 0 if it is not available. 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. if that data is not available. the requested data, or NULL 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 probability in percent that the suggestion is right The fixed #GstCaps to suggest 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 probability in percent that the suggestion is right the media type of the suggested caps first field of the suggested caps, or NULL These functions allow querying informations 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>. <example> <title>how to write a simple typefinder</title> <programlisting> 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 &gt;= 0 &amp;&amp; offset + size &lt;= find->size) { return find->data + offset; } return NULL; } static void my_suggest (gpointer data, guint probability, GstCaps *caps) { MyTypeFind *find = (MyTypeFind *) data; if (probability &gt; find->probability) { find->probability = probability; gst_caps_replace (&amp;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, &amp;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, &amp;gst_find); } g_list_free (type_list); return find.caps; }; </programlisting> </example> The above 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. Last reviewed on 2005-11-09 (0.9.4) 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. (behaviour change since 0.10.26) registered #GstTypeFindFactory. the list of all Calls the #GstTypeFindFunction associated with this factory. 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 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. NULL-terminated array of extensions associated with this factory a A function that will be called by typefinding. A #GstTypeFind structure optionnal data to pass to the function The probability of the typefind function. Higher values have more certainty in doing a reliable typefind. Structure used for filtering based on @name and @type. The URIHandler is an interface that is implemented by Source and Sink #GstElement to simplify then 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. Last reviewed on 2005-11-09 (0.9.4) Gets the currently handled URI. Returns NULL if there are no URI currently handled. The returned string must not be modified or freed. the URI currently handled by the @handler. Emits the new-uri signal for a given handler, when that handler has a new URI. This function should only be called by URI handlers themselves. new URI or NULL if it was unset Tries to set the URI of the given handler. TRUE if the URI was set successfully, else FALSE. URI to set Gets the list of protocols supported by @handler. This list may not be modified. supported protocols. Returns NULL if the @handler isn't implemented properly, or the @handler doesn't support any protocols. the Gets the currently handled URI. Returns NULL if there are no URI currently handled. The returned string must not be modified or freed. the URI currently handled by the @handler. Gets the type of the given URI handler Returns #GST_URI_UNKNOWN if the @handler isn't implemented correctly. the #GstURIType of the URI handler. Emits the new-uri signal for a given handler, when that handler has a new URI. This function should only be called by URI handlers themselves. new URI or NULL if it was unset Tries to set the URI of the given handler. TRUE if the URI was set successfully, else FALSE. URI to set The URI of the given @handler has changed. The new URI, or NULL if the URI was removed Any #GstElement using this interface should implement these methods. new URI or NULL if it was unset the URI currently handled by the @handler. TRUE if the URI was set successfully, else FALSE. URI to set The different types of URI direction. Used together with gst_value_compare() to compare #GValue items. or GST_VALUE_UNORDERED one of GST_VALUE_LESS_THAN, GST_VALUE_EQUAL, GST_VALUE_GREATER_THAN 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_intersect() to perform intersection for a specific #GValue type. If the intersection is non-empty, the result is placed in @dest and TRUE is returned. If the intersection is empty, @dest is unmodified and FALSE is returned. Register a new implementation with gst_value_register_intersect_func(). %TRUE if the values can intersect a #GValue for the result a #GValue operand a #GValue operand Used by gst_value_serialize() to obtain a non-binary form of the #GValue. the string representation of the value a #GValue Used by gst_value_subtract() to perform subtraction for a specific #GValue type. Register a new implementation with gst_value_register_subtract_func(). %TRUE if the subtraction is not empty a #GValue for the result a #GValue operand a #GValue operand VTable for the #GValue @type. Used by gst_value_union() to perform unification for a specific #GValue type. Register a new implementation with gst_value_register_union_func(). %TRUE if a union was successful a #GValue for the result a #GValue operand a #GValue operand GStreamer pipelines can be saved to xml files using gst_xml_write_file(). They can be loaded back using gst_xml_parse_doc() / gst_xml_parse_file() / gst_xml_parse_memory(). Additionally one can load saved pipelines into the gst-editor to inspect the graph. #GstElement implementations need to override the #GstObjectClass.save_thyself() and #GstObjectClass.restore_thyself() virtual functions of #GstObject. broken for all but the most simple pipelines. It will most likely be removed in future. Don't use it. Create a new GstXML parser object. a pointer to a new GstXML object. Load the element from the XML description the new element the xml node the parent of this object when it's loaded Converts the given element into an XML presentation. a pointer to an XML document The element to write out Converts the given element into XML and writes the formatted XML to an open file. number of bytes written on success, -1 otherwise. The element to write out an open file, like stdout This function is used to get a pointer to the GstElement corresponding to name in the pipeline description. You would use this if you have to do anything to the element after loading. a pointer to a new GstElement, caller owns returned reference. The name of element to retrieve Retrieve a list of toplevel elements. of the list and must not free or modify the list. The caller also does not own a reference to any of the elements in the list and should obtain its own reference using gst_object_ref() if necessary. a GList of top-level elements. The caller does not own a copy Fills the GstXML object with the elements from the xmlDocPtr. TRUE on success, FALSE otherwise a pointer to an xml document to parse The name of the root object to build Fills the GstXML object with the corresponding elements from the XML file fname. Optionally it will only build the element from the element node root (if it is not NULL). This feature is useful if you only want to build a specific element from an XML file but not the pipeline it is embedded in. Pass "-" as fname to read from stdin. You can also pass a URI of any format that libxml supports, including http. TRUE on success, FALSE otherwise The filename with the xml description The name of the root object to build Fills the GstXML object with the corresponding elements from an in memory XML buffer. TRUE on success a pointer to the in memory XML buffer the size of the buffer the name of the root objects to build Signals that a new object has been deserialized. the object that has been loaded the related xml_node pointer to the document tree Check if alloc tracing was compiled into the core tracing enabled. TRUE if the core was compiled with alloc Get the named alloc trace object. no alloc tracer was registered with that name. a GstAllocTrace with the given name or NULL when the name of the alloc trace object Get a list of all registered alloc trace objects. a GList of GstAllocTrace objects. Get the total number of live registered alloc trace objects. the total number of live registered alloc trace objects. Print the status of all registered alloc trace objects. Print the status of all registered alloc trace objects, ignoring those without live objects. Enable the specified options on all registered alloc trace objects. the options to enable Unconditionally sets the atomic integer to @value. pointer to an atomic integer value to set 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 Converts @caps from a string representation. a newly allocated #GstCaps a string to convert to #GstCaps Creates a #GstCaps from its XML serialization. a new #GstCaps structure a XML node Replaces *caps with @newcaps. Unrefs the #GstCaps in the location pointed to by @caps, if applicable, then modifies @caps to point to This function does not take any locks so you might want to lock the object owning @caps pointer. a pointer to #GstCaps a #GstCaps to replace *caps Emits the "child-added" signal. the parent object the newly added child Emits the "child-removed" signal. the parent object the removed child Gets properties of the parent object and its children. the parent object name of the first property to get Gets a single property using the GstChildProxy mechanism. You are responsible for 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. case the values for @pspec and @target are not modified. Unref @target after usage. MT safe. TRUE if @target and @pspec could be found. FALSE otherwise. In that object to lookup the property in name of the property to look up pointer to a #GstObject 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 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 Connect to a class signal. the signal id. a #GstObjectClass to attach the signal to the name of the signal to attach to the signal function a pointer to user data emits the named class signal. a #GstObject that emits the signal the name of the signal to emit data for the signal 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 Constructs a string that can be used for getting the desired color in color terminals. You need to free the string after use. definition a string containing the color 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. debug categories the list of Returns the default threshold that is used for new categories. the default threshold level 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 The default logging handler used by GStreamer. Logging functions get called whenever a macro like GST_DEBUG or similar is used. This function outputs the message and additional info to stderr (or the log file specified via the GST_DEBUG_FILE environment variable). You can add other handlers by using 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 an unused variable, reserved for some user_data. 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 If GST_ENABLE_FUNC_INSTRUMENTATION is defined a stacktrace is available for gstreamer code, which can be printed with this function. Removes all registered instances of the given logging functions. How many instances of the function were removed the log function to remove 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 If activated, debugging messages are sent to the debugging handlers. It makes sense to deactivate it for speed issues. <note><para>This function is not threadsafe. It makes sense to only call it during initialization.</para></note> Whether to use debugging output or not Sets or unsets the use of coloured debugging output. 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 Resets all categories with the given name back to the default level. name of the categories to set Checks whether a plugin feature by the given name exists in the default registry and whether its version is at least the version required. the same as the required version or newer, and #FALSE otherwise. #TRUE if the feature could be found and the version is the name of the feature (e.g. "oggdemux") the minimum major version number the minimum minor version number the minimum micro version number 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. Get a string describing the error message in the current locale. the error message (in UTF-8 encoding) a newly allocated string describing the GStreamer error domain this error belongs to. the error code belonging to the domain. 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. absolute or relative file name path Iterates over the elements in @list, calling @func with the list item data for each item. If @func returns TRUE, @data is prepended to the list of results returned. If @first is true, the search is halted after the first result is found. Since gst_filter_run() knows nothing about the type of @data, no reference will be taken (if @data refers to an object) and no copy of results. when no longer needed (the data contained in the list is a flat copy and does need to be unreferenced or freed). the list of results. Free with g_list_free() a linked list the function to execute for each item flag to stop execution after a successful item user data 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. invalid return was specified. the quark associated with the flow return or 0 if an a #GstFlowReturn to get the quark of. Return the format registered with the given nick. if the format was not registered. The format with @nick or GST_FORMAT_UNDEFINED The nick of the format Get details about the given format. MT safe. The #GstFormatDefinition for @format or NULL on failure. The format to get details of Get a printable name for the given format. Do not modify or free. the format is unknown. a reference to the static name of the format or NULL if 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. with the same nick. MT safe. A new GstFormat or an already registered format The nick of the new format The description of the new format Get the unique quark for the given format. is unknown. the quark associated with the format or 0 if the format 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 cast a given object to an interface type, and check whether this interface is supported for this specific instance. a gpointer to the interface type the object (any sort) from which to cast to the interface the interface type to cast to check a given object for an interface implementation, and check whether this interface is supported for this specific instance. whether or not the object implements the given interface the object (any sort) from which to check from for the interface the interface type to check for 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. This function should be called before calling any other GLib functions. If this is not an option, your program must initialise the GLib thread system using g_thread_init() before any other GLib functions are called. <note><para> 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. </para></note> functions in other glib-style libraries, such as gtk_init(). In particular, unknown command line options cause this function to abort program execution. 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. This function should be called before calling any other GLib functions. If this is not an option, your program must initialise the GLib thread system using g_thread_init() before any other GLib functions are called. %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. 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. Checks if the given pointer is a taglist. TRUE, if the given pointer is a taglist Object that might be a taglist 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. MT safe. the new #GstIterator. 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. 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. The @item function usualy makes sure that the item remains alive while responsible for freeing/unreffing the item after usage as explained in gst_iterator_next(). 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(). MT safe. the new #GstIterator for @list. #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 for each item function to call when the iterator is freed 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 Function that returns a copy of @object or increases its refcount Function to be called for freeing @object Creates a new #GParamSpec instance that hold #GstMiniObject references. a newly allocated #GParamSpec instance the canonical name of the property the nickname of the property a short description of the property the #GstMiniObject #GType for the property a combination of #GParamFlags 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 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 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. more than one toplevel element is specified by the @pipeline_description, all elements are put into a #GstPipeline, which than is returned. a new element on success, %NULL on failure. If 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. more than one toplevel element is specified by the @pipeline_description, all elements are put into a #GstPipeline, which then is returned. a new element on success, %NULL on failure. If 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. 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. An error does not mean that the pipeline could not be constructed. or a partially-constructed bin or element will be returned and @error will be set (unless you passed #GST_PARSE_FLAG_FATAL_ERRORS in @flags, then %NULL will always be returned on failure) a new element on success; on failure, either %NULL null-terminated array of arguments a parse context allocated with gst_parse_context_new(), or %NULL parsing options, or #GST_PARSE_FLAG_NONE 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 with gst_poll_free(). a new #GstPoll, or %NULL in case of an error. 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 with gst_poll_free(). a new #GstPoll, or %NULL in case of an error. Print the element argument in a human readable format in the given GString. the buffer to print the args in initial indentation the element to print the args of Write the pad capabilities in a human readable format into the given GString. the buffer to print the caps in initial indentation the pad to print the caps from 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. 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. not be parsed. Free with gst_structure_free() after use. a new #GstStructure or NULL when the string could a string representation of a #GstStructure. pointer to store the end of the string in. 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. given list. TRUE, if a value was copied, FALSE if the tag didn't exist in the uninitialized #GValue to copy into list to get the tag from tag to read out 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. that there can only be one single value for this tag in a tag list and any additional values will silenty be discarded when being added (unless #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. 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 Create a ringbuffer of @size in the file with @filename to store trace results in. a new #GstTrace. a filename the max size of the file Read a platform independent timer value that can be used in benchmarks. (out) pointer to hold the result. 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 (note that passing NULL only works in GStreamer 0.10.16 and later) The name for registering The rank (or importance) of this typefind function The #GstTypeFindFunction to use Optional 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. Helper function which constructs a #GTypeInfo structure and registers a GType, but which generates less linker overhead than a static const #GTypeInfo structure. For further details of the parameters, please see #GTypeInfo in the GLib documentation. Registers type_name as the name of a new static type derived from parent_type. The value of flags determines the nature (e.g. abstract or not) of the type. It works by filling a GTypeInfo struct and calling g_type_register_static(). A #GType for the newly-registered type. The GType of the parent type the newly registered type will derive from NULL-terminated string used as the name of the new type Size of the class structure. Location of the base initialization function (optional). Location of the base finalization function (optional). Location of the class initialization function for class types Location of the default vtable inititalization function for interface types. (optional) Location of the class finalization function for class types. Location of the default vtable finalization function for interface types. (optional) User-supplied data passed to the class init/finalize functions. Size of the instance (object) structure (required for instantiatable types only). The number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Ignored on recent GLib's. Location of the instance initialization function (optional, for instantiatable types only). A GTypeValueTable function table for generic handling of GValues of this type (usually only useful for fundamental types). #GTypeFlags for this GType. E.g: G_TYPE_FLAG_ABSTRACT 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. imply that there were changes), otherwise %FALSE. %TRUE if the registry has been updated successfully (does not Constructs a URI for a given valid protocol and location. URI. Returns NULL if the given URI protocol is not valid, or the given location is NULL. a new string for this Protocol for URI Location for URI Extracts the location out of a given valid URI, ie. the protocol and "://" are stripped from the URI, which means that the location returned includes the hostname if one is specified. The returned string must be freed using g_free(). URI. Returns NULL if the URI isn't valid. If the URI does not contain a location, an empty string is returned. the location for this 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 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 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 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 memory block into a hex representation. Useful for debugging. a pointer to the memory to dump the size of the memory block to dump 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 Get a timestamp as GstClockTime to be used for interval meassurements. 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 Compare two sequence numbers, handling wraparound. The current implementation just returns (gint32)(@s1 - @s2). positive number if @s1 is after @s2. A negative number if @s1 is before @s2, 0 if they are equal, or a 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. overflow back to 0 at some point. Use gst_util_seqnum_compare() to make sure you handle wraparound correctly. A constantly incrementing 32-bit unsigned integer, which might Convertes the string value to the type of the objects argument and sets the argument with it. Note that this function silently returns if @object has no property named the object to set the argument of the name of the argument to set the string value to set 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 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. 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(). @val * @num / @denom. In the case of an overflow, this 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. 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(). @val * @num / @denom. In the case of an overflow, this 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 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(). @val * @num / @denom. In the case of an overflow, this 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 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(). @val * @num / @denom. In the case of an overflow, this 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 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(). @val * @num / @denom. In the case of an overflow, this 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. 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(). @val * @num / @denom. In the case of an overflow, this the number to scale the numerator of the scale ratio the denominator of the scale ratio 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 Prepends @prepend_value to the GstValueArray in @value. a #GValue of type #GST_TYPE_ARRAY the value to prepend 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, or if there is a method (registered by gst_value_register_intersect_func()) to calculate the intersection. 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. be unioned. TRUE if there is a function allowing the two values to 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 Get the contents of a %GST_TYPE_MINI_OBJECT derived #GValue, increasing its reference count. If the contents of the #GValue are %NULL, %NULL will be returned. mini object contents of @value a valid #GValue of %GST_TYPE_MINI_OBJECT derived type Multiplies the two #GValue items containing a #GST_TYPE_FRACTION and sets 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 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_DATE Gets the maximum of the range specified by @value. the maxumum 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 Gets the #guint32 fourcc contained in @value. the #guint32 fourcc contained in @value. a GValue initialized to #GST_TYPE_FOURCC 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 maxumum 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 maximum of the range specified by @value. the maxumum 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 Get the contents of a %GST_TYPE_MINI_OBJECT derived #GValue. Does not increase the refcount of the returned object. mini object contents of @value a valid #GValue of %GST_TYPE_MINI_OBJECT derived type 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. 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 a value to intersect another value to intersect Tests if the given GValue, if available in a GstStructure (or any other (which means: multiple possible values, such as data lists or data ranges) value. true if the value is "fixed". the #GValue to check 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. 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 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 Registers functions to perform calculations on #GValue items of a given type. Each type can only be added once. structure containing functions to register Registers a function that is called to calculate the intersection of the values having the types @type1 and @type2. Intersect functions should be registered at startup before any pipelines are started, as gst_value_register_intersect_func() is not thread-safe and cannot be used at the same time as gst_value_intersect() or gst_value_can_intersect(). the first type to intersect the second type to intersect the intersection function Registers @func as a function capable of subtracting the values of Subtract functions should be registered at startup before any pipelines are started, as gst_value_register_subtract_func() is not thread-safe and cannot be used at the same time as gst_value_subtract(). type of the minuend type of the subtrahend function to use Registers a union function that can create a union between #GValue items of the type @type1 and @type2. Union functions should be registered at startup before any pipelines are started, as gst_value_register_union_func() is not thread-safe and cannot be used at the same time as gst_value_union() or gst_value_can_union(). a type to union another type to union a function that implments creating a union between the two types tries to transform the given @value into a string representation that allows getting back this string later on using gst_value_deserialize(). the serialization for @value or NULL if none exists a #GValue to serialize 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 coorespond to @date. The actual #GDate structure is copied before it is used. a GValue initialized to GST_TYPE_DATE the date 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 @fourcc. a GValue initialized to #GST_TYPE_FOURCC the #guint32 fourcc to set 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 and @end. a GValue initialized to GST_TYPE_INT_RANGE the start of the range the end of the range Set the contents of a %GST_TYPE_MINI_OBJECT derived #GValue to The caller retains ownership of the reference. a valid #GValue of %GST_TYPE_MINI_OBJECT derived type mini object value to set Sets the contents of @value to @structure. The actual 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 the value to subtract from the value to subtract Set the contents of a %GST_TYPE_MINI_OBJECT derived #GValue to Takes over the ownership of the caller's reference to @mini_object; the caller doesn't have to unref it any more. a valid #GValue of %GST_TYPE_MINI_OBJECT derived type mini object value to take Creates a GValue corresponding to the union of @value1 and @value2. always returns %TRUE the destination value a value to union another value to union 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. a newly allocated string describing this version