~ubuntu-branches/ubuntu/lucid/brasero/lucid-updates

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-06-24 11:22:46 UTC
  • mfrom: (1.3.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100624112246-s5ubbf8tafqkir0m
Tags: 2.30.2-0ubuntu1
* New upstream release
  - Lot's of memleak fixes
  - Fixed a runtime warning related to cancelling tracker searches
  - Crash in brasero_data_project_node_removed at
    brasero-data-project.c:1163
  - brasero crashed with SIGSEGV in brasero_data_project_remove_node()
    (LP: #561319)
  - Fix a few runtime warnings with the Cover Editor
  - Text in cover editor does not show up automatically (LP: #469459)
  - Removed use of deprecated flags
  - Use accessor functions instead direct access (use GSEAL GnomeGoal)
  - Fix a bug in the layout on first start (side pane was hidden and
    remained so until the user moved it)
  - Save printer settings for cover printing
  - Write the contents of the GtkTextBuffer displayed line by displayed
    line which should improve the layout
  - "Write to Disc" button sensitivity regression
  - Fix flaw in mask that led libburn plugin not to work (not to be picked
    up actually) in some circumstances
  - Fails to burn ANY audio project
  - Move columns doesn't work (LP: #581759)
  - Brasero does not correctly handle double clicking on column separators
    (LP: #581885)
  - Bad info when burning, high CPU usage and slow burn
  - Change the priority for cdrdao and raised the one of cdda2wav plugin
  - brasero crashed with SIGSEGV in
    brasero_mmc3_get_performa nce_wrt_spd_desc() (LP: #564766)
  - brasero crashed with SIGSEGV in brasero_scsi_command_issue_sync()
    (LP: #444832)
  - Do not check for symlinks on cdda2wav so the plugin can use icedax.
  - Brasero's failure with some file names (LP: #380643)
  - Pressing create audio cd does nothing
  - Empty project not available
  - can't actually save error logs
  - doesn't handle incorrect temp dirs properly
  - Fix multi DND in GtkFileChooser
  - Displays "starting to record" during whole burn process
  - Fix wrong report of speed with both cdrecord and wodim
  - Disk project doesn't save the disk title (LP: #587924)
  - Brasero reports outdated cdrtools on cdrtools-3.00 (LP: #592075)
  - misc bug fixes
  - Updated Translations
* Removed upstream patches:
  - debian/patches/90_git_audio_project_creation.patch,
    debian/patches/91_git_audio_project_creation.patch,
    debian/patches/92_git_audio_cd_recording.patch,
    debian/patches/93_git_new_caps_function_definition.patch
* debian/patches/99_autoconf.patch:
  - refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
565
565
{
566
566
        GSList *iter;
567
567
 
568
 
        BRASERO_BURN_LOG_WITH_TYPE (&caps->type, BRASERO_PLUGIN_IO_NONE, "(Has %i links) Found link", g_slist_length (caps->links));
 
568
        BRASERO_BURN_LOG_WITH_TYPE (&caps->type, BRASERO_PLUGIN_IO_NONE, "Found link (with %i links):", g_slist_length (caps->links));
569
569
 
570
570
        /* Here we only make sure we have at least one link working. For a link
571
571
         * to be followed it must first:
587
587
 
588
588
                if (!link->caps)
589
589
                        continue;
590
 
 
 
590
                
591
591
                /* check that the link has some active plugin */
592
592
                if (!brasero_caps_link_active (link, ctx->ignore_plugin_errors))
593
593
                        continue;
594
594
 
595
595
                /* since this link contains recorders, check that at least one
596
596
                 * of them can handle the record flags */
597
 
                if (ctx->check_session_flags
598
 
                &&  brasero_track_type_get_has_medium (&caps->type)
599
 
                && !brasero_caps_link_check_record_flags (link, ctx->ignore_plugin_errors, ctx->session_flags, ctx->media))
600
 
                        continue;
 
597
                if (ctx->check_session_flags && brasero_track_type_get_has_medium (&caps->type)) {
 
598
                        if (!brasero_caps_link_check_record_flags (link, ctx->ignore_plugin_errors, ctx->session_flags, ctx->media))
 
599
                                continue;
 
600
 
 
601
                        if (brasero_caps_link_check_recorder_flags_for_input (link, ctx->session_flags) != BRASERO_BURN_OK)
 
602
                                continue;
 
603
                }
601
604
 
602
605
                /* first see if that's the perfect fit:
603
606
                 * - it must have the same caps (type + subtype)
1358
1361
        return BRASERO_IMAGE_FORMAT_NONE;
1359
1362
}
1360
1363
 
 
1364
static BraseroBurnResult
 
1365
brasero_caps_set_flags_from_recorder_input (BraseroTrackType *input,
 
1366
                                            BraseroBurnFlag *supported,
 
1367
                                            BraseroBurnFlag *compulsory)
 
1368
{
 
1369
        if (brasero_track_type_get_has_image (input)) {
 
1370
                BraseroImageFormat format;
 
1371
 
 
1372
                format = brasero_track_type_get_image_format (input);
 
1373
                if (format == BRASERO_IMAGE_FORMAT_CUE
 
1374
                ||  format == BRASERO_IMAGE_FORMAT_CDRDAO) {
 
1375
                        if ((*supported) & BRASERO_BURN_FLAG_DAO)
 
1376
                                (*compulsory) |= BRASERO_BURN_FLAG_DAO;
 
1377
                        else
 
1378
                                return BRASERO_BURN_NOT_SUPPORTED;
 
1379
                }
 
1380
                else if (format == BRASERO_IMAGE_FORMAT_CLONE) {
 
1381
                        /* RAW write mode should (must) only be used in this case */
 
1382
                        if ((*supported) & BRASERO_BURN_FLAG_RAW) {
 
1383
                                (*supported) &= ~BRASERO_BURN_FLAG_DAO;
 
1384
                                (*compulsory) &= ~BRASERO_BURN_FLAG_DAO;
 
1385
                                (*compulsory) |= BRASERO_BURN_FLAG_RAW;
 
1386
                        }
 
1387
                        else
 
1388
                                return BRASERO_BURN_NOT_SUPPORTED;
 
1389
                }
 
1390
                else
 
1391
                        (*supported) &= ~BRASERO_BURN_FLAG_RAW;
 
1392
        }
 
1393
        
 
1394
        return BRASERO_BURN_OK;
 
1395
}
 
1396
 
1361
1397
static BraseroPluginIOFlag
1362
1398
brasero_caps_get_flags (BraseroCaps *caps,
1363
1399
                        gboolean ignore_plugin_errors,
1392
1428
 
1393
1429
                if (brasero_track_type_get_has_medium (&caps->type)) {
1394
1430
                        BraseroBurnFlag tmp;
 
1431
                        BraseroBurnResult result;
1395
1432
 
1396
1433
                        brasero_caps_link_get_record_flags (link,
1397
1434
                                                            ignore_plugin_errors,
1405
1442
                        tmp = session_flags & BRASERO_PLUGIN_BURN_FLAG_MASK;
1406
1443
                        if ((tmp & rec_supported) != tmp)
1407
1444
                                continue;
 
1445
 
 
1446
                        /* This is the recording plugin, check its input as
 
1447
                         * some flags depend on it. */
 
1448
                        result = brasero_caps_set_flags_from_recorder_input (&link->caps->type,
 
1449
                                                                             &rec_supported,
 
1450
                                                                             &rec_compulsory);
 
1451
                        if (result != BRASERO_BURN_OK)
 
1452
                                continue;
1408
1453
                }
1409
1454
 
1410
1455
                if (brasero_track_type_get_has_data (&link->caps->type)) {
1460
1505
                if (io_flags == BRASERO_PLUGIN_IO_NONE)
1461
1506
                        continue;
1462
1507
 
 
1508
                (*compulsory) &= rec_compulsory;
1463
1509
                retval |= (io_flags & flags);
1464
 
                (*compulsory) &= rec_compulsory;
1465
1510
                (*supported) |= data_supported|rec_supported;
1466
1511
        }
1467
1512
 
1579
1624
                return BRASERO_BURN_NOT_SUPPORTED;
1580
1625
        }
1581
1626
 
1582
 
        if (brasero_track_type_get_has_image (input)) {
1583
 
                BraseroImageFormat format;
 
1627
        /* NOTE: DO NOT TEST the input image here. What should be tested is the
 
1628
         * type of the input right before the burner plugin. See:
 
1629
         * brasero_burn_caps_set_flags_from_recorder_input())
 
1630
         * For example in the following situation: AUDIO => CUE => BURNER the
 
1631
         * DAO flag would not be set otherwise. */
1584
1632
 
1585
 
                format = brasero_track_type_get_image_format (input);
1586
 
                if (format == BRASERO_IMAGE_FORMAT_CUE
1587
 
                ||  format == BRASERO_IMAGE_FORMAT_CDRDAO) {
1588
 
                        if (supported_flags & BRASERO_BURN_FLAG_DAO)
1589
 
                                compulsory_flags |= BRASERO_BURN_FLAG_DAO;
1590
 
                        else
1591
 
                                return BRASERO_BURN_NOT_SUPPORTED;
1592
 
                }
1593
 
                else if (format == BRASERO_IMAGE_FORMAT_CLONE) {
1594
 
                        /* RAW write mode should (must) only be used in this case */
1595
 
                        if (supported_flags & BRASERO_BURN_FLAG_RAW) {
1596
 
                                supported_flags &= ~BRASERO_BURN_FLAG_DAO;
1597
 
                                compulsory_flags &= ~BRASERO_BURN_FLAG_DAO;
1598
 
                                compulsory_flags |= BRASERO_BURN_FLAG_RAW;
1599
 
                        }
1600
 
                        else
1601
 
                                return BRASERO_BURN_NOT_SUPPORTED;
1602
 
                }
1603
 
                else
1604
 
                        supported_flags &= ~BRASERO_BURN_FLAG_RAW;
1605
 
        }
1606
 
        else if (brasero_track_type_get_has_stream (input)) {
 
1633
        if (brasero_track_type_get_has_stream (input)) {
1607
1634
                BraseroStreamFormat format;
1608
1635
 
1609
1636
                format = brasero_track_type_get_stream_format (input);
1610
 
                if (!(format & BRASERO_METADATA_INFO)
1611
 
                &&   BRASERO_STREAM_FORMAT_VIDEO (format)) {
 
1637
                if (format & BRASERO_METADATA_INFO) {
1612
1638
                        /* In this case, DAO is compulsory if we want to write CD-TEXT */
1613
1639
                        if (supported_flags & BRASERO_BURN_FLAG_DAO)
1614
1640
                                compulsory_flags |= BRASERO_BURN_FLAG_DAO;
1622
1648
                compulsory_flags &= ~BRASERO_BURN_FLAG_RAW;
1623
1649
                supported_flags &= ~BRASERO_BURN_FLAG_RAW;
1624
1650
        }
1625
 
 
 
1651
        
1626
1652
        if (io_flags & BRASERO_PLUGIN_IO_ACCEPT_PIPE) {
1627
1653
                supported_flags |= BRASERO_BURN_FLAG_NO_TMP_FILES;
1628
1654
 
1965
1991
         * until the disc is inserted which it is not at the
1966
1992
         * moment */
1967
1993
        (*supported_ret) |= (BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE|
1968
 
                                         BRASERO_BURN_FLAG_FAST_BLANK);
 
1994
                             BRASERO_BURN_FLAG_FAST_BLANK);
1969
1995
 
1970
1996
        if (brasero_track_type_get_medium_type (&input) & BRASERO_MEDIUM_HAS_AUDIO) {
1971
1997
                /* This is a special case for audio discs.