Permalink
Browse files

jruby sanity

  • Loading branch information...
1 parent c57c3c8 commit c86329d3beb79d1a7b4e3fccc605560d9415d9a5 @rdp committed Oct 13, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/simple_gui_creator/ffmpeg_helpers.rb
@@ -44,13 +44,16 @@ def self.get_options_video_device name
end
def self.warmup_ffmpeg_so_itll_be_disk_cached
- system "ffmpeg -list_devices true -f dshow -i dummy 2>&1"
+ system "ffmpeg -list_devices true -f dshow -i dummy 2>&1" # outputs to stdout but...that's informative sometimes
end
def self.wait_for_ffmpeg_close out_handle # like the result of IO.popen("ffmpeg ...", "w")
# requires some funky version of jruby to work...
while !out_handle.closed?
begin
+ if OS.jruby?
+ raise 'need jruby 1.7.0 for working Process.kill 0 in windows' unless JRUBY_VERSION >= '1.7.0'
+ end
Process.kill 0, out_handle.pid # ping it
sleep 0.2
rescue Errno::EPERM => e

0 comments on commit c86329d

Please sign in to comment.