libcdio-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libcdio-devel] Re: Submission of new mmc function for libcdio


From: Rocky Bernstein
Subject: Re: [Libcdio-devel] Re: Submission of new mmc function for libcdio
Date: Sat, 30 Jan 2010 11:05:30 -0500

On Fri, Jan 29, 2010 at 5:57 AM, Thomas Schmitt <address@hidden> wrote:

> ...
> Well, then of course rather:
>
>  int cdio_get_profile(CdIo_t *p_cdio, int *pno);
>
> If there is a name lookup function ... is there
> really no profile retriever function yet ?
>

No there isn't one. In libcdio's src/util.c you'll see for example a MMC
call to GET CONFIGURATION.

I am undecided on whether to add one.

Recall that was requested -- which seems reasonable to me -- was
mmc_get_discmode.  This figures out whether we have CD-R, CD-RW and so on.
It is possible that the current profile from the MMC GET CONFIGURATION can
be used as part of the steps for figuring this out. But that is a "how" or
implementation kind of thing, not a "what" kind of thing.

Consider this code from libburn's mmc.c

    if (d->current_profile == 0x1a || d->current_profile == 0x13 ||
        d->current_profile == 0x12 || d->current_profile == 0x43)
        d->status = BURN_DISC_BLANK;

Hint: might be good to create an inline function or macro, DISC_IS_BLANK,
for that complex expression..

This is exactly the knowledge I think would be helpful to have encapsulated
in a library. That is, in order to determine if a disc is blank:
if the driver/OS supports a MMC GET CONFIGURATION, one might look at the
profile of the configuration section and look for those specific profiles.

That said, I think it useful to make it easy to issue some of the
lower-level or more MMC-specific commands that often have to be run in order
to answer the higher-level questions. So it might be useful to have a
mmc_get_configuration and/or a mmc_get_profile .

As always, I welcome the thoughts, concerns, and comments of others.

P.S.
Frank: I hope we haven't lost you here. I think we still are interested in
the feature you suggest.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]