rtsp 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
File without changes
@@ -1,3 +1,15 @@
1
+ === 0.2.0 / 2011-09-19
2
+
3
+ * Changed RTSP::Capturer init_*_server methods to take params in order to reduce
4
+ dependency on state of the Capturer object.
5
+ * Improvements:
6
+ * If RTSP::Capturer can't open port 9000, it increments by 1 and tries again,
7
+ 50 times, then raises.
8
+ * gh-4: Remove dependency on ore en lieu of standard gem commands.
9
+ * Participate in http://test.rubygems.org!
10
+ * Fixed bugs:
11
+ * gh-5: Fixed 'Bad file descriptor' bug when capturing to file.
12
+
1
13
  === 0.1.2 / 2011-04-14
2
14
 
3
15
  * Manually released; the gemspec that Ore created didn't install bin/rtsp_client.
data/Gemfile CHANGED
@@ -1,21 +1,3 @@
1
- require 'ore/specification'
2
-
3
1
  source :rubygems
4
2
 
5
3
  gemspec
6
- gem 'sdp', '~> 0.2.2'
7
-
8
- gem 'simplecov', '>= 0.4.0', :require => false, :group => :test
9
-
10
- group :development do
11
- gem 'bundler', '~> 1.0.0'
12
- gem 'code_statistics', '~> 0.2.13'
13
- gem 'cucumber'
14
- gem 'metric_fu', '>= 2.0.0'
15
- gem 'ore', '~> 0.7.2'
16
- gem 'ore-core', '~> 0.1.5'
17
- gem 'ore-tasks', '~> 0.5.0'
18
- gem 'rake', '~> 0.8.7'
19
- gem "rspec", '~> 2.5.0'
20
- gem 'yard', '~> 0.6.0'
21
- end
data/Rakefile CHANGED
@@ -1,4 +1,3 @@
1
- require 'rubygems' if RUBY_VERSION < "1.9.0"
2
1
  require 'rake'
3
2
 
4
3
  begin
@@ -17,15 +16,13 @@ rescue Bundler::BundlerError => e
17
16
  exit e.status_code
18
17
  end
19
18
 
20
- require 'ore/tasks'
21
- Ore::Tasks.new
22
-
23
19
  require 'rspec/core/rake_task'
24
20
  RSpec::Core::RakeTask.new(:spec) do |t|
25
21
  t.ruby_opts = "-w"
26
22
  t.rspec_opts = ['--format', 'documentation', '--color']
27
23
  end
28
24
  task :default => :spec
25
+ task :test => :spec # for `gem test`
29
26
 
30
27
  require 'yard'
31
28
  YARD::Rake::YardocTask.new do |t|
@@ -1,6 +1,5 @@
1
1
  require 'pathname'
2
-
3
- require File.expand_path(File.dirname(__FILE__) + '/rtsp/version')
2
+ require_relative 'rtsp/version'
4
3
 
5
4
  # This base module simply defines properties about the library. See child
6
5
  # classes/modules for the meat.
@@ -23,6 +23,9 @@ module RTSP
23
23
  # Maximum number of bytes to receive on the socket.
24
24
  MAX_BYTES_TO_RECEIVE = 3000
25
25
 
26
+ # Maximum times to retry using the next greatest port number.
27
+ MAX_PORT_NUMBER_RETRIES = 50
28
+
26
29
  # @param [File] rtp_file The file to capture the RTP data to.
27
30
  # @return [File]
28
31
  attr_accessor :rtp_file
@@ -55,11 +58,11 @@ module RTSP
55
58
  # @return [UDPSocket, TCPSocket]
56
59
  # @raise [RTSP::Error] If +@transport_protocol was not set to +:UDP+ or
57
60
  # +:TCP+.
58
- def init_server
59
- if @transport_protocol == :UDP
60
- server = init_udp_server
61
- elsif @transport_protocol == :tcp
62
- server = init_tcp_server
61
+ def init_server(protocol, port=9000)
62
+ if protocol == :UDP
63
+ server = init_udp_server(port)
64
+ elsif protocol == :TCP
65
+ server = init_tcp_server(port)
63
66
  else
64
67
  raise RTSP::Error, "Unknown streaming_protocol requested: #{@transport_protocol}"
65
68
  end
@@ -68,51 +71,98 @@ module RTSP
68
71
  end
69
72
 
70
73
  # Starts capturing data on +@rtp_port+ and writes it to +@rtp_file+.
74
+ # @todo Allow to yield received data.
71
75
  def run
72
- @server = init_server
76
+ @server = init_server(@transport_protocol, @rtp_port)
73
77
  @run = true
78
+ log "Starting #{self.class} on port #{@rtp_port}..."
74
79
 
75
- RTSP::Client.log "Starting #{self.class} on port #{@rtp_port}..."
76
80
  while @run
77
81
  data = @server.recvfrom(MAX_BYTES_TO_RECEIVE).first
78
- RTSP::Client.log "#{self.class} received data with size: #{data.size}"
82
+ log "received data with size: #{data.size}"
79
83
  @rtp_file.write data
80
84
  end
85
+
86
+ ensure
87
+ @server.close unless @server.nil?
81
88
  end
82
89
 
83
90
  # Returns if the run loop is in action.
84
91
  #
85
92
  # @return [Boolean] true if the run loop is running.
86
93
  def running?
87
- @run
94
+ @server.nil? ? @run : (@run || @server.closed?)
88
95
  end
89
96
 
90
97
  # Breaks out of the run loop.
91
98
  def stop
92
- RTSP::Client.log "Stopping #{self.class} on port #{@rtp_port}..."
99
+ log "Stopping #{self.class} on port #{@rtp_port}..."
93
100
  @run = false
94
- @server.close
101
+
102
+ until !running?
103
+ sleep 0.01
104
+ end
95
105
  end
96
106
 
97
107
  # Sets up to receive data on a UDP socket, using +@rtp_port+.
98
108
  #
109
+ # @param [Fixnum] port Port number to listen for RTP data on.
99
110
  # @return [UDPSocket]
100
- def init_udp_server
101
- server = UDPSocket.open
102
- server.bind('0.0.0.0', @rtp_port)
103
- RTSP::Client.log "UDP server setup to receive on port #{@rtp_port}"
111
+ def init_udp_server(port)
112
+ port_retries = 0
113
+
114
+ begin
115
+ server = UDPSocket.open
116
+ server.bind('0.0.0.0', port)
117
+ rescue Errno::EADDRINUSE
118
+ log "RTP port #{port} in use, trying #{port + 1}..."
119
+ port += 1
120
+ port_retries += 1
121
+ retry until port_retries == MAX_PORT_NUMBER_RETRIES + 1
122
+ port = 9000
123
+ raise
124
+ end
125
+
126
+ @rtp_port = port
127
+ log "UDP server setup to receive on port #{@rtp_port}"
104
128
 
105
129
  server
106
130
  end
107
131
 
108
132
  # Sets up to receive data on a TCP socket, using +@rtp_port+.
109
133
  #
134
+ # @param [Fixnum] port Port number to listen for RTP data on.
110
135
  # @return [TCPSocket]
111
- def init_tcp_server
112
- server = TCPSocket.new('0.0.0.0', @rtp_port)
113
- RTSP::Client.log "TCP server setup to receive on port #{@rtp_port}"
136
+ def init_tcp_server(port)
137
+ port_retries = 0
138
+
139
+ begin
140
+ server = TCPServer.new(port)
141
+ rescue Errno::EADDRINUSE
142
+ log "RTP port #{port} in use, trying #{port + 1}..."
143
+ port += 1
144
+ port_retries += 1
145
+ retry until port_retries == MAX_PORT_NUMBER_RETRIES + 1
146
+ port = 9000
147
+ raise
148
+ end
149
+
150
+ @rtp_port = port
151
+ log "TCP server setup to receive on port #{@rtp_port}"
114
152
 
115
153
  server
116
154
  end
155
+
156
+ # PRIVATES!
157
+ private
158
+
159
+ # Quick wrapper for when not using RTSP::Client (i.e. during tests).
160
+ #
161
+ # @param [String] message The String to log.
162
+ def log(message)
163
+ if defined? RTSP::Client
164
+ RTSP::Client.log "<#{self.class}> #{message}"
165
+ end
166
+ end
117
167
  end
118
168
  end
@@ -105,8 +105,11 @@ module RTSP
105
105
  def initialize(server_url=nil)
106
106
  Thread.abort_on_exception = true
107
107
 
108
- Struct.new("Connection", :server_url, :timeout, :socket,
108
+ unless defined? Struct::Connection
109
+ Struct.new("Connection", :server_url, :timeout, :socket,
109
110
  :do_capture, :interleave)
111
+ end
112
+
110
113
  @connection = Struct::Connection.new
111
114
  @capturer = RTSP::Capturer.new
112
115
 
@@ -1,4 +1,4 @@
1
1
  module RTSP
2
2
  # rtsp version
3
- VERSION = "0.1.2"
3
+ VERSION = "0.2.0"
4
4
  end
@@ -0,0 +1,228 @@
1
+ require_relative '../spec_helper'
2
+ require 'rtsp/capturer'
3
+
4
+ Thread.abort_on_exception = true
5
+
6
+ def use_udp_ports(range)
7
+ sockets = []
8
+
9
+ range.each do |port|
10
+ begin
11
+ socket = UDPSocket.open
12
+ socket.bind('0.0.0.0', port)
13
+ sockets << socket
14
+ rescue Errno::EADDRINUSE
15
+ # That's ok
16
+ end
17
+ end
18
+
19
+ sockets
20
+ end
21
+
22
+ describe RTSP::Capturer do
23
+ before do
24
+ if defined? RTSP::Client
25
+ RTSP::Client.log = false
26
+ end
27
+ end
28
+
29
+ describe "#initialize" do
30
+ context "with default parameters" do
31
+ before { @capturer = RTSP::Capturer.new }
32
+
33
+ it "uses UDP" do
34
+ @capturer.instance_variable_get(:@transport_protocol).should == :UDP
35
+ end
36
+
37
+ it "uses port 9000" do
38
+ @capturer.instance_variable_get(:@rtp_port).should == 9000
39
+ end
40
+
41
+ it "creates a new Tempfile" do
42
+ @capturer.instance_variable_get(:@rtp_file).should be_a Tempfile
43
+ end
44
+ end
45
+
46
+ context "non-default parameters" do
47
+ it "can use TCP" do
48
+ capturer = RTSP::Capturer.new(:TCP)
49
+ capturer.instance_variable_get(:@transport_protocol).should == :TCP
50
+ end
51
+
52
+ it "can take another port" do
53
+ capturer = RTSP::Capturer.new(:UDP, 12345)
54
+ capturer.instance_variable_get(:@rtp_port).should == 12345
55
+ end
56
+
57
+ it "can take an IO object" do
58
+ fd = IO.sysopen("/dev/null", "w")
59
+ io = IO.new(fd, 'w')
60
+ capturer = RTSP::Capturer.new(:UDP, 12345, io)
61
+ capturer.instance_variable_get(:@rtp_file).should be_a IO
62
+ end
63
+ end
64
+
65
+ it "isn't running" do
66
+ RTSP::Capturer.new.should_not be_running
67
+ end
68
+ end
69
+
70
+ describe "#init_server" do
71
+ after :each do
72
+ @capturer.stop
73
+ end
74
+
75
+ it "creates a UDPSocket when initialized with :UDP" do
76
+ @capturer = RTSP::Capturer.new
77
+ @capturer.init_server(:UDP).should be_a UDPSocket
78
+ end
79
+
80
+ it "creates a TCPSocket when initialized with :TCP" do
81
+ TCPServer.new('0.0.0.0', 9000)
82
+ @capturer = RTSP::Capturer.new
83
+ @capturer.init_server(:TCP).should be_a TCPSocket
84
+ end
85
+ end
86
+
87
+ describe "#run" do
88
+ context "default capturer settings" do
89
+ before do
90
+ @capturer = RTSP::Capturer.new
91
+ @receiver_thread = Thread.start(@capturer) { |capturer| capturer.run }
92
+
93
+ @client = UDPSocket.open
94
+ @sender_thread = Thread.start(@client) do |client|
95
+ loop do
96
+ client.send "x", 0, 'localhost', @capturer.rtp_port
97
+ end
98
+ end
99
+
100
+ sleep 0.1
101
+ end
102
+
103
+ after do
104
+ @sender_thread.exit
105
+ @receiver_thread.exit
106
+ end
107
+
108
+ it "gets access to a UDPSocket via @server" do
109
+ @capturer.instance_variable_get(:@server).should be_a UDPSocket
110
+ end
111
+
112
+ it "sets @run to true" do
113
+ @capturer.instance_variable_get(:@run).should be_true
114
+ end
115
+
116
+ it "receives data and writes to @rtp_file" do
117
+ @capturer.rtp_file.size.should > 0
118
+ end
119
+
120
+ it "closes the @server after issuing a #stop" do
121
+ @capturer.instance_variable_get(:@server).should_not be_closed
122
+ @capturer.stop
123
+ sleep 0.1
124
+ @capturer.instance_variable_get(:@server).should be_closed
125
+ end
126
+ end
127
+ end
128
+
129
+ describe "#running?" do
130
+ before { @capturer = RTSP::Capturer.new }
131
+
132
+ it "returns false before issuing #run" do
133
+ @capturer.running?.should be_false
134
+ end
135
+
136
+ it "returns true after running" do
137
+ cap_thread = Thread.new(@capturer) { |capturer| capturer.run }
138
+ sleep 0.1
139
+ @capturer.running?.should be_true
140
+ cap_thread.exit
141
+ end
142
+
143
+ it "returns false after running, then stopping" do
144
+ cap_thread = Thread.new(@capturer) { |capturer| capturer.run }
145
+ sleep 0.1
146
+ @capturer.running?.should be_true
147
+ @capturer.stop
148
+ @capturer.running?.should be_false
149
+ cap_thread.exit
150
+ end
151
+ end
152
+
153
+ describe "#stop" do
154
+ before { @capturer = RTSP::Capturer.new }
155
+
156
+ context "not running yet" do
157
+ it "sets @run to false" do
158
+ @capturer.stop
159
+ @capturer.instance_variable_get(:@run).should == false
160
+ end
161
+ end
162
+
163
+ context "running" do
164
+ it "sets @run to false" do
165
+ Thread.new(@capturer) { |c| c.run }
166
+ sleep 0.1
167
+ @capturer.stop
168
+ @capturer.instance_variable_get(:@run).should == false
169
+ end
170
+ end
171
+ end
172
+
173
+ describe "#init_udp_server" do
174
+ after :each do
175
+ unless @sockets.nil?
176
+ @sockets.each { |s| s.close }
177
+ end
178
+ end
179
+
180
+ it "returns a UDPSocket" do
181
+ capturer = RTSP::Capturer.new
182
+ server = capturer.init_udp_server(capturer.rtp_port)
183
+ server.should be_a UDPSocket
184
+ end
185
+
186
+ it "retries MAX_PORT_NUMBER_RETRIES to get a port" do
187
+ @sockets = use_udp_ports 9000...(9000 + RTSP::Capturer::MAX_PORT_NUMBER_RETRIES)
188
+ #@sockets.each { |s| puts "meow: #{s.addr[1]}" }
189
+
190
+ capturer = RTSP::Capturer.new
191
+ capturer.init_udp_server(capturer.rtp_port)
192
+ capturer.rtp_port.should == 9000 + RTSP::Capturer::MAX_PORT_NUMBER_RETRIES
193
+ end
194
+
195
+ context "when no available ports, it retries MAX_PORT_NUMBER_RETRIES times, then" do
196
+ before do
197
+ @sockets = use_udp_ports 9000..(9000 + RTSP::Capturer::MAX_PORT_NUMBER_RETRIES)
198
+
199
+ @capturer = RTSP::Capturer.new
200
+ end
201
+
202
+ it "retries MAX_PORT_NUMBER_RETRIES times then raises" do
203
+ expect { @capturer.init_udp_server(@capturer.rtp_port) }.to raise_error Errno::EADDRINUSE
204
+ end
205
+
206
+ it "sets @rtp_port back to 9000 after trying all" do
207
+ expect { @capturer.init_udp_server(@capturer.rtp_port) }.to raise_error Errno::EADDRINUSE
208
+ @capturer.rtp_port.should == 9000
209
+ end
210
+ end
211
+ end
212
+
213
+ describe "#init_tcp_server" do
214
+ before do
215
+ @capturer = RTSP::Capturer.new(:TCP)
216
+ @server = @capturer.init_tcp_server(@capturer.rtp_port)
217
+ end
218
+
219
+ it "returns a TCPSocket" do
220
+ @server.should be_a TCPSocket
221
+ end
222
+
223
+ it "uses port a port between 9000 and 9000 + MAX_PORT_NUMBER_RETRIES" do
224
+ @capturer.rtp_port.should >= 9000
225
+ @capturer.rtp_port.should <= 9000 + RTSP::Capturer::MAX_PORT_NUMBER_RETRIES
226
+ end
227
+ end
228
+ end
@@ -19,6 +19,11 @@ describe RTSP::Client do
19
19
  client
20
20
  end
21
21
 
22
+ before do
23
+ RTSP::Capturer.any_instance.stub(:run)
24
+ RTSP::Capturer.any_instance.stub(:stop)
25
+ end
26
+
22
27
  describe "#initialize" do
23
28
  before :each do
24
29
  mock_socket = double 'MockSocket'
@@ -10,11 +10,11 @@ describe "RTSP::Message" do
10
10
  it "raises if the header type isn't a Symbol" do
11
11
  message = RTSP::Message.options(@stream)
12
12
  lambda { message.header "hi", "everyone"
13
- }.should raise_error RTSP::Error
13
+ }.should raise_error RTSP::Error
14
14
  end
15
15
 
16
- it "adds a User-Agent header to every method" do
17
- RTSP::Message.instance_variable_get(:@message_types).each do |method|
16
+ RTSP::Message.instance_variable_get(:@message_types).each do |method|
17
+ it "adds a User-Agent header to the #{method} method" do
18
18
  message = RTSP::Message.send(method, @stream)
19
19
  message.to_s.should include "User-Agent: RubyRTSP/"
20
20
  end
@@ -56,7 +56,7 @@ describe "RTSP::Message" do
56
56
  it "with new sequence and accept values" do
57
57
  message = RTSP::Message.describe(@stream).with_headers({
58
58
  accept: 'application/sdp, application/rtsl',
59
- cseq: 2345 })
59
+ cseq: 2345 })
60
60
 
61
61
  message.to_s.should match /^DESCRIBE rtsp:/
62
62
  message.to_s.should include "DESCRIBE rtsp://1.2.3.4:554/stream1 RTSP/1.0\r\n"
@@ -81,7 +81,7 @@ describe "RTSP::Message" do
81
81
  it "with passed-in session and content type but no body" do
82
82
  message = RTSP::Message.announce(@stream).with_headers({
83
83
  session: 123456789,
84
- content_type: 'application/sdp, application/rtsl'})
84
+ content_type: 'application/sdp, application/rtsl' })
85
85
 
86
86
  message.to_s.should match /^ANNOUNCE rtsp:/
87
87
  message.to_s.should include "ANNOUNCE rtsp://1.2.3.4:554/stream1 RTSP/1.0\r\n"
@@ -95,7 +95,7 @@ describe "RTSP::Message" do
95
95
  message = RTSP::Message.announce(@stream).with_headers({
96
96
  session: 123456789,
97
97
  content_type: 'application/sdp, application/rtsl',
98
- cseq: 2345})
98
+ cseq: 2345 })
99
99
 
100
100
  message.to_s.should match /^ANNOUNCE rtsp:/
101
101
  message.to_s.should include "ANNOUNCE rtsp://1.2.3.4:554/stream1 RTSP/1.0\r\n"
@@ -347,7 +347,7 @@ describe "RTSP::Message" do
347
347
  context "#to_s turns a Hash into an String of header strings" do
348
348
  it "single header, non-hyphenated name, hash value" do
349
349
  message = RTSP::Message.play(@stream).with_headers({
350
- range: { npt: "0.000-" }
350
+ range: { npt: "0.000-" }
351
351
  })
352
352
 
353
353
  string = message.to_s
@@ -357,7 +357,7 @@ describe "RTSP::Message" do
357
357
 
358
358
  it "single header, hyphenated, non-hash value" do
359
359
  message = RTSP::Message.play(@stream).with_headers({
360
- :if_modified_since => "Sat, 29 Oct 1994 19:43:31 GMT"
360
+ :if_modified_since => "Sat, 29 Oct 1994 19:43:31 GMT"
361
361
  })
362
362
 
363
363
  string = message.to_s
@@ -367,8 +367,8 @@ describe "RTSP::Message" do
367
367
 
368
368
  it "two headers, mixed hyphenated, array & hash values" do
369
369
  message = RTSP::Message.redirect(@stream).with_headers({
370
- :cache_control => ["no-cache", { :max_age => 12345 }],
371
- :content_type => ['application/sdp', 'application/x-rtsp-mh']
370
+ :cache_control => ["no-cache", { :max_age => 12345 }],
371
+ :content_type => ['application/sdp', 'application/x-rtsp-mh']
372
372
  })
373
373
 
374
374
  string = message.to_s
@@ -21,7 +21,7 @@ describe RTSP do
21
21
  RTSP.const_defined?('VERSION').should be_true
22
22
  end
23
23
 
24
- it "has version 0.1.1" do
25
- RTSP::VERSION.should == '0.1.1'
24
+ it "has version 0.2.0" do
25
+ RTSP::VERSION.should == '0.2.0'
26
26
  end
27
27
  end
@@ -68,3 +68,14 @@ Server: DSS/5.5 (Build/489.7; Platform/Linux; Release/Darwin; )\r\n
68
68
  Cseq: \r\n
69
69
  Connection: Close\r\n
70
70
  \r\n}
71
+
72
+
73
+ # Define #describe so when RTSP::Message calls #method_missing, RSpec doesn't
74
+ # get in the way (and cause tests to fail).
75
+ module RTSP
76
+ class Message
77
+ def self.describe request_uri
78
+ self.new(:describe, request_uri)
79
+ end
80
+ end
81
+ end
@@ -120,4 +120,4 @@ response\r
120
120
  CSeq: #{@cseq}\r
121
121
  \r\n}
122
122
  end
123
- end
123
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rtsp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,9 +11,20 @@ bindir: bin
11
11
  cert_chain: []
12
12
  date: 2011-04-14 00:00:00.000000000Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: sdp
16
+ requirement: &70295097540840 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 0.2.2
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70295097540840
14
25
  - !ruby/object:Gem::Dependency
15
26
  name: bundler
16
- requirement: &2156826340 !ruby/object:Gem::Requirement
27
+ requirement: &70295097539860 !ruby/object:Gem::Requirement
17
28
  none: false
18
29
  requirements:
19
30
  - - ~>
@@ -21,10 +32,10 @@ dependencies:
21
32
  version: 1.0.0
22
33
  type: :development
23
34
  prerelease: false
24
- version_requirements: *2156826340
35
+ version_requirements: *70295097539860
25
36
  - !ruby/object:Gem::Dependency
26
37
  name: code_statistics
27
- requirement: &2156825760 !ruby/object:Gem::Requirement
38
+ requirement: &70295097539280 !ruby/object:Gem::Requirement
28
39
  none: false
29
40
  requirements:
30
41
  - - ~>
@@ -32,10 +43,10 @@ dependencies:
32
43
  version: 0.2.13
33
44
  type: :development
34
45
  prerelease: false
35
- version_requirements: *2156825760
46
+ version_requirements: *70295097539280
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: metric_fu
38
- requirement: &2156825000 !ruby/object:Gem::Requirement
49
+ requirement: &70295097538660 !ruby/object:Gem::Requirement
39
50
  none: false
40
51
  requirements:
41
52
  - - ! '>='
@@ -43,65 +54,21 @@ dependencies:
43
54
  version: 2.0.0
44
55
  type: :development
45
56
  prerelease: false
46
- version_requirements: *2156825000
47
- - !ruby/object:Gem::Dependency
48
- name: ore
49
- requirement: &2156797700 !ruby/object:Gem::Requirement
50
- none: false
51
- requirements:
52
- - - ~>
53
- - !ruby/object:Gem::Version
54
- version: 0.7.2
55
- type: :development
56
- prerelease: false
57
- version_requirements: *2156797700
58
- - !ruby/object:Gem::Dependency
59
- name: ore-core
60
- requirement: &2156797060 !ruby/object:Gem::Requirement
61
- none: false
62
- requirements:
63
- - - ~>
64
- - !ruby/object:Gem::Version
65
- version: 0.1.5
66
- type: :development
67
- prerelease: false
68
- version_requirements: *2156797060
69
- - !ruby/object:Gem::Dependency
70
- name: ore-tasks
71
- requirement: &2156796360 !ruby/object:Gem::Requirement
72
- none: false
73
- requirements:
74
- - - ~>
75
- - !ruby/object:Gem::Version
76
- version: 0.5.0
77
- type: :development
78
- prerelease: false
79
- version_requirements: *2156796360
80
- - !ruby/object:Gem::Dependency
81
- name: rake
82
- requirement: &2156795580 !ruby/object:Gem::Requirement
83
- none: false
84
- requirements:
85
- - - ~>
86
- - !ruby/object:Gem::Version
87
- version: 0.8.7
88
- type: :development
89
- prerelease: false
90
- version_requirements: *2156795580
57
+ version_requirements: *70295097538660
91
58
  - !ruby/object:Gem::Dependency
92
59
  name: rspec
93
- requirement: &2156794880 !ruby/object:Gem::Requirement
60
+ requirement: &70295097537880 !ruby/object:Gem::Requirement
94
61
  none: false
95
62
  requirements:
96
- - - ~>
63
+ - - ! '>='
97
64
  - !ruby/object:Gem::Version
98
65
  version: 2.5.0
99
66
  type: :development
100
67
  prerelease: false
101
- version_requirements: *2156794880
68
+ version_requirements: *70295097537880
102
69
  - !ruby/object:Gem::Dependency
103
70
  name: simplecov
104
- requirement: &2156794100 !ruby/object:Gem::Requirement
71
+ requirement: &70295097537360 !ruby/object:Gem::Requirement
105
72
  none: false
106
73
  requirements:
107
74
  - - ! '>='
@@ -109,36 +76,25 @@ dependencies:
109
76
  version: 0.4.0
110
77
  type: :development
111
78
  prerelease: false
112
- version_requirements: *2156794100
79
+ version_requirements: *70295097537360
113
80
  - !ruby/object:Gem::Dependency
114
81
  name: yard
115
- requirement: &2156793400 !ruby/object:Gem::Requirement
82
+ requirement: &70295097536880 !ruby/object:Gem::Requirement
116
83
  none: false
117
84
  requirements:
118
- - - ~>
85
+ - - ! '>='
119
86
  - !ruby/object:Gem::Version
120
87
  version: 0.6.0
121
88
  type: :development
122
89
  prerelease: false
123
- version_requirements: *2156793400
124
- - !ruby/object:Gem::Dependency
125
- name: sdp
126
- requirement: &2156792700 !ruby/object:Gem::Requirement
127
- none: false
128
- requirements:
129
- - - ~>
130
- - !ruby/object:Gem::Version
131
- version: 0.2.2
132
- type: :runtime
133
- prerelease: false
134
- version_requirements: *2156792700
135
- description: ! 'This library intends to follow the RTSP RFC document (2326) to allow
136
- for working with RTSP servers. At this point, it''s up to you to parse the data
137
- from a play call, but we''ll get there. ...eventually.
90
+ version_requirements: *70295097536880
91
+ description: ! 'This library intends to follow the RTSP RFC document (2326)
92
+
93
+ to allow for working with RTSP servers. At this point, it''s up to you to parse
138
94
 
139
- For more information
95
+ the data from a play call, but we''ll get there. ...eventually.
140
96
 
141
- RTSP: http://www.ietf.org/rfc/rfc2326.txt'
97
+ For more information see: http://www.ietf.org/rfc/rfc2326.txt'
142
98
  email:
143
99
  - steve.loveless@gmail.com, mkiby@gmail.com
144
100
  executables:
@@ -149,27 +105,7 @@ extra_rdoc_files:
149
105
  - LICENSE.rdoc
150
106
  - README.rdoc
151
107
  files:
152
- - .document
153
- - .infinity_test
154
- - .rspec
155
- - .yardopts
156
- - ChangeLog.rdoc
157
- - Gemfile
158
- - Gemfile.lock
159
- - LICENSE.rdoc
160
- - README.rdoc
161
- - Rakefile
162
- - bin/rtsp_client
163
- - features/client_changes_state.feature
164
- - features/client_requests.feature
165
- - features/control_streams_as_client.feature
166
- - features/step_definitions/client_changes_state_steps.rb
167
- - features/step_definitions/client_requests_steps.rb
168
- - features/step_definitions/control_streams_as_client_steps.rb
169
- - features/support/env.rb
170
- - features/support/hooks.rb
171
108
  - lib/ext/logger.rb
172
- - lib/rtsp.rb
173
109
  - lib/rtsp/capturer.rb
174
110
  - lib/rtsp/client.rb
175
111
  - lib/rtsp/error.rb
@@ -179,8 +115,18 @@ files:
179
115
  - lib/rtsp/response.rb
180
116
  - lib/rtsp/transport_parser.rb
181
117
  - lib/rtsp/version.rb
182
- - rtsp.gemspec
183
- - spec/.rspec
118
+ - lib/rtsp.rb
119
+ - bin/rtsp_client
120
+ - tasks/metrics.rake
121
+ - tasks/roodi_config.yml
122
+ - tasks/stats.rake
123
+ - .gemtest
124
+ - Gemfile
125
+ - ChangeLog.rdoc
126
+ - LICENSE.rdoc
127
+ - README.rdoc
128
+ - Rakefile
129
+ - spec/rtsp/capturer_spec.rb
184
130
  - spec/rtsp/client_spec.rb
185
131
  - spec/rtsp/helpers_spec.rb
186
132
  - spec/rtsp/message_spec.rb
@@ -189,9 +135,14 @@ files:
189
135
  - spec/rtsp_spec.rb
190
136
  - spec/spec_helper.rb
191
137
  - spec/support/fake_rtsp_server.rb
192
- - tasks/metrics.rake
193
- - tasks/roodi_config.yml
194
- - tasks/stats.rake
138
+ - features/client_changes_state.feature
139
+ - features/client_requests.feature
140
+ - features/control_streams_as_client.feature
141
+ - features/step_definitions/client_changes_state_steps.rb
142
+ - features/step_definitions/client_requests_steps.rb
143
+ - features/step_definitions/control_streams_as_client_steps.rb
144
+ - features/support/env.rb
145
+ - features/support/hooks.rb
195
146
  homepage: http://rubygems.org/gems/rtsp
196
147
  licenses:
197
148
  - MIT
@@ -213,16 +164,25 @@ required_rubygems_version: !ruby/object:Gem::Requirement
213
164
  version: 1.3.6
214
165
  requirements: []
215
166
  rubyforge_project: rtsp
216
- rubygems_version: 1.7.2
167
+ rubygems_version: 1.8.10
217
168
  signing_key:
218
169
  specification_version: 3
219
170
  summary: Library to allow RTSP streaming from RTSP-enabled devices.
220
171
  test_files:
221
- - spec/rtsp_spec.rb
172
+ - spec/rtsp/capturer_spec.rb
222
173
  - spec/rtsp/client_spec.rb
223
174
  - spec/rtsp/helpers_spec.rb
224
175
  - spec/rtsp/message_spec.rb
225
176
  - spec/rtsp/response_spec.rb
226
177
  - spec/rtsp/transport_parser_spec.rb
227
178
  - spec/rtsp_spec.rb
228
- has_rdoc:
179
+ - spec/spec_helper.rb
180
+ - spec/support/fake_rtsp_server.rb
181
+ - features/client_changes_state.feature
182
+ - features/client_requests.feature
183
+ - features/control_streams_as_client.feature
184
+ - features/step_definitions/client_changes_state_steps.rb
185
+ - features/step_definitions/client_requests_steps.rb
186
+ - features/step_definitions/control_streams_as_client_steps.rb
187
+ - features/support/env.rb
188
+ - features/support/hooks.rb
data/.document DELETED
@@ -1,3 +0,0 @@
1
- -
2
- ChangeLog.*
3
- LICENSE.rdoc
@@ -1,4 +0,0 @@
1
- infinity_test do
2
- use :rubies => %w(1.9.2), :test_framework => :rspec
3
- notifications :growl
4
- end
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --tty
data/.yardopts DELETED
@@ -1,4 +0,0 @@
1
- --title "rtsp Documentation"
2
- --protected
3
- --private
4
- --readme README.rdoc
@@ -1,134 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- rtsp (0.1.2)
5
- sdp (~> 0.2.2)
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- Saikuro (1.1.0)
11
- abstract (1.0.0)
12
- activesupport (3.0.6)
13
- arrayfields (4.7.4)
14
- blankslate (2.1.2.4)
15
- builder (3.0.0)
16
- chronic (0.3.0)
17
- churn (0.0.13)
18
- chronic (>= 0.2.3)
19
- hirb
20
- json_pure
21
- main
22
- ruby_parser (~> 2.0.4)
23
- sexp_processor (~> 3.0.3)
24
- code_statistics (0.2.13)
25
- colored (1.2)
26
- cucumber (0.10.2)
27
- builder (>= 2.1.2)
28
- diff-lcs (>= 1.1.2)
29
- gherkin (>= 2.3.5)
30
- json (>= 1.4.6)
31
- term-ansicolor (>= 1.0.5)
32
- diff-lcs (1.1.2)
33
- erubis (2.6.6)
34
- abstract (>= 1.0.0)
35
- fattr (2.2.0)
36
- flay (1.4.2)
37
- ruby_parser (~> 2.0)
38
- sexp_processor (~> 3.0)
39
- flog (2.5.1)
40
- ruby_parser (~> 2.0)
41
- sexp_processor (~> 3.0)
42
- gherkin (2.3.5)
43
- json (>= 1.4.6)
44
- gherkin (2.3.5-java)
45
- json (>= 1.4.6)
46
- haml (3.0.25)
47
- hirb (0.4.3)
48
- i18n (0.5.0)
49
- json (1.5.1)
50
- json (1.5.1-java)
51
- json_pure (1.5.1)
52
- main (4.4.0)
53
- arrayfields (>= 4.7.4)
54
- fattr (>= 2.1.0)
55
- metric_fu (2.1.1)
56
- Saikuro (>= 1.1.0)
57
- activesupport (>= 2.0.0)
58
- chronic (~> 0.3.0)
59
- churn (>= 0.0.7)
60
- flay (>= 1.2.1)
61
- flog (>= 2.3.0)
62
- rails_best_practices (>= 0.6.4)
63
- rcov (>= 0.8.3.3)
64
- reek (>= 1.2.6)
65
- roodi (>= 2.1.0)
66
- syntax
67
- ore (0.7.2)
68
- ore-core (>= 0.1.4, ~> 0.1)
69
- thor (~> 0.14.3)
70
- ore-core (0.1.5)
71
- ore-tasks (0.5.0)
72
- ore-core (>= 0.1.3, ~> 0.1)
73
- parslet (1.1.1)
74
- blankslate (~> 2.0)
75
- rails_best_practices (0.7.5)
76
- activesupport
77
- colored (~> 1.2)
78
- erubis (~> 2.6.6)
79
- haml (~> 3.0.18)
80
- i18n
81
- ruby-progressbar (~> 0.0.9)
82
- ruby_parser (~> 2.0.4)
83
- rake (0.8.7)
84
- rcov (0.9.9)
85
- rcov (0.9.9-java)
86
- reek (1.2.8)
87
- ruby2ruby (~> 1.2)
88
- ruby_parser (~> 2.0)
89
- sexp_processor (~> 3.0)
90
- roodi (2.1.0)
91
- ruby_parser
92
- rspec (2.5.0)
93
- rspec-core (~> 2.5.0)
94
- rspec-expectations (~> 2.5.0)
95
- rspec-mocks (~> 2.5.0)
96
- rspec-core (2.5.1)
97
- rspec-expectations (2.5.0)
98
- diff-lcs (~> 1.1.2)
99
- rspec-mocks (2.5.0)
100
- ruby-progressbar (0.0.9)
101
- ruby2ruby (1.2.5)
102
- ruby_parser (~> 2.0)
103
- sexp_processor (~> 3.0)
104
- ruby_parser (2.0.6)
105
- sexp_processor (~> 3.0)
106
- sdp (0.2.2)
107
- parslet (~> 1.1.0)
108
- sexp_processor (3.0.5)
109
- simplecov (0.4.2)
110
- simplecov-html (~> 0.4.4)
111
- simplecov-html (0.4.4)
112
- syntax (1.0.0)
113
- term-ansicolor (1.0.5)
114
- thor (0.14.6)
115
- yard (0.6.8)
116
-
117
- PLATFORMS
118
- java
119
- ruby
120
-
121
- DEPENDENCIES
122
- bundler (~> 1.0.0)
123
- code_statistics (~> 0.2.13)
124
- cucumber
125
- metric_fu (>= 2.0.0)
126
- ore (~> 0.7.2)
127
- ore-core (~> 0.1.5)
128
- ore-tasks (~> 0.5.0)
129
- rake (~> 0.8.7)
130
- rspec (~> 2.5.0)
131
- rtsp!
132
- sdp (~> 0.2.2)
133
- simplecov (>= 0.4.0)
134
- yard (~> 0.6.0)
@@ -1,127 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- lib = File.expand_path('lib/', File.dirname(__FILE__))
3
- $:.unshift lib unless $:.include?(lib)
4
-
5
- require 'rtsp/version'
6
-
7
- Gem::Specification.new do |s|
8
- s.name = "rtsp"
9
- s.version = RTSP::VERSION
10
-
11
- s.required_rubygems_version = Gem::Requirement.new(">= 1.3.6") if s.respond_to? :required_rubygems_version=
12
- s.authors = ["Steve Loveless, Mike Kirby"]
13
- s.date = %q{2011-04-14}
14
- s.description = %q{This library intends to follow the RTSP RFC document (2326) to allow for working with RTSP servers. At this point, it's up to you to parse the data from a play call, but we'll get there. ...eventually.
15
- For more information
16
- RTSP: http://www.ietf.org/rfc/rfc2326.txt}
17
- s.email = ["steve.loveless@gmail.com, mkiby@gmail.com"]
18
- s.executables = ["rtsp_client"]
19
- s.extra_rdoc_files = [
20
- "ChangeLog.rdoc",
21
- "LICENSE.rdoc",
22
- "README.rdoc"
23
- ]
24
- s.files = [
25
- ".document",
26
- ".infinity_test",
27
- ".rspec",
28
- ".yardopts",
29
- "ChangeLog.rdoc",
30
- "Gemfile",
31
- "Gemfile.lock",
32
- "LICENSE.rdoc",
33
- "README.rdoc",
34
- "Rakefile",
35
- "bin/rtsp_client",
36
- "features/client_changes_state.feature",
37
- "features/client_requests.feature",
38
- "features/control_streams_as_client.feature",
39
- "features/step_definitions/client_changes_state_steps.rb",
40
- "features/step_definitions/client_requests_steps.rb",
41
- "features/step_definitions/control_streams_as_client_steps.rb",
42
- "features/support/env.rb",
43
- "features/support/hooks.rb",
44
- "lib/ext/logger.rb",
45
- "lib/rtsp.rb",
46
- "lib/rtsp/capturer.rb",
47
- "lib/rtsp/client.rb",
48
- "lib/rtsp/error.rb",
49
- "lib/rtsp/global.rb",
50
- "lib/rtsp/helpers.rb",
51
- "lib/rtsp/message.rb",
52
- "lib/rtsp/response.rb",
53
- "lib/rtsp/transport_parser.rb",
54
- "lib/rtsp/version.rb",
55
- "rtsp.gemspec",
56
- "spec/.rspec",
57
- "spec/rtsp/client_spec.rb",
58
- "spec/rtsp/helpers_spec.rb",
59
- "spec/rtsp/message_spec.rb",
60
- "spec/rtsp/response_spec.rb",
61
- "spec/rtsp/transport_parser_spec.rb",
62
- "spec/rtsp_spec.rb",
63
- "spec/spec_helper.rb",
64
- "spec/support/fake_rtsp_server.rb",
65
- "tasks/metrics.rake",
66
- "tasks/roodi_config.yml",
67
- "tasks/stats.rake"
68
- ]
69
- s.homepage = %q{http://rubygems.org/gems/rtsp}
70
- s.licenses = ["MIT"]
71
- s.require_paths = ["lib"]
72
- s.rubyforge_project = %q{rtsp}
73
- s.rubygems_version = %q{1.7.2}
74
- s.summary = %q{Library to allow RTSP streaming from RTSP-enabled devices.}
75
- s.test_files = [
76
- "spec/rtsp_spec.rb",
77
- "spec/rtsp/client_spec.rb",
78
- "spec/rtsp/helpers_spec.rb",
79
- "spec/rtsp/message_spec.rb",
80
- "spec/rtsp/response_spec.rb",
81
- "spec/rtsp/transport_parser_spec.rb",
82
- "spec/rtsp_spec.rb"
83
- ]
84
-
85
- if s.respond_to? :specification_version then
86
- s.specification_version = 3
87
-
88
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
89
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
90
- s.add_development_dependency(%q<code_statistics>, ["~> 0.2.13"])
91
- s.add_development_dependency(%q<metric_fu>, [">= 2.0.0"])
92
- s.add_development_dependency(%q<ore>, ["~> 0.7.2"])
93
- s.add_development_dependency(%q<ore-core>, ["~> 0.1.5"])
94
- s.add_development_dependency(%q<ore-tasks>, ["~> 0.5.0"])
95
- s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
96
- s.add_development_dependency(%q<rspec>, ["~> 2.5.0"])
97
- s.add_development_dependency(%q<simplecov>, [">= 0.4.0"])
98
- s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
99
- s.add_runtime_dependency(%q<sdp>, ["~> 0.2.2"])
100
- else
101
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
102
- s.add_dependency(%q<code_statistics>, ["~> 0.2.13"])
103
- s.add_dependency(%q<metric_fu>, [">= 2.0.0"])
104
- s.add_dependency(%q<ore>, ["~> 0.7.2"])
105
- s.add_dependency(%q<ore-core>, ["~> 0.1.5"])
106
- s.add_dependency(%q<ore-tasks>, ["~> 0.5.0"])
107
- s.add_dependency(%q<rake>, ["~> 0.8.7"])
108
- s.add_dependency(%q<rspec>, ["~> 2.5.0"])
109
- s.add_dependency(%q<simplecov>, [">= 0.4.0"])
110
- s.add_dependency(%q<yard>, ["~> 0.6.0"])
111
- s.add_dependency(%q<sdp>, ["~> 0.2.2"])
112
- end
113
- else
114
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
115
- s.add_dependency(%q<code_statistics>, ["~> 0.2.13"])
116
- s.add_dependency(%q<metric_fu>, [">= 2.0.0"])
117
- s.add_dependency(%q<ore>, ["~> 0.7.2"])
118
- s.add_dependency(%q<ore-core>, ["~> 0.1.5"])
119
- s.add_dependency(%q<ore-tasks>, ["~> 0.5.0"])
120
- s.add_dependency(%q<rake>, ["~> 0.8.7"])
121
- s.add_dependency(%q<rspec>, ["~> 2.5.0"])
122
- s.add_dependency(%q<simplecov>, [">= 0.4.0"])
123
- s.add_dependency(%q<yard>, ["~> 0.6.0"])
124
- s.add_dependency(%q<sdp>, ["~> 0.2.2"])
125
- end
126
- end
127
-
@@ -1 +0,0 @@
1
- --format documentation --color