Class: FileData::BoxesReader
- Inherits:
-
Object
- Object
- FileData::BoxesReader
- Defined in:
- lib/file_data/formats/mpeg4/boxes_reader.rb
Overview
Returns all boxes starting from the current position of a stream
Class Method Summary collapse
Class Method Details
.read(view) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/file_data/formats/mpeg4/boxes_reader.rb', line 7 def self.read(view) Enumerator.new do |e| view.seek view.start_pos until view.eof? box = Box.parse(view) e.yield box view.seek box.end_pos + 1 end end.lazy end |