[MPlayer-cygwin] usage of -wid on windows
Sascha Sommer
saschasommer at freenet.de
Thu Apr 28 07:07:26 CEST 2005
Hi,
> > what output do you get? (add a -v to the args)
>
> The crashing was a separate issue, and a red herring. But regardless, I'm
> still not getting anywhere with getting "-wid" working. So so you know if
> I'm using the cmd line argument correctly, passing it the right ID? After a
> bit of stuffing around to get the output, it looks like one of my big
> symptoms is some failure in the directx vo code:
>
> <vo_directx><FATAL ERROR>could not set cooperativelevel for hardwarecheck
>
> Below are the output of
> HWND myWindow;
> ...
> char *cmd_name="d:\\home\\nicholas\\src\\MPlayer-1.0pre7\\mplayer.exe";
> char *args[6]; // null terminated array
> char buf[200];
>
> LONG wid = GetWindowLong(myWindow,GWL_ID);
> sprintf(buf,"%ld",wid);
>
> args[0]="mplayer.exe";
> args[1]="-v";
> args[2]="-wid";
> args[3]=buf;
> args[4]="D:\\home\\nicholas\\mpeg\\VTS_02_1.mpg";
> args[5]=NULL;
> pid = spawnv(_P_NOWAIT,cmd_name,args);
>
> and
>
> ~/src/MPlayer-1.0pre7/mplayer.exe -v ~/mpeg/VTS_02_1.mpg
>
> respectively.
>
> Thanks for your help,
>
> Nick
>
>
> CommandLine: '-v' '-wid' '91096333' 'D:\home\nicholas\mpeg\VTS_02_1.mpg'
As you can see the window handle gets detected as extra argument.
Try
sprintf(buf,"-wid 0x%x",wid);
Sascha
More information about the MPlayer-cygwin
mailing list