Class: FFmpeg::FilterGraph::Chain
- Inherits:
-
Object
- Object
- FFmpeg::FilterGraph::Chain
- Defined in:
- lib/ffmpeg/filter_graph/chain.rb
Overview
A Chain represents a pipeline of Filters, with zero or more inputs and outputs.
Instance Attribute Summary collapse
-
#filters ⇒ Object
Returns the value of attribute filters.
-
#inputs ⇒ Object
Returns the value of attribute inputs.
-
#outputs ⇒ Object
Returns the value of attribute outputs.
Instance Method Summary collapse
-
#initialize(inputs: [], outputs: [], filters: []) ⇒ Chain
constructor
A new instance of Chain.
- #to_s ⇒ Object
Constructor Details
#initialize(inputs: [], outputs: [], filters: []) ⇒ Chain
Returns a new instance of Chain.
8 9 10 11 12 |
# File 'lib/ffmpeg/filter_graph/chain.rb', line 8 def initialize(inputs: [], outputs: [], filters: []) self.inputs = Array(inputs).map { |pad| Pad.in(pad) } self.outputs = Array(outputs).map { |pad| Pad.out(pad) } self.filters = Array(filters).flatten.compact end |
Instance Attribute Details
#filters ⇒ Object
Returns the value of attribute filters.
6 7 8 |
# File 'lib/ffmpeg/filter_graph/chain.rb', line 6 def filters @filters end |
#inputs ⇒ Object
Returns the value of attribute inputs.
6 7 8 |
# File 'lib/ffmpeg/filter_graph/chain.rb', line 6 def inputs @inputs end |
#outputs ⇒ Object
Returns the value of attribute outputs.
6 7 8 |
# File 'lib/ffmpeg/filter_graph/chain.rb', line 6 def outputs @outputs end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/ffmpeg/filter_graph/chain.rb', line 14 def to_s "#{join(inputs)} #{join(filters, ', ')} #{join(outputs)}".strip end |