brasero r956 - in branches/video: . po src src/plugins/cdrkit src/plugins/cdrtools
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r956 - in branches/video: . po src src/plugins/cdrkit src/plugins/cdrtools
- Date: Mon, 7 Jul 2008 07:49:45 +0000 (UTC)
Author: philippr
Date: Mon Jul 7 07:49:45 2008
New Revision: 956
URL: http://svn.gnome.org/viewvc/brasero?rev=956&view=rev
Log:
ported changes from trunk
Modified:
branches/video/NEWS
branches/video/po/cs.po
branches/video/po/he.po
branches/video/po/nb.po
branches/video/po/oc.po
branches/video/src/brasero-audio-disc.c
branches/video/src/brasero-data-disc.c
branches/video/src/brasero-data-project.c
branches/video/src/brasero-data-tree-model.c
branches/video/src/brasero-data-tree-model.h
branches/video/src/brasero-data-vfs.c
branches/video/src/brasero-file-monitor.c
branches/video/src/brasero-image-option-dialog.c
branches/video/src/brasero-video-project.c
branches/video/src/burn-drive.c
branches/video/src/burn-drive.h
branches/video/src/burn-image-format.c
branches/video/src/burn-image-format.h
branches/video/src/burn-mkisofs-base.c
branches/video/src/burn-track.c
branches/video/src/burn-volume-obj.c
branches/video/src/burn-volume-source.c
branches/video/src/plugins/cdrkit/burn-readom.c
branches/video/src/plugins/cdrtools/burn-cdrecord.c
branches/video/src/plugins/cdrtools/burn-readcd.c
Modified: branches/video/NEWS
==============================================================================
--- branches/video/NEWS (original)
+++ branches/video/NEWS Mon Jul 7 07:49:45 2008
@@ -1,3 +1,28 @@
+?-06-2008
+
+Bug fixed:
+
+- #506338 â Import Session fails on DVD+R that contains multiple sessions
+- #540931 â Fails to burn an iso to DVD+RW in 0.7.90
+- #540993 â Brasero displays (and uses) incorrect track durations
+- #527383 â Disc Copy (Create 1:1 copy of CD) doesn't work at all
+- #539959 - Crash when right clicking in plugin window
+- #527383 â Disc Copy (Create 1:1 copy of CD) doesn't work at all
+- #540673 â m3u playlist import problem
+- #538953 â crash in Brasero Disc Burning: I was trying to copy a C...
+- #531084 â Brasero crashes in strlen () when debug mode is on
+- #539386 â can't compile brasero 0.7.90 with gcc 4.3 function needs one more argument
+- #538299 â Window titles
+- #538414 â burn speed problems
+- #538346 â Does not ask to overwrite existing log file
+- #538300 â Use add icon and label for add files dialog
+- #534880 â Audio project track column
+- #470234 â Doesn't format fresh dvd+rw before burning
+- #532495 â crash when removing/moving a file that has been added to brasero
+- #493495 â Growisofs stops while burning Video-DVD
+
+and other fixes (See ChangeLog)
+
?-05-2008 : 0.7.90
Highlights:
Modified: branches/video/src/brasero-audio-disc.c
==============================================================================
--- branches/video/src/brasero-audio-disc.c (original)
+++ branches/video/src/brasero-audio-disc.c Mon Jul 7 07:49:45 2008
@@ -265,6 +265,8 @@
#ifdef BUILD_INOTIFY
+ BraseroIOJobBase *reload_uri;
+
int notify_id;
GIOChannel *notify;
GHashTable *monitored;
@@ -834,6 +836,9 @@
disc->priv->monitored = NULL;
}
+ if (disc->priv->reload_uri && disc->priv->io)
+ brasero_io_cancel_by_base (disc->priv->io, disc->priv->reload_uri);
+
#endif
disc->priv->sectors = 0;
@@ -1786,6 +1791,7 @@
disc->priv->add_uri,
BRASERO_IO_INFO_PERM|
BRASERO_IO_INFO_MIME|
+ BRASERO_IO_INFO_URGENT|
BRASERO_IO_INFO_METADATA|
BRASERO_IO_INFO_METADATA_MISSING_CODEC,
ref);
@@ -3785,26 +3791,20 @@
}
static void
-brasero_audio_disc_inotify_modify (BraseroAudioDisc *disc,
- const gchar *uri,
- BraseroMetadataInfo *metadata)
+brasero_audio_disc_inotify_modify_result (GObject *object,
+ GError *error,
+ const gchar *uri,
+ GFileInfo *info,
+ gpointer callback_data)
{
+ BraseroAudioDisc *disc = BRASERO_AUDIO_DISC (object);
GSList *list, *list_iter;
GtkTreeModel *model;
- GFileInfo *info;
list = brasero_audio_disc_inotify_find_rows (disc, uri);
if (!list)
return;
- info = g_file_info_new ();
- g_file_info_set_attribute_uint64 (info, BRASERO_IO_LEN, metadata->len);
- g_file_info_set_attribute_string (info, BRASERO_IO_ARTIST, metadata->artist);
- g_file_info_set_attribute_string (info, BRASERO_IO_TITLE, metadata->title);
- g_file_info_set_attribute_int32 (info, BRASERO_IO_ISRC, metadata->isrc);
- g_file_info_set_attribute_string (info, BRASERO_IO_COMPOSER, metadata->composer);
- g_file_info_set_attribute_boolean (info, BRASERO_IO_HAS_AUDIO, metadata->has_audio);
-
model = gtk_tree_view_get_model (GTK_TREE_VIEW (disc->priv->tree));
for (list_iter = list; list_iter; list_iter = list_iter->next) {
GtkTreePath *treepath;
@@ -3813,14 +3813,14 @@
treepath = list_iter->data;
gtk_tree_model_get_iter (model, &iter, treepath);
- brasero_audio_disc_set_row_from_metadata (disc,
- model,
- &iter,
- info);
+ if (error)
+ brasero_audio_disc_remove (disc, treepath);
+ else
+ brasero_audio_disc_set_row_from_metadata (disc,
+ model,
+ &iter,
+ info);
}
-
- g_object_unref (info);
-
g_slist_foreach (list, (GFunc) gtk_tree_path_free, NULL);
g_slist_free (list);
}
@@ -3876,57 +3876,40 @@
data = iter->data;
if (data->cookie == event->cookie)
break;
+
+ data = NULL;
}
if (data) {
- GSList *paths, *list_iter;
- GtkTreeModel *model;
- gchar *old_name;
- gchar *new_name;
+ GSList *paths;
/* we've got one match:
* - remove from the list
* - remove the timeout
* - change all the uris with the new one */
- disc->priv->moved_list = g_slist_remove (disc->priv->moved_list,
- data);
-
+ disc->priv->moved_list = g_slist_remove (disc->priv->moved_list, data);
paths = brasero_audio_disc_inotify_find_rows (disc, data->uri);
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (disc->priv->tree));
- old_name = g_path_get_basename (data->uri);
- new_name = g_path_get_basename (uri);
+ /* we are only interested if the destination is in our tree
+ * then that means the file was modified */
+ if (!disc->priv->io)
+ disc->priv->io = brasero_io_get_default ();
+
+ if (!disc->priv->reload_uri)
+ disc->priv->reload_uri = brasero_io_register (G_OBJECT (disc),
+ brasero_audio_disc_inotify_modify_result,
+ NULL,
+ NULL);
- for (list_iter = paths; list_iter; list_iter = list_iter->next) {
- GtkTreePath *treepath;
- GtkTreeIter iter;
- gchar *name;
-
- treepath = list_iter->data;
- gtk_tree_model_get_iter (model, &iter, treepath);
- gtk_tree_model_get (model, &iter,
- NAME_COL, &name,
- -1);
-
- /* see if the user changed the name or if it is
- * displaying song name metadata. Basically if
- * the name is the same as the old one we change
- * it to the new one. */
- if (!strcmp (name, old_name)) {
- gchar *markup;
-
- markup = g_markup_escape_text (new_name, -1);
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- NAME_COL, markup,
- -1);
- g_free (markup);
- }
- g_free (name);
-
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- URI_COL, uri,
- -1);
- }
+ brasero_io_get_file_info (disc->priv->io,
+ uri,
+ disc->priv->reload_uri,
+ BRASERO_IO_INFO_PERM|
+ BRASERO_IO_INFO_MIME|
+ BRASERO_IO_INFO_URGENT|
+ BRASERO_IO_INFO_METADATA|
+ BRASERO_IO_INFO_METADATA_MISSING_CODEC,
+ NULL);
/* clean up the mess */
g_slist_foreach (paths, (GFunc) gtk_tree_path_free, NULL);
@@ -3935,9 +3918,6 @@
g_source_remove (data->id);
g_free (data->uri);
g_free (data);
-
- g_free (old_name);
- g_free (new_name);
}
}
}
@@ -4077,7 +4057,11 @@
}
if (dir->uri && name) {
+ gchar *escaped_name;
+
+ escaped_name = g_uri_escape_string (name, NULL, TRUE);
monitored = g_strconcat (dir->uri, "/", name, NULL);
+ g_free (escaped_name);
g_free (name);
}
else
@@ -4110,33 +4094,25 @@
brasero_audio_disc_inotify_attributes_changed (disc, monitored);
}
else if (event.mask & IN_MODIFY
- && brasero_audio_disc_inotify_is_in_selection (disc, monitored)) {
- BraseroMetadata *metadata;
- BraseroMetadataInfo info;
- GError *error = NULL;
-
- /* a file was modified */
- metadata = brasero_metadata_new ();
-
- if (!metadata
- || !brasero_metadata_get_info_sync (metadata, monitored, BRASERO_METADATA_FLAG_NONE, &error)) {
- if (error) {
- g_warning ("ERROR : %s\n", error->message);
- g_error_free (error);
- g_object_unref (metadata);
- }
-
- brasero_audio_disc_inotify_remove (disc, monitored);
- continue;
- }
-
- /* FIXME: we should remove the row if it hasn't audio */
- brasero_metadata_set_info (metadata, &info);
- brasero_audio_disc_inotify_modify (disc,
- monitored,
- &info);
- brasero_metadata_info_clear (&info);
- g_object_unref (metadata);
+ && brasero_audio_disc_inotify_is_in_selection (disc, monitored)) {
+ if (!disc->priv->io)
+ disc->priv->io = brasero_io_get_default ();
+
+ if (!disc->priv->reload_uri)
+ disc->priv->reload_uri = brasero_io_register (G_OBJECT (disc),
+ brasero_audio_disc_inotify_modify_result,
+ NULL,
+ NULL);
+
+ brasero_io_get_file_info (disc->priv->io,
+ monitored,
+ disc->priv->reload_uri,
+ BRASERO_IO_INFO_PERM|
+ BRASERO_IO_INFO_MIME|
+ BRASERO_IO_INFO_URGENT|
+ BRASERO_IO_INFO_METADATA|
+ BRASERO_IO_INFO_METADATA_MISSING_CODEC,
+ NULL);
}
if (monitored) {
Modified: branches/video/src/brasero-data-disc.c
==============================================================================
--- branches/video/src/brasero-data-disc.c (original)
+++ branches/video/src/brasero-data-disc.c Mon Jul 7 07:49:45 2008
@@ -468,8 +468,7 @@
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
gtk_clipboard_request_targets (clipboard,
- (GtkClipboardTargetsReceivedFunc)
- brasero_data_disc_clipboard_targets_cb,
+ (GtkClipboardTargetsReceivedFunc) brasero_data_disc_clipboard_targets_cb,
data);
}
@@ -2109,10 +2108,12 @@
gtk_tree_view_column_pack_end (column, renderer, TRUE);
gtk_tree_view_column_add_attribute (column, renderer,
- "markup", BRASERO_DATA_TREE_MODEL_NAME);
+ "text", BRASERO_DATA_TREE_MODEL_NAME);
gtk_tree_view_column_add_attribute (column, renderer,
"style", BRASERO_DATA_TREE_MODEL_STYLE);
gtk_tree_view_column_add_attribute (column, renderer,
+ "foreground", BRASERO_DATA_TREE_MODEL_COLOR);
+ gtk_tree_view_column_add_attribute (column, renderer,
"editable", BRASERO_DATA_TREE_MODEL_EDITABLE);
g_object_set (G_OBJECT (renderer),
Modified: branches/video/src/brasero-data-project.c
==============================================================================
--- branches/video/src/brasero-data-project.c (original)
+++ branches/video/src/brasero-data-project.c Mon Jul 7 07:49:45 2008
@@ -414,9 +414,9 @@
BraseroFileNode *node)
{
BraseroDataProjectPrivate *priv;
+ GSList *list = NULL;
gchar *retval;
guint uri_len;
- GSList *list;
GSList *iter;
gchar *ptr;
guint len;
@@ -433,20 +433,26 @@
uri_len = 0;
list = NULL;
for (; node; node = node->parent) {
+ gchar *escaped_name;
+
if (node->is_grafted)
break;
if (node == priv->root)
break;
- list = g_slist_prepend (list, node);
-
/* the + 1 is for the separator */
- uri_len += strlen (BRASERO_FILE_NODE_NAME (node)) + 1;
+ escaped_name = g_uri_escape_string (BRASERO_FILE_NODE_NAME (node), NULL, TRUE);
+ uri_len += strlen (escaped_name) + 1;
+ list = g_slist_prepend (list, escaped_name);
}
- if (!node || node->is_root)
+ /* The node here is the first grafted parent */
+ if (!node || node->is_root) {
+ g_slist_foreach (list, (GFunc) g_free, NULL);
+ g_slist_free (list);
return NULL;
+ }
/* NOTE: directories URIs shouldn't have a separator at end */
len = strlen (BRASERO_FILE_NODE_GRAFT (node)->node->uri);
@@ -458,19 +464,21 @@
ptr = retval + len;
for (iter = list; iter; iter = iter->next) {
- node = iter->data;
+ gchar *escaped_name;
+
+ escaped_name = iter->data;
ptr [0] = G_DIR_SEPARATOR;
ptr ++;
- len = strlen (BRASERO_FILE_NODE_NAME (node));
- memcpy (ptr, BRASERO_FILE_NODE_NAME (node), len);
+ len = strlen (escaped_name);
+ memcpy (ptr, escaped_name, len);
ptr += len;
}
+ g_slist_foreach (list, (GFunc) g_free, NULL);
g_slist_free (list);
ptr [0] = '\0';
-
return retval;
}
@@ -1358,7 +1366,7 @@
* simply not possible to rename. */
sibling = brasero_file_node_check_name_existence (node->parent, name);
if (sibling) {
- if (brasero_data_project_file_signal (self, NAME_COLLISION_SIGNAL, BRASERO_FILE_NODE_NAME (node)))
+ if (brasero_data_project_file_signal (self, NAME_COLLISION_SIGNAL, name))
return FALSE;
if (sibling != node)
Modified: branches/video/src/brasero-data-tree-model.c
==============================================================================
--- branches/video/src/brasero-data-tree-model.c (original)
+++ branches/video/src/brasero-data-tree-model.c Mon Jul 7 07:49:45 2008
@@ -460,21 +460,7 @@
case BRASERO_DATA_TREE_MODEL_NAME:
g_value_init (value, G_TYPE_STRING);
-
- /* we may have to set some markup on it */
- if (node->is_imported) {
- gchar *markup;
-
- /* italics and small difference in colour */
- markup = g_strdup_printf ("<span foreground='grey50'>%s</span>",
- BRASERO_FILE_NODE_NAME (node));
-
- g_value_set_string (value, markup);
- g_free (markup);
- }
- else
- g_value_set_string (value, BRASERO_FILE_NODE_NAME (node));
-
+ g_value_set_string (value, BRASERO_FILE_NODE_NAME (node));
return;
case BRASERO_DATA_TREE_MODEL_MIME_DESC:
@@ -622,6 +608,13 @@
return;
+ case BRASERO_DATA_TREE_MODEL_COLOR:
+ g_value_init (value, G_TYPE_STRING);
+ if (node->is_imported)
+ g_value_set_string (value, "grey50");
+
+ return;
+
default:
return;
}
@@ -811,6 +804,9 @@
case BRASERO_DATA_TREE_MODEL_STYLE:
return PANGO_TYPE_STYLE;
+ case BRASERO_DATA_TREE_MODEL_COLOR:
+ return G_TYPE_STRING;
+
case BRASERO_DATA_TREE_MODEL_EDITABLE:
return G_TYPE_BOOLEAN;
@@ -1126,25 +1122,6 @@
gtk_tree_sortable_sort_column_changed (sortable);
}
-static void
-brasero_data_tree_model_set_sort_func (GtkTreeSortable *sortable,
- gint column,
- GtkTreeIterCompareFunc sort_func,
- gpointer data,
- GtkDestroyNotify destroy)
-{
-
-}
-
-static void
-brasero_data_tree_model_set_default_sort_func (GtkTreeSortable *sortable,
- GtkTreeIterCompareFunc sort_func,
- gpointer data,
- GtkDestroyNotify destroy)
-{
-
-}
-
static gboolean
brasero_data_tree_model_has_default_sort_func (GtkTreeSortable *sortable)
{
@@ -1587,10 +1564,8 @@
initialized = TRUE;
- iface->set_sort_func = brasero_data_tree_model_set_sort_func;
iface->get_sort_column_id = brasero_data_tree_model_get_sort_column_id;
iface->set_sort_column_id = brasero_data_tree_model_set_sort_column_id;
- iface->set_default_sort_func = brasero_data_tree_model_set_default_sort_func;
iface->has_default_sort_func = brasero_data_tree_model_has_default_sort_func;
}
Modified: branches/video/src/brasero-data-tree-model.h
==============================================================================
--- branches/video/src/brasero-data-tree-model.h (original)
+++ branches/video/src/brasero-data-tree-model.h Mon Jul 7 07:49:45 2008
@@ -49,6 +49,7 @@
BRASERO_DATA_TREE_MODEL_SHOW_PERCENT,
BRASERO_DATA_TREE_MODEL_PERCENT,
BRASERO_DATA_TREE_MODEL_STYLE,
+ BRASERO_DATA_TREE_MODEL_COLOR,
BRASERO_DATA_TREE_MODEL_EDITABLE,
BRASERO_DATA_TREE_MODEL_COL_NUM
} BraseroDataProjectColumn;
Modified: branches/video/src/brasero-data-vfs.c
==============================================================================
--- branches/video/src/brasero-data-vfs.c (original)
+++ branches/video/src/brasero-data-vfs.c Mon Jul 7 07:49:45 2008
@@ -422,7 +422,6 @@
return;
/* Filtering part */
-
name = g_file_info_get_name (info);
/* See if it's a broken symlink */
Modified: branches/video/src/brasero-file-monitor.c
==============================================================================
--- branches/video/src/brasero-file-monitor.c (original)
+++ branches/video/src/brasero-file-monitor.c Mon Jul 7 07:49:45 2008
@@ -574,6 +574,7 @@
const gchar *uri)
{
BraseroFileMonitorPrivate *priv;
+ gchar *unescaped_uri;
gchar *path;
gint dev_fd;
uint32_t mask;
@@ -581,7 +582,9 @@
priv = BRASERO_FILE_MONITOR_PRIVATE (self);
- path = g_filename_from_uri (uri, NULL, NULL);
+ unescaped_uri = g_uri_unescape_string (uri, NULL);
+ path = g_filename_from_uri (unescaped_uri, NULL, NULL);
+ g_free (unescaped_uri);
dev_fd = g_io_channel_unix_get_fd (priv->notify);
mask = IN_MODIFY |
@@ -670,6 +673,7 @@
* parent directory. We give them the same handle as their parent
* directory to find it more easily and mark it as being watched */
wd = brasero_file_monitor_start_monitoring_real (self, uri);
+
if (!wd)
return FALSE;
Modified: branches/video/src/brasero-image-option-dialog.c
==============================================================================
--- branches/video/src/brasero-image-option-dialog.c (original)
+++ branches/video/src/brasero-image-option-dialog.c Mon Jul 7 07:49:45 2008
@@ -152,15 +152,24 @@
uri,
NULL);
else if (!strcmp (g_file_info_get_content_type (info), "application/x-cdrdao-toc"))
+ /* This image type is installed by brasero */
brasero_image_option_dialog_set_track (dialog,
BRASERO_IMAGE_FORMAT_CDRDAO,
NULL,
uri);
- else if (!strcmp (g_file_info_get_content_type (info), "application/x-cue"))
+ else if (!strcmp (g_file_info_get_content_type (info), "application/x-cue")) {
+ BraseroImageFormat format;
+ gchar *path;
+
+ path = g_filename_from_uri (uri, NULL, NULL);
+ format = brasero_image_format_identify_cuesheet (path);
+ g_free (path);
+
brasero_image_option_dialog_set_track (dialog,
BRASERO_IMAGE_FORMAT_CUE,
NULL,
uri);
+ }
else
brasero_image_option_dialog_set_track (dialog,
BRASERO_IMAGE_FORMAT_NONE,
Modified: branches/video/src/brasero-video-project.c
==============================================================================
--- branches/video/src/brasero-video-project.c (original)
+++ branches/video/src/brasero-video-project.c Mon Jul 7 07:49:45 2008
@@ -798,6 +798,7 @@
priv->load_uri,
BRASERO_IO_INFO_PERM|
BRASERO_IO_INFO_MIME|
+ BRASERO_IO_INFO_URGENT|
BRASERO_IO_INFO_METADATA|
BRASERO_IO_INFO_METADATA_MISSING_CODEC|
BRASERO_IO_INFO_METADATA_SNAPSHOT,
@@ -983,20 +984,6 @@
}
static void
-brasero_video_project_file_moved (BraseroFileMonitor *monitor,
- BraseroFileMonitorType type,
- gpointer callback_src,
- const gchar *name_src,
- gpointer callback_dest,
- const gchar *name_dest)
-{
- /* This is a file removed since we won't monitor all folders to get its
- * new path */
- brasero_video_project_remove_file (BRASERO_VIDEO_PROJECT (monitor),
- callback_src);
-}
-
-static void
brasero_video_project_file_removed (BraseroFileMonitor *monitor,
BraseroFileMonitorType type,
gpointer callback_data,
@@ -1031,12 +1018,28 @@
priv->load_uri,
BRASERO_IO_INFO_PERM|
BRASERO_IO_INFO_MIME|
+ BRASERO_IO_INFO_URGENT|
BRASERO_IO_INFO_METADATA|
BRASERO_IO_INFO_METADATA_MISSING_CODEC|
BRASERO_IO_INFO_METADATA_SNAPSHOT,
GINT_TO_POINTER (ref));
}
+static void
+brasero_video_project_file_moved (BraseroFileMonitor *monitor,
+ BraseroFileMonitorType type,
+ gpointer callback_src,
+ const gchar *name_src,
+ gpointer callback_dest,
+ const gchar *name_dest)
+{
+ /* This is a file removed since we won't monitor all folders to get its
+ * new path */
+ /* FIXME: what about files moved to one of the URI in the list ? */
+ brasero_video_project_remove_file (BRASERO_VIDEO_PROJECT (monitor),
+ callback_src);
+}
+
#endif
static void
Modified: branches/video/src/burn-drive.c
==============================================================================
--- branches/video/src/burn-drive.c (original)
+++ branches/video/src/burn-drive.c Mon Jul 7 07:49:45 2008
@@ -360,6 +360,15 @@
BRASERO_DRIVE_CAPS_DVDRW_PLUS_DL));
}
+gboolean
+brasero_drive_has_safe_burn (BraseroDrive *self)
+{
+ BraseroDrivePrivate *priv;
+
+ priv = BRASERO_DRIVE_PRIVATE (self);
+ return TRUE;
+}
+
static void
brasero_drive_init (BraseroDrive *object)
{ }
Modified: branches/video/src/burn-drive.h
==============================================================================
--- branches/video/src/burn-drive.h (original)
+++ branches/video/src/burn-drive.h Mon Jul 7 07:49:45 2008
@@ -104,6 +104,9 @@
brasero_drive_can_write (BraseroDrive *drive);
gboolean
+brasero_drive_has_safe_burn (BraseroDrive *drive);
+
+gboolean
brasero_drive_is_door_open (BraseroDrive *drive);
gboolean
Modified: branches/video/src/burn-image-format.c
==============================================================================
--- branches/video/src/burn-image-format.c (original)
+++ branches/video/src/burn-image-format.c Mon Jul 7 07:49:45 2008
@@ -645,6 +645,79 @@
return TRUE;
}
+BraseroImageFormat
+brasero_image_format_identify_cuesheet (const gchar *path)
+{
+ FILE *file;
+ BraseroImageFormat format;
+ gchar buffer [MAXPATHLEN * 2];
+
+ if (!path)
+ return BRASERO_IMAGE_FORMAT_NONE;
+
+ /* NOTE: the problem here is that cdrdao files can have references to
+ * multiple files. Which is great but not for us ... */
+ file = fopen (path, "r");
+ if (!file)
+ return BRASERO_IMAGE_FORMAT_NONE;
+
+ format = BRASERO_IMAGE_FORMAT_NONE;
+ while (fgets (buffer, sizeof (buffer), file)) {
+ /* Keywords for cdrdao cuesheets */
+ if (strstr (buffer, "CD_ROM_XA")
+ || strstr (buffer, "CD_ROM")
+ || strstr (buffer, "CD_DA")
+ || strstr (buffer, "CD_TEXT")) {
+ format = BRASERO_IMAGE_FORMAT_CDRDAO;
+ break;
+ }
+ else if (strstr (buffer, "TRACK")) {
+ /* NOTE: there is also "AUDIO" but it's common to both */
+
+ /* CDRDAO */
+ if (strstr (buffer, "MODE1")
+ || strstr (buffer, "MODE1_RAW")
+ || strstr (buffer, "MODE2_FORM1")
+ || strstr (buffer, "MODE2_FORM2")
+ || strstr (buffer, "MODE_2_RAW")
+ || strstr (buffer, "MODE2_FORM_MIX")
+ || strstr (buffer, "MODE2")) {
+ format = BRASERO_IMAGE_FORMAT_CDRDAO;
+ break;
+ }
+
+ /* .CUE file */
+ else if (strstr (buffer, "CDG")
+ || strstr (buffer, "MODE1/2048")
+ || strstr (buffer, "MODE1/2352")
+ || strstr (buffer, "MODE2/2336")
+ || strstr (buffer, "MODE2/2352")
+ || strstr (buffer, "CDI/2336")
+ || strstr (buffer, "CDI/2352")) {
+ format = BRASERO_IMAGE_FORMAT_CUE;
+ break;
+ }
+ }
+ else if (strstr (buffer, "FILE")) {
+ if (strstr (buffer, "MOTOROLA")
+ || strstr (buffer, "BINARY")
+ || strstr (buffer, "AIFF")
+ || strstr (buffer, "WAVE")
+ || strstr (buffer, "MP3")) {
+ format = BRASERO_IMAGE_FORMAT_CUE;
+ break;
+ }
+ }
+ }
+ fclose (file);
+
+ BRASERO_BURN_LOG_WITH_FULL_TYPE (BRASERO_TRACK_TYPE_IMAGE,
+ format,
+ BRASERO_BURN_FLAG_NONE,
+ "Detected");
+ return format;
+}
+
gboolean
brasero_image_format_get_iso_size (gchar *path,
gint64 *blocks,
Modified: branches/video/src/burn-image-format.h
==============================================================================
--- branches/video/src/burn-image-format.h (original)
+++ branches/video/src/burn-image-format.h Mon Jul 7 07:49:45 2008
@@ -43,6 +43,9 @@
BRASERO_IMAGE_FORMAT_CLONE,
} BraseroImageFormat;
+BraseroImageFormat
+brasero_image_format_identify_cuesheet (const gchar *path);
+
gchar *
brasero_image_format_get_complement (BraseroImageFormat format,
const gchar *path);
Modified: branches/video/src/burn-mkisofs-base.c
==============================================================================
--- branches/video/src/burn-mkisofs-base.c (original)
+++ branches/video/src/burn-mkisofs-base.c Mon Jul 7 07:49:45 2008
@@ -119,6 +119,7 @@
gint forbidden;
gchar *character;
gchar *localpath;
+ gchar *unescaped_uri;
BraseroBurnResult result = BRASERO_BURN_OK;
/* make sure uri is local: otherwise error out */
@@ -130,7 +131,9 @@
return BRASERO_BURN_ERR;
}
- localpath = g_filename_from_uri (uri, NULL, NULL);
+ unescaped_uri = g_uri_unescape_string (uri, NULL);
+ localpath = g_filename_from_uri (unescaped_uri, NULL, NULL);
+ g_free (unescaped_uri);
/* we need to escape some characters like []\? since in this file we
* can use glob like expressions. */
Modified: branches/video/src/burn-track.c
==============================================================================
--- branches/video/src/burn-track.c (original)
+++ branches/video/src/burn-track.c Mon Jul 7 07:49:45 2008
@@ -1021,7 +1021,7 @@
image = (BraseroTrackImage *) track;
- /* Convienience function */
+ /* Convenience function */
if (track->type.subtype.img_format == BRASERO_IMAGE_FORMAT_BIN) {
gchar *path;
Modified: branches/video/src/burn-volume-obj.c
==============================================================================
--- branches/video/src/burn-volume-obj.c (original)
+++ branches/video/src/burn-volume-obj.c Mon Jul 7 07:49:45 2008
@@ -33,6 +33,7 @@
#include <gio/gio.h>
#include "burn-basics.h"
+#include "burn-debug.h"
#include "burn-volume-obj.h"
typedef struct _BraseroVolumePrivate BraseroVolumePrivate;
@@ -87,7 +88,6 @@
tmp = iter->data;
device_path = g_volume_get_identifier (tmp, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
-
if (!strcmp (device_path, volume_path)) {
volume = tmp;
g_free (device_path);
@@ -101,7 +101,7 @@
g_list_free (volumes);
if (!volume)
- g_warning ("No volume found for medium");
+ BRASERO_BURN_LOG ("No volume found for medium");
return volume;
}
@@ -119,6 +119,9 @@
priv = BRASERO_VOLUME_PRIVATE (self);
volume = brasero_volume_get_gvolume (self);
+ if (!volume)
+ return FALSE;
+
if (!g_volume_can_mount (volume)) {
/* if it can't be mounted then it's unmounted ... */
g_object_unref (volume);
@@ -147,6 +150,8 @@
priv = BRASERO_VOLUME_PRIVATE (self);
volume = brasero_volume_get_gvolume (self);
+ if (!volume)
+ return NULL;
/* get the uri for the mount point */
mount = g_volume_get_mount (volume);
@@ -296,6 +301,9 @@
priv = BRASERO_VOLUME_PRIVATE (self);
volume = brasero_volume_get_gvolume (self);
+ if (!volume)
+ return TRUE;
+
if (!g_volume_can_mount (volume)) {
/* if it can't be mounted then it's unmounted ... */
g_object_unref (volume);
@@ -395,6 +403,9 @@
priv = BRASERO_VOLUME_PRIVATE (self);
volume = brasero_volume_get_gvolume (self);
+ if (!volume)
+ return FALSE;
+
if (!g_volume_can_mount (volume)) {
g_object_unref (volume);
return FALSE;
@@ -481,6 +492,9 @@
priv = BRASERO_VOLUME_PRIVATE (self);
volume = brasero_volume_get_gvolume (self);
+ if (!volume)
+ return FALSE;
+
gdrive = g_volume_get_drive (volume);
g_object_unref (volume);
@@ -557,6 +571,9 @@
}
volume = brasero_volume_get_gvolume (self);
+ if (!volume)
+ return NULL;
+
name = g_volume_get_name (volume);
g_object_unref (volume);
@@ -595,26 +612,31 @@
type = brasero_medium_get_type_string (BRASERO_MEDIUM (self));
+ name = NULL;
volume = brasero_volume_get_gvolume (self);
- name = g_volume_get_name (volume);
- g_object_unref (volume);
+ if (volume) {
+ name = g_volume_get_name (volume);
+ g_object_unref (volume);
- if (name && name [0] != '\0') {
- if (with_markup)
- /* NOTE for translators: the first %s is the disc type and the
- * second %s the label of the already existing session on this disc. */
- label = g_strdup_printf (_("<b>Data %s</b>: \"%s\""),
- type,
- name);
- else
- label = g_strdup_printf (_("Data %s: \"%s\""),
- type,
- name);
+ if (name && name [0] != '\0') {
+ if (with_markup)
+ /* NOTE for translators: the first %s is the disc type and the
+ * second %s the label of the already existing session on this disc. */
+ label = g_strdup_printf (_("<b>Data %s</b>: \"%s\""),
+ type,
+ name);
+ else
+ label = g_strdup_printf (_("Data %s: \"%s\""),
+ type,
+ name);
- g_free (name);
- return label;
+ g_free (name);
+ return label;
+ }
+
+ if (name)
+ g_free (name);
}
- g_free (name);
drive = brasero_medium_get_drive (BRASERO_MEDIUM (self));
name = brasero_drive_get_display_name (drive);
Modified: branches/video/src/burn-volume-source.c
==============================================================================
--- branches/video/src/burn-volume-source.c (original)
+++ branches/video/src/burn-volume-source.c Mon Jul 7 07:49:45 2008
@@ -56,8 +56,12 @@
int whence,
GError **error)
{
- if (fseek (src->data, block * ISO9660_BLOCK_SIZE, whence) == -1) {
- BRASERO_BURN_LOG ("fseek () failed at block %lli (%s)", block, strerror (errno));
+
+ if (fseeko (src->data, (guint64) (block * ISO9660_BLOCK_SIZE), whence) == -1) {
+ BRASERO_BURN_LOG ("fseeko () failed at block %i (= %lli bytes) (%s)",
+ block,
+ (guint64) (block * ISO9660_BLOCK_SIZE),
+ strerror (errno));
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
Modified: branches/video/src/plugins/cdrkit/burn-readom.c
==============================================================================
--- branches/video/src/plugins/cdrkit/burn-readom.c (original)
+++ branches/video/src/plugins/cdrkit/burn-readom.c Mon Jul 7 07:49:45 2008
@@ -279,8 +279,14 @@
* because it is raw96 (2352+96) otherwise it is 2048 */
g_ptr_array_add (argv, g_strdup ("-clone"));
}
- else if (output.subtype.img_format == BRASERO_IMAGE_FORMAT_BIN)
+ else if (output.subtype.img_format == BRASERO_IMAGE_FORMAT_BIN) {
g_ptr_array_add (argv, g_strdup ("-noerror"));
+
+ /* don't do it for clone since we need the entire disc */
+ result = brasero_readom_argv_set_iso_boundary (readom, argv, error);
+ if (result != BRASERO_BURN_OK)
+ return result;
+ }
else
BRASERO_JOB_NOT_SUPPORTED (readom);
@@ -291,10 +297,6 @@
&& output.subtype.img_format != BRASERO_IMAGE_FORMAT_BIN)
BRASERO_JOB_NOT_SUPPORTED (readom);
- result = brasero_readom_argv_set_iso_boundary (readom, argv, error);
- if (result != BRASERO_BURN_OK)
- return result;
-
result = brasero_job_get_image_output (BRASERO_JOB (readom),
&image,
NULL);
@@ -306,10 +308,6 @@
g_free (image);
}
else if (output.subtype.img_format == BRASERO_IMAGE_FORMAT_BIN) {
- result = brasero_readom_argv_set_iso_boundary (readom, argv, error);
- if (result != BRASERO_BURN_OK)
- return result;
-
outfile_arg = g_strdup ("-f=-");
g_ptr_array_add (argv, outfile_arg);
}
Modified: branches/video/src/plugins/cdrtools/burn-cdrecord.c
==============================================================================
--- branches/video/src/plugins/cdrtools/burn-cdrecord.c (original)
+++ branches/video/src/plugins/cdrtools/burn-cdrecord.c Mon Jul 7 07:49:45 2008
@@ -1064,7 +1064,7 @@
BRASERO_PLUGIN_IO_ACCEPT_FILE,
BRASERO_IMAGE_FORMAT_BIN);
- /* cdrecord can burn all DVDs (except restricted)when it's ISOs */
+ /* cdrecord can burn all DVDs (except restricted) when it's ISOs */
output = brasero_caps_disc_new (dvd_media);
brasero_plugin_link_caps (plugin, output, input);
g_slist_free (output);
Modified: branches/video/src/plugins/cdrtools/burn-readcd.c
==============================================================================
--- branches/video/src/plugins/cdrtools/burn-readcd.c (original)
+++ branches/video/src/plugins/cdrtools/burn-readcd.c Mon Jul 7 07:49:45 2008
@@ -289,8 +289,14 @@
* because it is raw96 (2352+96) otherwise it is 2048 */
g_ptr_array_add (argv, g_strdup ("-clone"));
}
- else if (output.subtype.img_format == BRASERO_IMAGE_FORMAT_BIN)
+ else if (output.subtype.img_format == BRASERO_IMAGE_FORMAT_BIN) {
g_ptr_array_add (argv, g_strdup ("-noerror"));
+
+ /* don't do it for clone since we need the entire disc */
+ result = brasero_readcd_argv_set_iso_boundary (readcd, argv, error);
+ if (result != BRASERO_BURN_OK)
+ return result;
+ }
else
BRASERO_JOB_NOT_SUPPORTED (readcd);
@@ -301,10 +307,6 @@
&& output.subtype.img_format != BRASERO_IMAGE_FORMAT_BIN)
BRASERO_JOB_NOT_SUPPORTED (readcd);
- result = brasero_readcd_argv_set_iso_boundary (readcd, argv, error);
- if (result != BRASERO_BURN_OK)
- return result;
-
result = brasero_job_get_image_output (BRASERO_JOB (readcd),
&image,
NULL);
@@ -316,10 +318,6 @@
g_free (image);
}
else if (output.subtype.img_format == BRASERO_IMAGE_FORMAT_BIN) {
- result = brasero_readcd_argv_set_iso_boundary (readcd, argv, error);
- if (result != BRASERO_BURN_OK)
- return result;
-
outfile_arg = g_strdup ("-f=-");
g_ptr_array_add (argv, outfile_arg);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]