Class: BMFF::Box::TrackRun
Overview
vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
Instance Attribute Summary collapse
-
#data_offset ⇒ Object
Returns the value of attribute data_offset.
-
#first_sample_flags ⇒ Object
Returns the value of attribute first_sample_flags.
-
#sample_composition_time_offset ⇒ Object
Returns the value of attribute sample_composition_time_offset.
-
#sample_count ⇒ Object
Returns the value of attribute sample_count.
-
#sample_duration ⇒ Object
Returns the value of attribute sample_duration.
-
#sample_flags ⇒ Object
Returns the value of attribute sample_flags.
-
#sample_size ⇒ Object
Returns the value of attribute sample_size.
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
#data_offset ⇒ Object
Returns the value of attribute data_offset.
5 6 7 |
# File 'lib/bmff/box/track_run.rb', line 5 def data_offset @data_offset end |
#first_sample_flags ⇒ Object
Returns the value of attribute first_sample_flags.
5 6 7 |
# File 'lib/bmff/box/track_run.rb', line 5 def first_sample_flags @first_sample_flags end |
#sample_composition_time_offset ⇒ Object
Returns the value of attribute sample_composition_time_offset.
5 6 7 |
# File 'lib/bmff/box/track_run.rb', line 5 def sample_composition_time_offset @sample_composition_time_offset end |
#sample_count ⇒ Object
Returns the value of attribute sample_count.
5 6 7 |
# File 'lib/bmff/box/track_run.rb', line 5 def sample_count @sample_count end |
#sample_duration ⇒ Object
Returns the value of attribute sample_duration.
5 6 7 |
# File 'lib/bmff/box/track_run.rb', line 5 def sample_duration @sample_duration end |
#sample_flags ⇒ Object
Returns the value of attribute sample_flags.
5 6 7 |
# File 'lib/bmff/box/track_run.rb', line 5 def sample_flags @sample_flags end |
#sample_size ⇒ Object
Returns the value of attribute sample_size.
5 6 7 |
# File 'lib/bmff/box/track_run.rb', line 5 def sample_size @sample_size end |
Instance Method Details
#parse_data ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/bmff/box/track_run.rb', line 9 def parse_data super @sample_count = io.get_uint32 @data_offset = io.get_int32 if flags & 0x01 > 0 @first_sample_flags = io.get_uint32 if flags & 0x04 > 0 @sample_duration = [] if flags & 0x0100 > 0 @sample_size = [] if flags & 0x0200 > 0 @sample_flags = [] if flags & 0x0400 > 0 @sample_composition_time_offset = [] if flags & 0x0800 > 0 @sample_count.times do @sample_duration << io.get_uint32 if flags & 0x0100 > 0 @sample_size << io.get_uint32 if flags & 0x0200 > 0 @sample_flags << io.get_uint32 if flags & 0x0400 > 0 if flags & 0x0800 > 0 if version == 0 @sample_composition_time_offset << io.get_uint32 else @sample_composition_time_offset << io.get_int32 end end end end |