Some random fixes here and there. There is no more name_find or name_set use.
This commit is contained in:
@@ -8,7 +8,8 @@ struct Burn_Data
|
||||
BurnSession *session;
|
||||
Eina_List *sources;
|
||||
Eina_List *tracks;
|
||||
Ecdb_Project *proj;
|
||||
Ecdb_Project *proj;
|
||||
Ecdb_Page *page;
|
||||
};
|
||||
|
||||
int ecdb_burn_finished(void *data, int type, void *event);
|
||||
@@ -19,7 +20,7 @@ void ecdb_sources_list_free(Eina_List *list);
|
||||
void ecdb_tracks_list_free(Eina_List *list);
|
||||
|
||||
int
|
||||
ecdb_burn_project(Ecdb_Burn_Project *proj)
|
||||
ecdb_burn_project(Ecdb_Burn_Project *proj, Ecdb_Page *page)
|
||||
{
|
||||
char reasons[BURN_REASONS_LEN];
|
||||
int padding, i;
|
||||
@@ -36,7 +37,8 @@ ecdb_burn_project(Ecdb_Burn_Project *proj)
|
||||
printf("Error: Cannot create burn data structure!\n");
|
||||
return FALSE;
|
||||
}
|
||||
data->proj = ECDB_PROJECT(proj);
|
||||
data->proj = ECDB_PROJECT(proj);
|
||||
data->page = page;
|
||||
|
||||
if (proj->burn_mode != BURN_AUDIO)
|
||||
padding = 300*1024;
|
||||
@@ -105,7 +107,7 @@ ecdb_burn_project(Ecdb_Burn_Project *proj)
|
||||
burn_write_opts_free(opts);
|
||||
|
||||
printf("Disc now burning\n");
|
||||
ECDB_PROJECT(proj)->pipe = ecore_pipe_add(ecdb_burn_progress_handler, proj);
|
||||
ECDB_PROJECT(proj)->pipe = ecore_pipe_add(ecdb_burn_progress_handler, data);
|
||||
pthread_create(&progress_update, NULL, ecdb_drive_progress_update, proj);
|
||||
pthread_detach(progress_update);
|
||||
ECDB_PROJECT(proj)->ev_handler = ecore_event_handler_add
|
||||
@@ -156,7 +158,8 @@ static void
|
||||
ecdb_burn_progress_handler(void *data, void *buffer, unsigned int nbyte)
|
||||
{
|
||||
BurnProgress *p;
|
||||
Evas_Object *swallow;
|
||||
Evas_Object *swallow;
|
||||
Burn_Data *bdata;
|
||||
static int last_sector = 0;
|
||||
int percent;
|
||||
Edje_Message_Int_Set *progress_msg;
|
||||
@@ -186,11 +189,40 @@ ecdb_burn_progress_handler(void *data, void *buffer, unsigned int nbyte)
|
||||
else
|
||||
{
|
||||
last_sector = p->sectors;
|
||||
}
|
||||
|
||||
bdata = data;
|
||||
if (!bdata)
|
||||
{
|
||||
printf("ecdb_burn_progress_handler: NULL bdata!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if ((!bdata->page) || (!bdata->proj))
|
||||
{
|
||||
printf("ecdb_burn_progress_handler: NULL page or proj!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (proj->type)
|
||||
{
|
||||
case ECDB_AUDIO_PROJECT:
|
||||
swallow = page->audio;
|
||||
break;
|
||||
|
||||
case: ECDB_DATA_PROJECT:
|
||||
swallow = page->data;
|
||||
break;
|
||||
|
||||
case: ECDB_IMAGE_PROJECT:
|
||||
swallow = page->image;
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("ecdb_burn_progress_handler: Unrecognized project type!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
swallow = evas_object_name_find(ecore_evas_get(em->main_win_ee),
|
||||
"burn_image_page");
|
||||
|
||||
percent = (int)((double)(last_sector + 1) / (double)p->sectors * 100.0);
|
||||
if (percent >= 100)
|
||||
{
|
||||
@@ -230,23 +262,28 @@ ecdb_burn_finished(void *data, int type, void *event)
|
||||
burn_drive_info_free(proj->proj->drive->tangible);
|
||||
printf("Burn Complete\n");
|
||||
|
||||
ecore_event_handler_del(proj->proj->ev_handler);
|
||||
ecore_pipe_del(proj->proj->pipe);
|
||||
ecore_event_handler_del(proj->proj->ev_handler);
|
||||
proj->proj->ev_handler = NULL;
|
||||
ecore_pipe_del(proj->proj->pipe);
|
||||
proj->proj->pipe = NULL;
|
||||
|
||||
switch (proj->proj->type)
|
||||
{
|
||||
case ECDB_AUDIO_PROJECT:
|
||||
ecdb_audio_project_destroy(ECDB_AUDIO(proj->proj));
|
||||
case ECDB_AUDIO_PROJECT:
|
||||
print("How in the world did you get here?\n");
|
||||
//ecdb_burn_audio_cleanup(proj->page);
|
||||
break;
|
||||
|
||||
case ECDB_BURN_PROJECT:
|
||||
ecdb_burn_data_cleanup(ECDB_BURN(proj->proj));
|
||||
ecdb_burn_project_destroy(ECDB_BURN(proj->proj));
|
||||
ecdb_burn_data_cleanup(proj->page);
|
||||
break;
|
||||
|
||||
case ECDB_IMAGE_PROJECT:
|
||||
ecdb_burn_image_cleanup();
|
||||
ecdb_burn_project_destroy(ECDB_BURN(proj->proj));
|
||||
ecdb_burn_image_cleanup(proj->page);
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("ecdb_burn_finished: unknown project type!\n");
|
||||
}
|
||||
FREE(proj);
|
||||
|
||||
|
Reference in New Issue
Block a user