[mythtv] [RFC] MythMusic: use libcdio to play & rip CDs (Win32 & MacOSX too)

Paul Harrison mythtv at sky.com
Wed Dec 1 15:32:20 UTC 2010

On 30/11/10 16:21, Lawrence Rust wrote:
> Hi,
> I wanted to get MythMusic playing & ripping CDs on Windows so came up
> with this patch (64k so too big to attach):
> http://www.softsystem.co.uk/download/mythtv/mythmusic-cdio.diff
> It provides a new CdDecoder implementation (in cddecoder-cdio.cpp) which
> uses the Gnu libcdio library to access the CD.
> Libcdio http://www.gnu.org/software/libcdio is a highly portable
> replacement for the obsolete cdaudio http://libcdaudio.sourceforge.net
> and also provides a portable implementation of cdparanoia.  The library
> is available for Linux, Windows, Mac OS X, BSD and many other systems.
> This means that Windows and Mac OS users can now play and rip CDs with
> MythMusic :-)
> The patch also provides a replacement (in cddb.cpp & cddb.h) for
> cdaudio's CDDB lookup.  This code was based on cddecoder-darwin.cpp but
> is now OS agnostic, using the the Myth httpcomms class and Qt, and adds
> local ~/.cddb file access & creation.
> Early on I rejected using libcddb http://libcddb.sourceforge.net because
> of its contrived interface and also because it is heavily dependent upon
> the regex library for which there is no robust implementation available
> for mingw.
> This CDDB implementation should also close ticket #7857
> http://svn.mythtv.org/trac/ticket/7857  - Replace libcdaudio freedb
> lookups.  The new Cddb interface provides simple access to all the
> fields available from a local file or remote cddb query.
> Affected files:
> mythplugins/configure
> mythplugins/mythmusic/mythmusic/mythmusic.pro
> mythplugins/mythmusic/mythmusic/playbackbox.cpp
> mythplugins/mythmusic/mythmusic/cddecoder.h
> mythplugins/mythmusic/mythmusic/cddecoder.cpp
> + mythplugins/mythmusic/mythmusic/cddecoder-cdio.cpp
> + mythplugins/mythmusic/mythmusic/cddb.cpp
> + mythplugins/mythmusic/mythmusic/cddb.h
> mythplugins/mythmusic/mythmusic/cdrip.cpp
> mythplugins/mythmusic/mythmusic/decoder.cpp
> mythplugins/mythmusic/mythmusic/databasebox.cpp
> mythplugins/mythmusic/mythmusic/main.cpp
> mythplugins/mythmusic/mythmusic/musiccommon.cpp
> Comments please...

Thanks for the patch.

Is there any reason we couldn't just make libcdio a compulsory
dependency and remove cdparanoia and libcdaudio all together?

A few minor things I spotted while browsing through the patch :-

httpcomms is going to be removed use
GetMythDownloadManager()->download() instead.

The description in CdDecoderFactory::description() doesn't look correct :)

Our coding standards (http://www.mythtv.org/wiki/Coding_Standards) say
we should use m_someVariable rather than this->someVariable to identify
class member variables.
Paul H.

More information about the mythtv-dev mailing list