sensible-cinema 0.34.0 → 0.35.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitmodules +1 -1
- data/README.TXT +19 -20
- data/Rakefile +191 -195
- data/TODO +122 -149
- data/VERSION +1 -1
- data/bin/sensible-cinema +52 -52
- data/change_log_with_feature_list.txt +532 -481
- data/documentation/troubleshooting.txt +3 -9
- data/go.bat +2 -2
- data/go.sh +1 -0
- data/goc.bat +1 -1
- data/goc.sh +1 -0
- data/lib/check_installed_mac.rb +2 -10
- data/lib/edl_parser.rb +40 -16
- data/lib/gui/base.rb +85 -27
- data/lib/gui/create-file.rb +3 -2
- data/lib/gui/create.rb +118 -101
- data/lib/gui/dependencies.rb +110 -76
- data/lib/gui/normal.rb +32 -81
- data/lib/mplayer_edl.rb +7 -1
- data/lib/subtitle_profanity_finder.rb +10 -5
- data/notes_for_potential_developers.txt +18 -25
- data/spec/bad_beginning.srt +3778 -0
- data/spec/edl_parser.spec.rb +4 -0
- data/spec/notes +327 -167
- data/spec/youtube_edl.spec.rb +28 -0
- data/template_bats/RUN SENSIBLE CINEMA CLICK HERE WINDOWS.bat +2 -2
- data/todo.inventionzy.txt +3 -1
- data/vendor/mplayer_patches/how_to_doze.bat +6 -0
- data/vendor/mplayer_patches/port_dir/PortIndex.quick +1 -1
- data/vendor/mplayer_patches/port_dir/how_to +16 -9
- data/vendor/mplayer_patches/port_dir/multimedia/mplayer-edl/Portfile +10 -25
- data/vendor/mplayer_patches/port_dir/multimedia/rdp-projects/Portfile +2 -2
- data/vendor/mplayer_patches/{configure_from_betterlogic → port_dir_is_for_mac} +0 -0
- data/www/content_editor.html +9 -5
- data/zamples/edit_decision_lists/dvds/big_buck_bunny_dvd.txt +7 -4
- data/zamples/edit_decision_lists/dvds/court_jester.txt +0 -1
- data/zamples/edit_decision_lists/dvds/edls_being_edited/father_goose.txt +41 -0
- data/zamples/edit_decision_lists/dvds/edls_being_edited/harry_potter_and_the_goblet_of_fire.txt +45 -0
- data/zamples/edit_decision_lists/dvds/edls_being_edited/national_treasure.txt +6 -3
- data/zamples/edit_decision_lists/dvds/edls_being_edited/percy_jackson_lightening_thief.txt +40 -0
- data/zamples/edit_decision_lists/dvds/edls_being_edited/percy_jackson_lightening_thief_mute_scary.txt +23 -0
- data/zamples/edit_decision_lists/dvds/edls_being_edited/puss_in_boots.txt +33 -0
- data/zamples/edit_decision_lists/dvds/edls_being_edited/ratatouille.txt +5 -5
- data/zamples/edit_decision_lists/dvds/edls_being_edited/rio.txt +24 -0
- data/zamples/edit_decision_lists/dvds/sintel_open_source_blender_ntsc_dvd.txt +0 -1
- metadata +17 -15
- data/lib/count_down_timer_jruby_swing.rb +0 -55
- data/vendor/mplayer_patches/apply.bat +0 -12
- data/vendor/mplayer_patches/libdvdnav/2905259c3b45529b3d8dedba572b6e4f67a2d8f4.diff +0 -19
- data/vendor/mplayer_patches/libdvdnav/83f1c9256f500285e46f1e44bcc74ffce90159db.diff +0 -16
- data/vendor/mplayer_patches/libdvdnav/eb91fb74680d30322461a1b9e425918ad4e2b2df.diff +0 -21
- data/vendor/mplayer_patches/libdvdnav/jump_to_time.diff +0 -654
- data/vendor/mplayer_patches/libdvdnav/non_strict.diff +0 -13
- data/vendor/mplayer_patches/mplayer_edl.diff +0 -354
- data/vendor/mplayer_patches/updated_lib_too +0 -0
@@ -1,13 +0,0 @@
|
|
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);
|
@@ -1,354 +0,0 @@
|
|
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);
|
File without changes
|