Class: FLV::Edit::Processor::Debug

Inherits:
Base
  • Object
show all
Includes:
Filter
Defined in:
lib/flvedit/processor/debug.rb

Overview

Debug is a Processor class (see Base and desc)

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods included from Filter

#each

Methods inherited from Base

#clone, #each, #each_source, #initialize, #process_all

Constructor Details

This class inherits a constructor from FLV::Edit::Processor::Base

Instance Method Details

#before_filterObject



17
18
19
20
21
22
# File 'lib/flvedit/processor/debug.rb', line 17

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

#filter(tag) ⇒ Object



24
25
26
27
28
# File 'lib/flvedit/processor/debug.rb', line 24

def filter(tag)
  return unless @range.include? tag.timestamp
  tag.debug(@printer, @last[tag.body.class])
  @last[tag.body.class] = tag
end