rbsrt 0.1.2 → 0.2.0

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
  SHA256:
3
- metadata.gz: 0da76924878f6409bea03b2a05c5e97c27e9c070ae628d28b5048570ba0186ca
4
- data.tar.gz: 8110b5167ea390acc8b6ae80a69cc300e20791e9ddd3ed0bd16a3e9f4fa724ac
3
+ metadata.gz: fe25549f98a85f696d9c7b3ef988bc919530d5e17e34acc9366f587e438101e9
4
+ data.tar.gz: 2802528da33bdfd9a89c79ffe8ce79694e4d75068bc68938f481ba97b374d5eb
5
5
  SHA512:
6
- metadata.gz: ec80de0f349a045e02957118dd5cddd49041c96843f485df1f106c615278783462dd48901bcb1fbad2c73362b9fc82527edfca4e1f6cd197d0dd6443fa1af4ea
7
- data.tar.gz: bbdeda3540c5e88c6ab5c4926bea4d5f70777351fcf2cfe630efcb69ba11c37d792131d0e30cd5a736852891a2b9137bdb84968920d20ec208c4af503a042d9e
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
@@ -29,4 +29,4 @@ desc "Run tests"
29
29
  task :test => [ :compile ] do
30
30
  require './test/test_helper'
31
31
  Dir.glob( './test/**/*_test.rb').each { |file| require file }
32
- end
32
+ end
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
- output_file = File.new "recording-#{Process.pid}-#{connection.id}.ts", "w+"
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)
Binary file
data/lib/rbsrt/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module SRT
2
- VERSION = "0.1.2"
2
+ VERSION = "0.2.0"
3
3
  end
data/rbsrt.gemspec CHANGED
@@ -19,4 +19,5 @@ Gem::Specification.new do |s|
19
19
  s.extensions = %w[ext/rbsrt/extconf.rb]
20
20
  s.required_ruby_version = ">= 2.2.0"
21
21
  s.add_development_dependency "rake-compiler", "~> 1.0"
22
- end
22
+ s.add_development_dependency "gem-release", "~> 2.2"
23
+ end
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.1.2
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: 2019-11-22 00:00:00.000000000 Z
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.0.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