Module: VideoTranscoding::MPlayer
Constant Summary collapse
- COMMAND_NAME =
'mplayer'
Instance Method Summary collapse
Instance Method Details
#command_name ⇒ Object
30 31 32 |
# File 'lib/video_transcoding/mplayer.rb', line 30 def command_name Tool.use(COMMAND_NAME) end |
#setup ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/video_transcoding/mplayer.rb', line 13 def setup Tool.provide(COMMAND_NAME, ['-version']) do |output, _, _| unless output =~ /^MPlayer .*-([0-9]+)\.([0-9]+)(?:\.[0-9]+)? / Console.debug output fail "#{COMMAND_NAME} version unknown" end major_version = $1.to_i minor_version = $2.to_i Console.info "#{$MATCH}found..." unless ((major_version * 100) + minor_version) >= 402 fail "#{COMMAND_NAME} version 4.2 or later required" end end end |