[vlc] 答复: VLC script

Nikhil Agrawal mrnikhilagrawal at gmail.com
Thu Mar 6 07:16:08 CET 2008


Hi Luzyano,

In C++, try following code...it will initiate vlc player and close vlc
player after some time. You need to update request URL as per your
requirements...

SHELLEXECUTEINFO *lpExecInfo = new SHELLEXECUTEINFO();
    memset(lpExecInfo, '\0', sizeof(SHELLEXECUTEINFO));
    lpExecInfo->cbSize            = sizeof(SHELLEXECUTEINFO);
    lpExecInfo->dwHotKey        = 0;
    lpExecInfo->fMask            = SEE_MASK_FLAG_NO_UI |
SEE_MASK_NOCLOSEPROCESS;
    lpExecInfo->lpFile            = aszVLCInstallPath; //Complete path where
vlc.exe resides
    lpExecInfo->lpParameters    = aszRequestURL; //Request URL
    lpExecInfo->lpVerb            = "Open";
    lpExecInfo->nShow            = 0; //to hide vlc player UI

    //Execute Shell
    ShellExecuteEx(lpExecInfo);

Sleep(nTimeOut); //time you want to wait

    TerminateProcess(lpExecInfo->hProcess, 0);
    CloseHandle(lpExecInfo->hProcess);

Here Request URL  i gave was rtsp://192.168.xxx.yyy/Filename.wav , you can
include all possible options in this URL

After this when you want to kill vlc player, just use same lpExecInfo
structure's handle to process

There is one more solution for this. You can embedd axvlc activex control in
your vc or VB application. there you will have all the control on vlc and
control to start stop and do everything with vlc.

Regards,
Nikhil Agrawal

On 3/5/08, Ke Tao <kotao78 at gmail.com> wrote:
>
>   HI Silux,
>
>
>
> Check ./vlc –longhelp.
>
>
>
> If you have any queries ,please feel free to contact me.
>
>
>
> Best Regards,
>
> Ke Tao
>
> E-mail:ke.tao78 at gmail.com
>
> Mobile:13085800364
>   ------------------------------
>
> *发件人:* vlc-bounces at videolan.org [mailto:vlc-bounces at videolan.org] *代表 *luzyano
> silux
> *发送时间:* 2008年3月5日 9:57
> *收件人:* vlc list
> *主题:* [vlc] VLC script
>
>
>
> Hi All,
>
>
>
> Does anybody has a script to start, stop and restart vlc as a daemon?
>
>
>
> For example:
>
>
>
> #vlc_script {start | stop | restart}
>
>
>
> The idea is to avoid the manual process, i mean to kill vlc and then start
> it again, this should be done automatically.
>
>
>
> Thanks and regards,
>
> Silux
>
>
>  ------------------------------
>
>
> ¡Capacidad ilimitada de almacenamiento en tu correo!
> No te preocupes más por el espacio de tu cuenta con Correo Yahoo!:
> http://correo.yahoo.com.mx/
>
> ______________________________________________________
> vlc mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc/attachments/20080306/1cedebc9/attachment.html>


More information about the vlc mailing list