class FileData::BoxPath
Finds Mpeg4
boxes within a stream
Public Class Methods
get_path(stream_view, *box_path)
click to toggle source
def self.get_box_path(box, *box_path)
get_path(box.content_stream, *box_path)
end
# File lib/file_data/formats/mpeg4/box_path.rb, line 14 def self.get_path(stream_view, *box_path) match = BoxesReader.read(stream_view).find { |x| x.type == box_path[0] } if match.nil? nil elsif box_path.length == 1 match else get_path(match.content_stream, *box_path[1..-1]) end end
get_root_path(stream, *box_path)
click to toggle source
# File lib/file_data/formats/mpeg4/box_path.rb, line 6 def self.get_root_path(stream, *box_path) get_path(Helpers::StreamView.new(stream), *box_path) end