14 Dec 2021, 02:13 by c...@passwd.hu: > > > On Tue, 7 Dec 2021, James Almer wrote: > > I would like to attach some extendable, possibly per-channel metadata to the > channel layout. I'd rather put it into AVChannelLayout, so native layouts > could also have metadata. This must be dynamically allocated to make it > extendable and to not consume too many bytes. I can accept that it will be > slow. But I don't see it unmanagable, because AVChannelLayout already have > functions for allocation/free/copy. I also think that most of the time it > will not be used (e.g. if metadata is NULL, that can mean no metadata for all > the channels). > > If we can't decide what this should be, array of AVDictionaries, some > side-data like approach but in the channel layout, or a new dynamically > allocated AVChannelLayoutMetadata struct, then maybe just reserve a void* in > the end of the AVChannelLayout, and we can work it out later. >
The idea to use opaque indices is IMO better. You can store any metadata you want into the frame->opaque(_buf) field, and it'll be completely copied of av_frame_ref(). If we go for an opaque pointer, I'd like for it to be copied (by value, not data) into any ref'd frames. I'd prefer an opaque field over an opaque metadata field. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".