rm-recorder 0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d748209cc5290e00588e2ba3c8e8937f91600b1a
4
+ data.tar.gz: 5f4169c6cce057856f44d0b0a5dd2b3316fe2317
5
+ SHA512:
6
+ metadata.gz: c5ee2a03d177e02f44f710acead2f03a980b404fa421adca4f4174ebc747a1e6c6cbd8800905f4c38b8b156e92ec142532bcbde9b0418a4f345debefc6993dbb
7
+ data.tar.gz: 0150b34f56bdbe8f3ea0d7d834092c818cee74342aec1cb76f2c4589d416fadcd071b06fee7568ba1e807ace02a55cb7eaa7729967c85b59aadf2af139e8fd3e
data/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # rm-recorder
2
+
3
+ A series of classes that allows us to record the screen or camera without pain.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'rm-recorder'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install rm-recorder
18
+
19
+ ## Usage
20
+
21
+ @tape = ScreenRecorder.new
22
+ # # start a recording with
23
+ @tape.record
24
+ # # stop it:
25
+ @tape.stop
26
+
27
+
28
+ By default you should have a file called `video_recording.mov`. The output file name is changeable by passing the desired name to the initializer
29
+
30
+ @tape = ScreenRecorder.new("zomg.mov")
31
+
32
+ ## Contributing
33
+
34
+ 1. Let's create a few of this to capture the screen, camaras, etc.
@@ -0,0 +1,4 @@
1
+ class Rm
2
+ class Recorder
3
+ end
4
+ end
@@ -0,0 +1,40 @@
1
+ class ScreenRecorder
2
+ # USAGE:
3
+ # @tape = ScreenRecorder.new
4
+ # # start a recording with
5
+ # @tape.record
6
+ # # stop it:
7
+ # @tape.stop
8
+
9
+ attr_accessor :video_path
10
+
11
+ def initialize(video_path="video_recording.mov")
12
+ setup_video
13
+ setup_recording
14
+ @video_path = NSURL.fileURLWithPath(video_path)
15
+ end
16
+
17
+ def record
18
+ @captureMovieFileOutput.startRecordingToOutputFileURL(video_path, recordingDelegate:self)
19
+ end
20
+
21
+ def stop
22
+ @captureMovieFileOutput.stopRecording
23
+ end
24
+
25
+ def setup_video
26
+ @session = AVCaptureSession.alloc.init
27
+ @session.sessionPreset = AVCaptureSessionPresetHigh
28
+ device = AVCaptureScreenInput.alloc.initWithDisplayID(CGMainDisplayID())
29
+ @session.addInput(device)
30
+ @session.startRunning()
31
+ end
32
+
33
+ def setup_recording
34
+ @captureMovieFileOutput = AVCaptureMovieFileOutput.alloc.init
35
+ @captureMovieFileOutput.setDelegate(self)
36
+ if @session.canAddOutput(@captureMovieFileOutput)
37
+ @session.addOutput(@captureMovieFileOutput)
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,8 @@
1
+ unless defined?(Motion::Project::Config)
2
+ raise "This file must be required within a RubyMotion project Rakefile."
3
+ end
4
+
5
+ lib_dir_path = File.dirname(File.expand_path(__FILE__))
6
+ Motion::Project::App.setup do |app|
7
+ app.files.unshift(Dir.glob(File.join(lib_dir_path, "project/**/*.rb")))
8
+ end
metadata ADDED
@@ -0,0 +1,62 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rm-recorder
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ platform: ruby
6
+ authors:
7
+ - Ivan Acosta-Rubio
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-11-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: Record the screen on OSX with RubyMotion
28
+ email:
29
+ - ivan@softwarecriollo.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - README.md
35
+ - lib/project/rm-recorder.rb
36
+ - lib/project/screen_recorder.rb
37
+ - lib/rm-recorder.rb
38
+ homepage: https://github.com/ivanacostarubio/rm-recorder
39
+ licenses:
40
+ - MIT
41
+ metadata: {}
42
+ post_install_message:
43
+ rdoc_options: []
44
+ require_paths:
45
+ - lib
46
+ required_ruby_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - '>='
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ requirements: []
57
+ rubyforge_project:
58
+ rubygems_version: 2.0.3
59
+ signing_key:
60
+ specification_version: 4
61
+ summary: Record the screen on OSX with RubyMotion
62
+ test_files: []