From 719096b0a75b25c11692cd103cfa22082b692ff8 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sun, 6 Sep 2009 09:25:52 +0000 Subject: [PATCH] Changed new API call burn_get_media_product_id() to burn_disc_get_media_id() --- cdrskin/cdrskin.c | 4 ++-- cdrskin/cdrskin_timestamp.h | 2 +- libburn/drive.c | 5 +++-- libburn/libburn.h | 9 +++++++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/cdrskin/cdrskin.c b/cdrskin/cdrskin.c index 55256f3..509cad7 100644 --- a/cdrskin/cdrskin.c +++ b/cdrskin/cdrskin.c @@ -5030,7 +5030,7 @@ int Cdrskin_atip(struct CdrskiN *skin, int flag) #ifdef Cdrskin_libburn_has_product_iD - ret= burn_get_media_product_id(drive, &product_id, &media_code1, &media_code2, + ret= burn_disc_get_media_id(drive, &product_id, &media_code1, &media_code2, &book_type, 0); if(ret > 0 && (!current_is_cd) && manuf == NULL && media_code1 != NULL && media_code2 != 0) { @@ -5057,7 +5057,7 @@ int Cdrskin_atip(struct CdrskiN *skin, int flag) product_id= media_code1= media_code2= book_type= NULL; #ifdef Cdrskin_libburn_has_product_iD - ret= burn_get_media_product_id(drive, &product_id, &media_code1, + ret= burn_disc_get_media_id(drive, &product_id, &media_code1, &media_code2, &book_type, 1); #else ret= 0; diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index b2bd055..564905b 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2009.09.06.092330" +#define Cdrskin_timestamP "2009.09.06.092654" diff --git a/libburn/drive.c b/libburn/drive.c index acbea46..f423506 100644 --- a/libburn/drive.c +++ b/libburn/drive.c @@ -2627,7 +2627,7 @@ int burn_get_read_capacity(struct burn_drive *d, int *capacity, int flag) /* ts A90903 : API */ -int burn_get_media_product_id(struct burn_drive *d, +int burn_disc_get_media_id(struct burn_drive *d, char **product_id, char **media_code1, char **media_code2, char **book_type, int flag) { @@ -2637,7 +2637,8 @@ int burn_get_media_product_id(struct burn_drive *d, if (burn_drive_get_drive_role(d) != 1) return 0; ret = mmc_get_media_product_id(d, - product_id, media_code1, media_code2, book_type, 0); + product_id, media_code1, media_code2, book_type, + flag & 1); return ret; } diff --git a/libburn/libburn.h b/libburn/libburn.h index c50fa8c..822a774 100644 --- a/libburn/libburn.h +++ b/libburn/libburn.h @@ -1258,12 +1258,15 @@ int burn_disc_get_profile(struct burn_drive *d, int *pno, char name[80]); text "XXmYYsZZf" from CD ATIP lead-out. @param book_type Book type text for DVD and BD. Caution: is NULL with CD, even if return value says ok. - @param flag Bitfield for control purposes, submit 0 + @param flag Bitfield for control purposes + bit0= do not escape " _/" (not suitable for + burn_guess_manufacturer()) @return 1= ok, product_id and media codes are valid, 0= no product id_available, reply parameters are NULL <0= error + @since 0.7.2 */ -int burn_get_media_product_id(struct burn_drive *d, +int burn_disc_get_media_id(struct burn_drive *d, char **product_id, char **media_code1, char **media_code2, char **book_type, int flag); @@ -1278,6 +1281,8 @@ int burn_get_media_product_id(struct burn_drive *d, @param media_code Media ID code from media (e.g. "W11") @param flag Bitfield for control purposes, submit 0 @return Printable text or NULL on memory shortage. + If the text begins with "Unknown " then no item of the + manufacturer list matched the codes. Dispose by free() when no longer needed. @since 0.7.2 */