Sha256: 4cfe1034e7d4a408b0171e2fdd10281d0fbbd29e0622d4299c8ff0f0cbfc2cc0

Contents?: true

Size: 695 Bytes

Versions: 21

Compression:

Stored size: 695 Bytes

Contents

# -*- encoding : utf-8 -*-
module Lolcommits
  class CaptureCygwin < Capturer
    def capture
      # DirectShow takes a while to show... at least for me anyway
      delaycmd = ' /delay 3000'
      if capture_delay > 0
        # CommandCam delay is in milliseconds
        delaycmd = " /delay #{capture_delay * 1000}"
      end

      _stdin, stdout, _stderr = Open3.popen3("#{executable_path} /filename `cygpath -w #{snapshot_location}`#{delaycmd}")

      # looks like we still need to read the output for something to happen
      stdout.read
    end

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

Version data entries

21 entries across 21 versions & 2 rubygems

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