rtsp 0.0.1.alpha → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +3 -0
- data/.infinity_test +1 -1
- data/.yardopts +4 -0
- data/ChangeLog.rdoc +9 -0
- data/Gemfile +15 -6
- data/Gemfile.lock +78 -40
- data/LICENSE.rdoc +20 -0
- data/PostInstall.txt +0 -3
- data/README.rdoc +85 -36
- data/Rakefile +33 -49
- data/bin/rtsp_client +129 -0
- data/features/client_changes_state.feature +58 -0
- data/features/client_requests.feature +27 -0
- data/features/control_streams_as_client.feature +26 -0
- data/features/step_definitions/client_changes_state_steps.rb +46 -0
- data/features/step_definitions/client_requests_steps.rb +74 -0
- data/features/step_definitions/control_streams_as_client_steps.rb +34 -0
- data/features/support/env.rb +31 -29
- data/features/support/hooks.rb +3 -0
- data/gemspec.yml +30 -0
- data/lib/ext/logger.rb +8 -0
- data/lib/rtsp.rb +3 -6
- data/lib/rtsp/capturer.rb +105 -0
- data/lib/rtsp/client.rb +446 -204
- data/lib/rtsp/error.rb +6 -0
- data/lib/rtsp/global.rb +63 -0
- data/lib/rtsp/helpers.rb +28 -0
- data/lib/rtsp/message.rb +270 -0
- data/lib/rtsp/response.rb +89 -29
- data/lib/rtsp/transport_parser.rb +64 -0
- data/lib/rtsp/version.rb +4 -0
- data/nsm_test.rb +26 -0
- data/rtsp.gemspec +284 -0
- data/sarix_test.rb +23 -0
- data/soma_test.rb +39 -0
- data/spec/rtsp/client_spec.rb +302 -27
- data/spec/rtsp/helpers_spec.rb +53 -0
- data/spec/rtsp/message_spec.rb +420 -0
- data/spec/rtsp/response_spec.rb +144 -58
- data/spec/rtsp/transport_parser_spec.rb +54 -0
- data/spec/rtsp_spec.rb +3 -3
- data/spec/spec_helper.rb +66 -7
- data/spec/support/fake_rtsp_server.rb +123 -0
- data/tasks/metrics.rake +27 -0
- data/tasks/roodi_config.yml +14 -0
- data/tasks/stats.rake +12 -0
- metadata +174 -183
- data/.autotest +0 -23
- data/History.txt +0 -4
- data/Manifest.txt +0 -26
- data/bin/rtsp +0 -121
- data/features/step_definitions/stream_steps.rb +0 -50
- data/features/stream.feature +0 -17
- data/features/support/common.rb +0 -1
- data/features/support/world.rb +0 -1
- data/lib/rtsp/request_messages.rb +0 -104
- data/lib/rtsp/status_code.rb +0 -7
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'parslet'
|
2
|
+
|
3
|
+
module RTSP
|
4
|
+
|
5
|
+
# Used for parsing the Transport header--mainly as the response from the
|
6
|
+
# SETUP request. The values from this are used to determine what to use for
|
7
|
+
# other requests.
|
8
|
+
class TransportParser < Parslet::Parser
|
9
|
+
rule(:transport_specifier) do
|
10
|
+
match('[A-Z]').repeat(3).as(:streaming_protocol) >> forward_slash >>
|
11
|
+
match('[A-Z]').repeat(3).as(:profile) >>
|
12
|
+
(forward_slash >> match('[A-Z]').repeat(3).as(:transport_protocol)).maybe
|
13
|
+
end
|
14
|
+
|
15
|
+
rule(:broadcast_type) do
|
16
|
+
str('unicast')
|
17
|
+
end
|
18
|
+
|
19
|
+
rule(:destination) do
|
20
|
+
str('destination=') >> ip_address
|
21
|
+
end
|
22
|
+
rule(:source) do
|
23
|
+
str('source=') >> ip_address
|
24
|
+
end
|
25
|
+
|
26
|
+
rule(:client_port) do
|
27
|
+
str('client_port=') >> number.as(:rtp) >> dash >> number.as(:rtcp)
|
28
|
+
end
|
29
|
+
|
30
|
+
rule(:server_port) do
|
31
|
+
str('server_port=') >> number.as(:rtp) >> dash >> number.as(:rtcp)
|
32
|
+
end
|
33
|
+
|
34
|
+
rule(:interleaved) do
|
35
|
+
str('interleaved=') >> number.as(:rtp_channel) >> dash >>
|
36
|
+
number.as(:rtcp_channel)
|
37
|
+
end
|
38
|
+
|
39
|
+
rule(:ip_address) do
|
40
|
+
match('[\d]').repeat(1,3) >> str('.') >>
|
41
|
+
match('[\d]').repeat(1,3) >> str('.') >>
|
42
|
+
match('[\d]').repeat(1,3) >> str('.') >>
|
43
|
+
match('[\d]').repeat(1,3)
|
44
|
+
end
|
45
|
+
|
46
|
+
rule(:number) { match('[\d]').repeat }
|
47
|
+
rule(:forward_slash) { match('[/]') }
|
48
|
+
rule(:semi_colon) { match('[;]') }
|
49
|
+
rule(:dash) { match('[-]') }
|
50
|
+
|
51
|
+
rule(:header_field) do
|
52
|
+
transport_specifier >>
|
53
|
+
(semi_colon >> broadcast_type.as(:broadcast_type)).maybe >>
|
54
|
+
(semi_colon >> destination.as(:destination)).maybe >>
|
55
|
+
(semi_colon >> source.as(:source)).maybe >>
|
56
|
+
(semi_colon >> client_port.as(:client_port)).maybe >>
|
57
|
+
(semi_colon >> server_port.as(:server_port)).maybe >>
|
58
|
+
(semi_colon >> interleaved.as(:interleaved)).maybe
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
root :header_field
|
63
|
+
end
|
64
|
+
end
|
data/lib/rtsp/version.rb
ADDED
data/nsm_test.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require './lib/rtsp/client'
|
2
|
+
|
3
|
+
#url = "rtsp://10.221.222.210/?deviceid=uuid:100330fe-5d3e-4a5e-98c7-0000a6504b8c-Camera-1"
|
4
|
+
url = "rtsp://10.221.222.12/?deviceid=uuid:0ed8f1e9-0ce2-987c-4649-db3ae7aa3a04"
|
5
|
+
|
6
|
+
cap_file = File.new("nsm_cap.rtsp", "wb")
|
7
|
+
r = RTSP::Client.new url
|
8
|
+
r.capturer.media_file = cap_file
|
9
|
+
|
10
|
+
r.options
|
11
|
+
r.describe
|
12
|
+
|
13
|
+
media_track = r.media_control_tracks.first
|
14
|
+
puts "media track: #{media_track}"
|
15
|
+
|
16
|
+
aggregate_track = r.aggregate_control_track
|
17
|
+
puts "aggregate track: #{aggregate_track}"
|
18
|
+
|
19
|
+
r.setup media_track
|
20
|
+
r.play aggregate_track
|
21
|
+
sleep 2
|
22
|
+
r.pause aggregate_track
|
23
|
+
sleep 2
|
24
|
+
r.play aggregate_track
|
25
|
+
sleep 2
|
26
|
+
r.teardown aggregate_track
|
data/rtsp.gemspec
ADDED
@@ -0,0 +1,284 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{rtsp}
|
8
|
+
s.version = "0.1.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 1.3.6") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Steve Loveless, Mike Kirby"]
|
12
|
+
s.date = %q{2011-04-12}
|
13
|
+
s.default_executable = %q{rtsp_client}
|
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
|
+
"PostInstall.txt",
|
34
|
+
"README.rdoc",
|
35
|
+
"Rakefile",
|
36
|
+
"bin/rtsp_client",
|
37
|
+
"features/client_changes_state.feature",
|
38
|
+
"features/client_requests.feature",
|
39
|
+
"features/control_streams_as_client.feature",
|
40
|
+
"features/step_definitions/client_changes_state_steps.rb",
|
41
|
+
"features/step_definitions/client_requests_steps.rb",
|
42
|
+
"features/step_definitions/control_streams_as_client_steps.rb",
|
43
|
+
"features/support/env.rb",
|
44
|
+
"features/support/hooks.rb",
|
45
|
+
"gemspec.yml",
|
46
|
+
"lib/ext/logger.rb",
|
47
|
+
"lib/rtsp.rb",
|
48
|
+
"lib/rtsp/capturer.rb",
|
49
|
+
"lib/rtsp/client.rb",
|
50
|
+
"lib/rtsp/error.rb",
|
51
|
+
"lib/rtsp/global.rb",
|
52
|
+
"lib/rtsp/helpers.rb",
|
53
|
+
"lib/rtsp/message.rb",
|
54
|
+
"lib/rtsp/response.rb",
|
55
|
+
"lib/rtsp/transport_parser.rb",
|
56
|
+
"lib/rtsp/version.rb",
|
57
|
+
"nsm_test.rb",
|
58
|
+
"rtsp.gemspec",
|
59
|
+
"sarix_test.rb",
|
60
|
+
"soma_test.rb",
|
61
|
+
"spec/.rspec",
|
62
|
+
"spec/rtsp/client_spec.rb",
|
63
|
+
"spec/rtsp/helpers_spec.rb",
|
64
|
+
"spec/rtsp/message_spec.rb",
|
65
|
+
"spec/rtsp/response_spec.rb",
|
66
|
+
"spec/rtsp/transport_parser_spec.rb",
|
67
|
+
"spec/rtsp_spec.rb",
|
68
|
+
"spec/spec_helper.rb",
|
69
|
+
"spec/support/fake_rtsp_server.rb",
|
70
|
+
"tasks/metrics.rake",
|
71
|
+
"tasks/roodi_config.yml",
|
72
|
+
"tasks/stats.rake"
|
73
|
+
]
|
74
|
+
s.homepage = %q{http://rubygems.org/gems/rtsp}
|
75
|
+
s.licenses = ["MIT"]
|
76
|
+
s.require_paths = ["lib"]
|
77
|
+
s.rubyforge_project = %q{rtsp}
|
78
|
+
s.rubygems_version = %q{1.6.2}
|
79
|
+
s.summary = %q{Library to allow RTSP streaming from RTSP-enabled devices.}
|
80
|
+
s.test_files = [
|
81
|
+
"spec/rtsp/client_spec.rb",
|
82
|
+
"spec/rtsp/helpers_spec.rb",
|
83
|
+
"spec/rtsp/message_spec.rb",
|
84
|
+
"spec/rtsp/response_spec.rb",
|
85
|
+
"spec/rtsp/transport_parser_spec.rb",
|
86
|
+
"spec/rtsp_spec.rb"
|
87
|
+
]
|
88
|
+
|
89
|
+
if s.respond_to? :specification_version then
|
90
|
+
s.specification_version = 3
|
91
|
+
|
92
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
93
|
+
s.add_runtime_dependency(%q<sdp>, ["~> 0.2.0"])
|
94
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
95
|
+
s.add_development_dependency(%q<code_statistics>, ["~> 0.2.13"])
|
96
|
+
s.add_development_dependency(%q<metric_fu>, [">= 2.0.0"])
|
97
|
+
s.add_development_dependency(%q<ore>, ["~> 0.7.2"])
|
98
|
+
s.add_development_dependency(%q<ore-core>, ["~> 0.1.5"])
|
99
|
+
s.add_development_dependency(%q<ore-tasks>, ["~> 0.5.0"])
|
100
|
+
s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
|
101
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.5.0"])
|
102
|
+
s.add_development_dependency(%q<simplecov>, [">= 0.4.0"])
|
103
|
+
s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
|
104
|
+
s.add_runtime_dependency(%q<rtsp>, [">= 0"])
|
105
|
+
s.add_runtime_dependency(%q<sdp>, ["~> 0.2.2"])
|
106
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
107
|
+
s.add_development_dependency(%q<code_statistics>, ["~> 0.2.13"])
|
108
|
+
s.add_development_dependency(%q<metric_fu>, [">= 2.0.0"])
|
109
|
+
s.add_development_dependency(%q<ore>, ["~> 0.7.2"])
|
110
|
+
s.add_development_dependency(%q<ore-core>, ["~> 0.1.5"])
|
111
|
+
s.add_development_dependency(%q<ore-tasks>, ["~> 0.5.0"])
|
112
|
+
s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
|
113
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.5.0"])
|
114
|
+
s.add_development_dependency(%q<simplecov>, [">= 0.4.0"])
|
115
|
+
s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
|
116
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
117
|
+
s.add_development_dependency(%q<code_statistics>, ["~> 0.2.13"])
|
118
|
+
s.add_development_dependency(%q<metric_fu>, [">= 2.0.0"])
|
119
|
+
s.add_development_dependency(%q<ore>, ["~> 0.7.2"])
|
120
|
+
s.add_development_dependency(%q<ore-core>, ["~> 0.1.5"])
|
121
|
+
s.add_development_dependency(%q<ore-tasks>, ["~> 0.5.0"])
|
122
|
+
s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
|
123
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.5.0"])
|
124
|
+
s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
|
125
|
+
s.add_development_dependency(%q<code_statistics>, ["~> 0.2.13"])
|
126
|
+
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
127
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.0"])
|
128
|
+
s.add_development_dependency(%q<metric_fu>, [">= 2.0.0"])
|
129
|
+
s.add_development_dependency(%q<ore>, ["~> 0.7.2"])
|
130
|
+
s.add_development_dependency(%q<ore-core>, ["~> 0.1.5"])
|
131
|
+
s.add_development_dependency(%q<ore-tasks>, ["~> 0.5.0"])
|
132
|
+
s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
|
133
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.5.0"])
|
134
|
+
s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
|
135
|
+
s.add_development_dependency(%q<code_statistics>, ["~> 0.2.13"])
|
136
|
+
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
137
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.0"])
|
138
|
+
s.add_development_dependency(%q<metric_fu>, [">= 2.0.0"])
|
139
|
+
s.add_development_dependency(%q<ore>, ["~> 0.7.2"])
|
140
|
+
s.add_development_dependency(%q<ore-core>, ["~> 0.1.5"])
|
141
|
+
s.add_development_dependency(%q<ore-tasks>, ["~> 0.5.0"])
|
142
|
+
s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
|
143
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.5.0"])
|
144
|
+
s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
|
145
|
+
s.add_development_dependency(%q<code_statistics>, ["~> 0.2.13"])
|
146
|
+
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
147
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.0"])
|
148
|
+
s.add_development_dependency(%q<metric_fu>, [">= 2.0.0"])
|
149
|
+
s.add_development_dependency(%q<ore>, ["~> 0.7.2"])
|
150
|
+
s.add_development_dependency(%q<ore-core>, ["~> 0.1.5"])
|
151
|
+
s.add_development_dependency(%q<ore-tasks>, ["~> 0.5.0"])
|
152
|
+
s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
|
153
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.5.0"])
|
154
|
+
s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
|
155
|
+
else
|
156
|
+
s.add_dependency(%q<sdp>, ["~> 0.2.0"])
|
157
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
158
|
+
s.add_dependency(%q<code_statistics>, ["~> 0.2.13"])
|
159
|
+
s.add_dependency(%q<metric_fu>, [">= 2.0.0"])
|
160
|
+
s.add_dependency(%q<ore>, ["~> 0.7.2"])
|
161
|
+
s.add_dependency(%q<ore-core>, ["~> 0.1.5"])
|
162
|
+
s.add_dependency(%q<ore-tasks>, ["~> 0.5.0"])
|
163
|
+
s.add_dependency(%q<rake>, ["~> 0.8.7"])
|
164
|
+
s.add_dependency(%q<rspec>, ["~> 2.5.0"])
|
165
|
+
s.add_dependency(%q<simplecov>, [">= 0.4.0"])
|
166
|
+
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
167
|
+
s.add_dependency(%q<rtsp>, [">= 0"])
|
168
|
+
s.add_dependency(%q<sdp>, ["~> 0.2.2"])
|
169
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
170
|
+
s.add_dependency(%q<code_statistics>, ["~> 0.2.13"])
|
171
|
+
s.add_dependency(%q<metric_fu>, [">= 2.0.0"])
|
172
|
+
s.add_dependency(%q<ore>, ["~> 0.7.2"])
|
173
|
+
s.add_dependency(%q<ore-core>, ["~> 0.1.5"])
|
174
|
+
s.add_dependency(%q<ore-tasks>, ["~> 0.5.0"])
|
175
|
+
s.add_dependency(%q<rake>, ["~> 0.8.7"])
|
176
|
+
s.add_dependency(%q<rspec>, ["~> 2.5.0"])
|
177
|
+
s.add_dependency(%q<simplecov>, [">= 0.4.0"])
|
178
|
+
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
179
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
180
|
+
s.add_dependency(%q<code_statistics>, ["~> 0.2.13"])
|
181
|
+
s.add_dependency(%q<metric_fu>, [">= 2.0.0"])
|
182
|
+
s.add_dependency(%q<ore>, ["~> 0.7.2"])
|
183
|
+
s.add_dependency(%q<ore-core>, ["~> 0.1.5"])
|
184
|
+
s.add_dependency(%q<ore-tasks>, ["~> 0.5.0"])
|
185
|
+
s.add_dependency(%q<rake>, ["~> 0.8.7"])
|
186
|
+
s.add_dependency(%q<rspec>, ["~> 2.5.0"])
|
187
|
+
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
188
|
+
s.add_dependency(%q<code_statistics>, ["~> 0.2.13"])
|
189
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
190
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.0"])
|
191
|
+
s.add_dependency(%q<metric_fu>, [">= 2.0.0"])
|
192
|
+
s.add_dependency(%q<ore>, ["~> 0.7.2"])
|
193
|
+
s.add_dependency(%q<ore-core>, ["~> 0.1.5"])
|
194
|
+
s.add_dependency(%q<ore-tasks>, ["~> 0.5.0"])
|
195
|
+
s.add_dependency(%q<rake>, ["~> 0.8.7"])
|
196
|
+
s.add_dependency(%q<rspec>, ["~> 2.5.0"])
|
197
|
+
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
198
|
+
s.add_dependency(%q<code_statistics>, ["~> 0.2.13"])
|
199
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
200
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.0"])
|
201
|
+
s.add_dependency(%q<metric_fu>, [">= 2.0.0"])
|
202
|
+
s.add_dependency(%q<ore>, ["~> 0.7.2"])
|
203
|
+
s.add_dependency(%q<ore-core>, ["~> 0.1.5"])
|
204
|
+
s.add_dependency(%q<ore-tasks>, ["~> 0.5.0"])
|
205
|
+
s.add_dependency(%q<rake>, ["~> 0.8.7"])
|
206
|
+
s.add_dependency(%q<rspec>, ["~> 2.5.0"])
|
207
|
+
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
208
|
+
s.add_dependency(%q<code_statistics>, ["~> 0.2.13"])
|
209
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
210
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.0"])
|
211
|
+
s.add_dependency(%q<metric_fu>, [">= 2.0.0"])
|
212
|
+
s.add_dependency(%q<ore>, ["~> 0.7.2"])
|
213
|
+
s.add_dependency(%q<ore-core>, ["~> 0.1.5"])
|
214
|
+
s.add_dependency(%q<ore-tasks>, ["~> 0.5.0"])
|
215
|
+
s.add_dependency(%q<rake>, ["~> 0.8.7"])
|
216
|
+
s.add_dependency(%q<rspec>, ["~> 2.5.0"])
|
217
|
+
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
218
|
+
end
|
219
|
+
else
|
220
|
+
s.add_dependency(%q<sdp>, ["~> 0.2.0"])
|
221
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
222
|
+
s.add_dependency(%q<code_statistics>, ["~> 0.2.13"])
|
223
|
+
s.add_dependency(%q<metric_fu>, [">= 2.0.0"])
|
224
|
+
s.add_dependency(%q<ore>, ["~> 0.7.2"])
|
225
|
+
s.add_dependency(%q<ore-core>, ["~> 0.1.5"])
|
226
|
+
s.add_dependency(%q<ore-tasks>, ["~> 0.5.0"])
|
227
|
+
s.add_dependency(%q<rake>, ["~> 0.8.7"])
|
228
|
+
s.add_dependency(%q<rspec>, ["~> 2.5.0"])
|
229
|
+
s.add_dependency(%q<simplecov>, [">= 0.4.0"])
|
230
|
+
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
231
|
+
s.add_dependency(%q<rtsp>, [">= 0"])
|
232
|
+
s.add_dependency(%q<sdp>, ["~> 0.2.2"])
|
233
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
234
|
+
s.add_dependency(%q<code_statistics>, ["~> 0.2.13"])
|
235
|
+
s.add_dependency(%q<metric_fu>, [">= 2.0.0"])
|
236
|
+
s.add_dependency(%q<ore>, ["~> 0.7.2"])
|
237
|
+
s.add_dependency(%q<ore-core>, ["~> 0.1.5"])
|
238
|
+
s.add_dependency(%q<ore-tasks>, ["~> 0.5.0"])
|
239
|
+
s.add_dependency(%q<rake>, ["~> 0.8.7"])
|
240
|
+
s.add_dependency(%q<rspec>, ["~> 2.5.0"])
|
241
|
+
s.add_dependency(%q<simplecov>, [">= 0.4.0"])
|
242
|
+
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
243
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
244
|
+
s.add_dependency(%q<code_statistics>, ["~> 0.2.13"])
|
245
|
+
s.add_dependency(%q<metric_fu>, [">= 2.0.0"])
|
246
|
+
s.add_dependency(%q<ore>, ["~> 0.7.2"])
|
247
|
+
s.add_dependency(%q<ore-core>, ["~> 0.1.5"])
|
248
|
+
s.add_dependency(%q<ore-tasks>, ["~> 0.5.0"])
|
249
|
+
s.add_dependency(%q<rake>, ["~> 0.8.7"])
|
250
|
+
s.add_dependency(%q<rspec>, ["~> 2.5.0"])
|
251
|
+
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
252
|
+
s.add_dependency(%q<code_statistics>, ["~> 0.2.13"])
|
253
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
254
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.0"])
|
255
|
+
s.add_dependency(%q<metric_fu>, [">= 2.0.0"])
|
256
|
+
s.add_dependency(%q<ore>, ["~> 0.7.2"])
|
257
|
+
s.add_dependency(%q<ore-core>, ["~> 0.1.5"])
|
258
|
+
s.add_dependency(%q<ore-tasks>, ["~> 0.5.0"])
|
259
|
+
s.add_dependency(%q<rake>, ["~> 0.8.7"])
|
260
|
+
s.add_dependency(%q<rspec>, ["~> 2.5.0"])
|
261
|
+
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
262
|
+
s.add_dependency(%q<code_statistics>, ["~> 0.2.13"])
|
263
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
264
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.0"])
|
265
|
+
s.add_dependency(%q<metric_fu>, [">= 2.0.0"])
|
266
|
+
s.add_dependency(%q<ore>, ["~> 0.7.2"])
|
267
|
+
s.add_dependency(%q<ore-core>, ["~> 0.1.5"])
|
268
|
+
s.add_dependency(%q<ore-tasks>, ["~> 0.5.0"])
|
269
|
+
s.add_dependency(%q<rake>, ["~> 0.8.7"])
|
270
|
+
s.add_dependency(%q<rspec>, ["~> 2.5.0"])
|
271
|
+
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
272
|
+
s.add_dependency(%q<code_statistics>, ["~> 0.2.13"])
|
273
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
274
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.0"])
|
275
|
+
s.add_dependency(%q<metric_fu>, [">= 2.0.0"])
|
276
|
+
s.add_dependency(%q<ore>, ["~> 0.7.2"])
|
277
|
+
s.add_dependency(%q<ore-core>, ["~> 0.1.5"])
|
278
|
+
s.add_dependency(%q<ore-tasks>, ["~> 0.5.0"])
|
279
|
+
s.add_dependency(%q<rake>, ["~> 0.8.7"])
|
280
|
+
s.add_dependency(%q<rspec>, ["~> 2.5.0"])
|
281
|
+
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
282
|
+
end
|
283
|
+
end
|
284
|
+
|
data/sarix_test.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require './lib/rtsp/client'
|
2
|
+
|
3
|
+
cap_file = File.new("sarix_cap.rtsp", "wb")
|
4
|
+
url = "rtsp://10.221.222.129/stream1"
|
5
|
+
r = RTSP::Client.new url
|
6
|
+
r.capturer.media_file = cap_file
|
7
|
+
|
8
|
+
r.options
|
9
|
+
r.describe
|
10
|
+
|
11
|
+
media_track = r.media_control_tracks.first
|
12
|
+
puts "media track: #{media_track}"
|
13
|
+
|
14
|
+
aggregate_track = r.aggregate_control_track
|
15
|
+
puts "aggregate track: #{aggregate_track}"
|
16
|
+
|
17
|
+
r.setup media_track
|
18
|
+
r.play aggregate_track
|
19
|
+
|
20
|
+
sleep 5
|
21
|
+
|
22
|
+
r.teardown media_track
|
23
|
+
|
data/soma_test.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
require './lib/rtsp/client'
|
2
|
+
|
3
|
+
RTSP::Client.log = false
|
4
|
+
|
5
|
+
cap_file = File.new("soma_cap.rtsp", "wb")
|
6
|
+
url = "rtsp://64.202.98.91/sa.sdp"
|
7
|
+
client = RTSP::Client.new(url)
|
8
|
+
client.capturer.media_file = cap_file
|
9
|
+
# client = RTSP::Client.new(url) do |client, capturer|
|
10
|
+
# description = SDP.parse(open("http://test/description.sdp"))
|
11
|
+
# client.timeout = 30
|
12
|
+
# client.socket = TCPSocket.new
|
13
|
+
# client.interleave = true
|
14
|
+
# capturer.file = Tempfile.new "test"
|
15
|
+
# capturer.capture_port = 8555
|
16
|
+
# capturer.protocol = :tcp
|
17
|
+
# end
|
18
|
+
|
19
|
+
client.options
|
20
|
+
client.describe
|
21
|
+
|
22
|
+
media_track = client.media_control_tracks.first
|
23
|
+
puts "media track: #{media_track}"
|
24
|
+
|
25
|
+
aggregate_track = client.aggregate_control_track
|
26
|
+
puts "aggregate track: #{aggregate_track}"
|
27
|
+
|
28
|
+
client.setup media_track
|
29
|
+
#client.setup media_track, :transport => "RTP/AVP;unicast;client_port=9000-9001"
|
30
|
+
#client.setup media_track, :transport => "RTP/AVP/TCP;unicast;interleaved=0-1"
|
31
|
+
#client[media_track].setup
|
32
|
+
#client.media_control_tracks.play
|
33
|
+
client.play aggregate_track
|
34
|
+
sleep 5
|
35
|
+
#client[aggregate_track].play
|
36
|
+
client.teardown aggregate_track
|
37
|
+
|
38
|
+
|
39
|
+
|