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



Author: philippr
Date: Wed Oct  1 11:49:19 2008
New Revision: 1336
URL: http://svn.gnome.org/viewvc/brasero?rev=1336&view=rev

Log:
	Fix problems with deep directory handling

	* src/brasero-file-node.c (brasero_file_node_add),
	(brasero_file_node_move_from), (brasero_file_node_move_to):
	* src/burn-debug.c (brasero_debug_data_fs_to_string):
	* src/burn-task-ctx.c (brasero_task_ctx_get_progress):
	* src/plugins/cdrkit/burn-genisoimage.c
	(brasero_genisoimage_export_caps):
	* src/plugins/cdrtools/burn-mkisofs.c
	(brasero_mkisofs_export_caps):
	* src/plugins/growisofs/burn-growisofs.c
	(brasero_growisofs_export_caps):
	* src/plugins/libburnia/burn-libburn-common.c
	(brasero_libburn_common_ctx_free_real),
	(brasero_libburn_common_ctx_wait_for_idle_drive):
	* src/plugins/libburnia/burn-libburn.c
	(brasero_libburn_start_record):
	* src/plugins/libburnia/burn-libisofs.c
	(brasero_libisofs_export_caps):


Modified:
   trunk/ChangeLog
   trunk/src/brasero-file-node.c
   trunk/src/burn-debug.c
   trunk/src/burn-task-ctx.c
   trunk/src/plugins/cdrkit/burn-genisoimage.c
   trunk/src/plugins/cdrtools/burn-mkisofs.c
   trunk/src/plugins/growisofs/burn-growisofs.c
   trunk/src/plugins/libburnia/burn-libburn-common.c
   trunk/src/plugins/libburnia/burn-libburn.c
   trunk/src/plugins/libburnia/burn-libisofs.c

Modified: trunk/src/brasero-file-node.c
==============================================================================
--- trunk/src/brasero-file-node.c	(original)
+++ trunk/src/brasero-file-node.c	Wed Oct  1 11:49:19 2008
@@ -694,11 +694,12 @@
 							    node,
 							    sort_func,
 							    NULL);
-
 	node->parent = parent;
 	if (!node->is_imported) {
 		guint depth = 0;
+		BraseroFileTreeStats *stats;
 
+		/* NOTE: parent will be changed afterwards !!! */
 		if (!node->is_grafted) {
 			/* propagate the size change*/
 			for (; parent && !parent->is_root; parent = parent->parent) {
@@ -708,8 +709,11 @@
 			}
 		}
 
-		if (depth > 6)
+		stats = brasero_file_node_get_tree_stats (node->parent, &depth);
+		if (depth == 5) {
+			stats->num_deep ++;
 			node->is_deep = TRUE;
+		}
 	}
 }
 
@@ -957,14 +961,11 @@
 brasero_file_node_move_from (BraseroFileNode *node,
 			     BraseroFileTreeStats *stats)
 {
-	gboolean was_deep;
-
 	/* NOTE: for the time being no backend supports moving imported files */
 	if (node->is_imported)
 		return;
 
-	was_deep = (brasero_file_node_get_depth (node) > 6);
-	if (was_deep)
+	if (node->is_deep)
 		stats->num_deep --;
 
 	brasero_file_node_unlink (node);
@@ -976,7 +977,7 @@
 			   GCompareFunc sort_func)
 {
 	BraseroFileTreeStats *stats;
-	guint depth;
+	guint depth = 0;
 
 	/* NOTE: for the time being no backend supports moving imported files */
 	if (node->is_imported)
@@ -1002,8 +1003,8 @@
 
 	/* NOTE: here stats about the tree can change if the parent has a depth
 	 * > 6 and if previous didn't. Other stats remains unmodified. */
-	stats = brasero_file_node_get_tree_stats (parent, &depth);
-	if (!depth > 6) {
+	stats = brasero_file_node_get_tree_stats (node->parent, &depth);
+	if (depth == 5) {
 		stats->num_deep ++;
 		node->is_deep = TRUE;
 	}

Modified: trunk/src/burn-debug.c
==============================================================================
--- trunk/src/burn-debug.c	(original)
+++ trunk/src/burn-debug.c	Wed Oct  1 11:49:19 2008
@@ -260,6 +260,8 @@
 		strcat (buffer, "JOLIET ");
 	if (fs_type & BRASERO_IMAGE_FS_VIDEO)
 		strcat (buffer, "VIDEO ");
+	if (fs_type & BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY)
+		strcat (buffer, "DEEP ");
 }
 
 static void

Modified: trunk/src/burn-task-ctx.c
==============================================================================
--- trunk/src/burn-task-ctx.c	(original)
+++ trunk/src/burn-task-ctx.c	Wed Oct  1 11:49:19 2008
@@ -75,7 +75,6 @@
 	gint64 rate;
 
 	/* the current action */
-	/* FIXME: we need two types of actions */
 	BraseroBurnAction current_action;
 	gchar *action_string;
 
@@ -869,7 +868,9 @@
 		return BRASERO_BURN_OK;
 	}
 
+	total = 0;
 	brasero_task_ctx_get_session_output_size (self, NULL, &total);
+
 	if ((priv->session_bytes + priv->track_bytes) <= 0 || total <= 0) {
 		/* if brasero_task_ctx_start_progress () was called (and a timer
 		 * created), assume that the task will report either a progress
@@ -891,7 +892,6 @@
 		return BRASERO_BURN_OK;
 
 	*progress = (gdouble) ((gdouble) (priv->track_bytes + priv->session_bytes) / (gdouble)  total);
-
 	return BRASERO_BURN_OK;
 }
 

Modified: trunk/src/plugins/cdrkit/burn-genisoimage.c
==============================================================================
--- trunk/src/plugins/cdrkit/burn-genisoimage.c	(original)
+++ trunk/src/plugins/cdrkit/burn-genisoimage.c	Wed Oct  1 11:49:19 2008
@@ -546,6 +546,7 @@
 	input = brasero_caps_data_new (BRASERO_IMAGE_FS_ISO|
 				       BRASERO_IMAGE_FS_UDF|
 				       BRASERO_IMAGE_ISO_FS_LEVEL_3|
+				       BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY|
 				       BRASERO_IMAGE_FS_JOLIET|
 				       BRASERO_IMAGE_FS_VIDEO);
 

Modified: trunk/src/plugins/cdrtools/burn-mkisofs.c
==============================================================================
--- trunk/src/plugins/cdrtools/burn-mkisofs.c	(original)
+++ trunk/src/plugins/cdrtools/burn-mkisofs.c	Wed Oct  1 11:49:19 2008
@@ -546,6 +546,7 @@
 	input = brasero_caps_data_new (BRASERO_IMAGE_FS_ISO|
 				       BRASERO_IMAGE_FS_UDF|
 				       BRASERO_IMAGE_ISO_FS_LEVEL_3|
+				       BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY|
 				       BRASERO_IMAGE_FS_JOLIET|
 				       BRASERO_IMAGE_FS_VIDEO);
 

Modified: trunk/src/plugins/growisofs/burn-growisofs.c
==============================================================================
--- trunk/src/plugins/growisofs/burn-growisofs.c	(original)
+++ trunk/src/plugins/growisofs/burn-growisofs.c	Wed Oct  1 11:49:19 2008
@@ -781,6 +781,7 @@
 	input = brasero_caps_data_new (BRASERO_IMAGE_FS_ISO|
 				       BRASERO_IMAGE_FS_UDF|
 				       BRASERO_IMAGE_ISO_FS_LEVEL_3|
+				       BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY|
 				       BRASERO_IMAGE_FS_JOLIET|
 				       BRASERO_IMAGE_FS_VIDEO);
 

Modified: trunk/src/plugins/libburnia/burn-libburn-common.c
==============================================================================
--- trunk/src/plugins/libburnia/burn-libburn-common.c	(original)
+++ trunk/src/plugins/libburnia/burn-libburn-common.c	Wed Oct  1 11:49:19 2008
@@ -44,6 +44,8 @@
 static void
 brasero_libburn_common_ctx_free_real (BraseroLibburnCtx *ctx)
 {
+	BRASERO_BURN_LOG ("Drive stopped");
+
 	if (ctx->drive_info) {
 		burn_drive_info_free (ctx->drive_info);
 		ctx->drive_info = NULL;
@@ -77,6 +79,7 @@
 	status = burn_drive_get_status (ctx->drive, NULL);
 	if (status == BURN_DRIVE_WRITING || status == BURN_DRIVE_READING)
 		burn_drive_cancel (ctx->drive);
+
 	if (status == BURN_DRIVE_GRABBING)
 		/* This should probably never happen */
 		burn_drive_info_forget (ctx->drive_info, 1);

Modified: trunk/src/plugins/libburnia/burn-libburn.c
==============================================================================
--- trunk/src/plugins/libburnia/burn-libburn.c	(original)
+++ trunk/src/plugins/libburnia/burn-libburn.c	Wed Oct  1 11:49:19 2008
@@ -474,12 +474,13 @@
 			      GError **error)
 {
 	guint64 rate;
-	gchar reason [4096];
+	gint64 blocks = 0;
 	BraseroMedia media;
 	BraseroBurnFlag flags;
 	BraseroBurnResult result;
 	BraseroLibburnPrivate *priv;
 	struct burn_write_opts *opts;
+	gchar reason [BURN_REASONS_LEN];
 
 	priv = BRASERO_LIBBURN_PRIVATE (self);
 
@@ -543,6 +544,14 @@
 		return BRASERO_BURN_ERR;
 	}
 
+	/* If we're writing to a disc remember that the session can't be under
+	 * 300 sectors (= 614400 bytes) */
+	brasero_job_get_session_output_size (BRASERO_JOB (self), &blocks, NULL);
+	if (blocks < 300)
+		brasero_job_set_output_size_for_current_track (BRASERO_JOB (self),
+							       300L - blocks,
+							       614400L - blocks * 2048);
+
 	burn_disc_write (opts, priv->ctx->disc);
 	burn_write_opts_free (opts);
 

Modified: trunk/src/plugins/libburnia/burn-libisofs.c
==============================================================================
--- trunk/src/plugins/libburnia/burn-libisofs.c	(original)
+++ trunk/src/plugins/libburnia/burn-libisofs.c	Wed Oct  1 11:49:19 2008
@@ -985,6 +985,7 @@
 					 BRASERO_PLUGIN_IO_ACCEPT_PIPE,
 					 BRASERO_IMAGE_FORMAT_BIN);
 	input = brasero_caps_data_new (BRASERO_IMAGE_FS_ISO|
+				       BRASERO_IMAGE_ISO_FS_DEEP_DIRECTORY|
 				       BRASERO_IMAGE_FS_JOLIET);
 
 	brasero_plugin_link_caps (plugin, output, input);



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