You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(2) |
Apr
(4) |
May
(6) |
Jun
(56) |
Jul
(101) |
Aug
(14) |
Sep
|
Oct
(1) |
Nov
|
Dec
(40) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(66) |
Feb
(106) |
Mar
(1) |
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(10) |
Oct
(7) |
Nov
|
Dec
|
2008 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ny...@us...> - 2006-06-03 00:40:47
|
Revision: 26 Author: nyaochi Date: 2006-06-02 17:40:44 -0700 (Fri, 02 Jun 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=26&view=rev Log Message: ----------- Changed EOL character in configure.in Modified Paths: -------------- trunk/configure.in Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2006-06-03 00:38:03 UTC (rev 25) +++ trunk/configure.in 2006-06-03 00:40:44 UTC (rev 26) @@ -1,320 +1,320 @@ -dnl $Id$ -dnl -dnl -dnl Exported and configured variables: -dnl CFLAGS -dnl LDFLAGS -dnl INCLUDES - - -dnl Initialization for autoconf -AC_PREREQ(2.53) -AC_INIT -AC_CONFIG_SRCDIR([frontend/easypmp/cui/main.c]) - - -dnl Checks for system -AC_CANONICAL_HOST -AC_AIX -AC_MINIX -AC_ISC_POSIX - -dnl Initialization for automake -AM_INIT_AUTOMAKE(pmplib, 0.11) -AM_CONFIG_HEADER(config.h) -AM_MAINTAINER_MODE -AM_C_PROTOTYPES - -dnl Checks for program -AM_PROG_CC_STDC -AC_PROG_CC -AC_PROG_INSTALL -AC_PROG_LN_S - -dnl Initialozation for libtool -AC_LIBLTDL_CONVENIENCE -dnl Substitute LTDLINCL and LIBLTDL in the Makefiles -AC_SUBST(LTDLINCL) -AC_SUBST(LIBLTDL) -dnl Check for dlopen support -AC_LIBTOOL_DLOPEN -dnl Configure libtool -AC_PROG_LIBTOOL -dnl Configure libltdl -AC_CONFIG_SUBDIRS(libltdl) - -dnl Initialization for variables -CFLAGS="${ac_save_CFLAGS}" -LDFLAGS="${ac_save_LDFLAGS}" -INCLUDES="-I\$(top_srcdir) -I\$(top_srcdir)/include -I\$(srcdir)" - -dnl Additional options - - -dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h limits.h malloc.h strings.h unistd.h stdint.h getopt.h) - - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_CHECK_SIZEOF -AC_TYPE_SIZE_T -AC_STRUCT_TM -AC_CHECK_SIZEOF(short) -AC_CHECK_SIZEOF(unsigned short) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(unsigned int) -AC_CHECK_SIZEOF(long) -AC_CHECK_SIZEOF(unsigned long) - -AC_CHECK_TYPES([uint8_t, uint16_t, uint32_t]) - -AH_VERBATIM([HAVE_UINT8_T], -[/* add uint8_t type */ -#undef HAVE_UINT8_T -#ifndef HAVE_UINT8_T - typedef unsigned char uint8_t; -#endif]) - -AH_VERBATIM([HAVE_UINT16_T], -[/* add uint16_t type */ -#undef HAVE_UINT16_T -#ifndef HAVE_UINT16_T - typedef unsigned short uint16_t; -#endif]) - -if test "${ac_cv_sizeof_unsigned_short}" = "4"; then - AC_DEFINE(A_UINT32_T,unsigned short) -else - if test "${ac_cv_sizeof_unsigned_int}" = "4"; then - AC_DEFINE(A_UINT32_T,unsigned int) - else - if test "${ac_cv_sizeof_unsigned_long}" = "4"; then - AC_DEFINE(A_UINT32_T,unsigned long) - else - AC_MSG_ERROR([CHECK_TYPE_uint32_t - please report to the developper]) - fi - fi -fi - -AH_VERBATIM([HAVE_UINT32_T], -[/* add uint32_t type */ -#undef HAVE_UINT32_T -#ifndef HAVE_UINT32_T -#undef A_UINT32_T - typedef A_UINT32_T uint32_t; -#endif]) - -dnl Checks for debugging mode -AC_ARG_ENABLE( - debug, - [AC_HELP_STRING(--enable-debug, [Turn on debugging])] -) - -if test "$enable_debug" = "yes"; then - CFLAGS="-DDEBUG -O -g ${CFLAGS}" -fi - - -dnl Checks for library functions. -AC_FUNC_ALLOCA -AC_FUNC_MEMCMP -AC_FUNC_VPRINTF -AC_CHECK_FUNCS(getcwd mktime strdup strerror strtol strtoul) - -dnl Check for math library -AC_CHECK_LIB(m, rand) - -dnl Check for zlib library -AC_CHECK_LIB(z, uncompress, , [AC_MSG_ERROR(libz not found!)]) - -dnl Check for iconv library -AC_ARG_WITH( - iconv-header, - [AC_HELP_STRING(--with-iconv-header=DIR, [iconv header directory])], - [CFLAGS="-I$withval ${CFLAGS}"] -) - -AC_ARG_WITH( - iconv-library, - [AC_HELP_STRING(--with-iconv-library=DIR, [iconv library directory])], - [LDFLAGS="-L$withval ${LDFLAGS}"; with_libiconv=native], - [with_libiconv=maybe] -) - -AC_CHECK_HEADER(iconv.h, , [AC_MSG_ERROR(iconv.h not found!)]) - -found_iconv=no -case $with_libiconv in - maybe) - # Check in the C library first - AC_CHECK_FUNC(iconv_open, [with_libiconv=no; found_iconv=yes]) - # Check if we have GNU libiconv - if test $found_iconv = "no"; then - AC_CHECK_LIB(iconv, libiconv_open, [with_libiconv=gnu; found_iconv=yes]) - fi - # Check if we have a iconv in -liconv, possibly from vendor - if test $found_iconv = "no"; then - AC_CHECK_LIB(iconv, iconv_open, [with_libiconv=native; found_iconv=yes]) - fi - ;; - no) - AC_CHECK_FUNC(iconv_open, [with_libiconv=no; found_iconv=yes]) - ;; - gnu|yes) - AC_CHECK_LIB(iconv, libiconv_open, [with_libiconv=gnu; found_iconv=yes]) - ;; - native) - echo "native" - echo $LDFLAGS - # Check if we have GNU libiconv - if test $found_iconv = "no"; then - AC_CHECK_LIB(iconv, libiconv_open, [with_libiconv=gnu; found_iconv=yes]) - fi - # Check if we have a iconv in -liconv, possibly from vendor - if test $found_iconv = "no"; then - AC_CHECK_LIB(iconv, iconv_open, [with_libiconv=native; found_iconv=yes]) - fi - ;; -esac - -if test "x$found_iconv" = "xno" ; then - AC_MSG_ERROR([*** No iconv() implementation found in C library or libiconv]) -fi - -if test x$with_libiconv != xno ; then - case " $INTLLIBS " in - *[[\ \ ]]-liconv[[\ \ ]]*) ;; - *) ICONV_LIBS="-liconv" ;; - esac -fi - -case $with_libiconv in - gnu) - AC_DEFINE(USE_LIBICONV_GNU, 1, [Using GNU libiconv]) - ;; - native) - AC_DEFINE(USE_LIBICONV_NATIVE, 1, [Using a native implementation of iconv in a separate library]) - ;; -esac - - -dnl Checks for id3tag -AC_ARG_WITH( - id3tag-header, - [AC_HELP_STRING(--with-id3tag-header=DIR, [id3tag header directory])], - [CFLAGS="-I$withval ${CFLAGS}"] -) - -AC_ARG_WITH( - id3tag-library, - [AC_HELP_STRING(--with-id3tag-library=DIR, [id3tag library directory])], - [LDFLAGS="-L$withval ${LDFLAGS}"] -) - -AC_CHECK_HEADER( - id3tag.h, - , - [AC_MSG_ERROR(id3tag header not found!)] -) -AC_CHECK_LIB( - id3tag, - id3_file_fdopen, - [ID3TAG_LIBS="-lid3tag"], - AC_MSG_ERROR([id3tag library is not found!]) -) - -dnl Checks for ogg -AC_ARG_WITH( - ogg-header, - [AC_HELP_STRING(--with-ogg-header=DIR, [ogg header directory])], - [CFLAGS="-I$withval ${CFLAGS}"] -) - -AC_ARG_WITH( - ogg-library, - [AC_HELP_STRING(--with-ogg-library=DIR, [ogg library directory])], - [LDFLAGS="-L$withval ${LDFLAGS}"] -) - -AC_CHECK_HEADER( - ogg/ogg.h, - , - [AC_MSG_ERROR(ogg header not found!)] -) -AC_CHECK_LIB( - ogg, - ogg_stream_init, - [OGG_LIBS="-logg"], - AC_MSG_ERROR([ogg library is not found!]) -) - -dnl Checks for vorbis -AC_ARG_WITH( - vorbis-header, - [AC_HELP_STRING(--with-vorbis-header=DIR, [vorbis header directory])], - [CFLAGS="-I$withval ${CFLAGS}"] -) - -AC_ARG_WITH( - vorbis-library, - [AC_HELP_STRING(--with-vorbis-library=DIR, [vorbis library directory])], - [LDFLAGS="-L$withval ${LDFLAGS}"] -) - -AC_CHECK_HEADER( - vorbis/codec.h, - , - [AC_MSG_ERROR(vorbis header not found!)] -) -AC_CHECK_HEADER( - vorbis/vorbisfile.h, - , - [AC_MSG_ERROR(vorbisfile header not found!)] -) -AC_CHECK_LIB( - vorbis, - vorbis_synthesis_init, - [VORBIS_LIBS="-lvorbis"], - AC_MSG_ERROR([vorbis library is not found!]) -) -AC_CHECK_LIB( - vorbisfile, - ov_open, - [VORBISFILE_LIBS="-lvorbisfile"], - AC_MSG_ERROR([vorbisfile library is not found!]) -) - -dnl ------------------------------------------------------------------ -dnl Check for libsmjs (SpiderMonkey JavaScript engine) -dnl ------------------------------------------------------------------ -AC_PATH_SPIDERMONKEY - -dnl Export variables -AC_SUBST(CFLAGS) -AC_SUBST(LDFLAGS) -AC_SUBST(INCLUDES) -AC_SUBST(ID3TAG_LIBS) -AC_SUBST(ICONV_LIBS) -AC_SUBST(OGG_LIBS) -AC_SUBST(VORBIS_LIBS) -AC_SUBST(VORBISFILE_LIBS) - - -dnl Should the in-tree copy of SMJS be used? Only on Windows. -case "$UNAME_SYSTEM" in - CYGWIN*) - AM_CONDITIONAL([WIN32], true) - ;; - MINGW*) - AM_CONDITIONAL([WIN32], true) - ;; - *) - AM_CONDITIONAL([WIN32], false) - ;; -esac - -dnl Output the configure results. -AC_CONFIG_FILES(Makefile lib/ucs2/Makefile lib/filepath/Makefile lib/gmi/Makefile lib/pmp/Makefile lib/pmp_irivnavi/Makefile lib/pmp_portalplayer1/Makefile lib/pmp_iriverplus2/Makefile lib/playlist/Makefile frontend/easypmp/cui/Makefile) -AC_OUTPUT +dnl $Id$ +dnl +dnl +dnl Exported and configured variables: +dnl CFLAGS +dnl LDFLAGS +dnl INCLUDES + + +dnl Initialization for autoconf +AC_PREREQ(2.53) +AC_INIT +AC_CONFIG_SRCDIR([frontend/easypmp/cui/main.c]) + + +dnl Checks for system +AC_CANONICAL_HOST +AC_AIX +AC_MINIX +AC_ISC_POSIX + +dnl Initialization for automake +AM_INIT_AUTOMAKE(pmplib, 0.11) +AM_CONFIG_HEADER(config.h) +AM_MAINTAINER_MODE +AM_C_PROTOTYPES + +dnl Checks for program +AM_PROG_CC_STDC +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_LN_S + +dnl Initialozation for libtool +AC_LIBLTDL_CONVENIENCE +dnl Substitute LTDLINCL and LIBLTDL in the Makefiles +AC_SUBST(LTDLINCL) +AC_SUBST(LIBLTDL) +dnl Check for dlopen support +AC_LIBTOOL_DLOPEN +dnl Configure libtool +AC_PROG_LIBTOOL +dnl Configure libltdl +AC_CONFIG_SUBDIRS(libltdl) + +dnl Initialization for variables +CFLAGS="${ac_save_CFLAGS}" +LDFLAGS="${ac_save_LDFLAGS}" +INCLUDES="-I\$(top_srcdir) -I\$(top_srcdir)/include -I\$(srcdir)" + +dnl Additional options + + +dnl Checks for header files. +AC_HEADER_STDC +AC_CHECK_HEADERS(fcntl.h limits.h malloc.h strings.h unistd.h stdint.h getopt.h) + + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_CHECK_SIZEOF +AC_TYPE_SIZE_T +AC_STRUCT_TM +AC_CHECK_SIZEOF(short) +AC_CHECK_SIZEOF(unsigned short) +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(unsigned int) +AC_CHECK_SIZEOF(long) +AC_CHECK_SIZEOF(unsigned long) + +AC_CHECK_TYPES([uint8_t, uint16_t, uint32_t]) + +AH_VERBATIM([HAVE_UINT8_T], +[/* add uint8_t type */ +#undef HAVE_UINT8_T +#ifndef HAVE_UINT8_T + typedef unsigned char uint8_t; +#endif]) + +AH_VERBATIM([HAVE_UINT16_T], +[/* add uint16_t type */ +#undef HAVE_UINT16_T +#ifndef HAVE_UINT16_T + typedef unsigned short uint16_t; +#endif]) + +if test "${ac_cv_sizeof_unsigned_short}" = "4"; then + AC_DEFINE(A_UINT32_T,unsigned short) +else + if test "${ac_cv_sizeof_unsigned_int}" = "4"; then + AC_DEFINE(A_UINT32_T,unsigned int) + else + if test "${ac_cv_sizeof_unsigned_long}" = "4"; then + AC_DEFINE(A_UINT32_T,unsigned long) + else + AC_MSG_ERROR([CHECK_TYPE_uint32_t - please report to the developper]) + fi + fi +fi + +AH_VERBATIM([HAVE_UINT32_T], +[/* add uint32_t type */ +#undef HAVE_UINT32_T +#ifndef HAVE_UINT32_T +#undef A_UINT32_T + typedef A_UINT32_T uint32_t; +#endif]) + +dnl Checks for debugging mode +AC_ARG_ENABLE( + debug, + [AC_HELP_STRING(--enable-debug, [Turn on debugging])] +) + +if test "$enable_debug" = "yes"; then + CFLAGS="-DDEBUG -O -g ${CFLAGS}" +fi + + +dnl Checks for library functions. +AC_FUNC_ALLOCA +AC_FUNC_MEMCMP +AC_FUNC_VPRINTF +AC_CHECK_FUNCS(getcwd mktime strdup strerror strtol strtoul) + +dnl Check for math library +AC_CHECK_LIB(m, rand) + +dnl Check for zlib library +AC_CHECK_LIB(z, uncompress, , [AC_MSG_ERROR(libz not found!)]) + +dnl Check for iconv library +AC_ARG_WITH( + iconv-header, + [AC_HELP_STRING(--with-iconv-header=DIR, [iconv header directory])], + [CFLAGS="-I$withval ${CFLAGS}"] +) + +AC_ARG_WITH( + iconv-library, + [AC_HELP_STRING(--with-iconv-library=DIR, [iconv library directory])], + [LDFLAGS="-L$withval ${LDFLAGS}"; with_libiconv=native], + [with_libiconv=maybe] +) + +AC_CHECK_HEADER(iconv.h, , [AC_MSG_ERROR(iconv.h not found!)]) + +found_iconv=no +case $with_libiconv in + maybe) + # Check in the C library first + AC_CHECK_FUNC(iconv_open, [with_libiconv=no; found_iconv=yes]) + # Check if we have GNU libiconv + if test $found_iconv = "no"; then + AC_CHECK_LIB(iconv, libiconv_open, [with_libiconv=gnu; found_iconv=yes]) + fi + # Check if we have a iconv in -liconv, possibly from vendor + if test $found_iconv = "no"; then + AC_CHECK_LIB(iconv, iconv_open, [with_libiconv=native; found_iconv=yes]) + fi + ;; + no) + AC_CHECK_FUNC(iconv_open, [with_libiconv=no; found_iconv=yes]) + ;; + gnu|yes) + AC_CHECK_LIB(iconv, libiconv_open, [with_libiconv=gnu; found_iconv=yes]) + ;; + native) + echo "native" + echo $LDFLAGS + # Check if we have GNU libiconv + if test $found_iconv = "no"; then + AC_CHECK_LIB(iconv, libiconv_open, [with_libiconv=gnu; found_iconv=yes]) + fi + # Check if we have a iconv in -liconv, possibly from vendor + if test $found_iconv = "no"; then + AC_CHECK_LIB(iconv, iconv_open, [with_libiconv=native; found_iconv=yes]) + fi + ;; +esac + +if test "x$found_iconv" = "xno" ; then + AC_MSG_ERROR([*** No iconv() implementation found in C library or libiconv]) +fi + +if test x$with_libiconv != xno ; then + case " $INTLLIBS " in + *[[\ \ ]]-liconv[[\ \ ]]*) ;; + *) ICONV_LIBS="-liconv" ;; + esac +fi + +case $with_libiconv in + gnu) + AC_DEFINE(USE_LIBICONV_GNU, 1, [Using GNU libiconv]) + ;; + native) + AC_DEFINE(USE_LIBICONV_NATIVE, 1, [Using a native implementation of iconv in a separate library]) + ;; +esac + + +dnl Checks for id3tag +AC_ARG_WITH( + id3tag-header, + [AC_HELP_STRING(--with-id3tag-header=DIR, [id3tag header directory])], + [CFLAGS="-I$withval ${CFLAGS}"] +) + +AC_ARG_WITH( + id3tag-library, + [AC_HELP_STRING(--with-id3tag-library=DIR, [id3tag library directory])], + [LDFLAGS="-L$withval ${LDFLAGS}"] +) + +AC_CHECK_HEADER( + id3tag.h, + , + [AC_MSG_ERROR(id3tag header not found!)] +) +AC_CHECK_LIB( + id3tag, + id3_file_fdopen, + [ID3TAG_LIBS="-lid3tag"], + AC_MSG_ERROR([id3tag library is not found!]) +) + +dnl Checks for ogg +AC_ARG_WITH( + ogg-header, + [AC_HELP_STRING(--with-ogg-header=DIR, [ogg header directory])], + [CFLAGS="-I$withval ${CFLAGS}"] +) + +AC_ARG_WITH( + ogg-library, + [AC_HELP_STRING(--with-ogg-library=DIR, [ogg library directory])], + [LDFLAGS="-L$withval ${LDFLAGS}"] +) + +AC_CHECK_HEADER( + ogg/ogg.h, + , + [AC_MSG_ERROR(ogg header not found!)] +) +AC_CHECK_LIB( + ogg, + ogg_stream_init, + [OGG_LIBS="-logg"], + AC_MSG_ERROR([ogg library is not found!]) +) + +dnl Checks for vorbis +AC_ARG_WITH( + vorbis-header, + [AC_HELP_STRING(--with-vorbis-header=DIR, [vorbis header directory])], + [CFLAGS="-I$withval ${CFLAGS}"] +) + +AC_ARG_WITH( + vorbis-library, + [AC_HELP_STRING(--with-vorbis-library=DIR, [vorbis library directory])], + [LDFLAGS="-L$withval ${LDFLAGS}"] +) + +AC_CHECK_HEADER( + vorbis/codec.h, + , + [AC_MSG_ERROR(vorbis header not found!)] +) +AC_CHECK_HEADER( + vorbis/vorbisfile.h, + , + [AC_MSG_ERROR(vorbisfile header not found!)] +) +AC_CHECK_LIB( + vorbis, + vorbis_synthesis_init, + [VORBIS_LIBS="-lvorbis"], + AC_MSG_ERROR([vorbis library is not found!]) +) +AC_CHECK_LIB( + vorbisfile, + ov_open, + [VORBISFILE_LIBS="-lvorbisfile"], + AC_MSG_ERROR([vorbisfile library is not found!]) +) + +dnl ------------------------------------------------------------------ +dnl Check for libsmjs (SpiderMonkey JavaScript engine) +dnl ------------------------------------------------------------------ +AC_PATH_SPIDERMONKEY + +dnl Export variables +AC_SUBST(CFLAGS) +AC_SUBST(LDFLAGS) +AC_SUBST(INCLUDES) +AC_SUBST(ID3TAG_LIBS) +AC_SUBST(ICONV_LIBS) +AC_SUBST(OGG_LIBS) +AC_SUBST(VORBIS_LIBS) +AC_SUBST(VORBISFILE_LIBS) + + +dnl Should the in-tree copy of SMJS be used? Only on Windows. +case "$UNAME_SYSTEM" in + CYGWIN*) + AM_CONDITIONAL([WIN32], true) + ;; + MINGW*) + AM_CONDITIONAL([WIN32], true) + ;; + *) + AM_CONDITIONAL([WIN32], false) + ;; +esac + +dnl Output the configure results. +AC_CONFIG_FILES(Makefile lib/ucs2/Makefile lib/filepath/Makefile lib/gmi/Makefile lib/pmp/Makefile lib/pmp_irivnavi/Makefile lib/pmp_portalplayer1/Makefile lib/pmp_iriverplus2/Makefile lib/playlist/Makefile frontend/easypmp/cui/Makefile) +AC_OUTPUT This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-06-02 22:52:44
|
Revision: 24 Author: nyaochi Date: 2006-06-02 15:52:34 -0700 (Fri, 02 Jun 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=24&view=rev Log Message: ----------- Fixed a typo. Modified Paths: -------------- trunk/frontend/easypmp/cui/main.c trunk/lib/pmp/pmp_posix.c Modified: trunk/frontend/easypmp/cui/main.c =================================================================== --- trunk/frontend/easypmp/cui/main.c 2006-06-02 22:28:30 UTC (rev 23) +++ trunk/frontend/easypmp/cui/main.c 2006-06-02 22:52:34 UTC (rev 24) @@ -157,6 +157,7 @@ case EASYPMPPLP_END: break; } + fflush(fpe); return 0; } @@ -286,9 +287,9 @@ } // Create a PMP instance. - pmphelp_create(pmphelp, &pmp, opt.path_to_root, opt.model); + ret = pmphelp_create(pmphelp, &pmp, opt.path_to_root, opt.model); if (!pmp) { - fprintf(fpe, "Failed to find a player\n"); + fprintf(fpe, "Failed to find a player (%d)\n", ret); return 1; } Modified: trunk/lib/pmp/pmp_posix.c =================================================================== --- trunk/lib/pmp/pmp_posix.c 2006-06-02 22:28:30 UTC (rev 23) +++ trunk/lib/pmp/pmp_posix.c 2006-06-02 22:52:34 UTC (rev 24) @@ -111,7 +111,7 @@ pmphelp_posix_t* pmphelpposix = (pmphelp_posix_t*)pmphelp; uint32_t i; for (i = 0;i < pmphelpposix->num_plugins;++i) { - pmp_enumerate_devid_t func = (pmp_enumerate_devid_t)lt_dlsym(pmphelpw32->plugins[i], "pmp_enumerate_devid"); + pmp_enumerate_devid_t func = (pmp_enumerate_devid_t)lt_dlsym(pmphelpposix->plugins[i], "pmp_enumerate_devid"); if (func) { func(callback, instance); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-06-02 22:28:35
|
Revision: 23 Author: nyaochi Date: 2006-06-02 15:28:30 -0700 (Fri, 02 Jun 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=23&view=rev Log Message: ----------- Implemented pmphelp_enumerate_devid() in pmp_posix.c Modified Paths: -------------- trunk/lib/pmp/pmp_posix.c Modified: trunk/lib/pmp/pmp_posix.c =================================================================== --- trunk/lib/pmp/pmp_posix.c 2006-06-02 22:26:13 UTC (rev 22) +++ trunk/lib/pmp/pmp_posix.c 2006-06-02 22:28:30 UTC (rev 23) @@ -109,7 +109,14 @@ result_t pmphelp_enumerate_devid(pmphelp_t* pmphelp, pmp_enumerate_devid_callback_t callback, void *instance) { pmphelp_posix_t* pmphelpposix = (pmphelp_posix_t*)pmphelp; - return 0;//return pmphelpposix->pmp_enumerate_devid(callback, instance); + uint32_t i; + for (i = 0;i < pmphelpposix->num_plugins;++i) { + pmp_enumerate_devid_t func = (pmp_enumerate_devid_t)lt_dlsym(pmphelpw32->plugins[i], "pmp_enumerate_devid"); + if (func) { + func(callback, instance); + } + } + return 0; } result_t pmphelp_create(pmphelp_t* pmphelp, pmp_t** pmp, const ucs2char_t* path_to_device, const char *id) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-06-02 22:26:19
|
Revision: 22 Author: nyaochi Date: 2006-06-02 15:26:13 -0700 (Fri, 02 Jun 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=22&view=rev Log Message: ----------- More tweaking for POSIX builds Modified Paths: -------------- trunk/lib/pmp/pmp_posix.c Modified: trunk/lib/pmp/pmp_posix.c =================================================================== --- trunk/lib/pmp/pmp_posix.c 2006-06-02 21:32:44 UTC (rev 21) +++ trunk/lib/pmp/pmp_posix.c 2006-06-02 22:26:13 UTC (rev 22) @@ -68,7 +68,7 @@ pmphelp->plugins = (void**)realloc(pmphelp->plugins, sizeof(void*) * pmphelp->num_plugins); pmphelp->plugins[pmphelp->num_plugins-1] = inst; } else { - fprintf(stderr, "FAILED: cygpmp_portalplayer1-0.dll\n"); + fprintf(stderr, "FAILED: pmp_portalplayer1 in %s\n", PMP_MODULES_DIR); } inst = lt_dlopenext("libpmp_iriverplus2"); @@ -77,7 +77,7 @@ pmphelp->plugins = (void**)realloc(pmphelp->plugins, sizeof(void*) * pmphelp->num_plugins); pmphelp->plugins[pmphelp->num_plugins-1] = inst; } else { - fprintf(stderr, "FAILED: cygpmp_iriverplus2-0.dll\n"); + fprintf(stderr, "FAILED: pmp_iriverplus2\n"); } inst = lt_dlopenext("libpmp_irivnavi"); @@ -86,7 +86,7 @@ pmphelp->plugins = (void**)realloc(pmphelp->plugins, sizeof(void*) * pmphelp->num_plugins); pmphelp->plugins[pmphelp->num_plugins-1] = inst; } else { - fprintf(stderr, "FAILED: cygpmp_irivnavi-0.dll\n"); + fprintf(stderr, "FAILED: pmp_irivnavi\n"); } *ptr_pmphelp = pmphelp; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-06-02 17:45:08
|
Revision: 19 Author: nyaochi Date: 2006-06-02 10:44:51 -0700 (Fri, 02 Jun 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=19&view=rev Log Message: ----------- More patch from Martin Ellis (and modified a little by me) for Linux support. It's not tested yet. Modified Paths: -------------- trunk/configure.in trunk/lib/pmp/Makefile.am trunk/lib/pmp/pmp_posix.c trunk/lib/pmp_iriverplus2/Makefile.am trunk/lib/pmp_irivnavi/Makefile.am trunk/lib/pmp_portalplayer1/Makefile.am Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2006-06-02 00:08:40 UTC (rev 18) +++ trunk/configure.in 2006-06-02 17:44:51 UTC (rev 19) @@ -20,7 +20,7 @@ AC_ISC_POSIX dnl Initialization for automake -AM_INIT_AUTOMAKE(pmplib, 0.6) +AM_INIT_AUTOMAKE(pmplib, 0.11) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE AM_C_PROTOTYPES @@ -33,6 +33,7 @@ dnl Initialozation for libtool AC_PROG_LIBTOOL +AC_LIBTOOL_DLOPEN dnl Initialization for variables CFLAGS="${ac_save_CFLAGS}" @@ -97,7 +98,17 @@ typedef A_UINT32_T uint32_t; #endif]) +dnl Checks for debugging mode +AC_ARG_ENABLE( + debug, + [AC_HELP_STRING(--enable-debug, [Turn on debugging])] +) +if test "$enable_debug" = "yes"; then + CFLAGS="-DDEBUG -O -g ${CFLAGS}" +fi + + dnl Checks for library functions. AC_FUNC_ALLOCA AC_FUNC_MEMCMP @@ -112,16 +123,16 @@ dnl Check for iconv library AC_ARG_WITH( - iconv-header, - [AC_HELP_STRING(--with-iconv-header=DIR, [iconv header directory])], - [CFLAGS="-I$withval ${CFLAGS}"] + iconv-header, + [AC_HELP_STRING(--with-iconv-header=DIR, [iconv header directory])], + [CFLAGS="-I$withval ${CFLAGS}"] ) AC_ARG_WITH( - iconv-library, - [AC_HELP_STRING(--with-iconv-library=DIR, [iconv library directory])], - [LDFLAGS="-L$withval ${LDFLAGS}"; with_libiconv=native], - [with_libiconv=maybe] + iconv-library, + [AC_HELP_STRING(--with-iconv-library=DIR, [iconv library directory])], + [LDFLAGS="-L$withval ${LDFLAGS}"; with_libiconv=native], + [with_libiconv=maybe] ) AC_CHECK_HEADER(iconv.h, , [AC_MSG_ERROR(iconv.h not found!)]) @@ -161,14 +172,14 @@ esac if test "x$found_iconv" = "xno" ; then - AC_MSG_ERROR([*** No iconv() implementation found in C library or libiconv]) + AC_MSG_ERROR([*** No iconv() implementation found in C library or libiconv]) fi if test x$with_libiconv != xno ; then - case " $INTLLIBS " in - *[[\ \ ]]-liconv[[\ \ ]]*) ;; - *) ICONV_LIBS="-liconv" ;; - esac + case " $INTLLIBS " in + *[[\ \ ]]-liconv[[\ \ ]]*) ;; + *) ICONV_LIBS="-liconv" ;; + esac fi case $with_libiconv in @@ -183,38 +194,46 @@ dnl Checks for id3tag AC_ARG_WITH( - id3tag-header, - [AC_HELP_STRING(--with-id3tag-header=DIR, [id3tag header directory])], - [CFLAGS="-I$withval ${CFLAGS}"] + id3tag-header, + [AC_HELP_STRING(--with-id3tag-header=DIR, [id3tag header directory])], + [CFLAGS="-I$withval ${CFLAGS}"] ) AC_ARG_WITH( - id3tag-library, - [AC_HELP_STRING(--with-id3tag-library=DIR, [id3tag library directory])], - [LDFLAGS="-L$withval ${LDFLAGS}"] + id3tag-library, + [AC_HELP_STRING(--with-id3tag-library=DIR, [id3tag library directory])], + [LDFLAGS="-L$withval ${LDFLAGS}"] ) AC_CHECK_HEADER( - id3tag.h, - , - [AC_MSG_ERROR(id3tag header not found!)] + id3tag.h, + , + [AC_MSG_ERROR(id3tag header not found!)] ) AC_CHECK_LIB( - id3tag, - id3_file_fdopen, - [ID3TAG_LIBS="-lid3tag"], - AC_MSG_ERROR([id3tag library is not found!]) + id3tag, + id3_file_fdopen, + [ID3TAG_LIBS="-lid3tag"], + AC_MSG_ERROR([id3tag library is not found!]) ) -AC_CHECK_LIB( - id3tag, - id3_file_gettag, - [CFLAGS="-DHAVE_LIBID3TAG_GETTAG ${CFLAGS}"] + +dnl Checks for ogg +AC_ARG_WITH( + ogg-header, + [AC_HELP_STRING(--with-ogg-header=DIR, [ogg header directory])], + [CFLAGS="-I$withval ${CFLAGS}"] ) +AC_ARG_WITH( + ogg-library, + [AC_HELP_STRING(--with-ogg-library=DIR, [ogg library directory])], + [LDFLAGS="-L$withval ${LDFLAGS}"] +) + AC_CHECK_HEADER( - ogg/ogg.h, - , - [AC_MSG_ERROR(ogg header not found!)] + ogg/ogg.h, + , + [AC_MSG_ERROR(ogg header not found!)] ) AC_CHECK_LIB( ogg, @@ -223,6 +242,19 @@ AC_MSG_ERROR([ogg library is not found!]) ) +dnl Checks for vorbis +AC_ARG_WITH( + vorbis-header, + [AC_HELP_STRING(--with-vorbis-header=DIR, [vorbis header directory])], + [CFLAGS="-I$withval ${CFLAGS}"] +) + +AC_ARG_WITH( + vorbis-library, + [AC_HELP_STRING(--with-vorbis-library=DIR, [vorbis library directory])], + [LDFLAGS="-L$withval ${LDFLAGS}"] +) + AC_CHECK_HEADER( vorbis/codec.h, , @@ -246,16 +278,39 @@ AC_MSG_ERROR([vorbisfile library is not found!]) ) +dnl ------------------------------------------------------------------ +dnl Check for libsmjs (SpiderMonkey JavaScript engine) +dnl ------------------------------------------------------------------ +found_smjs=no -AC_ARG_ENABLE( - debug, - [AC_HELP_STRING(--enable-debug, [Turn on debugging])] +AC_CHECK_HEADER( + [smjs/jsapi.h], + [AC_CHECK_LIB(smjs, JS_NewRuntime, [found_smjs="smjs"])] ) -if test "$enable_debug" = "yes"; then - CFLAGS="-DDEBUG -O -g ${CFLAGS}" -fi +AC_CHECK_HEADER( + [js/jsapi.h], + [AC_CHECK_LIB(js, JS_NewRuntime, [found_smjs="js"])] +) +case $found_smjs in + smjs) + AC_DEFINE(HAVE_LIBSMJS, 1, [Define if you have smjs or js library]) + AC_DEFINE(USE_LIBJS_SMJS, 1, [Using smjs library for JavaScript engine]) + AC_DEFINE(XP_UNIX, 1) + SMJS_LIBS="-lsmjs" + ;; + js) + AC_DEFINE(HAVE_LIBSMJS, 1, [Define if you have smjs or js library]) + AC_DEFINE(USE_LIBJS_JS, 1, [Using js library for JavaScript engine]) + AC_DEFINE(XP_UNIX, 1) + SMJS_LIBS="-ljs" + ;; + no) + AC_MSG_ERROR([js or smjs library is not found!]) + ;; +esac + dnl Export variables AC_SUBST(CFLAGS) AC_SUBST(LDFLAGS) @@ -266,8 +321,8 @@ AC_SUBST(VORBIS_LIBS) AC_SUBST(VORBISFILE_LIBS) -dnl Checks for library functions. -# Should the in-tree copy of SMJS be used? Only on Windows. + +dnl Should the in-tree copy of SMJS be used? Only on Windows. case "$UNAME_SYSTEM" in CYGWIN*) AM_CONDITIONAL([WIN32], true) @@ -280,6 +335,6 @@ ;; esac - +dnl Output the configure results. AC_CONFIG_FILES(Makefile lib/ucs2/Makefile lib/filepath/Makefile lib/gmi/Makefile lib/pmp/Makefile lib/pmp_irivnavi/Makefile lib/pmp_portalplayer1/Makefile lib/pmp_iriverplus2/Makefile lib/playlist/Makefile frontend/easypmp/cui/Makefile) AC_OUTPUT Modified: trunk/lib/pmp/Makefile.am =================================================================== --- trunk/lib/pmp/Makefile.am 2006-06-02 00:08:40 UTC (rev 18) +++ trunk/lib/pmp/Makefile.am 2006-06-02 17:44:51 UTC (rev 19) @@ -8,12 +8,15 @@ pmp.c \ pmp_posix.c +libpmp_la_CPPFLAGS = -DPMP_MODULES_DIR="\"$(libdir)/pmp\"" + libpmp_la_LDFLAGS = \ + -no-undefined + +libpmp_la_LIBADD = \ $(top_builddir)/lib/ucs2/libucs2.la \ $(top_builddir)/lib/filepath/libfilepath.la \ - -no-undefined + -lltdl -libpmp_la_LIBADD = -ldl - AM_CFLAGS = @CFLAGS@ INCLUDES = @INCLUDES@ Modified: trunk/lib/pmp/pmp_posix.c =================================================================== --- trunk/lib/pmp/pmp_posix.c 2006-06-02 00:08:40 UTC (rev 18) +++ trunk/lib/pmp/pmp_posix.c 2006-06-02 17:44:51 UTC (rev 19) @@ -59,7 +59,10 @@ pmphelp->num_plugins = 0; pmphelp->plugins = NULL; - inst = dlopen("cygpmp_portalplayer1-0.dll", RTLD_LAZY); + lt_dlinit(); + lt_dlsetsearchpath(PMP_MODULES_DIR); + + inst = lt_dlopenext("libpmp_portalplayer1"); if (inst) { pmphelp->num_plugins++; pmphelp->plugins = (void**)realloc(pmphelp->plugins, sizeof(void*) * pmphelp->num_plugins); @@ -68,7 +71,7 @@ fprintf(stderr, "FAILED: cygpmp_portalplayer1-0.dll\n"); } - inst = dlopen("cygpmp_iriverplus2-0.dll", RTLD_LAZY); + inst = lt_dlopenext("libpmp_iriverplus2"); if (inst) { pmphelp->num_plugins++; pmphelp->plugins = (void**)realloc(pmphelp->plugins, sizeof(void*) * pmphelp->num_plugins); @@ -77,7 +80,7 @@ fprintf(stderr, "FAILED: cygpmp_iriverplus2-0.dll\n"); } - inst = dlopen("cygpmp_irivnavi-0.dll", RTLD_LAZY); + inst = lt_dlopenext("libpmp_irivnavi"); if (inst) { pmphelp->num_plugins++; pmphelp->plugins = (void**)realloc(pmphelp->plugins, sizeof(void*) * pmphelp->num_plugins); @@ -116,7 +119,7 @@ uint32_t i; for (i = 0;i < pmphelpposix->num_plugins;++i) { - pmp_create_t func = (pmp_create_t)dlsym(pmphelpposix->plugins[i], "pmp_create"); + pmp_create_t func = (pmp_create_t)lt_dlsym(pmphelpposix->plugins[i], "pmp_create"); if (func) { ret = func(pmp, path_to_device, id); if (ret != PMP_DEVICENOTFOUND) { Modified: trunk/lib/pmp_iriverplus2/Makefile.am =================================================================== --- trunk/lib/pmp_iriverplus2/Makefile.am 2006-06-02 00:08:40 UTC (rev 18) +++ trunk/lib/pmp_iriverplus2/Makefile.am 2006-06-02 17:44:51 UTC (rev 19) @@ -1,5 +1,6 @@ # $Id$ +pmpdir=$(libdir)/pmp lib_LTLIBRARIES = libpmp_iriverplus2.la libpmp_iriverplus2_la_SOURCES = \ @@ -23,11 +24,13 @@ pmp_iriverplus2.c libpmp_iriverplus2_la_LDFLAGS = \ + -no-undefined -module -avoid-versions \ + -export-symbols ../pmp/pmp_plugin.sym + ++iriverplus2_la_LIBADD = \ $(top_builddir)/lib/ucs2/libucs2.la \ $(top_builddir)/lib/filepath/libfilepath.la \ - $(top_builddir)/lib/pmp/libpmp.la \ - -no-undefined \ - -module -export-symbols ../pmp/pmp_plugin.sym + $(top_builddir)/lib/pmp/libpmp.la AM_CFLAGS = @CFLAGS@ INCLUDES = @INCLUDES@ Modified: trunk/lib/pmp_irivnavi/Makefile.am =================================================================== --- trunk/lib/pmp_irivnavi/Makefile.am 2006-06-02 00:08:40 UTC (rev 18) +++ trunk/lib/pmp_irivnavi/Makefile.am 2006-06-02 17:44:51 UTC (rev 19) @@ -13,11 +13,13 @@ pmp_irivnavi.c libpmp_irivnavi_la_LDFLAGS = \ + -no-undefined -module -avoid-version \ + -export-symbols ../pmp/pmp_plugin.sym + +libpmp_irivnavi_la_LDFLAGS = \ $(top_builddir)/lib/ucs2/libucs2.la \ $(top_builddir)/lib/filepath/libfilepath.la \ - $(top_builddir)/lib/pmp/libpmp.la \ - -no-undefined \ - -module -export-symbols ../pmp/pmp_plugin.sym + $(top_builddir)/lib/pmp/libpmp.la AM_CFLAGS = @CFLAGS@ INCLUDES = @INCLUDES@ Modified: trunk/lib/pmp_portalplayer1/Makefile.am =================================================================== --- trunk/lib/pmp_portalplayer1/Makefile.am 2006-06-02 00:08:40 UTC (rev 18) +++ trunk/lib/pmp_portalplayer1/Makefile.am 2006-06-02 17:44:51 UTC (rev 19) @@ -20,15 +20,20 @@ util.c \ util.h \ model_iriver_h10.c \ + model_medion_mdjuke220.c \ + model_medion_mdjuke440.c \ model_sirius_s50.c \ + model_samsung.c \ pmp_portalplayer1.c libpmp_portalplayer1_la_LDFLAGS = \ + -no-undefined -module -avoid-version \ + -export-symbols ../pmp/pmp_plugin.sym + +libpmp_portalplayer1_la_LDFLAGS = \ $(top_builddir)/lib/ucs2/libucs2.la \ $(top_builddir)/lib/filepath/libfilepath.la \ - $(top_builddir)/lib/pmp/libpmp.la \ - -no-undefined \ - -module -export-symbols ../pmp/pmp_plugin.sym + $(top_builddir)/lib/pmp/libpmp.la AM_CFLAGS = @CFLAGS@ INCLUDES = @INCLUDES@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-06-01 13:37:20
|
Revision: 17 Author: nyaochi Date: 2006-06-01 06:37:11 -0700 (Thu, 01 Jun 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=17&view=rev Log Message: ----------- - Added missing Makefile.in - Changed EOL character for autogen.sh Modified Paths: -------------- trunk/autogen.sh Added Paths: ----------- trunk/Makefile.in Property Changed: ---------------- trunk/autogen.sh Added: trunk/Makefile.in =================================================================== --- trunk/Makefile.in (rev 0) +++ trunk/Makefile.in 2006-06-01 13:37:11 UTC (rev 17) @@ -0,0 +1,665 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# $Id$ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = . +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +LIBOBJDIR = +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ + config.guess config.sub depcomp install-sh ltmain.sh missing +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno configure.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(docdir)" +docDATA_INSTALL = $(INSTALL_DATA) +DATA = $(doc_DATA) +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +ICONV_LIBS = @ICONV_LIBS@ +ID3TAG_LIBS = @ID3TAG_LIBS@ +INCLUDES = @INCLUDES@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ +OGG_LIBS = @OGG_LIBS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +U = @U@ +VERSION = @VERSION@ +VORBISFILE_LIBS = @VORBISFILE_LIBS@ +VORBIS_LIBS = @VORBIS_LIBS@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +SUBDIRS = \ + lib/ucs2 \ + lib/filepath \ + lib/gmi \ + lib/playlist \ + lib/pmp \ + lib/pmp_irivnavi \ + lib/pmp_portalplayer1 \ + lib/pmp_iriverplus2 \ + frontend/easypmp/cui + +docdir = $(prefix)/share/doc/@PACKAGE@ +doc_DATA = README NEWS INSTALL COPYING AUTHORS ChangeLog +EXTRA_DIST = autogen.sh +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-docDATA: $(doc_DATA) + @$(NORMAL_INSTALL) + test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)" + @list='$(doc_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \ + $(docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \ + done + +uninstall-docDATA: + @$(NORMAL_UNINSTALL) + @list='$(doc_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \ + rm -f "$(DESTDIR)$(docdir)/$$f"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(DATA) config.h +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(docdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: install-docDATA + +install-exec-am: + +install-info: install-info-recursive + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-docDATA uninstall-info-am + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ + check-am clean clean-generic clean-libtool clean-recursive \ + ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ + dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-recursive distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-docDATA install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-generic mostlyclean-libtool \ + mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-docDATA uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Modified: trunk/autogen.sh =================================================================== --- trunk/autogen.sh 2006-06-01 12:48:00 UTC (rev 16) +++ trunk/autogen.sh 2006-06-01 13:37:11 UTC (rev 17) @@ -1,38 +1,38 @@ -#!/bin/sh -# $Id: autogen.sh,v 1.3 2005/08/06 21:41:54 nyaochi Exp $ - -if [ "$1" = "--force" ]; -then - FORCE=--force - NOFORCE= - FORCE_MISSING=--force-missing -else - FORCE= - NOFORCE=--no-force - FORCE_MISSING= -fi - -libtoolize --copy $FORCE 2>&1 | sed '/^You should/d' || { - echo "libtoolize failed!" - exit 1 -} - -aclocal || { - echo "aclocal failed!" - exit 1 -} - -autoheader $FORCE || { - echo "autoheader failed!" - exit 1 -} - -automake -a -c $NOFORCE $FORCE_MISSING || { - echo "automake failed!" - exit 1 -} - -autoconf $FORCE || { - echo "autoconf failed!" - exit 1 -} +#!/bin/sh +# $Id: autogen.sh,v 1.3 2005/08/06 21:41:54 nyaochi Exp $ + +if [ "$1" = "--force" ]; +then + FORCE=--force + NOFORCE= + FORCE_MISSING=--force-missing +else + FORCE= + NOFORCE=--no-force + FORCE_MISSING= +fi + +libtoolize --copy $FORCE 2>&1 | sed '/^You should/d' || { + echo "libtoolize failed!" + exit 1 +} + +aclocal || { + echo "aclocal failed!" + exit 1 +} + +autoheader $FORCE || { + echo "autoheader failed!" + exit 1 +} + +automake -a -c $NOFORCE $FORCE_MISSING || { + echo "automake failed!" + exit 1 +} + +autoconf $FORCE || { + echo "autoconf failed!" + exit 1 +} Property changes on: trunk/autogen.sh ___________________________________________________________________ Name: svn:executable + * Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-06-01 12:48:39
|
Revision: 16 Author: nyaochi Date: 2006-06-01 05:48:00 -0700 (Thu, 01 Jun 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=16&view=rev Log Message: ----------- A number of patches while I was away from the Internet connection. - EasyPMP 0.10 alpha release. - Rework on the interface for obtaining/setting player's environment. - Fundamental work for skipping "the" in the artist field. Modified Paths: -------------- trunk/README trunk/frontend/easypmp/common/database.c trunk/frontend/easypmp/common/easypmp.h trunk/frontend/easypmp/common/enumerate.c trunk/frontend/easypmp/common/playlist.c trunk/frontend/easypmp/cui/device.c trunk/frontend/easypmp/cui/main.c trunk/frontend/easypmp/cui/option.c trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc trunk/include/gmi.h trunk/include/pmp.h trunk/include/ucs2char.h trunk/lib/gmi/gmi.c trunk/lib/pmp_iriverplus2/playlist.c trunk/lib/pmp_iriverplus2/pmp_iriverplus2.c trunk/lib/pmp_irivnavi/pmp_irivnavi.c trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c trunk/lib/ucs2/ucs2char.c Modified: trunk/README =================================================================== --- trunk/README 2006-05-06 04:57:28 UTC (rev 15) +++ trunk/README 2006-06-01 12:48:00 UTC (rev 16) @@ -1,5 +1,5 @@ PMPLib - Version 0.9 + Version 0.10 http://pmplib.sourceforge.net/ Copyright (c) 2005-2006 by Nyaochi Modified: trunk/frontend/easypmp/common/database.c =================================================================== --- trunk/frontend/easypmp/common/database.c 2006-05-06 04:57:28 UTC (rev 15) +++ trunk/frontend/easypmp/common/database.c 2006-06-01 12:48:00 UTC (rev 16) @@ -186,7 +186,14 @@ // If we are not skipping this file, obtain the media information. if (!is_skipping) { - if (gmi_get(record, filename, pmp->env.path_to_music, opt->media_info_source) == 0) { + if (gmi_get( + record, + filename, + pmp->env.path_to_music.path, + opt->media_info_source, + opt->strip_words, + opt->num_strip_words + ) == 0) { ++num_obtained; } else { } Modified: trunk/frontend/easypmp/common/easypmp.h =================================================================== --- trunk/frontend/easypmp/common/easypmp.h 2006-05-06 04:57:28 UTC (rev 15) +++ trunk/frontend/easypmp/common/easypmp.h 2006-06-01 12:48:00 UTC (rev 16) @@ -89,6 +89,8 @@ char model[128]; char *system_encoding; char *music_encoding; + ucs2char_t** strip_words; + int num_strip_words; } option_t; typedef struct { Modified: trunk/frontend/easypmp/common/enumerate.c =================================================================== --- trunk/frontend/easypmp/common/enumerate.c 2006-05-06 04:57:28 UTC (rev 15) +++ trunk/frontend/easypmp/common/enumerate.c 2006-06-01 12:48:00 UTC (rev 16) @@ -101,7 +101,12 @@ ed.proc = proc; ed.instance = instance; - return find_file(pmp->env.path_to_music, 1, found_music_file, &ed); + return find_file( + pmp->env.path_to_music.path, + pmp->env.path_to_music.flag & PMPPEF_RECURSIVE ? 1 : 0, + found_music_file, + &ed + ); } static int found_playlist_file(void *instance, const ucs2char_t* found_path, const ucs2char_t* found_file) @@ -164,10 +169,20 @@ ed.instance = instance; if (opt->verb & MODE_PLAYLIST_PLAYLIST) { - ret = find_file(pmp->env.path_to_playlist, 0, found_playlist_file, &ed); + ret = find_file( + pmp->env.path_to_playlist.path, + pmp->env.path_to_playlist.flag & PMPPEF_RECURSIVE ? 1 : 0, + found_playlist_file, + &ed + ); } if (opt->verb & MODE_PLAYLIST_MUSIC) { - ret = find_file(pmp->env.path_to_music, 1, found_playlist_file, &ed); + ret = find_file( + pmp->env.path_to_music.path, + pmp->env.path_to_music.flag & PMPPEF_RECURSIVE ? 1 : 0, + found_playlist_file, + &ed + ); } return ret; } Modified: trunk/frontend/easypmp/common/playlist.c =================================================================== --- trunk/frontend/easypmp/common/playlist.c 2006-05-06 04:57:28 UTC (rev 15) +++ trunk/frontend/easypmp/common/playlist.c 2006-06-01 12:48:00 UTC (rev 16) @@ -151,7 +151,7 @@ ucs2char_t dst[MAX_PATH]; // Generate a destination filename. - filepath_combinepath(dst, MAX_PATH, pmp->env.path_to_playlist, filepath_skippath(pl->name)); + filepath_combinepath(dst, MAX_PATH, pmp->env.path_to_playlist.path, filepath_skippath(pl->name)); filepath_remove_extension(dst); ucs2cat(dst, pmp->env.playlist_ext); @@ -175,7 +175,7 @@ n = playlist_normalize( pl, filepath_skippath(pl->name), - pmp->env.path_to_root, + pmp->env.path_to_root.path, mediafiles, musics->num_elements ); Modified: trunk/frontend/easypmp/cui/device.c =================================================================== --- trunk/frontend/easypmp/cui/device.c 2006-05-06 04:57:28 UTC (rev 15) +++ trunk/frontend/easypmp/cui/device.c 2006-06-01 12:48:00 UTC (rev 16) @@ -36,19 +36,26 @@ #include "util.h" -void device_show_information(pmp_t* pmp, FILE *fpe) +static void device_show_pathflag(int flag, FILE* fp) { - fprintf(fpe, "Device identifier: %s\n", pmp->env.id); - fprintf(fpe, " Product name: %s\n", pmp->env.name); - fprintf(fpe, " Firmware mode: %s\n", pmp->env.mode); - fprintf(fpe, " Firmware version: %s\n", pmp->env.version); - fprintf(fpe, " Default language: %s\n", pmp->env.language); - fprints(fpe, " Root directory: %s\n", pmp->env.path_to_root); - fprints(fpe, " Music directory: %s\n", pmp->env.path_to_music); - fprints(fpe, " Playlist directory: %s\n", pmp->env.path_to_playlist); - fprints(fpe, " Playlist extension: %s\n", pmp->env.playlist_ext); + if (flag & PMPPEF_RECURSIVE) { + fprintf(fp, " sub_directory=yes"); + } } +void device_show_information(pmp_t* pmp, FILE *fp) +{ + fprintf(fp, "Device identifier: %s\n", pmp->env.id); + fprintf(fp, " Product name: %s\n", pmp->env.name); + fprintf(fp, " Firmware mode: %s\n", pmp->env.mode); + fprintf(fp, " Firmware version: %s\n", pmp->env.version); + fprintf(fp, " Default language: %s\n", pmp->env.language); + fprints(fp, " Root directory: %s\n", pmp->env.path_to_root.path); + fprints(fp, " Music directory: %s\n", pmp->env.path_to_music.path); + fprints(fp, " Playlist directory: %s\n", pmp->env.path_to_playlist.path); + fprints(fp, " Playlist extension: %s\n", pmp->env.playlist_ext); +} + static void enumerate_devid_callback(void *instance, const char *devid) { pmphelp_t *pmphelp = (pmphelp_t*)instance; Modified: trunk/frontend/easypmp/cui/main.c =================================================================== --- trunk/frontend/easypmp/cui/main.c 2006-05-06 04:57:28 UTC (rev 15) +++ trunk/frontend/easypmp/cui/main.c 2006-06-01 12:48:00 UTC (rev 16) @@ -49,7 +49,7 @@ #endif #define APPLICATION_S "EasyPMP [CUI]" -#define VERSION_S "0.9 alpha" +#define VERSION_S "0.10 alpha" #define COPYRIGHT_S "Copyright (c) 2005-2006 Nyaochi" int database_dump(pmp_t* pmp, FILE *fpo, int level); Modified: trunk/frontend/easypmp/cui/option.c =================================================================== --- trunk/frontend/easypmp/cui/option.c 2006-05-06 04:57:28 UTC (rev 15) +++ trunk/frontend/easypmp/cui/option.c 2006-06-01 12:48:00 UTC (rev 16) @@ -91,13 +91,54 @@ fprintf(fp, " -h, --help Show this help message and exit\n"); } +static void set_strip_words(option_t* opt, const char *str) +{ + size_t i; + const char *p = 0, *q = 0; + + for (i = 0;i < opt->num_strip_words;++i) { + ucs2free(opt->strip_words[i]); + } + ucs2free(opt->strip_words); + + if (str && *str) { + opt->num_strip_words = 1; + for (p = str;*p;++p) { + if (*p == ',') { + opt->num_strip_words++; + } + } + + p = q = str; + opt->strip_words = (ucs2char_t**)ucs2malloc(sizeof(ucs2char_t*) * opt->num_strip_words); + for (i = 0;i < opt->num_strip_words;++i) { + opt->strip_words[i] = 0; + for (;;) { + if (*q == ',' || !*q) { + size_t length = mbstoucs2(0, 0, p, q-p); + opt->strip_words[i] = ucs2malloc(sizeof(ucs2char_t*) * length + 1); + mbstoucs2(opt->strip_words[i], length, p, q-p); + opt->strip_words[i][length] = 0; + if (!*q) { + break; + } else { + p = q+1; + } + } + q++; + } + } + } +} + int option_parse(option_t* opt, int argc, char *argv[], FILE *fpe) { int used_args = 0; memset(opt, 0, sizeof(*opt)); - opt->media_info_source |= GMIF_TAG; + opt->media_info_source |= (GMIF_TAG | GMIF_STRIP_ARTIST); + set_strip_words(opt, "the "); /* Parse the command-line arguments. */ for (;;) { Modified: trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc =================================================================== --- trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc 2006-05-06 04:57:28 UTC (rev 15) +++ trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc 2006-06-01 12:48:00 UTC (rev 16) @@ -213,8 +213,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,9,0,2 - PRODUCTVERSION 0,9,0,2 + FILEVERSION 0,11,0,2 + PRODUCTVERSION 0,11,0,2 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -230,12 +230,12 @@ BLOCK "040904b0" BEGIN VALUE "FileDescription", "EasyPMP [Win32 GUI] application" - VALUE "FileVersion", "0, 9, 0, 2" + VALUE "FileVersion", "0, 11, 0, 2" VALUE "InternalName", "easypmp_win32gui" VALUE "LegalCopyright", "Copyright 2005-2006 Nyaochi" VALUE "OriginalFilename", "easypmp_win32gui.exe" VALUE "ProductName", "EasyPMP [Win32 GUI]" - VALUE "ProductVersion", "0, 9, 0, 2" + VALUE "ProductVersion", "0, 11, 0, 2" END END BLOCK "VarFileInfo" Modified: trunk/include/gmi.h =================================================================== --- trunk/include/gmi.h 2006-05-06 04:57:28 UTC (rev 15) +++ trunk/include/gmi.h 2006-06-01 12:48:00 UTC (rev 16) @@ -40,6 +40,7 @@ enum { GMIF_NONE = 0x00000000, GMIF_TAG = 0x00000001, + GMIF_STRIP_ARTIST = 0x00000010, GMIF_GENRE = 0x00010000, GMIF_ARTIST = 0x00020000, GMIF_ALBUM = 0x00040000, @@ -51,7 +52,14 @@ #define media_info_t pmp_record_t #define gmi_finish pmp_record_finish -GMIAPI int gmi_get(media_info_t* info, const ucs2char_t *filename, const ucs2char_t* path_to_music, int flag); +GMIAPI int gmi_get( + media_info_t* info, + const ucs2char_t *filename, + const ucs2char_t* path_to_music, + int flag, + const ucs2char_t* strip_words[], + int num_strip_words + ); #ifdef __cplusplus } Modified: trunk/include/pmp.h =================================================================== --- trunk/include/pmp.h 2006-05-06 04:57:28 UTC (rev 15) +++ trunk/include/pmp.h 2006-06-01 12:48:00 UTC (rev 16) @@ -41,6 +41,9 @@ struct tag_pmpdb_t; typedef struct tag_pmpdb_t pmpdb_t; struct tag_pmppl_t; typedef struct tag_pmppl_t pmppl_t; +/** + * Error codes. + */ enum { PMP_SUCCESS = 0, PMP_DEVICENOTFOUND, @@ -66,17 +69,30 @@ #define PMPCODEC_VORBIS PMPFOURCC('O','V','1',' ') #define PMPCODEC_WAV PMPFOURCC('W','A','V','E') +enum { + PMPPEF_NONE = 0x0000, + PMPPEF_SUPPORT = 0x0001, + PMPPEF_CONSTANT = 0x0002, + PMPPEF_RECURSIVE = 0x0004, +}; + typedef struct { + int flag; + ucs2char_t path[MAX_PATH]; +} pmp_pathenv_t; + +typedef struct { char id[128]; char name[128]; char mode[128]; char language[128]; char version[128]; - const ucs2char_t* path_to_root; - const ucs2char_t* path_to_music; - const ucs2char_t* path_to_playlist; - const ucs2char_t* playlist_ext; + pmp_pathenv_t path_to_root; /**< Path to the root directory */ + pmp_pathenv_t path_to_music; /**< Path to the music files */ + pmp_pathenv_t path_to_playlist; /**< Path to the playlist files */ + pmp_pathenv_t path_to_photo; /**< Path to the photo files */ + ucs2char_t playlist_ext[MAX_PATH]; } pmp_environment_t; /** Modified: trunk/include/ucs2char.h =================================================================== --- trunk/include/ucs2char.h 2006-05-06 04:57:28 UTC (rev 15) +++ trunk/include/ucs2char.h 2006-06-01 12:48:00 UTC (rev 16) @@ -88,6 +88,7 @@ UCS2API int ucs2cmp(const ucs2char_t* x, const ucs2char_t* y); UCS2API int ucs2ncmp(const ucs2char_t* x, const ucs2char_t* y, size_t n); UCS2API int ucs2icmp(const ucs2char_t* x, const ucs2char_t* y); +UCS2API int ucs2incmp(const ucs2char_t* x, const ucs2char_t* y, size_t n); UCS2API int ucs2memcmp(const ucs2char_t* buf1, const ucs2char_t* buf2, size_t count); UCS2API const ucs2char_t *ucs2memchr(const ucs2char_t* buf, ucs2char_t c, size_t count); Modified: trunk/lib/gmi/gmi.c =================================================================== --- trunk/lib/gmi/gmi.c 2006-05-06 04:57:28 UTC (rev 15) +++ trunk/lib/gmi/gmi.c 2006-06-01 12:48:00 UTC (rev 16) @@ -177,8 +177,25 @@ return 0; } -int gmi_get(media_info_t* info, const ucs2char_t *filename, const ucs2char_t* path_to_music, int flag) +static void strip_head_letters(ucs2char_t* str, size_t offset) { + if (offset <= ucs2len(str)) { + size_t i, n = ucs2len(str) + 1 - offset; + for (i = 0;i < n;++i) { + str[i] = str[i+offset]; + } + } +} + +int gmi_get( + media_info_t* info, + const ucs2char_t *filename, + const ucs2char_t* path_to_music, + int flag, + const ucs2char_t* strip_words[], + int num_strip_words + ) +{ int ret = 1; gmi_exports_t* exp = gmi_exports; @@ -201,6 +218,18 @@ if (flag & GMIF_PARSEMASK) { gmi_get_from_pathname(info, filename, path_to_music, flag); } + + /* Strip specific words in artist names. */ + if ((flag & GMIF_STRIP_ARTIST) && strip_words) { + int i; + for (i = 0;i < num_strip_words;++i) { + if (ucs2incmp(info->artist, strip_words[i], ucs2len(strip_words[i])) == 0) { + strip_head_letters(info->artist, ucs2len(strip_words[i])); + break; + } + } + } + return ret; } Modified: trunk/lib/pmp_iriverplus2/playlist.c =================================================================== --- trunk/lib/pmp_iriverplus2/playlist.c 2006-05-06 04:57:28 UTC (rev 15) +++ trunk/lib/pmp_iriverplus2/playlist.c 2006-06-01 12:48:00 UTC (rev 16) @@ -56,7 +56,7 @@ ip2db_init_record(&record); ip2db_get_record(db, leafid, &record); - if (ucs2cmp(record.pathname, pathname) == 0) { + if (ucs2icmp(record.pathname, pathname) == 0 && ucs2icmp(record.filename, filepart) == 0) { ip2db_free_record(&record); return leafid; } Modified: trunk/lib/pmp_iriverplus2/pmp_iriverplus2.c =================================================================== --- trunk/lib/pmp_iriverplus2/pmp_iriverplus2.c 2006-05-06 04:57:28 UTC (rev 15) +++ trunk/lib/pmp_iriverplus2/pmp_iriverplus2.c 2006-06-01 12:48:00 UTC (rev 16) @@ -65,8 +65,8 @@ ".plp", }, { - "iriver_u10_ums_1.00-1.63", "U10 UMS", "UM", - "1.00", "1.63", + "iriver_u10_ums_1.00-1.64", "U10 UMS", "UM", + "1.00", "1.64", "System\\U10.sys", "System\\U10.dat", "System\\U10.idx", "Music\\", "Playlists\\", ".plp", @@ -294,6 +294,7 @@ pmp_internal_t* pmpi = NULL; const ip2model_descriptor_t* md = NULL; ip2_environment_t env; + pmp_environment_t* pmpenv = NULL; *ptr_pmp = 0; @@ -341,15 +342,19 @@ memcpy(&pmpi->env, &env, sizeof(env)); // Initialize the (exportable) env. - strcpy(pmp->env.id, md->id); - strcpy(pmp->env.name, md->name); - strcpy(pmp->env.mode, md->mode); - strcpy(pmp->env.language, pmpi->env.language); - strcpy(pmp->env.version, pmpi->env.version); - pmp->env.path_to_root = pmpi->env.path_to_root; - pmp->env.path_to_music = pmpi->env.path_to_music; - pmp->env.path_to_playlist = pmpi->env.path_to_playlist; - pmp->env.playlist_ext = pmpi->env.playlist_ext; + pmpenv = &pmp->env; + strcpy(pmpenv->id, md->id); + strcpy(pmpenv->name, md->name); + strcpy(pmpenv->mode, md->mode); + strcpy(pmpenv->language, pmpi->env.language); + strcpy(pmpenv->version, pmpi->env.version); + pmpenv->path_to_root.flag = PMPPEF_SUPPORT | PMPPEF_CONSTANT; + ucs2cpy(pmpenv->path_to_root.path, pmpi->env.path_to_root); + pmpenv->path_to_music.flag = PMPPEF_SUPPORT | PMPPEF_RECURSIVE; + ucs2cpy(pmpenv->path_to_music.path, pmpi->env.path_to_music); + pmpenv->path_to_playlist.flag = PMPPEF_SUPPORT; + ucs2cpy(pmpenv->path_to_playlist.path, pmpi->env.path_to_playlist); + ucs2cpy(pmpenv->playlist_ext, pmpi->env.playlist_ext); // Prepare pmp->add_ref(pmp); Modified: trunk/lib/pmp_irivnavi/pmp_irivnavi.c =================================================================== --- trunk/lib/pmp_irivnavi/pmp_irivnavi.c 2006-05-06 04:57:28 UTC (rev 15) +++ trunk/lib/pmp_irivnavi/pmp_irivnavi.c 2006-06-01 12:48:00 UTC (rev 16) @@ -121,6 +121,7 @@ result_t ret = 0; pmp_t* pmp = NULL; pmp_internal_t* pmpi = NULL; + pmp_environment_t* pmpenv = NULL; *ptr_pmp = 0; @@ -200,10 +201,14 @@ pmp->env.version[0] = 0; // Unknown version // Set enviroments. - pmp->env.path_to_root = pmpi->env.path_to_root; - pmp->env.path_to_music = pmpi->env.path_to_music; - pmp->env.path_to_playlist = pmpi->env.path_to_playlist; - pmp->env.playlist_ext = pmpi->env.playlist_ext; + pmpenv = &pmp->env; + pmpenv->path_to_root.flag = PMPPEF_SUPPORT | PMPPEF_CONSTANT; + ucs2cpy(pmpenv->path_to_root.path, pmpi->env.path_to_root); + pmpenv->path_to_music.flag = PMPPEF_SUPPORT | PMPPEF_RECURSIVE; + ucs2cpy(pmpenv->path_to_music.path, pmpi->env.path_to_music); + pmpenv->path_to_playlist.flag = PMPPEF_SUPPORT | PMPPEF_RECURSIVE; + ucs2cpy(pmpenv->path_to_playlist.path, pmpi->env.path_to_playlist); + ucs2cpy(pmpenv->playlist_ext, pmpi->env.playlist_ext); pmp->add_ref(pmp); *ptr_pmp = pmp; @@ -340,7 +345,7 @@ uint8_t *buffer = NULL; // Open a database file in the root directory. - ucs2cpy(filename, pmpdb->pmp->env.path_to_root); + ucs2cpy(filename, pmpdb->pmp->env.path_to_root.path); filepath_addslash(filename); ucs2cat(filename, ucs2cs_irivnavi_idb); fp = ucs2fopen(filename, "rb"); @@ -394,7 +399,7 @@ uint8_t *buffer = NULL; // Open a database file in the root directory. - ucs2cpy(filename, pmpdb->pmp->env.path_to_root); + ucs2cpy(filename, pmpdb->pmp->env.path_to_root.path); filepath_addslash(filename); ucs2cat(filename, ucs2cs_irivnavi_idb); filepath_removefile(filename); @@ -437,7 +442,7 @@ result_t ret = 0; uint32_t i, j, n = 0; static const ucs2char_t ucs2cs_unknown[] = {'u','n','k','n','o','w','n',0}; - const ucs2char_t* path_to_root = pmpdb->pmp->env.path_to_root; + const ucs2char_t* path_to_root = pmpdb->pmp->env.path_to_root.path; // Clear the database. irivnavi_finish(db); @@ -488,7 +493,7 @@ irivnavi_t* db = (irivnavi_t*)pmpdb->instance; result_t ret = 0; uint32_t i, j, n = db->num_records; - const ucs2char_t* path_to_root = pmpdb->pmp->env.path_to_root; + const ucs2char_t* path_to_root = pmpdb->pmp->env.path_to_root.path; static const ucs2char_t ucs2cs_mp3[] = {'.','m','p','3',0}; static const ucs2char_t ucs2cs_ogg[] = {'.','o','g','g',0}; static const ucs2char_t ucs2cs_wma[] = {'.','w','m','a',0}; Modified: trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c =================================================================== --- trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c 2006-05-06 04:57:28 UTC (rev 15) +++ trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c 2006-06-01 12:48:00 UTC (rev 16) @@ -333,6 +333,7 @@ pmp_internal_t* pmpi = NULL; const pp1model_descriptor_t* md = NULL; pp1_environment_t env; + pmp_environment_t* pmpenv = NULL; // Initialize. *ptr_pmp = 0; @@ -382,15 +383,19 @@ memcpy(&pmpi->env, &env, sizeof(env)); // Initialize the (exportable) env. - strcpy(pmp->env.id, md->id); - strcpy(pmp->env.name, pmpi->env.model.name); - strcpy(pmp->env.mode, pmpi->env.model.mode); - strcpy(pmp->env.language, pmpi->env.model.language); - strcpy(pmp->env.version, pmpi->env.model.version); - pmp->env.path_to_root = pmpi->env.path_to_root; - pmp->env.path_to_music = pmpi->env.path_to_music; - pmp->env.path_to_playlist = pmpi->env.path_to_playlist; - pmp->env.playlist_ext = pmpi->env.playlist_ext; + pmpenv = &pmp->env; + strcpy(pmpenv->id, md->id); + strcpy(pmpenv->name, pmpi->env.model.name); + strcpy(pmpenv->mode, pmpi->env.model.mode); + strcpy(pmpenv->language, pmpi->env.model.language); + strcpy(pmpenv->version, pmpi->env.model.version); + pmpenv->path_to_root.flag = PMPPEF_SUPPORT | PMPPEF_CONSTANT; + ucs2cpy(pmpenv->path_to_root.path, pmpi->env.path_to_root); + pmpenv->path_to_music.flag = PMPPEF_SUPPORT | PMPPEF_RECURSIVE; + ucs2cpy(pmpenv->path_to_music.path, pmpi->env.path_to_music); + pmpenv->path_to_playlist.flag = PMPPEF_SUPPORT; + ucs2cpy(pmpenv->path_to_playlist.path, pmpi->env.path_to_playlist); + ucs2cpy(pmpenv->playlist_ext, pmpi->env.playlist_ext); // Prepare pmp->add_ref(pmp); Modified: trunk/lib/ucs2/ucs2char.c =================================================================== --- trunk/lib/ucs2/ucs2char.c 2006-05-06 04:57:28 UTC (rev 15) +++ trunk/lib/ucs2/ucs2char.c 2006-06-01 12:48:00 UTC (rev 16) @@ -189,6 +189,23 @@ return COMP(a, b); } +int ucs2incmp(const ucs2char_t* x, const ucs2char_t* y, size_t n) +{ + size_t i; + ucs2char_t a = 0, b = 0; + + for (i = 0;i < n-1;i++) { + a = ucs2upper(*x); + b = ucs2upper(*y); + if (!*x || !*y || a != b) { + break; + } + x++; + y++; + } + return COMP(a, b); +} + int ucs2memcmp(const ucs2char_t* buf1, const ucs2char_t* buf2, size_t count) { size_t i; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-05-06 04:57:35
|
Revision: 15 Author: nyaochi Date: 2006-05-05 21:57:28 -0700 (Fri, 05 May 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=15&view=rev Log Message: ----------- Supported iRiver U10 firmware 1.63. Modified Paths: -------------- trunk/README trunk/lib/pmp_iriverplus2/pmp_iriverplus2.c Modified: trunk/README =================================================================== --- trunk/README 2006-05-06 02:08:11 UTC (rev 14) +++ trunk/README 2006-05-06 04:57:28 UTC (rev 15) @@ -1,5 +1,5 @@ PMPLib - Version 0.6 + Version 0.9 http://pmplib.sourceforge.net/ Copyright (c) 2005-2006 by Nyaochi Modified: trunk/lib/pmp_iriverplus2/pmp_iriverplus2.c =================================================================== --- trunk/lib/pmp_iriverplus2/pmp_iriverplus2.c 2006-05-06 02:08:11 UTC (rev 14) +++ trunk/lib/pmp_iriverplus2/pmp_iriverplus2.c 2006-05-06 04:57:28 UTC (rev 15) @@ -65,8 +65,8 @@ ".plp", }, { - "iriver_u10_ums_1.00-1.60", "U10 UMS", "UM", - "1.00", "1.60", + "iriver_u10_ums_1.00-1.63", "U10 UMS", "UM", + "1.00", "1.63", "System\\U10.sys", "System\\U10.dat", "System\\U10.idx", "Music\\", "Playlists\\", ".plp", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-05-06 02:08:15
|
Revision: 14 Author: nyaochi Date: 2006-05-05 19:08:11 -0700 (Fri, 05 May 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=14&view=rev Log Message: ----------- Store the dialog setting when the user changes a drive letter. Modified Paths: -------------- trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc trunk/frontend/easypmp/win32gui/maindlg.h Modified: trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc =================================================================== --- trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc 2006-05-05 13:54:22 UTC (rev 13) +++ trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc 2006-05-06 02:08:11 UTC (rev 14) @@ -98,6 +98,10 @@ 72,8 CONTROL "&Rebuild",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,168,24, 72,8 + LTEXT "Source of media information (&z):",IDC_STATIC,24,42,108, + 12 + COMBOBOX IDC_COMBO_MEDIAINFO_SOURCE,138,42,102,36, + CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP GROUPBOX "Playlist conversion",IDC_STATIC,12,66,240,72 CONTROL "N&one",IDC_RADIO_PLAYLIST,"Button",BS_AUTORADIOBUTTON | WS_GROUP,24,78,72,8 @@ -115,26 +119,22 @@ BS_AUTOCHECKBOX | WS_TABSTOP,96,108,72,8 CONTROL "&Skip missing",IDC_CHECK_PL_SKIP,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,168,108,72,8 + CONTROL "Use &JavaScript playlist",IDC_CHECK_PL_JSPL,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,96,120,144,8 GROUPBOX "Portable Player Device",IDC_STATIC,12,144,240,72 LTEXT "&Location:",IDC_STATIC,24,156,42,12,SS_CENTERIMAGE COMBOBOX IDC_COMBO_DEVICE_LOCATION,78,156,42,36,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + CONTROL "Sa&ve log",IDC_CHECK_SAVE_LOG,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,168,156,66,12 LTEXT "&Identifier:",IDC_STATIC,24,174,42,12,SS_CENTERIMAGE COMBOBOX IDC_COMBO_DEVICE_ID,78,174,162,36,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP LTEXT "Description:",IDC_STATIC,24,192,42,12,SS_CENTERIMAGE + LTEXT "\x83X\x83^\x83e\x83B\x83b\x83N",IDC_STATIC_PLAYER_DESCRIPTION,78,192,162, + 12,0,WS_EX_CLIENTEDGE CONTROL "E&ject the player on completion",IDC_CHECK_SAFEREMOVE, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,222,120,12 - LTEXT "\x83X\x83^\x83e\x83B\x83b\x83N",IDC_STATIC_PLAYER_DESCRIPTION,78,192,162, - 12,0,WS_EX_CLIENTEDGE - CONTROL "Sa&ve log",IDC_CHECK_SAVE_LOG,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,168,156,66,12 - LTEXT "Source of media information (&z):",IDC_STATIC,24,42,108, - 12 - COMBOBOX IDC_COMBO_MEDIAINFO_SOURCE,138,42,102,36, - CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - CONTROL "Use &JavaScript playlist",IDC_CHECK_PL_JSPL,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,96,120,144,8 END IDD_PROCESSING DIALOGEX 0, 0, 263, 246 Modified: trunk/frontend/easypmp/win32gui/maindlg.h =================================================================== --- trunk/frontend/easypmp/win32gui/maindlg.h 2006-05-05 13:54:22 UTC (rev 13) +++ trunk/frontend/easypmp/win32gui/maindlg.h 2006-05-06 02:08:11 UTC (rev 14) @@ -229,6 +229,9 @@ { CString strPlayerLocation; + // Store the current state of the UI controls. + updateUI(TRUE); + m_cmbPlayerLocation.GetLBText(m_cmbPlayerLocation.GetCurSel(), strPlayerLocation); m_setting.SetPlayerLocation(m_pmphelp, strPlayerLocation); updateUI(FALSE); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-05-05 13:54:35
|
Revision: 13 Author: nyaochi Date: 2006-05-05 06:54:22 -0700 (Fri, 05 May 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=13&view=rev Log Message: ----------- Added sample JSPL files. Added Paths: ----------- trunk/lib/playlist/sample/ trunk/lib/playlist/sample/artist.jspl trunk/lib/playlist/sample/artists.jspl trunk/lib/playlist/sample/top_ranking.jspl Added: trunk/lib/playlist/sample/artist.jspl =================================================================== --- trunk/lib/playlist/sample/artist.jspl (rev 0) +++ trunk/lib/playlist/sample/artist.jspl 2006-05-05 13:54:22 UTC (rev 13) @@ -0,0 +1,39 @@ +/* + * Artist playlist + * + * This JSPL extracts tracks performed by the artist whose name is + * is specified by either variable 'artist_name' or filename of this JSPL. + * + */ + +// Change this to specify the artist name +var artist_name = ""; + +include("playlist.js"); + +function main(media, source) +{ + // Check artist_name. + if (!artist_name) { + // Retrieve an artist name from the filename. + var begin = 0, end = source.length; + for (var i = 0;i < source.length;++i) { + if (source[i] == '\\' || source[i] == '/') + begin = i; + if (source[i] == '.') + end = i; + } + artist_name = source.slice(begin, end); + } + + // Convert the artist name to lower case. + artist_name = artist_name.toLowerCase(); + + var pl = new Playlist(); + for (var i = 0;i < media.length;++i) + if (media[i].artist.toLowerCase() == artist_name) + pl.push(media[i]); + pl.order("album", "track_number"); + + return pl; +} Added: trunk/lib/playlist/sample/artists.jspl =================================================================== --- trunk/lib/playlist/sample/artists.jspl (rev 0) +++ trunk/lib/playlist/sample/artists.jspl 2006-05-05 13:54:22 UTC (rev 13) @@ -0,0 +1,29 @@ +/* + * Artists playlist + * + * This JSPL generates multiple playlists each of which collects tracks + * performed by an artist. + * + */ + +include("playlist.js"); + +function main(media, playlist) +{ + var pls = new Object(); + + for (var i = 0;i < media.length;++i) { + var artist = media[i].artist.toLowerCase(); + var pl = pls[artist]; + if (pl == undefined) + pl = pls[artist] = new Playlist(); + pl.push(media[i]); + } + + for (var name in pls) { + var pl = pls[name]; + pl.order("album", "track_number"); + } + + return pls; +} Added: trunk/lib/playlist/sample/top_ranking.jspl =================================================================== --- trunk/lib/playlist/sample/top_ranking.jspl (rev 0) +++ trunk/lib/playlist/sample/top_ranking.jspl 2006-05-05 13:54:22 UTC (rev 13) @@ -0,0 +1,26 @@ +/* + * Top ranking playlist + * + * This playlist uses play_count field to generate a ranking playlist. + * The play_count field is currently set by iRiver H10, H10Jr, and U10. + * + */ + + +// Change this to specify the number of top tracks. +var num_top = 50; + +include("playlist.js"); + +function main(media, source) +{ + var pl = new Playlist(); + + for (var i = 0;i < media.length;++i) + pl.push(media[i]); + + pl.order("-play_count"); + + var end = Math.min(pl.length, num_top); + return pl.slice(0, end); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-05-05 13:35:26
|
Revision: 12 Author: nyaochi Date: 2006-05-05 06:35:12 -0700 (Fri, 05 May 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=12&view=rev Log Message: ----------- - Retrival of JSPL include path for Win32 CUI version. - Better criterion to distinguish Array (single playlist) and Object (multiple playlists). Modified Paths: -------------- trunk/frontend/easypmp/cui/main.c trunk/frontend/easypmp/cui/option.c trunk/frontend/easypmp/win32gui/processingdlg.h trunk/lib/playlist/jspl.c Modified: trunk/frontend/easypmp/cui/main.c =================================================================== --- trunk/frontend/easypmp/cui/main.c 2006-05-05 09:01:00 UTC (rev 11) +++ trunk/frontend/easypmp/cui/main.c 2006-05-05 13:35:12 UTC (rev 12) @@ -272,6 +272,19 @@ } filepath_addslash(opt.path_to_root); + // Generate the path_to_include + if (!opt.path_to_include[0]) { +#ifdef _WIN32 + ucs2char_t ucs2cs_jspl[] = {'j','s','p','l',0}; + + GetModuleFileNameW(GetModuleHandle(NULL), opt.path_to_include, MAX_PATH); + filepath_remove_filespec(opt.path_to_include); + filepath_addslash(opt.path_to_include); + ucs2cat(opt.path_to_include, ucs2cs_jspl); + filepath_addslash(opt.path_to_include); +#endif + } + // Create a PMP instance. pmphelp_create(pmphelp, &pmp, opt.path_to_root, opt.model); if (!pmp) { Modified: trunk/frontend/easypmp/cui/option.c =================================================================== --- trunk/frontend/easypmp/cui/option.c 2006-05-05 09:01:00 UTC (rev 11) +++ trunk/frontend/easypmp/cui/option.c 2006-05-05 13:35:12 UTC (rev 12) @@ -99,19 +99,6 @@ opt->media_info_source |= GMIF_TAG; - if (!opt->path_to_include[0]) { - char pwd[MAX_PATH+1]; - ucs2char_t ucs2pwd[MAX_PATH+1]; - ucs2char_t ucs2argv0[MAX_PATH+1]; - - getcwd(pwd, MAX_PATH); - mbstoucs2(ucs2pwd, MAX_PATH, pwd, strlen(pwd)+1); - mbstoucs2(ucs2argv0, MAX_PATH, argv[0], strlen(argv[0])+1); - filepath_relative_to_absolute(opt->path_to_include, ucs2pwd, ucs2argv0); - - filepath_remove_filespec(opt->path_to_include); - } - /* Parse the command-line arguments. */ for (;;) { int this_option_optind = optind ? optind : 1; Modified: trunk/frontend/easypmp/win32gui/processingdlg.h =================================================================== --- trunk/frontend/easypmp/win32gui/processingdlg.h 2006-05-05 09:01:00 UTC (rev 11) +++ trunk/frontend/easypmp/win32gui/processingdlg.h 2006-05-05 13:35:12 UTC (rev 12) @@ -284,6 +284,9 @@ // Set path to the include folder. ::GetModuleFileNameW(_Module.GetModuleInstance(), opt.path_to_include, MAX_PATH); ::PathRemoveFileSpecW(opt.path_to_include); + ::PathAddBackslashW(opt.path_to_include); + ucs2cat(opt.path_to_include, A2W("jspl")); + ::PathAddBackslashW(opt.path_to_include); // Set model if (!m_preference.strPlayerIdentifier.IsEmpty()) { Modified: trunk/lib/playlist/jspl.c =================================================================== --- trunk/lib/playlist/jspl.c 2006-05-05 09:01:00 UTC (rev 11) +++ trunk/lib/playlist/jspl.c 2006-05-05 13:35:12 UTC (rev 12) @@ -114,8 +114,25 @@ static int object_is_array(JSContext* cx, JSObject* obj) { - jsuint length; - return JS_HasArrayLength(cx, obj, &length) ? 1 : 0; + JSClass *jsclass = NULL; + +#ifdef JS_THREADSAFE + jsclass = JS_GetClass(cx, obj); +#else + jsclass = JS_GetClass(obj); +#endif + + if (strcmp(jsclass->name, "Array") == 0) { + return 1; + } else { + jsint length = 0; + if (JS_GetArrayLength(cx, obj, &length)) { + if (length > 0) { + return 1; + } + } + } + return 0; } static JSBool This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-05-05 09:01:17
|
Revision: 11 Author: nyaochi Date: 2006-05-05 02:01:00 -0700 (Fri, 05 May 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=11&view=rev Log Message: ----------- - Supported Samsung YH-820 and YH-925 players - Predefined Codec class in JSPL. Modified Paths: -------------- trunk/lib/playlist/jspl.c trunk/lib/pmp_portalplayer1/hdr_template.h trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c trunk/lib/pmp_portalplayer1/pmp_portalplayer1.vcproj Added Paths: ----------- trunk/lib/pmp_portalplayer1/model_samsung.c Removed Paths: ------------- trunk/lib/pmp_portalplayer1/model_samsung_yh820.c Modified: trunk/lib/playlist/jspl.c =================================================================== --- trunk/lib/playlist/jspl.c 2006-05-03 14:42:46 UTC (rev 10) +++ trunk/lib/playlist/jspl.c 2006-05-05 09:01:00 UTC (rev 11) @@ -348,22 +348,47 @@ return 0; } -static int jspl_init_script(jspl_t* jspl) +static int jspl_init_register_codec(jspl_t* jspl, const char *name, uint32_t codec, int *lines) { - static const char *script = - "Math.cmp = function(x, y)\n" - "{\n" - " return ((x)>(y))-((x)<(y));\n" - "};\n" - "\n"; + int ret = 0; + jsval retval; + char buffer[1024]; - static const char *_script = "function dummy() {}\n"; + sprintf(buffer, "Codec.%s = %u;\n", name, codec); + ret = JS_EvaluateScript(jspl->context, jspl->global, buffer, strlen(buffer), "easypmp.js", *lines, &retval); + if (!ret) { + return -1; + } + ++(*lines); + return 0; +} +static int jspl_init_codec_class(jspl_t* jspl) +{ jsval retval; - int ret = JS_EvaluateScript(jspl->context, jspl->global, script, strlen(script), "easypmp.js", 1, &retval); + int lines = 1; + static const char *script = "Codec = new Object();\n"; + + int ret = JS_EvaluateScript(jspl->context, jspl->global, script, strlen(script), "easypmp.js", lines, &retval); if (!ret) { return -1; } + ++lines; + + /* Register codec IDs. */ + if (jspl_init_register_codec(jspl, "MP3", PMPCODEC_MPEGLAYER3, &lines) < 0) { + return -1; + } + if (jspl_init_register_codec(jspl, "WMA", PMPCODEC_WMA, &lines) < 0) { + return -1; + } + if (jspl_init_register_codec(jspl, "OggVorbis", PMPCODEC_VORBIS, &lines) < 0) { + return -1; + } + if (jspl_init_register_codec(jspl, "WAV", PMPCODEC_WAV, &lines) < 0) { + return -1; + } + return 0; } @@ -508,6 +533,12 @@ goto error_exit; } + /* Initialize Codec class. */ + if (jspl_init_codec_class(jspl) != 0) { + ret = PLAYLIST_E_JSINITENGINE; + goto error_exit; + } + /* Initialize other fields. */ jspl->path_to_include = path_to_include; jspl->callback = callback; Modified: trunk/lib/pmp_portalplayer1/hdr_template.h =================================================================== --- trunk/lib/pmp_portalplayer1/hdr_template.h 2006-05-03 14:42:46 UTC (rev 10) +++ trunk/lib/pmp_portalplayer1/hdr_template.h 2006-05-05 09:01:00 UTC (rev 11) @@ -67,10 +67,11 @@ int hdr_init_medion_mdjuke220(hdr_t* hdr); int hdr_init_medion_mdjuke440(hdr_t* hdr); int hdr_init_samsung_yh820(hdr_t* hdr); +int hdr_init_samsung_yh925(hdr_t* hdr); int hdr_init_sirius_s50(hdr_t* hdr); int iriver_h10_parse_model(const ucs2char_t* firmware, pp1model_t* model); int medion_mdjuke220_parse_model(const ucs2char_t* firmware, pp1model_t* model); -int samsung_yh820_parse_model(const ucs2char_t* firmware, pp1model_t* model); +int samsung_parse_model(const ucs2char_t* firmware, pp1model_t* model); #endif/*__HDR_TEMPLATE_H__*/ Copied: trunk/lib/pmp_portalplayer1/model_samsung.c (from rev 10, trunk/lib/pmp_portalplayer1/model_samsung_yh820.c) =================================================================== --- trunk/lib/pmp_portalplayer1/model_samsung.c (rev 0) +++ trunk/lib/pmp_portalplayer1/model_samsung.c 2006-05-05 09:01:00 UTC (rev 11) @@ -0,0 +1,272 @@ +/* + * Samsung YH-820/YH-925 specific routines and header templates. + * + * Copyright (c) 2005-2006 Nyaochi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/* $Id$ */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif/*HAVE_CONFIG_H*/ + +#include <os.h> +#include <stdio.h> +#include <stdlib.h> +#include <ucs2char.h> +#include <filepath.h> + +#include "serialize.h" +#include "util.h" +#include "pp1db.h" +#include "hdr_template.h" + +enum { + PP1DB_DATFIELD_UNKNOWN2 = 0,// @0: (INT) + PP1DB_DATFIELD_PATHNAME, // @1: (STR) + PP1DB_DATFIELD_FILENAME, // @2: (STR) + PP1DB_DATFIELD_FORMAT, // @3: (INT) + PP1DB_DATFIELD_BITRATE, // @4: (INT) + PP1DB_DATFIELD_SAMPLERATE, // @5: (INT) + PP1DB_DATFIELD_DURATION, // @6: (INT) + PP1DB_DATFIELD_ARTIST, // @7: (STR) + PP1DB_DATFIELD_ALBUM, // @8: (STR) + PP1DB_DATFIELD_GENRE, // @9: (STR) + PP1DB_DATFIELD_TITLE, // @10: (STR) + PP1DB_DATFIELD_TRACKNUMBER, // @11: (INT) + PP1DB_DATFIELD_YEAR, // @12: (INT) + PP1DB_DATFIELD_FILESIZE, // @13: (INT) + PP1DB_DATFIELD_UNKNOWN4, // @14: (INT) + PP1DB_DATFIELD_UNKNOWN5, // @15: (STR) + PP1DB_DATFIELD_UNKNOWN6, // @16: (STR) + PP1DB_DATFIELD_UNKNOWN7, // @17: (STR) +}; + +static void samsung_dat_repr(const dat_t* record, FILE *fp) +{ + fprintf(fp, " inactive: %d\n", record->status); + fprintf(fp, " unknown1: %d\n", record->unknown1); + fprintf(fp, " unknown2: %d\n", record->fields[PP1DB_DATFIELD_UNKNOWN2].value.dword); + fprints(fp, " file_path: %s\n", record->fields[PP1DB_DATFIELD_PATHNAME].value.str); + fprints(fp, " file_name: %s\n", record->fields[PP1DB_DATFIELD_FILENAME].value.str); + fprintf(fp, " media_type: %d\n", record->fields[PP1DB_DATFIELD_FORMAT].value.dword); + fprintf(fp, " bitrate: %d\n", record->fields[PP1DB_DATFIELD_BITRATE].value.dword); + fprintf(fp, " samplerate: %d\n", record->fields[PP1DB_DATFIELD_SAMPLERATE].value.dword); + fprintf(fp, " duration: %d\n", record->fields[PP1DB_DATFIELD_DURATION].value.dword); + fprints(fp, " artist: %s\n", record->fields[PP1DB_DATFIELD_ARTIST].value.str); + fprints(fp, " album: %s\n", record->fields[PP1DB_DATFIELD_ALBUM].value.str); + fprints(fp, " genre: %s\n", record->fields[PP1DB_DATFIELD_GENRE].value.str); + fprints(fp, " title: %s\n", record->fields[PP1DB_DATFIELD_TITLE].value.str); + fprintf(fp, " number: %d\n", record->fields[PP1DB_DATFIELD_TRACKNUMBER].value.dword); + fprintf(fp, " year: %d\n", record->fields[PP1DB_DATFIELD_YEAR].value.dword); + fprintf(fp, " filesize: %d\n", record->fields[PP1DB_DATFIELD_FILESIZE].value.dword); + fprintf(fp, " unknown4: %d\n", record->fields[PP1DB_DATFIELD_UNKNOWN4].value.dword); + fprints(fp, " unknown5: %s\n", record->fields[PP1DB_DATFIELD_UNKNOWN5].value.str); + fprints(fp, " unknown6: %s\n", record->fields[PP1DB_DATFIELD_UNKNOWN6].value.str); + fprints(fp, " unknown7: %s\n", record->fields[PP1DB_DATFIELD_UNKNOWN7].value.str); +} + +static int samsung_dat_set(dat_t* dst, const pmp_record_t* src, const ucs2char_t* path_to_root) +{ + static const ucs2char_t ucs2cs_unknown[] = {0}; + static const ucs2char_t ucs2cs_empty[] = {0}; + + // Set fields. + dst->status = 0; + dst->unknown1 = 0; + dst->fields[PP1DB_DATFIELD_PATHNAME].value.str = ucs2dup(filepath_skiproot(src->filename, path_to_root)); + filepath_remove_filespec(dst->fields[PP1DB_DATFIELD_PATHNAME].value.str); + filepath_addslash(dst->fields[PP1DB_DATFIELD_PATHNAME].value.str); + filepath_encode(dst->fields[PP1DB_DATFIELD_PATHNAME].value.str); + dst->fields[PP1DB_DATFIELD_FILENAME].value.str = ucs2dup(filepath_skippath(src->filename)); + dst->fields[PP1DB_DATFIELD_FORMAT].value.dword = 0; + dst->fields[PP1DB_DATFIELD_BITRATE].value.dword = src->bitrate; + dst->fields[PP1DB_DATFIELD_SAMPLERATE].value.dword = src->sample_rate; + dst->fields[PP1DB_DATFIELD_DURATION].value.dword = src->duration; + dst->fields[PP1DB_DATFIELD_ARTIST].value.str = ucs2dup(src->artist ? src->artist : ucs2cs_unknown); + dst->fields[PP1DB_DATFIELD_ALBUM].value.str = ucs2dup(src->album ? src->album : ucs2cs_unknown); + dst->fields[PP1DB_DATFIELD_GENRE].value.str = ucs2dup(src->genre ? src->genre : ucs2cs_unknown); + dst->fields[PP1DB_DATFIELD_TITLE].value.str = ucs2dup(src->title ? src->title : dst->fields[PP1DB_DATFIELD_FILENAME].value.str); + dst->fields[PP1DB_DATFIELD_TRACKNUMBER].value.dword = src->track_number; + if (src->date) { + dst->fields[PP1DB_DATFIELD_YEAR].value.dword = ucs2toi(src->date); + } + dst->fields[PP1DB_DATFIELD_FILESIZE].value.dword = src->filesize; + dst->fields[PP1DB_DATFIELD_UNKNOWN4].value.dword = 0; + dst->fields[PP1DB_DATFIELD_UNKNOWN5].value.str = ucs2dup(ucs2cs_empty); + dst->fields[PP1DB_DATFIELD_UNKNOWN6].value.str = ucs2dup(ucs2cs_empty); + dst->fields[PP1DB_DATFIELD_UNKNOWN7].value.str = ucs2dup(ucs2cs_empty); + return 0; +} + +static int samsung_dat_get(pmp_record_t* dst, const dat_t* src, const ucs2char_t* path_to_root) +{ + static const ucs2char_t ucs2cs_mp3[] = {'.','m','p','3',0}; + static const ucs2char_t ucs2cs_wma[] = {'.','w','m','a',0}; + static const ucs2char_t ucs2cs_wav[] = {'.','w','a','v',0}; + ucs2char_t tmp[128]; + size_t length = 0; + + length = ucs2len(path_to_root); + length += ucs2len(src->fields[PP1DB_DATFIELD_PATHNAME].value.str); + length += ucs2len(src->fields[PP1DB_DATFIELD_FILENAME].value.str); + length += 3; + + dst->filename = (ucs2char_t*)ucs2malloc(sizeof(ucs2char_t) * length); + if (dst->filename) { + filepath_combinepath(dst->filename, length, path_to_root, src->fields[PP1DB_DATFIELD_PATHNAME].value.str); + filepath_addslash(dst->filename); + ucs2cat(dst->filename, src->fields[PP1DB_DATFIELD_FILENAME].value.str); + } + + dst->bitrate = src->fields[PP1DB_DATFIELD_BITRATE].value.dword; + dst->sample_rate = src->fields[PP1DB_DATFIELD_SAMPLERATE].value.dword; + dst->duration = ucs2toi(src->fields[PP1DB_DATFIELD_DURATION].value.str); + + dst->artist = ucs2dup(src->fields[PP1DB_DATFIELD_ARTIST].value.str); + dst->album = ucs2dup(src->fields[PP1DB_DATFIELD_ALBUM].value.str); + dst->genre = ucs2dup(src->fields[PP1DB_DATFIELD_GENRE].value.str); + dst->title = ucs2dup(src->fields[PP1DB_DATFIELD_TITLE].value.str); + + // Set codec information according to the file extensions. + if (filepath_hasext(dst->filename, ucs2cs_mp3)) { + dst->codec = PMPCODEC_MPEGLAYER3; + } else if (filepath_hasext(dst->filename, ucs2cs_wma)) { + dst->codec = PMPCODEC_WMA; + } else if (filepath_hasext(dst->filename, ucs2cs_wav)) { + dst->codec = PMPCODEC_WAV; + } + + dst->track_number = src->fields[PP1DB_DATFIELD_TRACKNUMBER].value.dword; + itoucs2(src->fields[PP1DB_DATFIELD_YEAR].value.dword, tmp, 10); + dst->date = ucs2dup(tmp); + dst->filesize = src->fields[PP1DB_DATFIELD_FILESIZE].value.dword; + + return 0; +} + +int samsung_parse_model(const ucs2char_t* firmware, pp1model_t* model) +{ + FILE *fp = ucs2fopen(firmware, "rb"); + if (fp) { + char line[33], *p = NULL, *q = NULL; + memset(line, 0, sizeof(line)); + + // Seek to the firmware information. + if (fseek(fp, 0x0220, SEEK_SET) != 0) { + fclose(fp); + return 0; + } + + // Read the firmware information. + if (fread(line, sizeof(char), 32, fp) != 32) { + fclose(fp); + return 0; + } + + // Close the firmware. + fclose(fp); + + // Obtain the model name. + strcpy(model->name, "Samsung "); + strcat(model->name, line); + p = line + strlen(line) + 1; + + // Obtain firmware version. + q = strchr(p, ' '); + if (q) { + *q = 0; + } else { + return 0; + } + strcpy(model->version, p); + p = q+1; + + // Obtain the country code? + q = strchr(p, 0xC0); + if (q) { + *q = 0; + } else { + return 0; + } + strcpy(model->language, p); + + strcpy(model->mode, "UM"); + + return 1; + } else { + return 0; + } +} + + + + +static fd_template_t hdrtmpl_fd_samsung[] = { + {0x0000F001, 2, 4, 0, 0, 1, 0, 0, "System\\DATA\\PP...@DE...x"}, + {0x0000F002, 1, 128, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_FPTH.idx"}, + {0x0000F003, 1, 128, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_FNAM.idx"}, + {0x0000F00A, 2, 4, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_FRMT.idx"}, + {0x0000F005, 2, 4, 0, 0, 0, 0, 0, ""}, + {0x0000F006, 2, 4, 0, 0, 0, 0, 0, ""}, + {0x0000F007, 2, 4, 0, 0, 0, 0, 0, ""}, + {0x0000003C, 1, 40, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_TPE1.idx"}, + {0x0000001C, 1, 40, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_TALB.idx"}, + {0x0000001F, 1, 20, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_TCON.idx"}, + {0x0000002E, 1, 40, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_TIT2.idx"}, + {0x00000043, 2, 4, 0, 0, 0, 0, 0, ""}, + {0x0000004E, 2, 4, 0, 0, 0, 0, 0, ""}, + {0x0000F009, 2, 4, 0, 0, 0, 0, 0, ""}, + {0x0000E000, 2, 4, 0, 0, 0, 0, 0, ""}, + {0x0000E001, 1, 40, 0, 0, 0, 0, 0, ""}, + {0x00000083, 1, 10, 0, 0, 0, 0, 0, ""}, + {0x00000084, 1, 64, 0, 0, 0, 0, 0, ""}, +}; + +static uint32_t hdrtmpl_max_dat_field_size_samsung[] = + {8, 12, 268, 524, 528, 532, 536, 540, 620, 700, 740, 820, 824, 828, 832, 836, 916, 936}; + + +/********** Samsung YH-820 firmware 3.00 **********/ +static hdr_template_t hdrtmpl_samsung_yh820 = { + 0, 0, "System\\DATA\\PP5000.DAT", 0, "System\\DATA\\PP5000.HDR", 0x00000428, 0, 0, 18, + hdrtmpl_fd_samsung, + hdrtmpl_max_dat_field_size_samsung, + 0, 0, + {251956, 18, 6000, 1032, 0, samsung_dat_repr, samsung_dat_set, samsung_dat_get}, +}; + +/********** Samsung YH-925 firmware 1.61 **********/ +static hdr_template_t hdrtmpl_samsung_yh925 = { + 0, 0, "System\\DATA\\PP5000.DAT", 1, "System\\DATA\\PP5000.HDR", 0x00000428, 0, 0, 18, + hdrtmpl_fd_samsung, + hdrtmpl_max_dat_field_size_samsung, + 0, 0, + {251956, 18, 6000, 1032, 0, samsung_dat_repr, samsung_dat_set, samsung_dat_get}, +}; + +int hdr_init_samsung_yh820(hdr_t* hdr) +{ + return apply_template(hdr, &hdrtmpl_samsung_yh820); +} + +int hdr_init_samsung_yh925(hdr_t* hdr) +{ + return apply_template(hdr, &hdrtmpl_samsung_yh925); +} + Property changes on: trunk/lib/pmp_portalplayer1/model_samsung.c ___________________________________________________________________ Name: svn:keywords + Id Deleted: trunk/lib/pmp_portalplayer1/model_samsung_yh820.c =================================================================== --- trunk/lib/pmp_portalplayer1/model_samsung_yh820.c 2006-05-03 14:42:46 UTC (rev 10) +++ trunk/lib/pmp_portalplayer1/model_samsung_yh820.c 2006-05-05 09:01:00 UTC (rev 11) @@ -1,219 +0,0 @@ -/* - * Samsung YH-820 specific routines and header templates. - * - * Copyright (c) 2005-2006 Nyaochi - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -/* $Id: model_medion_mdjuke440.c 5 2006-03-31 05:41:31Z nyaochi $ */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif/*HAVE_CONFIG_H*/ - -#include <os.h> -#include <stdio.h> -#include <stdlib.h> -#include <ucs2char.h> -#include <filepath.h> - -#include "serialize.h" -#include "util.h" -#include "pp1db.h" -#include "hdr_template.h" - -enum { - PP1DB_DATFIELD_UNKNOWN2 = 0,// @0: (INT) - PP1DB_DATFIELD_PATHNAME, // @1: (STR) - PP1DB_DATFIELD_FILENAME, // @2: (STR) - PP1DB_DATFIELD_FORMAT, // @3: (INT) - PP1DB_DATFIELD_BITRATE, // @4: (INT) - PP1DB_DATFIELD_SAMPLERATE, // @5: (INT) - PP1DB_DATFIELD_DURATION, // @6: (INT) - PP1DB_DATFIELD_ARTIST, // @7: (STR) - PP1DB_DATFIELD_ALBUM, // @8: (STR) - PP1DB_DATFIELD_GENRE, // @9: (STR) - PP1DB_DATFIELD_TITLE, // @10: (STR) - PP1DB_DATFIELD_TRACKNUMBER, // @11: (INT) - PP1DB_DATFIELD_YEAR, // @12: (INT) - PP1DB_DATFIELD_FILESIZE, // @13: (INT) - PP1DB_DATFIELD_UNKNOWN4, // @14: (INT) - PP1DB_DATFIELD_UNKNOWN5, // @15: (STR) - PP1DB_DATFIELD_UNKNOWN6, // @16: (STR) - PP1DB_DATFIELD_UNKNOWN7, // @17: (STR) -}; - -void samsung_yh820_dat_repr(const dat_t* record, FILE *fp) -{ - fprintf(fp, " inactive: %d\n", record->status); - fprintf(fp, " unknown1: %d\n", record->unknown1); - fprintf(fp, " unknown2: %d\n", record->fields[PP1DB_DATFIELD_UNKNOWN2].value.dword); - fprints(fp, " file_path: %s\n", record->fields[PP1DB_DATFIELD_PATHNAME].value.str); - fprints(fp, " file_name: %s\n", record->fields[PP1DB_DATFIELD_FILENAME].value.str); - fprintf(fp, " media_type: %d\n", record->fields[PP1DB_DATFIELD_FORMAT].value.dword); - fprintf(fp, " bitrate: %d\n", record->fields[PP1DB_DATFIELD_BITRATE].value.dword); - fprintf(fp, " samplerate: %d\n", record->fields[PP1DB_DATFIELD_SAMPLERATE].value.dword); - fprintf(fp, " duration: %d\n", record->fields[PP1DB_DATFIELD_DURATION].value.dword); - fprints(fp, " artist: %s\n", record->fields[PP1DB_DATFIELD_ARTIST].value.str); - fprints(fp, " album: %s\n", record->fields[PP1DB_DATFIELD_ALBUM].value.str); - fprints(fp, " genre: %s\n", record->fields[PP1DB_DATFIELD_GENRE].value.str); - fprints(fp, " title: %s\n", record->fields[PP1DB_DATFIELD_TITLE].value.str); - fprintf(fp, " number: %d\n", record->fields[PP1DB_DATFIELD_TRACKNUMBER].value.dword); - fprintf(fp, " year: %d\n", record->fields[PP1DB_DATFIELD_YEAR].value.dword); - fprintf(fp, " filesize: %d\n", record->fields[PP1DB_DATFIELD_FILESIZE].value.dword); - fprintf(fp, " unknown4: %d\n", record->fields[PP1DB_DATFIELD_UNKNOWN4].value.dword); - fprints(fp, " unknown5: %s\n", record->fields[PP1DB_DATFIELD_UNKNOWN5].value.str); - fprints(fp, " unknown6: %s\n", record->fields[PP1DB_DATFIELD_UNKNOWN6].value.str); - fprints(fp, " unknown7: %s\n", record->fields[PP1DB_DATFIELD_UNKNOWN7].value.str); -} - -int samsung_yh820_dat_set(dat_t* dst, const pmp_record_t* src, const ucs2char_t* path_to_root) -{ - static const ucs2char_t ucs2cs_unknown[] = {0}; - static const ucs2char_t ucs2cs_empty[] = {0}; - - // Set fields. - dst->status = 0; - dst->unknown1 = 0; - dst->fields[PP1DB_DATFIELD_PATHNAME].value.str = ucs2dup(filepath_skiproot(src->filename, path_to_root)); - filepath_remove_filespec(dst->fields[PP1DB_DATFIELD_PATHNAME].value.str); - filepath_addslash(dst->fields[PP1DB_DATFIELD_PATHNAME].value.str); - filepath_encode(dst->fields[PP1DB_DATFIELD_PATHNAME].value.str); - dst->fields[PP1DB_DATFIELD_FILENAME].value.str = ucs2dup(filepath_skippath(src->filename)); - dst->fields[PP1DB_DATFIELD_FORMAT].value.dword = 0; - dst->fields[PP1DB_DATFIELD_BITRATE].value.dword = src->bitrate; - dst->fields[PP1DB_DATFIELD_SAMPLERATE].value.dword = src->sample_rate; - dst->fields[PP1DB_DATFIELD_DURATION].value.dword = src->duration; - dst->fields[PP1DB_DATFIELD_ARTIST].value.str = ucs2dup(src->artist ? src->artist : ucs2cs_unknown); - dst->fields[PP1DB_DATFIELD_ALBUM].value.str = ucs2dup(src->album ? src->album : ucs2cs_unknown); - dst->fields[PP1DB_DATFIELD_GENRE].value.str = ucs2dup(src->genre ? src->genre : ucs2cs_unknown); - dst->fields[PP1DB_DATFIELD_TITLE].value.str = ucs2dup(src->title ? src->title : dst->fields[PP1DB_DATFIELD_FILENAME].value.str); - dst->fields[PP1DB_DATFIELD_TRACKNUMBER].value.dword = src->track_number; - if (src->date) { - dst->fields[PP1DB_DATFIELD_YEAR].value.dword = ucs2toi(src->date); - } - dst->fields[PP1DB_DATFIELD_FILESIZE].value.dword = src->filesize; - dst->fields[PP1DB_DATFIELD_UNKNOWN4].value.dword = 0; - dst->fields[PP1DB_DATFIELD_UNKNOWN5].value.str = ucs2dup(ucs2cs_empty); - dst->fields[PP1DB_DATFIELD_UNKNOWN6].value.str = ucs2dup(ucs2cs_empty); - dst->fields[PP1DB_DATFIELD_UNKNOWN7].value.str = ucs2dup(ucs2cs_empty); - return 0; -} - -int samsung_yh820_dat_get(pmp_record_t* dst, const dat_t* src, const ucs2char_t* path_to_root) -{ - static const ucs2char_t ucs2cs_mp3[] = {'.','m','p','3',0}; - static const ucs2char_t ucs2cs_wma[] = {'.','w','m','a',0}; - static const ucs2char_t ucs2cs_wav[] = {'.','w','a','v',0}; - ucs2char_t tmp[128]; - size_t length = 0; - - length = ucs2len(path_to_root); - length += ucs2len(src->fields[PP1DB_DATFIELD_PATHNAME].value.str); - length += ucs2len(src->fields[PP1DB_DATFIELD_FILENAME].value.str); - length += 3; - - dst->filename = (ucs2char_t*)ucs2malloc(sizeof(ucs2char_t) * length); - if (dst->filename) { - filepath_combinepath(dst->filename, length, path_to_root, src->fields[PP1DB_DATFIELD_PATHNAME].value.str); - filepath_addslash(dst->filename); - ucs2cat(dst->filename, src->fields[PP1DB_DATFIELD_FILENAME].value.str); - } - - dst->bitrate = src->fields[PP1DB_DATFIELD_BITRATE].value.dword; - dst->sample_rate = src->fields[PP1DB_DATFIELD_SAMPLERATE].value.dword; - dst->duration = ucs2toi(src->fields[PP1DB_DATFIELD_DURATION].value.str); - - dst->artist = ucs2dup(src->fields[PP1DB_DATFIELD_ARTIST].value.str); - dst->album = ucs2dup(src->fields[PP1DB_DATFIELD_ALBUM].value.str); - dst->genre = ucs2dup(src->fields[PP1DB_DATFIELD_GENRE].value.str); - dst->title = ucs2dup(src->fields[PP1DB_DATFIELD_TITLE].value.str); - - // Set codec information according to the file extensions. - if (filepath_hasext(dst->filename, ucs2cs_mp3)) { - dst->codec = PMPCODEC_MPEGLAYER3; - } else if (filepath_hasext(dst->filename, ucs2cs_wma)) { - dst->codec = PMPCODEC_WMA; - } else if (filepath_hasext(dst->filename, ucs2cs_wav)) { - dst->codec = PMPCODEC_WAV; - } - - dst->track_number = src->fields[PP1DB_DATFIELD_TRACKNUMBER].value.dword; - itoucs2(src->fields[PP1DB_DATFIELD_YEAR].value.dword, tmp, 10); - dst->date = ucs2dup(tmp); - dst->filesize = src->fields[PP1DB_DATFIELD_FILESIZE].value.dword; - - return 0; -} - -int samsung_yh820_parse_model(const ucs2char_t* firmware, pp1model_t* model) -{ - FILE *fp = ucs2fopen(firmware, "rb"); - if (fp) { - // We cannot find a way to parse the firmware for now. - strcpy(model->name, "Samsung YH-820"); - strcpy(model->version, "0.0"); - strcpy(model->mode, "UM"); - - fclose(fp); - return 1; - } else { - return 0; - } -} - - - - -static fd_template_t hdrtmpl_fd_yh820[] = { - {0x0000F001, 2, 4, 0, 0, 1, 0, 0, "System\\DATA\\PP...@DE...x"}, - {0x0000F002, 1, 128, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_FPTH.idx"}, - {0x0000F003, 1, 128, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_FNAM.idx"}, - {0x0000F00A, 2, 4, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_FRMT.idx"}, - {0x0000F005, 2, 4, 0, 0, 0, 0, 0, ""}, - {0x0000F006, 2, 4, 0, 0, 0, 0, 0, ""}, - {0x0000F007, 2, 4, 0, 0, 0, 0, 0, ""}, - {0x0000003C, 1, 40, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_TPE1.idx"}, - {0x0000001C, 1, 40, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_TALB.idx"}, - {0x0000001F, 1, 20, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_TCON.idx"}, - {0x0000002E, 1, 40, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_TIT2.idx"}, - {0x00000043, 2, 4, 0, 0, 0, 0, 0, ""}, - {0x0000004E, 2, 4, 0, 0, 0, 0, 0, ""}, - {0x0000F009, 2, 4, 0, 0, 0, 0, 0, ""}, - {0x0000E000, 2, 4, 0, 0, 0, 0, 0, ""}, - {0x0000E001, 1, 40, 0, 0, 0, 0, 0, ""}, - {0x00000083, 1, 10, 0, 0, 0, 0, 0, ""}, - {0x00000084, 1, 64, 0, 0, 0, 0, 0, ""}, -}; - -static uint32_t hdrtmpl_max_dat_field_size_yh820[] = - {8, 12, 268, 524, 528, 532, 536, 540, 620, 700, 740, 820, 824, 828, 832, 836, 916, 936}; - - -/********** Samsung YH-820 firmware 0.0 **********/ -static hdr_template_t hdrtmpl_samsung_yh820 = { - 0, 0, "System\\DATA\\PP5000.DAT", 0, "System\\DATA\\PP5000.HDR", 0x00000428, 0, 0, 18, - hdrtmpl_fd_yh820, - hdrtmpl_max_dat_field_size_yh820, - 0, 0, - {251956, 18, 6000, 1032, 0, samsung_yh820_dat_repr, samsung_yh820_dat_set, samsung_yh820_dat_get}, -}; -int hdr_init_samsung_yh820(hdr_t* hdr) -{ - return apply_template(hdr, &hdrtmpl_samsung_yh820); -} - Modified: trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c =================================================================== --- trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c 2006-05-03 14:42:46 UTC (rev 10) +++ trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c 2006-05-05 09:01:00 UTC (rev 11) @@ -141,13 +141,21 @@ hdr_init_medion_mdjuke440, medion_mdjuke220_parse_model }, { - "samsung_yh820", "Samsung YH820", + "samsung_yh820", "Samsung YH-820", 5, "UM", - "0.0", "0.0", + "3.00", "3.00", "SYSTEM\\FW_YH820.mi4", "System\\DATA\\PP5000.HDR", "System\\MUSIC\\", "System\\PLAYLIST\\", ".plp", - hdr_init_samsung_yh820, samsung_yh820_parse_model + hdr_init_samsung_yh820, samsung_parse_model }, + { + "samsung_yh925", "Samsung YH-925", + 5, "UM", + "1.61", "1.61", + "SYSTEM\\FW_YH925.mi4", "System\\DATA\\PP5000.HDR", "System\\MUSIC\\", "System\\PLAYLIST\\", + ".plp", + hdr_init_samsung_yh925, samsung_parse_model + }, #if 0 { "sirius_s50", "Sirius S50", Modified: trunk/lib/pmp_portalplayer1/pmp_portalplayer1.vcproj =================================================================== --- trunk/lib/pmp_portalplayer1/pmp_portalplayer1.vcproj 2006-05-03 14:42:46 UTC (rev 10) +++ trunk/lib/pmp_portalplayer1/pmp_portalplayer1.vcproj 2006-05-05 09:01:00 UTC (rev 11) @@ -144,7 +144,7 @@ RelativePath=".\model_medion_mdjuke440.c"> </File> <File - RelativePath=".\model_samsung_yh820.c"> + RelativePath=".\model_samsung.c"> </File> <File RelativePath=".\model_sirius_s50.c"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-05-03 14:42:59
|
Revision: 10 Author: nyaochi Date: 2006-05-03 07:42:46 -0700 (Wed, 03 May 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=10&view=rev Log Message: ----------- Attempt to support Samsung YH-820 player. Modified Paths: -------------- trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc trunk/frontend/easypmp/win32gui/processingdlg.h trunk/lib/pmp_portalplayer1/hdr_template.h trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c trunk/lib/pmp_portalplayer1/pmp_portalplayer1.vcproj trunk/lib/pmp_portalplayer1/pp1db.c Added Paths: ----------- trunk/lib/pmp_portalplayer1/model_samsung_yh820.c Modified: trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc =================================================================== --- trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc 2006-04-16 14:47:55 UTC (rev 9) +++ trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc 2006-05-03 14:42:46 UTC (rev 10) @@ -133,8 +133,8 @@ 12 COMBOBOX IDC_COMBO_MEDIAINFO_SOURCE,138,42,102,36, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - CONTROL "Use &JavaScript playlist (JSPL)",IDC_CHECK_PL_JSPL, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,96,120,144,8 + CONTROL "Use &JavaScript playlist",IDC_CHECK_PL_JSPL,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,96,120,144,8 END IDD_PROCESSING DIALOGEX 0, 0, 263, 246 Modified: trunk/frontend/easypmp/win32gui/processingdlg.h =================================================================== --- trunk/frontend/easypmp/win32gui/processingdlg.h 2006-04-16 14:47:55 UTC (rev 9) +++ trunk/frontend/easypmp/win32gui/processingdlg.h 2006-05-03 14:42:46 UTC (rev 10) @@ -227,8 +227,8 @@ pThis->PostMessage(WM_COMMAND, IDNO, 0); } else { // Show [OK] button and wait for [OK]/[CANCEL] button to be pushed + ::ShowWindow(pThis->GetDlgItem(IDC_CHECK_DONT_CLOSE), SW_HIDE); ::ShowWindow(pThis->GetDlgItem(IDOK), SW_SHOW); - ::ShowWindow(pThis->GetDlgItem(IDC_CHECK_DONT_CLOSE), SW_HIDE); ::EnableWindow(pThis->GetDlgItem(IDCANCEL), TRUE); } Modified: trunk/lib/pmp_portalplayer1/hdr_template.h =================================================================== --- trunk/lib/pmp_portalplayer1/hdr_template.h 2006-04-16 14:47:55 UTC (rev 9) +++ trunk/lib/pmp_portalplayer1/hdr_template.h 2006-05-03 14:42:46 UTC (rev 10) @@ -66,9 +66,11 @@ int hdr_init_h10_20gb_mtp_0251(hdr_t* hdr); int hdr_init_medion_mdjuke220(hdr_t* hdr); int hdr_init_medion_mdjuke440(hdr_t* hdr); +int hdr_init_samsung_yh820(hdr_t* hdr); int hdr_init_sirius_s50(hdr_t* hdr); int iriver_h10_parse_model(const ucs2char_t* firmware, pp1model_t* model); int medion_mdjuke220_parse_model(const ucs2char_t* firmware, pp1model_t* model); +int samsung_yh820_parse_model(const ucs2char_t* firmware, pp1model_t* model); #endif/*__HDR_TEMPLATE_H__*/ Added: trunk/lib/pmp_portalplayer1/model_samsung_yh820.c =================================================================== --- trunk/lib/pmp_portalplayer1/model_samsung_yh820.c (rev 0) +++ trunk/lib/pmp_portalplayer1/model_samsung_yh820.c 2006-05-03 14:42:46 UTC (rev 10) @@ -0,0 +1,219 @@ +/* + * Samsung YH-820 specific routines and header templates. + * + * Copyright (c) 2005-2006 Nyaochi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/* $Id: model_medion_mdjuke440.c 5 2006-03-31 05:41:31Z nyaochi $ */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif/*HAVE_CONFIG_H*/ + +#include <os.h> +#include <stdio.h> +#include <stdlib.h> +#include <ucs2char.h> +#include <filepath.h> + +#include "serialize.h" +#include "util.h" +#include "pp1db.h" +#include "hdr_template.h" + +enum { + PP1DB_DATFIELD_UNKNOWN2 = 0,// @0: (INT) + PP1DB_DATFIELD_PATHNAME, // @1: (STR) + PP1DB_DATFIELD_FILENAME, // @2: (STR) + PP1DB_DATFIELD_FORMAT, // @3: (INT) + PP1DB_DATFIELD_BITRATE, // @4: (INT) + PP1DB_DATFIELD_SAMPLERATE, // @5: (INT) + PP1DB_DATFIELD_DURATION, // @6: (INT) + PP1DB_DATFIELD_ARTIST, // @7: (STR) + PP1DB_DATFIELD_ALBUM, // @8: (STR) + PP1DB_DATFIELD_GENRE, // @9: (STR) + PP1DB_DATFIELD_TITLE, // @10: (STR) + PP1DB_DATFIELD_TRACKNUMBER, // @11: (INT) + PP1DB_DATFIELD_YEAR, // @12: (INT) + PP1DB_DATFIELD_FILESIZE, // @13: (INT) + PP1DB_DATFIELD_UNKNOWN4, // @14: (INT) + PP1DB_DATFIELD_UNKNOWN5, // @15: (STR) + PP1DB_DATFIELD_UNKNOWN6, // @16: (STR) + PP1DB_DATFIELD_UNKNOWN7, // @17: (STR) +}; + +void samsung_yh820_dat_repr(const dat_t* record, FILE *fp) +{ + fprintf(fp, " inactive: %d\n", record->status); + fprintf(fp, " unknown1: %d\n", record->unknown1); + fprintf(fp, " unknown2: %d\n", record->fields[PP1DB_DATFIELD_UNKNOWN2].value.dword); + fprints(fp, " file_path: %s\n", record->fields[PP1DB_DATFIELD_PATHNAME].value.str); + fprints(fp, " file_name: %s\n", record->fields[PP1DB_DATFIELD_FILENAME].value.str); + fprintf(fp, " media_type: %d\n", record->fields[PP1DB_DATFIELD_FORMAT].value.dword); + fprintf(fp, " bitrate: %d\n", record->fields[PP1DB_DATFIELD_BITRATE].value.dword); + fprintf(fp, " samplerate: %d\n", record->fields[PP1DB_DATFIELD_SAMPLERATE].value.dword); + fprintf(fp, " duration: %d\n", record->fields[PP1DB_DATFIELD_DURATION].value.dword); + fprints(fp, " artist: %s\n", record->fields[PP1DB_DATFIELD_ARTIST].value.str); + fprints(fp, " album: %s\n", record->fields[PP1DB_DATFIELD_ALBUM].value.str); + fprints(fp, " genre: %s\n", record->fields[PP1DB_DATFIELD_GENRE].value.str); + fprints(fp, " title: %s\n", record->fields[PP1DB_DATFIELD_TITLE].value.str); + fprintf(fp, " number: %d\n", record->fields[PP1DB_DATFIELD_TRACKNUMBER].value.dword); + fprintf(fp, " year: %d\n", record->fields[PP1DB_DATFIELD_YEAR].value.dword); + fprintf(fp, " filesize: %d\n", record->fields[PP1DB_DATFIELD_FILESIZE].value.dword); + fprintf(fp, " unknown4: %d\n", record->fields[PP1DB_DATFIELD_UNKNOWN4].value.dword); + fprints(fp, " unknown5: %s\n", record->fields[PP1DB_DATFIELD_UNKNOWN5].value.str); + fprints(fp, " unknown6: %s\n", record->fields[PP1DB_DATFIELD_UNKNOWN6].value.str); + fprints(fp, " unknown7: %s\n", record->fields[PP1DB_DATFIELD_UNKNOWN7].value.str); +} + +int samsung_yh820_dat_set(dat_t* dst, const pmp_record_t* src, const ucs2char_t* path_to_root) +{ + static const ucs2char_t ucs2cs_unknown[] = {0}; + static const ucs2char_t ucs2cs_empty[] = {0}; + + // Set fields. + dst->status = 0; + dst->unknown1 = 0; + dst->fields[PP1DB_DATFIELD_PATHNAME].value.str = ucs2dup(filepath_skiproot(src->filename, path_to_root)); + filepath_remove_filespec(dst->fields[PP1DB_DATFIELD_PATHNAME].value.str); + filepath_addslash(dst->fields[PP1DB_DATFIELD_PATHNAME].value.str); + filepath_encode(dst->fields[PP1DB_DATFIELD_PATHNAME].value.str); + dst->fields[PP1DB_DATFIELD_FILENAME].value.str = ucs2dup(filepath_skippath(src->filename)); + dst->fields[PP1DB_DATFIELD_FORMAT].value.dword = 0; + dst->fields[PP1DB_DATFIELD_BITRATE].value.dword = src->bitrate; + dst->fields[PP1DB_DATFIELD_SAMPLERATE].value.dword = src->sample_rate; + dst->fields[PP1DB_DATFIELD_DURATION].value.dword = src->duration; + dst->fields[PP1DB_DATFIELD_ARTIST].value.str = ucs2dup(src->artist ? src->artist : ucs2cs_unknown); + dst->fields[PP1DB_DATFIELD_ALBUM].value.str = ucs2dup(src->album ? src->album : ucs2cs_unknown); + dst->fields[PP1DB_DATFIELD_GENRE].value.str = ucs2dup(src->genre ? src->genre : ucs2cs_unknown); + dst->fields[PP1DB_DATFIELD_TITLE].value.str = ucs2dup(src->title ? src->title : dst->fields[PP1DB_DATFIELD_FILENAME].value.str); + dst->fields[PP1DB_DATFIELD_TRACKNUMBER].value.dword = src->track_number; + if (src->date) { + dst->fields[PP1DB_DATFIELD_YEAR].value.dword = ucs2toi(src->date); + } + dst->fields[PP1DB_DATFIELD_FILESIZE].value.dword = src->filesize; + dst->fields[PP1DB_DATFIELD_UNKNOWN4].value.dword = 0; + dst->fields[PP1DB_DATFIELD_UNKNOWN5].value.str = ucs2dup(ucs2cs_empty); + dst->fields[PP1DB_DATFIELD_UNKNOWN6].value.str = ucs2dup(ucs2cs_empty); + dst->fields[PP1DB_DATFIELD_UNKNOWN7].value.str = ucs2dup(ucs2cs_empty); + return 0; +} + +int samsung_yh820_dat_get(pmp_record_t* dst, const dat_t* src, const ucs2char_t* path_to_root) +{ + static const ucs2char_t ucs2cs_mp3[] = {'.','m','p','3',0}; + static const ucs2char_t ucs2cs_wma[] = {'.','w','m','a',0}; + static const ucs2char_t ucs2cs_wav[] = {'.','w','a','v',0}; + ucs2char_t tmp[128]; + size_t length = 0; + + length = ucs2len(path_to_root); + length += ucs2len(src->fields[PP1DB_DATFIELD_PATHNAME].value.str); + length += ucs2len(src->fields[PP1DB_DATFIELD_FILENAME].value.str); + length += 3; + + dst->filename = (ucs2char_t*)ucs2malloc(sizeof(ucs2char_t) * length); + if (dst->filename) { + filepath_combinepath(dst->filename, length, path_to_root, src->fields[PP1DB_DATFIELD_PATHNAME].value.str); + filepath_addslash(dst->filename); + ucs2cat(dst->filename, src->fields[PP1DB_DATFIELD_FILENAME].value.str); + } + + dst->bitrate = src->fields[PP1DB_DATFIELD_BITRATE].value.dword; + dst->sample_rate = src->fields[PP1DB_DATFIELD_SAMPLERATE].value.dword; + dst->duration = ucs2toi(src->fields[PP1DB_DATFIELD_DURATION].value.str); + + dst->artist = ucs2dup(src->fields[PP1DB_DATFIELD_ARTIST].value.str); + dst->album = ucs2dup(src->fields[PP1DB_DATFIELD_ALBUM].value.str); + dst->genre = ucs2dup(src->fields[PP1DB_DATFIELD_GENRE].value.str); + dst->title = ucs2dup(src->fields[PP1DB_DATFIELD_TITLE].value.str); + + // Set codec information according to the file extensions. + if (filepath_hasext(dst->filename, ucs2cs_mp3)) { + dst->codec = PMPCODEC_MPEGLAYER3; + } else if (filepath_hasext(dst->filename, ucs2cs_wma)) { + dst->codec = PMPCODEC_WMA; + } else if (filepath_hasext(dst->filename, ucs2cs_wav)) { + dst->codec = PMPCODEC_WAV; + } + + dst->track_number = src->fields[PP1DB_DATFIELD_TRACKNUMBER].value.dword; + itoucs2(src->fields[PP1DB_DATFIELD_YEAR].value.dword, tmp, 10); + dst->date = ucs2dup(tmp); + dst->filesize = src->fields[PP1DB_DATFIELD_FILESIZE].value.dword; + + return 0; +} + +int samsung_yh820_parse_model(const ucs2char_t* firmware, pp1model_t* model) +{ + FILE *fp = ucs2fopen(firmware, "rb"); + if (fp) { + // We cannot find a way to parse the firmware for now. + strcpy(model->name, "Samsung YH-820"); + strcpy(model->version, "0.0"); + strcpy(model->mode, "UM"); + + fclose(fp); + return 1; + } else { + return 0; + } +} + + + + +static fd_template_t hdrtmpl_fd_yh820[] = { + {0x0000F001, 2, 4, 0, 0, 1, 0, 0, "System\\DATA\\PP...@DE...x"}, + {0x0000F002, 1, 128, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_FPTH.idx"}, + {0x0000F003, 1, 128, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_FNAM.idx"}, + {0x0000F00A, 2, 4, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_FRMT.idx"}, + {0x0000F005, 2, 4, 0, 0, 0, 0, 0, ""}, + {0x0000F006, 2, 4, 0, 0, 0, 0, 0, ""}, + {0x0000F007, 2, 4, 0, 0, 0, 0, 0, ""}, + {0x0000003C, 1, 40, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_TPE1.idx"}, + {0x0000001C, 1, 40, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_TALB.idx"}, + {0x0000001F, 1, 20, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_TCON.idx"}, + {0x0000002E, 1, 40, 0, 0, 1, 0, 0, "System\\DATA\\PP5000_TIT2.idx"}, + {0x00000043, 2, 4, 0, 0, 0, 0, 0, ""}, + {0x0000004E, 2, 4, 0, 0, 0, 0, 0, ""}, + {0x0000F009, 2, 4, 0, 0, 0, 0, 0, ""}, + {0x0000E000, 2, 4, 0, 0, 0, 0, 0, ""}, + {0x0000E001, 1, 40, 0, 0, 0, 0, 0, ""}, + {0x00000083, 1, 10, 0, 0, 0, 0, 0, ""}, + {0x00000084, 1, 64, 0, 0, 0, 0, 0, ""}, +}; + +static uint32_t hdrtmpl_max_dat_field_size_yh820[] = + {8, 12, 268, 524, 528, 532, 536, 540, 620, 700, 740, 820, 824, 828, 832, 836, 916, 936}; + + +/********** Samsung YH-820 firmware 0.0 **********/ +static hdr_template_t hdrtmpl_samsung_yh820 = { + 0, 0, "System\\DATA\\PP5000.DAT", 0, "System\\DATA\\PP5000.HDR", 0x00000428, 0, 0, 18, + hdrtmpl_fd_yh820, + hdrtmpl_max_dat_field_size_yh820, + 0, 0, + {251956, 18, 6000, 1032, 0, samsung_yh820_dat_repr, samsung_yh820_dat_set, samsung_yh820_dat_get}, +}; +int hdr_init_samsung_yh820(hdr_t* hdr) +{ + return apply_template(hdr, &hdrtmpl_samsung_yh820); +} + Modified: trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c =================================================================== --- trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c 2006-04-16 14:47:55 UTC (rev 9) +++ trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c 2006-05-03 14:42:46 UTC (rev 10) @@ -140,6 +140,14 @@ ".pla", hdr_init_medion_mdjuke440, medion_mdjuke220_parse_model }, + { + "samsung_yh820", "Samsung YH820", + 5, "UM", + "0.0", "0.0", + "SYSTEM\\FW_YH820.mi4", "System\\DATA\\PP5000.HDR", "System\\MUSIC\\", "System\\PLAYLIST\\", + ".plp", + hdr_init_samsung_yh820, samsung_yh820_parse_model + }, #if 0 { "sirius_s50", "Sirius S50", Modified: trunk/lib/pmp_portalplayer1/pmp_portalplayer1.vcproj =================================================================== --- trunk/lib/pmp_portalplayer1/pmp_portalplayer1.vcproj 2006-04-16 14:47:55 UTC (rev 9) +++ trunk/lib/pmp_portalplayer1/pmp_portalplayer1.vcproj 2006-05-03 14:42:46 UTC (rev 10) @@ -144,6 +144,9 @@ RelativePath=".\model_medion_mdjuke440.c"> </File> <File + RelativePath=".\model_samsung_yh820.c"> + </File> + <File RelativePath=".\model_sirius_s50.c"> </File> <File Modified: trunk/lib/pmp_portalplayer1/pp1db.c =================================================================== --- trunk/lib/pmp_portalplayer1/pp1db.c 2006-04-16 14:47:55 UTC (rev 9) +++ trunk/lib/pmp_portalplayer1/pp1db.c 2006-05-03 14:42:46 UTC (rev 10) @@ -115,6 +115,7 @@ #if 0 /* For analyzing a new (unknown) player. */ hdr_repr(db->hdr, stdout); fflush(stdout); + return 0; #endif // Read dat. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-04-16 14:48:43
|
Revision: 9 Author: nyaochi Date: 2006-04-16 07:47:55 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=9&view=rev Log Message: ----------- Added an option to enable JSPL. Read the media database automatically when JSPL is enabled. Modified Paths: -------------- trunk/frontend/easypmp/common/database.c trunk/frontend/easypmp/common/easypmp.h trunk/frontend/easypmp/common/enumerate.c trunk/frontend/easypmp/common/playlist.c trunk/frontend/easypmp/cui/main.c trunk/frontend/easypmp/cui/option.c trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc trunk/frontend/easypmp/win32gui/maindlg.h trunk/frontend/easypmp/win32gui/preference.h trunk/frontend/easypmp/win32gui/processingdlg.h trunk/frontend/easypmp/win32gui/resource.h trunk/include/playlist.h trunk/lib/playlist/playlist.c Modified: trunk/frontend/easypmp/common/database.c =================================================================== --- trunk/frontend/easypmp/common/database.c 2006-04-05 13:57:51 UTC (rev 8) +++ trunk/frontend/easypmp/common/database.c 2006-04-16 14:47:55 UTC (rev 9) @@ -115,60 +115,8 @@ * Read the existing database for update processing mode. */ if (opt->verb & MODE_DATABASE_UPDATE) { - // Create a database engine. - res = pmp->create_instance_db(pmp, &pmpdb); - if (!pmpdb) { - result = MAKE_PMP_ERROR(res); - goto error_exit; - } - - // Start reading a database. - if (progress(instance, EASYPMPDBP_READ | EASYPMPSP_START, 0, 0, NULL) != 0) { - result = EASYPMPE_CANCEL; - goto error_exit; - } - - // Read the existing database. - res = pmpdb->read(pmpdb); - if (res != 0) { - result = MAKE_PMP_ERROR(res); - goto error_exit; - } - - // Obtain the number of records in the database. - res = pmpdb->get(pmpdb, NULL, &num_old_records); - if (res != 0) { - result = MAKE_PMP_ERROR(res); - goto error_exit; - } - - // Allocate an array for the records. - old_records = malloc(sizeof(pmp_record_t) * num_old_records); - if (!old_records) { - result = EASYPMPE_INSUFFICIENT_MEMORY; - goto error_exit; - } - - // Obtain the records from the database. - res = pmpdb->get(pmpdb, old_records, &num_old_records); - if (res != 0) { - result = MAKE_PMP_ERROR(res); - goto error_exit; - } - - // Sort the records for binary search. - qsort(old_records, num_old_records, sizeof(pmp_record_t), comp_filename); - - // Release the database instance. - if (pmpdb) { - pmpdb->release(pmpdb); - pmpdb = NULL; - } - - if (progress(instance, EASYPMPDBP_READ | EASYPMPSP_END, num_old_records, 0, NULL) != 0) { - result = EASYPMPE_CANCEL; - goto error_exit; - } + // + easypmp_database_read(pmp, opt, &old_records, &num_old_records, progress, instance); } else { if (progress(instance, EASYPMPDBP_READ | EASYPMPSP_SKIPPED, 0, 0, NULL) != 0) { result = EASYPMPE_CANCEL; @@ -319,6 +267,98 @@ return result; } + + +int +easypmp_database_read( + pmp_t* pmp, + const option_t* opt, + pmp_record_t** ptr_records, + uint32_t* ptr_num_records, + easypmp_progress_t progress, + void *instance +) +{ + int result = 0; + result_t res = 0; + pmpdb_t* pmpdb = NULL; + + /* + * Read the existing database for update processing mode. + */ + // Create a database engine. + res = pmp->create_instance_db(pmp, &pmpdb); + if (!pmpdb) { + result = MAKE_PMP_ERROR(res); + goto error_exit; + } + + // Start reading a database. + if (progress(instance, EASYPMPDBP_READ | EASYPMPSP_START, 0, 0, NULL) != 0) { + result = EASYPMPE_CANCEL; + goto error_exit; + } + + // Read the existing database. + res = pmpdb->read(pmpdb); + if (res != 0) { + result = MAKE_PMP_ERROR(res); + goto error_exit; + } + + // Obtain the number of records in the database. + res = pmpdb->get(pmpdb, NULL, ptr_num_records); + if (res != 0) { + result = MAKE_PMP_ERROR(res); + goto error_exit; + } + + // Allocate an array for the records. + (*ptr_records) = malloc(sizeof(pmp_record_t) * (*ptr_num_records)); + if (!(*ptr_records)) { + result = EASYPMPE_INSUFFICIENT_MEMORY; + goto error_exit; + } + + // Obtain the records from the database. + res = pmpdb->get(pmpdb, *ptr_records, ptr_num_records); + if (res != 0) { + result = MAKE_PMP_ERROR(res); + goto error_exit; + } + + // Sort the records for binary search. + qsort(*ptr_records, *ptr_num_records, sizeof(pmp_record_t), comp_filename); + + // Release the database instance. + if (pmpdb) { + pmpdb->release(pmpdb); + pmpdb = NULL; + } + + if (progress(instance, EASYPMPDBP_READ | EASYPMPSP_END, *ptr_num_records, 0, NULL) != 0) { + result = EASYPMPE_CANCEL; + goto error_exit; + } + + return result; + +error_exit: + /* + * Free allocated memory. + */ + if ((*ptr_records)) { + uint32_t i; + for (i = 0;i < *ptr_num_records;++i) { + pmp_record_finish(&((*ptr_records)[i])); + } + free((*ptr_records)); + } + return result; +} + + + int database_dump(pmp_t* pmp, FILE *fp, int level) { pmpdb_t* pmpdb = NULL; Modified: trunk/frontend/easypmp/common/easypmp.h =================================================================== --- trunk/frontend/easypmp/common/easypmp.h 2006-04-05 13:57:51 UTC (rev 8) +++ trunk/frontend/easypmp/common/easypmp.h 2006-04-16 14:47:55 UTC (rev 9) @@ -74,6 +74,7 @@ MODE_PLAYLIST_RECONVERT = 0x00000100, MODE_PLAYLIST_FIND = 0x00000200, MODE_PLAYLIST_SKIP = 0x00000400, + MODE_PLAYLIST_JSPL = 0x00000800, MODE_LIST_DEVICES = 0x00001000, MODE_HELP = 0x00010000, MODE_VERSION = 0x00020000, @@ -140,6 +141,16 @@ ); int +easypmp_database_read( + pmp_t* pmp, + const option_t* opt, + pmp_record_t** ptr_records, + uint32_t* ptr_num_records, + easypmp_progress_t progress, + void *instance +); + +int easypmp_playlist( const easypmp_filelist_t* playlists, const easypmp_filelist_t* musics, Modified: trunk/frontend/easypmp/common/enumerate.c =================================================================== --- trunk/frontend/easypmp/common/enumerate.c 2006-04-05 13:57:51 UTC (rev 8) +++ trunk/frontend/easypmp/common/enumerate.c 2006-04-16 14:47:55 UTC (rev 9) @@ -37,6 +37,7 @@ #include <easypmp.h> typedef struct { + const option_t* opt; easypmp_filelist_t* fl; pmp_t* pmp; easypmp_enumerate_progress_t proc; @@ -94,6 +95,7 @@ fl->elements = NULL; memset(&ed, 0, sizeof(ed)); + ed.opt = opt; ed.fl = fl; ed.pmp = pmp; ed.proc = proc; @@ -107,8 +109,9 @@ enumerate_dat_t* ed = (enumerate_dat_t*)instance; pmp_t* pmp = ed->pmp; easypmp_filelist_t* fl = ed->fl; + int flag = (ed->opt->verb & MODE_PLAYLIST_JSPL) ? PLAYLIST_JSPL : 0; - if (playlist_is_supported(found_file)) { + if (playlist_is_supported(found_file, flag)) { // Supported music file. easypmp_filename_t* new_filename = NULL; @@ -154,6 +157,7 @@ fl->elements = NULL; memset(&ed, 0, sizeof(ed)); + ed.opt = opt; ed.fl = fl; ed.pmp = pmp; ed.proc = proc; Modified: trunk/frontend/easypmp/common/playlist.c =================================================================== --- trunk/frontend/easypmp/common/playlist.c 2006-04-05 13:57:51 UTC (rev 8) +++ trunk/frontend/easypmp/common/playlist.c 2006-04-16 14:47:55 UTC (rev 9) @@ -106,7 +106,7 @@ playlist_normalize_prepare(mediafiles, musics->num_elements); // Start playlist conversion. - if (progress(instance, EASYPMPPLP_CONVERT | EASYPMPSP_START, musics->num_elements, 0, NULL) != 0) { + if (progress(instance, EASYPMPPLP_CONVERT | EASYPMPSP_START, playlists->num_elements, 0, NULL) != 0) { result = EASYPMPE_CANCEL; goto error_exit; } @@ -128,10 +128,19 @@ goto error_exit; } - // Read the source playlist + // Initialize playlist(s) instance. playlist_init(&pls); - if (playlist_read(&pls, src, opt->path_to_include, records, num_records, callback_from_playlist, &cd) != 0) { + // Read the source playlist. + if (playlist_read( + &pls, + src, + opt->path_to_include, + opt->verb & MODE_PLAYLIST_JSPL ? records : NULL, + num_records, + callback_from_playlist, + &cd + ) != 0) { result = EASYPMPE_PLAYLIST_READ; goto error_exit; } Modified: trunk/frontend/easypmp/cui/main.c =================================================================== --- trunk/frontend/easypmp/cui/main.c 2006-04-05 13:57:51 UTC (rev 8) +++ trunk/frontend/easypmp/cui/main.c 2006-04-16 14:47:55 UTC (rev 9) @@ -306,6 +306,10 @@ easypmp_database(&musics, pmp, &opt, &records, &num_records, easypmp_progress, NULL); } if (opt.verb & MODE_PLAYLIST) { + // Read the database for JSPL. + if ((opt.verb & MODE_PLAYLIST_JSPL) && (!records)) { + easypmp_database_read(pmp, &opt, &records, &num_records, easypmp_progress, NULL); + } easypmp_playlist(&playlists, &musics, pmp, &opt, records, num_records, easypmp_progress, NULL); } if (opt.verb & MODE_DATABASE_REPR) { Modified: trunk/frontend/easypmp/cui/option.c =================================================================== --- trunk/frontend/easypmp/cui/option.c 2006-04-05 13:57:51 UTC (rev 8) +++ trunk/frontend/easypmp/cui/option.c 2006-04-16 14:47:55 UTC (rev 9) @@ -74,6 +74,7 @@ fprintf(fp, " -r, --reconvert Discard the existing playlist files and reconvert\n"); fprintf(fp, " -f, --find-missing Correct playlists with corrupt references to media files\n"); fprintf(fp, " -s, --skip-missing Continue a conversion even if a media file is missing\n"); + fprintf(fp, " -j, --jspl Enable JavaScript playlist (JSPL)\n"); fprintf(fp, "\n"); fprintf(fp, "Player options:\n"); fprintf(fp, " -L, --list-device Show the list of supported devices and exit\n"); @@ -126,6 +127,7 @@ {"reconvert", no_argument, 0, 'r'}, {"find-missing", no_argument, 0, 'f'}, {"skip-missing", no_argument, 0, 's'}, + {"jspl", no_argument, 0, 'j'}, {"list-device", no_argument, 0, 'L'}, {"device", required_argument, 0, 'd'}, #ifndef _WIN32 @@ -137,9 +139,9 @@ {NULL, 0, 0, 0} }; #ifndef _WIN32 - int c = getopt_long(argc, argv, "DuzRl:PMrfsLd:e:w:Vh", long_options, &option_index); + int c = getopt_long(argc, argv, "DuzRl:PMrfsjLd:e:w:Vh", long_options, &option_index); #else - int c = getopt_long(argc, argv, "DuzRl:PMrfsLd:Vh", long_options, &option_index); + int c = getopt_long(argc, argv, "DuzRl:PMrfsjLd:Vh", long_options, &option_index); #endif/*_WIN32*/ if (c == -1) { break; @@ -188,6 +190,9 @@ case 's': opt->verb |= MODE_PLAYLIST_SKIP; break; + case 'j': + opt->verb |= MODE_PLAYLIST_JSPL; + break; case 'L': opt->verb |= MODE_LIST_DEVICES; break; Modified: trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc =================================================================== --- trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc 2006-04-05 13:57:51 UTC (rev 8) +++ trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc 2006-04-16 14:47:55 UTC (rev 9) @@ -84,73 +84,75 @@ // Dialog // -IDD_PREFERENCE DIALOGEX 0, 0, 263, 234 +IDD_PREFERENCE DIALOGEX 0, 0, 263, 246 STYLE DS_SETFONT | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU CAPTION "EasyPMP [Win32 GUI]" FONT 8, "MS Shell Dlg", 400, 0, 0x80 BEGIN - DEFPUSHBUTTON "OK",IDOK,144,210,48,12 - PUSHBUTTON "Cancel",IDCANCEL,204,210,48,12 + DEFPUSHBUTTON "OK",IDOK,144,222,48,12 + PUSHBUTTON "Cancel",IDCANCEL,204,222,48,12 GROUPBOX "Media database",IDC_STATIC,12,12,240,48 CONTROL "&None",IDC_RADIO_DATABASE,"Button",BS_AUTORADIOBUTTON | - WS_GROUP,24,25,72,8 - CONTROL "&Update",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,96,25, + WS_GROUP,24,24,72,8 + CONTROL "&Update",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,96,24, 72,8 - CONTROL "&Rebuild",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,168,25, + CONTROL "&Rebuild",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,168,24, 72,8 - GROUPBOX "Playlist conversion",IDC_STATIC,12,66,240,59 + GROUPBOX "Playlist conversion",IDC_STATIC,12,66,240,72 CONTROL "N&one",IDC_RADIO_PLAYLIST,"Button",BS_AUTORADIOBUTTON | - WS_GROUP,24,79,72,8 - CONTROL "&Update",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,96,79, + WS_GROUP,24,78,72,8 + CONTROL "&Update",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON,96,78, 72,8 CONTROL "Re&convert",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON,168, - 79,72,8 - LTEXT "Playlist folder(s):",IDC_STATIC,24,95,72,8 + 78,72,8 + LTEXT "Playlist folder(s):",IDC_STATIC,24,96,72,8 CONTROL "&Music",IDC_CHECK_PL_MUSIC,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,96,95,72,8 + WS_TABSTOP,96,96,72,8 CONTROL "&Playlist",IDC_CHECK_PL_PLAYLIST,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,168,95,72,8 - LTEXT "Conversion option:",IDC_STATIC,24,106,72,8 + BS_AUTOCHECKBOX | WS_TABSTOP,168,96,72,8 + LTEXT "Conversion option:",IDC_STATIC,24,108,72,8 CONTROL "&Find missing",IDC_CHECK_PL_FIND,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,96,106,72,8 + BS_AUTOCHECKBOX | WS_TABSTOP,96,108,72,8 CONTROL "&Skip missing",IDC_CHECK_PL_SKIP,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,168,106,72,8 - GROUPBOX "Portable Player Device",IDC_STATIC,12,130,240,72 - LTEXT "&Location:",IDC_STATIC,24,143,42,12,SS_CENTERIMAGE - COMBOBOX IDC_COMBO_DEVICE_LOCATION,78,143,42,36,CBS_DROPDOWNLIST | + BS_AUTOCHECKBOX | WS_TABSTOP,168,108,72,8 + GROUPBOX "Portable Player Device",IDC_STATIC,12,144,240,72 + LTEXT "&Location:",IDC_STATIC,24,156,42,12,SS_CENTERIMAGE + COMBOBOX IDC_COMBO_DEVICE_LOCATION,78,156,42,36,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT "&Identifier:",IDC_STATIC,24,162,42,12,SS_CENTERIMAGE - COMBOBOX IDC_COMBO_DEVICE_ID,78,162,162,36,CBS_DROPDOWNLIST | + LTEXT "&Identifier:",IDC_STATIC,24,174,42,12,SS_CENTERIMAGE + COMBOBOX IDC_COMBO_DEVICE_ID,78,174,162,36,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT "Description:",IDC_STATIC,24,180,42,12,SS_CENTERIMAGE + LTEXT "Description:",IDC_STATIC,24,192,42,12,SS_CENTERIMAGE CONTROL "E&ject the player on completion",IDC_CHECK_SAFEREMOVE, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,210,120,12 - LTEXT "\x83X\x83^\x83e\x83B\x83b\x83N",IDC_STATIC_PLAYER_DESCRIPTION,78,178,162, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,222,120,12 + LTEXT "\x83X\x83^\x83e\x83B\x83b\x83N",IDC_STATIC_PLAYER_DESCRIPTION,78,192,162, 12,0,WS_EX_CLIENTEDGE CONTROL "Sa&ve log",IDC_CHECK_SAVE_LOG,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,168,143,66,12 + WS_TABSTOP,168,156,66,12 LTEXT "Source of media information (&z):",IDC_STATIC,24,42,108, 12 COMBOBOX IDC_COMBO_MEDIAINFO_SOURCE,138,42,102,36, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + CONTROL "Use &JavaScript playlist (JSPL)",IDC_CHECK_PL_JSPL, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,96,120,144,8 END -IDD_PROCESSING DIALOGEX 0, 0, 263, 234 +IDD_PROCESSING DIALOGEX 0, 0, 263, 246 STYLE DS_SETFONT | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU CAPTION "EasyPMP [Win32 GUI]" FONT 8, "MS Shell Dlg", 400, 0, 0x80 BEGIN - DEFPUSHBUTTON "OK",IDOK,144,210,48,12,NOT WS_VISIBLE - PUSHBUTTON "Cancel",IDCANCEL,204,210,48,12 + DEFPUSHBUTTON "OK",IDOK,144,222,48,12,NOT WS_VISIBLE + PUSHBUTTON "Cancel",IDCANCEL,204,222,48,12 CONTROL "",IDC_LIST_PROGRESS,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | - WS_BORDER,12,12,240,78 - EDITTEXT IDC_EDIT_LOG,12,90,240,114,ES_MULTILINE | ES_AUTOHSCROLL | + WS_BORDER,12,12,240,84 + EDITTEXT IDC_EDIT_LOG,12,96,240,120,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL | WS_HSCROLL CONTROL "E&ject the player on completion",IDC_CHECK_SAFEREMOVE, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,210,120,12 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,222,120,12 CONTROL "Don't &close",IDC_CHECK_DONT_CLOSE,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,144,210,48,12 + BS_AUTOCHECKBOX | WS_TABSTOP,144,222,48,12 END @@ -167,7 +169,7 @@ LEFTMARGIN, 7 RIGHTMARGIN, 256 TOPMARGIN, 7 - BOTTOMMARGIN, 227 + BOTTOMMARGIN, 239 END IDD_PROCESSING, DIALOG @@ -175,7 +177,7 @@ LEFTMARGIN, 7 RIGHTMARGIN, 256 TOPMARGIN, 7 - BOTTOMMARGIN, 227 + BOTTOMMARGIN, 239 END END #endif // APSTUDIO_INVOKED Modified: trunk/frontend/easypmp/win32gui/maindlg.h =================================================================== --- trunk/frontend/easypmp/win32gui/maindlg.h 2006-04-05 13:57:51 UTC (rev 8) +++ trunk/frontend/easypmp/win32gui/maindlg.h 2006-04-16 14:47:55 UTC (rev 9) @@ -70,6 +70,7 @@ DDX_CHECK(IDC_CHECK_PL_MUSIC, m_setting.bConvertInMusic) DDX_CHECK(IDC_CHECK_PL_FIND, m_setting.bSearchMissing) DDX_CHECK(IDC_CHECK_PL_SKIP, m_setting.bSkipMissing) + DDX_CHECK(IDC_CHECK_PL_JSPL, m_setting.bJSPL) DDX_CHECK(IDC_CHECK_SAVE_LOG, m_setting.bSaveLog) DDX_CHECK(IDC_CHECK_SAFEREMOVE, m_setting.bSafelyRemove) END_DDX_MAP() Modified: trunk/frontend/easypmp/win32gui/preference.h =================================================================== --- trunk/frontend/easypmp/win32gui/preference.h 2006-04-05 13:57:51 UTC (rev 8) +++ trunk/frontend/easypmp/win32gui/preference.h 2006-04-16 14:47:55 UTC (rev 9) @@ -33,6 +33,7 @@ BOOL bConvertInMusic; BOOL bSearchMissing; BOOL bSkipMissing; + BOOL bJSPL; CString strPlayerLocation; CString strPlayerIdentifier; CString strPlayerDescription; @@ -50,6 +51,7 @@ bConvertInMusic = TRUE; bSearchMissing = TRUE; bSkipMissing = FALSE; + bJSPL = FALSE; strPlayerLocation = _T(""); // Initialize empty. strPlayerIdentifier = _T(""); // Initialize empty. strPlayerDescription = _T(""); // Initialize empty. @@ -100,6 +102,7 @@ persistBool(bConvertInMusic, _T("Playlist"), _T("ConvertMusic"), szSettingFile, storing); persistBool(bSearchMissing, _T("Playlist"), _T("SearchMissing"), szSettingFile, storing); persistBool(bSkipMissing, _T("Playlist"), _T("SkipMissing"), szSettingFile, storing); + persistBool(bJSPL, _T("Playlist"), _T("JSPL"), szSettingFile, storing); persistString(strPlayerLocation, _T("Player"), _T("Location"), szSettingFile, storing); persistString(strPlayerIdentifier, _T("Player"), _T("Identifier"), szSettingFile, storing); persistBool(bSafelyRemove, _T("General"), _T("SafelyRemove"), szSettingFile, storing); Modified: trunk/frontend/easypmp/win32gui/processingdlg.h =================================================================== --- trunk/frontend/easypmp/win32gui/processingdlg.h 2006-04-05 13:57:51 UTC (rev 8) +++ trunk/frontend/easypmp/win32gui/processingdlg.h 2006-04-16 14:47:55 UTC (rev 9) @@ -275,11 +275,16 @@ if (m_preference.bConvertInPlaylist) opt.verb |= MODE_PLAYLIST_PLAYLIST; if (m_preference.bSearchMissing) opt.verb |= MODE_PLAYLIST_FIND; if (m_preference.bSkipMissing) opt.verb |= MODE_PLAYLIST_SKIP; + if (m_preference.bJSPL) opt.verb |= MODE_PLAYLIST_JSPL; // Set path to the root folder. m_preference.GetPathToPlayerRoot(str); ucs2cpy(opt.path_to_root, T2CW(str)); + // Set path to the include folder. + ::GetModuleFileNameW(_Module.GetModuleInstance(), opt.path_to_include, MAX_PATH); + ::PathRemoveFileSpecW(opt.path_to_include); + // Set model if (!m_preference.strPlayerIdentifier.IsEmpty()) { strcpy(opt.model, T2CA(m_preference.strPlayerIdentifier)); @@ -365,6 +370,11 @@ } } if (opt.verb & MODE_PLAYLIST) { + if ((opt.verb & MODE_PLAYLIST_JSPL) && (!records)) { + setState(PHASE_DATABASE_READ, STATE_PROCESSING); + easypmp_database_read(pmp, &opt, &records, &num_records, easypmp_progress, this); + setState(PHASE_DATABASE_READ, STATE_DONE); + } result = easypmp_playlist(&playlists, &musics, pmp, &opt, records, num_records, easypmp_progress, this); if (result != 0) { goto error_exit; Modified: trunk/frontend/easypmp/win32gui/resource.h =================================================================== --- trunk/frontend/easypmp/win32gui/resource.h 2006-04-05 13:57:51 UTC (rev 8) +++ trunk/frontend/easypmp/win32gui/resource.h 2006-04-16 14:47:55 UTC (rev 9) @@ -24,6 +24,8 @@ #define IDC_CHECK_SAVE_LOG 1012 #define IDC_COMBO_DEVICE_ID2 1013 #define IDC_COMBO_MEDIAINFO_SOURCE 1013 +#define IDC_CHECK_PL_FIND2 1014 +#define IDC_CHECK_PL_JSPL 1014 #define IDC_EDIT_LOG 1019 #define IDC_CHECK_SAFEREMOVE 1020 #define IDC_STATIC_PLAYER_DESCRIPTION 1021 Modified: trunk/include/playlist.h =================================================================== --- trunk/include/playlist.h 2006-04-05 13:57:51 UTC (rev 8) +++ trunk/include/playlist.h 2006-04-16 14:47:55 UTC (rev 9) @@ -37,6 +37,11 @@ struct tag_pmp_record_t; typedef struct tag_pmp_record_t pmp_record_t; enum { + PLAYLIST_NONE = 0, + PLAYLIST_JSPL = 1, +}; + +enum { PLCALLBACK_NONE, PLCALLBACK_JSPL_MESSAGE, PLCALLBACK_JSPL_ERROR, @@ -134,7 +139,8 @@ PLAYLISTAPI int playlist_is_supported( - const ucs2char_t* filename + const ucs2char_t* filename, + int flag ); PLAYLISTAPI Modified: trunk/lib/playlist/playlist.c =================================================================== --- trunk/lib/playlist/playlist.c 2006-04-05 13:57:51 UTC (rev 8) +++ trunk/lib/playlist/playlist.c 2006-04-16 14:47:55 UTC (rev 9) @@ -81,7 +81,7 @@ return playlist_m3u_read(pls, filename, 1); } else if (filepath_hasext(filename, ucs2cs_pls)) { return playlist_pls_read(pls, filename); - } else if (filepath_hasext(filename, ucs2cs_jspl)) { + } else if (records && filepath_hasext(filename, ucs2cs_jspl)) { return playlist_jspl_read(pls, filename, path_to_include, records, num_records, callback, instance); } else { return -1; @@ -129,13 +129,15 @@ return 0; } -int playlist_is_supported(const ucs2char_t* filename) +int playlist_is_supported(const ucs2char_t* filename, int flag) { int ret = 0; ret |= filepath_hasext(filename, ucs2cs_m3u); ret |= filepath_hasext(filename, ucs2cs_m3u8); ret |= filepath_hasext(filename, ucs2cs_pls); - ret |= filepath_hasext(filename, ucs2cs_jspl); + if (flag & PLAYLIST_JSPL) { + ret |= filepath_hasext(filename, ucs2cs_jspl); + } return ret; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-04-05 13:58:16
|
Revision: 8 Author: nyaochi Date: 2006-04-05 06:57:51 -0700 (Wed, 05 Apr 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=8&view=rev Log Message: ----------- More JSPL related work. Modified Paths: -------------- trunk/frontend/easypmp/common/easypmp.h trunk/frontend/easypmp/common/playlist.c trunk/frontend/easypmp/cui/main.c trunk/frontend/easypmp/cui/option.c trunk/include/playlist.h trunk/lib/playlist/jspl.c trunk/lib/playlist/playlist.c Modified: trunk/frontend/easypmp/common/easypmp.h =================================================================== --- trunk/frontend/easypmp/common/easypmp.h 2006-04-04 06:49:42 UTC (rev 7) +++ trunk/frontend/easypmp/common/easypmp.h 2006-04-05 13:57:51 UTC (rev 8) @@ -84,6 +84,7 @@ uint32_t media_info_source; int repr_level; ucs2char_t path_to_root[MAX_PATH]; + ucs2char_t path_to_include[MAX_PATH]; char model[128]; char *system_encoding; char *music_encoding; Modified: trunk/frontend/easypmp/common/playlist.c =================================================================== --- trunk/frontend/easypmp/common/playlist.c 2006-04-04 06:49:42 UTC (rev 7) +++ trunk/frontend/easypmp/common/playlist.c 2006-04-05 13:57:51 UTC (rev 8) @@ -131,7 +131,7 @@ // Read the source playlist playlist_init(&pls); - if (playlist_read(&pls, src, records, num_records, callback_from_playlist, &cd) != 0) { + if (playlist_read(&pls, src, opt->path_to_include, records, num_records, callback_from_playlist, &cd) != 0) { result = EASYPMPE_PLAYLIST_READ; goto error_exit; } Modified: trunk/frontend/easypmp/cui/main.c =================================================================== --- trunk/frontend/easypmp/cui/main.c 2006-04-04 06:49:42 UTC (rev 7) +++ trunk/frontend/easypmp/cui/main.c 2006-04-05 13:57:51 UTC (rev 8) @@ -49,7 +49,7 @@ #endif #define APPLICATION_S "EasyPMP [CUI]" -#define VERSION_S "0.8 alpha" +#define VERSION_S "0.9 alpha" #define COPYRIGHT_S "Copyright (c) 2005-2006 Nyaochi" int database_dump(pmp_t* pmp, FILE *fpo, int level); Modified: trunk/frontend/easypmp/cui/option.c =================================================================== --- trunk/frontend/easypmp/cui/option.c 2006-04-04 06:49:42 UTC (rev 7) +++ trunk/frontend/easypmp/cui/option.c 2006-04-05 13:57:51 UTC (rev 8) @@ -29,6 +29,10 @@ #include <os.h> #include <stdio.h> #include <stdlib.h> +#ifdef _MSC_VER +#include <direct.h> /* getcwd() */ +#endif/*_MSC_VER*/ + #include <ucs2char.h> #include <filepath.h> #include <gmi.h> @@ -94,6 +98,19 @@ opt->media_info_source |= GMIF_TAG; + if (!opt->path_to_include[0]) { + char pwd[MAX_PATH+1]; + ucs2char_t ucs2pwd[MAX_PATH+1]; + ucs2char_t ucs2argv0[MAX_PATH+1]; + + getcwd(pwd, MAX_PATH); + mbstoucs2(ucs2pwd, MAX_PATH, pwd, strlen(pwd)+1); + mbstoucs2(ucs2argv0, MAX_PATH, argv[0], strlen(argv[0])+1); + filepath_relative_to_absolute(opt->path_to_include, ucs2pwd, ucs2argv0); + + filepath_remove_filespec(opt->path_to_include); + } + /* Parse the command-line arguments. */ for (;;) { int this_option_optind = optind ? optind : 1; Modified: trunk/include/playlist.h =================================================================== --- trunk/include/playlist.h 2006-04-04 06:49:42 UTC (rev 7) +++ trunk/include/playlist.h 2006-04-05 13:57:51 UTC (rev 8) @@ -102,6 +102,7 @@ playlist_read( playlists_t* pls, const ucs2char_t* filename, + const ucs2char_t* path_to_include, pmp_record_t* records, int num_records, playlist_callback_t callback, Modified: trunk/lib/playlist/jspl.c =================================================================== --- trunk/lib/playlist/jspl.c 2006-04-04 06:49:42 UTC (rev 7) +++ trunk/lib/playlist/jspl.c 2006-04-05 13:57:51 UTC (rev 8) @@ -40,13 +40,17 @@ #define XP_WIN #include <js/jsapi.h> -#define COMP(a, b) ((a)>(b))-((a)<(b)) +#define MAX_SOURCE_DEPTH 64 struct tag_jspl { JSRuntime *runtime; JSContext *context; JSObject *global; + const ucs2char_t *path_to_include; + const ucs2char_t path_to_source[MAX_PATH][MAX_SOURCE_DEPTH]; + int source_depth; + int num_records; JSObject **records; JSObject *tracks; @@ -56,6 +60,9 @@ }; typedef struct tag_jspl jspl_t; +static int jspl_load_script(jspl_t* jspl, const ucs2char_t* filename); + + static jschar* JS_ucstrdup(JSContext *cx, const ucs2char_t* src, size_t* ptr_length) { size_t i, length = ucs2len(src); @@ -105,6 +112,12 @@ return 0; } +static int object_is_array(JSContext* cx, JSObject* obj) +{ + jsuint length; + return JS_HasArrayLength(cx, obj, &length) ? 1 : 0; +} + static JSBool js_print(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { @@ -136,8 +149,32 @@ return JS_TRUE; } +static JSBool +js_include(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + uintN i, n; + jspl_t* jspl = (jspl_t*)JS_GetContextPrivate(cx); + + for (i = 0, n = 0; i < argc; i++) { + ucs2char_t* ucs2 = NULL; + ucs2char_t filename[MAX_PATH+1]; + JSString *str = JS_ValueToString(cx, argv[i]); + if (!str) { + return JS_FALSE; + } + + ucs2 = JSString_to_ucs2(str); + + filepath_combinepath(filename, MAX_PATH, jspl->path_to_include, ucs2); + jspl_load_script(jspl, filename); + } + + return JS_TRUE; +} + static JSFunctionSpec g_global_functions[] = { - {"print", js_print, 0}, + {"print", js_print, 0}, + {"include", js_include, 0}, {0} }; @@ -311,6 +348,25 @@ return 0; } +static int jspl_init_script(jspl_t* jspl) +{ + static const char *script = + "Math.cmp = function(x, y)\n" + "{\n" + " return ((x)>(y))-((x)<(y));\n" + "};\n" + "\n"; + + static const char *_script = "function dummy() {}\n"; + + jsval retval; + int ret = JS_EvaluateScript(jspl->context, jspl->global, script, strlen(script), "easypmp.js", 1, &retval); + if (!ret) { + return -1; + } + return 0; +} + static int jspl_load_script(jspl_t* jspl, const ucs2char_t* filename) { #if 1 @@ -431,6 +487,7 @@ int playlist_jspl_read( playlists_t* pls, const ucs2char_t *filename, + const ucs2char_t *path_to_include, pmp_record_t* records, int num_records, playlist_callback_t callback, @@ -451,6 +508,8 @@ goto error_exit; } + /* Initialize other fields. */ + jspl->path_to_include = path_to_include; jspl->callback = callback; jspl->instance = instance; @@ -505,7 +564,7 @@ goto error_exit; } - if (JS_IsArrayObject(jspl->context, jsobj)) { + if (object_is_array(jspl->context, jsobj)) { /* Single playlist when the returned value is JavaScript array. */ ret = generate_playlist(jspl, pls, jsobj, name); if (ret != 0) { @@ -532,7 +591,7 @@ if (JS_LookupUCProperty(jspl->context, jsobj, JS_GetStringChars(jsstr_name), JS_GetStringLength(jsstr_name), &jsval_obj)) { if (JSVAL_IS_OBJECT(jsval_obj) && !JSVAL_IS_PRIMITIVE(jsval_obj)) { JSObject* jsobj = JSVAL_TO_OBJECT(jsval_obj); - if (jsobj && JS_IsArrayObject(jspl->context, jsobj)) { + if (jsobj && object_is_array(jspl->context, jsobj)) { ucs2char_t* thisname = JSString_to_ucs2(jsstr_name); ret = generate_playlist(jspl, pls, jsobj, thisname); if (ret != 0) { Modified: trunk/lib/playlist/playlist.c =================================================================== --- trunk/lib/playlist/playlist.c 2006-04-04 06:49:42 UTC (rev 7) +++ trunk/lib/playlist/playlist.c 2006-04-05 13:57:51 UTC (rev 8) @@ -44,6 +44,7 @@ int playlist_jspl_read( playlists_t* pls, const ucs2char_t *filename, + const ucs2char_t *path_to_include, pmp_record_t* records, int num_records, playlist_callback_t callback, @@ -67,6 +68,7 @@ int playlist_read( playlists_t* pls, const ucs2char_t* filename, + const ucs2char_t* path_to_include, pmp_record_t* records, int num_records, playlist_callback_t callback, @@ -80,7 +82,7 @@ } else if (filepath_hasext(filename, ucs2cs_pls)) { return playlist_pls_read(pls, filename); } else if (filepath_hasext(filename, ucs2cs_jspl)) { - return playlist_jspl_read(pls, filename, records, num_records, callback, instance); + return playlist_jspl_read(pls, filename, path_to_include, records, num_records, callback, instance); } else { return -1; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-04-04 06:50:10
|
Revision: 7 Author: nyaochi Date: 2006-04-03 23:49:42 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=7&view=rev Log Message: ----------- Changed the license description in jspl.c Modified Paths: -------------- trunk/lib/playlist/jspl.c Modified: trunk/lib/playlist/jspl.c =================================================================== --- trunk/lib/playlist/jspl.c 2006-04-04 06:32:21 UTC (rev 6) +++ trunk/lib/playlist/jspl.c 2006-04-04 06:49:42 UTC (rev 7) @@ -3,20 +3,19 @@ * * Copyright (c) 2005-2006 Nyaochi * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit - * http://www.gnu.org/copyleft/gpl.html . + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-04-04 06:32:34
|
Revision: 6 Author: nyaochi Date: 2006-04-03 23:32:21 -0700 (Mon, 03 Apr 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=6&view=rev Log Message: ----------- Revised the JSPL specification. - JavaScript playlist must have one main() function - The main() function must return either an array of tracks or a JavaScript object with multiple playlists whose names are represented in attributes of the object and values store arrays of tracks. - Previous specification (i.e., match and comapre functions) was discarded. Modified Paths: -------------- trunk/include/playlist.h trunk/lib/playlist/jspl.c Modified: trunk/include/playlist.h =================================================================== --- trunk/include/playlist.h 2006-03-31 05:41:31 UTC (rev 5) +++ trunk/include/playlist.h 2006-04-04 06:32:21 UTC (rev 6) @@ -42,6 +42,22 @@ PLCALLBACK_JSPL_ERROR, }; +enum { + PLAYLIST_SUCCESS = 0, + PLAYLIST_E_FAIL = 0x80000000, + PLAYLIST_E_OUTOFMEMORY, + PLAYLIST_E_JSINITENGINE, + PLAYLIST_E_JSINITMEDIA, + PLAYLIST_E_JSEVALSCRIPT, + PLAYLIST_E_JSMAINNOTFOUND, + PLAYLIST_E_JSCALLMAIN, + PLAYLIST_E_JSINVALIDARRAY, + PLAYLIST_E_JSINVALIDCAST, + PLAYLIST_E_JSINVALIDOBJECT, + PLAYLIST_E_JSINVALIDTRACK, +}; + + typedef void (*playlist_callback_t)(void *instance, int level, ucs2char_t* message); struct tag_playlist_entry { Modified: trunk/lib/playlist/jspl.c =================================================================== --- trunk/lib/playlist/jspl.c 2006-03-31 05:41:31 UTC (rev 5) +++ trunk/lib/playlist/jspl.c 2006-04-04 06:32:21 UTC (rev 6) @@ -50,25 +50,26 @@ int num_records; JSObject **records; + JSObject *tracks; void *instance; playlist_callback_t callback; }; typedef struct tag_jspl jspl_t; -static jschar* JS_ucstrdup(JSContext *cx, ucs2char_t* src, size_t* ptr_length) +static jschar* JS_ucstrdup(JSContext *cx, const ucs2char_t* src, size_t* ptr_length) { - int i; - size_t length = ucs2len(src); + size_t i, length = ucs2len(src); jschar* dst = JS_malloc(cx, length * sizeof(jschar)); - for (i = 0;i < length;++i) { - dst[i] = src[i]; + if (dst) { + for (i = 0;i < length;++i) { + dst[i] = src[i]; + } + if (ptr_length) { + *ptr_length = length; + } } - - if (ptr_length) { - *ptr_length = length; - } return dst; } @@ -239,6 +240,21 @@ { int i; + /* Allocate a JavaScript array object. + * According to the notes for JS_NewArrayObject() function in the + * reference document, we should create an empty array, store the + * returned object in a GC root, populate its element, and then + * drop the root object to avoid unrooted jsvals in vector from + * being subject to garbage collection until the new object has + * been populated + */ + jspl->tracks = JS_NewArrayObject(jspl->context, 0, NULL); + + /* */ + if (!JS_AddRoot(jspl->context, &jspl->tracks)) { + return 1; + } + /* Allocate a records array. */ free(jspl->records); jspl->records = (JSObject**)calloc(num_records, sizeof(JSObject*)); @@ -246,6 +262,7 @@ for (i = 0;i < num_records;++i) { const pmp_record_t* record = &records[i]; JSObject* obj = NULL; + jsval jsval_obj; /* Create a JavaScript object. */ obj = JS_NewObject( @@ -259,7 +276,7 @@ } /* Attach properties to the object. */ - set_property_int(jspl, obj, "index", i); + set_property_int(jspl, obj, "id", i); set_property_string(jspl, obj, "filename", record->filename); set_property_string(jspl, obj, "title", record->title); set_property_string(jspl, obj, "artist", record->artist); @@ -280,9 +297,18 @@ /* Register the object pointer to the record array. */ jspl->records[i] = obj; + + jsval_obj = OBJECT_TO_JSVAL(obj); + if (!JS_SetElement(jspl->context, jspl->tracks, i, &jsval_obj)) { + return 1; + } } jspl->num_records = num_records; + if (!JS_RemoveRoot(jspl->context, &jspl->tracks)) { + return 1; + } + return 0; } @@ -364,37 +390,45 @@ #endif } -typedef struct { - jspl_t *jspl; - int index; -} sortitem_t; - -static int comp_order(const void* _x, const void* _y) +static int generate_playlist( + jspl_t* jspl, + playlists_t* pls, + JSObject* jsobj_array, + const ucs2char_t* name + ) { - jsval argv[2], retval; - const sortitem_t* x = (const sortitem_t*)_x; - const sortitem_t* y = (const sortitem_t*)_y; - jspl_t* jspl = x->jspl; - int ret = COMP(x->index, y->index); - - /* Call match() function. */ - argv[0] = OBJECT_TO_JSVAL(jspl->records[x->index]); - argv[1] = OBJECT_TO_JSVAL(jspl->records[y->index]); - if (JS_CallFunctionName(jspl->context, jspl->global, "compare", 2, argv, &retval)) { - if (JSVAL_IS_INT(retval)) { - ret = JSVAL_TO_INT(retval); - } else if (JSVAL_IS_DOUBLE(retval)) { - jsdouble* d = JSVAL_TO_DOUBLE(retval); - if (*d == 0) { - ret = 0; - } else { - ret = *d < 0 ? -1 : 1; + int ipl = playlist_add_playlist(pls, name); + if (ipl >= 0) { + playlist_t* pl = &pls->playlists[ipl]; + jsuint i, length; + + if (JS_HasArrayLength(jspl->context, jsobj_array, &length)) { + for (i = 0;i < length;++i) { + jsval jsval_element; + if (JS_GetElement(jspl->context, jsobj_array, (jsint)i, &jsval_element)) { + JSObject* jsobj_element = JSVAL_TO_OBJECT(jsval_element); + jsval jsval_filename; + if (JS_GetProperty(jspl->context, jsobj_element, "filename", &jsval_filename)) { + ucs2char_t* filename = JSString_to_ucs2(JSVAL_TO_STRING(jsval_filename)); + playlist_append(pl, filename, i); + } else { + return PLAYLIST_E_JSINVALIDTRACK; + } + } else { + return PLAYLIST_E_JSINVALIDARRAY; + } } + } else { + return PLAYLIST_E_JSINVALIDARRAY; } + } else { + return PLAYLIST_E_OUTOFMEMORY; } - return ret; + + return 0; } + int playlist_jspl_read( playlists_t* pls, const ucs2char_t *filename, @@ -404,16 +438,17 @@ void *instance ) { - int i, j, ret = 0; + int ret = 0; jspl_t* jspl = NULL; ucs2char_t name[MAX_PATH]; JSString* jstr_name = NULL; size_t length = 0; jschar* js_name = NULL; + jsval argv[2], retval; /* Intialize JavaScript engine. */ if (jspl_init(&jspl) != 0) { - ret = 1; + ret = PLAYLIST_E_JSINITENGINE; goto error_exit; } @@ -422,13 +457,13 @@ /* Create JavaScript objects represent media information of the records. */ if (jspl_set(jspl, records, num_records) != 0) { - ret = 1; + ret = PLAYLIST_E_JSINITMEDIA; goto error_exit; } /* Load the script. */ if (jspl_load_script(jspl, filename) != 0) { - ret = 1; + ret = PLAYLIST_E_JSEVALSCRIPT; goto error_exit; } @@ -439,68 +474,79 @@ /* Convert the type of the playlist name to JavaScript string. */ js_name = JS_ucstrdup(jspl->context, name, &length); if (!js_name) { - ret = 1; + ret = PLAYLIST_E_OUTOFMEMORY; goto error_exit; } jstr_name = JS_NewUCString(jspl->context, js_name, length); if (!jstr_name) { - ret = 1; + ret = PLAYLIST_E_OUTOFMEMORY; goto error_exit; } - if (!function_exists(jspl, "match")) { - ret = 1; + /* Check if main() function exists. */ + if (!function_exists(jspl, "main")) { + ret = PLAYLIST_E_JSMAINNOTFOUND; goto error_exit; } - /* Generate playlist(s) by applying match() function. */ - for (i = 0;i < jspl->num_records;++i) { - jsval argv[2], retval; + /* Call main() function. */ + argv[0] = OBJECT_TO_JSVAL(jspl->tracks); + argv[1] = STRING_TO_JSVAL(jstr_name); + if (!JS_CallFunctionName(jspl->context, jspl->global, "main", 2, argv, &retval)) { + ret = PLAYLIST_E_JSCALLMAIN; + goto error_exit; + } - /* Call match() function. */ - argv[0] = OBJECT_TO_JSVAL(jspl->records[i]); - argv[1] = STRING_TO_JSVAL(jstr_name); - if (!JS_CallFunctionName(jspl->context, jspl->global, "match", 2, argv, &retval)) { - continue; + /* Check if the returned value is a JavaScript object. */ + if (JSVAL_IS_OBJECT(retval) && !JSVAL_IS_PRIMITIVE(retval)) { + /* Convert the return value to JSObject. */ + JSObject* jsobj = JSVAL_TO_OBJECT(retval); + if (!jsobj) { + ret = PLAYLIST_E_JSINVALIDCAST; + goto error_exit; } - if (JSVAL_IS_BOOLEAN(retval) && JSVAL_TO_BOOLEAN(retval)) { - /* Add this media file to the default playlist. */ - int index = playlist_add_playlist(pls, name); - if (index >= 0) { - playlist_t* pl = &pls->playlists[index]; - playlist_append(pl, records[i].filename, i); + if (JS_IsArrayObject(jspl->context, jsobj)) { + /* Single playlist when the returned value is JavaScript array. */ + ret = generate_playlist(jspl, pls, jsobj, name); + if (ret != 0) { + goto error_exit; } - } else if (JSVAL_IS_STRING(retval)) { - /* Add this media file to a playlist named as the retval. */ - ucs2char_t* thisname = JSString_to_ucs2(JSVAL_TO_STRING(retval)); - int index = playlist_add_playlist(pls, thisname); - if (index >= 0) { - playlist_t* pl = &pls->playlists[index]; - playlist_append(pl, records[i].filename, i); + } else { + /* Multiple playlists when the returned value is JavaScript object with attributes. */ + jsint n; + JSIdArray* keys = JS_Enumerate(jspl->context, jsobj); + if (!keys) { + ret = PLAYLIST_E_JSINVALIDOBJECT; + goto error_exit; } - ucs2free(thisname); - } - } - /* Sort the playlist(s). */ - if (function_exists(jspl, "compare")) { - for (i = 0;i < pls->num_playlists;++i) { - playlist_t* pl = &pls->playlists[i]; - sortitem_t* sis = calloc(pl->num_entries, sizeof(sortitem_t)); - - for (j = 0;j < pl->num_entries;++j) { - sis[j].jspl = jspl; - sis[j].index = pl->entries[j].order; + /* Loop over attributes to enumerate all playlist names. */ + for (n = 0;n < keys->length;++n) { + /* Obtain the playlist name. */ + jsval jsval_name; + if (JS_IdToValue(jspl->context, keys->vector[n], &jsval_name)) { + jsval jsval_obj; + JSString* jsstr_name = JSVAL_TO_STRING(jsval_name); + + /* Obtain the attribute value for the playlist name. */ + if (JS_LookupUCProperty(jspl->context, jsobj, JS_GetStringChars(jsstr_name), JS_GetStringLength(jsstr_name), &jsval_obj)) { + if (JSVAL_IS_OBJECT(jsval_obj) && !JSVAL_IS_PRIMITIVE(jsval_obj)) { + JSObject* jsobj = JSVAL_TO_OBJECT(jsval_obj); + if (jsobj && JS_IsArrayObject(jspl->context, jsobj)) { + ucs2char_t* thisname = JSString_to_ucs2(jsstr_name); + ret = generate_playlist(jspl, pls, jsobj, thisname); + if (ret != 0) { + goto error_exit; + } + } + } + } + } } - - qsort(sis, pl->num_entries, sizeof(sortitem_t), comp_order); - - for (j = 0;j < pl->num_entries;++j) { - int index = sis[j].index; - ucs2cpy(pl->entries[j].filename, records[index].filename); - } } + } else { + /* Does nothing when main() function returns a non-object. */ } error_exit: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-03-31 05:41:59
|
Revision: 5 Author: nyaochi Date: 2006-03-30 21:41:31 -0800 (Thu, 30 Mar 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=5&view=rev Log Message: ----------- Incremental commit: - clean-up an unused field in pmp.h - export added timestamp for JSPL Modified Paths: -------------- trunk/frontend/easypmp/common/database.c trunk/include/pmp.h trunk/lib/playlist/jspl.c trunk/lib/pmp_iriverplus2/ip2db.c trunk/lib/pmp_irivnavi/pmp_irivnavi.c trunk/lib/pmp_portalplayer1/model_iriver_h10.c trunk/lib/pmp_portalplayer1/model_medion_mdjuke220.c trunk/lib/pmp_portalplayer1/model_medion_mdjuke440.c trunk/lib/pmp_portalplayer1/model_sirius_s50.c Modified: trunk/frontend/easypmp/common/database.c =================================================================== --- trunk/frontend/easypmp/common/database.c 2006-03-18 03:34:03 UTC (rev 4) +++ trunk/frontend/easypmp/common/database.c 2006-03-31 05:41:31 UTC (rev 5) @@ -228,7 +228,7 @@ if (find_mediafile(old_records, num_old_records, filename, &begin, &end)) { if (begin + 1 == end) { // If the time stamps are identical, let us skip this file. - if (old_records[begin].timestamp == timestamp) { + if (old_records[begin].ts_update == timestamp) { pmp_record_copy(record, &old_records[begin]); is_skipping = 1; } @@ -242,7 +242,7 @@ ++num_obtained; } else { } - record->timestamp = timestamp; + record->ts_update = timestamp; record->ts_import = ts_import; } } Modified: trunk/include/pmp.h =================================================================== --- trunk/include/pmp.h 2006-03-18 03:34:03 UTC (rev 4) +++ trunk/include/pmp.h 2006-03-31 05:41:31 UTC (rev 5) @@ -79,26 +79,28 @@ const ucs2char_t* playlist_ext; } pmp_environment_t; +/** + * Structure of media record. + */ struct tag_pmp_record_t { - uint32_t unique_id; - ucs2char_t *filename; - ucs2char_t *title; - ucs2char_t *artist; - ucs2char_t *composer; - ucs2char_t *album; - ucs2char_t *genre; - ucs2char_t *date; - uint32_t codec; - uint32_t track_number; - uint32_t sample_rate; - uint32_t bitrate; - uint32_t duration; - uint32_t filesize; - uint32_t timestamp; - uint32_t rating; - uint32_t play_count; - uint32_t recent_play; - uint32_t ts_import; + ucs2char_t *filename; /**< Filename. */ + ucs2char_t *title; /**< Track title. */ + ucs2char_t *artist; /**< Artist name. */ + ucs2char_t *composer; /**< Composer name. */ + ucs2char_t *album; /**< Album name. */ + ucs2char_t *genre; /**< Genre name. */ + ucs2char_t *date; /**< Date. */ + uint32_t codec; /**< Codec FourCC. */ + uint32_t track_number; /**< Track number. */ + uint32_t sample_rate; /**< Sample rate in kHz. */ + uint32_t bitrate; /**< Bitrate in bps. */ + uint32_t duration; /**< Duration in seconds. */ + uint32_t filesize; /**< File size in bytes. */ + uint32_t ts_update; /**< Last update. */ + uint32_t rating; /**< Rating of the track. */ + uint32_t play_count; /**< The number of playback of the track. */ + uint32_t ts_playback; /**< Date/time of recent playback of the track. */ + uint32_t ts_import; /**< Date/time when the track was imported. */ }; typedef struct tag_pmp_record_t pmp_record_t; Modified: trunk/lib/playlist/jspl.c =================================================================== --- trunk/lib/playlist/jspl.c 2006-03-18 03:34:03 UTC (rev 4) +++ trunk/lib/playlist/jspl.c 2006-03-31 05:41:31 UTC (rev 5) @@ -272,10 +272,11 @@ set_property_int(jspl, obj, "sample_rate", (int)record->sample_rate); set_property_int(jspl, obj, "bitrate", (int)record->bitrate); set_property_int(jspl, obj, "duration", (int)record->duration); - set_property_int(jspl, obj, "timestamp", (int)record->timestamp); + set_property_int(jspl, obj, "update_timestamp", (int)record->ts_update); set_property_int(jspl, obj, "rating", (int)record->rating); set_property_int(jspl, obj, "play_count", (int)record->play_count); - set_property_int(jspl, obj, "recent_play", (int)record->recent_play); + set_property_int(jspl, obj, "playback_timestamp", (int)record->ts_playback); + set_property_int(jspl, obj, "import_timestamp", (int)record->ts_import); /* Register the object pointer to the record array. */ jspl->records[i] = obj; Modified: trunk/lib/pmp_iriverplus2/ip2db.c =================================================================== --- trunk/lib/pmp_iriverplus2/ip2db.c 2006-03-18 03:34:03 UTC (rev 4) +++ trunk/lib/pmp_iriverplus2/ip2db.c 2006-03-31 05:41:31 UTC (rev 5) @@ -203,7 +203,7 @@ dst->genre = ucs2dup(src->genre ? src->genre : ucs2cs_unknown); dst->rating = src->rating; dst->play_count = src->play_count; - dst->recent_play = src->recent_play; + dst->recent_play = src->ts_playback; dst->track_number = src->track_number; if (src->date) { dst->year = ucs2toi(src->date); @@ -212,7 +212,7 @@ dst->duration = src->duration; dst->sample_rate = src->sample_rate; dst->bitrate = src->bitrate; - dst->timestamp = src->timestamp; + dst->timestamp = src->ts_update; ++j; } @@ -265,8 +265,6 @@ ip2db_get_record(db, i, &src); - dst->unique_id = j; - length = ucs2len(path_to_root); length += ucs2len(src.pathname); length += ucs2len(src.filename); @@ -295,10 +293,10 @@ dst->bitrate = src.bitrate; dst->duration = src.duration; dst->filesize = src.filesize; - dst->timestamp = src.timestamp; + dst->ts_update = src.timestamp; dst->rating = src.rating; dst->play_count = src.play_count; - dst->recent_play = src.recent_play; + dst->ts_playback = src.recent_play; ++j; } Modified: trunk/lib/pmp_irivnavi/pmp_irivnavi.c =================================================================== --- trunk/lib/pmp_irivnavi/pmp_irivnavi.c 2006-03-18 03:34:03 UTC (rev 4) +++ trunk/lib/pmp_irivnavi/pmp_irivnavi.c 2006-03-31 05:41:31 UTC (rev 5) @@ -473,7 +473,7 @@ dst->artist = ucs2dupmbs(src->artist ? src->artist : ucs2cs_unknown); dst->album = ucs2dupmbs(src->album ? src->album : ucs2cs_unknown); dst->genre = ucs2dupmbs(src->genre ? src->genre : ucs2cs_unknown); - dst->timestamp = src->timestamp; + dst->timestamp = src->ts_update; ++j; } @@ -512,8 +512,6 @@ pmp_record_init(dst); - dst->unique_id = j; - tmp = mbsdupucs2(src->filename); length = ucs2len(path_to_root); length += ucs2len(tmp); @@ -537,7 +535,7 @@ dst->codec = PMPCODEC_WAV; } - dst->timestamp = src->timestamp; + dst->ts_update = src->timestamp; ucs2free(tmp); ++j; Modified: trunk/lib/pmp_portalplayer1/model_iriver_h10.c =================================================================== --- trunk/lib/pmp_portalplayer1/model_iriver_h10.c 2006-03-18 03:34:03 UTC (rev 4) +++ trunk/lib/pmp_portalplayer1/model_iriver_h10.c 2006-03-31 05:41:31 UTC (rev 5) @@ -109,7 +109,7 @@ dst->fields[PP1DB_DATFIELD_GENRE].value.str = ucs2dup(src->genre ? src->genre : ucs2cs_unknown); dst->fields[PP1DB_DATFIELD_RATING].value.dword = src->rating; dst->fields[PP1DB_DATFIELD_PLAYCOUNT].value.dword = src->play_count; - dst->fields[PP1DB_DATFIELD_RECENTPLAY].value.dword = src->recent_play; + dst->fields[PP1DB_DATFIELD_RECENTPLAY].value.dword = src->ts_playback; dst->fields[PP1DB_DATFIELD_UNKNOWN3].value.dword = 0; dst->fields[PP1DB_DATFIELD_TRACKNUMBER].value.dword = src->track_number; if (src->date) { @@ -121,7 +121,7 @@ dst->fields[PP1DB_DATFIELD_BITRATE].value.dword = src->bitrate; dst->fields[PP1DB_DATFIELD_UNKNOWN4].value.dword = 0; dst->fields[PP1DB_DATFIELD_UNKNOWN5].value.str = ucs2dup(ucs2cs_empty); - dst->fields[PP1DB_DATFIELD_UNKNOWN6].value.dword = src->timestamp; + dst->fields[PP1DB_DATFIELD_UNKNOWN6].value.dword = src->ts_update; dst->fields[PP1DB_DATFIELD_UNKNOWN7].value.str = ucs2dup(ucs2cs_empty); return 0; } @@ -134,8 +134,6 @@ ucs2char_t tmp[128]; size_t length = 0; - dst->unique_id = 0; - length = ucs2len(path_to_root); length += ucs2len(src->fields[PP1DB_DATFIELD_PATHNAME].value.str); length += ucs2len(src->fields[PP1DB_DATFIELD_FILENAME].value.str); @@ -169,10 +167,10 @@ dst->bitrate = src->fields[PP1DB_DATFIELD_BITRATE].value.dword; dst->duration = src->fields[PP1DB_DATFIELD_DURATION].value.dword; dst->filesize = src->fields[PP1DB_DATFIELD_FILESIZE].value.dword; - dst->timestamp = src->fields[PP1DB_DATFIELD_UNKNOWN6].value.dword; + dst->ts_update = src->fields[PP1DB_DATFIELD_UNKNOWN6].value.dword; dst->rating = src->fields[PP1DB_DATFIELD_RATING].value.dword; dst->play_count = src->fields[PP1DB_DATFIELD_PLAYCOUNT].value.dword; - dst->recent_play = src->fields[PP1DB_DATFIELD_RECENTPLAY].value.dword; + dst->ts_playback = src->fields[PP1DB_DATFIELD_RECENTPLAY].value.dword; return 0; } Modified: trunk/lib/pmp_portalplayer1/model_medion_mdjuke220.c =================================================================== --- trunk/lib/pmp_portalplayer1/model_medion_mdjuke220.c 2006-03-18 03:34:03 UTC (rev 4) +++ trunk/lib/pmp_portalplayer1/model_medion_mdjuke220.c 2006-03-31 05:41:31 UTC (rev 5) @@ -117,8 +117,6 @@ ucs2char_t tmp[128]; size_t length = 0; - dst->unique_id = 0; - length = ucs2len(path_to_root); length += ucs2len(src->fields[PP1DB_DATFIELD_PATHNAME].value.str); length += ucs2len(src->fields[PP1DB_DATFIELD_FILENAME].value.str); Modified: trunk/lib/pmp_portalplayer1/model_medion_mdjuke440.c =================================================================== --- trunk/lib/pmp_portalplayer1/model_medion_mdjuke440.c 2006-03-18 03:34:03 UTC (rev 4) +++ trunk/lib/pmp_portalplayer1/model_medion_mdjuke440.c 2006-03-31 05:41:31 UTC (rev 5) @@ -98,8 +98,6 @@ static const ucs2char_t ucs2cs_wav[] = {'.','w','a','v',0}; size_t length = 0; - dst->unique_id = 0; - length = ucs2len(path_to_root); length += ucs2len(src->fields[PP1DB_DATFIELD_PATHNAME].value.str); length += ucs2len(src->fields[PP1DB_DATFIELD_FILENAME].value.str); Modified: trunk/lib/pmp_portalplayer1/model_sirius_s50.c =================================================================== --- trunk/lib/pmp_portalplayer1/model_sirius_s50.c 2006-03-18 03:34:03 UTC (rev 4) +++ trunk/lib/pmp_portalplayer1/model_sirius_s50.c 2006-03-31 05:41:31 UTC (rev 5) @@ -143,8 +143,6 @@ static const ucs2char_t ucs2cs_wav[] = {'.','w','a','v',0}; size_t length = 0; - dst->unique_id = 0; - length = ucs2len(path_to_root); length += ucs2len(src->fields[PP1DB_DATFIELD_PATHNAME].value.str); length += ucs2len(src->fields[PP1DB_DATFIELD_FILENAME].value.str); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ny...@us...> - 2006-03-18 03:34:19
|
Revision: 4 Author: nyaochi Date: 2006-03-17 19:34:03 -0800 (Fri, 17 Mar 2006) ViewCVS: http://svn.sourceforge.net/pmplib/?rev=4&view=rev Log Message: ----------- - iRiver H10 UMS 5/6GB 2.52 support. - Showing all filenames when obtaining the media information. - Added the field for storing the timestamp when an music file is added. Modified Paths: -------------- trunk/frontend/easypmp/common/database.c trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc trunk/frontend/easypmp/win32gui/preference.h trunk/frontend/easypmp/win32gui/progress_with_caption.h trunk/include/pmp.h trunk/lib/pmp_portalplayer1/hdr_template.h trunk/lib/pmp_portalplayer1/model_iriver_h10.c trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c Modified: trunk/frontend/easypmp/common/database.c =================================================================== --- trunk/frontend/easypmp/common/database.c 2006-02-26 10:21:16 UTC (rev 3) +++ trunk/frontend/easypmp/common/database.c 2006-03-18 03:34:03 UTC (rev 4) @@ -29,6 +29,7 @@ #include <os.h> #include <stdio.h> #include <stdlib.h> +#include <time.h> #include <ucs2char.h> #include <filepath.h> #include <pmp.h> @@ -41,6 +42,11 @@ #define COMP_STR(x, y) ucs2cmp(x, y) #endif +static uint32_t get_current_time() +{ + return (uint32_t)time(NULL); +} + static int comp_filename(const pmp_record_t *x, const pmp_record_t *y) { return COMP_STR(x->filename, y->filename); @@ -99,6 +105,7 @@ pmp_record_t* records = NULL; pmp_record_t* old_records = NULL; uint32_t num_old_records = 0, num_obtained = 0; + uint32_t ts_import = get_current_time(); if (progress(instance, EASYPMPDBP_START, 0, 0, NULL) != 0) { return EASYPMPE_CANCEL; @@ -236,6 +243,7 @@ } else { } record->timestamp = timestamp; + record->ts_import = ts_import; } } if (progress(instance, EASYPMPDBP_GMI | EASYPMPSP_END, num_obtained, 0, NULL) != 0) { Modified: trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc =================================================================== --- trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc 2006-02-26 10:21:16 UTC (rev 3) +++ trunk/frontend/easypmp/win32gui/easypmp_win32gui.rc 2006-03-18 03:34:03 UTC (rev 4) @@ -42,6 +42,17 @@ #pragma code_page(1252) #endif //_WIN32 +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON "res\\easypmp_win32gui.ico" +IDI_PROCESSING ICON "res\\processing.ico" +IDI_QUEUING ICON "res\\icon1.ico" + #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // @@ -70,17 +81,6 @@ ///////////////////////////////////////////////////////////////////////////// // -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDR_MAINFRAME ICON "res\\easypmp_win32gui.ico" -IDI_PROCESSING ICON "res\\processing.ico" -IDI_QUEUING ICON "res\\icon1.ico" - -///////////////////////////////////////////////////////////////////////////// -// // Dialog // @@ -211,8 +211,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,8,0,2 - PRODUCTVERSION 0,8,0,2 + FILEVERSION 0,9,0,2 + PRODUCTVERSION 0,9,0,2 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -228,12 +228,12 @@ BLOCK "040904b0" BEGIN VALUE "FileDescription", "EasyPMP [Win32 GUI] application" - VALUE "FileVersion", "0, 8, 0, 2" + VALUE "FileVersion", "0, 9, 0, 2" VALUE "InternalName", "easypmp_win32gui" VALUE "LegalCopyright", "Copyright 2005-2006 Nyaochi" VALUE "OriginalFilename", "easypmp_win32gui.exe" VALUE "ProductName", "EasyPMP [Win32 GUI]" - VALUE "ProductVersion", "0, 8, 0, 2" + VALUE "ProductVersion", "0, 9, 0, 2" END END BLOCK "VarFileInfo" Modified: trunk/frontend/easypmp/win32gui/preference.h =================================================================== --- trunk/frontend/easypmp/win32gui/preference.h 2006-02-26 10:21:16 UTC (rev 3) +++ trunk/frontend/easypmp/win32gui/preference.h 2006-03-18 03:34:03 UTC (rev 4) @@ -188,13 +188,22 @@ { USES_CONVERSION; - strPlayerLocation = W2CT(pmp->env.path_to_root); - strPlayerIdentifier = A2CT(pmp->env.id); - strPlayerDescription = A2CT(pmp->env.name); - strPlayerDescription += _T(""); - if (*pmp->env.version) { - strPlayerDescription += _T(" "); - strPlayerDescription += A2CT(pmp->env.version); + if (pmp) { + strPlayerLocation = W2CT(pmp->env.path_to_root); + strPlayerIdentifier = A2CT(pmp->env.id); + strPlayerDescription = A2CT(pmp->env.name); + strPlayerDescription += _T(""); + if (*pmp->env.version) { + strPlayerDescription += _T(" "); + strPlayerDescription += A2CT(pmp->env.version); + } + if (*pmp->env.mode) { + strPlayerDescription += _T(" "); + strPlayerDescription += A2CT(pmp->env.mode); + } + } else { + strPlayerIdentifier = _T(""); + strPlayerDescription = _T(""); } } @@ -214,8 +223,10 @@ setPlayerInformation(pmp); pmp->release(pmp); return TRUE; + } else { + setPlayerInformation(NULL); + return FALSE; } - return FALSE; } int findPlayerLocation(pmphelp_t* pmphelp) Modified: trunk/frontend/easypmp/win32gui/progress_with_caption.h =================================================================== --- trunk/frontend/easypmp/win32gui/progress_with_caption.h 2006-02-26 10:21:16 UTC (rev 3) +++ trunk/frontend/easypmp/win32gui/progress_with_caption.h 2006-03-18 03:34:03 UTC (rev 4) @@ -59,5 +59,6 @@ void SetText(LPCTSTR szText) { m_strText = szText; + InvalidateRect(NULL); } }; Modified: trunk/include/pmp.h =================================================================== --- trunk/include/pmp.h 2006-02-26 10:21:16 UTC (rev 3) +++ trunk/include/pmp.h 2006-03-18 03:34:03 UTC (rev 4) @@ -98,6 +98,7 @@ uint32_t rating; uint32_t play_count; uint32_t recent_play; + uint32_t ts_import; }; typedef struct tag_pmp_record_t pmp_record_t; Modified: trunk/lib/pmp_portalplayer1/hdr_template.h =================================================================== --- trunk/lib/pmp_portalplayer1/hdr_template.h 2006-02-26 10:21:16 UTC (rev 3) +++ trunk/lib/pmp_portalplayer1/hdr_template.h 2006-03-18 03:34:03 UTC (rev 4) @@ -59,7 +59,7 @@ int apply_template(hdr_t* hdr, const hdr_template_t* tmpl); int compare_version(const char *x, const char *y); -int hdr_init_h10_5gb_ums_0205_0251(hdr_t* hdr); +int hdr_init_h10_5gb_ums_0205_0252(hdr_t* hdr); int hdr_init_h10_5gb_mtp_0203_0210(hdr_t* hdr); int hdr_init_h10_5gb_mtp_0251(hdr_t* hdr); int hdr_init_h10_20gb_mtp_0100_0102(hdr_t* hdr); Modified: trunk/lib/pmp_portalplayer1/model_iriver_h10.c =================================================================== --- trunk/lib/pmp_portalplayer1/model_iriver_h10.c 2006-02-26 10:21:16 UTC (rev 3) +++ trunk/lib/pmp_portalplayer1/model_iriver_h10.c 2006-03-18 03:34:03 UTC (rev 4) @@ -272,17 +272,17 @@ {8, 12, 268, 524, 528, 608, 688, 768, 808, 812, 816, 820, 824, 828, 832, 836, 840, 844, 848, 852, 932, 936}; -/********** H10 5GB/6GB UMS firmware 2.05-2.51 **********/ -static hdr_template_t hdrtmpl_h10_5gb_ums_0205_0251 = { +/********** H10 5GB/6GB UMS firmware 2.05-2.52 **********/ +static hdr_template_t hdrtmpl_h10_5gb_ums_0205_0252 = { 0, 0, "System\\DATA\\H10DB.dat", 1, "System\\DATA\\H10DB.hdr", 0x00000428, 0, 0, 22, hdrtmpl_fd_h10_ums, hdrtmpl_max_dat_field_size_h10_ums, 0, 0, {206148, 22, 4000, 1032, 0, iriver_h10_dat_repr, iriver_h10_dat_set, iriver_h10_dat_get}, }; -int hdr_init_h10_5gb_ums_0205_0251(hdr_t* hdr) +int hdr_init_h10_5gb_ums_0205_0252(hdr_t* hdr) { - return apply_template(hdr, &hdrtmpl_h10_5gb_ums_0205_0251); + return apply_template(hdr, &hdrtmpl_h10_5gb_ums_0205_0252); } Modified: trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c =================================================================== --- trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c 2006-02-26 10:21:16 UTC (rev 3) +++ trunk/lib/pmp_portalplayer1/pmp_portalplayer1.c 2006-03-18 03:34:03 UTC (rev 4) @@ -61,12 +61,12 @@ static const pp1model_descriptor_t g_model_descriptions[] = { { - "iriver_h10_5/6gb_ums_2.04-2.51", "H10 5GB/6GB UMS", + "iriver_h10_5/6gb_ums_2.04-2.52", "H10 5GB/6GB UMS", 5, "UM", - "2.04", "2.51", + "2.04", "2.52", "System\\H10.mi4", "System\\DATA\\H10DB.hdr", "Media\\Music\\", "Media\\Playlist\\", ".plp", - hdr_init_h10_5gb_ums_0205_0251, iriver_h10_parse_model + hdr_init_h10_5gb_ums_0205_0252, iriver_h10_parse_model }, { "iriver_h10pure_5/6gb_ums_2.04-2.51", "H10Pure 5GB/6GB UMS", @@ -74,7 +74,7 @@ "2.04", "2.51", "System\\H10_5GP.mi4", "System\\DATA\\H10DB.hdr", "Media\\Music\\", "Media\\Playlist\\", ".plp", - hdr_init_h10_5gb_ums_0205_0251, iriver_h10_parse_model + hdr_init_h10_5gb_ums_0205_0252, iriver_h10_parse_model }, { "iriver_h10_5/6gb_mtp_2.03-2.10", "H10 5GB/6GB MTP", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |