gir_ffi-gst 0.0.3 → 0.0.4
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 +1 -1
- data/lib/gir_ffi-gst/base.rb +28 -0
- data/lib/gir_ffi-gst/child_proxy.rb +1 -1
- data/lib/gir_ffi-gst/iterator.rb +1 -2
- data/lib/gir_ffi-gst.rb +1 -0
- data/test/test_helper.rb +1 -1
- data/test/unit/base_test.rb +26 -0
- metadata +10 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb7d9d7baae4bedf0270eda448b3b7eee067aced
|
4
|
+
data.tar.gz: 7b56cc9f8e8adc5cd77449d07bd4a26803b402d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ac3a92bc6f7f38737f5c68d706e0c999d29e4af6f8ce0fe2f21d7a728bd8c6229de701b2f7116e39eda1d926ced155b282ed4d0babea56cfcfa4771917c880e
|
7
|
+
data.tar.gz: f2f314086576b87b822f3bd26ffc03ef7264e02e8b454ef38b4c1ceaf4bb9aa9bf39ba598f6f76203a88859ce6192c5162e9008bd245b01c93fbcf1d19eef819
|
data/README.md
CHANGED
@@ -16,7 +16,7 @@ GirFFI-based bindings for GStreamer
|
|
16
16
|
|
17
17
|
## License
|
18
18
|
|
19
|
-
Copyright © 2015, [Matijs van Zuijlen](http://www.matijs.net/)
|
19
|
+
Copyright © 2015–2016, [Matijs van Zuijlen](http://www.matijs.net/)
|
20
20
|
|
21
21
|
GirFFI-Gst is free software, distributed under the terms of the GNU Lesser
|
22
22
|
General Public License, version 2.1 or later. See the file COPYING.LIB for more
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module GirFFIGst
|
2
|
+
# Override init to automatically use ARGV as its argument.
|
3
|
+
module AutoArgv
|
4
|
+
def self.included(base)
|
5
|
+
base.extend ClassMethods
|
6
|
+
class << base
|
7
|
+
alias_method :init_without_auto_argv, :init
|
8
|
+
alias_method :init, :init_with_auto_argv
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
# Implementation of class methods for AutoArgv
|
13
|
+
module ClassMethods
|
14
|
+
def init_with_auto_argv
|
15
|
+
remaining = init_without_auto_argv([$PROGRAM_NAME, *ARGV]).to_a
|
16
|
+
remaining.shift
|
17
|
+
ARGV.replace remaining
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# Overrides for Gst module functions
|
24
|
+
module Gst
|
25
|
+
setup_method 'init'
|
26
|
+
|
27
|
+
include GirFFIGst::AutoArgv
|
28
|
+
end
|
@@ -7,7 +7,7 @@ module Gst
|
|
7
7
|
remove_method :get_property
|
8
8
|
|
9
9
|
def get_property name
|
10
|
-
pspec =
|
10
|
+
pspec = object_class.find_property name
|
11
11
|
gvalue = GObject::Value.for_gtype pspec.value_type
|
12
12
|
Gst::Lib.gst_child_proxy_get_property self, name, gvalue
|
13
13
|
gvalue
|
data/lib/gir_ffi-gst/iterator.rb
CHANGED
data/lib/gir_ffi-gst.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
require_relative '../test_helper'
|
2
|
+
|
3
|
+
describe Gst do
|
4
|
+
describe '::init' do
|
5
|
+
before do
|
6
|
+
module DummyGst
|
7
|
+
def self.init arr
|
8
|
+
['baz', 'qux', 'zonk']
|
9
|
+
end
|
10
|
+
|
11
|
+
include GirFFIGst::AutoArgv
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'does not accept any arguments' do
|
16
|
+
assert_raises(ArgumentError) { DummyGst.init 1, ['foo'] }
|
17
|
+
assert_raises(ArgumentError) { DummyGst.init ['foo'] }
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'replaces ARGV with the tail of the result of the original init function' do
|
21
|
+
ARGV.replace ['foo', 'bar']
|
22
|
+
DummyGst.init
|
23
|
+
assert_equal ['qux', 'zonk'], ARGV.to_a
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
metadata
CHANGED
@@ -1,35 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gir_ffi-gst
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matijs van Zuijlen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gir_ffi
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 0.8.2
|
20
|
-
- - "<"
|
17
|
+
- - "~>"
|
21
18
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.
|
19
|
+
version: 0.9.0
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- - "
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 0.8.2
|
30
|
-
- - "<"
|
24
|
+
- - "~>"
|
31
25
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.
|
26
|
+
version: 0.9.0
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: minitest
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -83,12 +77,14 @@ files:
|
|
83
77
|
- README.md
|
84
78
|
- Rakefile
|
85
79
|
- lib/gir_ffi-gst.rb
|
80
|
+
- lib/gir_ffi-gst/base.rb
|
86
81
|
- lib/gir_ffi-gst/bin.rb
|
87
82
|
- lib/gir_ffi-gst/child_proxy.rb
|
88
83
|
- lib/gir_ffi-gst/element.rb
|
89
84
|
- lib/gir_ffi-gst/iterator.rb
|
90
85
|
- test/end_to_end/bin_test.rb
|
91
86
|
- test/test_helper.rb
|
87
|
+
- test/unit/base_test.rb
|
92
88
|
- test/unit/bin_test.rb
|
93
89
|
- test/unit/child_proxy_test.rb
|
94
90
|
- test/unit/element_test.rb
|
@@ -113,13 +109,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
109
|
version: '0'
|
114
110
|
requirements: []
|
115
111
|
rubyforge_project:
|
116
|
-
rubygems_version: 2.5.
|
112
|
+
rubygems_version: 2.4.5.1
|
117
113
|
signing_key:
|
118
114
|
specification_version: 4
|
119
115
|
summary: GirFFI-based bindings for GStreamer
|
120
116
|
test_files:
|
121
117
|
- test/test_helper.rb
|
122
118
|
- test/unit/element_test.rb
|
119
|
+
- test/unit/base_test.rb
|
123
120
|
- test/unit/child_proxy_test.rb
|
124
121
|
- test/unit/bin_test.rb
|
125
122
|
- test/unit/iterator_test.rb
|