#13 enable cdda, cddb

Next_Release
closed
MEncoder (9)
5
2013-04-07
2008-04-18
Anonymous
No

I'd love to play CDs with MPlayer.
Thanks,
dpconduit at hotmail dot com

Discussion

  • Milen Manev
    Milen Manev
    2008-06-01

    Logged In: YES
    user_id=2104592
    Originator: NO

    To have cdda libcdio is needed. To compile libcdio pkg-config is needed.

    Here is patch for pkg-config to compile under mingw:
    diff -ur pkg-config/configure pkg-config-0.22/configure
    --- pkg-config/configure Tue Jun 19 00:36:04 2007
    +++ pkg-config-0.22/configure Tue Oct 23 17:17:01 2007
    @@ -19957,7 +19957,7 @@
    #
    # These are correct for GLib 2.x
    GLIB_CFLAGS="-I$includedir/glib-2.0 -I$libdir/glib-2.0/include"
    - GLIB_LIBS="-L$libdir -lglib-2.0 -liconv -lintl"
    + GLIB_LIBS="-L$libdir -lglib -liconv"
    use_installed_glib=yes
    else
    use_installed_glib=no
    diff -ur pkg-config/configure.in pkg-config-0.22/configure.in
    --- pkg-config/configure.in Tue Jun 19 00:35:06 2007
    +++ pkg-config-0.22/configure.in Tue Oct 23 17:17:01 2007
    @@ -94,7 +94,7 @@
    #
    # These are correct for GLib 2.x
    GLIB_CFLAGS="-I$includedir/glib-2.0 -I$libdir/glib-2.0/include"
    - GLIB_LIBS="-L$libdir -lglib-2.0 -liconv -lintl"
    + GLIB_LIBS="-L$libdir -lglib -liconv"
    use_installed_glib=yes
    else
    use_installed_glib=no
    diff -ur pkg-config/glib-1.2.8/gerror.c pkg-config-0.22/glib-1.2.8/gerror.c
    --- pkg-config/glib-1.2.10/gerror.c Sat Jul 17 12:48:04 1999
    +++ pkg-config-0.22/glib-1.2.10/gerror.c Tue Oct 23 17:07:05 2007
    @@ -53,6 +53,8 @@

    #ifdef HAVE_SYS_SELECT_H
    #include <sys/select.h>
    +#else
    +#include <winsock2.h>
    #endif /* HAVE_SYS_SELECT_H */

    #ifdef STDC_HEADERS
    @@ -204,7 +206,9 @@
    char c;

    stack_trace_done = FALSE;
    +#ifdef SIGCHLD
    signal (SIGCHLD, stack_trace_sigchld);
    +#endif

    if ((pipe (in_fd) == -1) || (pipe (out_fd) == -1))
    {
    diff -ur pkg-config/glib-1.2.8/gmain.c pkg-config-0.22/glib-1.2.8/gmain.c
    --- pkg-config/glib-1.2.10/gmain.c Fri May 19 08:58:48 2000
    +++ pkg-config-0.22/glib-1.2.10/gmain.c Tue Oct 23 17:07:05 2007
    @@ -338,6 +338,8 @@

    #ifdef HAVE_SYS_SELECT_H
    #include <sys/select.h>
    +#else
    +#include <winsock2.h>
    #endif /* HAVE_SYS_SELECT_H_ */

    #ifndef NO_FD_SET
    diff -ur pkg-config/glib-1.2.8/gthread/Makefile.am pkg-config-0.22/glib-1.2.8/gthread/Makefile.am
    --- pkg-config/glib-1.2.10/gthread/Makefile.am Tue Jun 19 00:35:54 2007
    +++ pkg-config-0.22/glib-1.2.10/gthread/Makefile.am Tue Oct 23 17:07:05 2007
    @@ -22,4 +22,4 @@
    libgthread_la_LIBADD = @G_THREAD_LIBS@

    noinst_PROGRAMS = testgthread
    -testgthread_LDADD = ../libglib.la libgthread.la
    +testgthread_LDADD = ../libglib.la libgthread.la -lwsock32
    diff -ur pkg-config/glib-1.2.8/gthread/Makefile.in pkg-config-0.22/glib-1.2.8/gthread/Makefile.in
    --- pkg-config/glib-1.2.10/gthread/Makefile.in Tue Jun 19 00:36:00 2007
    +++ pkg-config-0.22/glib-1.2.10/gthread/Makefile.in Tue Oct 23 17:07:05 2007
    @@ -182,7 +182,7 @@
    libgthread_la_LIBADD = @G_THREAD_LIBS@

    noinst_PROGRAMS = testgthread
    -testgthread_LDADD = ../libglib.la libgthread.la
    +testgthread_LDADD = ../libglib.la libgthread.la -lwsock32
    subdir = gthread
    ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
    diff -ur pkg-config/parse.c pkg-config-0.22/parse.c
    --- pkg-config/parse.c Tue Jun 19 00:35:06 2007
    +++ pkg-config-0.22/parse.c Tue Oct 23 17:07:05 2007
    @@ -1180,7 +1180,8 @@
    #ifdef G_OS_WIN32
    return status == 0;
    #else
    - return WIFEXITED(status) && (WEXITSTATUS(status) == 0);
    +// return WIFEXITED(status) && (WEXITSTATUS(status) == 0);
    + return status == 0;
    #endif
    }

    Here is the patch for compiling libcdio under mingw:
    diff -ur libcdio-0.79/example/cdchange.c libcdio-0.79-new/example/cdchange.c
    --- libcdio-0.79/example/cdchange.c Sun Apr 15 19:42:34 2007
    +++ libcdio-0.79-new/example/cdchange.c Sat Jan 26 17:29:31 2008
    @@ -74,7 +74,11 @@

    printf("Giving you %lu seconds to change CD if you want to do so.\n",
    i_sleep);
    +#ifndef __MINGW32__
    sleep(30);
    +#else
    + _sleep(30 * 1000);
    +#endif
    if (cdio_get_media_changed(p_cdio))
    printf("Media status: changed\n");
    else
    diff -ur libcdio-0.79/include/cdio/udf_time.h libcdio-0.79-new/include/cdio/udf_time.h
    --- libcdio-0.79/include/cdio/udf_time.h Tue Nov 1 05:14:50 2005
    +++ libcdio-0.79-new/include/cdio/udf_time.h Sat Jan 26 17:29:31 2008
    @@ -28,6 +28,9 @@
    #define UDF_TIME_H

    #include <time.h>
    +#ifdef __MINGW32__
    +#include <pthread.h>
    +#endif

    #ifdef __cplusplus
    extern "C" {
    diff -ur libcdio-0.79/lib/driver/gnu_linux.c libcdio-0.79-new/lib/driver/gnu_linux.c
    --- libcdio-0.79/lib/driver/gnu_linux.c Wed Mar 7 06:35:48 2007
    +++ libcdio-0.79-new/lib/driver/gnu_linux.c Sat Jan 26 17:29:31 2008
    @@ -33,7 +33,9 @@
    #include <string.h>
    #include <limits.h>
    #include <sys/types.h>
    +#ifndef __MINGW32__
    #include <sys/wait.h>
    +#endif

    #include <cdio/sector.h>
    #include <cdio/util.h>
    diff -ur libcdio-0.79/lib/iso9660/xa.c libcdio-0.79-new/lib/iso9660/xa.c
    --- libcdio-0.79/lib/iso9660/xa.c Sat Jan 14 11:48:42 2006
    +++ libcdio-0.79-new/lib/iso9660/xa.c Sat Jan 26 17:29:32 2008
    @@ -163,11 +163,19 @@
    if (i_perms & XA_PERM_RUSR) mode |= S_IRUSR;
    if (i_perms & XA_PERM_XUSR) mode |= S_IXUSR;

    +#ifdef S_IRGRP
    if (i_perms & XA_PERM_RGRP) mode |= S_IRGRP;
    +#endif
    +#ifdef S_IRGRP
    if (i_perms & XA_PERM_XGRP) mode |= S_IXGRP;
    +#endif

    +#ifdef S_IRGRP
    if (i_perms & XA_PERM_ROTH) mode |= S_IROTH;
    +#endif
    +#ifdef S_IRGRP
    if (i_perms & XA_PERM_XOTH) mode |= S_IXOTH;
    +#endif

    if (i_perms & XA_ATTR_DIRECTORY) mode |= S_IFDIR;

    diff -ur libcdio-0.79/lib/udf/udf.c libcdio-0.79-new/lib/udf/udf.c
    --- libcdio-0.79/lib/udf/udf.c Mon Apr 17 06:32:38 2006
    +++ libcdio-0.79-new/lib/udf/udf.c Sat Jan 26 17:29:32 2008
    @@ -64,13 +64,25 @@
    if (i_perms & FE_PERM_U_WRITE) mode |= S_IWUSR;
    if (i_perms & FE_PERM_U_EXEC) mode |= S_IXUSR;

    +#ifdef S_IRGRP
    if (i_perms & FE_PERM_G_READ) mode |= S_IRGRP;
    +#endif
    +#ifdef S_IWGRP
    if (i_perms & FE_PERM_G_WRITE) mode |= S_IWGRP;
    +#endif
    +#ifdef S_IXGRP
    if (i_perms & FE_PERM_G_EXEC) mode |= S_IXGRP;
    +#endif

    +#ifdef S_IROTH
    if (i_perms & FE_PERM_O_READ) mode |= S_IROTH;
    +#endif
    +#ifdef S_IWOTH
    if (i_perms & FE_PERM_O_WRITE) mode |= S_IWOTH;
    +#endif
    +#ifdef S_IXOTH
    if (i_perms & FE_PERM_O_EXEC) mode |= S_IXOTH;
    +#endif

    switch (udf_fe.icb_tag.file_type) {
    case ICBTAG_FILE_TYPE_DIRECTORY:
    @@ -79,24 +91,34 @@
    case ICBTAG_FILE_TYPE_REGULAR:
    mode |= S_IFREG;
    break;
    +#ifdef S_IFLNK
    case ICBTAG_FILE_TYPE_SYMLINK:
    mode |= S_IFLNK;
    break;
    +#endif
    case ICBTAG_FILE_TYPE_CHAR:
    mode |= S_IFCHR;
    break;
    +#ifdef S_IFSOCK
    case ICBTAG_FILE_TYPE_SOCKET:
    mode |= S_IFSOCK;
    break;
    +#endif
    case ICBTAG_FILE_TYPE_BLOCK:
    mode |= S_IFBLK;
    break;
    default: ;
    };

    +#ifdef S_ISUID
    if (i_flags & ICBTAG_FLAG_SETUID) mode |= S_ISUID;
    +#endif
    +#ifdef S_ISGID
    if (i_flags & ICBTAG_FLAG_SETGID) mode |= S_ISGID;
    +#endif
    +#ifdef S_ISVTX
    if (i_flags & ICBTAG_FLAG_STICKY) mode |= S_ISVTX;
    +#endif
    }

    return mode;
    diff -ur libcdio-0.79/lib/udf/udf_time.c libcdio-0.79-new/lib/udf/udf_time.c
    --- libcdio-0.79/lib/udf/udf_time.c Mon Feb 13 03:59:42 2006
    +++ libcdio-0.79-new/lib/udf/udf_time.c Sat Jan 26 17:29:32 2008
    @@ -104,7 +104,11 @@
    };

    #ifdef HAVE_TIMEZONE_VAR
    +#ifdef __MINGW32__
    +__MINGW_IMPORT long timezone;
    +#else
    extern long timezone;
    +#endif
    #endif

    time_t *
    diff -ur libcdio-0.79/src/cddb.c libcdio-0.79-new/src/cddb.c
    --- libcdio-0.79/src/cddb.c Sat Jun 16 23:12:16 2007
    +++ libcdio-0.79-new/src/cddb.c Sat Jan 26 17:30:18 2008
    @@ -48,7 +48,7 @@
    the total length of the disk, and
    the number of tracks.
    */
    -u_int32_t
    +uint32_t
    cddb_discid(CdIo_t *p_cdio, track_t i_tracks)
    {
    int i,t,n=0;
    diff -ur libcdio-0.79/src/cddb.h libcdio-0.79-new/src/cddb.h
    --- libcdio-0.79/src/cddb.h Sat Jun 16 23:12:16 2007
    +++ libcdio-0.79-new/src/cddb.h Sat Jan 26 17:30:17 2008
    @@ -38,7 +38,7 @@
    the total length of the disk, and
    the number of tracks.
    */
    -u_int32_t cddb_discid(CdIo_t *p_cdio, track_t i_tracks);
    +uint32_t cddb_discid(CdIo_t *p_cdio, track_t i_tracks);

    #ifdef HAVE_CDDB
    #include <cddb/cddb.h>

     

  • Anonymous
    2011-04-08

    I also would love to play cds with mplayer! +1

     
    • status: open --> closed
    • milestone: --> Next_Release
     
    • status: closed --> accepted
     
    • status: accepted --> pending
     
    • status: pending --> open
     
  • I've added cdda/cddb/cdparanoia support to builds, I cannot test if it work, feedbacks are welome

     
    • status: open --> closed