Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
brasero
brasero-fix-discspace.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File brasero-fix-discspace.patch of Package brasero
--- trunk/src/burn-medium.c 2008/10/30 14:31:57 1446 +++ trunk/src/burn-medium.c 2008/11/10 15:04:37 1510 @@ -1498,6 +1498,46 @@ } static BraseroBurnResult +brasero_medium_track_set_leadout_CDR_blank (BraseroMedium *self, + BraseroDeviceHandle *handle, + BraseroMediumTrack *leadout, + BraseroScsiErrCode *code) +{ + BraseroScsiAtipData *atip = NULL; + BraseroMediumPrivate *priv; + BraseroScsiResult result; + int size = 0; + + priv = BRASERO_MEDIUM_PRIVATE (self); + + BRASERO_BURN_LOG ("Using fallback method for blank CDR to retrieve NWA and leadout information"); + + /* NWA is easy for blank CDRs, it's 0. So far, so good... */ + priv->next_wr_add = 0; + + result = brasero_mmc1_read_atip (handle, &atip, &size, code); + if (result != BRASERO_SCSI_OK) { + BRASERO_BURN_LOG ("READ ATIP failed"); + return BRASERO_BURN_ERR; + } + + leadout->blocks_num = atip->desc->leadout_mn * 60 * 75 + + atip->desc->leadout_sec * 75 + + atip->desc->leadout_frame; + + /* of course it starts at 0 since it's empty */ + leadout->start = 0; + + BRASERO_BURN_LOG ("Leadout (through READ ATIP): start = %llu size = %llu", + leadout->start, + leadout->blocks_num); + + g_free (atip); + + return BRASERO_BURN_OK; +} + +static BraseroBurnResult brasero_medium_track_set_leadout (BraseroMedium *self, BraseroDeviceHandle *handle, BraseroMediumTrack *leadout, @@ -1531,8 +1571,25 @@ if (result == BRASERO_SCSI_OK) { wrt_page = (BraseroScsiWritePage *) &data->page; - BRASERO_BURN_LOG ("Former write mode %d", wrt_page->write_type); + BRASERO_BURN_LOG ("Former write type %d", wrt_page->write_type); + BRASERO_BURN_LOG ("Former track mode %d", wrt_page->track_mode); + BRASERO_BURN_LOG ("Former data block type %d", wrt_page->data_block_type); + + /* "reset some stuff to be on the safe side" (words and ideas + * taken from k3b:)). */ + wrt_page->ps = 0; + wrt_page->BUFE = 0; + wrt_page->multisession = 0; + wrt_page->testwrite = 0; + wrt_page->LS_V = 0; + wrt_page->copy = 0; + wrt_page->FP = 0; + wrt_page->session_format = 0; + BRASERO_SET_16 (wrt_page->pause_len, 150); + wrt_page->write_type = BRASERO_SCSI_WRITE_TAO; + wrt_page->track_mode = 4; /* should be 5 for DVD-R(W) */ + wrt_page->data_block_type = 8; result = brasero_spc1_mode_select (handle, data, size, code); g_free (data); @@ -1540,6 +1597,13 @@ if (result != BRASERO_SCSI_OK) { BRASERO_BURN_LOG ("MODE SELECT failed"); + /* This only for CD-R */ + if (BRASERO_MEDIUM_IS (priv->info, BRASERO_MEDIUM_CDR|BRASERO_MEDIUM_BLANK)) + return brasero_medium_track_set_leadout_CDR_blank (self, + handle, + leadout, + code); + /* This isn't necessarily a problem! we better try */ // return BRASERO_BURN_ERR; } @@ -1547,6 +1611,13 @@ else { BRASERO_BURN_LOG ("MODE SENSE failed"); + /* This only for CD-R */ + if (BRASERO_MEDIUM_IS (priv->info, BRASERO_MEDIUM_CDR|BRASERO_MEDIUM_BLANK)) + return brasero_medium_track_set_leadout_CDR_blank (self, + handle, + leadout, + code); + /* This isn't necessarily a problem we better! try the rest */ // return BRASERO_BURN_ERR; } @@ -1580,6 +1651,13 @@ code); if (result != BRASERO_SCSI_OK) { + /* This only for CD-R */ + if (BRASERO_MEDIUM_IS (priv->info, BRASERO_MEDIUM_CDR|BRASERO_MEDIUM_BLANK)) + return brasero_medium_track_set_leadout_CDR_blank (self, + handle, + leadout, + code); + BRASERO_BURN_LOG ("READ TRACK INFO failed"); return BRASERO_BURN_ERR; } --- trunk/src/scsi-write-page.h 2008/09/03 13:41:19 1240 +++ trunk/src/scsi-write-page.h 2008/11/10 15:04:37 1510 @@ -51,7 +51,7 @@ uchar FP :1; uchar multisession :2; - uchar book_type :4; + uchar data_block_type :4; uchar reserved2 :4; uchar link_size; @@ -102,7 +102,7 @@ uchar track_mode :4; uchar reserved2 :4; - uchar book_type :4; + uchar data_block_type :4; uchar link_size;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor