Element.queryDuration

bool queryDuration(gst.types.Format format, out long duration)

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.

Parameters

formatthe #GstFormat requested
durationA location in which to store the total duration, or null.

Returns

true if the query could be performed.