screen-recorder 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +99 -99
- data/.rspec +3 -3
- data/.rubocop.yml +1 -1
- data/.travis.yml +49 -35
- data/CHANGES.md +89 -78
- data/LICENSE.txt +21 -21
- data/README.md +212 -218
- data/appveyor.yml +23 -0
- data/bin/console +0 -0
- data/bin/setup +8 -8
- data/lib/screen-recorder.rb +54 -53
- data/lib/screen-recorder/common.rb +152 -146
- data/lib/screen-recorder/desktop.rb +40 -40
- data/lib/screen-recorder/errors.rb +9 -9
- data/lib/screen-recorder/options.rb +168 -151
- data/lib/screen-recorder/titles.rb +52 -49
- data/lib/screen-recorder/type_checker.rb +13 -11
- data/lib/screen-recorder/version.rb +2 -2
- data/lib/screen-recorder/window.rb +22 -22
- data/screen-recorder.gemspec +41 -39
- metadata +34 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d582b8454520bac8dd7e3dd11b8f81bb8c76d42c9612bad0d246573583ead4e
|
4
|
+
data.tar.gz: bc2780669046dc0c21c87574cead28a3a4cbae13fc36e30fe110671c162b2b94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 608c366a5ed1bd079ea48f939dcd79fd775830340ecd20453f89442f2b9dda6581d8051dfc24507606d9f9a037e9293f799e1df114cd722d3aaba82a2241de65
|
7
|
+
data.tar.gz: 6b6a5b9aeadf5385a6d28e2ed2c55070b5203e1214057f70200476178179f3236ee916d7844434f3320088816d7ff6a650536866c7ae3508ddf2e86a7fc7bf30
|
data/.gitignore
CHANGED
@@ -1,100 +1,100 @@
|
|
1
|
-
Gemfile.lock # Part of best practice
|
2
|
-
|
3
|
-
# Created by https://www.gitignore.io/api/rubymine+all
|
4
|
-
|
5
|
-
### RubyMine+all ###
|
6
|
-
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
7
|
-
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
8
|
-
|
9
|
-
/.bundle/
|
10
|
-
/.yardoc
|
11
|
-
/_yardoc/
|
12
|
-
/coverage/
|
13
|
-
/doc/
|
14
|
-
/pkg/
|
15
|
-
/spec/reports/
|
16
|
-
/tmp/
|
17
|
-
/webdrivers_bin
|
18
|
-
*.log
|
19
|
-
*.mkv
|
20
|
-
*.mp4
|
21
|
-
*.avi
|
22
|
-
*.gif
|
23
|
-
|
24
|
-
Gemfile.lock
|
25
|
-
|
26
|
-
# rspec failure tracking
|
27
|
-
.rspec_status
|
28
|
-
|
29
|
-
# Generated files
|
30
|
-
.idea/**/contentModel.xml
|
31
|
-
|
32
|
-
# Sensitive or high-churn files
|
33
|
-
.idea/**/dataSources/
|
34
|
-
.idea/**/dataSources.ids
|
35
|
-
.idea/**/dataSources.local.xml
|
36
|
-
.idea/**/sqlDataSources.xml
|
37
|
-
.idea/**/dynamic.xml
|
38
|
-
.idea/**/uiDesigner.xml
|
39
|
-
.idea/**/dbnavigator.xml
|
40
|
-
|
41
|
-
# Gradle
|
42
|
-
.idea/**/gradle.xml
|
43
|
-
.idea/**/libraries
|
44
|
-
|
45
|
-
# Gradle and Maven with auto-import
|
46
|
-
# When using Gradle or Maven with auto-import, you should exclude module files,
|
47
|
-
# since they will be recreated, and may cause churn. Uncomment if using
|
48
|
-
# auto-import.
|
49
|
-
# .idea/modules.xml
|
50
|
-
# .idea/*.iml
|
51
|
-
# .idea/modules
|
52
|
-
|
53
|
-
# CMake
|
54
|
-
cmake-build-*/
|
55
|
-
|
56
|
-
# Mongo Explorer plugin
|
57
|
-
.idea/**/mongoSettings.xml
|
58
|
-
|
59
|
-
# File-based project format
|
60
|
-
*.iws
|
61
|
-
|
62
|
-
# IntelliJ
|
63
|
-
out/
|
64
|
-
|
65
|
-
# mpeltonen/sbt-idea plugin
|
66
|
-
.idea_modules/
|
67
|
-
|
68
|
-
# JIRA plugin
|
69
|
-
atlassian-ide-plugin.xml
|
70
|
-
|
71
|
-
# Cursive Clojure plugin
|
72
|
-
.idea/replstate.xml
|
73
|
-
|
74
|
-
# Crashlytics plugin (for Android Studio and IntelliJ)
|
75
|
-
com_crashlytics_export_strings.xml
|
76
|
-
crashlytics.properties
|
77
|
-
crashlytics-build.properties
|
78
|
-
fabric.properties
|
79
|
-
|
80
|
-
# Editor-based Rest Client
|
81
|
-
.idea/httpRequests
|
82
|
-
|
83
|
-
# Android studio 3.1+ serialized cache file
|
84
|
-
.idea/caches/build_file_checksums.ser
|
85
|
-
|
86
|
-
### RubyMine+all Patch ###
|
87
|
-
# Ignores the whole .idea folder and all .iml files
|
88
|
-
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
|
89
|
-
|
90
|
-
.idea/
|
91
|
-
|
92
|
-
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
|
93
|
-
|
94
|
-
*.iml
|
95
|
-
modules.xml
|
96
|
-
*.ipr
|
97
|
-
|
98
|
-
.DS_Store # On mac
|
99
|
-
|
1
|
+
Gemfile.lock # Part of best practice
|
2
|
+
|
3
|
+
# Created by https://www.gitignore.io/api/rubymine+all
|
4
|
+
|
5
|
+
### RubyMine+all ###
|
6
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
7
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
8
|
+
|
9
|
+
/.bundle/
|
10
|
+
/.yardoc
|
11
|
+
/_yardoc/
|
12
|
+
/coverage/
|
13
|
+
/doc/
|
14
|
+
/pkg/
|
15
|
+
/spec/reports/
|
16
|
+
/tmp/
|
17
|
+
/webdrivers_bin
|
18
|
+
*.log
|
19
|
+
*.mkv
|
20
|
+
*.mp4
|
21
|
+
*.avi
|
22
|
+
*.gif
|
23
|
+
|
24
|
+
Gemfile.lock
|
25
|
+
|
26
|
+
# rspec failure tracking
|
27
|
+
.rspec_status
|
28
|
+
|
29
|
+
# Generated files
|
30
|
+
.idea/**/contentModel.xml
|
31
|
+
|
32
|
+
# Sensitive or high-churn files
|
33
|
+
.idea/**/dataSources/
|
34
|
+
.idea/**/dataSources.ids
|
35
|
+
.idea/**/dataSources.local.xml
|
36
|
+
.idea/**/sqlDataSources.xml
|
37
|
+
.idea/**/dynamic.xml
|
38
|
+
.idea/**/uiDesigner.xml
|
39
|
+
.idea/**/dbnavigator.xml
|
40
|
+
|
41
|
+
# Gradle
|
42
|
+
.idea/**/gradle.xml
|
43
|
+
.idea/**/libraries
|
44
|
+
|
45
|
+
# Gradle and Maven with auto-import
|
46
|
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
47
|
+
# since they will be recreated, and may cause churn. Uncomment if using
|
48
|
+
# auto-import.
|
49
|
+
# .idea/modules.xml
|
50
|
+
# .idea/*.iml
|
51
|
+
# .idea/modules
|
52
|
+
|
53
|
+
# CMake
|
54
|
+
cmake-build-*/
|
55
|
+
|
56
|
+
# Mongo Explorer plugin
|
57
|
+
.idea/**/mongoSettings.xml
|
58
|
+
|
59
|
+
# File-based project format
|
60
|
+
*.iws
|
61
|
+
|
62
|
+
# IntelliJ
|
63
|
+
out/
|
64
|
+
|
65
|
+
# mpeltonen/sbt-idea plugin
|
66
|
+
.idea_modules/
|
67
|
+
|
68
|
+
# JIRA plugin
|
69
|
+
atlassian-ide-plugin.xml
|
70
|
+
|
71
|
+
# Cursive Clojure plugin
|
72
|
+
.idea/replstate.xml
|
73
|
+
|
74
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
75
|
+
com_crashlytics_export_strings.xml
|
76
|
+
crashlytics.properties
|
77
|
+
crashlytics-build.properties
|
78
|
+
fabric.properties
|
79
|
+
|
80
|
+
# Editor-based Rest Client
|
81
|
+
.idea/httpRequests
|
82
|
+
|
83
|
+
# Android studio 3.1+ serialized cache file
|
84
|
+
.idea/caches/build_file_checksums.ser
|
85
|
+
|
86
|
+
### RubyMine+all Patch ###
|
87
|
+
# Ignores the whole .idea folder and all .iml files
|
88
|
+
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
|
89
|
+
|
90
|
+
.idea/
|
91
|
+
|
92
|
+
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
|
93
|
+
|
94
|
+
*.iml
|
95
|
+
modules.xml
|
96
|
+
*.ipr
|
97
|
+
|
98
|
+
.DS_Store # On mac
|
99
|
+
|
100
100
|
# End of https://www.gitignore.io/api/rubymine+all
|
data/.rspec
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
--format documentation
|
2
|
-
--color
|
3
|
-
--require spec_helper
|
1
|
+
--format documentation
|
2
|
+
--color
|
3
|
+
--require spec_helper
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -1,35 +1,49 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
1
|
+
---
|
2
|
+
language: ruby
|
3
|
+
cache: bundler
|
4
|
+
branches:
|
5
|
+
only:
|
6
|
+
- /.*/
|
7
|
+
env:
|
8
|
+
global:
|
9
|
+
- DISPLAY=":0"
|
10
|
+
matrix:
|
11
|
+
include:
|
12
|
+
- rvm: 2.4.6
|
13
|
+
dist: xenial
|
14
|
+
env: RAKE_TASK=spec
|
15
|
+
- rvm: 2.4.6
|
16
|
+
dist: xenial
|
17
|
+
env: RAKE_TASK=rubocop
|
18
|
+
- rvm: 2.6.3
|
19
|
+
dist: xenial
|
20
|
+
env: RAKE_TASK=spec REPORT_COVERAGE=true
|
21
|
+
- rvm: 2.4.6
|
22
|
+
os: osx
|
23
|
+
env: RAKE_TASK=spec
|
24
|
+
- rvm: 2.6.3
|
25
|
+
os: osx
|
26
|
+
env: RAKE_TASK=spec
|
27
|
+
addons:
|
28
|
+
firefox: latest
|
29
|
+
chrome: stable
|
30
|
+
apt:
|
31
|
+
packages:
|
32
|
+
- ffmpeg
|
33
|
+
homebrew:
|
34
|
+
packages:
|
35
|
+
- ffmpeg
|
36
|
+
before_script:
|
37
|
+
- if [[ "$RAKE_TASK" == "spec" ]]; then
|
38
|
+
nohup Xvfb :0 -screen 0 1024x768x24 &
|
39
|
+
fi
|
40
|
+
- if [[ "$REPORT_COVERAGE" == "true" ]] && [[ "$TRAVIS_BRANCH" == "master" ]]; then
|
41
|
+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter;
|
42
|
+
chmod +x ./cc-test-reporter;
|
43
|
+
./cc-test-reporter before-build;
|
44
|
+
fi
|
45
|
+
script: bundle exec rake $RAKE_TASK
|
46
|
+
after_script:
|
47
|
+
- if [[ "$REPORT_COVERAGE" == "true" ]] && [[ "$TRAVIS_BRANCH" == "master" ]]; then
|
48
|
+
./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT;
|
49
|
+
fi
|
data/CHANGES.md
CHANGED
@@ -1,79 +1,90 @@
|
|
1
|
-
### 1.
|
2
|
-
*
|
3
|
-
|
4
|
-
*
|
5
|
-
|
6
|
-
|
7
|
-
*
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
*
|
14
|
-
|
15
|
-
*
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
*
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
*
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
*
|
66
|
-
|
67
|
-
### 1.0.0.
|
68
|
-
|
69
|
-
*
|
70
|
-
*
|
71
|
-
* `
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
*
|
77
|
-
|
78
|
-
|
1
|
+
### 1.2.0 (2019-05-12)
|
2
|
+
* Separate input/output specific `ffmpeg` arguments through the `advanced`
|
3
|
+
Hash. See example [here](https://github.com/kapoorlakshya/screen-recorder#advanced-options).
|
4
|
+
* Check for errors after starting the `ffmpeg` process to make sure the
|
5
|
+
recording does not stop silently because of an error. Prints the error
|
6
|
+
from the log if the process exists unexpectedly.
|
7
|
+
* Now using [`childprocess`](https://github.com/enkessler/childprocess) gem
|
8
|
+
to manage the `ffmpeg` process. This requires the `ffi` gem to be
|
9
|
+
installed on Windows. See [childprocess#132](https://github.com/enkessler/childprocess/issues/150)
|
10
|
+
for more information.
|
11
|
+
|
12
|
+
### 1.1.0 (2019-04-14)
|
13
|
+
* <b>Add support for macOS</b> ([#55](https://github.com/kapoorlakshya/screen-recorder/issues/55)). Please [raise an Issue](https://github.com/kapoorlakshya/screen-recorder/issues/new) if you run into problems.
|
14
|
+
* Force kill `ffmpeg` if it takes more than 10s to quit ([#60](https://github.com/kapoorlakshya/screen-recorder/issues/60)).
|
15
|
+
* Fix a bug where `ScreenRecorder.ffmpeg_binary=()` was not properly defined.
|
16
|
+
* `ScreenRecorder::Titles#fetch` will now raise `NotImplementedError` when used in a
|
17
|
+
Linux or a macOS environment. Only works on Windows.
|
18
|
+
* Default `input` value on Linux is now `:0`.
|
19
|
+
|
20
|
+
### 1.0.0 (2019-03-15)
|
21
|
+
* Released first major version.
|
22
|
+
* Now uses `ScreenRecorder` as top level module. `FFMPEG` is not directly
|
23
|
+
exposed anymore.
|
24
|
+
* The recording modes are now available through `ScreenRecorder::Desktop`
|
25
|
+
and `ScreenRecorder::Window` classes to make the usage (parameters) simpler.
|
26
|
+
* Method parameters are now keywords instead of an `opts` Hash. This means
|
27
|
+
at least Ruby 2.0.0 is required.
|
28
|
+
* `framerate:` is now to be passed through the `advanced` Hash.
|
29
|
+
|
30
|
+
### 1.0.0.beta13 (2019-03-15)
|
31
|
+
* Gem will now be renamed to `screen-recorder`. Please refer to Issue
|
32
|
+
[#45](https://github.com/kapoorlakshya/screen-recorder/issues/45)
|
33
|
+
for more information.
|
34
|
+
|
35
|
+
### 1.0.0.beta12 (2019-03-12)
|
36
|
+
* Reverted post install message as `screen_recorder` is already taken.
|
37
|
+
|
38
|
+
### 1.0.0.beta11 (2019-03-12)
|
39
|
+
* Recording FPS (`framerate`) is defaulted to 15.0.
|
40
|
+
* Gem will soon be renamed to `screen_recorder`. Please refer to Issue
|
41
|
+
[#45](https://github.com/kapoorlakshya/screen-recorder/issues/45)
|
42
|
+
for more information.
|
43
|
+
|
44
|
+
### 1.0.0.beta10 (2019-02-05)
|
45
|
+
* Fixed an edge case in Microsoft Windows specific implementation of
|
46
|
+
`WindowTitles#fetch` where processes with mismatching names and window
|
47
|
+
titles, such as process `"Calculator.exe"` with window title `"CicMarshalWnd"`,
|
48
|
+
were omitted ([#35](https://github.com/kapoorlakshya/screen-recorder/issues/35)).
|
49
|
+
This fix also prints a warning when this mismatch occurs.
|
50
|
+
* Fixed bug in Linux specific `WindowTitles#fetch` implementation where
|
51
|
+
the filter by application name logic was removed. This filter is required
|
52
|
+
on Linux here because `wmctrl` returns all open window titles unlike
|
53
|
+
Microsoft Windows where `taskmgr` allows us get window titles by process
|
54
|
+
name.
|
55
|
+
* On Linux, you are now required to provide the `input` as `"desktop"`
|
56
|
+
or a display number, such as `":0.0"`. Run `echo $DISPLAY` to check your display number.
|
57
|
+
* QOL improvements - Type checking of inputs, spec cleanup, added more
|
58
|
+
tests, and fixed rubocop warnings.
|
59
|
+
|
60
|
+
### 1.0.0.beta9 (2019-01-22)
|
61
|
+
|
62
|
+
* :warning: `FFMPEG::RecordingRegions` is now `FFMPEG::WindowTitles`, so the module name is true to the function it provides.
|
63
|
+
* Added support for for a user given path via `FFMPEG#ffmpeg_binary=()`.
|
64
|
+
* Removed Bundler version requirement from gemspec to support all versions.
|
65
|
+
* Implement `#discard` (alias `#delete`) to discard the video file. Useful when your test passes and you want to get rid of the video file.
|
66
|
+
|
67
|
+
### 1.0.0.beta8 (2019-01-03)
|
68
|
+
|
69
|
+
* Fix a bug where the gem was incorrectly configured to be required as `ffmpeg/screenrecorder` instead of `screen-recorder`.
|
70
|
+
* `ScreenRecorder#start` now returns the IO process object in case the user has a use case for it.
|
71
|
+
* `RecordingRegion#fetch` now logs a warning that `x11grab` for Linux does not supporting window recording.
|
72
|
+
* :warning: Parameter `infile` is now `input` to make it more intuitive.
|
73
|
+
|
74
|
+
### 1.0.0.beta7 (2018-12-23)
|
75
|
+
|
76
|
+
* Fix bug in RecorderOptions where an incorrect object was referenced to read the user provided options.
|
77
|
+
|
78
|
+
### 1.0.0.beta6 (2018-12-3)
|
79
|
+
|
80
|
+
* Stopping the screenrecorder now prints the failure reason given by the ffmpeg binary when `#stop` fails (Issue #7).
|
81
|
+
* Log file is now defaulted to `ffmpeg.log` instead of redirecting to nul.
|
82
|
+
* `log_level` now defaults to `Logger::ERROR` instead of `Logger::INFO`.
|
83
|
+
|
84
|
+
### 1.0.0.beta5 (2018-11-26)
|
85
|
+
|
86
|
+
* `Screenrecorder` class is now `ScreenRecorder`.
|
87
|
+
* Add support for Linux.
|
88
|
+
* Now an exception raised if the gem fails to find `ffmpeg`.
|
89
|
+
* Fix a bug where a file named `nul` was created instead of directing the output to `NUL`.
|
79
90
|
* Fix a bug where `RecordingRegions#window_titles` was not returning anything because of missing return keyword.
|