Optionalproperties: Partial<{ mini_object: MiniObject; type: Gst.QueryType }>Add allocator and its params as a supported memory allocator.
the memory allocator
Set the pool parameters in query.
the Gst.BufferPool
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
a gboolean indicating if the range was added or not.
Copies the given query using the copy function of the parent Gst.Structure.
Free-function: gst_query_unref
a new copy of q.
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
true when api is in the list of metadata.
Retrieve the number of values currently stored in the meta API array of the query's structure.
the metadata API array size as a guint.
Retrieve the number of values currently stored in the allocator params array of the query's structure.
If no memory allocator is specified, the downstream element can handle the default memory allocator. The first memory allocator in the query should be generic and allow mapping to system memory, all following allocators should be ordered by preference with the preferred one first.
the allocator array size as a guint.
Retrieve the number of values currently stored in the pool array of the query's structure.
the pool array size as a guint.
Retrieve the number of values currently stored in the buffered-ranges array of the query's structure.
the range array size as a guint.
Retrieve the number of values currently stored in the scheduling mode array of the query's structure.
the scheduling mode array size as a guint.
Get the structure of a query.
the Gst.Structure of the query. The structure is still owned by the query and will therefore be freed when the query is unreffed.
Check if query has scheduling mode set.
When checking if upstream supports pull mode, it is usually not enough to just check for GST_PAD_MODE_PULL with this function, you also want to check whether the scheduling flags returned by
gst_query_parse_scheduling()have the seeking flag set (meaning random access is supported, not only sequential pulls).
true when mode is in the list of scheduling modes.
Check if query has scheduling mode set and flags is set in
query scheduling flags.
the scheduling mode
true when mode is in the list of scheduling modes and flags are compatible with query flags.
Tests if you can safely modify query. It is only safe to modify query when
there is only one owner of the query - ie, the object is writable.
Returns a writable copy of query.
If there is only one reference count on query, the caller must be the owner,
and so this function will return the query object unchanged. If on the other
hand there is more than one reference on the object, a new query object will
be returned. The caller's reference on query will be removed, and instead the
caller will own a reference to the returned object.
In short, this function unrefs the query in the argument and refs the query
that it returns. Don't access the argument after calling this function. See
also: gst_query_ref().
a writable query which may or may not be the same as query
Parse the result from query and store in result.
Since 1.16parse_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.
Since 1.2parse_Since 1.2parse_Parse the number of formats in the formats query.
Parse an available query and get the metadata API
at index of the metadata API array.
position in the metadata API array to read
a GObject.GType of the metadata API at index.
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
a gboolean indicating if the parsing succeeded.
Parse an available query and get the scheduling mode
at index of the scheduling modes array.
position in the scheduling modes array to read
a Gst.PadMode of the scheduling mode at index.
Set the scheduling properties.
Since 1.22parse_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.
Since 1.2parse_Since 1.4parse_Remove the metadata API at index of the metadata API array.
position in the metadata API array to remove
Since 1.2remove_Since 1.2remove_Set result as the result for the query.
the result to set
Since 1.16set_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
Since 1.2set_Answer a context query by setting the requested context.
the requested Gst.Context
Answer a convert query by setting the requested values.
the source Gst.Format
the source value
the destination Gst.Format
the destination value
Answer a duration query by setting the requested value in the given format.
the Gst.Format for the duration
the duration of the stream
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 Gst.BufferPool
the buffer size
the min buffers
the max buffers
Answer a position query by setting the requested value in the given format.
the requested Gst.Format
the position to set
Set the scheduling properties.
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 Gst.Format of the segment values (start_value and stop_value)
the start value
the stop value
Since 1.22set_Answer a URI query by setting the requested URI.
the URI to set
Since 1.2set_Since 1.4set_Decreases the refcount of the query. If the refcount reaches 0, the query will be freed.
Get the structure of a query. This method should be called with a writable
query so that the returned structure is guaranteed to be writable.
the Gst.Structure of the query. The structure is still owned by the query and will therefore be freed when the query is unreffed.
Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_StaticSince 1.16take
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: