mediainfo-native 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mediainfo-native/mediainfo.rb +9 -3
- data/lib/mediainfo-native/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: deb070465a56268298ad45f0f854997196d162e6
|
4
|
+
data.tar.gz: 6dbe4aa2682190fdd9c4f4934dcc7f5a2900b4a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2eb9b24e16cc85013cd97563228d9d84e35ccf1147a426ac39659ff2bb73ef7d1987847b6476a2a54bd93a8814bf845e2a9ef00f66d2b090b9486201c3434b42
|
7
|
+
data.tar.gz: d9961fac0f448e6c92afa7ec8281dfd93a0362973b5dedda52bea69dec8021588706b4778e9a4efab9521d2f397a8836d7b9063d50015c9b0ab2b51828f4921c
|
@@ -14,6 +14,12 @@ module MediaInfoNative
|
|
14
14
|
def method_missing(meth, *args, &block)
|
15
15
|
self.general.send(meth, *args, &block)
|
16
16
|
end
|
17
|
+
|
18
|
+
[:video, :audio, :image].each do |t|
|
19
|
+
define_method "#{t}?" do
|
20
|
+
self.send(t).count > 0
|
21
|
+
end
|
22
|
+
end
|
17
23
|
end
|
18
24
|
|
19
25
|
class StreamProxy
|
@@ -29,12 +35,12 @@ module MediaInfoNative
|
|
29
35
|
def count; @streams.size; end
|
30
36
|
|
31
37
|
def method_missing(m, *a, &b)
|
32
|
-
case streams.size
|
38
|
+
case @streams.size
|
33
39
|
when 0
|
34
40
|
raise NoStreamsForProxyError
|
35
41
|
when 1
|
36
|
-
if streams.first.respond_to?(m)
|
37
|
-
streams.first.send(m, *a, &b)
|
42
|
+
if @streams.first.respond_to?(m)
|
43
|
+
@streams.first.send(m, *a, &b)
|
38
44
|
else
|
39
45
|
raise UnknownAttributeError
|
40
46
|
end
|