[MPlayer-dev-eng] Audio CD questions
Ingo Brückl
ib at wupperonline.de
Tue Dec 20 17:38:47 CET 2011
Reimar Döffinger wrote on Fri, 16 Dec 2011 21:19:30 +0100:
> On Fri, Dec 16, 2011 at 03:07:26PM +0100, Ingo Brückl wrote:
>> Well, anyway. What I basically need to know is how to get the "number of
>> songs" of an audio CD?
> Well, you already found a way, using cdda://.
> The thing is how to combine that with only playing one track.
First of all, I'd like to thank you for your detailed answers which helped
me a lot.
I've taken a close look at stream_cdda.c and figured out how to solve the
problem. First I came up with the idea to add a '-cdda track=<n>' option
which worked fine until I realized that I cannot pass this as "filename"
from the GUI. So I decided to use the otherwise pointless syntax
"cdda://<n>-<n>" which will play only track <n> but consider all chapters.
The idea is to introduce first/last_sector and use these for reporting while
start/end_sector are used for playback (as before). In case there is no "new
<n>-<n>" syntax first/last_sector don't differ from start/end_sector which
ensures that previous behaviour won't change.
To summarize:
cdda:// plays the whole CD, reports "number of songs" chapters
cdda://3 plays only song #3, reports 1 chapter
cdda://3-4 plays only songs #3 and #4, reports 2 chapters
cdda://3-3 plays only song #3, but reports "number of songs" chapters
The first three are unchanged and behave like they did prior to my patch.
Besides this, I think I found a couple of errors. Patches will follow.
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cdda.patch
Type: text/x-diff
Size: 3120 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20111220/934293d5/attachment-0001.bin>
More information about the MPlayer-dev-eng
mailing list