Sha256: 73a615b296ce18379a2756ca5b3dcbe578f43e1b5cb1f4e14db9140b5970759a

Contents?: true

Size: 898 Bytes

Versions: 28

Compression:

Stored size: 898 Bytes

Contents

# -*- encoding : utf-8 -*-
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

28 entries across 28 versions & 2 rubygems

Version Path
lolcommits-0.9.2 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.9.2.pre1 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.9.1 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.9.1.pre1 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.9.0 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.8.1 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.8.0 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.7.0 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.6.7 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.6.6 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.6.6.pre1 lib/lolcommits/capturer/capture_mac.rb
snapgit-0.6.5 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.6.5 lib/lolcommits/capturer/capture_mac.rb
snapgit-0.6.4 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.6.4 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.6.3 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.6.3.pre1 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.6.2 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.6.2.pre1 lib/lolcommits/capturer/capture_mac.rb
lolcommits-0.6.1 lib/lolcommits/capturer/capture_mac.rb