rtsp_server 0.0.3-universal-java → 0.0.4-universal-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 563ffb4ecc71a20f07d22317b648bc0f22e48cb5
4
- data.tar.gz: b204ab9a43a6c3f280ac5ca54a7eac0bc06dcd41
3
+ metadata.gz: c8464455a6f8c1a5620bdd8f05f83c4aa9bcf03a
4
+ data.tar.gz: a88f157ece57f6fb1aa770793133efb97a9c8c71
5
5
  SHA512:
6
- metadata.gz: 6a16432fb3f33c6aaff1f489de0ed6e0b1c4dd50edeb8263bc097e93f214def67ae3b7dca93f72d1ba90e9c45decec6aac270e5fa0d6f90713c139ca7b6d6e1d
7
- data.tar.gz: 43445fd3eba90f28ddf49cb5154263fbafacf8959ac14a8bb3c77b5d5b34ddbbc97c8c11cab7265d671e510cab154055803dc28b4491f9fa735e23bac40fa57e
6
+ metadata.gz: 701117fc4639fcad9eaa92ac6313c380a0de1460ae69b0a0069df609dd191d9df337ac6db60a65ad3c6e397e06c2f80347529359e3ac6c90b583e72a4408ce7c
7
+ data.tar.gz: 5e9d29de707b867ca7d9bbb1e73ac29e1f8eab8684d853d76c9d502752422f761a9e0326190087accabed553b0b0facd08cc393c5769a33f12424db623d0e4a5
data/lib/rtsp/common.rb CHANGED
@@ -62,7 +62,7 @@ module RTSP
62
62
  /client_port=(?<port>.*)-/ =~ transport
63
63
 
64
64
  if port.nil?
65
- log("Could not find client port associated with transport", :warn)
65
+ RTSP::Request.log("Could not find client port associated with transport", :warn)
66
66
  else
67
67
  "#{@remote_host}:#{port}"
68
68
  end
data/lib/rtsp/server.rb CHANGED
@@ -110,7 +110,7 @@ module RTSP
110
110
  remote_address = io.remote_address.ip_address
111
111
  /(?<action>.*) rtsp:\/\// =~ request_str
112
112
  request = RTSP::Request.new(request_str, remote_address)
113
- @agent[io] = request.user_agent
113
+ @agent[io] = request.user_agent rescue NoMethodError
114
114
  response, body = send(action.downcase.to_sym, request)
115
115
 
116
116
  add_headers(request, response, body)
@@ -292,8 +292,14 @@ module RTSP
292
292
  # @param [Fixnum] server_port Port on which the stream_server is streaming from.
293
293
  def generate_transport request, server_port, index=1
294
294
  port_specifier = 'client_port'
295
- transport = request.transport.split(port_specifier)
296
- transport[1] = port_specifier + transport[1]
295
+
296
+ if request.transport.include?(port_specifier)
297
+ transport = request.transport.split(port_specifier)
298
+ transport[1] = port_specifier + transport[1]
299
+ else
300
+ stream_port = RTSP::StreamServer.instance.source_port.first
301
+ transport = [request.transport + ';', "port=#{stream_port}-#{stream_port + 1}"]
302
+ end
297
303
 
298
304
  if request.transport.include?("unicast")
299
305
  transport[0] << "destination=#{request.remote_host};"
@@ -69,7 +69,7 @@ module RTSP
69
69
  # @param [Fixnum] index Stream index.
70
70
  # @return [Fixnum] The port the streamer will stream on.
71
71
  def setup_streamer(sid, transport_url, index=1, multicast=false)
72
- dest_ip, dest_port = transport_url.split ":"
72
+ dest_ip, dest_port = transport_url.split ":" unless multicast
73
73
 
74
74
  @rtcp_source_identifier ||= RTCP_SOURCE.pack("H*")
75
75
  local_port = multicast ? @source_port[index - 1] : free_port(true)
data/lib/rtsp/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module RTSP
2
2
  # rtsp version
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
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.3
4
+ version: 0.0.4
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: 2013-12-19 00:00:00.000000000 Z
12
+ date: 2013-12-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parslet