class BMFF::Box::PaddingBits

vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:

Attributes

pad1[RW]
pad2[RW]
reserved1[RW]
reserved2[RW]
sample_count[RW]

Public Instance Methods

parse_data() click to toggle source
Calls superclass method BMFF::Box::Full#parse_data
# 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