brasero r887 - in trunk: . src src/plugins/cdrkit src/plugins/cdrtools src/plugins/growisofs src/plugins/libburnia



Author: philippr
Date: Fri Jun 13 18:33:51 2008
New Revision: 887
URL: http://svn.gnome.org/viewvc/brasero?rev=887&view=rev

Log:
	Fix #470234 â Doesn\'t format fresh dvd+rw before burning

	* src/burn-caps.c (brasero_burn_caps_new_task),
	(brasero_caps_try_output_with_blanking),
	(brasero_burn_caps_get_flags), (brasero_caps_disc_new_status):
	* src/burn-debug.c (brasero_debug_medium_info_to_string):
	* src/burn-medium.c (brasero_medium_get_capacity_DVD_RW):
	* src/burn-medium.h:
	* src/plugins/cdrkit/burn-wodim.c (brasero_wodim_stdout_read),
	(brasero_wodim_export_caps):
	* src/plugins/cdrtools/burn-cdrecord.c
	(brasero_cdrecord_stdout_read), (brasero_cdrecord_export_caps):
	* src/plugins/growisofs/burn-dvd-rw-format.c
	(brasero_dvd_rw_format_export_caps):
	* src/plugins/growisofs/burn-growisofs.c
	(brasero_growisofs_export_caps):
	* src/plugins/libburnia/burn-libburn.c
	(brasero_libburn_export_caps):
	* src/scsi-read-format-capacities.h:

Modified:
   trunk/ChangeLog
   trunk/src/burn-caps.c
   trunk/src/burn-debug.c
   trunk/src/burn-medium.c
   trunk/src/burn-medium.h
   trunk/src/plugins/cdrkit/burn-wodim.c
   trunk/src/plugins/cdrtools/burn-cdrecord.c
   trunk/src/plugins/growisofs/burn-dvd-rw-format.c
   trunk/src/plugins/growisofs/burn-growisofs.c
   trunk/src/plugins/libburnia/burn-libburn.c
   trunk/src/scsi-read-format-capacities.h

Modified: trunk/src/burn-caps.c
==============================================================================
--- trunk/src/burn-caps.c	(original)
+++ trunk/src/burn-caps.c	Fri Jun 13 18:33:51 2008
@@ -1250,6 +1250,7 @@
 		/* retry with the same disc type but blank this time */
 		media &= ~(BRASERO_MEDIUM_CLOSED|
 			   BRASERO_MEDIUM_APPENDABLE|
+	   		   BRASERO_MEDIUM_UNFORMATTED|
 			   BRASERO_MEDIUM_HAS_DATA|
 			   BRASERO_MEDIUM_HAS_AUDIO);
 		media |= BRASERO_MEDIUM_BLANK;
@@ -1776,6 +1777,7 @@
 	media = output->subtype.media;
 	media &= ~(BRASERO_MEDIUM_CLOSED|
 		   BRASERO_MEDIUM_APPENDABLE|
+		   BRASERO_MEDIUM_UNFORMATTED|
 		   BRASERO_MEDIUM_HAS_DATA|
 		   BRASERO_MEDIUM_HAS_AUDIO);
 	media |= BRASERO_MEDIUM_BLANK;
@@ -2312,7 +2314,7 @@
 		 * then write on its own. Basically that works only with
 		 * overwrite formatted discs, DVD+RW, ...) */
 
-		if (!(media & (BRASERO_MEDIUM_HAS_AUDIO|BRASERO_MEDIUM_HAS_DATA))) {
+		if (!(media & (BRASERO_MEDIUM_HAS_AUDIO|BRASERO_MEDIUM_HAS_DATA|BRASERO_MEDIUM_UNFORMATTED))) {
 			/* media must have data/audio */
 			return BRASERO_BURN_NOT_SUPPORTED;
 		}
@@ -2328,11 +2330,12 @@
 		supported_flags |= BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE;
 		compulsory_flags |= BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE;
 
-		/* pretends it is blank and see if it would work. If it works
-		 * then that means that the BLANK_BEFORE_WRITE flag is
-		 * compulsory. */
+		/* pretends it is blank and formatted to see if it would work.
+		 * If it works then that means that the BLANK_BEFORE_WRITE flag
+		 * is compulsory. */
 		media &= ~(BRASERO_MEDIUM_CLOSED|
 			   BRASERO_MEDIUM_APPENDABLE|
+			   BRASERO_MEDIUM_UNFORMATTED|
 			   BRASERO_MEDIUM_HAS_DATA|
 			   BRASERO_MEDIUM_HAS_AUDIO);
 		media |= BRASERO_MEDIUM_BLANK;
@@ -2946,7 +2949,19 @@
 	if ((type & BRASERO_MEDIUM_BLANK)
 	&& !(media & BRASERO_MEDIUM_ROM)) {
 		/* if media is blank there is no other possible property */
-		retval = brasero_caps_disc_lookup_or_create (retval, media|BRASERO_MEDIUM_BLANK);
+		if (BRASERO_MEDIUM_IS (type, BRASERO_MEDIUM_DVDRW_PLUS)
+		||  BRASERO_MEDIUM_IS (type, BRASERO_MEDIUM_DVDRW_RESTRICTED)
+		||  BRASERO_MEDIUM_IS (type, BRASERO_MEDIUM_DVDRW_PLUS_DL)) {
+			/* This is only for above types */
+			retval = brasero_caps_disc_lookup_or_create (retval,
+								     media|
+								     BRASERO_MEDIUM_BLANK|
+								     (type & BRASERO_MEDIUM_UNFORMATTED));
+		}
+		else
+			retval = brasero_caps_disc_lookup_or_create (retval,
+								     media|
+								     BRASERO_MEDIUM_BLANK);
 	}
 
 	if (type & BRASERO_MEDIUM_CLOSED) {

Modified: trunk/src/burn-debug.c
==============================================================================
--- trunk/src/burn-debug.c	(original)
+++ trunk/src/burn-debug.c	Fri Jun 13 18:33:51 2008
@@ -225,6 +225,9 @@
 
 	if (media & BRASERO_MEDIUM_HAS_AUDIO)
 		strcat (buffer, "with audio ");
+
+	if (media & BRASERO_MEDIUM_UNFORMATTED)
+		strcat (buffer, "Unformatted ");
 }
 
 static void

Modified: trunk/src/burn-medium.c
==============================================================================
--- trunk/src/burn-medium.c	(original)
+++ trunk/src/burn-medium.c	Fri Jun 13 18:33:51 2008
@@ -624,9 +624,13 @@
 		return BRASERO_BURN_ERR;
 	}
 
+	/* see if the media is already formatted */
 	current = hdr->max_caps;
+	if (!(current->type & BRASERO_SCSI_DESC_FORMATTED)) {
+		BRASERO_BURN_LOG ("Unformatted media");
+		priv->info |= BRASERO_MEDIUM_UNFORMATTED;
+	}
 
-	/* see if the media is already formatted */
 	max = (hdr->len - 
 	      sizeof (BraseroScsiMaxCapacityDesc)) /
 	      sizeof (BraseroScsiFormattableCapacityDesc);
@@ -642,6 +646,7 @@
 				/* that can happen */
 				if (!priv->block_size)
 					priv->block_size = 2048;
+
 				break;
 			}
 		}

Modified: trunk/src/burn-medium.h
==============================================================================
--- trunk/src/burn-medium.h	(original)
+++ trunk/src/burn-medium.h	Fri Jun 13 18:33:51 2008
@@ -107,9 +107,12 @@
 	BRASERO_MEDIUM_CLOSED			= 1 << 18,
 	BRASERO_MEDIUM_APPENDABLE		= 1 << 19,
 
-	BRASERO_MEDIUM_PROTECTED		= 1 << 20,
-	BRASERO_MEDIUM_HAS_DATA			= 1 << 21,
-	BRASERO_MEDIUM_HAS_AUDIO		= 1 << 22,
+	/* Only used for DVD+RW, DVD-RW restricted */
+	BRASERO_MEDIUM_UNFORMATTED		= 1 << 20,
+
+	BRASERO_MEDIUM_PROTECTED		= 1 << 21,
+	BRASERO_MEDIUM_HAS_DATA			= 1 << 22,
+	BRASERO_MEDIUM_HAS_AUDIO		= 1 << 23,
 } BraseroMedia;
 
 #define BRASERO_MEDIUM_CDROM		(BRASERO_MEDIUM_CD|		\
@@ -174,7 +177,7 @@
 #define BRASERO_MEDIUM_ATTR(media)	((media) & 0x1C000)
 #define BRASERO_MEDIUM_STATUS(media)	((media) & 0xE0000)
 #define BRASERO_MEDIUM_SUBTYPE(media)	((media) & 0x1FC0)
-#define BRASERO_MEDIUM_INFO(media)	((media) & 0x700000)
+#define BRASERO_MEDIUM_INFO(media)	((media) & 0xFE0000)
 
 #define BRASERO_MEDIUM_IS(media, type)	(((media)&(type))==(type))
 

Modified: trunk/src/plugins/cdrkit/burn-wodim.c
==============================================================================
--- trunk/src/plugins/cdrkit/burn-wodim.c	(original)
+++ trunk/src/plugins/cdrkit/burn-wodim.c	Fri Jun 13 18:33:51 2008
@@ -297,6 +297,11 @@
 
 		brasero_job_start_progress (BRASERO_JOB (wodim), FALSE);
 	}
+	else if (sscanf (line, "Formating in progress: %d.%d %% done", &mb_written, &mb_total) == 2) {
+		brasero_job_start_progress (BRASERO_JOB (wodim), FALSE);
+		brasero_job_set_progress (BRASERO_JOB (wodim),
+					  (gdouble) ((gdouble) mb_written + ((gdouble) mb_total) / 10.0));
+	}
 	else if (sscanf (line, "Track %*d: %*s %d MB ", &mb_total) == 1) {
 /*		if (mb_total > 0)
 			priv->tracks_total_bytes += mb_total * 1048576;
@@ -1093,20 +1098,6 @@
 	 * used to start a multisession DVD-RW or even continue one.
 	 * I didn't try with DVD-W since I didn't want to waste one for nothing.
 	 */
-
-/*	brasero_plugin_set_flags (plugin,
-				  BRASERO_MEDIUM_DVD|
-				  BRASERO_MEDIUM_SEQUENTIAL|
-				  BRASERO_MEDIUM_WRITABLE|
-				  BRASERO_MEDIUM_REWRITABLE|
-				  BRASERO_MEDIUM_BLANK,
-				  BRASERO_BURN_FLAG_BURNPROOF|
-				  BRASERO_BURN_FLAG_OVERBURN|
-				  BRASERO_BURN_FLAG_DUMMY|
-				  BRASERO_BURN_FLAG_NOGRACE,
-				  BRASERO_BURN_FLAG_NONE);
-*/
-
 	brasero_plugin_set_flags (plugin,
 				  BRASERO_MEDIUM_DVD|
 				  BRASERO_MEDIUM_SEQUENTIAL|
@@ -1120,33 +1111,6 @@
 				  BRASERO_BURN_FLAG_NOGRACE,
 				  BRASERO_BURN_FLAG_NONE);
 
-/*	brasero_plugin_set_flags (plugin,
-				  BRASERO_MEDIUM_DVD|
-				  BRASERO_MEDIUM_SEQUENTIAL|
-				  BRASERO_MEDIUM_WRITABLE|
-				  BRASERO_MEDIUM_REWRITABLE|
-				  BRASERO_MEDIUM_APPENDABLE|
-				  BRASERO_MEDIUM_HAS_DATA,
-				  BRASERO_BURN_FLAG_BURNPROOF|
-				  BRASERO_BURN_FLAG_OVERBURN|
-				  BRASERO_BURN_FLAG_MULTI|
-				  BRASERO_BURN_FLAG_DUMMY|
-				  BRASERO_BURN_FLAG_NOGRACE|
-				  BRASERO_BURN_FLAG_APPEND|
-				  BRASERO_BURN_FLAG_MERGE,
-				  BRASERO_BURN_FLAG_NONE); */
-
-	/* DVD+ R/RW don't support dummy mode 
-	 * NOTE: don't mix dao and multisession */
-/*	brasero_plugin_set_flags (plugin,
-				  BRASERO_MEDIUM_DVDR_PLUS|
-				  BRASERO_MEDIUM_BLANK,
-				  BRASERO_BURN_FLAG_DAO|
-				  BRASERO_BURN_FLAG_BURNPROOF|
-				  BRASERO_BURN_FLAG_OVERBURN|
-				  BRASERO_BURN_FLAG_NOGRACE,
-				  BRASERO_BURN_FLAG_NONE);
-*/
 	brasero_plugin_set_flags (plugin,
 				  BRASERO_MEDIUM_DVDR_PLUS|
 				  BRASERO_MEDIUM_BLANK,
@@ -1156,20 +1120,8 @@
 				  BRASERO_BURN_FLAG_NOGRACE,
 				  BRASERO_BURN_FLAG_NONE);
 
-/*
-	brasero_plugin_set_flags (plugin,
-				  BRASERO_MEDIUM_DVDR_PLUS|
-				  BRASERO_MEDIUM_APPENDABLE|
-				  BRASERO_MEDIUM_HAS_DATA,
-				  BRASERO_BURN_FLAG_BURNPROOF|
-				  BRASERO_BURN_FLAG_OVERBURN|
-				  BRASERO_BURN_FLAG_MULTI|
-				  BRASERO_BURN_FLAG_NOGRACE|
-				  BRASERO_BURN_FLAG_APPEND|
-				  BRASERO_BURN_FLAG_MERGE,
-				  BRASERO_BURN_FLAG_NONE);
-*/
-	/* for DVD+RW */
+	/* for DVD+RW 
+	 * NOTE: we don't accept unformatted media here */
 	brasero_plugin_set_flags (plugin,
 				  BRASERO_MEDIUM_DVDRW_PLUS|
 				  BRASERO_MEDIUM_BLANK,
@@ -1224,40 +1176,24 @@
 	/* blanking/formatting caps and flags for +/sequential RW
 	 * NOTE: restricted overwrite DVD-RW can't be formatted.
 	 * moreover DVD+RW are formatted while DVD-RW sequential are blanked.
-	  * NOTE: blanking DVD-RW doesn't work */
+	 * NOTE: blanking DVD-RW doesn't work */
 	output = brasero_caps_disc_new (BRASERO_MEDIUM_DVD|
 					BRASERO_MEDIUM_PLUS|
-//					BRASERO_MEDIUM_SEQUENTIAL|
 					BRASERO_MEDIUM_REWRITABLE|
 					BRASERO_MEDIUM_APPENDABLE|
 					BRASERO_MEDIUM_CLOSED|
 					BRASERO_MEDIUM_HAS_DATA|
+					BRASERO_MEDIUM_UNFORMATTED|
 					BRASERO_MEDIUM_BLANK);
 	brasero_plugin_blank_caps (plugin, output);
 	g_slist_free (output);
 
-	/* This media can be blanked fast or full like any CDRW.
-	 * From the tests, it appears that the way wodim formats the DVDRW makes
-	 * it unable to support multisession. dvd+rw-format is needed to format
-	 * it correctly after a fast blanking. 
-	brasero_plugin_set_blank_flags (plugin,
-					BRASERO_MEDIUM_DVD|
-					BRASERO_MEDIUM_SEQUENTIAL|
-					BRASERO_MEDIUM_REWRITABLE|
-					BRASERO_MEDIUM_APPENDABLE|
-					BRASERO_MEDIUM_HAS_DATA|
-					BRASERO_MEDIUM_BLANK|
-					BRASERO_MEDIUM_CLOSED,
-					BRASERO_BURN_FLAG_FAST_BLANK|
-					BRASERO_BURN_FLAG_NOGRACE,
-					BRASERO_BURN_FLAG_NONE);
-	*/
-
 	/* again DVD+RW don't support dummy */
 	brasero_plugin_set_blank_flags (plugin,
 					BRASERO_MEDIUM_DVDRW_PLUS|
 					BRASERO_MEDIUM_APPENDABLE|
 					BRASERO_MEDIUM_HAS_DATA|
+					BRASERO_MEDIUM_UNFORMATTED|
 					BRASERO_MEDIUM_BLANK|
 					BRASERO_MEDIUM_CLOSED,
 					BRASERO_BURN_FLAG_NOGRACE,

Modified: trunk/src/plugins/cdrtools/burn-cdrecord.c
==============================================================================
--- trunk/src/plugins/cdrtools/burn-cdrecord.c	(original)
+++ trunk/src/plugins/cdrtools/burn-cdrecord.c	Fri Jun 13 18:33:51 2008
@@ -302,6 +302,12 @@
 /*		if (mb_total > 0)
 			priv->tracks_total_bytes += mb_total * 1048576;
 */	}
+	else if (strstr (line, "Formatting media")) {
+		brasero_job_set_current_action (BRASERO_JOB (process),
+						BRASERO_BURN_ACTION_BLANKING,
+						_("Formatting media"),
+						FALSE);
+	}
 	else if (strstr (line, "Sending CUE sheet")) {
 		BraseroTrackType type;
 
@@ -1022,10 +1028,10 @@
 	const BraseroMedia dvd_media = BRASERO_MEDIUM_DVD|
 				       BRASERO_MEDIUM_PLUS|
 				       BRASERO_MEDIUM_SEQUENTIAL|
-//				       BRASERO_MEDIUM_RESTRICTED|
 				       BRASERO_MEDIUM_WRITABLE|
 				       BRASERO_MEDIUM_REWRITABLE|
 				       BRASERO_MEDIUM_BLANK|
+				       BRASERO_MEDIUM_UNFORMATTED|
 				       BRASERO_MEDIUM_APPENDABLE|
 				       BRASERO_MEDIUM_HAS_DATA;
 	const BraseroMedia media_rw = BRASERO_MEDIUM_CD|
@@ -1080,21 +1086,6 @@
 	g_slist_free (output);
 	g_slist_free (input);
 
-	/* For DVD-W and DVD-RW sequential
-	 * NOTE: DAO et MULTI are exclusive. */
-/*	brasero_plugin_set_flags (plugin,
-				  BRASERO_MEDIUM_DVD|
-				  BRASERO_MEDIUM_SEQUENTIAL|
-				  BRASERO_MEDIUM_WRITABLE|
-				  BRASERO_MEDIUM_REWRITABLE|
-				  BRASERO_MEDIUM_BLANK,
-				  BRASERO_BURN_FLAG_BURNPROOF|
-				  BRASERO_BURN_FLAG_OVERBURN|
-				  BRASERO_BURN_FLAG_MULTI|
-				  BRASERO_BURN_FLAG_DUMMY|
-				  BRASERO_BURN_FLAG_NOGRACE,
-				  BRASERO_BURN_FLAG_NONE);
-*/
 	brasero_plugin_set_flags (plugin,
 				  BRASERO_MEDIUM_DVD|
 				  BRASERO_MEDIUM_SEQUENTIAL|
@@ -1107,68 +1098,7 @@
 				  BRASERO_BURN_FLAG_DUMMY|
 				  BRASERO_BURN_FLAG_NOGRACE,
 				  BRASERO_BURN_FLAG_NONE);
-/*
-	brasero_plugin_set_flags (plugin,
-				  BRASERO_MEDIUM_DVD|
-				  BRASERO_MEDIUM_SEQUENTIAL|
-				  BRASERO_MEDIUM_WRITABLE|
-				  BRASERO_MEDIUM_REWRITABLE|
-				  BRASERO_MEDIUM_APPENDABLE|
-				  BRASERO_MEDIUM_HAS_DATA,
-				  BRASERO_BURN_FLAG_BURNPROOF|
-				  BRASERO_BURN_FLAG_OVERBURN|
-				  BRASERO_BURN_FLAG_MULTI|
-				  BRASERO_BURN_FLAG_DUMMY|
-				  BRASERO_BURN_FLAG_NOGRACE|
-				  BRASERO_BURN_FLAG_APPEND|
-				  BRASERO_BURN_FLAG_MERGE,
-				  BRASERO_BURN_FLAG_NONE);
-*/
-	/* see NOTE for DVD-RW restricted overwrite below */
-/*	brasero_plugin_set_flags (plugin,
-				  BRASERO_MEDIUM_DVD|
-				  BRASERO_MEDIUM_RESTRICTED|
-				  BRASERO_MEDIUM_REWRITABLE|
-				  BRASERO_MEDIUM_BLANK,
-				  BRASERO_BURN_FLAG_DAO|
-				  BRASERO_BURN_FLAG_MULTI|
-				  BRASERO_BURN_FLAG_BURNPROOF|
-				  BRASERO_BURN_FLAG_OVERBURN|
-				  BRASERO_BURN_FLAG_DUMMY|
-				  BRASERO_BURN_FLAG_NOGRACE|
-				  BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE,
-				  BRASERO_BURN_FLAG_MULTI);
 
-	brasero_plugin_set_flags (plugin,
-				  BRASERO_MEDIUM_DVD|
-				  BRASERO_MEDIUM_RESTRICTED|
-				  BRASERO_MEDIUM_REWRITABLE|
-				  BRASERO_MEDIUM_APPENDABLE|
-				  BRASERO_MEDIUM_CLOSED|
-				  BRASERO_MEDIUM_HAS_DATA,
-				  BRASERO_BURN_FLAG_BURNPROOF|
-				  BRASERO_BURN_FLAG_OVERBURN|
-				  BRASERO_BURN_FLAG_MULTI|
-				  BRASERO_BURN_FLAG_DUMMY|
-				  BRASERO_BURN_FLAG_NOGRACE|
-				  BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE,
-				  BRASERO_BURN_FLAG_MULTI);
-
-	brasero_plugin_set_flags (plugin,
-				  BRASERO_MEDIUM_DVD|
-				  BRASERO_MEDIUM_RESTRICTED|
-				  BRASERO_MEDIUM_REWRITABLE|
-				  BRASERO_MEDIUM_APPENDABLE|
-				  BRASERO_MEDIUM_CLOSED|
-				  BRASERO_MEDIUM_HAS_DATA,
-				  BRASERO_BURN_FLAG_BURNPROOF|
-				  BRASERO_BURN_FLAG_OVERBURN|
-				  BRASERO_BURN_FLAG_MULTI|
-				  BRASERO_BURN_FLAG_DUMMY|
-				  BRASERO_BURN_FLAG_NOGRACE|
-				  BRASERO_BURN_FLAG_MERGE,
-				  BRASERO_BURN_FLAG_MULTI);
-*/
 	/* DVD+ R/RW don't support dummy mode 
 	 * NOTE: don't mix dao and multisession */
 	brasero_plugin_set_flags (plugin,
@@ -1180,31 +1110,10 @@
 				  BRASERO_BURN_FLAG_NOGRACE,
 				  BRASERO_BURN_FLAG_NONE);
 
-/*	brasero_plugin_set_flags (plugin,
-				  BRASERO_MEDIUM_DVDR_PLUS|
-				  BRASERO_MEDIUM_BLANK,
-				  BRASERO_BURN_FLAG_BURNPROOF|
-				  BRASERO_BURN_FLAG_OVERBURN|
-				  BRASERO_BURN_FLAG_MULTI|
-				  BRASERO_BURN_FLAG_NOGRACE,
-				  BRASERO_BURN_FLAG_NONE);
-*/
-/*
-	brasero_plugin_set_flags (plugin,
-				  BRASERO_MEDIUM_DVDR_PLUS|
-				  BRASERO_MEDIUM_APPENDABLE|
-				  BRASERO_MEDIUM_HAS_DATA,
-				  BRASERO_BURN_FLAG_BURNPROOF|
-				  BRASERO_BURN_FLAG_OVERBURN|
-				  BRASERO_BURN_FLAG_MULTI|
-				  BRASERO_BURN_FLAG_NOGRACE|
-				  BRASERO_BURN_FLAG_APPEND|
-				  BRASERO_BURN_FLAG_MERGE,
-				  BRASERO_BURN_FLAG_NONE);
-*/
 	/* for DVD+RW */
 	brasero_plugin_set_flags (plugin,
 				  BRASERO_MEDIUM_DVDRW_PLUS|
+				  BRASERO_MEDIUM_UNFORMATTED|
 				  BRASERO_MEDIUM_BLANK,
 				  BRASERO_BURN_FLAG_DAO|
 				  BRASERO_BURN_FLAG_BURNPROOF|
@@ -1271,46 +1180,21 @@
 	  * NOTE: blanking DVD-RW doesn't work */
 	output = brasero_caps_disc_new (BRASERO_MEDIUM_DVD|
 					BRASERO_MEDIUM_PLUS|
-//					BRASERO_MEDIUM_SEQUENTIAL|
-//					BRASERO_MEDIUM_RESTRICTED|
 					BRASERO_MEDIUM_REWRITABLE|
 					BRASERO_MEDIUM_APPENDABLE|
 					BRASERO_MEDIUM_CLOSED|
 					BRASERO_MEDIUM_HAS_DATA|
+					BRASERO_MEDIUM_UNFORMATTED|
 					BRASERO_MEDIUM_BLANK);
 	brasero_plugin_blank_caps (plugin, output);
 	g_slist_free (output);
 
-	/* This media can be blanked fast or full like any CDRW. */
-/*	brasero_plugin_set_blank_flags (plugin,
-					BRASERO_MEDIUM_DVD|
-					BRASERO_MEDIUM_SEQUENTIAL|
-					BRASERO_MEDIUM_REWRITABLE|
-					BRASERO_MEDIUM_APPENDABLE|
-					BRASERO_MEDIUM_HAS_DATA|
-					BRASERO_MEDIUM_BLANK|
-					BRASERO_MEDIUM_CLOSED,
-//					BRASERO_BURN_FLAG_FAST_BLANK|
-					BRASERO_BURN_FLAG_NOGRACE,
-					BRASERO_BURN_FLAG_NONE);
-*/
-	/* For DVD-RW restricted overwrite */
-/*	brasero_plugin_set_blank_flags (plugin,
-					BRASERO_MEDIUM_DVD|
-					BRASERO_MEDIUM_RESTRICTED|
-					BRASERO_MEDIUM_REWRITABLE|
-					BRASERO_MEDIUM_APPENDABLE|
-					BRASERO_MEDIUM_HAS_DATA|
-					BRASERO_MEDIUM_BLANK|
-					BRASERO_MEDIUM_CLOSED,
-					BRASERO_BURN_FLAG_NOGRACE,
-					BRASERO_BURN_FLAG_NONE);
-*/
 	/* again DVD+RW don't support dummy */
 	brasero_plugin_set_blank_flags (plugin,
 					BRASERO_MEDIUM_DVDRW_PLUS|
 					BRASERO_MEDIUM_APPENDABLE|
 					BRASERO_MEDIUM_HAS_DATA|
+					BRASERO_MEDIUM_UNFORMATTED|
 					BRASERO_MEDIUM_BLANK|
 					BRASERO_MEDIUM_CLOSED,
 					BRASERO_BURN_FLAG_NOGRACE,

Modified: trunk/src/plugins/growisofs/burn-dvd-rw-format.c
==============================================================================
--- trunk/src/plugins/growisofs/burn-dvd-rw-format.c	(original)
+++ trunk/src/plugins/growisofs/burn-dvd-rw-format.c	Fri Jun 13 18:33:51 2008
@@ -159,6 +159,7 @@
 				   BRASERO_MEDIUM_APPENDABLE|
 				   BRASERO_MEDIUM_CLOSED|
 				   BRASERO_MEDIUM_HAS_DATA|
+				   BRASERO_MEDIUM_UNFORMATTED|
 				   BRASERO_MEDIUM_BLANK;
 	gchar *prog_name;
 	GSList *output;

Modified: trunk/src/plugins/growisofs/burn-growisofs.c
==============================================================================
--- trunk/src/plugins/growisofs/burn-growisofs.c	(original)
+++ trunk/src/plugins/growisofs/burn-growisofs.c	Fri Jun 13 18:33:51 2008
@@ -692,6 +692,7 @@
 	output = brasero_caps_disc_new (BRASERO_MEDIUM_DVD|
 					BRASERO_MEDIUM_SEQUENTIAL|
 					BRASERO_MEDIUM_REWRITABLE|
+					BRASERO_MEDIUM_UNFORMATTED|
 					BRASERO_MEDIUM_BLANK);
 
 	brasero_plugin_link_caps (plugin, output, input);
@@ -703,6 +704,7 @@
 					BRASERO_MEDIUM_PLUS|
 					BRASERO_MEDIUM_RESTRICTED|
 					BRASERO_MEDIUM_REWRITABLE|
+					BRASERO_MEDIUM_UNFORMATTED|
 					BRASERO_MEDIUM_BLANK|
 					BRASERO_MEDIUM_CLOSED|
 					BRASERO_MEDIUM_APPENDABLE|
@@ -720,6 +722,7 @@
 					BRASERO_MEDIUM_JUMP|
 					BRASERO_MEDIUM_WRITABLE|
 					BRASERO_MEDIUM_REWRITABLE|
+					BRASERO_MEDIUM_UNFORMATTED|
 					BRASERO_MEDIUM_BLANK|
 					BRASERO_MEDIUM_APPENDABLE|
 					BRASERO_MEDIUM_HAS_DATA);
@@ -755,6 +758,7 @@
 				  BRASERO_MEDIUM_JUMP|
 				  BRASERO_MEDIUM_WRITABLE|
 				  BRASERO_MEDIUM_REWRITABLE|
+				  BRASERO_MEDIUM_UNFORMATTED|
 				  BRASERO_MEDIUM_BLANK,
 				  BRASERO_BURN_FLAG_BURNPROOF|
 				  BRASERO_BURN_FLAG_OVERBURN|
@@ -770,6 +774,7 @@
 				  BRASERO_MEDIUM_JUMP|
 				  BRASERO_MEDIUM_WRITABLE|
 				  BRASERO_MEDIUM_REWRITABLE|
+				  BRASERO_MEDIUM_UNFORMATTED|
 				  BRASERO_MEDIUM_BLANK,
 				  BRASERO_BURN_FLAG_DAO|
 				  BRASERO_BURN_FLAG_BURNPROOF|
@@ -801,6 +806,7 @@
 				  BRASERO_MEDIUM_DVD|
 				  BRASERO_MEDIUM_RESTRICTED|
 				  BRASERO_MEDIUM_REWRITABLE|
+				  BRASERO_MEDIUM_UNFORMATTED|
 				  BRASERO_MEDIUM_BLANK,
 				  BRASERO_BURN_FLAG_DAO|
 				  BRASERO_BURN_FLAG_MULTI|
@@ -884,6 +890,7 @@
 	brasero_plugin_set_flags (plugin,
 				  BRASERO_MEDIUM_DVDRW_PLUS|
 				  BRASERO_MEDIUM_DVD_DL|
+				  BRASERO_MEDIUM_UNFORMATTED|
 				  BRASERO_MEDIUM_BLANK,
 				  BRASERO_BURN_FLAG_MULTI|
 				  BRASERO_BURN_FLAG_DAO|
@@ -927,6 +934,7 @@
 					BRASERO_MEDIUM_APPENDABLE|
 					BRASERO_MEDIUM_CLOSED|
 					BRASERO_MEDIUM_HAS_DATA|
+					BRASERO_MEDIUM_UNFORMATTED|
 					BRASERO_MEDIUM_BLANK);
 	brasero_plugin_blank_caps (plugin, output);
 	g_slist_free (output);
@@ -938,6 +946,7 @@
 					BRASERO_MEDIUM_APPENDABLE|
 					BRASERO_MEDIUM_HAS_DATA|
 					BRASERO_MEDIUM_BLANK|
+					BRASERO_MEDIUM_UNFORMATTED|
 					BRASERO_MEDIUM_CLOSED,
 					BRASERO_BURN_FLAG_NOGRACE|
 					BRASERO_BURN_FLAG_FAST_BLANK,
@@ -950,6 +959,7 @@
 					BRASERO_MEDIUM_APPENDABLE|
 					BRASERO_MEDIUM_HAS_DATA|
 					BRASERO_MEDIUM_BLANK|
+					BRASERO_MEDIUM_UNFORMATTED|
 					BRASERO_MEDIUM_CLOSED,
 					BRASERO_BURN_FLAG_NOGRACE|
 					BRASERO_BURN_FLAG_FAST_BLANK,

Modified: trunk/src/plugins/libburnia/burn-libburn.c
==============================================================================
--- trunk/src/plugins/libburnia/burn-libburn.c	(original)
+++ trunk/src/plugins/libburnia/burn-libburn.c	Fri Jun 13 18:33:51 2008
@@ -832,6 +832,7 @@
 					       BRASERO_MEDIUM_PLUS|
 					       BRASERO_MEDIUM_RESTRICTED|
 					       BRASERO_MEDIUM_REWRITABLE|
+					       BRASERO_MEDIUM_UNFORMATTED|
 					       BRASERO_MEDIUM_BLANK|
 					       BRASERO_MEDIUM_APPENDABLE|
 					       BRASERO_MEDIUM_CLOSED|
@@ -874,7 +875,7 @@
 				  BRASERO_BURN_FLAG_NOGRACE,
 				  BRASERO_BURN_FLAG_NONE);
 
-	/* audio support for CDs only*/
+	/* audio support for CDs only */
 	input = brasero_caps_audio_new (BRASERO_PLUGIN_IO_ACCEPT_PIPE|
 					BRASERO_PLUGIN_IO_ACCEPT_FILE,
 					BRASERO_AUDIO_FORMAT_RAW);
@@ -964,6 +965,7 @@
 	/* ... and DVDs-RW (sequential) */
 	brasero_plugin_set_flags (plugin,
 				  BRASERO_MEDIUM_DVDRW|
+				  BRASERO_MEDIUM_UNFORMATTED|
 				  BRASERO_MEDIUM_BLANK,
 				  BRASERO_BURN_FLAG_DAO|
 				  BRASERO_BURN_FLAG_BURNPROOF|
@@ -1010,6 +1012,7 @@
 				  BRASERO_MEDIUM_DVD|
 				  BRASERO_MEDIUM_RESTRICTED|
 				  BRASERO_MEDIUM_REWRITABLE|
+				  BRASERO_MEDIUM_UNFORMATTED|
 				  BRASERO_MEDIUM_BLANK,
 				  BRASERO_BURN_FLAG_DAO|
 				  BRASERO_BURN_FLAG_MULTI|
@@ -1054,6 +1057,7 @@
 	brasero_plugin_set_flags (plugin,
 				  BRASERO_MEDIUM_DVDRW_PLUS|
 				  BRASERO_MEDIUM_DVD_DL|
+				  BRASERO_MEDIUM_UNFORMATTED|
 				  BRASERO_MEDIUM_BLANK,
 				  BRASERO_BURN_FLAG_MULTI|
 				  BRASERO_BURN_FLAG_DAO|
@@ -1107,6 +1111,7 @@
 					BRASERO_MEDIUM_APPENDABLE|
 					BRASERO_MEDIUM_CLOSED|
 					BRASERO_MEDIUM_HAS_DATA|
+					BRASERO_MEDIUM_UNFORMATTED|
 				        BRASERO_MEDIUM_BLANK);
 	brasero_plugin_blank_caps (plugin, output);
 	g_slist_free (output);
@@ -1121,6 +1126,7 @@
 					BRASERO_MEDIUM_CLOSED|
 					BRASERO_MEDIUM_HAS_DATA|
 					BRASERO_MEDIUM_HAS_AUDIO|
+					BRASERO_MEDIUM_UNFORMATTED|
 				        BRASERO_MEDIUM_BLANK,
 					BRASERO_BURN_FLAG_NOGRACE|
 					BRASERO_BURN_FLAG_FAST_BLANK,
@@ -1132,6 +1138,7 @@
 					BRASERO_MEDIUM_APPENDABLE|
 					BRASERO_MEDIUM_CLOSED|
 					BRASERO_MEDIUM_HAS_DATA|
+					BRASERO_MEDIUM_UNFORMATTED|
 				        BRASERO_MEDIUM_BLANK,
 					BRASERO_BURN_FLAG_NOGRACE|
 					BRASERO_BURN_FLAG_FAST_BLANK,

Modified: trunk/src/scsi-read-format-capacities.h
==============================================================================
--- trunk/src/scsi-read-format-capacities.h	(original)
+++ trunk/src/scsi-read-format-capacities.h	Fri Jun 13 18:33:51 2008
@@ -29,10 +29,7 @@
 #ifndef _SCSI_READ_FORMAT_CAPACITIES_H
 #define _SCSI_READ_FORMAT_CAPACITIES_H
 
-#ifdef __cplusplus
-extern "C"
-{
-#endif
+G_BEGIN_DECLS
 
 typedef enum {
 BRASERO_SCSI_DESC_UNFORMATTED		= 0x01,
@@ -115,9 +112,7 @@
 };
 typedef struct _BraseroScsiFormatCapacitiesHdr BraseroScsiFormatCapacitiesHdr;
 
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
 
 #endif /* _SCSI_READ_FORMAT_CAPACITIES_H */
 



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