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));
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:
591
591
/* check that the link has some active plugin */
592
592
if (!brasero_caps_link_active (link, ctx->ignore_plugin_errors))
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))
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))
601
if (brasero_caps_link_check_recorder_flags_for_input (link, ctx->session_flags) != BRASERO_BURN_OK)
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;
1364
static BraseroBurnResult
1365
brasero_caps_set_flags_from_recorder_input (BraseroTrackType *input,
1366
BraseroBurnFlag *supported,
1367
BraseroBurnFlag *compulsory)
1369
if (brasero_track_type_get_has_image (input)) {
1370
BraseroImageFormat format;
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;
1378
return BRASERO_BURN_NOT_SUPPORTED;
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;
1388
return BRASERO_BURN_NOT_SUPPORTED;
1391
(*supported) &= ~BRASERO_BURN_FLAG_RAW;
1394
return BRASERO_BURN_OK;
1361
1397
static BraseroPluginIOFlag
1362
1398
brasero_caps_get_flags (BraseroCaps *caps,
1363
1399
gboolean ignore_plugin_errors,
1405
1442
tmp = session_flags & BRASERO_PLUGIN_BURN_FLAG_MASK;
1406
1443
if ((tmp & rec_supported) != tmp)
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,
1451
if (result != BRASERO_BURN_OK)
1410
1455
if (brasero_track_type_get_has_data (&link->caps->type)) {
1460
1505
if (io_flags == BRASERO_PLUGIN_IO_NONE)
1508
(*compulsory) &= rec_compulsory;
1463
1509
retval |= (io_flags & flags);
1464
(*compulsory) &= rec_compulsory;
1465
1510
(*supported) |= data_supported|rec_supported;
1579
1624
return BRASERO_BURN_NOT_SUPPORTED;
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. */
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;
1591
return BRASERO_BURN_NOT_SUPPORTED;
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;
1601
return BRASERO_BURN_NOT_SUPPORTED;
1604
supported_flags &= ~BRASERO_BURN_FLAG_RAW;
1606
else if (brasero_track_type_get_has_stream (input)) {
1633
if (brasero_track_type_get_has_stream (input)) {
1607
1634
BraseroStreamFormat format;
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;
1965
1991
* until the disc is inserted which it is not at the
1967
1993
(*supported_ret) |= (BRASERO_BURN_FLAG_BLANK_BEFORE_WRITE|
1968
BRASERO_BURN_FLAG_FAST_BLANK);
1994
BRASERO_BURN_FLAG_FAST_BLANK);
1970
1996
if (brasero_track_type_get_medium_type (&input) & BRASERO_MEDIUM_HAS_AUDIO) {
1971
1997
/* This is a special case for audio discs.