[vlc-devel] [V2 09/16] input: Move attachment to input_item_t

Hugo Beauzée-Luyssen hugo at beauzee.fr
Mon Nov 16 11:13:50 CET 2020


Hi,

On Fri, Nov 13, 2020, at 7:40 PM, Rémi Denis-Courmont wrote:
> Le vendredi 13 novembre 2020, 12:27:25 EET Hugo Beauzée-Luyssen a écrit :
> > ---
> >  include/vlc_input_item.h   |  3 +++
> >  src/input/input.c          | 33 +++++++++++++--------------------
> >  src/input/input_internal.h |  4 ----
> >  src/input/item.c           |  5 +++++
> >  4 files changed, 21 insertions(+), 24 deletions(-)
> 
> I think it was intentional to track attachment in the input rather than the 
> item. Indeed, they can be (comparatively) large, and we really should not 
> track many of them in memory at the same time.
> 

It definitely seem that it was meant to be tracked in the input. However it seems to me like it belongs more in the input_item since that's what embeds the attachments, especially since we lock the input_item lock when accessing the attachment 
I can live with keeping it in the input_item, but AFAIK it would mean exposing the attachments through libvlc media player, which is counter intuitive to me.

I don't understand the argument about the memory footprint, it's allocated and held by the demux in any cases.

> There is also the general problem that input items are writable, and thus ill-
> suited to refer to reference-counted objects.
> 

I don't understand that point


-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr


More information about the vlc-devel mailing list