[vlc-devel] [PATCH] Added option to disable chapter generation from marks file.

Janne Kujanpää jikuja at iki.fi
Mon Sep 26 11:15:59 CEST 2011


On 26.9.2011 2:46, Tobias Güntner wrote:
> 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.)
if( !psz_ext || ( strcasecmp( psz_ext, ".rec" ) && strcasecmp( psz_ext, 
".rec/" )) ) then.

>
>> + 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.
>
True but why we need separate chapters for commercials? Imho chapter is 
from beginning of the red bar to next red bar.

> 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.
>
We can also add mode 'auto' into vdr-generate-chapters and merge 
vdr-min-chapter-gap to use with it. NOw whoch one is best unit to use 
with vdr-min-chapter-gap: seconds, milliseconds or frames?

-- 
Janne Kujanpää



More information about the vlc-devel mailing list