av_ff_common: use mcache
[dtas.git] / lib / dtas / source / ff.rb
blobc337b429bcdc81c9ca17282722a60476b6e3cdb5
1 # Copyright (C) all contributors <dtas-all@nongnu.org>
2 # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
3 # frozen_string_literal: true
4 require_relative '../../dtas'
5 require_relative 'av_ff_common'
7 # ffmpeg support
8 class DTAS::Source::Ff  # :nodoc:
9   include DTAS::Source::AvFfCommon
11   FF_DEFAULTS = COMMAND_DEFAULTS.merge(
12     "command" =>
13       'ffmpeg -v error $SSPOS $PROBE -i "$INFILE" $AMAP -f sox - |' \
14       'sox -p $SOXFMT - $TRIMFX $RGFX',
16     "tryorder" => 1,
17   )
19   def initialize
20     command_init(FF_DEFAULTS)
21     @mcache = nil
22     @av_ff_probe = "ffprobe"
23   end
25   def source_defaults
26     FF_DEFAULTS
27   end
28 end