[vlc-devel] [PATCH v2 01/24] picture: add helpers for picture chaining

Alexandre Janniaux ajanni at videolabs.io
Sat Sep 19 18:10:52 CEST 2020


Hi,

On Sat, Sep 19, 2020 at 05:34:22PM +0300, Rémi Denis-Courmont wrote:
> Le perjantaina 18. syyskuuta 2020, 17.45.07 EEST Steve Lhomme a écrit :
> > Picture chains are used either to keep a list of picture (in FIFO order) or
> > to attach a picture to another and return them all at once (filters). ---
> >  include/vlc_picture.h | 90 +++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 90 insertions(+)
> >
> > diff --git a/include/vlc_picture.h b/include/vlc_picture.h
> > index 7bb9ee5083c..44fcf6f3cec 100644
> > --- a/include/vlc_picture.h
> > +++ b/include/vlc_picture.h
> > @@ -167,6 +167,96 @@ static inline vlc_video_context*
> > picture_GetVideoContext(picture_t *pic) return pic->context ?
> > pic->context->vctx : NULL;
> >  }
> >
> > +/**
> > + * picture chaining helpers
> > + */
> > +
> > +/**
> > + * Check whether a picture has other pictures linked
> > + */
> > +static inline bool picture_has_chained_pics(const picture_t *pic)
> > +{
> > +    return chain->p_next != NULL;
> > +}
>
> TBH, I have mixed feelings about the style.
>
> In principles, I prefer lower-case and underscore. But in VLC, the habit is to
> capitalise the verb - unless the function is named after some non-VLC
> function.

Likewise, and as a simple resolution I'd suggest to use the
same naming as the equivalent block_t API to keep consistency
if that's fine with you.

Not a blocker since it can easily be replaced now, but would
be nicer to have.

Regards,
--
Alexandre Janniaux
Videolabs


More information about the vlc-devel mailing list