Class: BMFF::Box::SampleToChunk

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

Instance Method Summary collapse

Instance Method Details

#to_sObject



205
206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/bmffglitch/bmffex.rb', line 205

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(@first_chunk[i])
    sio.write_uint32(@samples_per_chunk[i])
    sio.write_uint32(@sample_description_index[i])
  end
  compose(sio.string)
end