Element.queryDuration

Queries an element (usually top-level pipeline or playbin element) for the total stream duration in nanoseconds. This query will only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING state). The application will receive an ASYNC_DONE message on the pipeline bus when that is the case. If the duration changes for some reason, you will get a DURATION_CHANGED message on the pipeline bus, in which case you should re-query the duration using this function.

  1. long queryDuration()
  2. int queryDuration(GstFormat format, long duration)
    class Element
    int
    queryDuration

Parameters

format GstFormat

the GstFormat requested

duration long

A location in which to store the total duration, or NULL. out[allow-none]

Return Value

Type: int

TRUE if the query could be performed.

Meta