Sha256: eb3fb934c2ac6e193bf3423f5d2da239b5b00f649ba56d5ea3e49269c2157a3b
Contents?: true
Size: 1.06 KB
Versions: 14
Compression:
Stored size: 1.06 KB
Contents
require_relative "printer" module FLV module Edit module Processor # Debug is a Processor class (see Base and desc) class Debug < Base include Filter desc ["Prints out the details of all tags. Information that stays the same", "from one tag type to the next will not be repeated.", "A RANGE argument will limit the output to tags within that range;", "similarily, a given TIMESTAMP will limit the output to tags", "within 0.1s of this timestamp."], :param => {:class => TimestampOrTimestampRange, :name => "[RANGE/TS]"} def before_filter @range = self.options[:debug] || TimestampRange.new(0, INFINITY) @range = @range.widen(0.1) unless @range.is_a? Range @last = {} @printer = Printer.new(options[:out]) end def filter(tag) return unless @range.include? tag.timestamp tag.debug(@printer, @last[tag.body.class]) @last[tag.body.class] = tag end end end end end
Version data entries
14 entries across 14 versions & 2 rubygems