mediainfo-native 0.0.7 → 0.0.8

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
  SHA1:
3
- metadata.gz: 70c6c9709a5937a8b4f10399767268e69ebf56b9
4
- data.tar.gz: c892ef01f15ea58c45eb9c55df3313fca00ad1d7
3
+ metadata.gz: 262c7dbb35b78979f6fc40b31061c3d805fc5562
4
+ data.tar.gz: d8263e550033b7e6ae9d77e4d69e493a624fff94
5
5
  SHA512:
6
- metadata.gz: a6764cefff286e2aef364bac2bcd89a017d6e2b505849b1d1c9ef10d2123466c6471ebdbf703d4b0c0947aa8ada79bec6b1db80d14b1ab54a112ca44faa2ebc9
7
- data.tar.gz: 7356a016c6c5dfb8c2021c0bde36428aee132dfa0237edf0b7e2f3a0fe57b2a83acd31f84506101e4cb4c23affa057208aa01810e7c9d9f05e372a15ba21e2e5
6
+ metadata.gz: 6e8c326a2c4455e86a49bf7a8f0d547cd6935c249e56c65b78ec46200c62f575edede688cd3f37854f38be2f444ebd628ac428b2353844de0de96315f17c4865
7
+ data.tar.gz: b307ab469cbb0ccc5d64303214af02112170dc6fb0e048aefe27e3715236ef7b02f3fd340b10f869584f810f1995c99ccaa4a2a2e83f7bc669392f0afbf21b9c
@@ -4,8 +4,6 @@ unless (mediainfo_cfg = pkg_config('libmediainfo'))
4
4
  abort 'Failed to locate pkg-config file for libmediainfo.'
5
5
  end
6
6
 
7
- puts mediainfo_cfg
8
-
9
7
  unless have_library('mediainfo')
10
8
  abort 'Failed to test-link against libmediainfo.'
11
9
  end
@@ -67,6 +67,14 @@ extern "C"
67
67
  return inform;
68
68
  }
69
69
 
70
+ static VALUE miw_option(VALUE self)
71
+ {
72
+ GET_WRAPPER(miw);
73
+
74
+ VALUE option = miw->option();
75
+ return option;
76
+ }
77
+
70
78
  }
71
79
 
72
80
  void Init_MediaInfoWrapper(VALUE mMediaInfoNative)
@@ -80,6 +88,7 @@ void Init_MediaInfoWrapper(VALUE mMediaInfoNative)
80
88
  rb_define_method(cMediaInfo, "streams", (RUBYFUNC) miw_streams, 0);
81
89
 
82
90
  rb_define_method(cMediaInfo, "inform", (RUBYFUNC) miw_inform, 1);
91
+ rb_define_method(cMediaInfo, "option", (RUBYFUNC) miw_option, 0);
83
92
  }
84
93
 
85
94
  /* ************************** MediaInfoWrapper ****************************** */
@@ -188,6 +197,11 @@ VALUE MediaInfoWrapper::inform() const
188
197
  return ansi_string_to_value(mi->Inform());
189
198
  }
190
199
 
200
+ VALUE MediaInfoWrapper::option() const
201
+ {
202
+ return ansi_string_to_value(mi->Option("Info_Parameters"));
203
+ }
204
+
191
205
  void MediaInfoWrapper::notifyOfStreamDestruction(BaseStream* stream)
192
206
  {
193
207
  streams.remove(stream);
@@ -21,6 +21,7 @@ public:
21
21
  VALUE wrapStreams();
22
22
 
23
23
  VALUE inform() const;
24
+ VALUE option() const;
24
25
  VALUE get(StreamType type, unsigned int idx, VALUE key) const;
25
26
 
26
27
  void notifyOfStreamDestruction(BaseStream* stream);
@@ -56,6 +56,8 @@ module MediaInfoNative
56
56
  t
57
57
  when /\A\d+\z/ =~ v
58
58
  v.to_i
59
+ when /\A\d+\.\d+\z/ =~ v
60
+ v.to_f.round
59
61
  else
60
62
  puts "TimeFragment: #{v}"
61
63
  raise "unexpected time fragment! please report bug!"
@@ -2,5 +2,7 @@ module MediaInfoNative
2
2
  class OtherStream < BaseStream
3
3
  mediainfo_attr_reader :stream_id, 'ID'
4
4
  mediainfo_attr_reader :type, 'Type'
5
+ mediainfo_duration_reader :timestamp_firstframe, 'TimeStamp_FirstFrame'
6
+ alias_method :timecode, :timestamp_firstframe
5
7
  end
6
8
  end
@@ -1,3 +1,3 @@
1
1
  module MediaInfoNative
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mediainfo-native
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - FlavourSys Technology GmbH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-31 00:00:00.000000000 Z
11
+ date: 2014-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: Extracts metadata from media files with mediainfo shared library
@@ -45,27 +45,27 @@ extensions:
45
45
  - ext/mediainfo_native/extconf.rb
46
46
  extra_rdoc_files: []
47
47
  files:
48
+ - ext/mediainfo_native/MediaInfoDLL.h
49
+ - ext/mediainfo_native/basestream.cpp
50
+ - ext/mediainfo_native/basestream.h
51
+ - ext/mediainfo_native/extconf.rb
52
+ - ext/mediainfo_native/mediainfo_native.cpp
53
+ - ext/mediainfo_native/mediainfo_wrapper.cpp
54
+ - ext/mediainfo_native/mediainfo_wrapper.h
55
+ - ext/mediainfo_native/unicode.cpp
56
+ - ext/mediainfo_native/unicode.h
48
57
  - lib/mediainfo-native.rb
49
58
  - lib/mediainfo-native/attr_readers.rb
50
59
  - lib/mediainfo-native/base_stream.rb
51
- - lib/mediainfo-native/version.rb
52
- - lib/mediainfo-native/streams/other.rb
60
+ - lib/mediainfo-native/mediainfo.rb
61
+ - lib/mediainfo-native/streams/audio.rb
62
+ - lib/mediainfo-native/streams/general.rb
53
63
  - lib/mediainfo-native/streams/image.rb
54
64
  - lib/mediainfo-native/streams/menu.rb
55
- - lib/mediainfo-native/streams/audio.rb
56
- - lib/mediainfo-native/streams/video.rb
65
+ - lib/mediainfo-native/streams/other.rb
57
66
  - lib/mediainfo-native/streams/text.rb
58
- - lib/mediainfo-native/streams/general.rb
59
- - lib/mediainfo-native/mediainfo.rb
60
- - ext/mediainfo_native/unicode.cpp
61
- - ext/mediainfo_native/MediaInfoDLL.h
62
- - ext/mediainfo_native/unicode.h
63
- - ext/mediainfo_native/extconf.rb
64
- - ext/mediainfo_native/mediainfo_wrapper.cpp
65
- - ext/mediainfo_native/basestream.h
66
- - ext/mediainfo_native/mediainfo_wrapper.h
67
- - ext/mediainfo_native/mediainfo_native.cpp
68
- - ext/mediainfo_native/basestream.cpp
67
+ - lib/mediainfo-native/streams/video.rb
68
+ - lib/mediainfo-native/version.rb
69
69
  homepage: http://github.com/flavoursys/mediainfo-native
70
70
  licenses:
71
71
  - MIT
@@ -76,17 +76,17 @@ require_paths:
76
76
  - lib
77
77
  required_ruby_version: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - '>='
79
+ - - ">="
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - '>='
84
+ - - ">="
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  requirements: []
88
88
  rubyforge_project:
89
- rubygems_version: 2.0.14
89
+ rubygems_version: 2.2.2
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: Native bindings for mediainfo