Documentation ¶
Overview ¶
This example demonstrates how to use GStreamer's query functionality.
These are a way to query information from either elements or pads. Such information could for example be the current position within the stream (i.e. the playing time). Queries can traverse the pipeline (both up and downstream). This functionality is essential, since most queries can only answered by specific elements in a pipeline (such as the stream's duration, which often can only be answered by the demuxer). Since gstreamer has many elements that itself contain other elements that we don't know of, we can simply send a query for the duration into the pipeline and the query is passed along until an element feels capable of answering. For convenience, the API has a set of pre-defined queries, but also allows custom queries (which can be defined and used by your own elements).