[vlc-devel] First draft for a Daisy (2.02) playlist support in VLC

Mathieu SCHROETER mathieu.schroeter at gamesover.ch
Thu Mar 18 12:26:57 CET 2010


Hello

Jean-Baptiste Kempf <jb at videolan.org> a écrit :
>
> On Thu, Mar 18, 2010 at 10:25:43AM +0100, Mathieu SCHROETER wrote :
>> I'm working on a library and a VLC module in order to handle
>> the Daisy 2.02 specification "playlist" (maybe other in the future)
>> and to have the ability to read these files with VLC.
>
>
>> In a few words, the Daisy specification is useful for the audio books.
>> A book is separated by "chapter" and by paragraph. A chapter is
>> an audio file (MP3, WAV, ..). And a paragraph is a part in this file
>> (start-time to stop-time). The idea is to seek from a paragraph to
>> the next, or from a chapter to the next.
>
> You want the same chapters as the one appear when playing .mka files
> with chapters?

Good question, do you have a sample somewhere please?


>
>> +AC_CHECK_HEADERS(duck.h, [ have_libduck=yes ], [ have_libduck=no ])
>> +AM_CONDITIONAL(HAVE_LIBDUCK, [ test "${have_libduck}" = "yes" ])
>> +if test "${have_libduck}" = "yes"
>> +then
>> +  PKG_CHECK_MODULES([LIBDUCK], [libduck] , [ have_libduck=yes ], )
>> +    VLC_ADD_CFLAGS([playlist],[$LIBDUCK_CFLAGS])
>> +    VLC_ADD_LIBS([playlist],[$LIBDUCK_LIBS])
>> +fi
> Why not do a
> PKG_ENABLE_MODULES_VLC ?

Because I've missed that.
I suppose..


>> +    if( demux_IsPathExtension( p_demux, ".html" ) || 
>> demux_IsForced( p_demux, "daisy" ) )
>> +    {
>> +        ;
>> +    }
> All .html files can be valid daisy files?

No, I've done ""fastly"" all parts in order to have something
usable, until I found the right way to do the seeking for the
paragraphs. And then, I finalize/protect all other parts.

A valid Daisy file is "ncc.html" or "NCC.HTML", and I've not searched
if a function/macro is already available somewhere to check the filename.
Or if I must use strrchr/strcmp..

And I will add a function in libduck to check the validity of the
ncc.html file too..


>> +    unsigned int   i_c;
>
>> +    for( i_c = 1; i_c <= i_chapters; i_c++ )
>
> You can define for counters directly in for( , since VLC is C99

Yes I know.. only an habit...   but I'll change then..


Thanks,
--
Mathieu SCHROETER




More information about the vlc-devel mailing list