Sha256: 36e8dc5277fa53c919eaedfeba7826bd366eb85d19b8c89af57a66ace361bb62

Contents?: true

Size: 871 Bytes

Versions: 18

Compression:

Stored size: 871 Bytes

Contents

module Lolcommits
  class CaptureMac < Capturer
    def capture_device_string
      @capture_device.nil? ? nil : "-d \"#{@capture_device}\""
    end

    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

    def executable_path
      File.join(Configuration::LOLCOMMITS_ROOT, 'vendor', 'ext', 'imagesnap', 'imagesnap')
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
lolcommits-0.12.1 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.12.0 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.11.0 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.11.0.pre lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.10.0 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.10.0.pre1 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.9.8 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.9.7 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.9.7.pre1 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.9.6 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.9.5 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.9.5.pre1 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.9.4 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.9.4.pre1 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.9.3 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.9.3.pre3 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.9.3.pre2 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.9.3.pre1 lib/lolcommits/capturer/capture_mac.rb