rbsrt 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +14 -0
- data/Rakefile +1 -1
- data/bin/rbsrt-client +0 -0
- data/bin/rbsrt-server +2 -2
- data/ext/rbsrt/extconf.rb +18 -2
- data/lib/rbsrt/rbsrt.bundle +0 -0
- data/lib/rbsrt/version.rb +1 -1
- data/rbsrt.gemspec +2 -1
- metadata +21 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe25549f98a85f696d9c7b3ef988bc919530d5e17e34acc9366f587e438101e9
|
4
|
+
data.tar.gz: 2802528da33bdfd9a89c79ffe8ce79694e4d75068bc68938f481ba97b374d5eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 011d75248ff0ffdc146e5069cc5050c017b0aa56416e8957020a2e010ed660cab32d8315a0e57232609e4454a6393e03cb182608cec7444011fd595b5e23185a
|
7
|
+
data.tar.gz: 632898f852865c06668b45da82639c69ac53c0c0354efbde8ee01ff78fcaab029c679a3a67bdfa0fded1466ecab7faa64b340caecca5b10ce0a30d1d5e676372
|
data/README.md
CHANGED
@@ -70,9 +70,23 @@ Install:
|
|
70
70
|
|
71
71
|
```
|
72
72
|
cd rbsrt
|
73
|
+
bundle install
|
73
74
|
rake install
|
74
75
|
```
|
75
76
|
|
77
|
+
It is possible to provide some information about the location of your srt installation by providing one or more of the following environment variables:
|
78
|
+
|
79
|
+
```sh
|
80
|
+
RBSRT_LIBSRT_HOME # a path to the install directory of srt containing the lib and include dirs
|
81
|
+
RBSRT_LIBSRT_LIB_DIR # a path to the directory containing libsrt
|
82
|
+
RBSRT_LIBSRT_INCLUDE_DIR # a path to the directory containing libsrt headers
|
83
|
+
```
|
84
|
+
|
85
|
+
For example, you could use the your local srt development repo:
|
86
|
+
|
87
|
+
```
|
88
|
+
RBSRT_LIBSRT_HOME="/home/me/code/srt/.build" rake install
|
89
|
+
```
|
76
90
|
|
77
91
|
## Examples
|
78
92
|
|
data/Rakefile
CHANGED
data/bin/rbsrt-client
CHANGED
File without changes
|
data/bin/rbsrt-server
CHANGED
@@ -53,11 +53,11 @@ puts "starting server"
|
|
53
53
|
server.start do |connection|
|
54
54
|
puts "new connection: connections=#{connection_count}, id=#{connection.id}, streamid=#{connection.streamid}"
|
55
55
|
|
56
|
-
|
56
|
+
output_file_path = File.join options.recording_path, "recording-#{Process.pid}-#{connection.id}.ts"
|
57
|
+
output_file = File.new output_file_path, "w+"
|
57
58
|
output_file.close_on_exec = true
|
58
59
|
|
59
60
|
connection.at_data do |chunk|
|
60
|
-
puts "data"
|
61
61
|
output_file.write(chunk)
|
62
62
|
end
|
63
63
|
|
data/ext/rbsrt/extconf.rb
CHANGED
@@ -10,15 +10,31 @@ INCLUDEDIR = CONFIG['includedir']
|
|
10
10
|
HEADER_DIRS = []
|
11
11
|
HEADER_DIRS << '/opt/local/include' if File.directory?('/opt/local/include')
|
12
12
|
HEADER_DIRS << '/usr/local/include' if File.directory?('/usr/local/include')
|
13
|
+
HEADER_DIRS << '/opt/homebrew/include' if File.directory?('/opt/homebrew/include')
|
13
14
|
HEADER_DIRS << INCLUDEDIR
|
14
15
|
HEADER_DIRS << '/usr/include' if File.directory?('/usr/include')
|
15
16
|
|
17
|
+
|
16
18
|
LIB_DIRS = []
|
17
19
|
LIB_DIRS << '/opt/local/lib' if File.directory?('/opt/local/lib')
|
18
20
|
LIB_DIRS << '/usr/local/lib' if File.directory?('/usr/local/lib')
|
21
|
+
LIB_DIRS << '/opt/homebrew/lib' if File.directory?('/opt/homebrew/lib')
|
19
22
|
LIB_DIRS << LIBDIR
|
20
23
|
LIB_DIRS << '/usr/lib' if File.directory?('/usr/lib')
|
21
24
|
|
25
|
+
if lib_srt_home_path = ENV["RBSRT_LIBSRT_HOME"]
|
26
|
+
HEADER_DIRS << File.join(lib_srt_home_path, "include") if File.directory?(File.join(lib_srt_home_path, "include"))
|
27
|
+
LIB_DIRS << File.join(lib_srt_home_path, "lib") if File.directory?(File.join(lib_srt_home_path, "lib"))
|
28
|
+
end
|
29
|
+
|
30
|
+
if lib_srt_lib_path = ENV["RBSRT_LIBSRT_LIB_DIR"]
|
31
|
+
LIB_DIRS << lib_srt_lib_path if File.directory?(lib_srt_lib_path)
|
32
|
+
end
|
33
|
+
|
34
|
+
if lib_srt_include_path = ENV["RBSRT_LIBSRT_INCLUDE_DIR"]
|
35
|
+
LIB_DIRS << lib_srt_include_path if File.directory?(lib_srt_include_path)
|
36
|
+
end
|
37
|
+
|
22
38
|
dir_config('srt', HEADER_DIRS, LIB_DIRS)
|
23
39
|
# dir_config('srt', HEADER_DIRS, LIB_DIRS)
|
24
40
|
# dir_config('c++', HEADER_DIRS, LIB_DIRS)
|
@@ -26,11 +42,11 @@ dir_config('srt', HEADER_DIRS, LIB_DIRS)
|
|
26
42
|
# srt dependencies
|
27
43
|
|
28
44
|
unless find_header('srt/srt.h')
|
29
|
-
abort "libsrt is missing. please install libsrt: https://github.com/Haivision/srt"
|
45
|
+
abort "libsrt is missing no header. please install libsrt: https://github.com/Haivision/srt"
|
30
46
|
end
|
31
47
|
|
32
48
|
unless find_library('srt', 'srt_create_socket')
|
33
|
-
abort "libsrt is missing. please install libsrt: https://github.com/Haivision/srt"
|
49
|
+
abort "libsrt is missing no sock. please install libsrt: https://github.com/Haivision/srt"
|
34
50
|
end
|
35
51
|
|
36
52
|
dir_config(extension_name)
|
data/lib/rbsrt/rbsrt.bundle
CHANGED
Binary file
|
data/lib/rbsrt/version.rb
CHANGED
data/rbsrt.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbsrt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Klaas Speller
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: gem-release
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.2'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.2'
|
27
41
|
description: Build SRT (Secure Reliable Transport) servers and clients with Ruby
|
28
42
|
email:
|
29
43
|
- klaas@recce.nl
|
@@ -58,7 +72,7 @@ licenses:
|
|
58
72
|
- MIT
|
59
73
|
metadata:
|
60
74
|
source_code_uri: https://github.com/spllr/rbsrt
|
61
|
-
post_install_message:
|
75
|
+
post_install_message:
|
62
76
|
rdoc_options: []
|
63
77
|
require_paths:
|
64
78
|
- lib
|
@@ -73,11 +87,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
87
|
- !ruby/object:Gem::Version
|
74
88
|
version: '0'
|
75
89
|
requirements: []
|
76
|
-
rubygems_version: 3.
|
77
|
-
signing_key:
|
90
|
+
rubygems_version: 3.2.32
|
91
|
+
signing_key:
|
78
92
|
specification_version: 4
|
79
93
|
summary: Ruby API for SRT (Secure Reliable Transport)
|
80
94
|
test_files:
|
95
|
+
- test/rbsrt/poll_test.rb
|
81
96
|
- test/rbsrt/stats_test.rb
|
82
97
|
- test/rbsrt/streamid_components_test.rb
|
83
|
-
- test/rbsrt/poll_test.rb
|