[vlc-devel] [V3 00/13] Expose picture attachment through libvlc

Hugo Beauzée-Luyssen hugo at beauzee.fr
Wed Nov 18 15:23:46 CET 2020


This patchset aims at exposing picture attachments (at least) to users 
through libvlc.
This is initially motivated by the fact that we need to be able to
handle various tracks belonging to the same album, but with different
embedded artwork.
Currently, VLC will cache embedded artworks as they are found in
cachefolder/artist/date/album meaning that the first track artwork 
will be cached, and later ones will be considered already cached, even
though they are different.

Additionally, this introduces refcounting to the attachments, allowing
us to save a deep copy every time the attachments are fetched. This
could also allow us to fetch attachments using a unique identifier
instead of their names, as the name unicity is currently no guaranteed

Changes in v3:
* Keep attachments in the input rather than the input item
* Expose the attachments to libvlc users through an event rather than 
  a getter

Changes in v2:
* Add missing doc
* Use a dedicated libvlc_picture_list_t to expose a libvlc_picture_t
  list

Hugo Beauzée-Luyssen (13):
  input: Move attachment functions in their own source file
  input: attachment: Add a private structure
  input: Refcount attachments
  mkv: Use input_attachment_t directly
  mp4: Extract attachments upon first request
  input: Simplify AppendAttachment prototype
  input: Compare attachments themselves when updating them
  input: Remove now unused attachment_demux
  input: Fix missing mutex unlock on error path
  lib: Allow a picture to be constructed from an attachment
  lib: Add a minimal picture list API
  input: Emit an event when new attachments are found
  lib: Expose a new libvlc_MediaAttachedThumbnailsFound event

 include/vlc/libvlc_events.h                  |   5 +
 include/vlc/libvlc_picture.h                 |  22 ++++
 include/vlc_demux.h                          |   8 +-
 include/vlc_events.h                         |   8 +-
 include/vlc_input.h                          |  49 ++-------
 lib/libvlc.sym                               |   3 +
 lib/media.c                                  |  29 +++++
 lib/picture.c                                | 105 +++++++++++++++++++
 lib/picture_internal.h                       |   3 +
 modules/access/bluray.c                      |   6 +-
 modules/codec/libass.c                       |   2 +-
 modules/codec/subsusf.c                      |   2 +-
 modules/demux/avformat/demux.c               |   6 +-
 modules/demux/avi/avi.c                      |   4 +-
 modules/demux/flac.c                         |   4 +-
 modules/demux/mkv/demux.cpp                  |   2 -
 modules/demux/mkv/demux.hpp                  |   5 +-
 modules/demux/mkv/matroska_segment_parse.cpp |  37 +++----
 modules/demux/mkv/mkv.cpp                    |   9 +-
 modules/demux/mkv/mkv.hpp                    |  30 ------
 modules/demux/mp4/attachments.c              |   5 +-
 modules/demux/mp4/attachments.h              |   2 +-
 modules/demux/mp4/mp4.c                      |  20 +++-
 modules/demux/mpeg/ts.c                      |   4 +-
 modules/demux/ogg.c                          |   4 +-
 modules/text_renderer/freetype/freetype.c    |   8 +-
 src/Makefile.am                              |   1 +
 src/input/access.c                           |   2 +-
 src/input/attachment.c                       |  90 ++++++++++++++++
 src/input/input.c                            |  92 ++++++++--------
 src/input/input_internal.h                   |   1 -
 src/input/meta.c                             |   2 +-
 src/input/stream_memory.c                    |   2 +-
 src/libvlccore.sym                           |   3 +
 34 files changed, 389 insertions(+), 186 deletions(-)
 create mode 100644 src/input/attachment.c

-- 
2.29.2



More information about the vlc-devel mailing list