summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2007-07-27 11:04:55 +0000
committerEdward Hervey <bilboed@bilboed.com>2007-07-27 11:04:55 +0000
commitc2a593851eaf40620f2281816aa4fcaa8df5b9f4 (patch)
tree6f2bf11c70eb4aa0e9a713f6244cf5da4473cc2d /examples
parentc45722519b15d816ea11e85e81d1a3926eb7d0d5 (diff)
examples/gst-discover: Show duration of audio/video streams.
Original commit message from CVS: reviewed by: Edward Hervey <bilboed@bilboed.com> * examples/gst-discover: Show duration of audio/video streams. Specify units for values. Fixes #432521
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/gst-discover14
1 files changed, 8 insertions, 6 deletions
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)