Class: BMFF::Box::CompositionOffset

Inherits:
Object
  • Object
show all
Defined in:
lib/bmffglitch/bmffex.rb,
lib/bmffglitch/bmffex.rb

Instance Method Summary collapse

Instance Method Details

#to_sObject



161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/bmffglitch/bmffex.rb', line 161

def to_s
  sio = StringIO.new("", "r+")
  sio.set_encoding("ascii-8bit")
  sio.extend(BMFF::BinaryAccessor)
  
  sio.write_uint32(@entry_count)
  @entry_count.times do |i|
    sio.write_uint32(@sample_count[i])
    sio.write_uint32(@sample_offset[i])
  end
  compose(sio.string)
end