Open mfkl opened 6 years ago
This would feel nice in the .net way, but I see at least 3 strong arguments against that:
Otherwise, for core options (vout...). Like .UseVout("...") and .AddSout(...). That API should be well defined before implementing
- Being complete requires a lot of work
I agree. Maybe only for the core/most used options for now.
- Each time a new plugin is added, a flag is added or modified, your api is broken. the plugins do not follow the libvlc API versions
Ok that's a problem.
- Depending on the libvlc build you are using, different flags might have been used in the configure scripts, disabling some plugins that would be available for other builds.
Sure, but you can make the same argument with regular CLI options. If you pass flags for stuff that's unavailable, whether by CLI or through this syntactic sugar, things will go wrong. This is at the user's discretion, I'm not suggesting we pass defaults that might not always be available.
The link you pasted is misleading : it's the list of the ./configure
command line, which configures the build of vlc (enables plugins...). Wvat we are talking about are runtime flags, right?
For me, the best UX improvement we can provide is with sout : the sout syntax is not very clear for newcomers (including myself).
For me:
The link you pasted is misleading : it's the list of the ./configure
Ops! Fixed.
What we are talking about are runtime flags, right?
Yes.
Those are extensions method for a CliOptionsBuilder. When Build is invoked, a string[] is generated. The initialization method takes a string[] or a CliOptionBuilder to create the libvlc instance
Yep.
When creating a new VLC
Instance
object, we can pass CLI flags to it to configure VLC.To make this more .NET-feel like, I was thinking we could use some kind of
VLCConfiguration
object that would encapsulate those flags (with matching documentation in comments for intellisense) in abuilder pattern
-like fashion, not unlike NServiceBus does it https://gist.github.com/Particular/6107912. It would then fold into an array of strings with the corresponding configuration flags before being marshalled to libvlc.Maybe something like:
@jeremyVignelles thoughts?