Sha256: 4f2d93ae292308ac64176a8380c1c4b88b7289e57547d77ea53c76e4466ba114

Contents?: true

Size: 656 Bytes

Versions: 18

Compression:

Stored size: 656 Bytes

Contents

module Lolcommits
  class CaptureWindows < 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 #{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

18 entries across 18 versions & 1 rubygems

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