Class: FLV::Edit::Processor::Update

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

Overview

Update is a Processor class (see Base and desc)

Constant Summary

Constants included from Dispatcher

Dispatcher::ALL_EVENTS, Dispatcher::EVENT_TRIGGER, Dispatcher::EVENT_TRIGGER_LIST, Dispatcher::MAIN_EVENTS

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods included from Dispatcher

#absorb, #dispatch_instead, included, #stop

Methods inherited from Base

#clone, #each_source, #process_all

Constructor Details

#initialize(source = nil, options = {}) ⇒ Update

Returns a new instance of Update.



13
14
15
16
# File 'lib/flvedit/processor/update.rb', line 13

def initialize(source=nil, options={})
  super
  @meta_data_maker = MetaDataMaker.new(source.clone, options)
end

Instance Method Details

#eachObject



19
20
21
22
23
24
25
26
27
28
29
# File 'lib/flvedit/processor/update.rb', line 19

def each
  return to_enum unless block_given?
  begin
    @meta_data_maker.each {}
  rescue Exception => e  # even if each throws, we better call super otherwise we won't be synchronized anymore!
    super rescue nil
    raise e
  else
    super
  end
end

#on_header(header) ⇒ Object



33
34
35
# File 'lib/flvedit/processor/update.rb', line 33

def on_header(header)
  dispatch_instead header, Tag.new(0, @meta_data_maker.)
end