mediainfo-native 0.2.8 → 0.2.9

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: 7872bbea265d1cc562d8684dceabc2624364550bdc74e07362e7ad5a696a0523
4
- data.tar.gz: d5feba86a2c1404029c0843b5d82c4f763296d7b8965726e16e9d637bec946c0
3
+ metadata.gz: cc1cb6b37d320316c8b909401511361a3354cc25a7a246d6aa5a25fc5005d767
4
+ data.tar.gz: c495092814ed874dca479e8e130bd80c77465a69b001c54d9ea0487e8b5e5a2a
5
5
  SHA512:
6
- metadata.gz: ad9a1b66cc3b84134615e300b523c13092a0d8a4f647c722b474405bafa1b5bcd3d5a7131146e9baeae9b8f24956443a3c45e7de353dc1b090bb08664cd30716
7
- data.tar.gz: f1e0a56e056e6b296c8f7195fa6f2e73c5323828a011a3d0c81916d64209ba201b3db212f9d538ecb5057b05ac111d0f174923ae9644cd32e383e23f1c464778
6
+ metadata.gz: 68f7cbb0f8b8d829a0be7c2d7ea98e676df82ccd0c80bc47d6277ffefed468426a7bcf8c288743428fa6778b44363f3c9dffa63d76208396f523761d8ab70898
7
+ data.tar.gz: 183be53bc08407becb4d67cde69ebfbc1e5705025725679d1f0ce318fd0296dffea6d950157a9efe70efc5cdc332a8cba9abc6abd40a9f3d4100c65f4caba337
@@ -31,12 +31,13 @@ VALUE stream_klasses[STREAM_TYPE_MAX];
31
31
  void Init_BaseStream(VALUE mMediaInfoNative)
32
32
  {
33
33
  VALUE cBaseStream = rb_define_class_under(mMediaInfoNative, "BaseStream", rb_cObject);
34
+ VALUE cBaseStreamWithFramerate = rb_define_class_under(mMediaInfoNative, "BaseStreamWithFramerate", cBaseStream);
34
35
 
35
36
  stream_klasses[GENERAL] = rb_define_class_under(mMediaInfoNative, "GeneralStream", cBaseStream);
36
- stream_klasses[VIDEO] = rb_define_class_under(mMediaInfoNative, "VideoStream", cBaseStream);
37
+ stream_klasses[VIDEO] = rb_define_class_under(mMediaInfoNative, "VideoStream", cBaseStreamWithFramerate);
37
38
  stream_klasses[AUDIO] = rb_define_class_under(mMediaInfoNative, "AudioStream", cBaseStream);
38
39
  stream_klasses[TEXT] = rb_define_class_under(mMediaInfoNative, "TextStream", cBaseStream);
39
- stream_klasses[OTHER] = rb_define_class_under(mMediaInfoNative, "OtherStream", cBaseStream);
40
+ stream_klasses[OTHER] = rb_define_class_under(mMediaInfoNative, "OtherStream", cBaseStreamWithFramerate);
40
41
  stream_klasses[IMAGE] = rb_define_class_under(mMediaInfoNative, "ImageStream", cBaseStream);
41
42
  stream_klasses[MENU] = rb_define_class_under(mMediaInfoNative, "MenuStream", cBaseStream);
42
43
 
@@ -0,0 +1,9 @@
1
+ module MediaInfoNative
2
+ class BaseStreamWithFramerate < BaseStream
3
+ mediainfo_attr_reader :frame_rate, 'FrameRate'
4
+ def fps
5
+ frame_rate[/[\d.]+/].to_f if frame_rate
6
+ end
7
+ alias_method :framerate, :fps
8
+ end
9
+ end
@@ -1,5 +1,5 @@
1
1
  module MediaInfoNative
2
- class OtherStream < BaseStream
2
+ class OtherStream < BaseStreamWithFramerate
3
3
  mediainfo_attr_reader :stream_id, 'ID'
4
4
  mediainfo_attr_reader :type, 'Type'
5
5
  mediainfo_attr_reader :timecode, 'TimeCode_FirstFrame'
@@ -1,5 +1,5 @@
1
1
  module MediaInfoNative
2
- class VideoStream < BaseStream
2
+ class VideoStream < BaseStreamWithFramerate
3
3
  mediainfo_attr_reader :stream_id, 'ID'
4
4
 
5
5
  mediainfo_duration_reader :duration, 'Duration'
@@ -57,12 +57,6 @@ module MediaInfoNative
57
57
  mediainfo_attr_reader :codec, 'Codec'
58
58
  alias_method :codec_id_info, :codec_info
59
59
 
60
- mediainfo_attr_reader :frame_rate, 'FrameRate'
61
- def fps
62
- frame_rate[/[\d.]+/].to_f if frame_rate
63
- end
64
- alias_method :framerate, :fps
65
-
66
60
  mediainfo_attr_reader :nominal_frame_rate, 'FrameRate_Nominal'
67
61
  def nominal_fps
68
62
  nominal_frame_rate[/[\d.]+/].to_f if nominal_frame_rate
@@ -1,3 +1,3 @@
1
1
  module MediaInfoNative
2
- VERSION = '0.2.8'.freeze
2
+ VERSION = '0.2.9'.freeze
3
3
  end
@@ -2,6 +2,7 @@ require 'mediainfo_native.so'
2
2
 
3
3
  require 'mediainfo-native/attr_readers'
4
4
  require 'mediainfo-native/base_stream'
5
+ require 'mediainfo-native/base_stream_with_framerate'
5
6
  require 'mediainfo-native/streams/audio'
6
7
  require 'mediainfo-native/streams/general'
7
8
  require 'mediainfo-native/streams/image'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mediainfo-native
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Projective Technology GmbH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-20 00:00:00.000000000 Z
11
+ date: 2024-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -57,6 +57,7 @@ files:
57
57
  - lib/mediainfo-native.rb
58
58
  - lib/mediainfo-native/attr_readers.rb
59
59
  - lib/mediainfo-native/base_stream.rb
60
+ - lib/mediainfo-native/base_stream_with_framerate.rb
60
61
  - lib/mediainfo-native/mediainfo.rb
61
62
  - lib/mediainfo-native/streams/audio.rb
62
63
  - lib/mediainfo-native/streams/general.rb
@@ -85,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
86
  - !ruby/object:Gem::Version
86
87
  version: '0'
87
88
  requirements: []
88
- rubygems_version: 3.2.15
89
+ rubygems_version: 3.2.32
89
90
  signing_key:
90
91
  specification_version: 4
91
92
  summary: Native bindings for mediainfo