brasero r1055 - in trunk: . src
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r1055 - in trunk: . src
- Date: Wed, 6 Aug 2008 12:26:12 +0000 (UTC)
Author: philippr
Date: Wed Aug 6 12:26:11 2008
New Revision: 1055
URL: http://svn.gnome.org/viewvc/brasero?rev=1055&view=rev
Log:
2008-08-06 Philippe Rouquier <ykw localhost localdomain>
Try to fix #543377 â No multisession
* src/burn-medium.c (brasero_medium_track_get_info),
(brasero_medium_track_get_nwa), (brasero_medium_get_sessions_info):
Modified:
trunk/ChangeLog
trunk/src/burn-medium.c
Modified: trunk/src/burn-medium.c
==============================================================================
--- trunk/src/burn-medium.c (original)
+++ trunk/src/burn-medium.c Wed Aug 6 12:26:11 2008
@@ -1097,12 +1097,6 @@
}
/* NOTE: DVD+RW, DVD-RW (restricted overwrite) never reach this function */
-
- if (track_info.next_wrt_address_valid) {
- priv->next_wr_add = BRASERO_GET_32 (track_info.next_wrt_address);
- BRASERO_BURN_LOG ("Next Writable Address is %d", priv->next_wr_add);
- }
-
BRASERO_BURN_LOG ("Track %i (session %i): type = %i start = %llu size = %llu",
track_num,
track->session,
@@ -1113,6 +1107,66 @@
return BRASERO_BURN_OK;
}
+static BraseroBurnResult
+brasero_medium_track_get_nwa (BraseroMedium *self,
+ BraseroDeviceHandle *handle,
+ BraseroScsiErrCode *code)
+{
+ BraseroScsiTrackInfo track_info;
+ BraseroMediumPrivate *priv;
+ BraseroScsiResult result;
+ gint track_num;
+ int size;
+
+ BRASERO_BURN_LOG ("Retrieving NWA");
+
+ priv = BRASERO_MEDIUM_PRIVATE (self);
+
+ if (BRASERO_MEDIUM_IS (priv->info, BRASERO_MEDIUM_DVDRW_PLUS)
+ || BRASERO_MEDIUM_IS (priv->info, BRASERO_MEDIUM_DVDRW_RESTRICTED)) {
+ BRASERO_BURN_LOG ("Overwritable medium => skipping");
+ return BRASERO_BURN_OK;
+ }
+
+ /* at this point we know the type of the disc that's why we set the
+ * size according to this type. That may help to avoid outrange address
+ * errors. */
+ if (BRASERO_MEDIUM_IS (priv->info, BRASERO_MEDIUM_DVD_DL|BRASERO_MEDIUM_WRITABLE))
+ size = 48;
+ else if (BRASERO_MEDIUM_IS (priv->info, BRASERO_MEDIUM_PLUS|BRASERO_MEDIUM_WRITABLE))
+ size = 40;
+ else
+ size = 36;
+
+ if (BRASERO_MEDIUM_IS (priv->info, BRASERO_MEDIUM_CDR)
+ || BRASERO_MEDIUM_IS (priv->info, BRASERO_MEDIUM_CDRW)
+ /* The following includes DL */
+ || BRASERO_MEDIUM_IS (priv->info, BRASERO_MEDIUM_DVDR_PLUS))
+ track_num = 0xFF;
+ else
+ track_num = g_slist_length (priv->tracks);
+
+ result = brasero_mmc1_read_track_info (handle,
+ track_num,
+ &track_info,
+ &size,
+ code);
+
+ if (result != BRASERO_SCSI_OK) {
+ BRASERO_BURN_LOG ("READ TRACK INFO failed");
+ return BRASERO_BURN_ERR;
+ }
+
+ if (track_info.next_wrt_address_valid) {
+ priv->next_wr_add = BRASERO_GET_32 (track_info.next_wrt_address);
+ BRASERO_BURN_LOG ("Next Writable Address is %d", priv->next_wr_add);
+ }
+ else
+ BRASERO_BURN_LOG ("No Next Writable Address");
+
+ return BRASERO_BURN_OK;
+}
+
/**
* NOTE: for DVD-R multisession we lose 28688 blocks for each session
* so the capacity is the addition of all session sizes + 28688 for each
@@ -1296,6 +1350,8 @@
g_slist_length (priv->tracks),
handle,
code);
+
+ brasero_medium_track_get_nwa (self, handle, code);
}
g_free (toc);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]