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

« back to all changes in this revision

Viewing changes to plugins/cdrtools/burn-cdrecord.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:
260
260
        g_free (action_string);
261
261
}
262
262
 
 
263
static void
 
264
brasero_cdrecord_set_rate (BraseroProcess *process,
 
265
                           int speed_1,
 
266
                           int speed_2)
 
267
{
 
268
        gdouble current_rate;
 
269
        BraseroMedia media;
 
270
 
 
271
        if (brasero_job_get_media (BRASERO_JOB (process), &media) != BRASERO_BURN_OK)
 
272
                return;
 
273
 
 
274
        if (BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_CD))
 
275
                current_rate = (gdouble) ((gdouble) speed_1 +
 
276
                               (gdouble) speed_2 / 10.0) *
 
277
                               (gdouble) CD_RATE;
 
278
        else if (BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_DVD))
 
279
                current_rate = (gdouble) ((gdouble) speed_1 +
 
280
                               (gdouble) speed_2 / 10.0) *
 
281
                               (gdouble) DVD_RATE;
 
282
        else if (BRASERO_MEDIUM_IS (media, BRASERO_MEDIUM_BD))
 
283
                current_rate = (gdouble) ((gdouble) speed_1 +
 
284
                               (gdouble) speed_2 / 10.0) *
 
285
                               (gdouble) BD_RATE;
 
286
 
 
287
        brasero_job_set_rate (BRASERO_JOB (process), current_rate);
 
288
}
 
289
 
263
290
static BraseroBurnResult
264
291
brasero_cdrecord_stdout_read (BraseroProcess *process, const gchar *line)
265
292
{
273
300
        priv = BRASERO_CD_RECORD_PRIVATE (cdrecord);
274
301
 
275
302
        if (sscanf (line, "Track %2u: %d of %d MB written (fifo %d%%) [buf %d%%] %d.%dx.",
276
 
                    &track, &mb_written, &mb_total, &fifo, &buf, &speed_1, &speed_2) == 7) {
277
 
                gdouble current_rate;
278
 
 
279
 
                current_rate = (gdouble) ((gdouble) speed_1 +
280
 
                               (gdouble) speed_2 / 10.0) *
281
 
                               (gdouble) CD_RATE;
282
 
                brasero_job_set_rate (BRASERO_JOB (cdrecord), current_rate);
283
 
 
 
303
                    &track, &mb_written, &mb_total, &fifo, &buf, &speed_1, &speed_2) == 7 ||
 
304
            /* This is for DVD+R */
 
305
            sscanf (line, "Track %2u:    %d of %d MB written (fifo  %d%%) [buf  %d%%] |%*s  %*s|   %d.%dx.",
 
306
                    &track, &mb_written, &mb_total, &fifo, &buf, &speed_1, &speed_2) == 7) {
 
307
 
 
308
                brasero_cdrecord_set_rate (process, speed_1, speed_2);
284
309
                priv->current_track_written = (goffset) mb_written * (goffset) 1048576LL;
285
310
                brasero_cdrecord_compute (cdrecord,
286
311
                                          mb_written,
290
315
                brasero_job_start_progress (BRASERO_JOB (cdrecord), FALSE);
291
316
        } 
292
317
        else if (sscanf (line, "Track %2u:    %d MB written (fifo %d%%) [buf  %d%%]  %d.%dx.",
 
318
                         &track, &mb_written, &fifo, &buf, &speed_1, &speed_2) == 6 ||
 
319
                 sscanf (line, "Track %2u:    %d MB written (fifo %d%%) [buf  %d%%] |%*s  %*s|   %d.%dx.",
293
320
                         &track, &mb_written, &fifo, &buf, &speed_1, &speed_2) == 6) {
294
 
                gdouble current_rate;
295
 
 
296
 
                /* this line is printed when cdrecord writes on the fly */
297
 
                current_rate = (gdouble) ((gdouble) speed_1 +
298
 
                               (gdouble) speed_2 / 10.0) *
299
 
                               (gdouble) CD_RATE;
300
 
                brasero_job_set_rate (BRASERO_JOB (cdrecord), current_rate);
301
 
 
 
321
 
 
322
                                 brasero_cdrecord_set_rate (process, speed_1, speed_2);
302
323
                priv->current_track_written = (goffset) mb_written * (goffset) 1048576LL;
303
324
                if (brasero_job_get_fd_in (BRASERO_JOB (cdrecord), NULL) == BRASERO_BURN_OK) {
304
325
                        goffset bytes = 0;
1417
1438
G_MODULE_EXPORT void
1418
1439
brasero_plugin_check_config (BraseroPlugin *plugin)
1419
1440
{
1420
 
        gint version [3] = { 2, 0, 0};
 
1441
        gint version [3] = { 2, 0, -1};
1421
1442
        brasero_plugin_test_app (plugin,
1422
1443
                                 "cdrecord",
1423
1444
                                 "--version",
1424
 
                                 "Cdrecord-ProDVD-ProBD-Clone %d.%d.%da64 (x86_64-unknown-linux-gnu) Copyright (C) 1995-2009 J�rg Schilling",
 
1445
                                 "Cdrecord-ProDVD-ProBD-Clone %d.%d",
1425
1446
                                 version);
1426
1447
}