Class: Ffmprb::Process::Input::Channeled

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

Instance Attribute Summary

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

#args, #audio, audio_args, #chain_copy, #channel?, #copy, #crop, #cut, #loop, #mute, #pace, #pp, resolve, #reverse, #temporise_io!, #video, video_args, #volume

Constructor Details

#initialize(unfiltered, video: true, audio: true) ⇒ Channeled

Returns a new instance of Channeled.



17
18
19
20
# File 'lib/ffmprb/process/input/channeled.rb', line 17

def initialize(unfiltered, video: true, audio: true)
  super unfiltered
  @limited_channels = {video: video, audio: audio}
end

Instance Method Details

#channel(medium) ⇒ Object



22
23
24
# File 'lib/ffmprb/process/input/channeled.rb', line 22

def channel(medium)
  super(medium)  if @limited_channels[medium]
end

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



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

def filters_for(lbl, video:, audio:)

  # Doing basically nothing

  unfiltered.filters_for lbl,
    video: channel?(:video) && video, audio: channel?(:audio) && audio
end