[Mplayerplug-in-devel] QT Playlist + vopopt
Brought to you by:
kdekorte
From: Don E. <des...@ea...> - 2003-03-27 18:44:29
|
The diffs below show changes I made to the 3/11/03 version of mplayerplug-in.c. Don Estberg 1. Changes to handle "qtnext" parameters, which are used to specify a QuickTime playlist of clips. My goal was to handle only the case that I know exists and can test; hopefully by doing this, nothing that worked before will break. 88,89d86 < uint32 nQtNext; < char* qtNext[256]; 214d209 < char* cp; 237d231 < This->nQtNext=0; 442,461d427 < if(This->nQtNext<256 && (strncasecmp(argn[i],"qtnext",6) == 0) && argv[i][0]=='<') { < sprintf(parse,"%s",strtok(&argv[i][1],">")); < if ( (cp=strchr(parse,' ')) && strlen(parse)==cp-parse+1 ) < *cp = (char)NULL; < This->qtNext[This->nQtNext++] = strdup(parse); < sprintf(parse,"%s",strtok(NULL,"<")); < if (strcmp(parse, "T")) { < if (DEBUG) < fprintf(This->logfp,"qtNext%i expected \"T\" found \"%s\"\n",This->nQtNext,parse); < This->nQtNext--; < } else { < sprintf(parse,"%s",strtok(NULL,">\n")); < if (strcmp(parse, "myself")) { < if (DEBUG) < fprintf(This->logfp,"qtNext%i expected \"myself\" found \"%s\"\n",This->nQtNext,parse); < This->nQtNext--; < } else if (DEBUG) < fprintf(This->logfp,"qtNext%i=%s\n",This->nQtNext,This->qtNext[This->nQtNext-1]); < } < } 865c831 < int pid,ret, i, j; --- > int pid,ret, i; 1093,1094d1054 < for (j=0; j < This->nQtNext; j++) < argv[i++] = strdup(This->qtNext[j]); 2. Changes to generalize the novop option, so that a specific "vopopt" can be specified. The specific value I use is "scale=1024:768" (software scaling), and I use "scale=" to indicate that full screen option, -fs, should be used (there might be a better way, but this works since you can toggle full screen manually). 83d82 < char* vopopt; 213d209 < char vopopt[100]; 272d265 < This->vopopt=NULL; 313,319d305 < < if ( strncasecmp(buffer,"vopopt",6) == 0) { < sprintf(parse,"%s",strtok(buffer,"=")); < sprintf(vopopt,"%s",strtok(NULL,"\n")); < This->vopopt=strdup(vopopt); < continue; < } 867c833 < char wval[32],xval[32],yval[32],yval2[32],video[1000], cacheval[1000], vop[120]; --- > char wval[32],xval[32],yval[32],yval2[32],video[1000], cacheval[1000]; 1011,1012c976 < argv[i++] = "-vop"; < argv[i++] = This->vopopt ? strdup(This->vopopt) : "null"; --- > argv[i++] = "-vop null"; 1052,1053d1015 < } else if (strncmp(This->vopopt,"scale=",6)==0) { < argv[i++] = "-fs"; 3. Minor changes to improve the DEBUG output. 921a888 > if (DEBUG) fflush(This->logfp); 935d901 < if (DEBUG) fflush(This->logfp); 955d920 < if (DEBUG) fflush(This->logfp); 1100d1059 < fprintf(This->logfp,"argv[%i]=%s\n",i,argv[i]); 1102d1060 < fflush(This->logfp); 1141,1148c1099,1100 < wait(&status); < if (DEBUG) { < fprintf(This->logfp,"\n---- Woke up from wait ----\n"); < if (WIFEXITED(status)) < fprintf(This->logfp,"Exit status %d\n", WEXITSTATUS(status)); < if (WIFSIGNALED(status)) < fprintf(This->logfp,"Termination signal %d\n", WTERMSIG(status)); < } --- > wait(0); > if (DEBUG) fprintf(This->logfp,"\n---- Woke up from wait ----\n"); |