brasero r612 - in trunk: . src src/plugins/cdrkit src/plugins/cdrtools src/plugins/growisofs
- From: lmedinas svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r612 - in trunk: . src src/plugins/cdrkit src/plugins/cdrtools src/plugins/growisofs
- Date: Mon, 21 Jan 2008 03:59:11 +0000 (GMT)
Author: lmedinas
Date: Mon Jan 21 03:59:10 2008
New Revision: 612
URL: http://svn.gnome.org/viewvc/brasero?rev=612&view=rev
Log:
Merge Philippe work on 0.7 stable branch to trunk.
Modified:
trunk/ChangeLog
trunk/src/brasero-data-disc.c
trunk/src/burn-debug.c
trunk/src/burn-iso-field.c
trunk/src/burn-iso-field.h
trunk/src/burn-iso9660.c
trunk/src/burn-track.h
trunk/src/burn-volume.h
trunk/src/plugins/cdrkit/burn-genisoimage.c
trunk/src/plugins/cdrtools/burn-mkisofs.c
trunk/src/plugins/growisofs/burn-growisofs.c
Modified: trunk/src/brasero-data-disc.c
==============================================================================
--- trunk/src/brasero-data-disc.c (original)
+++ trunk/src/brasero-data-disc.c Mon Jan 21 03:59:10 2008
@@ -195,6 +195,8 @@
GSList *libnotify;
guint libnotify_id;
+ guint G2_files;
+
gint editing:1;
gint is_loading:1;
gint reject_files:1;
@@ -3244,6 +3246,7 @@
brasero_data_disc_clean (disc);
+ disc->priv->G2_files = 0;
disc->priv->activity_counter = 1;
brasero_data_disc_decrease_activity_counter (disc);
@@ -3574,6 +3577,11 @@
brasero_data_disc_joliet_incompat_add_paths (disc, paths);
}
+ /* update by the number of non grafted file */
+ if (info->type != GNOME_VFS_FILE_TYPE_DIRECTORY
+ && GET_SIZE_IN_SECTORS (info->size) > 1048576)
+ disc->priv->G2_files += g_slist_length (paths);
+
/* now let's see the tree */
for (; paths; paths = g_slist_remove (paths, path)) {
path = paths->data;
@@ -3799,7 +3807,7 @@
{
if (!brasero_data_disc_is_excluded (disc, file->uri, NULL)) {
BraseroFile *parent;
- char *parent_uri;
+ gchar *parent_uri;
parent_uri = g_path_get_dirname (file->uri);
parent = g_hash_table_lookup (disc->priv->dirs, parent_uri);
@@ -3810,9 +3818,13 @@
parent->sectors += file->sectors;
}
- else
+ else {
brasero_data_disc_size_changed (disc, file->sectors * (-1));
+ if (file->sectors > 1048576)
+ disc->priv->G2_files --;
+ }
+
brasero_data_disc_file_object_free (disc, file);
}
@@ -4127,6 +4139,11 @@
/* we update the parent directory */
sectors = GET_SIZE_IN_SECTORS (info->size);
+
+ if (info->type != GNOME_VFS_FILE_TYPE_DIRECTORY
+ && GET_SIZE_IN_SECTORS (info->size) > 1048576)
+ disc->priv->G2_files --;
+
dir->sectors -= sectors;
brasero_data_disc_size_changed (disc, sectors * (-1));
@@ -6026,12 +6043,16 @@
#endif
brasero_data_disc_size_changed (disc, sectors);
}
- else if (brasero_data_disc_is_excluded (disc, file->uri, NULL))
+ else if (brasero_data_disc_is_excluded (disc, file->uri, NULL)) {
brasero_data_disc_size_changed (disc, sectors);
+ }
/* That's mostly when loading a project */
else if (!g_slist_find (disc->priv->loading, parent))
parent->sectors -= sectors;
+ if (sectors > 1048576)
+ disc->priv->G2_files ++;
+
/* because of above we only insert it at the end */
g_hash_table_insert (disc->priv->files, file->uri, file);
brasero_data_disc_obj_new (disc, file);
@@ -6281,6 +6302,8 @@
info->symlink_name,
GET_SIZE_IN_SECTORS (info->size));
+ /* No need to check for 2G files here since we set a graft */
+
end :
uri = entry->uri;
@@ -6476,7 +6499,8 @@
g_strdup (uri),
sectors);
}
-
+
+ /* since we graft here no need to check for 2G files */
brasero_data_disc_graft_new (disc, uri, path);
grafts = g_slist_prepend (grafts, path);
@@ -6586,6 +6610,11 @@
dir_sectors += GET_SIZE_IN_SECTORS (info->size);
}
+ if (info->type != GNOME_VFS_FILE_TYPE_DIRECTORY
+ && GET_SIZE_IN_SECTORS (info->size) > 1048576
+ && !g_hash_table_lookup (disc->priv->files, current))
+ disc->priv->G2_files ++;
+
if (strlen (info->name) > 64) {
GSList *paths;
@@ -6978,6 +7007,10 @@
return;
}
+ if (info->type != GNOME_VFS_FILE_TYPE_DIRECTORY
+ && GET_SIZE_IN_SECTORS (info->size) > 1048576)
+ disc->priv->G2_files --;
+
sectors = GET_SIZE_IN_SECTORS (info->size);
brasero_data_disc_size_changed (disc, sectors * (-1));
parent->sectors -= sectors;
@@ -7087,35 +7120,6 @@
/* make an imported session file re-appear if need be */
brasero_data_disc_is_session_path_deleted (disc, path);
return;
-
-#if 0
- BraseroVolFile *file;
-
- /* could be used the day when a library allows full editing
- * of multisession */
-
- if (uri != BRASERO_IMPORTED_FILE)
- return;
-
- /* get the volfile and add it to the list of excluded session files */
- file = brasero_volume_file_from_path (path,
- disc->priv->session);
- if (!file)
- return;
-
- /* update the size */
- brasero_data_disc_size_changed (disc, (-1) * brasero_volume_file_size (file));
-
- /* since it could a file with a graft point, it could already be
- * in the list. We check that and and eventually add it if it is
- * not in this list */
- if (!g_slist_find (disc->priv->session_file_excluded, file))
- disc->priv->session_file_excluded = g_slist_prepend (disc->priv->session_file_excluded,
- file);
-
- return;
-#endif
-
}
if (!disc->priv->remove_user)
@@ -7423,6 +7427,10 @@
dir = g_hash_table_lookup (disc->priv->dirs, parent);
g_free (parent);
+ if (info->type != GNOME_VFS_FILE_TYPE_DIRECTORY
+ && GET_SIZE_IN_SECTORS (info->size) > 1048576)
+ disc->priv->G2_files ++;
+
dir->sectors += sectors;
brasero_data_disc_size_changed (disc, sectors);
}
@@ -7701,6 +7709,10 @@
parent = g_hash_table_lookup (disc->priv->dirs, parent_uri);
g_free (parent_uri);
+ if (info->type != GNOME_VFS_FILE_TYPE_DIRECTORY
+ && GET_SIZE_IN_SECTORS (info->size) > 1048576)
+ disc->priv->G2_files ++;
+
/* no need to check if parent is dummy. It
* is done in brasero_data_disc_is_excluded */
sectors = GET_SIZE_IN_SECTORS (info->size);
@@ -8895,6 +8907,11 @@
if (!BRASERO_DATA_DISC (disc)->priv->joliet_non_compliant)
fs_type |= BRASERO_IMAGE_FS_JOLIET;
+ /* that's necessary for files > 2Gio. It's supported by all windows,
+ * linux, only BSD (unsure), and MacOS X don't support it. */
+ if (BRASERO_DATA_DISC (disc)->priv->G2_files)
+ fs_type |= BRASERO_IMAGE_ISO_FS_LEVEL_3 | BRASERO_IMAGE_FS_UDF;
+
if (brasero_data_disc_is_video_DVD (BRASERO_DATA_DISC (disc)))
fs_type |= BRASERO_IMAGE_FS_VIDEO;
@@ -11916,6 +11933,9 @@
file = g_hash_table_lookup (disc->priv->dirs, parent);
g_free (parent);
+ if (GET_SIZE_IN_SECTORS (info->size) > 1048576)
+ disc->priv->G2_files ++;
+
sectors = GET_SIZE_IN_SECTORS (info->size);
file->sectors += sectors;
brasero_data_disc_size_changed (disc, sectors);
@@ -12215,6 +12235,13 @@
sectors = GET_SIZE_IN_SECTORS (info->size);
if (sectors != file->sectors) {
+ if (info->type != GNOME_VFS_FILE_TYPE_DIRECTORY) {
+ if (GET_SIZE_IN_SECTORS (info->size) > 1048576 && file->sectors <= 1048576)
+ disc->priv->G2_files ++;
+ else if (GET_SIZE_IN_SECTORS (info->size) <= 1048576 && file->sectors > 1048576)
+ disc->priv->G2_files --;
+ }
+
brasero_data_disc_size_changed (disc, sectors - file->sectors);
file->sectors = sectors;
}
@@ -12907,7 +12934,7 @@
brasero_data_disc_start_monitoring_real (BraseroDataDisc *disc,
BraseroFile *file)
{
- const gchar *path;
+ gchar *path;
gint dev_fd;
uint32_t mask;
Modified: trunk/src/burn-debug.c
==============================================================================
--- trunk/src/burn-debug.c (original)
+++ trunk/src/burn-debug.c Mon Jan 21 03:59:10 2008
@@ -246,6 +246,8 @@
strcat (buffer, "ISO ");
if (fs_type & BRASERO_IMAGE_FS_UDF)
strcat (buffer, "UDF ");
+ if (fs_type & BRASERO_IMAGE_ISO_FS_LEVEL_3)
+ strcat (buffer, "Level 3 ");
if (fs_type & BRASERO_IMAGE_FS_JOLIET)
strcat (buffer, "JOLIET ");
if (fs_type & BRASERO_IMAGE_FS_VIDEO)
Modified: trunk/src/burn-iso-field.c
==============================================================================
--- trunk/src/burn-iso-field.c (original)
+++ trunk/src/burn-iso-field.c Mon Jan 21 03:59:10 2008
@@ -26,12 +26,12 @@
#include "burn-iso-field.h"
-gint32
+guint32
brasero_iso9660_get_733_val (guchar *buffer)
{
- gint32 *ptr;
+ guint32 *ptr;
- ptr = (gint32*) buffer;
+ ptr = (guint32*) buffer;
return GINT32_FROM_LE (*ptr);
}
Modified: trunk/src/burn-iso-field.h
==============================================================================
--- trunk/src/burn-iso-field.h (original)
+++ trunk/src/burn-iso-field.h Mon Jan 21 03:59:10 2008
@@ -32,7 +32,7 @@
{
#endif
-gint32
+guint32
brasero_iso9660_get_733_val (guchar *buffer);
#ifdef __cplusplus
Modified: trunk/src/burn-iso9660.c
==============================================================================
--- trunk/src/burn-iso9660.c (original)
+++ trunk/src/burn-iso9660.c Mon Jan 21 03:59:10 2008
@@ -524,6 +524,22 @@
goto error;
entry->parent = parent;
+
+ /* check that we don't have another file record for the
+ * same file (usually files > 4G). It always follows
+ * its sibling */
+ if (parent->specific.dir.children) {
+ BraseroVolFile *last;
+
+ last = parent->specific.dir.children->data;
+ if (!last->isdir && !strcmp (BRASERO_VOLUME_FILE_NAME (last), BRASERO_VOLUME_FILE_NAME (entry))) {
+ last->specific.file.size_bytes += entry->specific.file.size_bytes;
+ ctx->data_blocks += ISO9660_BYTES_TO_BLOCKS (entry->specific.file.size_bytes);
+ brasero_volume_file_free (entry);
+ BRASERO_BURN_LOG ("Multi extent file");
+ continue;
+ }
+ }
parent->specific.dir.children = g_list_prepend (parent->specific.dir.children, entry);
ctx->data_blocks += ISO9660_BYTES_TO_BLOCKS (entry->specific.file.size_bytes);
}
Modified: trunk/src/burn-track.h
==============================================================================
--- trunk/src/burn-track.h (original)
+++ trunk/src/burn-track.h Mon Jan 21 03:59:10 2008
@@ -48,9 +48,11 @@
BRASERO_IMAGE_FS_UDF = 1 << 1,
BRASERO_IMAGE_FS_JOLIET = 1 << 2,
BRASERO_IMAGE_FS_VIDEO = 1 << 3,
+ BRASERO_IMAGE_ISO_FS_LEVEL_3 = 1 << 4,
BRASERO_IMAGE_FS_ANY = BRASERO_IMAGE_FS_ISO|
BRASERO_IMAGE_FS_UDF|
BRASERO_IMAGE_FS_JOLIET|
+ BRASERO_IMAGE_ISO_FS_LEVEL_3|
BRASERO_IMAGE_FS_VIDEO
} BraseroImageFS;
Modified: trunk/src/burn-volume.h
==============================================================================
--- trunk/src/burn-volume.h (original)
+++ trunk/src/burn-volume.h Mon Jan 21 03:59:10 2008
@@ -47,7 +47,7 @@
struct {
gint address_block;
- gint size_bytes;
+ guint64 size_bytes;
} file;
struct {
Modified: trunk/src/plugins/cdrkit/burn-genisoimage.c
==============================================================================
--- trunk/src/plugins/cdrkit/burn-genisoimage.c (original)
+++ trunk/src/plugins/cdrkit/burn-genisoimage.c Mon Jan 21 03:59:10 2008
@@ -228,10 +228,22 @@
BRASERO_JOB_NOT_READY (genisoimage);
brasero_track_get_type (track, &type);
- if ((type.subtype.fs_type & BRASERO_IMAGE_FS_JOLIET))
+ if (type.subtype.fs_type & BRASERO_IMAGE_FS_JOLIET)
g_ptr_array_add (argv, g_strdup ("-J"));
- if ((type.subtype.fs_type & BRASERO_IMAGE_FS_VIDEO))
+ if ((type.subtype.fs_type & BRASERO_IMAGE_FS_ISO)
+ && (type.subtype.fs_type & BRASERO_IMAGE_ISO_FS_LEVEL_3)) {
+ g_ptr_array_add (argv, g_strdup ("-iso-level"));
+ g_ptr_array_add (argv, g_strdup ("3"));
+
+ /* NOTE the following is specific to genisoimage */
+ /* g_ptr_array_add (argv, g_strdup ("-allow-limited-size")); */
+ }
+
+ if (type.subtype.fs_type & BRASERO_IMAGE_FS_UDF)
+ g_ptr_array_add (argv, g_strdup ("-udf"));
+
+ if (type.subtype.fs_type & BRASERO_IMAGE_FS_VIDEO)
g_ptr_array_add (argv, g_strdup ("-dvd-video"));
g_ptr_array_add (argv, g_strdup ("-graft-points"));
@@ -488,6 +500,8 @@
BRASERO_BURN_FLAG_NONE);
input = brasero_caps_data_new (BRASERO_IMAGE_FS_ISO|
+ BRASERO_IMAGE_FS_UDF|
+ BRASERO_IMAGE_ISO_FS_LEVEL_3|
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 Mon Jan 21 03:59:10 2008
@@ -225,10 +225,19 @@
BRASERO_JOB_NOT_READY (mkisofs);
brasero_track_get_type (track, &type);
- if ((type.subtype.fs_type & BRASERO_IMAGE_FS_JOLIET))
+ if (type.subtype.fs_type & BRASERO_IMAGE_FS_JOLIET)
g_ptr_array_add (argv, g_strdup ("-J"));
- if ((type.subtype.fs_type & BRASERO_IMAGE_FS_VIDEO))
+ if ((type.subtype.fs_type & BRASERO_IMAGE_FS_ISO)
+ && (type.subtype.fs_type & BRASERO_IMAGE_ISO_FS_LEVEL_3)) {
+ g_ptr_array_add (argv, g_strdup ("-iso-level"));
+ g_ptr_array_add (argv, g_strdup ("3"));
+ }
+
+ if (type.subtype.fs_type & BRASERO_IMAGE_FS_UDF)
+ g_ptr_array_add (argv, g_strdup ("-udf"));
+
+ if (type.subtype.fs_type & BRASERO_IMAGE_FS_VIDEO)
g_ptr_array_add (argv, g_strdup ("-dvd-video"));
g_ptr_array_add (argv, g_strdup ("-graft-points"));
@@ -484,6 +493,8 @@
BRASERO_BURN_FLAG_NONE);
input = brasero_caps_data_new (BRASERO_IMAGE_FS_ISO|
+ BRASERO_IMAGE_FS_UDF|
+ BRASERO_IMAGE_ISO_FS_LEVEL_3|
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 Mon Jan 21 03:59:10 2008
@@ -240,6 +240,17 @@
if (input.subtype.fs_type & BRASERO_IMAGE_FS_JOLIET)
g_ptr_array_add (argv, g_strdup ("-J"));
+ if ((input.subtype.fs_type & BRASERO_IMAGE_FS_ISO)
+ && (input.subtype.fs_type & BRASERO_IMAGE_ISO_FS_LEVEL_3)) {
+ /* That's the safest option. A few OS don't support that though,
+ * like MacOSX and freebsd.*/
+ g_ptr_array_add (argv, g_strdup ("-iso-level"));
+ g_ptr_array_add (argv, g_strdup ("3"));
+ }
+
+ if (input.subtype.fs_type & BRASERO_IMAGE_FS_UDF)
+ g_ptr_array_add (argv, g_strdup ("-udf"));
+
if (input.subtype.fs_type & BRASERO_IMAGE_FS_VIDEO)
g_ptr_array_add (argv, g_strdup ("-dvd-video"));
@@ -688,6 +699,8 @@
BRASERO_MEDIUM_HAS_DATA);
input = brasero_caps_data_new (BRASERO_IMAGE_FS_ISO|
+ BRASERO_IMAGE_FS_UDF|
+ BRASERO_IMAGE_ISO_FS_LEVEL_3|
BRASERO_IMAGE_FS_JOLIET|
BRASERO_IMAGE_FS_VIDEO);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]