rtsp 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.rdoc +19 -0
- data/README.rdoc +7 -7
- data/features/control_streams_as_client.feature +1 -1
- data/features/step_definitions/client_changes_state_steps.rb +7 -1
- data/features/step_definitions/client_requests_steps.rb +19 -25
- data/features/support/env.rb +11 -0
- data/lib/rtsp/client.rb +8 -8
- data/lib/rtsp/message.rb +11 -11
- data/lib/rtsp/response.rb +15 -3
- data/lib/rtsp/transport_parser.rb +49 -17
- data/lib/rtsp/version.rb +1 -1
- data/rtsp.gemspec +1 -1
- data/spec/rtsp/client_spec.rb +6 -6
- data/spec/rtsp/message_spec.rb +36 -36
- data/spec/rtsp/response_spec.rb +73 -42
- data/spec/rtsp/transport_parser_spec.rb +109 -26
- data/spec/rtsp_spec.rb +2 -2
- data/spec/spec_helper.rb +60 -53
- metadata +25 -25
data/spec/rtsp_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -8,66 +8,73 @@ require 'rspec'
|
|
8
8
|
$:.unshift(File.dirname(__FILE__) + '/../lib')
|
9
9
|
require 'rtsp'
|
10
10
|
|
11
|
-
OPTIONS_RESPONSE = %Q{RTSP/1.0 200 OK\r
|
12
|
-
CSeq: 1\r
|
13
|
-
Date: Fri, Jan 28 2011 01:14:42 GMT\r
|
14
|
-
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE\r
|
11
|
+
OPTIONS_RESPONSE = %Q{RTSP/1.0 200 OK\r
|
12
|
+
CSeq: 1\r
|
13
|
+
Date: Fri, Jan 28 2011 01:14:42 GMT\r
|
14
|
+
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE\r
|
15
15
|
}
|
16
16
|
|
17
|
-
DESCRIBE_RESPONSE = %{RTSP/1.0 200 OK\r
|
18
|
-
Server: DSS/5.5 (Build/489.7; Platform/Linux; Release/Darwin; )\r
|
19
|
-
Cseq: 1\r
|
20
|
-
Cache-Control: no-cache\r
|
21
|
-
Content-length: 406\r
|
22
|
-
Date: Sun, 23 Jan 2011 00:36:45 GMT\r
|
23
|
-
Expires: Sun, 23 Jan 2011 00:36:45 GMT\r
|
24
|
-
Content-Type: application/sdp\r
|
25
|
-
x-Accept-Retransmit: our-retransmit\r
|
26
|
-
x-Accept-Dynamic-Rate: 1\r
|
27
|
-
Content-Base: rtsp://64.202.98.91:554/gs.sdp/\r
|
28
|
-
\r\n\r
|
29
|
-
v=0
|
30
|
-
o=- 545877020 467920391 IN IP4 127.0.0.1
|
31
|
-
s=Groove Salad from SomaFM [aacPlus]
|
32
|
-
i=Downtempo Ambient Groove
|
33
|
-
c=IN IP4 0.0.0.0
|
34
|
-
t=0 0
|
35
|
-
a=x-qt-text-cmt:Orban Opticodec-PC
|
36
|
-
a=x-qt-text-nam:Groove Salad from SomaFM [aacPlus]
|
37
|
-
a=x-qt-text-inf:Downtempo Ambient Groove
|
38
|
-
a=control
|
39
|
-
m=audio 0 RTP/AVP 96
|
40
|
-
b=AS:48
|
41
|
-
a=rtpmap:96 MP4A-LATM/44100/2
|
42
|
-
a=fmtp:96 cpresent=0;config=400027200000
|
43
|
-
a=control:trackID=1
|
17
|
+
DESCRIBE_RESPONSE = %{RTSP/1.0 200 OK\r
|
18
|
+
Server: DSS/5.5 (Build/489.7; Platform/Linux; Release/Darwin; )\r
|
19
|
+
Cseq: 1\r
|
20
|
+
Cache-Control: no-cache\r
|
21
|
+
Content-length: 406\r
|
22
|
+
Date: Sun, 23 Jan 2011 00:36:45 GMT\r
|
23
|
+
Expires: Sun, 23 Jan 2011 00:36:45 GMT\r
|
24
|
+
Content-Type: application/sdp\r
|
25
|
+
x-Accept-Retransmit: our-retransmit\r
|
26
|
+
x-Accept-Dynamic-Rate: 1\r
|
27
|
+
Content-Base: rtsp://64.202.98.91:554/gs.sdp/\r
|
28
|
+
\r\n\r
|
29
|
+
v=0\r
|
30
|
+
o=- 545877020 467920391 IN IP4 127.0.0.1\r
|
31
|
+
s=Groove Salad from SomaFM [aacPlus]\r
|
32
|
+
i=Downtempo Ambient Groove\r
|
33
|
+
c=IN IP4 0.0.0.0\r
|
34
|
+
t=0 0\r
|
35
|
+
a=x-qt-text-cmt:Orban Opticodec-PC\r
|
36
|
+
a=x-qt-text-nam:Groove Salad from SomaFM [aacPlus]\r
|
37
|
+
a=x-qt-text-inf:Downtempo Ambient Groove\r
|
38
|
+
a=control:*\r
|
39
|
+
m=audio 0 RTP/AVP 96\r
|
40
|
+
b=AS:48\r
|
41
|
+
a=rtpmap:96 MP4A-LATM/44100/2\r
|
42
|
+
a=fmtp:96 cpresent=0;config=400027200000\r
|
43
|
+
a=control:trackID=1\r
|
44
44
|
}
|
45
45
|
|
46
|
-
SETUP_RESPONSE = %Q{RTSP/1.0 200 OK\r
|
47
|
-
CSeq: 1\r
|
48
|
-
Date: Fri, Jan 28 2011 01:14:42 GMT\r
|
49
|
-
Transport: RTP/AVP;unicast;destination=10.221.222.186;source=10.221.222.235;client_port=9000-9001;server_port=6700-6701\r
|
50
|
-
Session: 118\r
|
51
|
-
\r
|
46
|
+
SETUP_RESPONSE = %Q{RTSP/1.0 200 OK\r
|
47
|
+
CSeq: 1\r
|
48
|
+
Date: Fri, Jan 28 2011 01:14:42 GMT\r
|
49
|
+
Transport: RTP/AVP;unicast;destination=10.221.222.186;source=10.221.222.235;client_port=9000-9001;server_port=6700-6701\r
|
50
|
+
Session: 118\r
|
51
|
+
\r}
|
52
52
|
|
53
|
-
|
54
|
-
CSeq: 1\r
|
55
|
-
Date: Fri, Jan 28 2011 01:14:42 GMT\r
|
56
|
-
|
57
|
-
Session: 118\r
|
58
|
-
|
59
|
-
\r\n}
|
53
|
+
SETUP_RESPONSE_WITH_SESSION_TIMEOUT = %Q{RTSP/1.0 200 OK\r
|
54
|
+
CSeq: 1\r
|
55
|
+
Date: Fri, Jan 28 2011 01:14:42 GMT\r
|
56
|
+
Transport: RTP/AVP;unicast;destination=10.221.222.186;source=10.221.222.235;client_port=9000-9001;server_port=6700-6701\r
|
57
|
+
Session: 118;timeout=49\r
|
58
|
+
\r}
|
60
59
|
|
61
|
-
|
62
|
-
CSeq: 1\r
|
63
|
-
Date: Fri, Jan 28 2011 01:14:
|
64
|
-
|
60
|
+
PLAY_RESPONSE = %Q{RTSP/1.0 200 OK\r
|
61
|
+
CSeq: 1\r
|
62
|
+
Date: Fri, Jan 28 2011 01:14:42 GMT\r
|
63
|
+
Range: npt=0.000-\r
|
64
|
+
Session: 118\r
|
65
|
+
RTP-Info: url=rtsp://10.221.222.235/stream1/track1;seq=17320;rtptime=400880602\r
|
66
|
+
\r}
|
65
67
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
68
|
+
TEARDOWN_RESPONSE = %Q{RTSP/1.0 200 OK\r
|
69
|
+
CSeq: 1\r
|
70
|
+
Date: Fri, Jan 28 2011 01:14:47 GMT\r
|
71
|
+
\r}
|
72
|
+
|
73
|
+
NO_CSEQ_VALUE_RESPONSE = %Q{ RTSP/1.0 460 Only Aggregate Option Allowed\r
|
74
|
+
Server: DSS/5.5 (Build/489.7; Platform/Linux; Release/Darwin; )\r
|
75
|
+
Cseq: \r
|
76
|
+
Connection: Close\r
|
77
|
+
\r}
|
71
78
|
|
72
79
|
|
73
80
|
# Define #describe so when RTSP::Message calls #method_missing, RSpec doesn't
|
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.
|
4
|
+
version: 0.4.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-03-
|
13
|
+
date: 2012-03-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: parslet
|
17
|
-
requirement: &
|
17
|
+
requirement: &70227178560780 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 1.1.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70227178560780
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: rtp
|
28
|
-
requirement: &
|
28
|
+
requirement: &70227178560200 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: 0.0.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70227178560200
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: sdp
|
39
|
-
requirement: &
|
39
|
+
requirement: &70227178558860 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ~>
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: 0.2.6
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70227178558860
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: bundler
|
50
|
-
requirement: &
|
50
|
+
requirement: &70227178557580 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ! '>='
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: '0'
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *70227178557580
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: code_statistics
|
61
|
-
requirement: &
|
61
|
+
requirement: &70227178555760 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ~>
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: 0.2.13
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *70227178555760
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: cucumber
|
72
|
-
requirement: &
|
72
|
+
requirement: &70227178554640 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ! '>='
|
@@ -77,10 +77,10 @@ dependencies:
|
|
77
77
|
version: 1.1.0
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *70227178554640
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: roodi
|
83
|
-
requirement: &
|
83
|
+
requirement: &70227178725000 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
86
|
- - ! '>='
|
@@ -88,10 +88,10 @@ dependencies:
|
|
88
88
|
version: 2.1.0
|
89
89
|
type: :development
|
90
90
|
prerelease: false
|
91
|
-
version_requirements: *
|
91
|
+
version_requirements: *70227178725000
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: rake
|
94
|
-
requirement: &
|
94
|
+
requirement: &70227178722040 !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
96
96
|
requirements:
|
97
97
|
- - ! '>='
|
@@ -99,10 +99,10 @@ dependencies:
|
|
99
99
|
version: 0.8.7
|
100
100
|
type: :development
|
101
101
|
prerelease: false
|
102
|
-
version_requirements: *
|
102
|
+
version_requirements: *70227178722040
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: rspec
|
105
|
-
requirement: &
|
105
|
+
requirement: &70227178720440 !ruby/object:Gem::Requirement
|
106
106
|
none: false
|
107
107
|
requirements:
|
108
108
|
- - ! '>='
|
@@ -110,10 +110,10 @@ dependencies:
|
|
110
110
|
version: 2.5.0
|
111
111
|
type: :development
|
112
112
|
prerelease: false
|
113
|
-
version_requirements: *
|
113
|
+
version_requirements: *70227178720440
|
114
114
|
- !ruby/object:Gem::Dependency
|
115
115
|
name: simplecov
|
116
|
-
requirement: &
|
116
|
+
requirement: &70227178719540 !ruby/object:Gem::Requirement
|
117
117
|
none: false
|
118
118
|
requirements:
|
119
119
|
- - ! '>='
|
@@ -121,10 +121,10 @@ dependencies:
|
|
121
121
|
version: 0.4.0
|
122
122
|
type: :development
|
123
123
|
prerelease: false
|
124
|
-
version_requirements: *
|
124
|
+
version_requirements: *70227178719540
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: yard
|
127
|
-
requirement: &
|
127
|
+
requirement: &70227178718660 !ruby/object:Gem::Requirement
|
128
128
|
none: false
|
129
129
|
requirements:
|
130
130
|
- - ! '>='
|
@@ -132,7 +132,7 @@ dependencies:
|
|
132
132
|
version: 0.6.0
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
|
-
version_requirements: *
|
135
|
+
version_requirements: *70227178718660
|
136
136
|
description: ! 'This library intends to follow the RTSP RFC document (2326)
|
137
137
|
|
138
138
|
to allow for working with RTSP servers. At this point, it''s up to you to parse
|
@@ -187,7 +187,7 @@ files:
|
|
187
187
|
- features/step_definitions/control_streams_as_client_steps.rb
|
188
188
|
- features/support/env.rb
|
189
189
|
- features/support/hooks.rb
|
190
|
-
homepage:
|
190
|
+
homepage: https://github.com/turboladen/rtsp
|
191
191
|
licenses:
|
192
192
|
- MIT
|
193
193
|
post_install_message:
|