DS9 backend: reading an audio cd + Patch

Tanguy Krotoff tkrotoff at gmail.com
Thu Nov 27 21:30:02 CET 2008


Hello

I guess this mail is mostly for Thierry Bastian who is behind the DS9 backend :)

I'm trying to read audio cds under Windows using the DS9 backend
without success.
Here some steps I have done on my Windows XP SP3:

- Download the cdda DirectShow filter from
http://sourceforge.net/project/showfiles.php?group_id=82303&package_id=84799
(Media Player Classic - guliverkli project)
- regsvr32.exe cddareader.ax
- I've tested with the old Windows Media Player C:\Program
Files\Windows Media Player\mplayer2.exe and it works fine
with cddareader.ax. On a "clean" Windows XP, without cddareader.ax, it
does not work (Yep everybody knows that Windows does not come with the
right DS filters, that's why codec packs, VLC and MPlayer are quite
popular)
Inside the DS9 backend, without cddareader.ax you get
qaudiocdreader.cpp:168 "unable to load the TOC from the CD"
with cddareader.ax qaudiocdreader.cpp "tocRead" variable is true (cool!)
- I call:
mediaObject->setCurrentSource(Phonon::MediaSource(Phonon::Cd));
mediaObject->play();
but it still does not work and my DirectShow knowledge is pretty poor :/

So I would like to know the steps for reading an audio CD using the
DS9 backend (if it is supposed to work)

I've noticed that Phonon::MediaSource deviceName parameter is not
taken into account by the DS9 backend.
So here is a simple patch for qaudiocdreader.cpp (cdaudio.diff - attached file)


Another concern (Phonon only related) is the possibility to pass a 3rd
argument to Phonon::MediaSource:
Current constructor: Phonon::MediaSource(Phonon::DiscType discType,
const QString & deviceName = QString())
Proposition: Phonon::MediaSource(Phonon::DiscType discType, const
QString & deviceName = QString(), int track = 1)

the track (or title?) argument gives the user the possibility to play
a specific track from an audiocd/DVD/VCD (default value is of course
the first one)

Why?
Under Windows, using the file manager when an audio cd is inserted you get:
D:/Track01.cda
D:/Track02.cda
...
A common use under Windows is to double-clic on these "shortcuts" to
play a specific track from the audio CD (works with Winamp,
foobar2000, Windows Media Player...) VLC let's you also choose the
title/track you wanna play from a DVD/CD audio (inside the Media/Open
Disc...)

What do you think about this?

Thx


Btw: videorenderer_soft.cpp:32, it's better to write #include
<QtCore/qmath.h> instead of #include <qmath.h>
This way when compiling the DS9 backend, you just need to include
C:\Qt\4.4.3\include without all the others
(C:\Qt\4.4.3\include\QtCore, C:\Qt\4.4.3\include\QtGui...)

-- 
Tanguy Krotoff <tkrotoff at gmail.com>
+33 6 68 42 70 24
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cdaudio.diff
Type: text/x-patch
Size: 1884 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/phonon-backends/attachments/20081127/0a8ea89d/attachment.diff 


More information about the Phonon-backends mailing list