GStreamer Base Plugins 0.10 Plugins Reference Manual | ||||
---|---|---|---|---|
"drop" guint64 : Read "duplicate" guint64 : Read "in" guint64 : Read "new-pref" gdouble : Read / Write "out" guint64 : Read "silent" gboolean : Read / Write "skip-to-first" gboolean : Read / Write
This element takes an incoming stream of timestamped video frames. It will produce a perfect stream that matches the source pad's framerate.
The correction is performed by dropping and duplicating frames, no fancy algorithm is used to interpolate frames (yet).
By default the element will simply negotiate the same framerate on its source and sink pad.
This operation is useful to link to elements that require a perfect stream. Typical examples are formats that do not store timestamps for video frames, but only store a framerate, like Ogg and AVI.
A conversion to a specific framerate can be forced by using filtered caps on the source pad.
The properties "in", "out", "duplicate" and "drop" can be read to obtain information about number of input frames, output frames, dropped frames (i.e. the number of unused input frames) and duplicated frames (i.e. the number of times an input frame was duplicated, beside being used normally).
An input stream that needs no adjustments will thus never have dropped or duplicated frames.
When the "silent" property is set to FALSE, a GObject property notification will be emitted whenever one of the "duplicate" or "drop" values changes. This can potentially cause performance degradation. Note that property notification will happen from the streaming thread, so applications should be prepared for this.
gst-launch -v filesrc location=videotestsrc.ogg ! oggdemux ! theoradec ! videorate ! video/x-raw-yuv,framerate=15/1 ! xvimagesink
gst-launch -v v4lsrc ! videorate ! video/x-raw-yuv,framerate=25/2 ! theoraenc ! oggmux ! filesink location=v4l.ogg
Last reviewed on 2006-09-02 (0.10.11)