Class: BMFF::Box::PaddingBits
- Defined in:
- lib/bmff/box/padding_bits.rb
Overview
vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
Instance Attribute Summary collapse
-
#pad1 ⇒ Object
Returns the value of attribute pad1.
-
#pad2 ⇒ Object
Returns the value of attribute pad2.
-
#reserved1 ⇒ Object
Returns the value of attribute reserved1.
-
#reserved2 ⇒ Object
Returns the value of attribute reserved2.
-
#sample_count ⇒ Object
Returns the value of attribute sample_count.
Attributes inherited from Full
Attributes inherited from Base
#io, #largesize, #offset, #parent, #size, #type, #usertype
Instance Method Summary collapse
Methods inherited from Base
#actual_size, #container?, #eob?, #parse, register_box, #remaining_size, #seek_to_end
Instance Attribute Details
#pad1 ⇒ Object
Returns the value of attribute pad1.
5 6 7 |
# File 'lib/bmff/box/padding_bits.rb', line 5 def pad1 @pad1 end |
#pad2 ⇒ Object
Returns the value of attribute pad2.
5 6 7 |
# File 'lib/bmff/box/padding_bits.rb', line 5 def pad2 @pad2 end |
#reserved1 ⇒ Object
Returns the value of attribute reserved1.
5 6 7 |
# File 'lib/bmff/box/padding_bits.rb', line 5 def reserved1 @reserved1 end |
#reserved2 ⇒ Object
Returns the value of attribute reserved2.
5 6 7 |
# File 'lib/bmff/box/padding_bits.rb', line 5 def reserved2 @reserved2 end |
#sample_count ⇒ Object
Returns the value of attribute sample_count.
5 6 7 |
# File 'lib/bmff/box/padding_bits.rb', line 5 def sample_count @sample_count end |
Instance Method Details
#parse_data ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/bmff/box/padding_bits.rb', line 8 def parse_data super @sample_count = io.get_uint32 @reserved1 = [] @pad1 = [] @reserved2 = [] @pad2 = [] ((@sample_count + 1) / 2).times do tmp = io.get_uint8 @reserved1 << ((tmp & 0x80) > 0) @pad1 << ((tmp >> 4) & 0x07) @reserved2 << ((tmp & 0x08) > 0) @pad2 << (tmp & 0x07) end end |