Optionalproperties: Partial<{ mini_object: MiniObject; type: Gst.QueryType }>Add allocator and its params as a supported memory allocator.
Optionalallocator: Gst.Allocatorthe memory allocator
Optionalparams: AllocationParamsSet 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.
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.
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.
a gboolean indicating if the parsing succeeded.
Parse a latency query answer.
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.
Get the results of a selectable query. See also gst_query_set_selectable().
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 context query by setting the requested context.
Optionalcontext: Gst.Contextthe 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
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
Optionalallocator: Gst.Allocatornew allocator to set
Optionalparams: AllocationParamsparameters 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
Set the results of a selectable query. If the element answering the query can
handle stream selection, selectable should be set to true.
Whether the element can handle stream selection.
Answer a URI query by setting the requested URI.
Optionaluri: stringthe URI to set
Answer a URI query by setting the requested URI redirection.
Optionaluri: stringthe URI to set
Answer a URI query by setting the requested URI redirection to permanent or not.
whether the redirect is permanent or not
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_Statictake
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: