Sha256: c8c87f4aacbcbe3feb5865d838b73f786a76aae21740ea244b10500d3d604c05

Contents?: true

Size: 607 Bytes

Versions: 4

Compression:

Stored size: 607 Bytes

Contents

module Lolcommits
  class CaptureWindows < Capturer
    def capture
      commandcam_exe = File.join Configuration::LOLCOMMITS_ROOT, "ext", "CommandCam", "CommandCam.exe"
      # 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
      _, r, _ = Open3.popen3("#{commandcam_exe} /filename #{snapshot_location}#{delaycmd}")
      # looks like we still need to read the output for something to happen
      r.read
    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lolcommits-0.3.1 lib/lolcommits/capture_windows.rb
lolcommits-0.3.0 lib/lolcommits/capture_windows.rb
lolcommits-0.3.0.pre2 lib/lolcommits/capture_windows.rb
lolcommits-0.3.0.pre1 lib/lolcommits/capture_windows.rb