sensible-cinema 0.20.5 → 0.21.3
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +29 -0
- data/LICENSE.TXT +18 -13
- data/README +84 -51
- data/Rakefile +10 -9
- data/TODO +135 -60
- data/VERSION +1 -1
- data/bin/monkey.png +0 -0
- data/bin/sensible-cinema-cli +8 -3
- data/bin/sensible-cinema.rb +169 -76
- data/development.txt +29 -0
- data/experimental_readme.txt +18 -56
- data/go.bat +5 -2
- data/how_to_create.txt +31 -35
- data/lib/edl_parser.rb +28 -6
- data/lib/mencoder_wrapper.rb +5 -5
- data/lib/ocr.rb +4 -4
- data/lib/overlayer.rb +14 -10
- data/lib/screen_tracker.rb +15 -5
- data/lib/swing_helpers.rb +1 -1
- data/sensible-cinema.gemspec +30 -13
- data/spec/edl_parser.spec.rb +1 -1
- data/spec/images/netflix_a0.bmp +0 -0
- data/spec/images/netflix_a1.bmp +0 -0
- data/spec/images/netflix_a2.bmp +0 -0
- data/spec/images/netflix_a3.bmp +0 -0
- data/spec/images/netflix_a4.bmp +0 -0
- data/spec/images/netflix_a5.bmp +0 -0
- data/spec/images/netflix_a6.bmp +0 -0
- data/spec/images/netflix_a7.bmp +0 -0
- data/spec/images/netflix_a8.bmp +0 -0
- data/spec/images/netflix_a9.bmp +0 -0
- data/spec/ocr.spec.rb +11 -9
- data/spec/screen_tracker.spec.rb +1 -1
- data/spec/sensible_cinema_gui.spec.rb +9 -8
- data/vendor/SetPriority.exe +0 -0
- data/vendor/readme.txt +120 -0
- data/zamples/edit_decision_lists/dvds/happiest baby on the block.txt +1 -1
- data/zamples/edit_decision_lists/dvds/legend_of_the_guardians_the_owls_of_gahoole.txt +18 -0
- data/zamples/edit_decision_lists/dvds/making_marriage_work.txt +17 -0
- data/zamples/edit_decision_lists/netflix/greatest_story_ever_told_netflix.txt +10 -0
- data/zamples/edit_decision_lists/{example_edit_decision_list.txt → old_not_yet_updated/example_edit_decision_list.txt} +0 -0
- data/zamples/edit_decision_lists/{old_not_yet_update → old_not_yet_updated}/youtube/gummy_bear_song_youtube.txt +0 -0
- data/zamples/edit_decision_lists/{old_not_yet_update → old_not_yet_updated}/youtube/nuki_song_youtube.txt +0 -0
- data/zamples/players/netflix/netflix_firefox_non_maximized.txt +25 -0
- metadata +39 -44
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.21.3
|
data/bin/monkey.png
ADDED
Binary file
|
data/bin/sensible-cinema-cli
CHANGED
@@ -41,7 +41,12 @@ def go_sc(args)
|
|
41
41
|
|
42
42
|
puts <<-END
|
43
43
|
|
44
|
-
syntax: [player_description.yml
|
44
|
+
syntax: [player_description.yml] [delete_list.txt|test] [-t -v --clear-cache] (or just nothing at all--it will prompt for all things needed)
|
45
|
+
|
46
|
+
If you specify "test" for the delete list, it will pause 4s, take a snapshot of the player, then exit.
|
47
|
+
Useful for debugging your screen capture of the current player.
|
48
|
+
You can also specify -v or -t if you want to enable more verbose (chatty) output.
|
49
|
+
|
45
50
|
END
|
46
51
|
|
47
52
|
for file in Dir[__dir__ + '../zamples/mute*/*']
|
@@ -91,8 +96,8 @@ def go_sc(args)
|
|
91
96
|
|
92
97
|
# exit early if we just wanted a screen dump...a little kludgey...
|
93
98
|
unless overlay
|
94
|
-
puts 'warning--only doing screen dump in t-minus
|
95
|
-
sleep
|
99
|
+
puts 'warning--only doing screen dump in t-minus 2s...'
|
100
|
+
sleep 2
|
96
101
|
puts 'snap!'
|
97
102
|
screen_tracker.dump_bmp
|
98
103
|
exit 1
|
data/bin/sensible-cinema.rb
CHANGED
@@ -31,31 +31,36 @@ require 'tmpdir'
|
|
31
31
|
require_relative '../lib/swing_helpers'
|
32
32
|
require_relative '../lib/drive_info'
|
33
33
|
require 'whichr'
|
34
|
+
require 'ruby-wmi'
|
34
35
|
|
35
36
|
# must put mencoder first, as it has a working mplayer.exe in it...
|
36
|
-
|
37
|
+
vendor = File.expand_path(File.dirname(__FILE__)) + '/../vendor'
|
38
|
+
# XX do we need to_filename though?
|
39
|
+
ENV['PATH'] = ENV['PATH'] + ';' + (vendor + '/cache/mencoder').to_filename + ';' + (vendor + '/cache').to_filename
|
37
40
|
|
38
41
|
for drive in ['c', 'd', 'e']
|
39
42
|
ENV['PATH'] = ENV['PATH'] + ";#{drive}:\\Program Files\\SMPlayer;#{drive}"
|
40
43
|
end
|
41
44
|
|
45
|
+
import 'javax.swing.ImageIcon'
|
46
|
+
|
42
47
|
module SensibleSwing
|
43
48
|
VERSION = File.read(File.dirname(__FILE__) + "/../VERSION").strip
|
44
49
|
puts "v. " + VERSION
|
45
50
|
|
46
51
|
class MainWindow < JFrame
|
47
52
|
|
48
|
-
def new_jbutton title, only_on_create_mode,
|
53
|
+
def new_jbutton title, only_on_create_mode, always_add = false
|
49
54
|
button = JButton.new title
|
50
55
|
button.set_bounds(44, @starting_button_y, @button_width, 23)
|
51
56
|
|
52
57
|
if ARGV.index("--create-mode")
|
53
|
-
|
58
|
+
always_add = true if only_on_create_mode
|
54
59
|
else
|
55
|
-
|
60
|
+
always_add = true if !only_on_create_mode
|
56
61
|
end
|
57
62
|
|
58
|
-
if
|
63
|
+
if always_add
|
59
64
|
increment_button_location
|
60
65
|
@panel.add button
|
61
66
|
@buttons << button
|
@@ -68,15 +73,7 @@ module SensibleSwing
|
|
68
73
|
end
|
69
74
|
|
70
75
|
Storage = Storage.new("sc")
|
71
|
-
|
72
|
-
alias system_blocking system
|
73
|
-
|
74
|
-
def system_non_blocking command
|
75
|
-
Thread.new { system_blocking command }
|
76
|
-
end
|
77
|
-
|
78
|
-
# make them choose which system call to use explicitly
|
79
|
-
undef system
|
76
|
+
|
80
77
|
|
81
78
|
def initialize
|
82
79
|
super "Sensible-Cinema #{VERSION} (GPL)"
|
@@ -99,19 +96,23 @@ module SensibleSwing
|
|
99
96
|
jlabel.set_bounds(44,44,160,14)
|
100
97
|
panel.add jlabel
|
101
98
|
@starting_button_y = 120
|
102
|
-
@button_width =
|
99
|
+
@button_width = 400
|
103
100
|
|
104
101
|
@create = new_jbutton( "Create edited copy of DVD on Your Hard Drive, from a DVD", false )
|
105
102
|
@create.on_clicked {
|
106
103
|
do_copy_dvd_to_hard_drive false
|
107
104
|
}
|
108
105
|
|
109
|
-
@mplayer_edl = new_jbutton( "Watch DVD on computer edited realtime", false )
|
106
|
+
@mplayer_edl = new_jbutton( "Watch DVD on computer edited realtime", false, true )
|
110
107
|
@mplayer_edl.on_clicked {
|
111
108
|
do_mplayer_edl
|
112
109
|
}
|
110
|
+
|
111
|
+
# @watch_created_file = new_jbutton( "Watch edited copy of DVD", false).on_clicked {
|
112
|
+
# raise 'todo'
|
113
|
+
# }
|
113
114
|
|
114
|
-
@watch_unedited = new_jbutton("Watch
|
115
|
+
@watch_unedited = new_jbutton("Watch DVD unedited (while also grabbing to hard drive--saves overall time)", true) # if you have a fast enough cpu, that is
|
115
116
|
@watch_unedited.on_clicked {
|
116
117
|
success_no_run, wrote_to_here_fulli = do_copy_dvd_to_hard_drive false, true, true
|
117
118
|
sleep 5 unless success_no_run
|
@@ -134,22 +135,29 @@ module SensibleSwing
|
|
134
135
|
repeat_last_copy_dvd_to_hard_drive
|
135
136
|
}
|
136
137
|
|
137
|
-
@fast_preview = new_jbutton( "preview
|
138
|
+
@fast_preview = new_jbutton( "preview (fast mode)", true).on_clicked {
|
138
139
|
success, wrote_to_here_fulli = do_copy_dvd_to_hard_drive false, true
|
139
140
|
sleep 0.5 # lodo take out ???
|
140
141
|
background_thread.join if background_thread # let it write out the original fulli, if necessary [?]
|
141
|
-
nice_file = wrote_to_here_fulli
|
142
|
-
if
|
143
|
-
p = NonBlockingDialog.new("Creating quick lookup file--NB that for each changed deletion,
|
144
|
-
|
145
|
-
|
142
|
+
nice_file = wrote_to_here_fulli #+ ".fast.mpg"
|
143
|
+
if false#!File.exist?(nice_file)
|
144
|
+
p = NonBlockingDialog.new("Creating quick lookup file--NB that for each changed deletion,
|
145
|
+
you'll need to restart the fast preview SMplayer
|
146
|
+
Also note that the start and end times will be slightly off if reality [delayed]
|
147
|
+
Also note that while doing fast preview, it can be doing a normal preview as well
|
148
|
+
in the background, simultaneously.")
|
149
|
+
unless system_blocking("ffmpeg -i #{wrote_to_here_fulli} -target ntsc-dvd #{nice_file}")
|
150
|
+
File.delete nice_file
|
151
|
+
raise 'create '
|
152
|
+
end
|
153
|
+
p.dispose # it will be active for sure
|
146
154
|
end
|
147
155
|
smplayer_prefs_file = File.expand_path("~/.smplayer/smplayer.ini")
|
148
|
-
old_prefs = File.read(smplayer_prefs_file)
|
156
|
+
old_prefs = File.read(smplayer_prefs_file) rescue ''
|
149
157
|
new_prefs = old_prefs.gsub(/mplayer_additional_options=.*/, "mplayer_additional_options=-edl #{EdlTempFile}")
|
150
158
|
File.write(smplayer_prefs_file, new_prefs)
|
151
|
-
thread = do_mplayer_edl( "smplayer #{nice_file}")
|
152
|
-
Thread.new { #
|
159
|
+
thread = do_mplayer_edl( "smplayer #{nice_file}") # note the smplayer, but it's for the fast file...
|
160
|
+
Thread.new { # XXX do we need this?
|
153
161
|
begin
|
154
162
|
thread.join
|
155
163
|
ensure
|
@@ -168,33 +176,7 @@ module SensibleSwing
|
|
168
176
|
|
169
177
|
@create_new_edl_for_current_dvd = new_jbutton("Create new Delete List for a DVD", true)
|
170
178
|
@create_new_edl_for_current_dvd.on_clicked do
|
171
|
-
|
172
|
-
name = get_user_input("Enter DVD name for #{volume}")
|
173
|
-
|
174
|
-
input = <<-EOL
|
175
|
-
# comments can go after a # on any line, for example this one.
|
176
|
-
|
177
|
-
"mutes" => [
|
178
|
-
"0:00:01.0", "0:00:02.0", "profanity", "da..",
|
179
|
-
],
|
180
|
-
|
181
|
-
"blank_outs" => [
|
182
|
-
"00:03:00.0" , "00:04:00.0", "violence", "of some sort",
|
183
|
-
],
|
184
|
-
|
185
|
-
"name" => "#{name}",
|
186
|
-
"disk_unique_id" => "#{md5}",
|
187
|
-
|
188
|
-
# "dvd_title_track" => "1", # most DVD's use title 1. Yours might not. If it plays anything except the main title, see http://goo.gl/QHLIF
|
189
|
-
# "not edited out stuff" => "",
|
190
|
-
# "closing thoughts" => "still a fairly dark movie",
|
191
|
-
# "mplayer_dvd_splits" => ["59:59", "1:04:59"], # find these by playing your dvd with smplayer, and noting where the timing switches [buggedly] back to zero in error--common on many DVD's. Setting it here lets the 'insta play' feature work right.
|
192
|
-
EOL
|
193
|
-
filename = EDL_DIR + "\\" + name.gsub(' ', '_') + '.txt'
|
194
|
-
filename.downcase!
|
195
|
-
File.write(filename, input) unless File.exist?(filename) # lodo let them choose name (?)
|
196
|
-
open_file_to_edit_it filename
|
197
|
-
|
179
|
+
create_brand_new_edl
|
198
180
|
end
|
199
181
|
|
200
182
|
@display_unique = new_jbutton( "Display a DVD's unique ID", true ).on_clicked {
|
@@ -209,6 +191,10 @@ EOL
|
|
209
191
|
system_non_blocking("start http://groups.google.com/group/sensible-cinema")
|
210
192
|
}
|
211
193
|
|
194
|
+
@play_smplayer = new_jbutton( "Play DVD unedited (smplayer)", true).on_clicked {
|
195
|
+
play_dvd_smplayer_unedited
|
196
|
+
}
|
197
|
+
|
212
198
|
@progress_bar = JProgressBar.new(0, 100)
|
213
199
|
@progress_bar.set_bounds(44,@starting_button_y,@button_width,23)
|
214
200
|
@progress_bar.visible = false
|
@@ -225,10 +211,82 @@ EOL
|
|
225
211
|
increment_button_location
|
226
212
|
|
227
213
|
setSize @button_width+80, @starting_button_y
|
228
|
-
|
214
|
+
setIconImage(ImageIcon.new(__dir__ + "/monkey.png").getImage())
|
229
215
|
check_for_dependencies
|
230
216
|
end
|
231
217
|
|
218
|
+
def create_brand_new_edl
|
219
|
+
drive, volume, md5 = choose_dvd_drive
|
220
|
+
name = get_user_input("Enter DVD name for #{volume}")
|
221
|
+
input = <<-EOL
|
222
|
+
# comments can go after a # on any line, for example this one.
|
223
|
+
|
224
|
+
"mutes" => [
|
225
|
+
"0:00:01.0", "0:00:02.0", "profanity", "da..",
|
226
|
+
],
|
227
|
+
|
228
|
+
"blank_outs" => [
|
229
|
+
"00:03:00.0" , "00:04:00.0", "violence", "of some sort",
|
230
|
+
],
|
231
|
+
|
232
|
+
"name" => "#{name}",
|
233
|
+
"disk_unique_id" => "#{md5}",
|
234
|
+
|
235
|
+
# "dvd_title_track" => "1", # most DVD's use title 1. Not all do, though. If sensible-cinema plays anything except the main title (for example, a trailer), when you use it, see http://goo.gl/QHLIF to set this field right.
|
236
|
+
# "not edited out stuff" => "some violence",
|
237
|
+
# "closing thoughts" => "still a fairly dark movie, overall",
|
238
|
+
# "mplayer_dvd_splits" => ["59:59", "1:04:59"], # these are where, in mplayer, the DVD timestamp "resets" to zero for whatever reason. See http://goo.gl/yMfqX
|
239
|
+
EOL
|
240
|
+
filename = EDL_DIR + "\\" + name.gsub(' ', '_') + '.txt'
|
241
|
+
filename.downcase!
|
242
|
+
File.write(filename, input) unless File.exist?(filename) # lodo let them choose name (?)
|
243
|
+
open_file_to_edit_it filename
|
244
|
+
end
|
245
|
+
|
246
|
+
|
247
|
+
alias system_original system
|
248
|
+
|
249
|
+
def system_blocking command, low_prio = false
|
250
|
+
return true if command =~ /^@rem/ # jruby+MRI bug, I think...
|
251
|
+
if low_prio
|
252
|
+
out = IO.popen(command) # + " 2>&1"
|
253
|
+
low_prio = 64 # from msdn
|
254
|
+
|
255
|
+
if command =~ /(ffmpeg|mencoder)/
|
256
|
+
# XXXX not sure if there's a better way...because some *are* complex and have ampersands...
|
257
|
+
# unfortunately have to check for nil because it could exit too early [?]
|
258
|
+
exe_name = $1 + '.exe'
|
259
|
+
begin
|
260
|
+
p = proc{ ole = WMI::Win32_Process.find(:first, :conditions => {'Name' => exe_name}); sleep 1 unless ole; ole }
|
261
|
+
piddy = p.call || p.call || p.call # we actually do need this to loop...guess we're too quick
|
262
|
+
# but the first one still inexplicably fails always... LODO
|
263
|
+
if piddy
|
264
|
+
# piddy.SetPriority low_prio # this can seg fault...yikes...
|
265
|
+
pid = piddy.ProcessId # this doesn't seg fault, tho
|
266
|
+
system_original("vendor\\setpriority -lowest #{pid}") # be able to use the PID on the command line
|
267
|
+
else
|
268
|
+
# XXXX first one always fails [?] huh?
|
269
|
+
p 'unable to find to set priority ' + exe_name
|
270
|
+
end
|
271
|
+
rescue Exception => e
|
272
|
+
p 'warning, got exception trying to set PID [jruby...]', e
|
273
|
+
end
|
274
|
+
end
|
275
|
+
print out.read # let it finish
|
276
|
+
out.close
|
277
|
+
$?.exitstatus == 0 # 0 means success
|
278
|
+
else
|
279
|
+
system_original command
|
280
|
+
end
|
281
|
+
end
|
282
|
+
|
283
|
+
def system_non_blocking command
|
284
|
+
Thread.new { system_original command }
|
285
|
+
end
|
286
|
+
|
287
|
+
# make them choose which system call to use explicitly
|
288
|
+
undef system
|
289
|
+
|
232
290
|
def download full_url, to_here
|
233
291
|
require 'open-uri'
|
234
292
|
writeOut = open(to_here, "wb")
|
@@ -236,14 +294,25 @@ EOL
|
|
236
294
|
writeOut.close
|
237
295
|
end
|
238
296
|
|
297
|
+
def play_dvd_smplayer_unedited
|
298
|
+
drive, dvd_volume_name, md5sum, edl_path, descriptors = choose_dvd_and_edl_for_it
|
299
|
+
title_track = get_title_track(descriptors)
|
300
|
+
command = "smplayer dvdnav://#{title_track} -dvd-device #{drive}"
|
301
|
+
p command
|
302
|
+
system_non_blocking command
|
303
|
+
end
|
304
|
+
|
239
305
|
EdlTempFile = Dir.tmpdir + '/mplayer.temp.edl'
|
240
306
|
|
241
307
|
def do_mplayer_edl play_this_mplayer = nil, add_secs_end = 0, add_secs_beginning = 0.5
|
242
308
|
drive, dvd_volume_name, md5sum, edl_path, descriptors = choose_dvd_and_edl_for_it
|
243
309
|
descriptors = EdlParser.parse_file edl_path
|
244
310
|
splits = descriptors['mplayer_dvd_splits']
|
245
|
-
if splits == nil
|
246
|
-
|
311
|
+
if splits == nil && !play_this_mplayer
|
312
|
+
# don't display warning if they are watching the .fast file, since it doesn't need these
|
313
|
+
if !play_this_mplayer
|
314
|
+
show_blocking_message_dialog("warning: delete list does not contain mplayer replay information [mplayer_dvd_splits] so edits past a certain time period might not won't work ( http://goo.gl/yMfqX ).")
|
315
|
+
end
|
247
316
|
splits = []
|
248
317
|
end
|
249
318
|
splits.map!{|s| EdlParser.translate_string_to_seconds(s) }
|
@@ -285,47 +354,52 @@ EOL
|
|
285
354
|
System.exit 1
|
286
355
|
end
|
287
356
|
if returned == -1
|
288
|
-
p 'license exited'
|
357
|
+
p 'license exited early...'
|
289
358
|
System.exit 1
|
290
359
|
end
|
291
360
|
throw unless returned == 0
|
292
361
|
old.each{|name, old_setting| UIManager.put(name, old_setting)}
|
293
362
|
end
|
294
|
-
|
363
|
+
|
364
|
+
def print *args
|
365
|
+
Kernel.print *args # avoid bin\sensible-cinema.rb:83:in `system_blocking': cannot convert instance of class org.jruby.RubyString to class java.awt.Graphics (TypeError)
|
366
|
+
end
|
367
|
+
|
295
368
|
def check_for_dependencies
|
296
369
|
ffmpeg = RubyWhich.new.which('ffmpeg')
|
297
370
|
if ffmpeg.length == 0
|
298
|
-
show_blocking_message_dialog(
|
299
|
-
Click ok to be directed to its download website.\nYou'll probably want to download and
|
371
|
+
show_blocking_message_dialog("It appears that you need to install a dependency: imagemagick.\n
|
372
|
+
Click ok to be directed to its download website.\nYou'll probably want to download and run the \"windows-dll.exe\" package.\n
|
300
373
|
Then restart Sensible-Cinema.", "Lacking dependency", JOptionPane::ERROR_MESSAGE)
|
301
374
|
system_non_blocking("start http://www.imagemagick.org/script/binary-releases.php#windows")
|
302
375
|
java.lang.System.exit(1)
|
303
376
|
end
|
377
|
+
|
304
378
|
mencoder = RubyWhich.new.which('mencoder')
|
305
379
|
if mencoder.length == 0
|
306
380
|
show_blocking_license_accept_dialog 'MPlayer', 'gplv2', 'http://www.gnu.org/licenses/gpl-2.0.html', "Appears that you need to install a dependency: mencoder."
|
307
381
|
vendor_cache = File.expand_path(File.dirname(__FILE__)) + "/../vendor/cache/"
|
308
382
|
ENV['PATH'] = ENV['PATH'] + ';' + vendor_cache + '\\..;' + vendor_cache
|
309
383
|
Dir.chdir(vendor_cache) do
|
310
|
-
|
384
|
+
print 'downloading unzipper...'
|
311
385
|
download("http://downloads.sourceforge.net/project/sevenzip/7-Zip/9.20/7za920.zip", "7za920.zip")
|
312
386
|
system_blocking("unzip -o 7za920.zip") # -o means "overwrite" without prompting
|
313
387
|
# now we have 7za.exe
|
314
|
-
|
388
|
+
print 'downloading mencoder.7z (6MB) ...'
|
315
389
|
download("http://downloads.sourceforge.net/project/mplayer-win32/MPlayer%20and%20MEncoder/revision%2032492/MPlayer-rtm-svn-32492.7z", "mencoder.7z")
|
316
390
|
system_blocking("7za e mencoder.7z -y -omencoder")
|
317
|
-
|
391
|
+
puts 'done'
|
318
392
|
end
|
319
393
|
end
|
320
394
|
|
321
395
|
if ARGV.index('--create-mode')
|
322
396
|
# they're going to want these dependencies
|
323
397
|
path = RubyWhich.new.which('smplayer')
|
324
|
-
|
325
|
-
if(path.length == 0 || path2.length == 0)
|
398
|
+
if(path.length == 0)
|
326
399
|
# this one has its own license...
|
327
400
|
show_blocking_message_dialog("It appears that you need to install a dependency: SMPlayer.\n
|
328
|
-
Click ok to be directed to its download website, where you can download and install it
|
401
|
+
Click ok to be directed to its download website, where you can download and install it, then restart sensible cinema.",
|
402
|
+
"Lacking dependency", JOptionPane::ERROR_MESSAGE)
|
329
403
|
system_non_blocking("start http://smplayer.sourceforge.net/downloads.php")
|
330
404
|
System.exit(1)
|
331
405
|
end
|
@@ -432,6 +506,7 @@ EOL
|
|
432
506
|
show_blocking_message_dialog("Warning: there may not be enough space on the disk for #{save_to}
|
433
507
|
(depending on DVD size, you may need like 16G free, but typically will need around 10GB free--you have #{freespace/1_000_000_000}GB free). Click OK to continue.")
|
434
508
|
end
|
509
|
+
raise 'cannot save to filname with spaces yet (ask for it)' if save_to =~ / /
|
435
510
|
save_to
|
436
511
|
end
|
437
512
|
end
|
@@ -512,7 +587,8 @@ EOL
|
|
512
587
|
"Copying to #{save_to}.\n" +
|
513
588
|
"This could take quite awhile, and will prompt you and chime a noise when it is done.\n" +
|
514
589
|
"You can close this window and continue working while it runs in the background.\n" +
|
515
|
-
"NB that the created file will be playable only with VLC (possibly with smplayer
|
590
|
+
"NB that the created file will be playable only with VLC (possibly with smplayer, possibly with\n" +
|
591
|
+
"Windows Media Player if you install ffdshow first with mpeg2 video checkbox checked.).",
|
516
592
|
"OK")
|
517
593
|
|
518
594
|
# allow our popups to still be serviced while it is running
|
@@ -535,11 +611,9 @@ EOL
|
|
535
611
|
lines.each_with_index{|line, idx|
|
536
612
|
if success
|
537
613
|
puts "running #{line}"
|
538
|
-
success = system_blocking(line)
|
539
|
-
if
|
540
|
-
|
541
|
-
else
|
542
|
-
puts "\n", 'line failed: ' + line + "\n" + ' see troubleshooting in README.txt file!' unless success
|
614
|
+
success = system_blocking(line, true)
|
615
|
+
if !success
|
616
|
+
puts "\n", 'line failed: ' + line + "\n" + ' see troubleshooting section in README.txt file! ignoring further processing commands...'
|
543
617
|
end
|
544
618
|
end
|
545
619
|
@progress_bar.set_value(10 + idx/total_size*90)
|
@@ -573,10 +647,18 @@ EOL
|
|
573
647
|
names = opticals.map{|d| d.Name + "\\" + " (" + (d.VolumeName || 'Insert DVD to use') + ")"}
|
574
648
|
|
575
649
|
if opticals.length != 1
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
650
|
+
count = 0
|
651
|
+
opticals.each{|d| count += 1 if d.VolumeName}
|
652
|
+
if count == 1
|
653
|
+
# just choose it if there's only one disk in there
|
654
|
+
p 'selecting only disk present in the various DVD drives'
|
655
|
+
selected_idx = opticals.index{|d| d.VolumeName}
|
656
|
+
else
|
657
|
+
dialog = GetDisk.new(self, names)
|
658
|
+
dialog.setSize 200,125
|
659
|
+
dialog.show
|
660
|
+
selected_idx = dialog.selected_idx
|
661
|
+
end
|
580
662
|
else
|
581
663
|
selected_idx = 0
|
582
664
|
p 'selecting user\'s only disk drive ' + names[0]
|
@@ -623,8 +705,19 @@ EOL
|
|
623
705
|
end
|
624
706
|
end
|
625
707
|
|
708
|
+
require 'ffi'
|
709
|
+
|
710
|
+
module Win
|
711
|
+
extend FFI::Library
|
712
|
+
ffi_lib 'kernel32'
|
713
|
+
ffi_convention :stdcall
|
714
|
+
attach_function :get_process_id, :GetProcessId, [ :long ], :uint
|
715
|
+
end
|
716
|
+
|
626
717
|
if $0 == __FILE__
|
627
718
|
a = SensibleSwing::MainWindow.new
|
628
719
|
a.set_visible true
|
629
720
|
puts 'Please use the Sensible Cinema GUI window popup...'
|
630
721
|
end
|
722
|
+
|
723
|
+
# icon attribution: http://www.threes.com/index.php?option=com_content&view=article&id=1800:three-wise-monkeys&catid=82:mythology&Itemid=62
|
data/development.txt
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
Source code (open source, GPLv3) : http://github.com/rdp/sensible-cinema (create an issue for feature requests/bugs etc.)
|
2
|
+
|
3
|
+
You can test the program out out by (on windows) installing daemon tools, then mounting the DVD of "big buck bunny" (open source, freely available movie)
|
4
|
+
Or you could alternatively burn a copy of big buck bunny to DVD, then use that to test it against (a slightly more cross platform approach).
|
5
|
+
|
6
|
+
You should be able to run the program and test it out against said DVD, put it through its paces to demo it, etc.
|
7
|
+
|
8
|
+
Or if you have a DVD that already has a delete list available for it, you could use that, obviously.
|
9
|
+
|
10
|
+
The main development roadmap is in the README. If you have any feedback/feature requests, et al, post an
|
11
|
+
issue or post to the Mailing List: http://groups.google.com/group/sensible-cinema
|
12
|
+
|
13
|
+
It's written in jruby, and currently packages itself up as a zip with jruby-complete.jar with its required dependencies (see the Rakefile).
|
14
|
+
|
15
|
+
To run it from source, you may need to install a few gem dependencies (listed in the Rakefile)
|
16
|
+
|
17
|
+
The tests are in the spec directory, though some of them are out of date as development has focused in other areas.
|
18
|
+
|
19
|
+
Currently it's windows only, ping me if you want that changed.
|
20
|
+
|
21
|
+
We welcome all feedback/contribution :)
|
22
|
+
|
23
|
+
== Advanced Usage ==
|
24
|
+
|
25
|
+
For the screen tracker (experimental version--see experimental.txt),
|
26
|
+
you could specify the scene descriptions list and player list on the command-line, so you don't want to have
|
27
|
+
to re-select them like this will tell you how to run it from the command line:
|
28
|
+
|
29
|
+
C:\sensible-cinema-git-clone>jruby bin\sensible-cinema-cli --help
|