bin/rtsp_client in rtsp-0.1.0 vs bin/rtsp_client in rtsp-0.1.1

- old
+ new

@@ -1,12 +1,9 @@ #!/usr/bin/env ruby -require 'rubygems' require 'tempfile' require 'optparse' - -$:.unshift File.expand_path(File.dirname(__FILE__) + '/../lib/') require 'rtsp/client' optparse = OptionParser.new do |opts| opts.banner = "Usage: #{__FILE__} [options] url" @@ -24,11 +21,11 @@ puts "Must pass in a URL." exit end rtsp_client = RTSP::Client.new(url) - p rtsp_client.describe.body.inspect + puts rtsp_client.describe.body.inspect exit end #---------------------------------------------------------------------------- # Show available tracks @@ -45,11 +42,11 @@ exit end #---------------------------------------------------------------------------- # Stream - opts.on('--stream [URL]', "Show available tracks from the given URL.") do |url| + opts.on('--stream [URL]', "Pull the first media stream from the given URL.") do |url| if url.nil? puts "Must pass in a URL." exit end @@ -109,9 +106,16 @@ end rescue RTSP::Error => ex puts ex.backtrace puts ex.message end + end + + #---------------------------------------------------------------------------- + # Help + opts.on('--version', "The version of the Ruby RTSP gem used for this.") do + puts RTSP::VERSION + exit end #---------------------------------------------------------------------------- # Help opts.on('-h', '--help', "You're looking at it.") do