[Goodies-commits] r4765 - xfburn/trunk/xfburn

David Mohr squisher at xfce.org
Sat May 10 05:00:20 CEST 2008


Author: squisher
Date: 2008-05-10 03:00:19 +0000 (Sat, 10 May 2008)
New Revision: 4765

Modified:
   xfburn/trunk/xfburn/xfburn-device-list.c
   xfburn/trunk/xfburn/xfburn-device-list.h
Log:
Adding debugging output about disc format

Modified: xfburn/trunk/xfburn/xfburn-device-list.c
===================================================================
--- xfburn/trunk/xfburn/xfburn-device-list.c	2008-05-10 00:14:09 UTC (rev 4764)
+++ xfburn/trunk/xfburn/xfburn-device-list.c	2008-05-10 03:00:19 UTC (rev 4765)
@@ -87,7 +87,10 @@
   char media_name[80];
   int factor;
   gint ret;
-  //int i;
+  int status, num_formats;
+  off_t size;
+  unsigned bl_sas;
+  int i;
 
   /* empty previous list */
   g_slist_free (device->supported_cdr_speeds);
@@ -112,7 +115,15 @@
     media_no = 0;
   }
   DBG ("media_no = %d (%s), %s erasable", media_no, media_name, (burn_disc_erasable (drive_info->drive) ? "" : "NOT"));
+  ret = burn_disc_get_formats (drive_info->drive, &status, &size, &bl_sas, &num_formats);
+  DBG ("_get_formats (%d) = %d, %lu, %d, %d", ret, status, size, bl_sas, num_formats);
+  for (i=0; i<num_formats; i++) {
+    int type;
+    ret = burn_disc_get_format_descr (drive_info->drive, i, &type, &size, &bl_sas);
+    DBG ("_get_format_descr (%d) = 0x%x, %lu, %u", ret, type, size, bl_sas);
+  }
 
+
   if (!(disc_status == BURN_DISC_BLANK || disc_status == BURN_DISC_APPENDABLE)) {
     DBG ("no writable / appendable disc found in drive, speed list not updated");
     return;

Modified: xfburn/trunk/xfburn/xfburn-device-list.h
===================================================================
--- xfburn/trunk/xfburn/xfburn-device-list.h	2008-05-10 00:14:09 UTC (rev 4764)
+++ xfburn/trunk/xfburn/xfburn-device-list.h	2008-05-10 03:00:19 UTC (rev 4765)
@@ -26,6 +26,18 @@
 
 #include <libburn.h>
 
+/* what kind of recordable discs are there */
+enum XfburnDiscTypes{
+  /* record-once types */
+  XFBURN_CDR,
+  XFBURN_DVD_R, /* we don't need a distinction for record once between + / - */
+  XFBURN_REWRITABLE, /* marker, everything after this is rewritable */
+  XFBURN_CDRW,
+  XFBURN_DVD_RAM,
+  XFBURN_DVD_MINUS_RW,
+  XFBURN_DVD_PLUS_RW,
+};
+
 typedef struct
 {
   gchar *name;




More information about the Goodies-commits mailing list