Class: VideoConverter::Mp4frag

Inherits:
Object
  • Object
show all
Defined in:
lib/video_converter/mp4frag.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.binObject

Returns the value of attribute bin.



6
7
8
# File 'lib/video_converter/mp4frag.rb', line 6

def bin
  @bin
end

.commandObject

Returns the value of attribute command.



6
7
8
# File 'lib/video_converter/mp4frag.rb', line 6

def command
  @command
end

Class Method Details

.run(outputs) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/video_converter/mp4frag.rb', line 11

def self.run(outputs)
    success = true
    threads = []
	command = Command.new(self.command, prepare_params(outputs))
    if VideoConverter.paral
      threads << Thread.new { success &&= command.execute }
    else
      success &&= command.execute
    end
    threads.each { |t| t.join } if VideoConverter.paral
    success
end