rtsp_server 0.0.7-universal-java → 0.0.8-universal-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rtsp/server.rb +12 -11
- data/lib/rtsp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3260d0fff65469b2336598b496f72bbf96a64ff
|
4
|
+
data.tar.gz: 9b1595e49cbcdb36e517f90e651330baad013b6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 798345d644ff429f6063ea2eaa750e9579ee78c0f4dd5ea7831434ea86445385caa63250857aa131a47fee0f3ccb630647d60ae92e58b8733f1107b4f12d39b3
|
7
|
+
data.tar.gz: 28db53d04da0d532bb5156489eb229e5995191f50938e567362fb4165d8a4552f6d9aeb0cf4a75e47dc284cd706e5d3f912427fec0c652e79c57642e24fff108
|
data/lib/rtsp/server.rb
CHANGED
@@ -94,9 +94,9 @@ module RTSP
|
|
94
94
|
return(-1) if ex.is_a?(EOFError)
|
95
95
|
count += 1
|
96
96
|
sleep 0.001
|
97
|
-
|
98
|
-
|
99
|
-
retry if count <
|
97
|
+
sleep 1 if count > 10
|
98
|
+
count = 0 unless request_str == ""
|
99
|
+
retry if count < 70
|
100
100
|
return -1 if request_str == ""
|
101
101
|
end
|
102
102
|
|
@@ -170,7 +170,7 @@ module RTSP
|
|
170
170
|
response = []
|
171
171
|
transport = generate_transport(request, server_port, request.stream_index)
|
172
172
|
response << "Transport: #{transport.join}"
|
173
|
-
response << "Session: #{@session}"
|
173
|
+
response << "Session: #{@session}; timeout=60"
|
174
174
|
response << "\r\n"
|
175
175
|
|
176
176
|
[response]
|
@@ -182,11 +182,12 @@ module RTSP
|
|
182
182
|
# @return [Array<Array<String>>] Response headers and body.
|
183
183
|
def play(request)
|
184
184
|
RTSP::Server.log "Received PLAY request from #{request.remote_host}"
|
185
|
-
sid = request.session[:session_id]
|
185
|
+
sid = request.session[:session_id] rescue NoMethodError
|
186
186
|
response = []
|
187
187
|
response << "Session: #{sid}"
|
188
|
-
response << "Range: #{request.range}"
|
189
|
-
index = request.stream_index - 1
|
188
|
+
response << "Range: #{request.range}" rescue NoMethodError
|
189
|
+
index = request.stream_index - 1 rescue NoMethodError
|
190
|
+
index = 1 unless index.is_a?(Fixnum)
|
190
191
|
rtp_sequence, rtp_timestamp = @stream_server.parse_sequence_number(
|
191
192
|
@stream_server.source_ip[index], @stream_server.source_port[index])
|
192
193
|
@stream_server.start_streaming sid
|
@@ -236,7 +237,7 @@ module RTSP
|
|
236
237
|
# @return [Array<Array<String>>] Response headers and body.
|
237
238
|
def teardown(request)
|
238
239
|
RTSP::Server.log "Received TEARDOWN request from #{request.remote_host}"
|
239
|
-
sid = request.session[:session_id]
|
240
|
+
sid = request.session[:session_id] rescue NoMethodError
|
240
241
|
@stream_server.stop_streaming sid
|
241
242
|
response = []
|
242
243
|
response << "\r\n"
|
@@ -251,7 +252,7 @@ module RTSP
|
|
251
252
|
def pause(request)
|
252
253
|
RTSP::Server.log "Received PAUSE request from #{request.remote_host}"
|
253
254
|
response = []
|
254
|
-
sid = request.session[:session_id]
|
255
|
+
sid = request.session[:session_id] rescue NoMethodError
|
255
256
|
response << "Session: #{sid}"
|
256
257
|
response << "\r\n"
|
257
258
|
@stream_server.disconnect sid
|
@@ -273,8 +274,8 @@ module RTSP
|
|
273
274
|
result << "CSeq: #{request.cseq}"
|
274
275
|
|
275
276
|
unless body.nil?
|
276
|
-
result << "Content-Type: #{request.accept}"
|
277
|
-
result << "Content-Base: #{request.url}/"
|
277
|
+
result << "Content-Type: #{request.accept}" rescue NoMethodError
|
278
|
+
result << "Content-Base: #{request.url}/" rescue NoMethodError
|
278
279
|
result << "Content-Length: #{body.size}"
|
279
280
|
end
|
280
281
|
|
data/lib/rtsp/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rtsp_server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: universal-java
|
6
6
|
authors:
|
7
7
|
- Steve Loveless, Mike Kirby
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-02-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: parslet
|