[vlc-devel] Re: How to use vlc_execve() ?

Christophe Massiot massiot at via.ecp.fr
Mon Sep 26 00:45:49 CEST 2005


At 21:16 +0200 25/09/05, Pierre-Hugues PERET wrote:
>Hello !
>Again, another problem : i want to launch an external file (non 
>video) from vlc. I ended up on the execve() function which is what i 
>seem to need.
>But i don't know how to use it , the standard use is 
>execve(filename, argv, envp) , the corresponding function in vlc is
>vlc_execve( 
><http://developers.videolan.org/vlc/vlc/doc/doxygen/html/structvlc__object__t.html>vlc_object_t 
>*  p_object,
><http://developers.videolan.org/vlc/vlc/doc/doxygen/html/ffmpeg_8h.html#a73>int  
>i_argc,
>char **  pp_argv,
>char **  pp_env,
>char *  psz_cwd,
>char *  p_in,
><http://developers.videolan.org/vlc/vlc/doc/doxygen/html/ffmpeg_8h.html#a73>int  
>i_in,
>char **  pp_data,
><http://developers.videolan.org/vlc/vlc/doc/doxygen/html/ffmpeg_8h.html#a73>int 
>*  pi_data
>)
>
>if i want to launch my browser with www.videolan.org adress, what is 
>the correct call to the vlc_execve function ?

Have a look at the HTTP module which uses it. argc, argv are the 
arguments of your program (argv[0] being your program), pp_env is an 
array of the environment variables, psz_cwd is the current working 
directory which should be used to start the program, p_in is a buffer 
of length i_in which will be supplied to the program as its standard 
input, and its standard output will be stored in pp_data and its 
length will be stored in pi_data.

-- 
Christophe Massiot.

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list