void * deletefilethread(void* arg) { while(1) { initstruct(); stevedebug("deletefileexpired"); deletefileexpired(); stevedebug("deletefilesizeexceeding"); deletefilesizeexceeding(); sleep(EXECUTE_FREQUENCY); } }
int main(int argc, char *argv[]) { int i; for(i=0;i<10;i++) { initstruct(); stevedebug("deletefileexpired"); deletefileexpired(); stevedebug("deletefilesizeexceeding"); deletefilesizeexceeding(); } return 1; } /* main */
static int preinit(const char *arg) { int id = 0; const opt_t subopts[] = { { "id", OPT_ARG_INT, &id, NULL}, { "mode", OPT_ARG_INT, &smp.buffercount, NULL }, { NULL } }; if (subopt_parse(arg, subopts) != 0) { //mp_msg(MSGT_VO, MSGL_WARN, MSGTR_LIBVO_TGA_UnknownSubdevice, arg); mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_TGA] Unknown subdevice: %s.\n",arg); return ENOSYS; } if (smp.buffercount < 1 || smp.buffercount > 2 || id < 0) { //Todo: check if shm_setting_id exists return -1; } printf("buffercount: %d id: %d\n", smp.buffercount, id); initstruct(&smp); setNames(id, &smp); return 0; }