Page 1 of 1

Migrating from command line to API initialization

Posted: 10 Mar 2017 12:40
by ivee
libvlc_new() function has the following statement concerning the use of command line arguments
There is absolutely no warranty or promise of forward, backward and cross-platform compatibility with regards to libvlc_new() arguments. We recommend that you do not use them, other than when debugging.
But there are no guidelines on how to initialize libvlc instance using API.
For example to turn off the auto detection of subtitles "--no-sub-autodetect-file" is used. But how to the same thing and many other things using API?

Thanks!

Re: Migrating from command line to API initialization

Posted: 10 Mar 2017 17:46
by ryantheseer
Every time a new version of LibVLC is released, you would have to do regression tests to make sure your command-line arguments are still functional.

Re: Migrating from command line to API initialization

Posted: 10 Mar 2017 18:12
by RĂ©mi Denis-Courmont
The guideline is to use 0 as argc and either NULL, or (more pedantic) a pointer to NULL, as argv.

Re: Migrating from command line to API initialization

Posted: 29 Mar 2017 15:41
by ivee
The guideline is to use 0 as argc and either NULL, or (more pedantic) a pointer to NULL, as argv.
Yes.
Thanks.
But is there an easier way to find a way to do with api whatever command line argument does?
For example it is really hard to repeat using api the thing that "--no-sub-autodetect-file" is doing