~mfisch/brasero/update-to-3.8.0

« back to all changes in this revision

Viewing changes to libbrasero-burn/brasero-caps-session.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2009-09-08 09:33:41 UTC
  • mfrom: (1.1.29 upstream)
  • Revision ID: james.westby@ubuntu.com-20090908093341-jh02q5ba0q8jyu9l
Tags: 2.27.92-0ubuntu1
* New upstream release (LP: #425998)
  - Some improvements when handling DVD-RW sequential
  - #593829 - Brasero gets stuck in a loop at "Getting size" while burning another session on a multi-session disk
  - #578466 - Unable to overburn
  - #593314 - Brasero is failing to burn from sftp
  - #593492 - Compilation must be ordered by file name
  - #587122 - Copying DVD - "Error while reading video DVD (no error)"
  - #592026 - brasero crashes when eject a medium
  - #592025 - brasero crashes on detecting src images on a NFS path when preparing burning an image
  - #591880 - Image checksumming causes internal error (LP: #354995)
  - #591397 - Brasero Main window pops up after exiting from Image Burning window.
  - Translation updates
  - lots of small fixes and improvements

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
                return BRASERO_BURN_NOT_SUPPORTED;
130
130
        }
131
131
 
 
132
        /* This is a special case that is in MMC specs:
 
133
         * DVD-RW sequential must be fully blanked
 
134
         * if we really want multisession support. */
 
135
        if (BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_DVDRW)
 
136
        && (session_flags & BRASERO_BURN_FLAG_MULTI)) {
 
137
                if (compulsory_flags & BRASERO_BURN_FLAG_FAST_BLANK) {
 
138
                        BRASERO_BURN_LOG ("fast media blanking only supported but multisession required for DVDRW");
 
139
                        return BRASERO_BURN_NOT_SUPPORTED;
 
140
                }
 
141
 
 
142
                supported_flags &= ~BRASERO_BURN_FLAG_FAST_BLANK;
 
143
 
 
144
                BRASERO_BURN_LOG ("removed fast blank for a DVDRW with multisession");
 
145
        }
 
146
 
132
147
        if (supported)
133
148
                *supported = supported_flags;
134
149
        if (compulsory)
144
159
 * @compulsory: a #BraseroBurnFlag
145
160
 *
146
161
 * Given the various parameters stored in @session,
147
 
 * stored in @supported and @compulsory, the flags
 
162
 * stores in @supported and @compulsory, the flags
148
163
 * that can be used (@supported) and must be used
149
164
 * (@compulsory) when blanking the medium in the
150
165
 * #BraseroDrive (set with brasero_burn_session_set_burner ()).
202
217
                return BRASERO_BURN_NOT_SUPPORTED;
203
218
        }
204
219
 
 
220
        /* This is a special case from MMC: DVD-RW sequential
 
221
         * can only be multisession is they were fully blanked
 
222
         * so if there are the two flags, abort. */
 
223
        if (BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_DVDRW)
 
224
        &&  (flags & BRASERO_BURN_FLAG_MULTI)
 
225
        &&  (flags & BRASERO_BURN_FLAG_FAST_BLANK)) {
 
226
                BRASERO_BURN_LOG ("fast media blanking only supported but multisession required for DVDRW");
 
227
                return BRASERO_BURN_NOT_SUPPORTED;
 
228
        }
 
229
 
205
230
        for (iter = self->priv->caps_list; iter; iter = iter->next) {
206
231
                BraseroCaps *caps;
207
232
                GSList *links;
1340
1365
        else if (!brasero_medium_can_use_dummy_for_tao (medium))
1341
1366
                (*supported_flags) &= ~BRASERO_BURN_FLAG_DUMMY;
1342
1367
 
1343
 
        if (!brasero_medium_can_use_tao (medium)) {
 
1368
        /* The following is only true if we won't _have_ to blank
 
1369
         * the disc since a CLOSED disc is not able for tao/sao.
 
1370
         * so if BLANK_BEFORE_RIGHT is TRUE then we leave 
 
1371
         * the benefit of the doubt, but flags should be rechecked
 
1372
         * after the drive was blanked. */
 
1373
        if (((*compulsory_flags) & BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE) == 0
 
1374
        &&  !BRASERO_MEDIUM_RANDOM_WRITABLE (media)
 
1375
        &&  !brasero_medium_can_use_tao (medium)) {
1344
1376
                (*supported_flags) &= ~BRASERO_BURN_FLAG_MULTI;
1345
1377
 
1346
1378
                if (brasero_medium_can_use_sao (medium))
1468
1500
        /* see if we can add BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE. Add it when:
1469
1501
         * - media can be blanked, it has audio or data and we're not merging
1470
1502
         * - media is not formatted and it can be blanked/formatted */
1471
 
        if (BRASERO_BURN_CAPS_SHOULD_BLANK (media, session_flags)
1472
 
        &&  brasero_burn_caps_can_blank_real (self, media, session_flags) == BRASERO_BURN_OK)
 
1503
        if (brasero_burn_caps_can_blank_real (self, media, session_flags) == BRASERO_BURN_OK)
1473
1504
                (*supported_flags) |= BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE;
1474
1505
        else if (session_flags & BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE)
1475
1506
                return BRASERO_BURN_NOT_SUPPORTED;
1536
1567
        else if (result != BRASERO_BURN_OK)
1537
1568
                return result;
1538
1569
 
 
1570
        /* These are a special case for DVDRW sequential */
 
1571
        if (BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_DVDRW)) {
 
1572
                /* That's a way to give priority to MULTI over FAST
 
1573
                 * and leave the possibility to always use MULTI. */
 
1574
                if (session_flags & BRASERO_BURN_FLAG_MULTI)
 
1575
                        (*supported_flags) &= ~BRASERO_BURN_FLAG_FAST_BLANK;
 
1576
                else if ((session_flags & BRASERO_BURN_FLAG_FAST_BLANK)
 
1577
                         &&  (session_flags & BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE)) {
 
1578
                        /* We should be able to handle this case differently but unfortunately
 
1579
                         * there are buggy firmwares that won't report properly the supported
 
1580
                         * mode writes */
 
1581
                        if (!((*supported_flags) & BRASERO_BURN_FLAG_DAO))
 
1582
                                         return BRASERO_BURN_NOT_SUPPORTED;
 
1583
 
 
1584
                        (*compulsory_flags) |= BRASERO_BURN_FLAG_DAO;
 
1585
                }
 
1586
        }
 
1587
 
1539
1588
        if (session_flags & BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE) {
1540
1589
                /* make sure we remove MERGE/APPEND from supported and
1541
1590
                 * compulsory since that's not possible anymore */