Class: AVCapture::Session
- Inherits:
-
Object
- Object
- AVCapture::Session
- Defined in:
- lib/av_capture.rb
Defined Under Namespace
Classes: Capture
Instance Method Summary collapse
Instance Method Details
#run ⇒ Object
65 66 67 68 69 70 |
# File 'lib/av_capture.rb', line 65 def run start_running! yield ensure stop_running! end |
#run_with(dev) ⇒ Object
56 57 58 59 60 61 62 63 |
# File 'lib/av_capture.rb', line 56 def run_with dev output = AVCapture::StillImageOutput.new add_input dev.as_input add_output output connection = output.video_connection capture = Capture.new output, connection run { yield capture } end |