--- cxfe/cxfe.c 2004-11-27 03:07:59.000000000 +0100 +++ cxfe-mod/cxfe.c 2005-03-01 23:37:18.394875952 +0100 @@ -476,6 +476,28 @@ percent_done = (ltime/llength)*100; printf("Time:%d sec Length:%d sec \n",ltime/1000,llength/1000); } +static void print_osd_status() +{ + int lpos, ltime, llength; + int percent_done; + + + (void)get_pos_length(cxfe.stream, &lpos, <ime, &llength); + + percent_done = (int)(((double)ltime/(double)llength)*100); + + int cur_hour = ltime/1000/60/60; + int cur_min = (ltime/1000-cur_hour*60*60)/60; + int cur_sec= ltime/1000-cur_hour*60*60-cur_min*60; + + int tot_hour = llength/1000/60/60; + int tot_min = (llength/1000-tot_hour*60*60)/60; + int tot_sec= llength/1000-tot_hour*60*60-tot_min*60; + + osd_display_info("%02d:%02d:%02d / %02d:%02d:%02d (%2d%%)", cur_hour, + cur_min, cur_sec, tot_hour, tot_min, tot_sec, + percent_done); +} #ifdef HAVE_LIBLIRC_CLIENT static void *process_lirc_thread() { @@ -518,6 +540,8 @@ if (!strcmp(c,"Quit")){ running = 0; next_mrl = FALSE;} + if (!strcmp(c,"STATUS")) + print_osd_status(); if (!strcmp(c,"ASPECT_CHANGE")) aspect_change(); if (!strcmp(c,"Menu")) @@ -679,6 +703,10 @@ case 'D': toggle_deinterlace(); break; + case 'o': + case 'O': + print_osd_status(); + break; case 'l': case 13: send_event(XINE_EVENT_INPUT_SELECT); @@ -864,6 +892,10 @@ case XK_M: send_event(XINE_EVENT_INPUT_DOWN); break; + case XK_o: + case XK_O: + print_osd_status(); + break; case XK_Return: send_event(XINE_EVENT_INPUT_SELECT); break;