Class: BMFF::Box::SampleDependencyType
- Defined in:
- lib/bmff/box/sample_dependency_type.rb
Overview
vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
Instance Attribute Summary collapse
-
#is_leading ⇒ Object
Returns the value of attribute is_leading.
-
#sample_depends_on ⇒ Object
Returns the value of attribute sample_depends_on.
-
#sample_has_redundancy ⇒ Object
Returns the value of attribute sample_has_redundancy.
-
#sample_is_depended_on ⇒ Object
Returns the value of attribute sample_is_depended_on.
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, register_uuid_box, #remaining_size, #root, #seek_to_end
Instance Attribute Details
#is_leading ⇒ Object
Returns the value of attribute is_leading.
5 6 7 |
# File 'lib/bmff/box/sample_dependency_type.rb', line 5 def is_leading @is_leading end |
#sample_depends_on ⇒ Object
Returns the value of attribute sample_depends_on.
5 6 7 |
# File 'lib/bmff/box/sample_dependency_type.rb', line 5 def sample_depends_on @sample_depends_on end |
#sample_has_redundancy ⇒ Object
Returns the value of attribute sample_has_redundancy.
5 6 7 |
# File 'lib/bmff/box/sample_dependency_type.rb', line 5 def sample_has_redundancy @sample_has_redundancy end |
#sample_is_depended_on ⇒ Object
Returns the value of attribute sample_is_depended_on.
5 6 7 |
# File 'lib/bmff/box/sample_dependency_type.rb', line 5 def sample_is_depended_on @sample_is_depended_on end |
Instance Method Details
#parse_data ⇒ Object
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 |