[vlc-devel] [PATCH] Added option to disable chapter generation from marks file.
Tobias Güntner
fatbull at web.de
Mon Sep 26 01:46:45 CEST 2011
Am 26.09.2011 00:53, schrieb Janne Kujanpää:
> - if( !psz_ext || strcasecmp( psz_ext, ".rec" ) )
> + if( !psz_ext || strncasecmp( psz_ext, ".rec", 4 ) )
No. The extension must be an exact match. (It is arguable whether the
comparison should be case sensitive or not. Only checking the first four
characters is definitely wrong, however.)
> + i_marks_line_count++;
> + /* convert single cutmark timestamp into real frame number */
> int64_t i_frame = ParseFrameNumber( line, p_sys->fps );
>
> + /* Skip chapermark creation from even cutmark if option set to "odd" */
> + if ( 2 == p_sys->i_gen_chapters && (i_marks_line_count % 2) == 0 )
> + {
> + msg_Dbg( p_access, "frame: %"PRId64": even cutmark, not " \
> + "generating chaptermark", i_frame );
> + continue;
> + }
The problem with this is that you have to change the chapter generation
mode every time you open a new recording. Example: You first play a
recording with "duplicate" cut marks, so you remove all odd ones. Then
you play a recording with "normal" cut marks without changing the
settings. Half the chapters will be missing now. Oops.
I like the frame/time based approach a lot better because you can set it
and forget it. It removes "duplicate" chapters, but leaves all others
untouched.
Patch attached.
Regards,
Tobias
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Merge-chapters-which-are-too-close.patch
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110926/24f03a17/attachment.ksh>
More information about the vlc-devel
mailing list