diff --git a/branches/0.2.2/test/burn.c b/branches/0.2.2/test/burn.c deleted file mode 100644 index a46866d9..00000000 --- a/branches/0.2.2/test/burn.c +++ /dev/null @@ -1,4 +0,0 @@ -int main() -{ - return 0; -} diff --git a/branches/0.2.2/test/master.c b/branches/0.2.2/test/master.c deleted file mode 100644 index 7c0acb43..00000000 --- a/branches/0.2.2/test/master.c +++ /dev/null @@ -1,126 +0,0 @@ -/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */ -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -static struct burn_drive_info *drives; -static unsigned int n_drives; - -void burn_files(struct burn_drive *drive, struct burn_disc *disc) -{ - struct burn_write_opts *o; - enum burn_disc_status s; - - if (!burn_drive_grab(drive, 1)) { - printf("Unable to open the drive!\n"); - return; - } - while (burn_drive_get_status(drive, NULL)) - usleep(1000); - - while ((s = burn_disc_get_status(drive)) == BURN_DISC_UNREADY) - usleep(1000); - - if (s != BURN_DISC_BLANK) { - burn_drive_release(drive, 0); - printf("Please insert blank media in the drive\n"); - return; - } - o = burn_write_opts_new(drive); - burn_drive_set_speed(drive, 0, 2816); - burn_write_opts_set_perform_opc(o, 0); - burn_write_opts_set_write_type(o, BURN_WRITE_TAO, BURN_BLOCK_MODE1); - burn_write_opts_set_simulate(o, 1); -/* want failure on seggy while debugging :) */ - burn_write_opts_set_underrun_proof(o, 0); - burn_structure_print_disc(disc); - burn_disc_write(o, disc); - burn_write_opts_free(o); - - while (burn_drive_get_status(drive, NULL)) { - sleep(1); - } - printf("\n"); - burn_drive_release(drive, 0); - burn_disc_free(disc); -} - -void parse_args(int argc, char **argv, int *drive, struct burn_disc **disc) -{ - int i, tmode = BURN_AUDIO; - int help = 1; - struct burn_session *session; - struct burn_track *tr; - struct burn_source *src; - - *disc = burn_disc_create(); - session = burn_session_create(); - burn_disc_add_session(*disc, session, BURN_POS_END); - for (i = 1; i < argc; ++i) { - if (!strcmp(argv[i], "--drive")) { - ++i; - if (i >= argc) - printf("--drive requires an argument\n"); - else - *drive = atoi(argv[i]); - } else if (!strcmp(argv[i], "--audio")) { - tmode = BURN_AUDIO; - } else if (!strcmp(argv[i], "--data")) { - tmode = BURN_MODE1; - } else if (!strcmp(argv[i], "--verbose")) { - ++i; - if (i >= argc) - printf("--verbose requires an argument\n"); - else - burn_set_verbosity(atoi(argv[i])); - } else if (!strcmp(argv[i], "--help")) { - help = 1; /* who cares */ - } else { - help = 0; - printf("%s is a track\n", argv[i]); - - tr = burn_track_create(); - src = burn_file_source_new(argv[i], NULL); - burn_track_set_source(tr, src); - burn_source_free(src); - burn_track_define_data(tr, 0, 0, 1, tmode); - burn_session_add_track(session, tr, BURN_POS_END); - } - } - if (help) { - printf("Usage: %s [--drive ] [--verbose ] files\n", - argv[0]); - exit(EXIT_FAILURE); - } -} - -int main(int argc, char **argv) -{ - int drive = 0; - struct burn_disc *disc; - - parse_args(argc, argv, &drive, &disc); - printf("Initializing library..."); - if (burn_initialize()) - printf("Success\n"); - else { - printf("Failed\n"); - return 1; - } - - printf("Scanning for devices..."); - while (!burn_drive_scan(&drives, &n_drives)) ; - printf("Done\n"); - - burn_files(drives[drive].drive, disc); - burn_drive_info_free(drives); - burn_finish(); - return 0; -} diff --git a/branches/0.2.2/test/rip.c b/branches/0.2.2/test/rip.c deleted file mode 100644 index 0606cf49..00000000 --- a/branches/0.2.2/test/rip.c +++ /dev/null @@ -1,54 +0,0 @@ -/* THIS IS NOT A PROPER EXAMPLE */ -#include -#include -#include -#include -#include -#include - -#include - -static struct burn_drive_info *drives; -static unsigned int n_drives; - -#warning this example is totally fried -int main() -{ -#if 0 - struct burn_drive *drive; - struct burn_read_opts o; - - burn_initialize(); - o.datafd = - open("/xp/burn/blah.data", O_CREAT | O_WRONLY, - S_IRUSR | S_IWUSR); - o.subfd = - open("/xp/burn/blah.sub", O_CREAT | O_WRONLY, - S_IRUSR | S_IWUSR); - o.raw = 1; - o.c2errors = 0; - o.subcodes_audio = 1; - o.subcodes_data = 1; - o.hardware_error_recovery = 1; - o.report_recovered_errors = 0; - o.transfer_damaged_blocks = 1; - o.hardware_error_retries = 1; - - printf("Scanning for devices..."); - while (!burn_drive_scan(&drives, &n_drives)) ; - printf("Done\n"); - drive = drives[0].drive; - burn_drive_set_speed(drive, 0, 0); - - if (!burn_drive_grab(drive, 1)) { - printf("Unable to open the drive!\n"); - return EXIT_FAILURE; - } - - while (burn_drive_get_status(drive, NULL)) - usleep(1000); - - burn_disc_read(drive, &o); -#endif - return EXIT_SUCCESS; -} diff --git a/branches/0.2.2/test/tree.pyc b/branches/0.2.2/test/tree.pyc deleted file mode 100644 index efc06d94..00000000 Binary files a/branches/0.2.2/test/tree.pyc and /dev/null differ