[vlc-devel] [PATCH] demux: json: add json_reader context

Francois Cartegnie fcvlcdev at free.fr
Wed Oct 21 14:47:24 CEST 2020


Le 14/10/2020 à 19:38, Rémi Denis-Courmont a écrit :
>>>> -size_t json_read(void *data, void *buf, size_t max);
>>>> -void json_parse_error(void *log, const char *msg);
>>>> +struct json_reader {
>>>> +    void *priv;
>>>> +    ssize_t (*read)(void *, void *, size_t);
>>>> +    void (*logger)(void *, const struct json_object *, const char *);
>>>> +};
>>>
>>> I don't see the point in having a log callback. The VLC logger is already
>>> essentially a log callback by itself. We don't need two indirection
>>> layers.

Not having another indirection means to have includes inside gammar code
to perform vlc_error() on the log callback.

-- 
Francois Cartegnie
VideoLAN - VLC Developer


More information about the vlc-devel mailing list