brasero r1247 - in trunk: . src src/plugins/cdrkit src/plugins/cdrtools src/plugins/growisofs src/plugins/libburnia
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r1247 - in trunk: . src src/plugins/cdrkit src/plugins/cdrtools src/plugins/growisofs src/plugins/libburnia
- Date: Sat, 6 Sep 2008 16:18:00 +0000 (UTC)
Author: philippr
Date: Sat Sep 6 16:18:00 2008
New Revision: 1247
URL: http://svn.gnome.org/viewvc/brasero?rev=1247&view=rev
Log:
Some cleanups, improvements and bug fixes
Rework the plugin flags system a bit
Fix a problem with CDRW (and probably DVDRW) which add data appended
instead of being blanked.
* src/brasero-dest-selection.c
(brasero_dest_selection_set_image_properties),
(brasero_dest_selection_check_image_settings),
(brasero_dest_selection_source_changed):
* src/brasero-disc-option-dialog.c
(brasero_disc_option_dialog_set_disc):
* src/burn-caps.c (brasero_burn_caps_flags_check_for_drive),
(brasero_burn_caps_new_task),
(brasero_caps_try_output_with_blanking),
(brasero_burn_caps_is_output_supported),
(brasero_burn_caps_is_session_supported_same_src_dest),
(brasero_burn_caps_get_required_media_type),
(brasero_burn_caps_get_flags), (brasero_caps_disc_new_subtype):
* src/burn-plugin.h:
* src/burn-session.c (brasero_burn_session_clear_current_track):
* src/burn.c (brasero_burn_lock_dest_media),
(brasero_burn_reload_dest_media),
(brasero_burn_check_session_consistency),
(brasero_burn_same_src_dest_image),
(brasero_burn_same_src_dest_reload_medium), (brasero_burn_record):
* src/plugins/cdrkit/burn-wodim.c (brasero_wodim_export_caps):
* src/plugins/cdrtools/burn-cdrecord.c
(brasero_cdrecord_export_caps):
* src/plugins/growisofs/burn-growisofs.c
(brasero_growisofs_export_caps):
* src/plugins/libburnia/burn-libburn.c
(brasero_libburn_export_caps):
Modified:
trunk/ChangeLog
trunk/src/brasero-dest-selection.c
trunk/src/brasero-disc-option-dialog.c
trunk/src/burn-caps.c
trunk/src/burn-plugin.h
trunk/src/burn-session.c
trunk/src/burn.c
trunk/src/plugins/cdrkit/burn-wodim.c
trunk/src/plugins/cdrtools/burn-cdrecord.c
trunk/src/plugins/growisofs/burn-growisofs.c
trunk/src/plugins/libburnia/burn-libburn.c
Modified: trunk/src/brasero-dest-selection.c
==============================================================================
--- trunk/src/brasero-dest-selection.c (original)
+++ trunk/src/brasero-dest-selection.c Sat Sep 6 16:18:00 2008
@@ -1035,6 +1035,7 @@
brasero_dest_selection_set_image_properties (BraseroDestSelection *self)
{
BraseroDestSelectionPrivate *priv;
+ BraseroBurnResult result;
BraseroTrackType output;
gchar *path;
@@ -1077,6 +1078,13 @@
brasero_burn_session_remove_flag (priv->session,
BRASERO_BURN_FLAG_DUMMY|
BRASERO_BURN_FLAG_NO_TMP_FILES);
+
+ result = brasero_burn_caps_is_session_supported (priv->caps, priv->session);
+ g_signal_emit (self,
+ brasero_dest_selection_signals [VALID_MEDIA_SIGNAL],
+ 0,
+ (result == BRASERO_BURN_OK));
+ gtk_widget_set_sensitive (priv->button, (result == BRASERO_BURN_OK));
}
static void
@@ -1162,6 +1170,13 @@
}
brasero_burn_session_remove_flag (priv->session, BRASERO_BURN_FLAG_DUMMY);
+
+ result = brasero_burn_caps_is_session_supported (priv->caps, priv->session);
+ g_signal_emit (self,
+ brasero_dest_selection_signals [VALID_MEDIA_SIGNAL],
+ 0,
+ (result == BRASERO_BURN_OK));
+ gtk_widget_set_sensitive (priv->button, (result == BRASERO_BURN_OK));
}
static void
@@ -1240,10 +1255,10 @@
* no disc inserted when the dialog was created. */
if (brasero_burn_session_get_output (priv->session, NULL, NULL, NULL) != BRASERO_BURN_OK)
brasero_dest_selection_set_image_properties (self);
+ else
+ brasero_dest_selection_check_image_settings (self);
- /* carry on with the next function that'll check if we have a
- * valid source medium and put the burn button in the right
- * state */
+ return;
}
brasero_dest_selection_set_drive_properties (self);
Modified: trunk/src/brasero-disc-option-dialog.c
==============================================================================
--- trunk/src/brasero-disc-option-dialog.c (original)
+++ trunk/src/brasero-disc-option-dialog.c Sat Sep 6 16:18:00 2008
@@ -1241,9 +1241,8 @@
brasero_disc_set_session_param (disc, priv->session);
- /* see if we should lock the drive */
- lock_drive = (brasero_burn_session_get_flags (priv->session) & (BRASERO_BURN_FLAG_APPEND|
- BRASERO_BURN_FLAG_MERGE)) != 0;
+ /* see if we should lock the drive only with MERGE */
+ lock_drive = (brasero_burn_session_get_flags (priv->session) & BRASERO_BURN_FLAG_MERGE) != 0;
brasero_drive_selection_lock (BRASERO_DRIVE_SELECTION (priv->selection), lock_drive);
priv->output_sig = g_signal_connect (priv->session,
Modified: trunk/src/burn-caps.c
==============================================================================
--- trunk/src/burn-caps.c (original)
+++ trunk/src/burn-caps.c Sat Sep 6 16:18:00 2008
@@ -1218,6 +1218,9 @@
if (!drive)
return TRUE;
+ if (brasero_drive_is_fake (drive))
+ return TRUE;
+
medium = brasero_drive_get_medium (drive);
if (!medium)
return TRUE;
@@ -1282,12 +1285,6 @@
BRASERO_BURN_CAPS_NOT_SUPPORTED_LOG (session);
session_flags = brasero_burn_session_get_flags (session);
-
- /* Here remove BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE since we'll handle
- * any possible need for blanking just afterwards if it doesn't work */
- session_flags &= ~(BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE|
- BRASERO_BURN_FLAG_FAST_BLANK);
-
list = brasero_caps_find_best_link (last_caps,
self->priv->group_id,
NULL,
@@ -1315,7 +1312,6 @@
/* apparently nothing can be done to reach our goal. Maybe that
* is because we first have to blank the disc. If so add a blank
* task to the others as a first step */
- session_flags = brasero_burn_session_get_flags (session);
if (!(session_flags & BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE)
|| brasero_burn_caps_can_blank (self, session) != BRASERO_BURN_OK)
BRASERO_BURN_CAPS_NOT_SUPPORTED_LOG_ERROR (session, error);
@@ -1817,12 +1813,6 @@
BraseroBurnFlag session_flags;
session_flags = brasero_burn_session_get_flags (session);
-
- /* The case with prior blanking is checked later so no need for the next
- * 2 flags */
- session_flags &= ~(BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE|
- BRASERO_BURN_FLAG_FAST_BLANK);
-
result = brasero_caps_try_output (session_flags,
output,
input,
@@ -1830,8 +1820,6 @@
if (result)
return result;
- session_flags = brasero_burn_session_get_flags (session);
-
/* we reached this point in two cases:
* - if the disc cannot be handled
* - if some flags are not handled
@@ -1938,8 +1926,12 @@
BraseroTrackType input;
BraseroPluginIOFlag io_flags;
- if (!brasero_burn_caps_flags_check_for_drive (session))
- BRASERO_BURN_CAPS_NOT_SUPPORTED_LOG_RES (session);
+ /* Here, we can't check if the drive supports the flags since the output
+ * is hypothetical. There is no real medium. So forget the following :
+ * if (!brasero_burn_caps_flags_check_for_drive (session))
+ * BRASERO_BURN_CAPS_NOT_SUPPORTED_LOG_RES (session);
+ * The only thing we could do would be to check some known forbidden
+ * flags for some media provided the output type is DISC. */
/* Here flags don't matter as we don't record anything.
* Even the IOFlags since that can be checked later with
@@ -1992,13 +1984,12 @@
brasero_burn_session_get_input_type (session, &input);
BRASERO_BURN_LOG_TYPE (&input, "input");
- /* NOTE: BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE is a problem here since it
- * is only used if needed. Likewise DAO can be a problem. So just in
- * case remove them. They are not really useful in this context. What we
- * want here is to know whether a medium can be used given the input;
- * only 1 flag is important here (MERGE) and can have consequences. */
+ /* NOTE: DAO can be a problem. So just in case remove it. It is not
+ * really useful in this context. What we want here is to know whether
+ * a medium can be used given the input; only 1 flag is important here
+ * (MERGE) and can have consequences. */
session_flags = brasero_burn_session_get_flags (session);
- session_flags &= ~(BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE|BRASERO_BURN_FLAG_DAO);
+ session_flags &= ~BRASERO_BURN_FLAG_DAO;
BRASERO_BURN_LOG_FLAGS (session_flags, "flags");
@@ -2031,10 +2022,9 @@
if (caps->type.type != BRASERO_TRACK_TYPE_DISC)
continue;
- /* Put BRASERO_MEDIUM_NONE so we can always succeed */
result = brasero_caps_find_link (caps,
session_flags,
- BRASERO_MEDIUM_NONE,
+ caps->type.subtype.media,
&input,
BRASERO_PLUGIN_IO_ACCEPT_FILE);
@@ -2131,7 +2121,7 @@
* want here is to know which media can be used given the input; only 1
* flag is important here (MERGE) and can have consequences. */
session_flags = brasero_burn_session_get_flags (session);
- session_flags &= ~(BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE|BRASERO_BURN_FLAG_DAO);
+ session_flags &= ~BRASERO_BURN_FLAG_DAO;
BRASERO_BURN_LOG_FLAGS (session_flags, "and flags");
@@ -2399,119 +2389,34 @@
return BRASERO_BURN_OK;
}
+ supported_flags |= BRASERO_BURN_FLAG_EJECT;
+
session_flags = brasero_burn_session_get_flags (session);
BRASERO_BURN_LOG_FLAGS (session_flags, "FLAGS (session):");
+ /* sanity check:
+ * - drive must support flags
+ * - MERGE and BLANK are not possible together.
+ * - APPEND and MERGE are compatible. MERGE wins
+ * - APPEND and BLANK are incompatible */
if (!brasero_burn_caps_flags_check_for_drive (session)) {
- BRASERO_BURN_LOG ("Session flags not supported");
+ BRASERO_BURN_LOG ("Session flags not supported by drive");
return BRASERO_BURN_ERR;
}
- /* sanity check:
- * - MERGE and BLANK are not possible together.
- * MERGE wins (always)
- * - APPEND and MERGE are compatible. MERGE wins
- * - APPEND and BLANK are incompatible and
- * They should both seldom be supported by a
- * backend, more probably each by a different
- * backend. */
if ((session_flags & (BRASERO_BURN_FLAG_MERGE|BRASERO_BURN_FLAG_APPEND))
&& (session_flags & BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE))
return BRASERO_BURN_NOT_SUPPORTED;
/* Let's get flags for recording */
- supported_flags |= BRASERO_BURN_FLAG_EJECT;
media = brasero_burn_session_get_dest_media (session);
-
- /* Here remove the BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE since that case
- * will be handled later in case of failure */
- session_flags &= ~(BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE|
- BRASERO_BURN_FLAG_FAST_BLANK);
-
result = brasero_caps_get_flags_for_disc (session_flags,
media,
&input,
&supported_flags,
&compulsory_flags);
- session_flags = brasero_burn_session_get_flags (session);
- if (result == BRASERO_BURN_OK) {
- if (media & (BRASERO_MEDIUM_HAS_AUDIO|BRASERO_MEDIUM_HAS_DATA)) {
- gboolean operation;
-
- operation = (session_flags & (BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE|
- BRASERO_BURN_FLAG_MERGE|
- BRASERO_BURN_FLAG_APPEND)) != 0;
- if (!operation) {
- /* The backend supports natively the media but
- * no operation (append, merge, blank) was set.
- */
- if (!(supported_flags & BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE)) {
- /* check if we can add the flag in case
- * it isn't natively supported by a
- * plugin. */
- if (brasero_burn_caps_can_blank (self, session) == BRASERO_BURN_OK)
- supported_flags |= BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE;
- else if (!(supported_flags & BRASERO_BURN_FLAG_MERGE))
- compulsory_flags |= BRASERO_BURN_FLAG_APPEND;
- else if (!(supported_flags & BRASERO_BURN_FLAG_APPEND))
- compulsory_flags |= BRASERO_BURN_FLAG_MERGE;
- }
- else {
- BraseroBurnFlag filter;
-
- filter = supported_flags & (BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE|
- BRASERO_BURN_FLAG_MERGE|
- BRASERO_BURN_FLAG_APPEND);
-
- /* if there is only one of the three
- * operations supported then it must be
- * compulsory. */
- if ((filter & BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE) == filter)
- compulsory_flags |= BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE;
- else if ((filter & BRASERO_BURN_FLAG_MERGE) == filter)
- compulsory_flags |= BRASERO_BURN_FLAG_MERGE;
- else if ((filter & BRASERO_BURN_FLAG_APPEND) == filter)
- compulsory_flags |= BRASERO_BURN_FLAG_APPEND;
- }
- }
- else {
- BraseroBurnFlag filter;
-
- /* There was an operation set for the media and
- * the backend supports the specified operation
- * (blanking/merging/appending) for the media.
- * We're good.
- * Nevertheless in case a backend supports all
- * three operation we need to filter out the one
- * (s) that were not specified
- * NOTE: none of them should be compulsory
- * otherwise since they are exclusive then it
- * would mean the others are not possible
- * What if many were specified? */
-
- /* Make sure blank flag is not added with merge
- * choose merge if so. Merge and append are no
- * problem */
- filter = session_flags & (BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE|
- BRASERO_BURN_FLAG_MERGE|
- BRASERO_BURN_FLAG_APPEND);
-
- supported_flags &= ~(BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE|
- BRASERO_BURN_FLAG_MERGE|
- BRASERO_BURN_FLAG_APPEND);
- supported_flags |= filter;
- }
- }
- else {
- /* make sure to filter MERGE/APPEND/BLANK from supported
- * since there is no data on the medium */
- supported_flags &= ~(BRASERO_BURN_FLAG_MERGE|
- BRASERO_BURN_FLAG_APPEND|
- BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE);
- }
- }
- else {
+ if (result != BRASERO_BURN_OK) {
/* we reached this point in two cases:
* - if the disc cannot be handled
* - if some flags are not handled
@@ -2530,8 +2435,7 @@
return BRASERO_BURN_NOT_SUPPORTED;
}
- if (session_flags & (BRASERO_BURN_FLAG_MERGE|
- BRASERO_BURN_FLAG_APPEND)) {
+ if (session_flags & (BRASERO_BURN_FLAG_MERGE|BRASERO_BURN_FLAG_APPEND)) {
/* There is nothing we can do here */
return BRASERO_BURN_NOT_SUPPORTED;
}
@@ -2560,9 +2464,22 @@
&compulsory_flags);
if (result != BRASERO_BURN_OK)
return result;
+ }
+ else {
+ /* see if we can add BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE */
+ if ((media & (BRASERO_MEDIUM_HAS_AUDIO|BRASERO_MEDIUM_HAS_DATA))
+ && !(session_flags & (BRASERO_BURN_FLAG_MERGE|BRASERO_BURN_FLAG_APPEND))
+ && brasero_burn_caps_can_blank (self, session) == BRASERO_BURN_OK)
+ supported_flags |= BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE;
+ else if (session_flags & BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE)
+ return BRASERO_BURN_NOT_SUPPORTED;
+ }
- /* NOTE: the plugins can't have APPEND/MERGE for BLANK
- * media or it's an error so no need to filter them out */
+ if (session_flags & BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE) {
+ /* make sure we remove MERGE/APPEND from supported and
+ * compulsory since that's not possible anymore */
+ supported_flags &= ~(BRASERO_BURN_FLAG_MERGE|BRASERO_BURN_FLAG_APPEND);
+ compulsory_flags &= ~(BRASERO_BURN_FLAG_MERGE|BRASERO_BURN_FLAG_APPEND);
}
if (supported_flags & BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE) {
@@ -3337,12 +3254,13 @@
}
if (media & BRASERO_MEDIUM_DVD_DL) {
- if (type & BRASERO_MEDIUM_SEQUENTIAL)
+ /* There is no such thing as DVD-RW DL */
+ if ((type & BRASERO_MEDIUM_SEQUENTIAL) && !(type & BRASERO_MEDIUM_REWRITABLE))
retval = brasero_caps_disc_new_attribute (retval,
media|BRASERO_MEDIUM_SEQUENTIAL,
type);
- if (type & BRASERO_MEDIUM_JUMP)
+ if ((type & BRASERO_MEDIUM_JUMP) && !(type & BRASERO_MEDIUM_REWRITABLE))
retval = brasero_caps_disc_new_attribute (retval,
media|BRASERO_MEDIUM_JUMP,
type);
Modified: trunk/src/burn-plugin.h
==============================================================================
--- trunk/src/burn-plugin.h (original)
+++ trunk/src/burn-plugin.h Sat Sep 6 16:18:00 2008
@@ -249,6 +249,236 @@
return plugin_name##_type; \
}
+#define BRASERO_PLUGIN_ADD_STANDARD_CDR_FLAGS(plugin_MACRO) \
+ /* Use DAO for first session since AUDIO need it to write CD-TEXT */ \
+ brasero_plugin_set_flags (plugin_MACRO, \
+ BRASERO_MEDIUM_CD| \
+ BRASERO_MEDIUM_WRITABLE| \
+ 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_NONE); \
+ /* This is a CDR with data data can be merged or at least appended */ \
+ brasero_plugin_set_flags (plugin_MACRO, \
+ BRASERO_MEDIUM_CD| \
+ BRASERO_MEDIUM_WRITABLE| \
+ BRASERO_MEDIUM_APPENDABLE| \
+ BRASERO_MEDIUM_HAS_AUDIO| \
+ BRASERO_MEDIUM_HAS_DATA, \
+ BRASERO_BURN_FLAG_APPEND| \
+ BRASERO_BURN_FLAG_MERGE| \
+ BRASERO_BURN_FLAG_BURNPROOF| \
+ BRASERO_BURN_FLAG_OVERBURN| \
+ BRASERO_BURN_FLAG_MULTI| \
+ BRASERO_BURN_FLAG_DUMMY| \
+ BRASERO_BURN_FLAG_NOGRACE, \
+ BRASERO_BURN_FLAG_APPEND);
+
+#define BRASERO_PLUGIN_ADD_STANDARD_CDRW_FLAGS(plugin_MACRO) \
+ /* Use DAO for first session since AUDIO need it to write CD-TEXT */ \
+ brasero_plugin_set_flags (plugin_MACRO, \
+ BRASERO_MEDIUM_CD| \
+ 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_NONE); \
+ /* It is a CDRW we want the CD to be either blanked before or appended \
+ * that's why we set MERGE as compulsory. That way if the CD is not \
+ * MERGED we force the blank before writing to avoid appending sessions \
+ * endlessly until there is no free space. */ \
+ brasero_plugin_set_flags (plugin_MACRO, \
+ BRASERO_MEDIUM_CD| \
+ BRASERO_MEDIUM_REWRITABLE| \
+ BRASERO_MEDIUM_APPENDABLE| \
+ BRASERO_MEDIUM_HAS_AUDIO| \
+ BRASERO_MEDIUM_HAS_DATA, \
+ BRASERO_BURN_FLAG_APPEND| \
+ BRASERO_BURN_FLAG_MERGE| \
+ BRASERO_BURN_FLAG_BURNPROOF| \
+ BRASERO_BURN_FLAG_OVERBURN| \
+ BRASERO_BURN_FLAG_MULTI| \
+ BRASERO_BURN_FLAG_DUMMY| \
+ BRASERO_BURN_FLAG_NOGRACE, \
+ BRASERO_BURN_FLAG_MERGE);
+
+#define BRASERO_PLUGIN_ADD_STANDARD_DVDR_FLAGS(plugin_MACRO) \
+ /* DAO and MULTI are exclusive */ \
+ brasero_plugin_set_flags (plugin_MACRO, \
+ BRASERO_MEDIUM_DVDR| \
+ BRASERO_MEDIUM_DVD_DL| \
+ BRASERO_MEDIUM_JUMP| \
+ BRASERO_MEDIUM_BLANK, \
+ BRASERO_BURN_FLAG_DAO| \
+ 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_MACRO, \
+ BRASERO_MEDIUM_DVDR| \
+ BRASERO_MEDIUM_DVD_DL| \
+ BRASERO_MEDIUM_JUMP| \
+ 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); \
+ /* This is a DVDR with data data can be merged or at least appended */ \
+ brasero_plugin_set_flags (plugin_MACRO, \
+ BRASERO_MEDIUM_DVDR| \
+ BRASERO_MEDIUM_DVD_DL| \
+ BRASERO_MEDIUM_JUMP| \
+ BRASERO_MEDIUM_APPENDABLE| \
+ BRASERO_MEDIUM_HAS_DATA, \
+ BRASERO_BURN_FLAG_APPEND| \
+ BRASERO_BURN_FLAG_MERGE| \
+ BRASERO_BURN_FLAG_BURNPROOF| \
+ BRASERO_BURN_FLAG_OVERBURN| \
+ BRASERO_BURN_FLAG_MULTI| \
+ BRASERO_BURN_FLAG_DUMMY| \
+ BRASERO_BURN_FLAG_NOGRACE, \
+ BRASERO_BURN_FLAG_APPEND);
+
+#define BRASERO_PLUGIN_ADD_STANDARD_DVDR_PLUS_FLAGS(plugin_MACRO) \
+ /* DVD+R don't have a DUMMY mode */ \
+ brasero_plugin_set_flags (plugin_MACRO, \
+ BRASERO_MEDIUM_DVDR_PLUS| \
+ BRASERO_MEDIUM_DVD_DL| \
+ 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_MACRO, \
+ BRASERO_MEDIUM_DVDR_PLUS| \
+ BRASERO_MEDIUM_DVD_DL| \
+ BRASERO_MEDIUM_BLANK, \
+ BRASERO_BURN_FLAG_BURNPROOF| \
+ BRASERO_BURN_FLAG_OVERBURN| \
+ BRASERO_BURN_FLAG_MULTI| \
+ BRASERO_BURN_FLAG_NOGRACE, \
+ BRASERO_BURN_FLAG_NONE); \
+ /* DVD+R with data: data can be merged or at least appended */ \
+ brasero_plugin_set_flags (plugin_MACRO, \
+ BRASERO_MEDIUM_DVDR_PLUS| \
+ BRASERO_MEDIUM_DVD_DL| \
+ BRASERO_MEDIUM_APPENDABLE| \
+ BRASERO_MEDIUM_HAS_DATA, \
+ BRASERO_BURN_FLAG_MERGE| \
+ BRASERO_BURN_FLAG_APPEND| \
+ BRASERO_BURN_FLAG_BURNPROOF| \
+ BRASERO_BURN_FLAG_OVERBURN| \
+ BRASERO_BURN_FLAG_MULTI| \
+ BRASERO_BURN_FLAG_NOGRACE, \
+ BRASERO_BURN_FLAG_APPEND);
+
+#define BRASERO_PLUGIN_ADD_STANDARD_DVDRW_FLAGS(plugin_MACRO) \
+ brasero_plugin_set_flags (plugin_MACRO, \
+ BRASERO_MEDIUM_DVDRW| \
+ BRASERO_MEDIUM_UNFORMATTED| \
+ BRASERO_MEDIUM_BLANK, \
+ BRASERO_BURN_FLAG_DAO| \
+ 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_MACRO, \
+ BRASERO_MEDIUM_DVDRW| \
+ 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); \
+ /* This is a DVDRW we want the DVD to be either blanked before or \
+ * appended that's why we set MERGE as compulsory. That way if the DVD \
+ * is not MERGED we force the blank before writing to avoid appending \
+ * sessions endlessly until there is no free space. */ \
+ brasero_plugin_set_flags (plugin_MACRO, \
+ BRASERO_MEDIUM_DVDRW| \
+ BRASERO_MEDIUM_APPENDABLE| \
+ BRASERO_MEDIUM_HAS_DATA, \
+ BRASERO_BURN_FLAG_MERGE| \
+ BRASERO_BURN_FLAG_APPEND| \
+ BRASERO_BURN_FLAG_BURNPROOF| \
+ BRASERO_BURN_FLAG_OVERBURN| \
+ BRASERO_BURN_FLAG_MULTI| \
+ BRASERO_BURN_FLAG_DUMMY| \
+ BRASERO_BURN_FLAG_NOGRACE, \
+ BRASERO_BURN_FLAG_MERGE);
+
+/**
+ * These kind of media don't support:
+ * - BURNPROOF
+ * - DAO
+ * - APPEND
+ * since they don't behave and are not written in the same way.
+ * They also can't be closed so MULTI is compulsory.
+ */
+#define BRASERO_PLUGIN_ADD_STANDARD_DVDRW_PLUS_FLAGS(plugin_MACRO) \
+ brasero_plugin_set_flags (plugin_MACRO, \
+ BRASERO_MEDIUM_DVDRW_PLUS| \
+ BRASERO_MEDIUM_DVD_DL| \
+ BRASERO_MEDIUM_UNFORMATTED| \
+ BRASERO_MEDIUM_BLANK, \
+ BRASERO_BURN_FLAG_MULTI| \
+ BRASERO_BURN_FLAG_OVERBURN| \
+ BRASERO_BURN_FLAG_NOGRACE, \
+ BRASERO_BURN_FLAG_MULTI); \
+ brasero_plugin_set_flags (plugin_MACRO, \
+ BRASERO_MEDIUM_DVDRW_PLUS| \
+ BRASERO_MEDIUM_DVD_DL| \
+ BRASERO_MEDIUM_APPENDABLE| \
+ BRASERO_MEDIUM_CLOSED| \
+ BRASERO_MEDIUM_HAS_DATA, \
+ BRASERO_BURN_FLAG_MULTI| \
+ BRASERO_BURN_FLAG_OVERBURN| \
+ BRASERO_BURN_FLAG_NOGRACE| \
+ BRASERO_BURN_FLAG_MERGE, \
+ BRASERO_BURN_FLAG_MULTI);
+
+/**
+ * The above statement apply to these as well. There is no longer dummy mode
+ * NOTE: there is no such thing as a DVD-RW DL.
+ */
+#define BRASERO_PLUGIN_ADD_STANDARD_DVDRW_RESTRICTED_FLAGS(plugin_MACRO) \
+ brasero_plugin_set_flags (plugin_MACRO, \
+ BRASERO_MEDIUM_DVD| \
+ BRASERO_MEDIUM_RESTRICTED| \
+ BRASERO_MEDIUM_REWRITABLE| \
+ BRASERO_MEDIUM_UNFORMATTED| \
+ BRASERO_MEDIUM_BLANK, \
+ BRASERO_BURN_FLAG_MULTI| \
+ BRASERO_BURN_FLAG_OVERBURN| \
+ BRASERO_BURN_FLAG_NOGRACE, \
+ BRASERO_BURN_FLAG_MULTI); \
+ brasero_plugin_set_flags (plugin_MACRO, \
+ BRASERO_MEDIUM_DVD| \
+ BRASERO_MEDIUM_RESTRICTED| \
+ BRASERO_MEDIUM_REWRITABLE| \
+ BRASERO_MEDIUM_APPENDABLE| \
+ BRASERO_MEDIUM_CLOSED| \
+ BRASERO_MEDIUM_HAS_DATA, \
+ BRASERO_BURN_FLAG_MULTI| \
+ BRASERO_BURN_FLAG_OVERBURN| \
+ BRASERO_BURN_FLAG_NOGRACE| \
+ BRASERO_BURN_FLAG_MERGE, \
+ BRASERO_BURN_FLAG_MULTI);
+
G_END_DECLS
#endif /* _BURN_PLUGIN_H_ */
Modified: trunk/src/burn-session.c
==============================================================================
--- trunk/src/burn-session.c (original)
+++ trunk/src/burn-session.c Sat Sep 6 16:18:00 2008
@@ -252,7 +252,7 @@
{
BraseroBurnSessionPrivate *priv;
- g_return_val_if_fail (BRASERO_IS_BURN_SESSION (self), BRASERO_BURN_ERR);
+ g_return_if_fail (BRASERO_IS_BURN_SESSION (self));
priv = BRASERO_BURN_SESSION_PRIVATE (self);
Modified: trunk/src/burn.c
==============================================================================
--- trunk/src/burn.c (original)
+++ trunk/src/burn.c Sat Sep 6 16:18:00 2008
@@ -751,7 +751,9 @@
}
static BraseroBurnResult
-brasero_burn_lock_dest_media (BraseroBurn *burn, GError **error)
+brasero_burn_lock_dest_media (BraseroBurn *burn,
+ BraseroBurnError *ret_error,
+ GError **error)
{
gchar *failure;
BraseroMedia media;
@@ -777,8 +779,6 @@
result = BRASERO_BURN_OK;
-again:
-
medium = brasero_drive_get_medium (priv->dest);
if (!medium) {
result = BRASERO_BURN_NEED_RELOAD;
@@ -898,8 +898,6 @@
goto end;
}
- /* FIXME: if NO_TMP_FILE is not set then the warning won't get
- * emitted */
if (input.type == BRASERO_TRACK_TYPE_DISC
&& (input.subtype.media & (BRASERO_MEDIUM_HAS_AUDIO|BRASERO_MEDIUM_HAS_DATA)) == BRASERO_MEDIUM_HAS_AUDIO) {
result = brasero_burn_emit_signal (burn, WARN_REWRITABLE_SIGNAL, BRASERO_BURN_CANCEL);
@@ -922,25 +920,14 @@
end:
- if (result == BRASERO_BURN_NEED_RELOAD) {
- BraseroMedia required_media;
-
- required_media = brasero_burn_caps_get_required_media_type (priv->caps,
- priv->session);
-
- result = brasero_burn_ask_for_dest_media (burn,
- berror,
- required_media,
- error);
- if (result == BRASERO_BURN_OK)
- goto again;
- }
-
if (result != BRASERO_BURN_OK && priv->dest_locked) {
priv->dest_locked = 0;
brasero_drive_unlock (priv->dest);
}
+ if (result == BRASERO_BURN_ERROR_RELOAD_MEDIA && ret_error)
+ *ret_error = berror;
+
return result;
}
@@ -962,6 +949,9 @@
BRASERO_MEDIUM_DVD|
BRASERO_MEDIUM_DVD_DL);
+ if (required_media == BRASERO_MEDIUM_NONE)
+ required_media = BRASERO_MEDIUM_WRITABLE;
+
result = brasero_burn_ask_for_dest_media (burn,
error_code,
required_media,
@@ -969,7 +959,9 @@
if (result != BRASERO_BURN_OK)
return result;
- result = brasero_burn_lock_dest_media (burn, error);
+ result = brasero_burn_lock_dest_media (burn,
+ &error_code,
+ error);
if (result == BRASERO_BURN_NEED_RELOAD)
goto again;
@@ -1802,17 +1794,19 @@
brasero_burn_check_session_consistency (BraseroBurn *burn,
GError **error)
{
+ BraseroMedia media;
BraseroBurnFlag flag;
BraseroTrackType type;
BraseroBurnFlag flags;
BraseroBurnFlag retval;
+ BraseroBurnResult result;
BraseroBurnFlag supported = BRASERO_BURN_FLAG_NONE;
BraseroBurnFlag compulsory = BRASERO_BURN_FLAG_NONE;
BraseroBurnPrivate *priv = BRASERO_BURN_PRIVATE (burn);
BRASERO_BURN_DEBUG (burn, "Checking session consistency");
- /* make sure there is a session, a burner */
+ /* make sure there is a track in the session. */
brasero_burn_session_get_input_type (priv->session, &type);
if (type.type == BRASERO_TRACK_TYPE_NONE
|| !brasero_burn_session_get_tracks (priv->session)) {
@@ -1824,7 +1818,7 @@
return BRASERO_BURN_ERR;
}
- /* make sure there is a drive set as burner */
+ /* make sure there is a drive set as burner. */
if (!brasero_burn_session_is_dest_file (priv->session)) {
BraseroDrive *burner;
@@ -1844,79 +1838,69 @@
brasero_burn_session_set_num_copies (priv->session, 1);
}
+ media = brasero_burn_session_get_dest_media (priv->session);
+
/* save then wipe out flags from session to check them one by one */
flags = brasero_burn_session_get_flags (priv->session);
brasero_burn_session_remove_flag (priv->session, flags);
- brasero_burn_caps_get_flags (priv->caps,
- priv->session,
- &supported,
- &compulsory);
+ result = brasero_burn_caps_get_flags (priv->caps,
+ priv->session,
+ &supported,
+ &compulsory);
+ if (result != BRASERO_BURN_OK)
+ return result;
for (flag = 1; flag < BRASERO_BURN_FLAG_LAST; flag <<= 1) {
- /* check each flag before re-adding it */
- if ((flags & flag) && (supported & flag)) {
+ /* see if this flag was originally set */
+ if (!(flags & flag))
+ continue;
+
+ /* Check each flag before re-adding it. Emit warnings to user
+ * to know if he wants to carry on for some flags when they are
+ * not supported; namely DUMMY. Other flags trigger an error.
+ * No need for BURNPROOF since that usually means it is just the
+ * media type that doesn't need it. */
+ if (supported & flag) {
brasero_burn_session_add_flag (priv->session, flag);
brasero_burn_caps_get_flags (priv->caps,
priv->session,
&supported,
&compulsory);
}
- else if (flags & flag)
- BRASERO_BURN_LOG_FLAGS (flag, "Flag set but not supported");
- }
+ else {
+ BRASERO_BURN_LOG_FLAGS (flag, "Flag set but not supported:");
- retval = brasero_burn_session_get_flags (priv->session);
+ if (flag & BRASERO_BURN_FLAG_DUMMY) {
+ /* This is simply a warning that it's not possible */
- if ((flags & BRASERO_BURN_FLAG_MERGE)
- && !(retval & BRASERO_BURN_FLAG_MERGE)) {
- /* we pay attention to one flag in particular (MERGE) if it was
- * set then it must be supported. Otherwise error out. */
- g_set_error (error,
- BRASERO_BURN_ERROR,
- BRASERO_BURN_ERROR_GENERAL,
- _("merging data is impossible with this disc"));
- return BRASERO_BURN_ERR;
+ }
+ else if (flag & BRASERO_BURN_FLAG_MERGE) {
+ /* we pay attention to one flag in particular
+ * (MERGE) if it was set then it must be
+ * supported. Otherwise error out. */
+ g_set_error (error,
+ BRASERO_BURN_ERROR,
+ BRASERO_BURN_ERROR_GENERAL,
+ _("merging data is impossible with this disc"));
+ return BRASERO_BURN_ERR;
+ }
+ else if ((flag & BRASERO_BURN_FLAG_BURNPROOF)
+ && !(BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_DVDRW_PLUS)
+ || BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_DVDRW_RESTRICTED))) {
+ /* Warn the user BURNPROOF won't be possible */
+
+ }
+ }
}
+ retval = brasero_burn_session_get_flags (priv->session);
if (retval != flags)
- BRASERO_BURN_LOG_FLAGS (flags, "Some flags were not supported. Corrected to ");
+ BRASERO_BURN_LOG_FLAGS (retval, "Some flags were not supported. Corrected to");
if (retval != (retval | compulsory)) {
- BRASERO_BURN_DEBUG (burn,
- "Some compulsory flags were forgotten. Corrected to ",
- (retval & compulsory),
- compulsory);
-
- brasero_burn_session_add_flag (priv->session, compulsory);
- }
-
- /* we check flags consistency
- * NOTE: should we return an error if they are not consistent? */
- if ((type.type != BRASERO_TRACK_TYPE_AUDIO
- && type.type != BRASERO_TRACK_TYPE_DATA
- && type.type != BRASERO_TRACK_TYPE_DISC)
- || brasero_burn_session_is_dest_file (priv->session)) {
- if (retval & BRASERO_BURN_FLAG_MERGE) {
- BRASERO_BURN_DEBUG (burn, "Inconsistent flag: you can't use flag merge");
- retval &= ~BRASERO_BURN_FLAG_MERGE;
- }
-
- if (retval & BRASERO_BURN_FLAG_APPEND) {
- BRASERO_BURN_DEBUG (burn, "Inconsistent flags: you can't use flag append");
- retval &= ~BRASERO_BURN_FLAG_APPEND;
- }
-
- if (retval & BRASERO_BURN_FLAG_NO_TMP_FILES) {
- BRASERO_BURN_DEBUG (burn, "Inconsistent flag: you can't use flag on_the_fly");
- retval &= ~BRASERO_BURN_FLAG_NO_TMP_FILES;
- }
- }
-
- if (brasero_burn_session_is_dest_file (priv->session)
- && (retval & BRASERO_BURN_FLAG_DONT_CLEAN_OUTPUT) == 0) {
- BRASERO_BURN_DEBUG (burn, "Forgotten flag: you must use flag dont_clean_output");
- retval |= BRASERO_BURN_FLAG_DONT_CLEAN_OUTPUT;
+ retval |= compulsory;
+ BRASERO_BURN_LOG_FLAGS (retval, "Some compulsory flags were forgotten. Corrected to");
}
brasero_burn_session_set_flags (priv->session, retval);
@@ -2188,8 +2172,8 @@
}
static BraseroBurnResult
-brasero_burn_same_src_dest (BraseroBurn *self,
- GError **error)
+brasero_burn_same_src_dest_image (BraseroBurn *self,
+ GError **error)
{
gchar *toc = NULL;
gchar *image = NULL;
@@ -2279,6 +2263,78 @@
return result;
}
+static BraseroBurnResult
+brasero_burn_same_src_dest_reload_medium (BraseroBurn *burn,
+ GError **error)
+{
+ BraseroBurnError berror;
+ BraseroBurnPrivate *priv;
+ BraseroBurnResult result;
+ BraseroMedia required_media;
+ BraseroBurnFlag session_flags;
+
+ priv = BRASERO_BURN_PRIVATE (burn);
+ /* Now there is the problem of flags... This really is a special
+ * case. we need to try to adjust the flags to the media type
+ * just after a new one is detected. For example there could be
+ * BURNPROOF/DUMMY whereas they are not supported for DVD+RW. So
+ * we need to be lenient. */
+
+ /* Eject and ask the user to reload a disc */
+ required_media = brasero_burn_caps_get_required_media_type (priv->caps,
+ priv->session);
+ required_media &= (BRASERO_MEDIUM_WRITABLE|
+ BRASERO_MEDIUM_CD|
+ BRASERO_MEDIUM_DVD|
+ BRASERO_MEDIUM_DVD_DL);
+
+ /* There is sometimes no way to determine which type of media is
+ * required since some flags (that will be adjusted afterwards)
+ * prevent to reach some media type like BURNPROOF and DVD+RW. */
+ if (required_media == BRASERO_MEDIUM_NONE)
+ required_media = BRASERO_MEDIUM_WRITABLE;
+
+ /* save the flags in case we modify them */
+ session_flags = brasero_burn_session_get_flags (priv->session);
+ berror = BRASERO_BURN_WARNING_INSERT_AFTER_COPY;
+
+again:
+
+ result = brasero_burn_ask_for_dest_media (burn,
+ berror,
+ required_media,
+ error);
+ if (result != BRASERO_BURN_OK)
+ return result;
+
+ /* update the flags now before locking it since in lock function
+ * we check the adequacy of the medium inserted. */
+ result = brasero_burn_check_session_consistency (burn, error);
+ if (result == BRASERO_BURN_CANCEL)
+ return result;
+
+ if (result != BRASERO_BURN_OK) {
+ /* Tell the user his/her disc is not supported and reload */
+ berror = BRASERO_BURN_ERROR_MEDIA_UNSUPPORTED;
+ brasero_burn_session_set_flags (priv->session, session_flags);
+ goto again;
+ }
+
+ /* One thing could make us fail now that flags and media type are
+ * supported: the size. */
+ result = brasero_burn_lock_dest_media (burn, &berror, error);
+ if (result == BRASERO_BURN_CANCEL)
+ return result;
+
+ if (result != BRASERO_BURN_OK) {
+ /* Tell the user his/her disc is not supported and reload */
+ brasero_burn_session_set_flags (priv->session, session_flags);
+ goto again;
+ }
+
+ return BRASERO_BURN_OK;
+}
+
BraseroBurnResult
brasero_burn_record (BraseroBurn *burn,
BraseroBurnSession *session,
@@ -2302,22 +2358,39 @@
if (brasero_burn_session_same_src_dest_drive (session)) {
/* This is a special case */
- result = brasero_burn_same_src_dest (burn, error);
+ result = brasero_burn_same_src_dest_image (burn, error);
if (result != BRASERO_BURN_OK)
goto end;
- /* lock the dest drive do it this way for the message */
- result = brasero_burn_reload_dest_media (burn,
- BRASERO_BURN_WARNING_INSERT_AFTER_COPY,
- error);
+ result = brasero_burn_same_src_dest_reload_medium (burn, error);
if (result != BRASERO_BURN_OK)
goto end;
}
else if (!brasero_burn_session_is_dest_file (session)) {
+ BraseroBurnError berror;
+
/* do some drive locking quite early to make sure we have a
* media in the drive so that we'll have all the necessary
* information */
- result = brasero_burn_lock_dest_media (burn, error);
+ result = brasero_burn_lock_dest_media (burn, &berror, error);
+ while (result == BRASERO_BURN_NEED_RELOAD) {
+ BraseroMedia required_media;
+
+ required_media = brasero_burn_caps_get_required_media_type (priv->caps,
+ priv->session);
+ if (required_media == BRASERO_MEDIUM_NONE)
+ required_media = BRASERO_MEDIUM_WRITABLE;
+
+ result = brasero_burn_ask_for_dest_media (burn,
+ berror,
+ required_media,
+ error);
+ if (result == BRASERO_BURN_OK)
+ goto end;
+
+ result = brasero_burn_lock_dest_media (burn, &berror, error);
+ }
+
if (result != BRASERO_BURN_OK)
goto end;
}
Modified: trunk/src/plugins/cdrkit/burn-wodim.c
==============================================================================
--- trunk/src/plugins/cdrkit/burn-wodim.c (original)
+++ trunk/src/plugins/cdrkit/burn-wodim.c Sat Sep 6 16:18:00 2008
@@ -1071,7 +1071,7 @@
BRASERO_PLUGIN_IO_ACCEPT_FILE,
BRASERO_IMAGE_FORMAT_BIN);
- /* wodim can burn all DVDs when it's ISOs */
+ /* wodim can burn all DVDs (except DVD-RW restricted) when it's ISOs */
output = brasero_caps_disc_new (dvd_media);
brasero_plugin_link_caps (plugin, output, input);
g_slist_free (output);
@@ -1096,11 +1096,13 @@
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);
+
/* 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.
- * I didn't try with DVD-W since I didn't want to waste one for nothing.
- */
+ * used to start a multisession DVD-RW or even continue one. */
brasero_plugin_set_flags (plugin,
BRASERO_MEDIUM_DVD|
BRASERO_MEDIUM_SEQUENTIAL|
@@ -1114,6 +1116,7 @@
BRASERO_BURN_FLAG_NOGRACE,
BRASERO_BURN_FLAG_NONE);
+ /* For DVD+W limited capabilites to blank media */
brasero_plugin_set_flags (plugin,
BRASERO_MEDIUM_DVDR_PLUS|
BRASERO_MEDIUM_BLANK,
@@ -1123,13 +1126,11 @@
BRASERO_BURN_FLAG_NOGRACE,
BRASERO_BURN_FLAG_NONE);
- /* for DVD+RW
- * NOTE: we don't accept unformatted media here */
+ /* 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|
BRASERO_MEDIUM_BLANK,
- BRASERO_BURN_FLAG_DAO|
- BRASERO_BURN_FLAG_BURNPROOF|
BRASERO_BURN_FLAG_OVERBURN|
BRASERO_BURN_FLAG_NOGRACE,
BRASERO_BURN_FLAG_NONE);
@@ -1139,39 +1140,7 @@
BRASERO_MEDIUM_APPENDABLE|
BRASERO_MEDIUM_CLOSED|
BRASERO_MEDIUM_HAS_DATA,
- BRASERO_BURN_FLAG_BURNPROOF|
- BRASERO_BURN_FLAG_OVERBURN|
- BRASERO_BURN_FLAG_NOGRACE,
- BRASERO_BURN_FLAG_NONE);
-
- /* Flags for CD (RW)s */
- brasero_plugin_set_flags (plugin,
- BRASERO_MEDIUM_CD|
- BRASERO_MEDIUM_WRITABLE|
- BRASERO_MEDIUM_REWRITABLE|
- BRASERO_MEDIUM_BLANK,
- BRASERO_BURN_FLAG_DAO|
- BRASERO_BURN_FLAG_BURNPROOF|
- BRASERO_BURN_FLAG_OVERBURN|
- BRASERO_BURN_FLAG_MULTI|
- BRASERO_BURN_FLAG_DUMMY|
- BRASERO_BURN_FLAG_NOGRACE,
- BRASERO_BURN_FLAG_NONE);
-
- /* NOTE: APPEND and MERGE are not really exclusive they can co-exist */
- brasero_plugin_set_flags (plugin,
- BRASERO_MEDIUM_CD|
- BRASERO_MEDIUM_WRITABLE|
- BRASERO_MEDIUM_REWRITABLE|
- BRASERO_MEDIUM_APPENDABLE|
- BRASERO_MEDIUM_HAS_AUDIO|
- BRASERO_MEDIUM_HAS_DATA,
- BRASERO_BURN_FLAG_APPEND|
- BRASERO_BURN_FLAG_MERGE|
- BRASERO_BURN_FLAG_BURNPROOF|
BRASERO_BURN_FLAG_OVERBURN|
- BRASERO_BURN_FLAG_MULTI|
- BRASERO_BURN_FLAG_DUMMY|
BRASERO_BURN_FLAG_NOGRACE,
BRASERO_BURN_FLAG_NONE);
Modified: trunk/src/plugins/cdrtools/burn-cdrecord.c
==============================================================================
--- trunk/src/plugins/cdrtools/burn-cdrecord.c (original)
+++ trunk/src/plugins/cdrtools/burn-cdrecord.c Sat Sep 6 16:18:00 2008
@@ -1091,9 +1091,10 @@
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,
- BRASERO_MEDIUM_DVD|
- BRASERO_MEDIUM_SEQUENTIAL|
+ BRASERO_MEDIUM_CD|
BRASERO_MEDIUM_WRITABLE|
BRASERO_MEDIUM_REWRITABLE|
BRASERO_MEDIUM_BLANK,
@@ -1104,84 +1105,100 @@
BRASERO_BURN_FLAG_NOGRACE,
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_CD|
+ BRASERO_MEDIUM_WRITABLE|
+ 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_NONE);
- /* for DVD+RW */
+ /* This is a CDR with data data can be merged or at least appended */
brasero_plugin_set_flags (plugin,
- BRASERO_MEDIUM_DVDRW_PLUS|
- BRASERO_MEDIUM_UNFORMATTED|
- BRASERO_MEDIUM_BLANK,
- BRASERO_BURN_FLAG_DAO|
+ BRASERO_MEDIUM_CD|
+ BRASERO_MEDIUM_WRITABLE|
+ BRASERO_MEDIUM_APPENDABLE|
+ BRASERO_MEDIUM_HAS_AUDIO|
+ BRASERO_MEDIUM_HAS_DATA,
+ BRASERO_BURN_FLAG_APPEND|
+ BRASERO_BURN_FLAG_MERGE|
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_BURN_FLAG_APPEND);
+ /* It is a CDRW we want the CD to be either blanked before or appended
+ * that's why we set MERGE as compulsory. That way if the CD is not
+ * MERGED we force the blank before writing to avoid appending sessions
+ * endlessly until there is no free space. */
brasero_plugin_set_flags (plugin,
- BRASERO_MEDIUM_DVDRW_PLUS|
+ BRASERO_MEDIUM_CD|
+ BRASERO_MEDIUM_REWRITABLE|
BRASERO_MEDIUM_APPENDABLE|
- BRASERO_MEDIUM_CLOSED|
+ BRASERO_MEDIUM_HAS_AUDIO|
BRASERO_MEDIUM_HAS_DATA,
+ BRASERO_BURN_FLAG_APPEND|
+ BRASERO_BURN_FLAG_MERGE|
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_BURN_FLAG_MERGE);
- /* Flags for CD (RW)s */
+ /* DVD-RW cdrecord capabilites are limited to blank media.
+ * It should not start a multisession disc. */
brasero_plugin_set_flags (plugin,
- BRASERO_MEDIUM_CD|
+ BRASERO_MEDIUM_DVD|
+ BRASERO_MEDIUM_SEQUENTIAL|
BRASERO_MEDIUM_WRITABLE|
BRASERO_MEDIUM_REWRITABLE|
BRASERO_MEDIUM_BLANK,
+ BRASERO_BURN_FLAG_DAO|
BRASERO_BURN_FLAG_BURNPROOF|
BRASERO_BURN_FLAG_OVERBURN|
- BRASERO_BURN_FLAG_MULTI|
BRASERO_BURN_FLAG_DUMMY|
BRASERO_BURN_FLAG_NOGRACE,
BRASERO_BURN_FLAG_NONE);
+ /* DVD+W cdrecord capabilities are limited to blank media */
brasero_plugin_set_flags (plugin,
- BRASERO_MEDIUM_CD|
- BRASERO_MEDIUM_WRITABLE|
- BRASERO_MEDIUM_REWRITABLE|
+ BRASERO_MEDIUM_DVDR_PLUS|
BRASERO_MEDIUM_BLANK,
BRASERO_BURN_FLAG_DAO|
BRASERO_BURN_FLAG_BURNPROOF|
BRASERO_BURN_FLAG_OVERBURN|
- BRASERO_BURN_FLAG_DUMMY|
BRASERO_BURN_FLAG_NOGRACE,
BRASERO_BURN_FLAG_NONE);
- /* NOTE: APPEND and MERGE are not really exclusive they can co-exist */
+ /* for DVD+RW cdrecord capabilities are limited no MERGE */
brasero_plugin_set_flags (plugin,
- BRASERO_MEDIUM_CD|
- BRASERO_MEDIUM_WRITABLE|
- BRASERO_MEDIUM_REWRITABLE|
+ BRASERO_MEDIUM_DVDRW_PLUS|
+ BRASERO_MEDIUM_UNFORMATTED|
+ BRASERO_MEDIUM_BLANK,
+ BRASERO_BURN_FLAG_OVERBURN|
+ BRASERO_BURN_FLAG_NOGRACE,
+ BRASERO_BURN_FLAG_NONE);
+
+ brasero_plugin_set_flags (plugin,
+ BRASERO_MEDIUM_DVDRW_PLUS|
BRASERO_MEDIUM_APPENDABLE|
- BRASERO_MEDIUM_HAS_AUDIO|
+ BRASERO_MEDIUM_CLOSED|
BRASERO_MEDIUM_HAS_DATA,
- BRASERO_BURN_FLAG_APPEND|
- BRASERO_BURN_FLAG_MERGE|
- BRASERO_BURN_FLAG_BURNPROOF|
BRASERO_BURN_FLAG_OVERBURN|
- BRASERO_BURN_FLAG_MULTI|
- BRASERO_BURN_FLAG_DUMMY|
BRASERO_BURN_FLAG_NOGRACE,
BRASERO_BURN_FLAG_NONE);
/* 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_REWRITABLE|
Modified: trunk/src/plugins/growisofs/burn-growisofs.c
==============================================================================
--- trunk/src/plugins/growisofs/burn-growisofs.c (original)
+++ trunk/src/plugins/growisofs/burn-growisofs.c Sat Sep 6 16:18:00 2008
@@ -788,7 +788,7 @@
g_slist_free (output);
/* growisofs has the possibility to record to closed DVD+RW/-restricted
- * and to append some more data to them which makes it unique */
+ * and to append some more data to them which makes them unique */
output = brasero_caps_disc_new (BRASERO_MEDIUM_DVD|
BRASERO_MEDIUM_DVD_DL|
BRASERO_MEDIUM_PLUS|
@@ -800,166 +800,20 @@
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_DVD_DL|
- BRASERO_MEDIUM_SEQUENTIAL|
- BRASERO_MEDIUM_JUMP|
- BRASERO_MEDIUM_WRITABLE|
- BRASERO_MEDIUM_REWRITABLE|
- BRASERO_MEDIUM_UNFORMATTED|
- 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_DVD_DL|
- BRASERO_MEDIUM_SEQUENTIAL|
- BRASERO_MEDIUM_JUMP|
- BRASERO_MEDIUM_WRITABLE|
- BRASERO_MEDIUM_REWRITABLE|
- BRASERO_MEDIUM_UNFORMATTED|
- BRASERO_MEDIUM_BLANK,
- BRASERO_BURN_FLAG_DAO|
- 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_DVD_DL|
- BRASERO_MEDIUM_SEQUENTIAL|
- BRASERO_MEDIUM_JUMP|
- 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);
+ /* For DVD-W and DVD-RW sequential */
+ BRASERO_PLUGIN_ADD_STANDARD_DVDR_FLAGS (plugin);
+ BRASERO_PLUGIN_ADD_STANDARD_DVDRW_FLAGS (plugin);
/* see NOTE for DVD-RW restricted overwrite below */
- brasero_plugin_set_flags (plugin,
- BRASERO_MEDIUM_DVD|
- BRASERO_MEDIUM_RESTRICTED|
- BRASERO_MEDIUM_REWRITABLE|
- BRASERO_MEDIUM_UNFORMATTED|
- 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_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_MULTI|
- BRASERO_BURN_FLAG_BURNPROOF|
- BRASERO_BURN_FLAG_OVERBURN|
- BRASERO_BURN_FLAG_DUMMY|
- BRASERO_BURN_FLAG_NOGRACE|
- BRASERO_BURN_FLAG_MERGE,
- BRASERO_BURN_FLAG_MULTI);
-
- /* DVD+ R/RW don't support dummy mode */
- brasero_plugin_set_flags (plugin,
- BRASERO_MEDIUM_DVDR_PLUS|
- BRASERO_MEDIUM_DVD_DL|
- 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_DVD_DL|
- 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_DVD_DL|
- 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);
-
- /* NOTE: growisofs doesn't support APPEND flag with DVD+RW. DVD+RW and
- * other overwrite media have only one session and therefore you can't
- * add another session after (APPEND). Now growisofs is still able to
- * merge more data nevertheless. */
+ BRASERO_PLUGIN_ADD_STANDARD_DVDRW_RESTRICTED_FLAGS (plugin);
+
+ /* DVD+ W */
+ BRASERO_PLUGIN_ADD_STANDARD_DVDR_PLUS_FLAGS (plugin);
/* for DVD+RW */
- 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|
- BRASERO_BURN_FLAG_BURNPROOF|
- BRASERO_BURN_FLAG_OVERBURN|
- BRASERO_BURN_FLAG_NOGRACE,
- BRASERO_BURN_FLAG_MULTI);
-
- brasero_plugin_set_flags (plugin,
- BRASERO_MEDIUM_DVDRW_PLUS|
- BRASERO_MEDIUM_DVD_DL|
- 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_NOGRACE,
- BRASERO_BURN_FLAG_MULTI);
-
- brasero_plugin_set_flags (plugin,
- BRASERO_MEDIUM_DVDRW_PLUS|
- BRASERO_MEDIUM_DVD_DL|
- 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_NOGRACE|
- BRASERO_BURN_FLAG_MERGE,
- BRASERO_BURN_FLAG_MULTI);
+ BRASERO_PLUGIN_ADD_STANDARD_DVDRW_PLUS_FLAGS (plugin);
- /* blank caps for +/restricted RW*/
+ /* blank caps for +/restricted RW */
output = brasero_caps_disc_new (BRASERO_MEDIUM_DVD|
BRASERO_MEDIUM_DVD_DL|
BRASERO_MEDIUM_PLUS|
Modified: trunk/src/plugins/libburnia/burn-libburn.c
==============================================================================
--- trunk/src/plugins/libburnia/burn-libburn.c (original)
+++ trunk/src/plugins/libburnia/burn-libburn.c Sat Sep 6 16:18:00 2008
@@ -853,34 +853,9 @@
"Philippe Rouquier",
15);
- brasero_plugin_set_flags (plugin,
- BRASERO_MEDIUM_CD|
- BRASERO_MEDIUM_REWRITABLE|
- BRASERO_MEDIUM_WRITABLE|
- BRASERO_MEDIUM_BLANK,
- BRASERO_BURN_FLAG_DAO|
- 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_CD|
- BRASERO_MEDIUM_REWRITABLE|
- BRASERO_MEDIUM_WRITABLE|
- BRASERO_MEDIUM_APPENDABLE|
- BRASERO_MEDIUM_HAS_AUDIO|
- BRASERO_MEDIUM_HAS_DATA,
- BRASERO_BURN_FLAG_APPEND|
- BRASERO_BURN_FLAG_MERGE|
- BRASERO_BURN_FLAG_BURNPROOF|
- BRASERO_BURN_FLAG_OVERBURN|
- BRASERO_BURN_FLAG_MULTI|
- BRASERO_BURN_FLAG_DUMMY|
- BRASERO_BURN_FLAG_NOGRACE,
- BRASERO_BURN_FLAG_NONE);
+ /* CD(R)W */
+ BRASERO_PLUGIN_ADD_STANDARD_CDR_FLAGS (plugin);
+ BRASERO_PLUGIN_ADD_STANDARD_CDRW_FLAGS (plugin);
/* audio support for CDs only */
input = brasero_caps_audio_new (BRASERO_PLUGIN_IO_ACCEPT_PIPE|
@@ -900,176 +875,29 @@
brasero_plugin_link_caps (plugin, output, input);
g_slist_free (output);
- /* ... and DVDs-R ... */
- /* NOTE: DAO and multi are exclusive */
- brasero_plugin_set_flags (plugin,
- BRASERO_MEDIUM_DVDR|
- BRASERO_MEDIUM_BLANK,
- BRASERO_BURN_FLAG_DAO|
- 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_DVDR|
- 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_DVDR|
- BRASERO_MEDIUM_APPENDABLE|
- BRASERO_MEDIUM_HAS_DATA,
- BRASERO_BURN_FLAG_APPEND|
- BRASERO_BURN_FLAG_MERGE|
- BRASERO_BURN_FLAG_BURNPROOF|
- BRASERO_BURN_FLAG_OVERBURN|
- BRASERO_BURN_FLAG_MULTI|
- BRASERO_BURN_FLAG_DUMMY|
- BRASERO_BURN_FLAG_NOGRACE,
- BRASERO_BURN_FLAG_NONE);
-
- /* NOTE: DVD+R don't have a dummy mode */
- 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,
- 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_MERGE|
- BRASERO_BURN_FLAG_APPEND|
- BRASERO_BURN_FLAG_BURNPROOF|
- BRASERO_BURN_FLAG_OVERBURN|
- BRASERO_BURN_FLAG_MULTI|
- BRASERO_BURN_FLAG_NOGRACE,
- BRASERO_BURN_FLAG_NONE);
-
+ /* ... and DVD-R and DVD+R ... */
output = brasero_caps_disc_new (media_dvd_w);
brasero_plugin_link_caps (plugin, output, input);
g_slist_free (output);
- /* ... 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|
- BRASERO_BURN_FLAG_OVERBURN|
- BRASERO_BURN_FLAG_DUMMY|
- BRASERO_BURN_FLAG_NOGRACE,
- BRASERO_BURN_FLAG_NONE);
-
- brasero_plugin_set_flags (plugin,
- BRASERO_MEDIUM_DVDRW|
- 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_DVDRW|
- BRASERO_MEDIUM_APPENDABLE|
- BRASERO_MEDIUM_HAS_DATA,
- BRASERO_BURN_FLAG_MERGE|
- BRASERO_BURN_FLAG_APPEND|
- 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_ADD_STANDARD_DVDR_PLUS_FLAGS (plugin);
+ BRASERO_PLUGIN_ADD_STANDARD_DVDR_FLAGS (plugin);
+ /* ... and DVDs-RW (sequential) */
output = brasero_caps_disc_new (media_dvd_rw);
brasero_plugin_link_caps (plugin, output, input);
g_slist_free (output);
+ BRASERO_PLUGIN_ADD_STANDARD_DVDRW_FLAGS (plugin);
+
/* for DVD+/- restricted */
output = brasero_caps_disc_new (media_dvd_rw_plus);
brasero_plugin_link_caps (plugin, output, input);
g_slist_free (output);
g_slist_free (input);
- /* for DVD-RW restricted overwrite */
- brasero_plugin_set_flags (plugin,
- BRASERO_MEDIUM_DVD|
- BRASERO_MEDIUM_RESTRICTED|
- BRASERO_MEDIUM_REWRITABLE|
- BRASERO_MEDIUM_UNFORMATTED|
- 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_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_MULTI|
- BRASERO_BURN_FLAG_BURNPROOF|
- BRASERO_BURN_FLAG_OVERBURN|
- BRASERO_BURN_FLAG_DUMMY|
- BRASERO_BURN_FLAG_NOGRACE|
- BRASERO_BURN_FLAG_MERGE,
- BRASERO_BURN_FLAG_MULTI);
-
- /* for DVD+RW */
- brasero_plugin_set_flags (plugin,
- BRASERO_MEDIUM_DVDRW_PLUS|
- BRASERO_MEDIUM_DVD_DL|
- BRASERO_MEDIUM_UNFORMATTED|
- BRASERO_MEDIUM_BLANK,
- BRASERO_BURN_FLAG_DAO|
- BRASERO_BURN_FLAG_MULTI|
- BRASERO_BURN_FLAG_BURNPROOF|
- BRASERO_BURN_FLAG_OVERBURN|
- BRASERO_BURN_FLAG_NOGRACE,
- BRASERO_BURN_FLAG_MULTI);
-
- brasero_plugin_set_flags (plugin,
- BRASERO_MEDIUM_DVDRW_PLUS|
- BRASERO_MEDIUM_DVD_DL|
- BRASERO_MEDIUM_APPENDABLE|
- BRASERO_MEDIUM_CLOSED|
- BRASERO_MEDIUM_HAS_DATA,
- BRASERO_BURN_FLAG_MULTI|
- BRASERO_BURN_FLAG_BURNPROOF|
- BRASERO_BURN_FLAG_OVERBURN|
- BRASERO_BURN_FLAG_NOGRACE|
- BRASERO_BURN_FLAG_MERGE,
- BRASERO_BURN_FLAG_MULTI);
+ BRASERO_PLUGIN_ADD_STANDARD_DVDRW_RESTRICTED_FLAGS (plugin);
+ BRASERO_PLUGIN_ADD_STANDARD_DVDRW_PLUS_FLAGS (plugin);
/* add blank caps */
output = brasero_caps_disc_new (BRASERO_MEDIUM_CD|
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]