[MPlayer-cygwin] usage of -wid on windows

Rune Petersen rune at megahurts.dk
Thu Apr 28 04:38:08 CEST 2005


Hi,

what output do you get? (add a -v to the args)


Rune Petersen

nick at savs.net wrote:
> Hi,
> 
> I'm trying to get cygwin MPlayer to render video on another window (that of a win32 app that spawns mplayer), but I don't think I've got the usage of the -wid option correct.
> 
> intptr_t pid;
> char *cmd_name="d:\\home\\nicholas\\src\\MPlayer-1.0pre7\\mplayer.exe";
> char *args[5]; // null terminated array
> char buf[100];
> 
> LONG wid = GetWindowLong(myWindow,GWL_ID);
> sprintf(buf,"%ld",wid);
> //sprintf(buf,"%x",wid);
> //sprintf(buf,"0x%x",wid);
> 
> args[0]="mplayer.exe";
> args[1]="-wid";
> args[2]=buf;
> args[3]="D:\\home\\nicholas\\mpeg\\VTS_02_1.mpg";
> args[4]=NULL;
> pid = spawnv(_P_WAIT,cmd_name,args);
> 
> It is using the directx vo. mplayer.exe dies with an applciation error saying "The instruction at "0xblahblah" referenced memory at "0x00000010". The memory could not be "read". Is it obvious what I'm doing wrong, or are there any preconditions or assumptions that aren't documented? Googling doesn't seem to help in that regard at all.




More information about the MPlayer-cygwin mailing list