The parent #GstMiniObject type
the #GstQueryType
Add allocator
and its params
as a supported memory allocator.
the memory allocator
a #GstAllocationParams
Set the pool parameters in query
.
the #GstBufferPool
the buffer size
the min buffers
the max buffers
Set the buffering-ranges array field in query
. The current last
start position of the array should be inferior to start
.
start position of the range
stop position of the range
Add mode
as one of the supported scheduling modes to query
.
a #GstPadMode
Check if query
has metadata api
set. When this function returns %TRUE,
index
will contain the index where the requested API and the parameters
can be found.
the metadata API
Retrieve the number of values currently stored in the meta API array of the query's structure.
Retrieve the number of values currently stored in the allocator params array of the query's structure.
If no memory allocator is specified, the downstream element can handle the default memory allocator. The first memory allocator in the query should be generic and allow mapping to system memory, all following allocators should be ordered by preference with the preferred one first.
Retrieve the number of values currently stored in the pool array of the query's structure.
Retrieve the number of values currently stored in the buffered-ranges array of the query's structure.
Retrieve the number of values currently stored in the scheduling mode array of the query's structure.
Check if query
has scheduling mode set.
When checking if upstream supports pull mode, it is usually not enough to just check for GST_PAD_MODE_PULL with this function, you also want to check whether the scheduling flags returned by gst_query_parse_scheduling() have the seeking flag set (meaning random access is supported, not only sequential pulls).
the scheduling mode
Check if query
has scheduling mode set and flags
is set in
query scheduling flags.
the scheduling mode
#GstSchedulingFlags
Parse the result from query
and store in result
.
Get the results of a bitrate query. See also gst_query_set_bitrate().
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.
Extracts the buffering stats values from query
.
Parse a context type from an existing GST_QUERY_CONTEXT query.
Parse a latency query answer.
Parse the number of formats in the formats query
.
Parse an available query and get the allocator and its params
at index
of the allocator array.
position in the allocator array to read
Get the pool parameters in query
.
Unref pool
with gst_object_unref() when it's not needed any more.
index to parse
Parse an available query and get the start and stop values stored
at the index
of the buffered ranges array.
position in the buffered-ranges array to read
Parse an available query and get the scheduling mode
at index
of the scheduling modes array.
position in the scheduling modes array to read
Set the scheduling properties.
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.
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.
Parse an URI query, and set permanent
to %TRUE if there is a redirection
and it should be considered permanent. If a redirection is permanent,
applications should update their internal storage of the URI, otherwise
they should make all future requests to the original URI.
Remove the metadata API at index
of the metadata API array.
position in the metadata API array to remove
Remove the allocation param at index
of the allocation param array.
position in the allocation param array to remove
Remove the allocation pool at index
of the allocation pool array.
position in the allocation pool array to remove
Set result
as the result for the query
.
the result to set
Set the results of a bitrate query. The nominal bitrate is the average bitrate expected over the length of the stream as advertised in file headers (or similar).
the nominal bitrate in bits per second
Set the percentage of buffered data. This is a value between 0 and 100.
The busy
indicator is %TRUE when the buffering is in progress.
if buffering is busy
a buffering percent
Configures the buffering stats values in query
.
a buffering mode
the average input rate
the average output rate
amount of buffering time left in milliseconds
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 upstream elements
the maximal latency of the upstream elements
Parse an available query and get the allocator and its params
at index
of the allocator array.
position in the allocator array to set
new allocator to set
parameters for the allocator
Set the pool parameters in query
.
index to modify
the #GstBufferPool
the buffer size
the min buffers
the max buffers
Set the scheduling properties.
#GstSchedulingFlags
the suggested minimum size of pull requests
the suggested maximum size of pull requests
the suggested alignment of pull requests
Answer a segment query by setting the requested values. The normal playback segment of a pipeline is 0 to duration at the default rate of 1.0. If a seek was performed on the pipeline to play a different segment, this query will return the range specified in the last seek.
start_value
and stop_value
will respectively contain the configured
playback range start and stop values expressed in format
.
The values are always between 0 and the duration of the media and
start_value
<= stop_value
. rate
will contain the playback rate. For
negative rates, playback will actually happen from stop_value
to
start_value
.
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
Answer a URI query by setting the requested URI redirection.
the URI to set
Answer a URI query by setting the requested URI redirection to permanent or not.
whether the redirect is permanent or not
Constructs a new query object for querying the caps.
The CAPS query should return the allowable caps for a pad in the context of the element's state, its link to other elements, and the devices or files it has opened. These caps must be a subset of the pad template caps. In the NULL state with no links, the CAPS query should ideally return the same caps as the pad template. In rare circumstances, an object property can affect the caps returned by the CAPS query, but this is discouraged.
For most filters, the caps returned by CAPS query is directly affected by the allowed caps on other pads. For demuxers and decoders, the caps returned by the srcpad's getcaps function is directly related to the stream data. Again, the CAPS query should return the most specific caps it reasonably can, since this helps with autoplugging.
The filter
is used to restrict the result caps, only the caps matching
filter
should be returned from the CAPS query. Specifying a filter might
greatly reduce the amount of processing an element needs to do.
Free-function: gst_query_unref()
Constructs a new convert query object. Use gst_query_unref() when done with it. A convert query is used to ask for a conversion between one format and another.
Free-function: gst_query_unref()
the source #GstFormat for the new query
the value to convert
the target #GstFormat
Modifies a pointer to a #GstQuery to point to a different #GstQuery. This
function is similar to gst_query_replace() except that it takes ownership of
new_query
.
Either new_query
or the #GstQuery pointed to by old_query
may be %NULL.
pointer to a pointer to a #GstQuery to be stolen.
pointer to a #GstQuery that will replace the query pointed to by old_query
.
Queries can be performed on pads (gst_pad_query()) and elements (gst_element_query()). Please note that some queries might need a running pipeline to work.
Queries can be created using the gst_query_new_*() functions. Query values can be set using gst_query_set_*(), and parsed using gst_query_parse_*() helpers.
The following example shows how to query the duration of a pipeline: