Module: ScreenRecorder Private
- Defined in:
- lib/screen-recorder.rb,
lib/screen-recorder/common.rb,
lib/screen-recorder/errors.rb,
lib/screen-recorder/titles.rb,
lib/screen-recorder/window.rb,
lib/screen-recorder/desktop.rb,
lib/screen-recorder/options.rb,
lib/screen-recorder/version.rb,
lib/screen-recorder/screenshot.rb,
lib/screen-recorder/type_checker.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Modules: Errors, Screenshot, Titles, TypeChecker Classes: Common, Desktop, Options, Window
Constant Summary collapse
- VERSION =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'1.6.0'.freeze
Class Method Summary collapse
-
.ffmpeg_binary ⇒ Object
Returns path to ffmpeg binary or raises DependencyNotFound.
-
.ffmpeg_binary=(bin) ⇒ Object
Uses user given FFMPEG binary.
-
.ffprobe_binary ⇒ Object
Returns path to ffprobe binary or raises DependencyNotFound.
-
.ffprobe_binary=(bin) ⇒ Object
Uses user given ffprobe binary.
-
.logger ⇒ Object
ScreenRecorder.logger.
-
.logger=(log) ⇒ Object
Set external logger if you want.
Class Method Details
.ffmpeg_binary ⇒ Object
Returns path to ffmpeg binary or raises DependencyNotFound
24 25 26 27 28 |
# File 'lib/screen-recorder.rb', line 24 def self.ffmpeg_binary FFMPEG.ffmpeg_binary rescue Errno::ENOENT # Raised when binary is not set in project or found in ENV raise Errors::DependencyNotFound end |
.ffmpeg_binary=(bin) ⇒ Object
Uses user given FFMPEG binary
14 15 16 17 18 19 |
# File 'lib/screen-recorder.rb', line 14 def self.ffmpeg_binary=(bin) ScreenRecorder.logger.debug 'Setting ffmpeg path...' FFMPEG.ffmpeg_binary = bin ScreenRecorder.logger.debug "ffmpeg path set: #{bin}" ScreenRecorder.ffmpeg_binary end |
.ffprobe_binary ⇒ Object
Returns path to ffprobe binary or raises DependencyNotFound
46 47 48 49 50 |
# File 'lib/screen-recorder.rb', line 46 def self.ffprobe_binary FFMPEG.ffprobe_binary rescue Errno::ENOENT # Raised when binary is not set in project or found in ENV raise Errors::DependencyNotFound end |
.ffprobe_binary=(bin) ⇒ Object
Uses user given ffprobe binary
36 37 38 39 40 41 |
# File 'lib/screen-recorder.rb', line 36 def self.ffprobe_binary=(bin) ScreenRecorder.logger.debug 'Setting ffprobe path...' FFMPEG.ffprobe_binary = bin ScreenRecorder.logger.debug "ffprobe path set: #{bin}" ScreenRecorder.ffmpeg_binary end |
.logger ⇒ Object
ScreenRecorder.logger
62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/screen-recorder.rb', line 62 def self.logger return @logger if @logger logger = Logger.new($stdout) logger.level = Logger::ERROR logger.progname = 'ScreenRecorder' logger.formatter = proc do |severity, time, progname, msg| "#{time.strftime('%F %T')} #{progname} - #{severity} - #{msg}\n" end logger.debug 'Logger initialized.' @logger = logger end |
.logger=(log) ⇒ Object
Set external logger if you want.
55 56 57 |
# File 'lib/screen-recorder.rb', line 55 def self.logger=(log) @logger = log end |