Class: VCSRuby::Capturer
- Inherits:
-
Object
show all
- Defined in:
- lib/capturer.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.create ⇒ Object
17
18
19
20
21
22
23
24
25
|
# File 'lib/capturer.rb', line 17
def self.create
capturers = []
capturers << LibAV.new(video)
capturers << MPlayer.new(video)
capturers << FFmpeg.new(video)
return capturers.first
end
|
.initialize_capturers(video) ⇒ Object
13
14
15
|
# File 'lib/capturer.rb', line 13
def self.initialize_capturers video
puts "Available capturers: #{available_capturers.map{ |c| c.to_s }.join(', ')}" if Tools.verbose?
end
|
Instance Method Details
#available? ⇒ Boolean
9
10
11
|
# File 'lib/capturer.rb', line 9
def available?
false
end
|
27
28
29
|
# File 'lib/capturer.rb', line 27
def format
@format || available_formats.first
end
|
35
36
37
38
39
40
41
|
# File 'lib/capturer.rb', line 35
def format= format
if available_formats.include? format
@format = format
else
raise "Capturer '#{name}' does not support format: '#{format}'"
end
end
|
31
32
33
|
# File 'lib/capturer.rb', line 31
def format_extension
$formats[format]
end
|