[vlc-devel] [PATCH 0/2] Libvlc formatted log callback
remi at remlab.net
Mon May 20 14:03:03 CEST 2019
I don't see how passing va_list to whatever is the appropriate formatting function for your logging system, is a PITA.
Certainly, implementing printf() by hand is a PITA, but why the heck would you do that??
Le 20 mai 2019 10:41:07 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>On 2019-05-19 8:32, Rémi Denis-Courmont wrote:
>> Le lauantaina 18. toukokuuta 2019, 23.12.30 EEST Jeremy Vignelles a
>>> Hi Rémi,
>>> Thanks for your review.
>>>> Le 18 mai 2019 à 09:18, Rémi Denis-Courmont <remi at remlab.net> a
>>>> Le perjantaina 17. toukokuuta 2019, 11.04.59 EEST Jérémy VIGNELLES
>>>>> In libvlc, there is currently a `libvlc_log_set` function, that
>>>>> register log callback in a vprintf style, that is, with a
>>>>> This is nice when you are trying to call from C, but when using
>>>>> languages like C# or Java, va_list is impossible to get right, and
>>>>> it did, those languages do not provide ways to format that kind of
>>>> We already tried to adapt to foreign function interfaces and
>>>> realized that the FFI just could not handle it across the broad set
>>>> platforms that VLC supports.
>>>> Then we took the logical decision going forward: to reject that
>>> As of today, every libvlc API that made sense to expose are
>>> LibVLCSharp, with the only exception of that specific logging API. I
>>> know if there is something missing for other languages on specific
>>> but as far as .net is concerned, the other functions are correctly
>> And? The point is, we decided to *stop* vainly trying to support the
>> DllImport natively, because we want char, bool, size_t, va_list, etc.
>> becausewe found out that it ws anyway not possible to import LibVLC
>> platform-specific code even if the type system were watered-down.
>I followed the conversation and still don't understand why it's wrong
>replace a "format string + va_list" by a "formatted string" in the API.
>Even in C handling a va_list is a PITA. If you want to peek into it,
>need to copy it. Let alone the typing of the variables in the va_list.
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vlc-devel