void xapi_set_videomode(void *d) { int vmode; if (getvidmode() !=0) { remote_printf(413, "cannot change videomode while window is open."); return; } vmode=parsevidoutname(d); if (vmode==0 ) vmode = atoi((char*)d); if (vmode <0) { remote_printf(414, "video mode needs to be a positive integer or 0 for autodetect."); return; } render_fmt = vidoutmode(vmode); remote_printf(100, "setting video mode to %i",getvidmode()); open_window(); // required here; else VOutout callback fn will fail. if (pFrameFMT && current_file) { // reinit buffer with new format char *fn=strdup(current_file); open_movie(fn); free(fn); } else { if(buffer) free(buffer); buffer=NULL; // set videomode to 0 or loop_flag=0? } init_moviebuffer(); force_redraw=1; }
static int oscb_load (const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data){ if (want_verbose) fprintf(stderr, "OSC: %s <- s:%s\n", path, &argv[0]->s); open_movie(&argv[0]->s); init_moviebuffer(); newsourcebuffer(); force_redraw=1; return(0); }
void xapi_open(void *d) { char *fn= (char*)d; //printf("open file: '%s'\n",fn); if ( open_movie(fn)) remote_printf(403, "failed to open file '%s'",fn); else remote_printf(129, "opened file: '%s'",fn); init_moviebuffer(); newsourcebuffer(); force_redraw=1; //display_frame((int64_t)(dispFrame),1); // update screen }