Class: Mediakit::FFmpeg
- Inherits:
-
Object
- Object
- Mediakit::FFmpeg
- Defined in:
- lib/mediakit/ffmpeg.rb,
lib/mediakit/ffmpeg/options.rb
Defined Under Namespace
Modules: BaseTypeMatcher Classes: AudioCodec, AudioDecoder, AudioEncoder, Codec, Decoder, Encoder, FFmpegError, Format, Options, SubtitleCodec, SubtitleDecoder, SubtitleEncoder, VideoCodec, VideoDecoder, VideoEncoder
Class Attribute Summary collapse
-
.default_global_option ⇒ Object
Returns the value of attribute default_global_option.
Instance Attribute Summary collapse
-
#codecs ⇒ Object
readonly
Returns the value of attribute codecs.
-
#decoders ⇒ Object
readonly
Returns the value of attribute decoders.
-
#encoders ⇒ Object
readonly
Returns the value of attribute encoders.
-
#formats ⇒ Object
readonly
Returns the value of attribute formats.
Class Method Summary collapse
Instance Method Summary collapse
- #command(options, driver_options = {}) ⇒ Object
- #init ⇒ Object
-
#initialize(driver) ⇒ FFmpeg
constructor
A new instance of FFmpeg.
-
#run(options, driver_options = {}) ⇒ Object
execute runners with options object.
Constructor Details
#initialize(driver) ⇒ FFmpeg
Returns a new instance of FFmpeg.
21 22 23 24 |
# File 'lib/mediakit/ffmpeg.rb', line 21 def initialize(driver) @driver = driver @codecs, @formats, @decoders, @encoders = [], [], [], [] end |
Class Attribute Details
.default_global_option ⇒ Object
Returns the value of attribute default_global_option.
11 12 13 |
# File 'lib/mediakit/ffmpeg.rb', line 11 def default_global_option @default_global_option end |
Instance Attribute Details
#codecs ⇒ Object (readonly)
Returns the value of attribute codecs.
15 16 17 |
# File 'lib/mediakit/ffmpeg.rb', line 15 def codecs @codecs end |
#decoders ⇒ Object (readonly)
Returns the value of attribute decoders.
15 16 17 |
# File 'lib/mediakit/ffmpeg.rb', line 15 def decoders @decoders end |
#encoders ⇒ Object (readonly)
Returns the value of attribute encoders.
15 16 17 |
# File 'lib/mediakit/ffmpeg.rb', line 15 def encoders @encoders end |
#formats ⇒ Object (readonly)
Returns the value of attribute formats.
15 16 17 |
# File 'lib/mediakit/ffmpeg.rb', line 15 def formats @formats end |
Class Method Details
Instance Method Details
#command(options, driver_options = {}) ⇒ Object
38 39 40 41 |
# File 'lib/mediakit/ffmpeg.rb', line 38 def command(, = {}) args = .compose(self.class.default_global_option) @driver.command(args, ) end |
#init ⇒ Object
26 27 28 |
# File 'lib/mediakit/ffmpeg.rb', line 26 def init Mediakit::Initializers::FFmpeg.setup(self) end |
#run(options, driver_options = {}) ⇒ Object
execute runners with options object
33 34 35 36 |
# File 'lib/mediakit/ffmpeg.rb', line 33 def run(, = {}) args = .compose(self.class.default_global_option) @driver.run(args, ) end |