Method: BMFF::Box::SampleDependencyType#parse_data

Defined in:
lib/bmff/box/sample_dependency_type.rb

#parse_dataObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/bmff/box/sample_dependency_type.rb', line 8

def parse_data
  super
  sample_size_box = parent.find(BMFF::Box::SampleSize)
  if sample_size_box
    sample_count = sample_size_box.sample_count
    @is_leading = []
    @sample_depends_on = []
    @sample_is_depended_on = []
    @sample_has_redundancy = []
    sample_count.times do
      tmp = io.get_uint8
      @is_leading << (tmp >> 6)
      @sample_depends_on << ((tmp >> 4) & 0x03)
      @sample_is_depended_on << ((tmp >> 2) & 0x03)
      @sample_has_redundancy << (tmp & 0x03)
    end
  end
end