gi-gst-1.0.23: GStreamer bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gst.Structs.Query

Description

Queries can be performed on pads (padQuery) and elements (elementQuery). 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:

C code

 GstQuery *query;
 gboolean res;
 query = gst_query_new_duration (GST_FORMAT_TIME);
 res = gst_element_query (pipeline, query);
 if (res) {
   gint64 duration;
   gst_query_parse_duration (query, NULL, &duration);
   g_print ("duration = %"GST_TIME_FORMAT, GST_TIME_ARGS (duration));
 } else {
   g_print ("duration query failed...");
 }
 gst_query_unref (query);
Synopsis

Exported types

newtype Query Source #

Memory-managed wrapper type.

Constructors

Query (ManagedPtr Query) 

Instances

Instances details
Eq Query Source # 
Instance details

Defined in GI.Gst.Structs.Query

Methods

(==) :: Query -> Query -> Bool

(/=) :: Query -> Query -> Bool

GBoxed Query Source # 
Instance details

Defined in GI.Gst.Structs.Query

ManagedPtrNewtype Query Source # 
Instance details

Defined in GI.Gst.Structs.Query

Methods

toManagedPtr :: Query -> ManagedPtr Query

TypedObject Query Source # 
Instance details

Defined in GI.Gst.Structs.Query

Methods

glibType :: IO GType

IsGValue Query Source #

Convert Query to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gst.Structs.Query

Methods

toGValue :: Query -> IO GValue

fromGValue :: GValue -> IO Query

HasParentTypes Query Source # 
Instance details

Defined in GI.Gst.Structs.Query

tag ~ 'AttrSet => Constructible Query tag Source # 
Instance details

Defined in GI.Gst.Structs.Query

Methods

new :: MonadIO m => (ManagedPtr Query -> Query) -> [AttrOp Query tag] -> m Query

type ParentTypes Query Source # 
Instance details

Defined in GI.Gst.Structs.Query

type ParentTypes Query = '[] :: [Type]

newZeroQuery :: MonadIO m => m Query Source #

Construct a Query struct initialized to zero.

Methods

Overloaded methods

addAllocationMeta

queryAddAllocationMeta Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_ALLOCATION type query Query

-> GType

api: the metadata API

-> Maybe Structure

params: API specific parameters

-> m () 

Add api with params as one of the supported metadata API to query.

addAllocationParam

queryAddAllocationParam Source #

Arguments

:: (HasCallStack, MonadIO m, IsAllocator a) 
=> Query

query: a GST_QUERY_ALLOCATION type query Query

-> Maybe a

allocator: the memory allocator

-> Maybe AllocationParams

params: a AllocationParams

-> m () 

Add allocator and its params as a supported memory allocator.

addAllocationPool

queryAddAllocationPool Source #

Arguments

:: (HasCallStack, MonadIO m, IsBufferPool a) 
=> Query

query: A valid Query of type GST_QUERY_ALLOCATION.

-> Maybe a

pool: the BufferPool

-> Word32

size: the buffer size

-> Word32

minBuffers: the min buffers

-> Word32

maxBuffers: the max buffers

-> m () 

Set the pool parameters in query.

addBufferingRange

queryAddBufferingRange Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_BUFFERING type query Query

-> Int64

start: start position of the range

-> Int64

stop: stop position of the range

-> m Bool

Returns: a Bool indicating if the range was added or not.

Set the buffering-ranges array field in query. The current last start position of the array should be inferior to start.

addSchedulingMode

queryAddSchedulingMode Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_SCHEDULING type query Query

-> PadMode

mode: a PadMode

-> m () 

Add mode as one of the supported scheduling modes to query.

findAllocationMeta

queryFindAllocationMeta Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_ALLOCATION type query Query

-> GType

api: the metadata API

-> m (Bool, Word32)

Returns: True when api is in the list of metadata.

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.

getNAllocationMetas

queryGetNAllocationMetas Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_ALLOCATION type query Query

-> m Word32

Returns: the metadata API array size as a guint.

Retrieve the number of values currently stored in the meta API array of the query's structure.

getNAllocationParams

queryGetNAllocationParams Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_ALLOCATION type query Query

-> m Word32

Returns: the allocator 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.

getNAllocationPools

queryGetNAllocationPools Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_ALLOCATION type query Query

-> m Word32

Returns: the pool array size as a guint.

Retrieve the number of values currently stored in the pool array of the query's structure.

getNBufferingRanges

queryGetNBufferingRanges Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_BUFFERING type query Query

-> m Word32

Returns: the range array size as a guint.

Retrieve the number of values currently stored in the buffered-ranges array of the query's structure.

getNSchedulingModes

queryGetNSchedulingModes Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_SCHEDULING type query Query

-> m Word32

Returns: the scheduling mode array size as a guint.

Retrieve the number of values currently stored in the scheduling mode array of the query's structure.

getStructure

queryGetStructure Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> m (Maybe Structure)

Returns: the Structure of the query. The structure is still owned by the query and will therefore be freed when the query is unreffed.

Get the structure of a query.

hasSchedulingMode

queryHasSchedulingMode Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_SCHEDULING type query Query

-> PadMode

mode: the scheduling mode

-> m Bool

Returns: True when mode is in the list of scheduling modes.

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
'GI.Gst.Structs.Query.queryParseScheduling' have the seeking flag set (meaning
random access is supported, not only sequential pulls).

hasSchedulingModeWithFlags

queryHasSchedulingModeWithFlags Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_SCHEDULING type query Query

-> PadMode

mode: the scheduling mode

-> [SchedulingFlags]

flags: SchedulingFlags

-> m Bool

Returns: True when mode is in the list of scheduling modes and flags are compatible with query flags.

Check if query has scheduling mode set and flags is set in query scheduling flags.

newAcceptCaps

queryNewAcceptCaps Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Caps

caps: a fixed Caps

-> m Query

Returns: a new Query

Constructs a new query object for querying if caps are accepted.

Free-function: gst_query_unref()

newAllocation

queryNewAllocation Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Caps

caps: the negotiated caps

-> Bool

needPool: return a pool

-> m Query

Returns: a new Query

Constructs a new query object for querying the allocation properties.

Free-function: gst_query_unref()

newBitrate

queryNewBitrate Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Query

Returns: a new Query

Constructs a new query object for querying the bitrate.

Free-function: gst_query_unref()

Since: 1.16

newBuffering

queryNewBuffering Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Format

format: the default Format for the new query

-> m Query

Returns: a new Query

Constructs a new query object for querying the buffering status of a stream.

Free-function: gst_query_unref()

newCaps

queryNewCaps Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Caps

filter: a filter

-> m Query

Returns: a new Query

Constructs a new query object for querying the caps.

The CAPS query should return the allowable caps for a pad in the context of the element's state, its link to other elements, and the devices or files it has opened. These caps must be a subset of the pad template caps. In the NULL state with no links, the CAPS query should ideally return the same caps as the pad template. In rare circumstances, an object property can affect the caps returned by the CAPS query, but this is discouraged.

For most filters, the caps returned by CAPS query is directly affected by the allowed caps on other pads. For demuxers and decoders, the caps returned by the srcpad's getcaps function is directly related to the stream data. Again, the CAPS query should return the most specific caps it reasonably can, since this helps with autoplugging.

The filter is used to restrict the result caps, only the caps matching filter should be returned from the CAPS query. Specifying a filter might greatly reduce the amount of processing an element needs to do.

Free-function: gst_query_unref()

newContext

queryNewContext Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

contextType: Context type to query

-> m Query

Returns: a new Query

Constructs a new query object for querying the pipeline-local context.

Free-function: gst_query_unref()

Since: 1.2

newConvert

queryNewConvert Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Format

srcFormat: the source Format for the new query

-> Int64

value: the value to convert

-> Format

destFormat: the target Format

-> m Query

Returns: a Query

Constructs a new convert query object. Use gst_query_unref() when done with it. A convert query is used to ask for a conversion between one format and another.

Free-function: gst_query_unref()

newCustom

queryNewCustom Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> QueryType

type: the query type

-> Maybe Structure

structure: a structure for the query

-> m (Maybe Query)

Returns: a new Query

Constructs a new custom query object. Use gst_query_unref() when done with it.

Free-function: gst_query_unref()

newDrain

queryNewDrain Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Query

Returns: a new Query

Constructs a new query object for querying the drain state.

Free-function: gst_query_unref()

newDuration

queryNewDuration Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Format

format: the Format for this duration query

-> m Query

Returns: a new Query

Constructs a new stream duration query object to query in the given format. Use gst_query_unref() when done with it. A duration query will give the total length of the stream.

Free-function: gst_query_unref()

newFormats

queryNewFormats Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Query

Returns: a new Query

Constructs a new query object for querying formats of the stream.

Free-function: gst_query_unref()

newLatency

queryNewLatency Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Query

Returns: a Query

Constructs a new latency query object. Use gst_query_unref() when done with it. A latency query is usually performed by sinks to compensate for additional latency introduced by elements in the pipeline.

Free-function: gst_query_unref()

newPosition

queryNewPosition Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Format

format: the default Format for the new query

-> m Query

Returns: a new Query

Constructs a new query stream position query object. Use gst_query_unref() when done with it. A position query is used to query the current position of playback in the streams, in some format.

Free-function: gst_query_unref()

newScheduling

queryNewScheduling Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Query

Returns: a new Query

Constructs a new query object for querying the scheduling properties.

Free-function: gst_query_unref()

newSeeking

queryNewSeeking Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Format

format: the default Format for the new query

-> m Query

Returns: a new Query

Constructs a new query object for querying seeking properties of the stream.

Free-function: gst_query_unref()

newSegment

queryNewSegment Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Format

format: the Format for the new query

-> m Query

Returns: a new Query

Constructs a new segment query object. Use gst_query_unref() when done with it. A segment query is used to discover information about the currently configured segment for playback.

Free-function: gst_query_unref()

newUri

queryNewUri Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Query

Returns: a 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.

Free-function: gst_query_unref()

parseAcceptCaps

queryParseAcceptCaps Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: The query to parse

-> m Caps 

Get the caps from query. The caps remains valid as long as query remains valid.

parseAcceptCapsResult

queryParseAcceptCapsResult Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_ACCEPT_CAPS type query Query

-> m Bool 

Parse the result from query and store in result.

parseAllocation

queryParseAllocation Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> m (Caps, Bool) 

Parse an allocation query, writing the requested caps in caps and whether a pool is needed in needPool, if the respective parameters are non-Nothing.

Pool details can be retrieved using queryGetNAllocationPools and queryParseNthAllocationPool.

parseBitrate

queryParseBitrate Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_BITRATE type Query

-> m Word32 

Get the results of a bitrate query. See also querySetBitrate.

Since: 1.16

parseBufferingPercent

queryParseBufferingPercent Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: A valid Query of type GST_QUERY_BUFFERING.

-> m (Bool, Int32) 

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.

parseBufferingRange

queryParseBufferingRange Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_BUFFERING type query Query

-> m (Format, Int64, Int64, Int64) 

Parse an available query, writing the format into format, and other results into the passed parameters, if the respective parameters are non-Nothing

parseBufferingStats

queryParseBufferingStats Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: A valid Query of type GST_QUERY_BUFFERING.

-> m (BufferingMode, Int32, Int32, Int64) 

Extracts the buffering stats values from query.

parseCaps

queryParseCaps Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: The query to parse

-> m Caps 

Get the filter from the caps query. The caps remains valid as long as query remains valid.

parseCapsResult

queryParseCapsResult Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: The query to parse

-> m Caps 

Get the caps result from query. The caps remains valid as long as query remains valid.

parseContext

queryParseContext Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: The query to parse

-> m Context 

Get the context from the context query. The context remains valid as long as query remains valid.

Since: 1.2

parseContextType

queryParseContextType Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_CONTEXT type query

-> m (Bool, Text)

Returns: a Bool indicating if the parsing succeeded.

Parse a context type from an existing GST_QUERY_CONTEXT query.

Since: 1.2

parseConvert

queryParseConvert Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> m (Format, Int64, Format, Int64) 

Parse a convert query answer. Any of srcFormat, srcValue, destFormat, and destValue may be Nothing, in which case that value is omitted.

parseDuration

queryParseDuration Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> m (Format, Int64) 

Parse a duration query answer. Write the format of the duration into format, and the value into duration, if the respective variables are non-Nothing.

parseLatency

queryParseLatency Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> m (Bool, Word64, Word64) 

Parse a latency query answer.

parseNFormats

queryParseNFormats Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> m Word32 

Parse the number of formats in the formats query.

parseNthAllocationMeta

queryParseNthAllocationMeta Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_ALLOCATION type query Query

-> Word32

index: position in the metadata API array to read

-> m (GType, Structure)

Returns: a GType of the metadata API at index.

Parse an available query and get the metadata API at index of the metadata API array.

parseNthAllocationParam

queryParseNthAllocationParam Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_ALLOCATION type query Query

-> Word32

index: position in the allocator array to read

-> m (Allocator, AllocationParams) 

Parse an available query and get the allocator and its params at index of the allocator array.

parseNthAllocationPool

queryParseNthAllocationPool Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: A valid Query of type GST_QUERY_ALLOCATION.

-> Word32

index: index to parse

-> m (BufferPool, Word32, Word32, Word32) 

Get the pool parameters in query.

Unref pool with objectUnref when it's not needed any more.

parseNthBufferingRange

queryParseNthBufferingRange Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_BUFFERING type query Query

-> Word32

index: position in the buffered-ranges array to read

-> m (Bool, Int64, Int64)

Returns: a Bool indicating if the parsing succeeded.

Parse an available query and get the start and stop values stored at the index of the buffered ranges array.

parseNthFormat

queryParseNthFormat Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> Word32

nth: the nth format to retrieve.

-> m Format 

Parse the format query and retrieve the nth format from it into format. If the list contains less elements than nth, format will be set to GST_FORMAT_UNDEFINED.

parseNthSchedulingMode

queryParseNthSchedulingMode Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_SCHEDULING type query Query

-> Word32

index: position in the scheduling modes array to read

-> m PadMode

Returns: a PadMode of the scheduling mode at index.

Parse an available query and get the scheduling mode at index of the scheduling modes array.

parsePosition

queryParsePosition Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> m (Format, Int64) 

Parse a position query, writing the format into format, and the position into cur, if the respective parameters are non-Nothing.

parseScheduling

queryParseScheduling Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: A valid Query of type GST_QUERY_SCHEDULING.

-> m ([SchedulingFlags], Int32, Int32, Int32) 

Set the scheduling properties.

parseSeeking

queryParseSeeking Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_SEEKING type query Query

-> m (Format, Bool, Int64, Int64) 

Parse a seeking query, writing the format into format, and other results into the passed parameters, if the respective parameters are non-Nothing

parseSegment

queryParseSegment Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> m (Double, Format, Int64, Int64) 

Parse a segment query answer. Any of rate, format, startValue, and stopValue may be Nothing, which will cause this value to be omitted.

See querySetSegment for an explanation of the function arguments.

parseUri

queryParseUri Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> m Text 

Parse an URI query, writing the URI into uri as a newly allocated string, if the respective parameters are non-Nothing. Free the string with free after usage.

parseUriRedirection

queryParseUriRedirection Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> m Text 

Parse an URI query, writing the URI into uri as a newly allocated string, if the respective parameters are non-Nothing. Free the string with free after usage.

Since: 1.2

parseUriRedirectionPermanent

queryParseUriRedirectionPermanent Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> m Bool 

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.

Since: 1.4

removeNthAllocationMeta

queryRemoveNthAllocationMeta Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_ALLOCATION type query Query

-> Word32

index: position in the metadata API array to remove

-> m () 

Remove the metadata API at index of the metadata API array.

removeNthAllocationParam

queryRemoveNthAllocationParam Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_ALLOCATION type query Query

-> Word32

index: position in the allocation param array to remove

-> m () 

Remove the allocation param at index of the allocation param array.

Since: 1.2

removeNthAllocationPool

queryRemoveNthAllocationPool Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_ALLOCATION type query Query

-> Word32

index: position in the allocation pool array to remove

-> m () 

Remove the allocation pool at index of the allocation pool array.

Since: 1.2

setAcceptCapsResult

querySetAcceptCapsResult Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_ACCEPT_CAPS type query Query

-> Bool

result: the result to set

-> m () 

Set result as the result for the query.

setBitrate

querySetBitrate Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a GST_QUERY_BITRATE type Query

-> Word32

nominalBitrate: the nominal bitrate in bits per second

-> m () 

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).

Since: 1.16

setBufferingPercent

querySetBufferingPercent Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: A valid Query of type GST_QUERY_BUFFERING.

-> Bool

busy: if buffering is busy

-> Int32

percent: a buffering percent

-> m () 

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.

setBufferingRange

querySetBufferingRange Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> Format

format: the format to set for the start and stop values

-> Int64

start: the start to set

-> Int64

stop: the stop to set

-> Int64

estimatedTotal: estimated total amount of download time remaining in milliseconds

-> m () 

Set the available query result fields in query.

setBufferingStats

querySetBufferingStats Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: A valid Query of type GST_QUERY_BUFFERING.

-> BufferingMode

mode: a buffering mode

-> Int32

avgIn: the average input rate

-> Int32

avgOut: the average output rate

-> Int64

bufferingLeft: amount of buffering time left in milliseconds

-> m () 

Configures the buffering stats values in query.

setCapsResult

querySetCapsResult Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: The query to use

-> Caps

caps: A pointer to the caps

-> m () 

Set the caps result in query.

setContext

querySetContext Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query with query type GST_QUERY_CONTEXT

-> Context

context: the requested Context

-> m () 

Answer a context query by setting the requested context.

Since: 1.2

setConvert

querySetConvert Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> Format

srcFormat: the source Format

-> Int64

srcValue: the source value

-> Format

destFormat: the destination Format

-> Int64

destValue: the destination value

-> m () 

Answer a convert query by setting the requested values.

setDuration

querySetDuration Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> Format

format: the Format for the duration

-> Int64

duration: the duration of the stream

-> m () 

Answer a duration query by setting the requested value in the given format.

setFormatsv

querySetFormatsv Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> [Format]

formats: an array containing nFormats gstFormat values.

-> m () 

Set the formats query result fields in query. The number of formats passed in the formats array must be equal to nFormats.

setLatency

querySetLatency Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> Bool

live: if there is a live element upstream

-> Word64

minLatency: the minimal latency of the upstream elements

-> Word64

maxLatency: the maximal latency of the upstream elements

-> m () 

Answer a latency query by setting the requested values in the given format.

setNthAllocationParam

querySetNthAllocationParam Source #

Arguments

:: (HasCallStack, MonadIO m, IsAllocator a) 
=> Query

query: a GST_QUERY_ALLOCATION type query Query

-> Word32

index: position in the allocator array to set

-> Maybe a

allocator: new allocator to set

-> Maybe AllocationParams

params: parameters for the allocator

-> m () 

Parse an available query and get the allocator and its params at index of the allocator array.

setNthAllocationPool

querySetNthAllocationPool Source #

Arguments

:: (HasCallStack, MonadIO m, IsBufferPool a) 
=> Query

query: A valid Query of type GST_QUERY_ALLOCATION.

-> Word32

index: index to modify

-> Maybe a

pool: the BufferPool

-> Word32

size: the buffer size

-> Word32

minBuffers: the min buffers

-> Word32

maxBuffers: the max buffers

-> m () 

Set the pool parameters in query.

setPosition

querySetPosition Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query with query type GST_QUERY_POSITION

-> Format

format: the requested Format

-> Int64

cur: the position to set

-> m () 

Answer a position query by setting the requested value in the given format.

setScheduling

querySetScheduling Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: A valid Query of type GST_QUERY_SCHEDULING.

-> [SchedulingFlags]

flags: SchedulingFlags

-> Int32

minsize: the suggested minimum size of pull requests

-> Int32

maxsize: the suggested maximum size of pull requests

-> Int32

align: the suggested alignment of pull requests

-> m () 

Set the scheduling properties.

setSeeking

querySetSeeking Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> Format

format: the format to set for the segmentStart and segmentEnd values

-> Bool

seekable: the seekable flag to set

-> Int64

segmentStart: the segment_start to set

-> Int64

segmentEnd: the segment_end to set

-> m () 

Set the seeking query result fields in query.

setSegment

querySetSegment Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> Double

rate: the rate of the segment

-> Format

format: the Format of the segment values (startValue and stopValue)

-> Int64

startValue: the start value

-> Int64

stopValue: the stop value

-> m () 

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.

startValue and stopValue 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 startValue <= stopValue. rate will contain the playback rate. For negative rates, playback will actually happen from stopValue to startValue.

setUri

querySetUri Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query with query type GST_QUERY_URI

-> Text

uri: the URI to set

-> m () 

Answer a URI query by setting the requested URI.

setUriRedirection

querySetUriRedirection Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query with query type GST_QUERY_URI

-> Text

uri: the URI to set

-> m () 

Answer a URI query by setting the requested URI redirection.

Since: 1.2

setUriRedirectionPermanent

querySetUriRedirectionPermanent Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query with query type QueryTypeUri

-> Bool

permanent: whether the redirect is permanent or not

-> m () 

Answer a URI query by setting the requested URI redirection to permanent or not.

Since: 1.4

writableStructure

queryWritableStructure Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Query

query: a Query

-> m Structure

Returns: the Structure of the query. The structure is still owned by the query and will therefore be freed when the query is unreffed.

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.

Properties

miniObject

The parent MiniObject type

getQueryMiniObject :: MonadIO m => Query -> m MiniObject Source #

Get the value of the “mini_object” field. When overloading is enabled, this is equivalent to

get query #miniObject

type

getQueryType :: MonadIO m => Query -> m QueryType Source #

Get the value of the “type” field. When overloading is enabled, this is equivalent to

get query #type

setQueryType :: MonadIO m => Query -> QueryType -> m () Source #

Set the value of the “type” field. When overloading is enabled, this is equivalent to

set query [ #type := value ]