Skip to content

Commit

Permalink
Renamed start to capture.
Browse files Browse the repository at this point in the history
  • Loading branch information
iafonov committed Aug 17, 2011
1 parent 844fd69 commit 250806c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/headless/video/video_recorder.rb
Expand Up @@ -10,7 +10,7 @@ def initialize(display, dimensions, options = {})
@pid_file = "/tmp/.recorder_#{@display}-lock"
end

def start
def capture
CliUtil.fork_process("ffmpeg -y -r 30 -g 600 -s #{@dimensions} -f x11grab -i :#{@display} -vcodec qtrle /tmp/ci.mov", @pid_file)
end

Expand Down
6 changes: 3 additions & 3 deletions spec/video_recorder_spec.rb
Expand Up @@ -15,12 +15,12 @@
end
end

describe "#start" do
describe "#capture" do
it "starts ffmpeg" do
CliUtil.should_receive(:fork_process).with(/ffmpeg -y -r 30 -g 600 -s 1024x768x32 -f x11grab -i :99 -vcodec qtrle/, "/var/run/recorder_99.pid")
CliUtil.should_receive(:fork_process).with(/ffmpeg -y -r 30 -g 600 -s 1024x768x32 -f x11grab -i :99 -vcodec qtrle/, "/tmp/.recorder_99-lock")

recorder = VideoRecorder.new(99, "1024x768x32")
recorder.start
recorder.capture
end
end

Expand Down

0 comments on commit 250806c

Please sign in to comment.