On Tue, 12 Jan 2016 15:28:24 +0100 Anton Khirnov <[email protected]> wrote:
> Quoting wm4 (2016-01-12 12:04:22) > > On Tue, 12 Jan 2016 10:26:21 +0100 > > Anton Khirnov <[email protected]> wrote: > > > > > This is properly namespaced and consistent with the naming in the rest > > > of Libav. Also, add a constructor for this struct. > > > +} AVVAAPIContext; > > > + > > > +/** > > > + * Allocate and initialize a new context. When no longer needed, it must > > > be > > > + * freed by the caller using av_free(). > > > + */ > > > +AVVAAPIContext *av_vaapi_context_alloc(void); > > > > > > > Maybe we should arrive at a consistent way to do this for hwaccels in > > general, instead of changing the API over an over? > > > > There already is a semi-consistent way -- in get_buffer() you allocate You mean get_format? (This is probably also completely undocumented...) > the format-specific hwaccel struct (using the constructor in the > corresponding header) and fill it. Since the specific details of how > exactly it's filled are format specific, I don't see an obvious way to > improve this. Sure, but even so these step-wise improvements can be rather painful downstreams. This change in particular would make it rather uncomfortable to support multiple libavcodec versions at once, without having any real gain (yet). > > I for one can't tell when this has to be called, where the resulting > > pointer has to be set, and when/how it has to be deallocated. (I could > > look at my own vaapi client code, I'm sure it'd come back to me. But it > > doesn't help anyone who is new to this.) > > > > And it's the same (with subtle differences) for most other hwaccels. > > Yes it is, which is why if any new docs are added, they should be in a > generic place, not specific to one given hwaccel. > _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
