sensible-cinema 0.28.1 → 0.34.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. data/{README → README.TXT} +35 -14
  2. data/Rakefile +49 -41
  3. data/TODO +337 -250
  4. data/VERSION +1 -1
  5. data/bin/sensible-cinema +15 -14
  6. data/bin/sensible-cinema-cli +1 -1
  7. data/business_ideas.txt +8 -0
  8. data/change_log_with_feature_list.txt +198 -1
  9. data/documentation/is_it_legal_to_copy_dvds.txt +44 -30
  10. data/goc.bat +1 -1
  11. data/gpl-2.0.txt +339 -0
  12. data/history_and_related_works_list.txt +37 -33
  13. data/{cone.png → inventionzy_files/cone.png} +0 -0
  14. data/legal_draft +23 -0
  15. data/lib/add_any_bundled_gems_to_load_path.rb +4 -3
  16. data/lib/check_installed_mac.rb +10 -10
  17. data/lib/count_down_timer_jruby_swing.rb +4 -4
  18. data/lib/edl_parser.rb +155 -142
  19. data/lib/extract/dumpstream.bat +1 -0
  20. data/lib/extract/get_init.bat +3 -0
  21. data/lib/extract/pause_early.rb +13 -0
  22. data/lib/gui/base.rb +707 -0
  23. data/lib/gui/create-file.rb +244 -0
  24. data/lib/gui/create.rb +565 -0
  25. data/lib/gui/dependencies.rb +177 -0
  26. data/lib/gui/normal.rb +190 -0
  27. data/lib/gui/{sensible-cinema-upconvert.rb → upconvert.rb} +33 -14
  28. data/lib/keyboard_input.rb +0 -2
  29. data/lib/mencoder_wrapper.rb +8 -3
  30. data/lib/movie_hasher.rb +27 -0
  31. data/lib/mplayer_edl.rb +1 -0
  32. data/lib/subtitle_profanity_finder.rb +141 -103
  33. data/lib/vlc_programmer.rb +1 -1
  34. data/lib/zoom_player_max_edl.rb +50 -0
  35. data/{developer_how_to_contribute_to_the_project.txt → notes_for_potential_developers.txt} +18 -11
  36. data/roadmap_possibilities +12 -0
  37. data/spec/arse.srt +6 -1
  38. data/spec/dragon.srt +3 -0
  39. data/spec/edl_parser.spec.rb +57 -52
  40. data/spec/mencoder_wrapper.spec.rb +26 -19
  41. data/spec/mplayer_edl.spec.rb +40 -10
  42. data/spec/notes +3043 -9
  43. data/spec/sensible_cinema_gui.spec.rb +8 -3
  44. data/spec/subtitle_profanity_finder.spec.rb +91 -36
  45. data/spec/zoom_player_max_edl.spec.rb +29 -0
  46. data/template_bats/README_DISTRO.TXT +3 -1
  47. data/template_bats/RUN SENSIBLE CINEMA CLICK HERE WINDOWS.bat +25 -0
  48. data/template_bats/mac/RUN SENSIBLE CINEMA CLICK HERE.command +2 -1
  49. data/template_bats/mac/advanced--create or edit sensible cinema edit list files.command +2 -1
  50. data/template_bats/mac/advanced--run-upconverting-video-player.command +2 -1
  51. data/template_bats/pc/advanced--create or edit sensible cinema edit list files.bat +2 -0
  52. data/template_bats/pc/advanced--run-upconverting-video-player.bat +2 -0
  53. data/todo.inventionzy.txt +69 -2
  54. data/todo.propaganda +34 -10
  55. data/todo.upconvert +8 -1
  56. data/{upconvert_netflix/latest2 → upconvert_from_screen}/go_upscaling.bat +0 -0
  57. data/{also_see_rogerdpack_youtube_account_and_sourceforge_files_movies_account → upconvert_from_screen/go_upscaling_works} +0 -0
  58. data/{upconvert_netflix → upconvert_from_screen/old}/latest2/combine_video.avs +0 -0
  59. data/{upconvert_netflix → upconvert_from_screen/old}/latest2/go_no_upscaling.bat +0 -0
  60. data/upconvert_from_screen/old/latest2/go_upscaling.bat +12 -0
  61. data/{upconvert_netflix → upconvert_from_screen/old}/latest2/push2.GRF +0 -0
  62. data/upconvert_from_screen/old/latest2/push3.grf +0 -0
  63. data/{upconvert_netflix → upconvert_from_screen/old}/latest2/setup_capture_coords.rb +0 -0
  64. data/{upconvert_netflix → upconvert_from_screen/old}/latest2/setup_directshow_filter_params.rb +0 -0
  65. data/{upconvert_netflix → upconvert_from_screen/old}/latest2/upconvert_from_screen_me2.avs +1 -1
  66. data/{upconvert_netflix → upconvert_from_screen}/old/latest_now_possibly_oudated/push2.GRF +0 -0
  67. data/{upconvert_netflix → upconvert_from_screen}/old/latest_now_possibly_oudated/upconvert_from_screen_me2.avs +0 -0
  68. data/{upconvert_netflix → upconvert_from_screen}/old/position_window.png +0 -0
  69. data/{upconvert_netflix → upconvert_from_screen}/old/push_source_desktop.GRF +0 -0
  70. data/{upconvert_netflix → upconvert_from_screen/old}/record_screen/record.bat +0 -0
  71. data/{upconvert_netflix → upconvert_from_screen}/old/upconvert_from_screen.avs +0 -0
  72. data/{upconvert_netflix → upconvert_from_screen}/old/upconvert_from_screen_me.avs +0 -0
  73. data/{upconvert_netflix → upconvert_from_screen}/old/upconvert_from_screen_me2.avs +0 -0
  74. data/{upconvert_netflix → upconvert_from_screen}/old/upconvert_from_screen_me_push_source.avs +0 -0
  75. data/{upconvert_netflix → upconvert_from_screen}/old/uscreen.GRF +0 -0
  76. data/{upconvert_netflix → upconvert_from_screen}/old/uscreen_me.GRF +0 -0
  77. data/upconvert_from_screen/push3.grf +0 -0
  78. data/upconvert_from_screen/upconvert_from_screen_me2.avs +19 -0
  79. data/vendor/mplayer_patches/apply.bat +12 -0
  80. data/vendor/{rdp-win32screenshot-0.0.9/RDP_BRANCH_HAS_MASTER_WITH_CORRECT_VERSION_NUMBER → mplayer_patches/configure_from_betterlogic} +0 -0
  81. data/vendor/mplayer_patches/libdvdnav/2905259c3b45529b3d8dedba572b6e4f67a2d8f4.diff +19 -0
  82. data/vendor/mplayer_patches/libdvdnav/83f1c9256f500285e46f1e44bcc74ffce90159db.diff +16 -0
  83. data/vendor/mplayer_patches/libdvdnav/eb91fb74680d30322461a1b9e425918ad4e2b2df.diff +21 -0
  84. data/vendor/mplayer_patches/libdvdnav/jump_to_time.diff +654 -0
  85. data/vendor/mplayer_patches/libdvdnav/non_strict.diff +13 -0
  86. data/vendor/mplayer_patches/mplayer_edl.diff +354 -0
  87. data/vendor/mplayer_patches/port_dir/PortIndex.quick +2 -0
  88. data/vendor/mplayer_patches/port_dir/how_to +13 -0
  89. data/vendor/mplayer_patches/port_dir/multimedia/mplayer-edl/Portfile +300 -0
  90. data/vendor/mplayer_patches/port_dir/multimedia/mplayer-edl/files/configure.x11.patch +20 -0
  91. data/vendor/mplayer_patches/port_dir/multimedia/mplayer-edl/files/llvm-gcc-workaround.patch +11 -0
  92. data/vendor/mplayer_patches/port_dir/multimedia/rdp-projects/Portfile +43 -0
  93. data/vendor/{rdp-win32screenshot-0.0.9/RDP_VERSION_IS_IN_RDP_BRANCH → mplayer_patches/updated_lib_too} +0 -0
  94. data/vendor/{readme.txt → readme.txt.setpriority} +0 -0
  95. data/www/content_editor.html +28 -28
  96. data/www/index.html +6 -1
  97. data/www/upconverting_movie_player.html +13 -3
  98. data/www/youtube_edl/.htaccess +44 -0
  99. data/{inventionzy_files/control_youtube.html → www/youtube_edl/control_youtube.rhtml} +39 -33
  100. data/www/youtube_edl/dispatch.fcgi +25 -0
  101. data/www/youtube_edl/render_edited.rb +25 -0
  102. data/{inventionzy_files/serve.rb → www/youtube_edl/server_this_dir.rb} +0 -0
  103. data/www/youtube_edl/todo +23 -0
  104. data/www/zoomplayer_max.png +0 -0
  105. data/zamples/edit_decision_lists/dvds/Harry Potter 2 chamber of secrets.txt +10 -5
  106. data/zamples/edit_decision_lists/dvds/aladdin.txt +30 -0
  107. data/zamples/edit_decision_lists/dvds/bambi.txt +1 -1
  108. data/zamples/edit_decision_lists/dvds/big_buck_bunny_dvd.txt +2 -0
  109. data/zamples/edit_decision_lists/dvds/bobs_big_plan.txt +2 -2
  110. data/zamples/edit_decision_lists/dvds/cars_2.txt +26 -0
  111. data/zamples/edit_decision_lists/dvds/cars_disney.txt +1 -1
  112. data/zamples/edit_decision_lists/dvds/condor_man_widescreen.txt +22 -0
  113. data/zamples/edit_decision_lists/dvds/court_jester.txt +10 -13
  114. data/zamples/edit_decision_lists/dvds/edls_being_edited/making_marriage_work.txt +15 -0
  115. data/zamples/edit_decision_lists/dvds/edls_being_edited/national_treasure.txt +23 -0
  116. data/zamples/edit_decision_lists/dvds/edls_being_edited/ratatouille.txt +35 -0
  117. data/zamples/edit_decision_lists/dvds/edls_being_edited/the_explorers.txt +49 -0
  118. data/zamples/edit_decision_lists/dvds/finding_neverland.txt +32 -0
  119. data/zamples/edit_decision_lists/dvds/flight_of_the_navigator.txt +22 -16
  120. data/zamples/edit_decision_lists/dvds/harry_potter_3_prisoner_of_azkaban.txt +21 -4
  121. data/zamples/edit_decision_lists/dvds/hitchhiker's_guide_to_the_galaxy.txt +1 -1
  122. data/zamples/edit_decision_lists/dvds/{edls_being_edited/king_of_kings.txt → king_of_kings.txt} +5 -5
  123. data/zamples/edit_decision_lists/dvds/nanny_mcphee.txt +31 -0
  124. data/zamples/edit_decision_lists/dvds/pack_jackson_wedding_2007-03-03.txt +9 -2
  125. data/zamples/edit_decision_lists/dvds/remember_the_titans.txt +35 -0
  126. data/zamples/edit_decision_lists/dvds/sintel_open_source_blender_ntsc_dvd.txt +8 -4
  127. data/zamples/edit_decision_lists/dvds/speed_racer.txt +1 -1
  128. data/zamples/edit_decision_lists/dvds/tangled.txt +21 -0
  129. data/zamples/edit_decision_lists/dvds/tron_legacy.txt +4 -1
  130. data/zamples/edit_decision_lists/files/conference_music_video.txt +10 -0
  131. data/zamples/edit_decision_lists/notes_on_movies_without_edls_yet/tron.txt +10 -0
  132. data/zamples/edit_decision_lists/old_not_yet_updated/example_edit_decision_list.txt +1 -1
  133. metadata +139 -117
  134. data/conclusions +0 -6
  135. data/documentation/how_to_create_your_own_delete_lists.txt +0 -69
  136. data/lib/gui/sensible-cinema-base.rb +0 -620
  137. data/lib/gui/sensible-cinema-create.rb +0 -331
  138. data/lib/gui/sensible-cinema-dependencies.rb +0 -28
  139. data/lib/gui/sensible-cinema-normal.rb +0 -351
  140. data/lib/gui/sensible-cinema-side-by-side.rb +0 -27
  141. data/lib/shutdown_kill.rb +0 -32
  142. data/lib/storage.rb +0 -105
  143. data/ocr.todo_if_need_speed +0 -6
  144. data/upconvert_netflix/record_screen/recording/1.png +0 -0
  145. data/upconvert_netflix/record_screen/recording/10.png +0 -0
  146. data/upconvert_netflix/record_screen/recording/2.png +0 -0
  147. data/upconvert_netflix/record_screen/recording/3.png +0 -0
  148. data/upconvert_netflix/record_screen/recording/4.png +0 -0
  149. data/upconvert_netflix/record_screen/recording/5.png +0 -0
  150. data/upconvert_netflix/record_screen/recording/6.png +0 -0
  151. data/upconvert_netflix/record_screen/recording/7.png +0 -0
  152. data/upconvert_netflix/record_screen/recording/8.png +0 -0
  153. data/upconvert_netflix/record_screen/recording/9.png +0 -0
  154. data/upconvert_netflix/record_screen/recording/d.png +0 -0
  155. data/vendor/monkey.png +0 -0
  156. data/vendor/rdp-win32screenshot-0.0.9/.document +0 -5
  157. data/vendor/rdp-win32screenshot-0.0.9/History.rdoc +0 -53
  158. data/vendor/rdp-win32screenshot-0.0.9/LICENSE +0 -20
  159. data/vendor/rdp-win32screenshot-0.0.9/README.rdoc +0 -95
  160. data/vendor/rdp-win32screenshot-0.0.9/Rakefile +0 -63
  161. data/vendor/rdp-win32screenshot-0.0.9/VERSION +0 -1
  162. data/vendor/rdp-win32screenshot-0.0.9/enumerated +0 -55576
  163. data/vendor/rdp-win32screenshot-0.0.9/lib/aero_offscreen_srccopy_captureblt_doesnt_have_everything.bmp.gz +0 -0
  164. data/vendor/rdp-win32screenshot-0.0.9/lib/enumerate.rb +0 -6
  165. data/vendor/rdp-win32screenshot-0.0.9/lib/firefox.bmp +0 -0
  166. data/vendor/rdp-win32screenshot-0.0.9/lib/normal.bmp +0 -0
  167. data/vendor/rdp-win32screenshot-0.0.9/lib/normal2.bmp +0 -0
  168. data/vendor/rdp-win32screenshot-0.0.9/lib/notes +0 -5
  169. data/vendor/rdp-win32screenshot-0.0.9/lib/snapshot.rb +0 -10
  170. data/vendor/rdp-win32screenshot-0.0.9/lib/srccopy.bmp +0 -0
  171. data/vendor/rdp-win32screenshot-0.0.9/lib/srccopyplus.bmp +0 -0
  172. data/vendor/rdp-win32screenshot-0.0.9/lib/srccopyplusdirectx.bmp +0 -0
  173. data/vendor/rdp-win32screenshot-0.0.9/lib/vc.bmp +0 -0
  174. data/vendor/rdp-win32screenshot-0.0.9/lib/win32/screenshot.rb +0 -95
  175. data/vendor/rdp-win32screenshot-0.0.9/lib/win32/screenshot/bitmap_maker.rb +0 -200
  176. data/vendor/rdp-win32screenshot-0.0.9/lib/win32/util.rb +0 -93
  177. data/vendor/rdp-win32screenshot-0.0.9/spec/spec.opts +0 -1
  178. data/vendor/rdp-win32screenshot-0.0.9/spec/spec_helper.rb +0 -85
  179. data/vendor/rdp-win32screenshot-0.0.9/spec/win32_screenshot_spec.rb +0 -194
  180. data/vendor/rdp-win32screenshot-0.0.9/spec/win32_screenshot_util_spec.rb +0 -75
  181. data/vendor/rdp-win32screenshot-0.0.9/win32screenshot.gemspec +0 -69
  182. data/vendor/tsmuxer_1.10.6/licence.txt +0 -42
  183. data/zamples/edit_decision_lists/dvds/making_marriage_work.txt +0 -15
  184. data/zamples/edit_decision_lists/notes/tron.txt +0 -4
  185. data/zamples/edit_decision_lists/old_not_yet_updated/dvds/making marriage work.txt +0 -9
@@ -0,0 +1,13 @@
1
+ Index: vm/vm.c
2
+ ===================================================================
3
+ --- vm/vm.c (revision 1243)
4
+ +++ vm/vm.c (working copy)
5
+ @@ -1129,7 +1129,7 @@
6
+ case 1: /* Angle block */
7
+ /* Loop and check each cell instead? So we don't get outside the block? */
8
+ (vm->state).cellN += (vm->state).AGL_REG - 1;
9
+ -#ifdef STRICT
10
+ +#if 0
11
+ assert((vm->state).cellN <= (vm->state).pgc->nr_of_cells);
12
+ assert((vm->state).pgc->cell_playback[(vm->state).cellN - 1].block_mode != 0);
13
+ assert((vm->state).pgc->cell_playback[(vm->state).cellN - 1].block_type == 1);
@@ -0,0 +1,354 @@
1
+ Index: stream/stream_dvdnav.c
2
+ ===================================================================
3
+ --- stream/stream_dvdnav.c (revision 34396)
4
+ +++ stream/stream_dvdnav.c (working copy)
5
+ @@ -302,7 +302,7 @@
6
+ fail:
7
+ mp_msg(MSGT_STREAM,MSGL_INFO,"dvdnav_stream, seeking to %"PRIu64" failed: %s\n", newpos, dvdnav_err_to_string(priv->dvdnav));
8
+
9
+ - return 1;
10
+ + return 0;
11
+ }
12
+
13
+ static void stream_dvdnav_close(stream_t *s) {
14
+ @@ -465,7 +465,8 @@
15
+ case STREAM_CTRL_SEEK_TO_TIME:
16
+ {
17
+ uint64_t tm = *(double *)arg * 90000;
18
+ - if(dvdnav_time_search(priv->dvdnav, tm) == DVDNAV_STATUS_OK)
19
+ + printf("\njumping to %d", tm);
20
+ + if(dvdnav_jump_to_sector_by_time(priv->dvdnav, tm) == DVDNAV_STATUS_OK)
21
+ return 1;
22
+ break;
23
+ }
24
+ Index: mplayer.c
25
+ ===================================================================
26
+ --- mplayer.c (revision 34396)
27
+ +++ mplayer.c (working copy)
28
+ @@ -144,6 +144,7 @@
29
+ int enable_mouse_movements;
30
+ float start_volume = -1;
31
+ double start_pts = MP_NOPTS_VALUE;
32
+ +float osd_add_this_much = 0.0;
33
+ char *heartbeat_cmd;
34
+ static int max_framesize;
35
+
36
+ @@ -1227,7 +1228,7 @@
37
+
38
+ // Video time
39
+ if (sh_video)
40
+ - saddf(line, &pos, width, "V:%6.1f ", sh_video->pts);
41
+ + saddf(line, &pos, width, "V:%6.2f ", sh_video->pts);
42
+
43
+ // A-V sync
44
+ if (mpctx->sh_audio && sh_video)
45
+ @@ -1577,15 +1578,47 @@
46
+ return;
47
+ }
48
+
49
+ + char osd_accuracy_level[128] = "";
50
+ +
51
+ if (mpctx->sh_video) {
52
+ // fallback on the timer
53
+ if (osd_level >= 2) {
54
+ - int len = demuxer_get_time_length(mpctx->demuxer);
55
+ + double double_len = demuxer_get_time_length(mpctx->demuxer);
56
+ + int len = (int) double_len;
57
+ int percentage = -1;
58
+ char percentage_text[10];
59
+ char fractions_text[4];
60
+ - int pts = demuxer_get_current_time(mpctx->demuxer);
61
+ -
62
+ + double pts = demuxer_get_current_time(mpctx->demuxer);
63
+ +
64
+ + if(osd_verbose)
65
+ + printf("adding %f to %f \n", osd_add_this_much, pts); // cannot figure it out <sniff>
66
+ + pts += osd_add_this_much;
67
+ + if(osd_verbose)
68
+ + printf("final: %f\n", pts);
69
+ + if((pts - 1.0) < mpctx->sh_video->pts) {
70
+ + // kind of already infer this from the OSD title now :)
71
+ + //printf("using mpeg ts appears larger, which if true is definitely better %f > %f - 1.0\n", mpctx->sh_video->pts, pts);
72
+ + if(osd_add_this_much > 0) {
73
+ + snprintf(osd_accuracy_level, 100, "EDL-high-DVD-accurate");
74
+ + } else {
75
+ + if(mpctx->sh_video->pts == pts) {
76
+ + snprintf(osd_accuracy_level, 100, "EDL-high-File-accurate");
77
+ + } else {
78
+ + snprintf(osd_accuracy_level, 100, "EDL-high-DVD-accurate");
79
+ + }
80
+ + }
81
+ + pts = mpctx->sh_video->pts;
82
+ + } else {
83
+ + // typically only DVD gets here...
84
+ + // hmm...
85
+ + if(osd_add_this_much > 0) {
86
+ + snprintf(osd_accuracy_level, 100,"EDL-medium-DVD-accurate");
87
+ + } else {
88
+ + snprintf(osd_accuracy_level, 100,"EDL-low-DVD-accurate");
89
+ + }
90
+ + }
91
+ + int seconds = (int) pts;
92
+ +
93
+ if (mpctx->osd_show_percentage)
94
+ percentage = demuxer_get_percent_pos(mpctx->demuxer);
95
+
96
+ @@ -1607,24 +1640,25 @@
97
+ // whose first frame is not exactly at timestamp 0. Therefore,
98
+ // we add 0.2 and cut off at the decimal point, which proved
99
+ // as good heuristic
100
+ - snprintf(fractions_text, sizeof(fractions_text), ".%02d",
101
+ - (int)((mpctx->sh_video->pts - pts) *
102
+ - mpctx->sh_video->fps + 0.2));
103
+ + //snprintf(fractions_text, sizeof(fractions_text), ".%02d",
104
+ + // (int)((mpctx->sh_video->pts - pts) *
105
+ + // mpctx->sh_video->fps + 0.2));
106
+ } else {
107
+ // do not print fractions
108
+ fractions_text[0] = 0;
109
+ }
110
+
111
+ - if (osd_level == 3)
112
+ + if (osd_level == 3)
113
+ snprintf(osd_text_timer, 63,
114
+ - "%c %02d:%02d:%02d%s / %02d:%02d:%02d%s",
115
+ - mpctx->osd_function, pts / 3600, (pts / 60) % 60, pts % 60,
116
+ + "%s:%c %02d:%02d:%02d%s / %02d:%02d:%02d%s",
117
+ + osd_accuracy_level, mpctx->osd_function, (int)pts / 3600, (int)(pts / 60) % 60, (int)pts % 60,
118
+ fractions_text, len / 3600, (len / 60) % 60, len % 60,
119
+ - percentage_text);
120
+ - else
121
+ - snprintf(osd_text_timer, 63, "%c %02d:%02d:%02d%s%s",
122
+ - mpctx->osd_function, pts / 3600, (pts / 60) % 60,
123
+ - pts % 60, fractions_text, percentage_text);
124
+ + percentage_text);
125
+ + else {
126
+ + snprintf(osd_text_timer, 63, "%s:%c %02d:%02d:%02d%s%s", osd_accuracy_level,
127
+ + mpctx->osd_function, (int)pts / 3600, ((int)pts / 60) % 60,
128
+ + (int)pts % 60, fractions_text, percentage_text);
129
+ + }
130
+ } else
131
+ osd_text_timer[0] = 0;
132
+
133
+ @@ -1642,7 +1676,6 @@
134
+ // Clear the term osd line
135
+ if (term_osd && osd_text[0]) {
136
+ osd_text[0] = 0;
137
+ - printf("%s\n", term_osd_esc);
138
+ }
139
+ }
140
+
141
+ @@ -2590,6 +2623,7 @@
142
+ }
143
+
144
+ // Execute EDL command for the current position if one exists
145
+ +// this is where the "muting" or "skipping" actually occurs
146
+ static void edl_update(MPContext *mpctx)
147
+ {
148
+ if (!edl_records)
149
+ @@ -2602,7 +2636,7 @@
150
+ edl_records = NULL;
151
+ return;
152
+ }
153
+ -
154
+ + double pts = demuxer_get_current_time(mpctx->demuxer);
155
+ // This indicates that we need to reset next EDL record according
156
+ // to new PTS due to seek or other condition
157
+ if (edl_needs_reset) {
158
+ @@ -2613,22 +2647,22 @@
159
+ // Find next record, also skip immediately if we are already
160
+ // inside any record
161
+ while (next_edl_record) {
162
+ - if (next_edl_record->start_sec > mpctx->sh_video->pts)
163
+ + if (next_edl_record->start_sec > pts)
164
+ break;
165
+ - if (next_edl_record->stop_sec >= mpctx->sh_video->pts) {
166
+ + if (next_edl_record->stop_sec >= pts) {
167
+ if (edl_backward) {
168
+ + // this is just for "after some seek, check if we're in an EDL"
169
+ mpctx->osd_function = OSD_REW;
170
+ edl_decision = 1;
171
+ abs_seek_pos = 0;
172
+ - rel_seek_secs = -(mpctx->sh_video->pts -
173
+ + rel_seek_secs = -(pts -
174
+ next_edl_record->start_sec +
175
+ edl_backward_delay);
176
+ - mp_msg(MSGT_CPLAYER, MSGL_DBG4, "EDL_SKIP: pts [%f], "
177
+ - "offset [%f], start [%f], stop [%f], length [%f]\n",
178
+ - mpctx->sh_video->pts, rel_seek_secs,
179
+ + printf( "\nEDL_SKIP special: pts [%f], offset [%f], start [%f], stop [%f], length [%f]\n",
180
+ + pts, rel_seek_secs,
181
+ next_edl_record->start_sec, next_edl_record->stop_sec,
182
+ next_edl_record->length_sec);
183
+ - return;
184
+ + return; // early return
185
+ }
186
+ break;
187
+ }
188
+ @@ -2643,15 +2677,16 @@
189
+ }
190
+
191
+ if (next_edl_record &&
192
+ - mpctx->sh_video->pts >= next_edl_record->start_sec) {
193
+ + pts >= next_edl_record->start_sec) {
194
+ if (next_edl_record->action == EDL_SKIP) {
195
+ mpctx->osd_function = OSD_FFW;
196
+ edl_decision = 1;
197
+ abs_seek_pos = 0;
198
+ - rel_seek_secs = next_edl_record->stop_sec - mpctx->sh_video->pts;
199
+ + rel_seek_secs = next_edl_record->stop_sec - pts;
200
+ + printf("\n\nEDL rel seek secs %f %f [%f,%f] \n", rel_seek_secs, pts, next_edl_record->start_sec, next_edl_record->stop_sec);
201
+ mp_msg(MSGT_CPLAYER, MSGL_DBG4, "EDL_SKIP: pts [%f], offset [%f], "
202
+ "start [%f], stop [%f], length [%f]\n",
203
+ - mpctx->sh_video->pts, rel_seek_secs,
204
+ + pts, rel_seek_secs,
205
+ next_edl_record->start_sec, next_edl_record->stop_sec,
206
+ next_edl_record->length_sec);
207
+ } else if (next_edl_record->action == EDL_MUTE) {
208
+ @@ -3868,6 +3903,7 @@
209
+
210
+ edl_update(mpctx);
211
+
212
+ +
213
+ //================= Keyboard events, SEEKing ====================
214
+
215
+ current_module = "key_events";
216
+ @@ -3951,7 +3987,7 @@
217
+ guiInfo.Chapter = dvd_chapter_from_cell(dvdp, guiInfo.Track - 1, dvdp->cur_cell) + 1;
218
+ }
219
+ #endif
220
+ - }
221
+ + } // if use_gui
222
+ #endif /* CONFIG_GUI */
223
+ } // while(!mpctx->eof)
224
+
225
+ Index: cfg-mplayer.h
226
+ ===================================================================
227
+ --- cfg-mplayer.h (revision 34396)
228
+ +++ cfg-mplayer.h (working copy)
229
+ @@ -86,6 +86,7 @@
230
+ {"softvol", &soft_vol, CONF_TYPE_FLAG, 0, 0, 1, NULL},
231
+ {"nosoftvol", &soft_vol, CONF_TYPE_FLAG, 0, 1, 0, NULL},
232
+ {"softvol-max", &soft_vol_max, CONF_TYPE_FLOAT, CONF_RANGE, 10, 10000, NULL},
233
+ +// {"add-osd", &add_this_much, CONF_TYPE_FLOAT, CONF_RANGE, 0, 10000, NULL},
234
+ {"volstep", &volstep, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
235
+ {"volume", &start_volume, CONF_TYPE_FLOAT, CONF_RANGE, -1, 10000, NULL},
236
+ {"master", "Option -master has been removed, use -af volume instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
237
+ @@ -233,7 +234,11 @@
238
+ {"crash-debug", &crash_debug, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
239
+ {"nocrash-debug", &crash_debug, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
240
+ #endif
241
+ +// {"osd-add-this-much", &osd_add_this_much, CONF_TYPE_FLOAT, CONF_RANGE, 0, 10000, NULL},
242
+ {"osdlevel", &osd_level, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
243
+ + {"osd-add", &osd_add_this_much, CONF_TYPE_FLOAT, CONF_RANGE, -100.0, 100.0, NULL},
244
+ + {"osd-verbose", &osd_verbose, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
245
+ +
246
+ {"osd-duration", &osd_duration, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
247
+ {"osd-fractions", &osd_fractions, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
248
+ #ifdef CONFIG_MENU
249
+ Index: mplayer.h
250
+ ===================================================================
251
+ --- mplayer.h (revision 34396)
252
+ +++ mplayer.h (working copy)
253
+ @@ -27,6 +27,8 @@
254
+ extern char **audio_driver_list;
255
+
256
+ extern int osd_level;
257
+ +extern float osd_add_this_much;
258
+ +extern int osd_verbose;
259
+ extern unsigned int osd_visible;
260
+ extern int autosync;
261
+ extern int frame_dropping;
262
+ Index: libmpdemux/demuxer.c
263
+ ===================================================================
264
+ --- libmpdemux/demuxer.c (revision 34396)
265
+ +++ libmpdemux/demuxer.c (working copy)
266
+ @@ -493,7 +493,6 @@
267
+ //codec_id = CODEC_ID_DNET;
268
+ break;
269
+ case MKTAG('E', 'A', 'C', '3'):
270
+ - case MKTAG('e', 'c', '-', '3'):
271
+ codec_id = CODEC_ID_EAC3;
272
+ break;
273
+ case 0x2001:
274
+ @@ -1473,6 +1472,9 @@
275
+ return get_time_ans;
276
+ }
277
+
278
+ +int osd_verbose = 0;
279
+ +double last_dvd_update_pos = 0;
280
+ +double last_stream_pos_at_that_dvd_time = 0;
281
+ /**
282
+ * \brief demuxer_get_current_time() returns the time of the current play in three possible ways:
283
+ * either when the stream reader satisfies STREAM_CTRL_GET_CURRENT_TIME (e.g. dvd)
284
+ @@ -1480,15 +1482,50 @@
285
+ * 0 otherwise
286
+ * \return the current play time
287
+ */
288
+ -int demuxer_get_current_time(demuxer_t *demuxer)
289
+ +double demuxer_get_current_time(demuxer_t *demuxer)
290
+ {
291
+ double get_time_ans = 0;
292
+ sh_video_t *sh_video = demuxer->video->sh;
293
+ - if (demuxer->stream_pts != MP_NOPTS_VALUE)
294
+ - get_time_ans = demuxer->stream_pts;
295
+ - else if (sh_video)
296
+ + if (demuxer->stream_pts != MP_NOPTS_VALUE) {
297
+ + get_time_ans = demuxer->stream_pts;
298
+ + if (osd_verbose)
299
+ + printf("\nlast NAV packet was %f, mpeg at %f ", get_time_ans, sh_video->pts);
300
+ +
301
+ +// 30/1.001 ... hmm. ...
302
+ + get_time_ans *= 1.001; // convert to 29.97 fps, mplayer's golden standard :P // could do this within libdvdnav uh guess...possibly all of it...
303
+ + if (osd_verbose)
304
+ + printf("after -> 29.97 %f\n", get_time_ans);
305
+ +
306
+ + double total_length = demuxer_get_time_length(demuxer);
307
+ +
308
+ + if(get_time_ans != last_dvd_update_pos) {
309
+ + last_dvd_update_pos = get_time_ans;
310
+ + last_stream_pos_at_that_dvd_time = sh_video->pts;
311
+ + if (osd_verbose)
312
+ + printf("new NAV packet! %f [adjusted] at %f ", get_time_ans, sh_video->pts);
313
+ + } else {
314
+ + double difference = (sh_video->pts - last_stream_pos_at_that_dvd_time);
315
+ +
316
+ + if(difference > 0 && difference < 1.5) { // should never be very high, typically < 0.6 as it's just "between NAV packets"
317
+ + if (osd_verbose)
318
+ + printf("adding difference %f ", difference);
319
+ + get_time_ans += difference; // add the latest difference, already in 29.97 so not morphing needed. weird-z-o
320
+ + } else {
321
+ + printf("not adding odd diff1? %f", difference);
322
+ + last_stream_pos_at_that_dvd_time = sh_video->pts;
323
+ + }
324
+ + if(get_time_ans < 0)
325
+ + get_time_ans = 0;
326
+ + }
327
+ +
328
+ + }
329
+ + else if (sh_video) {
330
+ + printf("weird fella suddenly we're not a DVD? mpeg at %f ", sh_video->pts);
331
+ + // we get here at the mpeg "splits" cross overs splits...
332
+ get_time_ans = sh_video->pts;
333
+ - return (int) get_time_ans;
334
+ +
335
+ + }
336
+ + return get_time_ans;
337
+ }
338
+
339
+ int demuxer_get_percent_pos(demuxer_t *demuxer)
340
+ Index: libmpdemux/demuxer.h
341
+ ===================================================================
342
+ --- libmpdemux/demuxer.h (revision 34396)
343
+ +++ libmpdemux/demuxer.h (working copy)
344
+ @@ -437,8 +437,8 @@
345
+ int demux_info_print(demuxer_t *demuxer);
346
+ int demux_control(demuxer_t *demuxer, int cmd, void *arg);
347
+
348
+ -int demuxer_get_current_time(demuxer_t *demuxer);
349
+ -double demuxer_get_time_length(demuxer_t *demuxer);
350
+ +double demuxer_get_current_time(demuxer_t *demuxer);
351
+ +double demuxer_get_time_length(demuxer_t *demuxer);
352
+ int demuxer_get_percent_pos(demuxer_t *demuxer);
353
+ int demuxer_switch_audio(demuxer_t *demuxer, int index);
354
+ int demuxer_switch_video(demuxer_t *demuxer, int index);
@@ -0,0 +1,2 @@
1
+ mplayer-edl 0
2
+ rdp-projects 1083
@@ -0,0 +1,13 @@
1
+ http://guide.macports.org/#development.local-repositories
2
+ you want osd variant
3
+ this basically collids with mplayer, I guess [without any way around that?] so you cannot install this and any other mplayer port
4
+
5
+
6
+ sudo port -kd install mplayer-edl +osd
7
+
8
+ home macports: ./configure --prefix=/opt/rdp_project_local --with-applications-dir=/Applications/rdp_projects
9
+
10
+ add
11
+ /Users/rogerdpack/sensible-cinema/vendor/mplayer_patches/port_dir
12
+ to
13
+ /opt/rdp_project_local/etc/macports/sources.conf
@@ -0,0 +1,300 @@
1
+ # $Id: Portfile 86914 2011-11-07 02:04:09Z ecronin@macports.org $
2
+
3
+
4
+ # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
5
+
6
+ PortSystem 1.0
7
+
8
+ name mplayer-edl
9
+ version 34269
10
+ revision 1
11
+ categories multimedia
12
+ maintainers acho openmaintainer
13
+ platforms darwin
14
+ license GPL-2
15
+
16
+ set dvdnav_ver 1228
17
+ set ffmpeg_ver ce253edf4e5bca101d618d7b
18
+
19
+ description The MPlayer movie player built from SVN.
20
+ long_description ${description} It plays most MPEG/VOB, AVI, Ogg/OGM, \
21
+ VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, \
22
+ NUT, NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files, \
23
+ supported by many native, XAnim, and Win32 DLL codecs. \
24
+ You can watch VideoCD, SVCD, DVD, 3ivx, DivX 3/4/5, WMV \
25
+ and even H.264 movies.
26
+ homepage http://www.mplayerhq.hu/
27
+
28
+ livecheck.type none
29
+
30
+ depends_build port:pkgconfig port:yasm
31
+ depends_lib \
32
+ port:jpeg port:openjpeg port:lame port:libiconv port:libmad \
33
+ port:libogg port:libpng port:libtheora port:libvorbis \
34
+ port:lzo2 port:ncurses port:zlib port:bzip2 port:liboil \
35
+ port:libdca port:faad2
36
+
37
+ if {![variant_isset minimal]} {
38
+ default_variants +osd
39
+ }
40
+
41
+ fetch.type svn
42
+ #svn.revision ${version}
43
+ #svn.url svn://svn.mplayerhq.hu/mplayer/trunk
44
+ depends_fetch-append bin:git:git-core
45
+ worksrcdir trunk
46
+
47
+ fetch {
48
+ system "svn export --force -r${version} --ignore-externals svn://svn.mplayerhq.hu/mplayer/trunk ${worksrcpath}/"
49
+ system "svn export --force -r${dvdnav_ver} svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdnav/src ${worksrcpath}/libdvdnav/"
50
+ system "svn export --force -r${dvdnav_ver} svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread/src ${worksrcpath}/libdvdread4/"
51
+
52
+ # TODO novo lib, other patches
53
+ # 1000 should be deep enough to find out checkout
54
+ system "git clone --depth 1000 https://github.com/FFmpeg/FFmpeg.git ${worksrcpath}/ffmpeg"
55
+ system "cd ${worksrcpath}/ffmpeg && git checkout -f ${ffmpeg_ver}"
56
+ system "cd ${worksrcpath} && patch -p0 < ${portpath}/../../../mplayer_edl.diff"
57
+ system "cd ${worksrcpath}/libdvdnav && patch -p1 < ${portpath}/../../../libdvdnav/jump_to_time.diff"
58
+ }
59
+
60
+ # Do not use the following environment variables, otherwise the build phase
61
+ # will fail.
62
+ configure.cflags {}
63
+ configure.cppflags {}
64
+ configure.cxxflags {}
65
+ configure.ldflags {}
66
+ configure.cc_archflags {}
67
+ configure.cxx_archflags {}
68
+
69
+ # Do not use pipes, otherwise the build phase will fail.
70
+ configure.pipe no
71
+
72
+ configure.args \
73
+ --extra-cflags="-I${prefix}/include/lzo -I${prefix}/include" \
74
+ --extra-ldflags="-L${prefix}/lib -L${prefix}/lib/samba3" \
75
+ --datadir=${prefix}/share/${name} \
76
+ --confdir=${prefix}/etc/${name} \
77
+ --mandir=${prefix}/share/man \
78
+ --enable-png --enable-jpeg --enable-liblzo \
79
+ --enable-theora --enable-libvorbis --enable-mad
80
+
81
+ # MPlayer autodetects many support libs. To prevent undeclared
82
+ # dependencies, explicitly disable everything optional first.
83
+ # Later, let autodetect do its magic not explicit --enable
84
+ configure.args-append \
85
+ --disable-smb --disable-live \
86
+ --disable-dvdread --disable-cdparanoia --disable-freetype \
87
+ --disable-fontconfig --disable-fribidi \
88
+ --disable-enca --disable-libcdio --disable-xvid \
89
+ --disable-x264 --disable-speex \
90
+ --disable-faac --disable-libdv \
91
+ --disable-toolame --disable-twolame --disable-xmms \
92
+ --disable-musepack --disable-sdl --disable-aa \
93
+ --disable-caca --disable-x11 --disable-gl --disable-arts \
94
+ --disable-esd --disable-lirc --disable-mng --disable-libdirac-lavc \
95
+ --disable-libschroedinger-lavc --disable-liba52 \
96
+ --disable-gif
97
+
98
+ patchfiles configure.x11.patch
99
+
100
+ post-destroot {
101
+ xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
102
+ eval file copy [glob ${worksrcpath}/DOCS/*] \
103
+ ${destroot}${prefix}/share/doc/${name}
104
+ xinstall -d -m 0755 ${destroot}${prefix}/etc/${name}
105
+ foreach etcfile {codecs.conf dvb-menu.conf example.conf \
106
+ input.conf menu.conf} {
107
+ xinstall -m 0644 ${worksrcpath}/etc/${etcfile} \
108
+ ${destroot}${prefix}/etc/${name}/${etcfile}
109
+ }
110
+ xinstall -d -m 0755 ${destroot}${prefix}/share/man/man1
111
+ xinstall -m 0644 ${worksrcpath}/DOCS/man/en/mplayer.1 \
112
+ ${destroot}${prefix}/share/man/man1/
113
+ xinstall -m 0755 ${worksrcpath}/TOOLS/midentify.sh ${destroot}${prefix}/bin/midentify
114
+ }
115
+
116
+ universal_variant no
117
+
118
+ variant man_all_lang \
119
+ description {Install all possible languages for man pages} {
120
+ configure.args-append --language=all
121
+ }
122
+
123
+ # Bundle all the font deps into one onscreen display variant
124
+ # Allow autodetect to pick up fontconfig & freetype
125
+ variant osd \
126
+ description {Enable onscreen display and TrueType font support} {
127
+ depends_lib-append port:fontconfig port:freetype
128
+ configure.args-delete --disable-fontconfig
129
+ configure.args-delete --disable-freetype
130
+ configure.args-append --enable-menu
131
+ }
132
+
133
+ variant fribidi requires osd \
134
+ description {Enable FriBidi Unicode support} {
135
+ depends_lib-append port:fribidi
136
+ configure.args-delete --disable-fribidi
137
+ }
138
+
139
+ variant noappleremote \
140
+ description {Disable Apple Infrared Remote support} {
141
+ configure.args-append --disable-apple-remote
142
+ }
143
+
144
+ variant lirc \
145
+ description {Enable Linux Infrared Remote Daemon support} {
146
+ depends_lib-append port:lirc
147
+ configure.args-delete --disable-lirc
148
+ }
149
+
150
+ variant live \
151
+ description {Enable live555 support} {
152
+ depends_lib-append port:live555
153
+ configure.args-delete --disable-live
154
+ }
155
+
156
+ #####
157
+
158
+ variant nodvd \
159
+ description {Disable DVD and DeCSS support} {
160
+ configure.args-append --disable-dvdread-internal --disable-libdvdcss-internal
161
+ }
162
+
163
+ variant samba description {Enable Samba support} {
164
+ depends_lib-append port:samba3
165
+ configure.args-append --enable-smb
166
+ configure.args-delete --disable-smb
167
+ }
168
+
169
+ ##### External codecs
170
+
171
+ variant mencoder_extras \
172
+ description {Enable extra codecs for encoding (XviD, x264, aac, DV, MP2)} {
173
+
174
+ depends_lib-append port:XviD port:x264 port:faac port:libdv \
175
+ port:twolame
176
+ configure.args-delete --disable-xvid
177
+ configure.args-delete --disable-x264
178
+ configure.args-delete --disable-faac
179
+ configure.args-delete --disable-libdv
180
+ configure.args-delete --disable-twolame
181
+ }
182
+ variant xvid requires mencoder_extras \
183
+ description {deprecated: use +mencoder_extras instead} {}
184
+ variant x264 requires mencoder_extras \
185
+ description {deprecated: use +mencoder_extras instead} {}
186
+ variant faac requires mencoder_extras \
187
+ description {deprecated: use +mencoder_extras instead} {}
188
+ variant dv requires mencoder_extras \
189
+ description {deprecated: use +mencoder_extras instead} {}
190
+ variant twolame requires mencoder_extras \
191
+ description {deprecated: use +mencoder_extras instead} {}
192
+
193
+
194
+ variant speex \
195
+ description {Enable Speex playback} {
196
+ depends_lib-append path:lib/libspeex.dylib:speex
197
+ configure.args-delete --disable-speex
198
+ }
199
+
200
+ variant dts \
201
+ description {Enable non-passthrough DTS playback} {
202
+ depends_lib-append port:libdca
203
+ configure.args-delete --disable-libdts
204
+ }
205
+
206
+ variant mng \
207
+ description {Enable mng codec support} {
208
+ depends_lib-append port:libmng
209
+ configure.args-delete --disable-mng
210
+ }
211
+
212
+ variant dirac \
213
+ description {Enable dirac codec support} {
214
+ depends_lib-append port:dirac port:schroedinger
215
+ configure.args-delete --disable-libdirac-lavc
216
+ configure.args-delete --disable-libschroedinger-lavc
217
+ }
218
+
219
+ variant a52 \
220
+ description {Enable AC-3 codec support} {
221
+ depends_lib-append port:a52dec
222
+ configure.args-delete --disable-liba52
223
+ }
224
+
225
+ ##### Outputs
226
+
227
+ variant sdl \
228
+ description {Enable SDL video output} {
229
+ depends_lib-append path:lib/pkgconfig/sdl.pc:libsdl
230
+ configure.args-delete --disable-sdl
231
+ }
232
+
233
+ variant aa \
234
+ description {Enable animated ASCII art video output} {
235
+ depends_lib-append port:aalib
236
+ configure.args-delete --disable-aa
237
+ }
238
+
239
+ variant caca \
240
+ description {Enable animated ASCII art video output} {
241
+ depends_lib-append port:libcaca
242
+ configure.args-delete --disable-caca
243
+ }
244
+
245
+ variant x11 {
246
+ depends_lib-append \
247
+ port:xorg-libXinerama \
248
+ port:xorg-libXv \
249
+ port:xorg-libXxf86vm
250
+
251
+ configure.args-delete --disable-x11
252
+ configure.args-append --enable-x11 --enable-xv --enable-xinerama --enable-xshape
253
+ }
254
+
255
+ variant esd \
256
+ description {Enable EsounD audio output} {
257
+ depends_lib-append port:esound
258
+ configure.args-delete --disable-esd
259
+ }
260
+
261
+ platform macosx {
262
+ if { ${configure.build_arch} == "x86_64" } {
263
+ configure.args-append --disable-qtx
264
+ } else {
265
+ configure.args-append --enable-qtx
266
+ }
267
+ }
268
+
269
+ variant glx requires x11 description {Enable glx output support. Due to a bug in mplayer, this disables corevideo support} {
270
+ depends_lib-append port:mesa
271
+ configure.args-delete --disable-gl
272
+ configure.args-append --enable-gl --disable-corevideo
273
+ }
274
+
275
+ variant debug description {Compile with debugging symbols} {
276
+ configure.args-append --enable-debug=gdb3 --disable-altivec
277
+ }
278
+
279
+ platform darwin 9 {
280
+ configure.args-delete --extra-cflags="-I${prefix}/include/lzo -I${prefix}/include"
281
+ configure.args-append --extra-cflags="-fomit-frame-pointer -I${prefix}/include/lzo -I${prefix}/include"
282
+ }
283
+
284
+ if {${configure.compiler} == "llvm-gcc-4.2"} {
285
+ # llvm-gcc-4.2 fails to build vf_fspp.c properly with -O2 and above
286
+ patchfiles-append llvm-gcc-workaround.patch
287
+
288
+ post-patch {
289
+ # link time optimization fails to find references for ff_mlp_firorder*
290
+ # For some reason -O4 -fno-lto doesn't work as well, so just use -O3
291
+ reinplace "s:-O4:-O3:" ${worksrcpath}/configure
292
+ }
293
+ }
294
+
295
+ platform darwin {
296
+ if { ${configure.build_arch} == "x86_64" } {
297
+ configure.args-append --target=${configure.build_arch}-Darwin
298
+ }
299
+ build.env LD=${configure.cc}
300
+ }