From c2a593851eaf40620f2281816aa4fcaa8df5b9f4 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 27 Jul 2007 11:04:55 +0000 Subject: [PATCH] examples/gst-discover: Show duration of audio/video streams. Original commit message from CVS: reviewed by: Edward Hervey * examples/gst-discover: Show duration of audio/video streams. Specify units for values. Fixes #432521 --- ChangeLog | 8 ++++++++ examples/gst-discover | 14 ++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0d1c0e1..6bd5c5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-07-27 Aidan Delaney + + reviewed by: Edward Hervey + * examples/gst-discover: + Show duration of audio/video streams. + Specify units for values. + Fixes #432521 + 2007-07-20 Stefan Kost * gst/gst-disable-loadsave.ignore: diff --git a/examples/gst-discover b/examples/gst-discover index 13793a2..94c448f 100755 --- a/examples/gst-discover +++ b/examples/gst-discover @@ -42,17 +42,19 @@ def succeed(d): pp('has video', d.is_video) if d.is_video: pp('video caps', d.videocaps) - pp('video width', d.videowidth) - pp('video height', d.videoheight) - pp('framerate', '%s/%s' % (d.videorate.num, d.videorate.denom)) + pp('video width (pixels)', d.videowidth) + pp('video height (pixels)', d.videoheight) + pp('video length (ms)', d.videolength / gst.MSECOND) + pp('framerate (fps)', '%s/%s' % (d.videorate.num, d.videorate.denom)) pp('has audio', d.is_audio) if d.is_audio: pp('audio caps', d.audiocaps) pp('audio format', d.audiofloat and 'floating-point' or 'integer') - pp('sample rate', d.audiorate) - pp('sample width', d.audiowidth) - pp('sample depth', d.audiodepth) + pp('sample rate (Hz)', d.audiorate) + pp('sample width (bits)', d.audiowidth) + pp('sample depth (bits)', d.audiodepth) + pp('audio length (ms)', d.audiolength / gst.MSECOND) pp('audio channels', d.audiochannels) sys.exit(0) -- 2.7.4