brasero r1264 - in trunk: . src src/plugins/cdrkit src/plugins/cdrtools



Author: philippr
Date: Wed Sep 10 12:43:05 2008
New Revision: 1264
URL: http://svn.gnome.org/viewvc/brasero?rev=1264&view=rev

Log:
	Added new flag (RAW write mode) to be only used for CLONE images

	* src/burn-basics.h:
	* src/burn-caps.c (brasero_caps_get_flags_for_disc):
	* src/burn-debug.c (brasero_debug_burn_flags_to_string):
	* src/burn-plugin.h:
	* src/plugins/cdrkit/burn-wodim.c (brasero_wodim_set_argv_record),
	(brasero_wodim_export_caps):
	* src/plugins/cdrtools/burn-cdrecord.c
	(brasero_cdrecord_set_argv_record), (brasero_cdrecord_export_caps):


Modified:
   trunk/ChangeLog
   trunk/src/burn-basics.h
   trunk/src/burn-caps.c
   trunk/src/burn-debug.c
   trunk/src/burn-plugin.h
   trunk/src/plugins/cdrkit/burn-wodim.c
   trunk/src/plugins/cdrtools/burn-cdrecord.c

Modified: trunk/src/burn-basics.h
==============================================================================
--- trunk/src/burn-basics.h	(original)
+++ trunk/src/burn-basics.h	Wed Sep 10 12:43:05 2008
@@ -152,7 +152,9 @@
 	BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE	= 1 << 12,
 	BRASERO_BURN_FLAG_FAST_BLANK		= 1 << 13,
 
+	/* NOTE: these two are contradictory */
 	BRASERO_BURN_FLAG_DAO			= 1 << 14,
+	BRASERO_BURN_FLAG_RAW			= 1 << 15,
 
 	BRASERO_BURN_FLAG_LAST
 } BraseroBurnFlag;

Modified: trunk/src/burn-caps.c
==============================================================================
--- trunk/src/burn-caps.c	(original)
+++ trunk/src/burn-caps.c	Wed Sep 10 12:43:05 2008
@@ -2331,6 +2331,14 @@
 		return BRASERO_BURN_NOT_SUPPORTED;
 	}
 
+	/* RAW write mode should (must) only be used in this case */
+	if ((supported_flags & BRASERO_BURN_FLAG_RAW)
+	&&   input->type == BRASERO_TRACK_TYPE_IMAGE
+	&&   input->subtype.img_format == BRASERO_IMAGE_FORMAT_CLONE)
+		compulsory_flags |= BRASERO_BURN_FLAG_RAW;
+	else
+		supported_flags &= ~BRASERO_BURN_FLAG_RAW;
+
 	if (io_flags & BRASERO_PLUGIN_IO_ACCEPT_PIPE) {
 		supported_flags |= BRASERO_BURN_FLAG_NO_TMP_FILES;
 

Modified: trunk/src/burn-debug.c
==============================================================================
--- trunk/src/burn-debug.c	(original)
+++ trunk/src/burn-debug.c	Wed Sep 10 12:43:05 2008
@@ -106,6 +106,8 @@
 		strcat (buffer, "no grace, ");
 	if (flags & BRASERO_BURN_FLAG_DAO)
 		strcat (buffer, "dao, ");
+	if (flags & BRASERO_BURN_FLAG_RAW)
+		strcat (buffer, "raw, ");
 	if (flags & BRASERO_BURN_FLAG_OVERBURN)
 		strcat (buffer, "overburn, ");
 	if (flags & BRASERO_BURN_FLAG_BURNPROOF)

Modified: trunk/src/burn-plugin.h
==============================================================================
--- trunk/src/burn-plugin.h	(original)
+++ trunk/src/burn-plugin.h	Wed Sep 10 12:43:05 2008
@@ -33,6 +33,7 @@
 #define BRASERO_PLUGIN_BURN_FLAG_MASK	(BRASERO_BURN_FLAG_DUMMY|		\
 					 BRASERO_BURN_FLAG_MULTI|		\
 					 BRASERO_BURN_FLAG_DAO|			\
+					 BRASERO_BURN_FLAG_RAW|			\
 					 BRASERO_BURN_FLAG_BURNPROOF|		\
 					 BRASERO_BURN_FLAG_OVERBURN|		\
 					 BRASERO_BURN_FLAG_NOGRACE|		\

Modified: trunk/src/plugins/cdrkit/burn-wodim.c
==============================================================================
--- trunk/src/plugins/cdrkit/burn-wodim.c	(original)
+++ trunk/src/plugins/cdrkit/burn-wodim.c	Wed Sep 10 12:43:05 2008
@@ -671,6 +671,17 @@
 	if (flags & BRASERO_BURN_FLAG_MULTI)
 		g_ptr_array_add (argv, g_strdup ("-multi"));
 
+	/* NOTE: This write mode is necessary for all CLONE images burning */
+	if (flags & BRASERO_BURN_FLAG_RAW)
+		g_ptr_array_add (argv, g_strdup ("-raw96r"));
+
+	/* NOTE1: DAO can't be used if we're appending to a disc */
+	/* NOTE2: CD-text cannot be written in tao mode (which is the default)
+	 * NOTE3: when we don't want wodim to use stdin then we give the audio
+	 * file on the command line. Otherwise we use the .inf */
+	if (flags & BRASERO_BURN_FLAG_DAO)
+		g_ptr_array_add (argv, g_strdup ("-dao"));
+
 	brasero_job_get_input_type (BRASERO_JOB (wodim), &type);
 	if (brasero_job_get_fd_in (BRASERO_JOB (wodim), NULL) == BRASERO_BURN_OK) {
 		BraseroBurnResult result;
@@ -712,11 +723,6 @@
 			if (type.subtype.img_format == BRASERO_IMAGE_FORMAT_BIN) {
 				g_ptr_array_add (argv, g_strdup_printf ("tsize=%Lis", sectors));
 
-				/* DAO can't be used if we're appending to a 
-				 * disc with audio track(s) on it */
-				if (flags & BRASERO_BURN_FLAG_DAO)
-					g_ptr_array_add (argv, g_strdup ("-dao"));
-
 				g_ptr_array_add (argv, g_strdup ("-data"));
 				g_ptr_array_add (argv, g_strdup ("-nopad"));
 				g_ptr_array_add (argv, g_strdup ("-"));
@@ -725,10 +731,6 @@
 				BRASERO_JOB_NOT_SUPPORTED (wodim);
 		}
 		else if (type.type == BRASERO_TRACK_TYPE_AUDIO) {
-			/* now set the rest of the arguments */
-			if (flags & BRASERO_BURN_FLAG_DAO)
-				g_ptr_array_add (argv, g_strdup ("-dao"));
-
 			/* NOTE: when we don't want wodim to use stdin then we
 			 * give the audio file on the command line. Otherwise we
 			 * use the .inf */
@@ -750,12 +752,6 @@
 		BraseroBurnResult result;
 		GSList *tracks;
 
-		/* CD-text cannot be written in tao mode (which is the default)
-		 * NOTE: when we don't want wodim to use stdin then we give the
-		 * audio file on the command line. Otherwise we use the .inf */
-		if (flags & BRASERO_BURN_FLAG_DAO)
-			g_ptr_array_add (argv, g_strdup ("-dao"));
-
 		g_ptr_array_add (argv, g_strdup ("fs=16m"));
 		g_ptr_array_add (argv, g_strdup ("-audio"));
 		g_ptr_array_add (argv, g_strdup ("-swab"));
@@ -795,9 +791,6 @@
 			if (!image_path)
 				BRASERO_JOB_NOT_READY (wodim);
 
-			if (flags & BRASERO_BURN_FLAG_DAO)
-				g_ptr_array_add (argv, g_strdup ("-dao"));
-
 			g_ptr_array_add (argv, g_strdup ("fs=16m"));
 			g_ptr_array_add (argv, g_strdup ("-data"));
 			g_ptr_array_add (argv, g_strdup ("-nopad"));
@@ -810,9 +803,6 @@
 			if (!isopath)
 				BRASERO_JOB_NOT_READY (wodim);
 
-			if (flags & BRASERO_BURN_FLAG_DAO)
-				g_ptr_array_add (argv, g_strdup ("-dao"));
-
 			g_ptr_array_add (argv, g_strdup ("fs=16m"));
 			g_ptr_array_add (argv, g_strdup ("-data"));
 			g_ptr_array_add (argv, g_strdup ("-nopad"));
@@ -825,13 +815,7 @@
 			if (!rawpath)
 				BRASERO_JOB_NOT_READY (wodim);
 
-			/* NOTE: we ignore DAO flag on purpose since it isn't
-			 * implemented yet. Don't error out since there is no
-			 * way for us to tell that we don't support this flag
-			 * for this specific input. */
-
 			g_ptr_array_add (argv, g_strdup ("fs=16m"));
-			g_ptr_array_add (argv, g_strdup ("-raw96r"));
 			g_ptr_array_add (argv, g_strdup ("-clone"));
 			g_ptr_array_add (argv, rawpath);
 		}
@@ -843,9 +827,6 @@
 			if (!cuepath)
 				BRASERO_JOB_NOT_READY (wodim);
 
-			if (flags & BRASERO_BURN_FLAG_DAO)
-				g_ptr_array_add (argv, g_strdup ("-dao"));
-
 			g_ptr_array_add (argv, g_strdup ("fs=16m"));
 
 			cue_str = g_strdup_printf ("cuefile=%s", cuepath);
@@ -1076,17 +1057,11 @@
 	brasero_plugin_link_caps (plugin, output, input);
 	g_slist_free (output);
 
+	/* All CD-R(W) */
 	output = brasero_caps_disc_new (media);
 	brasero_plugin_link_caps (plugin, output, input);
 	g_slist_free (input);
 
-	input = brasero_caps_image_new (BRASERO_PLUGIN_IO_ACCEPT_FILE,
-					BRASERO_IMAGE_FORMAT_CUE|
-					BRASERO_IMAGE_FORMAT_CLONE);
-
-	brasero_plugin_link_caps (plugin, output, input);
-	g_slist_free (input);
-
 	input = brasero_caps_audio_new (BRASERO_PLUGIN_IO_ACCEPT_PIPE|
 					BRASERO_PLUGIN_IO_ACCEPT_FILE,
 					BRASERO_AUDIO_FORMAT_RAW|
@@ -1096,10 +1071,37 @@
 	g_slist_free (output);
 	g_slist_free (input);
 
+	/* for CLONE and CUE type images, we only want blank CD-R(W) */
+	output = brasero_caps_disc_new (BRASERO_MEDIUM_CD|
+					BRASERO_MEDIUM_WRITABLE|
+					BRASERO_MEDIUM_REWRITABLE|
+					BRASERO_MEDIUM_BLANK);
+
+	input = brasero_caps_image_new (BRASERO_PLUGIN_IO_ACCEPT_FILE,
+					BRASERO_IMAGE_FORMAT_CUE|
+					BRASERO_IMAGE_FORMAT_CLONE);
+
+	brasero_plugin_link_caps (plugin, output, input);
+	g_slist_free (output);
+	g_slist_free (input);
+
 	/* Flags for CD (RW)s */
 	BRASERO_PLUGIN_ADD_STANDARD_CDR_FLAGS (plugin);
 	BRASERO_PLUGIN_ADD_STANDARD_CDRW_FLAGS (plugin);
 
+	/* Apart from DAO it also supports RAW mode to burn CLONE images. This
+	 * is a special mode for which there isn't any DUMMY burn possible */
+	brasero_plugin_set_flags (plugin,
+				  BRASERO_MEDIUM_CD|
+				  BRASERO_MEDIUM_WRITABLE|
+				  BRASERO_MEDIUM_REWRITABLE|
+				  BRASERO_MEDIUM_BLANK,
+				  BRASERO_BURN_FLAG_RAW|
+				  BRASERO_BURN_FLAG_BURNPROOF|
+				  BRASERO_BURN_FLAG_OVERBURN|
+				  BRASERO_BURN_FLAG_NOGRACE,
+				  BRASERO_BURN_FLAG_NONE);
+
 	/* For DVD-W and DVD-RW sequential
 	 * NOTE: given the performed tests it seems that wodim should not be 
 	 * used to start a multisession DVD-RW or even continue one. */
@@ -1126,7 +1128,7 @@
 				  BRASERO_BURN_FLAG_NOGRACE,
 				  BRASERO_BURN_FLAG_NONE);
 
-	/* for DVD+RW: limited capabilities there are no MULTI possible
+	/* For DVD+RW: limited capabilities there are no MULTI possible
 	 * NOTE: no UNFORMATTED here since wodim doesn't format them before*/
 	brasero_plugin_set_flags (plugin,
 				  BRASERO_MEDIUM_DVDRW_PLUS|

Modified: trunk/src/plugins/cdrtools/burn-cdrecord.c
==============================================================================
--- trunk/src/plugins/cdrtools/burn-cdrecord.c	(original)
+++ trunk/src/plugins/cdrtools/burn-cdrecord.c	Wed Sep 10 12:43:05 2008
@@ -676,6 +676,17 @@
 	if (flags & BRASERO_BURN_FLAG_MULTI)
 		g_ptr_array_add (argv, g_strdup ("-multi"));
 
+	/* NOTE: This write mode is necessary for all CLONE images burning */
+	if (flags & BRASERO_BURN_FLAG_RAW)
+		g_ptr_array_add (argv, g_strdup ("-raw96r"));
+
+	/* NOTE1: DAO can't be used if we're appending to a disc */
+	/* NOTE2: CD-text cannot be written in tao mode (which is the default)
+	 * NOTE3: when we don't want wodim to use stdin then we give the audio
+	 * file on the command line. Otherwise we use the .inf */
+	if (flags & BRASERO_BURN_FLAG_DAO)
+		g_ptr_array_add (argv, g_strdup ("-dao"));
+
 	brasero_job_get_input_type (BRASERO_JOB (cdrecord), &type);
 	if (brasero_job_get_fd_in (BRASERO_JOB (cdrecord), NULL) == BRASERO_BURN_OK) {
 		BraseroBurnResult result;
@@ -716,12 +727,6 @@
 		if (type.type == BRASERO_TRACK_TYPE_IMAGE) {
 			if (type.subtype.img_format == BRASERO_IMAGE_FORMAT_BIN) {
 				g_ptr_array_add (argv, g_strdup_printf ("tsize=%Lis", sectors));
-
-				/* DAO can't be used if we're appending to a 
-				 * disc with audio track(s) on it */
-				if (flags & BRASERO_BURN_FLAG_DAO)
-					g_ptr_array_add (argv, g_strdup ("-dao"));
-
 				g_ptr_array_add (argv, g_strdup ("-data"));
 				g_ptr_array_add (argv, g_strdup ("-nopad"));
 				g_ptr_array_add (argv, g_strdup ("-"));
@@ -730,10 +735,6 @@
 				BRASERO_JOB_NOT_SUPPORTED (cdrecord);;
 		}
 		else if (type.type == BRASERO_TRACK_TYPE_AUDIO) {
-			/* now set the rest of the arguments */
-			if (flags & BRASERO_BURN_FLAG_DAO)
-				g_ptr_array_add (argv, g_strdup ("-dao"));
-
 			g_ptr_array_add (argv, g_strdup ("-swab"));
 			g_ptr_array_add (argv, g_strdup ("-audio"));
 			g_ptr_array_add (argv, g_strdup ("-useinfo"));
@@ -752,12 +753,6 @@
 		BraseroBurnResult result;
 		GSList *tracks;
 
-		/* CD-text cannot be written in tao mode (which is the default)
-		 * NOTE: when we don't want wodim to use stdin then we give the
-		 * audio file on the command line. Otherwise we use the .inf */
-		if (flags & BRASERO_BURN_FLAG_DAO)
-			g_ptr_array_add (argv, g_strdup ("-dao"));
-
 		g_ptr_array_add (argv, g_strdup ("fs=16m"));
 		g_ptr_array_add (argv, g_strdup ("-audio"));
 		g_ptr_array_add (argv, g_strdup ("-swab"));
@@ -797,9 +792,6 @@
 			if (!image_path)
 				BRASERO_JOB_NOT_READY (cdrecord);
 
-			if (flags & BRASERO_BURN_FLAG_DAO)
-				g_ptr_array_add (argv, g_strdup ("-dao"));
-
 			g_ptr_array_add (argv, g_strdup ("fs=16m"));
 			g_ptr_array_add (argv, g_strdup ("-data"));
 			g_ptr_array_add (argv, g_strdup ("-nopad"));
@@ -812,9 +804,6 @@
 			if (!isopath)
 				BRASERO_JOB_NOT_READY (cdrecord);
 
-			if (flags & BRASERO_BURN_FLAG_DAO)
-				g_ptr_array_add (argv, g_strdup ("-dao"));
-
 			g_ptr_array_add (argv, g_strdup ("fs=16m"));
 			g_ptr_array_add (argv, g_strdup ("-data"));
 			g_ptr_array_add (argv, g_strdup ("-nopad"));
@@ -827,13 +816,7 @@
 			if (!rawpath)
 				BRASERO_JOB_NOT_READY (cdrecord);
 
-			/* NOTE: we ignore DAO flag on purpose since it isn't
-			 * implemented yet. Don't error out since there is no
-			 * way for us to tell that we don't support this flag
-			 * for this specific input. */
-
 			g_ptr_array_add (argv, g_strdup ("fs=16m"));
-			g_ptr_array_add (argv, g_strdup ("-raw96r"));
 			g_ptr_array_add (argv, g_strdup ("-clone"));
 			g_ptr_array_add (argv, rawpath);
 		}
@@ -845,9 +828,6 @@
 			if (!cuepath)
 				BRASERO_JOB_NOT_READY (cdrecord);
 
-			if (flags & BRASERO_BURN_FLAG_DAO)
-				g_ptr_array_add (argv, g_strdup ("-dao"));
-
 			g_ptr_array_add (argv, g_strdup ("fs=16m"));
 
 			cue_str = g_strdup_printf ("cuefile=%s", cuepath);
@@ -1071,17 +1051,11 @@
 	brasero_plugin_link_caps (plugin, output, input);
 	g_slist_free (output);
 
+	/* All CD-R(W) */
 	output = brasero_caps_disc_new (media);
 	brasero_plugin_link_caps (plugin, output, input);
 	g_slist_free (input);
 
-	input = brasero_caps_image_new (BRASERO_PLUGIN_IO_ACCEPT_FILE,
-					BRASERO_IMAGE_FORMAT_CUE|
-					BRASERO_IMAGE_FORMAT_CLONE);
-
-	brasero_plugin_link_caps (plugin, output, input);
-	g_slist_free (input);
-
 	input = brasero_caps_audio_new (BRASERO_PLUGIN_IO_ACCEPT_PIPE|
 					BRASERO_PLUGIN_IO_ACCEPT_FILE,
 					BRASERO_AUDIO_FORMAT_RAW|
@@ -1091,6 +1065,20 @@
 	g_slist_free (output);
 	g_slist_free (input);
 
+	/* for CLONE and CUE type images, we only want blank CD-R(W) */
+	output = brasero_caps_disc_new (BRASERO_MEDIUM_CD|
+					BRASERO_MEDIUM_WRITABLE|
+					BRASERO_MEDIUM_REWRITABLE|
+					BRASERO_MEDIUM_BLANK);
+
+	input = brasero_caps_image_new (BRASERO_PLUGIN_IO_ACCEPT_FILE,
+					BRASERO_IMAGE_FORMAT_CUE|
+					BRASERO_IMAGE_FORMAT_CLONE);
+
+	brasero_plugin_link_caps (plugin, output, input);
+	g_slist_free (output);
+	g_slist_free (input);
+
 	/* Blank CD(R)W : don't use standard flags cdrecord fails consistently
 	 * to write a first track of a multisession disc with DAO mode. */
 	brasero_plugin_set_flags (plugin,
@@ -1117,6 +1105,19 @@
 				  BRASERO_BURN_FLAG_NOGRACE,
 				  BRASERO_BURN_FLAG_NONE);
 
+	/* Apart from DAO it also supports RAW mode to burn CLONE images. This
+	 * is a special mode for which there isn't any DUMMY burn possible */
+	brasero_plugin_set_flags (plugin,
+				  BRASERO_MEDIUM_CD|
+				  BRASERO_MEDIUM_WRITABLE|
+				  BRASERO_MEDIUM_REWRITABLE|
+				  BRASERO_MEDIUM_BLANK,
+				  BRASERO_BURN_FLAG_RAW|
+				  BRASERO_BURN_FLAG_BURNPROOF|
+				  BRASERO_BURN_FLAG_OVERBURN|
+				  BRASERO_BURN_FLAG_NOGRACE,
+				  BRASERO_BURN_FLAG_NONE);
+
 	/* This is a CDR with data data can be merged or at least appended */
 	brasero_plugin_set_flags (plugin,
 				  BRASERO_MEDIUM_CD|



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