Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Back  Login

gst-duration-seek-position Diff - Ruby-GNOME2 Project Website

  • Added parts are displayed like this.
  • Deleted parts are displayed like this.

=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).

==Download
{{attach_anchor("duration.rb")}}

==Screenshot
{{image "duration-screenshot.png"}}

==Usage
$ ruby duration.rb AUDIO_FILE_NAME

==License
Ruby's

==Author
Marcin Lewandowski

{{br}}
===Changelog
:2010-03-27
Initial release