[vlc-devel] Re: a new command line option

Sigmund Augdal sigmunau at stud.ntnu.no
Mon Aug 11 21:31:00 CEST 2003


On Mon, Aug 11, 2003 at 04:26:09PM -0300, Ariel Fritz wrote:
> On Monday 11 August 2003 15:42, you wrote:
> > On Mon, Aug 11, 2003 at 03:28:31PM -0300, Ariel Fritz wrote:
> > > On Monday 11 August 2003 15:00, you wrote:
> > > > On Mon, Aug 11, 2003 at 02:51:24PM -0300, Ariel Fritz wrote:
> > > > > On Monday 11 August 2003 14:30, you wrote:
> > > > > > > I'd like to know how can I add a new argument for vlc. I mean, If
> > > > > > > I want to send a new command line argument what do I have to add
> > > > > > > in the src code of vlc?
> > > > > >
> > > > > > Hello,
> > > > > >
> > > > > > If your option is specific to a module, then you can do
> > > > > > this by adding : add_'type of option'(;......) in the
> > > > > > vlc_module_begin()...vlc_module_end() block.
> > > > > >
> > > > > > You then get the value with config_GetType...
> > > > > >
> > > > > > For a global one, you will have to add the same command add_foo, in
> > > > > > src/libvlc.h
> > > > >
> > > > > Thanks for information..
> > > > >
> > > > > For example.. If I want to send an argument that it can be used as an
> > > > > integer
> > > > >
> > > > > vlc --3
> > > > >
> > > > > How can I add it?
> > > >
> > > > You don't. Use vlc --myoption=3. This is done with
> > > > add_integer( "myoption", 2 /* the default value */, NULL /* a callback
> > > > function */, "short description", "A rather long and descriptive
> > > > description", VLC_TRUE /* this is an advanced option */ );
> > > >
> > > > you could get the value of this command line option with
> > > > config_GetInt( p_vlc, "myoption" );
> > > >
> > > > The option will also appear in the configuration dialog automagically
> > > >
> > > > Sigmund
> > >
> > > Ok I understood it, but ... Where do I have to add_integer(.....) line?
> >
> > Take a look in src/libvlc.h and you will get the idea.
> 
> Thank a lot It worked very well !!!
Just out of curiosity, may I ask what you were trying to do?

Sigmund
-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list