Class: Ffmprb::Process::Input::Looping

Inherits:
ChainBase show all
Defined in:
lib/ffmprb/process/input/looping.rb

Instance Attribute Summary collapse

Attributes inherited from Ffmprb::Process::Input

#io, #process

Instance Method Summary collapse

Methods inherited from ChainBase

#chain_copy, #unfiltered, #unfiltered=

Methods inherited from Ffmprb::Process::Input

#audio, #chain_copy, #channel?, #copy, #crop, #cut, #loop, #mute, #options, resolve, #temporise!, #video, #volume

Constructor Details

#initialize(unfiltered, times) ⇒ Looping

Returns a new instance of Looping.



15
16
17
18
19
20
21
22
23
24
# File 'lib/ffmprb/process/input/looping.rb', line 15

def initialize(unfiltered, times)
  super unfiltered
  @times = times

  @raw = unfiltered
  @raw = @raw.unfiltered  while @raw.respond_to? :unfiltered
  @src_io = @raw.io
  @raw.temporise!
  @aux_input = @raw.process.temp_input(@src_io.extname)
end

Instance Attribute Details

#timesObject (readonly)

Returns the value of attribute times.



13
14
15
# File 'lib/ffmprb/process/input/looping.rb', line 13

def times
  @times
end

Instance Method Details

#filters_for(lbl, video:, audio:) ⇒ Object



26
27
28
29
30
31
32
# File 'lib/ffmprb/process/input/looping.rb', line 26

def filters_for(lbl, video:, audio:)

  # Looping

  loop_unfiltered(video: video, audio: audio).filters_for lbl,
    video: OpenStruct.new, audio: OpenStruct.new  # NOTE the processing is done before looping
end