Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login

gst-duration-seek-position

gst-duration-seek-position

Proof-of-concept Ruby/GStreamer application that could be used to query total duration of an audio file, current position and peform seeking.

Please note that in certain cases (e.g. some VBR encodings), total duration can change. In that case, GStreamer emits signal of type Gst::Message::Type::DURATION - this application doesn't handle that. In most (but not all!) cases, GStreamer would emit one at least once, but you cannot rely on that. Just perform querying after changing the state of the pipeline. Remember that you can query duration only after prerolling (in PAUSED or PLAYING state).

Usage

$ ruby duration.rb AUDIO_FILE_NAME

License

Ruby's

Author

Marcin Lewandowski


Changelog

2010-03-27

Initial release

Last modified:2011/06/11 10:14:02
Keyword(s):
References:[Samples]