class Lolcommits::CaptureMac
Public Instance Methods
capture()
click to toggle source
# File lib/lolcommits/capturer/capture_mac.rb, line 7 def capture # TODO: check we have a webcam we can capture from first. See issue #219 # operating laptop in clamshell (lid closed) from 2nd desktop screen, # needs to better handle the capturer (imagesnap, videosnap # CommandCam, mplayer) return code or check with an option before # attempting capture. Alt solution is puttin in prompt mode option :( call_str = "#{executable_path} -q \"#{snapshot_location}\" -w #{capture_delay} #{capture_device_string}" debug "Capturer: making system call for #{call_str}" system(call_str) end
capture_device_string()
click to toggle source
# File lib/lolcommits/capturer/capture_mac.rb, line 3 def capture_device_string @capture_device.nil? ? nil : "-d \"#{@capture_device}\"" end
executable_path()
click to toggle source
# File lib/lolcommits/capturer/capture_mac.rb, line 18 def executable_path File.join(Configuration::LOLCOMMITS_ROOT, 'vendor', 'ext', 'imagesnap', 'imagesnap') end