Migrating from command line to API initialization

This forum is about all development around libVLC.
ivee
New Cone
New Cone
Posts: 6
Joined: 15 Dec 2016 13:30

Migrating from command line to API initialization

Postby ivee » 10 Mar 2017 12:40

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!

ryantheseer
Blank Cone
Blank Cone
Posts: 15
Joined: 16 Feb 2017 20:19

Re: Migrating from command line to API initialization

Postby ryantheseer » 10 Mar 2017 17:46

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Migrating from command line to API initialization

Postby Rémi Denis-Courmont » 10 Mar 2017 18:12

The guideline is to use 0 as argc and either NULL, or (more pedantic) a pointer to NULL, as argv.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

ivee
New Cone
New Cone
Posts: 6
Joined: 15 Dec 2016 13:30

Re: Migrating from command line to API initialization

Postby ivee » 29 Mar 2017 15:41

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


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 7 guests