Top |
Object Hierarchy
GObject ╰── GInitiallyUnowned ╰── GstObject ╰── GstElement ╰── GstBaseTransform ╰── GstProgressReport
Description
The progressreport element can be put into a pipeline to report progress, which is done by doing upstream duration and position queries in regular (real-time) intervals. Both the interval and the prefered query format can be specified via the “update-freq” and the “format” property.
Element messages containing a "progress" structure are posted on the bus whenever progress has been queried (since gst-plugins-good 0.10.6 only).
Since the element was originally designed for debugging purposes, it will
by default also print information about the current progress to the
terminal. This can be prevented by setting the “silent”
property to TRUE
.
This element is most useful in transcoding pipelines or other situations where just querying the pipeline might not lead to the wanted result. For progress in TIME format, the element is best placed in a 'raw stream' section of the pipeline (or after any demuxers/decoders/parsers).
Three more things should be pointed out: firstly, the element will only query progress when data flow happens. If data flow is stalled for some reason, no progress messages will be posted. Secondly, there are other elements (like qtdemux, for example) that may also post "progress" element messages on the bus. Applications should check the source of any element messages they receive, if needed. Finally, applications should not take action on receiving notification of progress being 100%, they should only take action when they receive an EOS message (since the progress reported is in reference to an internal point of a pipeline and not the pipeline as a whole).
Example launch line
1 |
gst-launch-1.0 -m filesrc location=foo.ogg ! decodebin ! progressreport update-freq=1 ! audioconvert ! audioresample ! autoaudiosink |
1 |
gst-launch-1.0 -m audiotestsrc ! progressreport update-freq=1 ! audioconvert ! autoaudiosink |
Synopsis
Property Details
The “silent”
property
“silent” gboolean
Do not print output to stdout.
Flags: Read / Write
Default value: FALSE
The “update-freq”
property
“update-freq” gint
Number of seconds between reports when data is flowing.
Flags: Read / Write
Allowed values: >= 1
Default value: 5
The “format”
property
“format” gchar *
Format to use for the querying.
Flags: Read / Write
Default value: "auto"
The “do-query”
property
“do-query” gboolean
Use a query instead of buffer metadata to determine stream position.
Flags: Read / Write
Default value: TRUE