Class: VCSRuby::LibAVMetaInfo
- Inherits:
-
Object
- Object
- VCSRuby::LibAVMetaInfo
- Defined in:
- lib/libAV/libav_meta_info.rb
Instance Attribute Summary collapse
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Instance Method Summary collapse
- #bit_rate ⇒ Object
- #duration ⇒ Object
- #extension ⇒ Object
- #format ⇒ Object
-
#initialize(meta_info) ⇒ LibAVMetaInfo
constructor
A new instance of LibAVMetaInfo.
- #size ⇒ Object
Constructor Details
#initialize(meta_info) ⇒ LibAVMetaInfo
Returns a new instance of LibAVMetaInfo.
13 14 15 |
# File 'lib/libAV/libav_meta_info.rb', line 13 def initialize @raw = end |
Instance Attribute Details
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
11 12 13 |
# File 'lib/libAV/libav_meta_info.rb', line 11 def raw @raw end |
Instance Method Details
#bit_rate ⇒ Object
21 22 23 |
# File 'lib/libAV/libav_meta_info.rb', line 21 def bit_rate @raw['bit_rate'].to_i end |
#duration ⇒ Object
17 18 19 |
# File 'lib/libAV/libav_meta_info.rb', line 17 def duration TimeIndex.new(@raw['duration'].to_f) end |
#extension ⇒ Object
33 34 35 |
# File 'lib/libAV/libav_meta_info.rb', line 33 def extension @raw['format_name'] end |
#format ⇒ Object
29 30 31 |
# File 'lib/libAV/libav_meta_info.rb', line 29 def format @raw['format_long_name'] end |
#size ⇒ Object
25 26 27 |
# File 'lib/libAV/libav_meta_info.rb', line 25 def size @raw['size'].to_i end |