Class: FFmpeg::FilterGraph::Graph
- Inherits:
-
Object
- Object
- FFmpeg::FilterGraph::Graph
- Defined in:
- lib/ffmpeg/filter_graph/graph.rb
Instance Attribute Summary collapse
-
#chains ⇒ Object
Returns the value of attribute chains.
-
#outputs ⇒ Object
Returns the value of attribute outputs.
Instance Method Summary collapse
- #add_outputs(*pads) ⇒ Object
-
#initialize(chains: [], outputs: []) ⇒ Graph
constructor
A new instance of Graph.
- #to_s ⇒ Object
Constructor Details
#initialize(chains: [], outputs: []) ⇒ Graph
Returns a new instance of Graph.
5 6 7 8 |
# File 'lib/ffmpeg/filter_graph/graph.rb', line 5 def initialize(chains: [], outputs: []) self.chains = chains self.outputs = outputs end |
Instance Attribute Details
#chains ⇒ Object
Returns the value of attribute chains.
3 4 5 |
# File 'lib/ffmpeg/filter_graph/graph.rb', line 3 def chains @chains end |
#outputs ⇒ Object
Returns the value of attribute outputs.
3 4 5 |
# File 'lib/ffmpeg/filter_graph/graph.rb', line 3 def outputs @outputs end |
Instance Method Details
#add_outputs(*pads) ⇒ Object
10 11 12 |
# File 'lib/ffmpeg/filter_graph/graph.rb', line 10 def add_outputs(*pads) self.outputs.push(*pads.map(&:to_s)) end |
#to_s ⇒ Object
14 15 16 17 18 19 |
# File 'lib/ffmpeg/filter_graph/graph.rb', line 14 def to_s [ chains.map(&:to_s).join('; '), outputs.map { |o| "[#{o}]" }.join(''), ].join('') end |