views:

75

answers:

1

Well i have an adobe air which runs vlc-player at background as service. i check that in Windows Task Manager , the service runs when air application launches. here is the code

    processArgs.push("--extraintf");
 processArgs.push("rc"); //Remote control
 processArgs.push("--rc-fake-tty"); //Use terminal as output
 processArgs.push("screen://");
    processArgs.push(":screen-fps=15");
    processArgs.push(":screen-caching=100");
    processArgs.push(":sout=#transcode{venc=x264{bframes=0,nocabac,ref=1,nf,level=13,crf=24,partitions=none},vcodec=h264,fps=15,vb=3000,width=800,height=600,acodec=none}:duplicate{dst=std{mux=mp4,access=file,dst='"+targetFile.nativePath+"'}}");
    startupInfo.arguments = processArgs;

 p = new NativeProcess();
 p.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData);
 p.addEventListener(ProgressEvent.STANDARD_ERROR_DATA, onErrorData);
 p.addEventListener(NativeProcessExitEvent.EXIT, onExit);

now i want to close vlc-player on the button click event and i have searched the vlc- documents and found quit command and its syntax, it does not work as i have tried that syntax from windows command prompt also.. Which are the vlc-player commands that can pause,stop and close vlc-player?? Any useful link will be much helpful to me..

A: 

I've had quite a look around and looks like this (--rc-fake-tty) can't be done from Windows command line. Which means your current approach is out.

I don't no anything about Adobe but I have done some searching around and this guy has something written in C using the libVLC. Not sure if that will help or point you in the right direction.

The other thing I found was this post Adobe Air and VLC player which mentions that you should be able to use javascript and ActiveX controls on Windows. A guy in this forum has a javascript script which uses an ActiveX control to start, stop, pause etc.

There is a VLC command that you can send to override or set certain hotkeys. Search for next, prev, stop, quit, vol-up, etc in this document.

That's the best of my Googling abilities, hope it helps.

xiaohouzi79
The Forum link will work for me but not for client as it uses Salling Clicker Software and that does not work on Linux whereas vlc player and air app can run on any platform..Anyway your help is appreciated.
Muhammad Irfan
Well the above cod works fine if i commment first three lines of codes //processArgs.push("--extraintf"); //processArgs.push("rc"); //processArgs.push("--rc-fake-tty"); And commenting these statements will show vlc-player interface and screen-capturing can be paused, stopped from Vlc-player buttons.But I dont want to show vlc-player interface , it should work as service and it does in above code but it justs not stop with stop command..
Muhammad Irfan