[vlc-devel] [V2 00/16] Expose picture attachment through libvlc

Hugo Beauzée-Luyssen hugo at beauzee.fr
Fri Nov 13 11:27:16 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 v2:
* Add missing doc
* Use a dedicated libvlc_picture_list_t to expose a libvlc_picture_t
  list

Hugo Beauzée-Luyssen (16):
  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: Move attachment to input_item_t
  input: Fix missing mutex unlock on error path
  input: Manage attachment through the item
  input: Rename input_attachment_t to input_item_attachment_t
  core: Expose input_item_GetAttachments
  lib: Allow a picture to be constructed from an attachment
  lib: Add a minimal picture list API
  lib: media: Expose attached pictures

 include/vlc/libvlc_media.h                    |  11 ++
 include/vlc/libvlc_picture.h                  |  22 +++
 include/vlc_codec.h                           |   4 +-
 include/vlc_common.h                          |   2 +-
 include/vlc_demux.h                           |  10 +-
 include/vlc_filter.h                          |   4 +-
 include/vlc_input.h                           |  51 +------
 include/vlc_input_item.h                      |  18 +++
 lib/libvlc.sym                                |   4 +
 lib/media.c                                   |  18 +++
 lib/picture.c                                 | 105 +++++++++++++
 lib/picture_internal.h                        |   3 +
 modules/access/bluray.c                       |  16 +-
 modules/codec/libass.c                        |   6 +-
 modules/codec/subsusf.c                       |   6 +-
 modules/demux/avformat/demux.c                |  16 +-
 modules/demux/avi/avi.c                       |  10 +-
 modules/demux/flac.c                          |  14 +-
 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                     |  17 +--
 modules/demux/mkv/mkv.hpp                     |  30 ----
 modules/demux/mp4/attachments.c               |  15 +-
 modules/demux/mp4/attachments.h               |   2 +-
 modules/demux/mp4/mp4.c                       |  22 ++-
 modules/demux/mpeg/ts.c                       |  10 +-
 modules/demux/mpeg/ts_si.c                    |   2 +-
 modules/demux/ogg.c                           |  10 +-
 modules/demux/ogg.h                           |   2 +-
 modules/demux/xiph_metadata.c                 |  10 +-
 modules/demux/xiph_metadata.h                 |   4 +-
 modules/meta_engine/taglib.cpp                |  20 +--
 modules/text_renderer/freetype/freetype.c     |  12 +-
 modules/text_renderer/freetype/freetype.h     |   2 +-
 .../text_renderer/freetype/platform_fonts.c   |   2 +-
 src/Makefile.am                               |   1 +
 src/input/access.c                            |   5 +-
 src/input/attachment.c                        |  90 +++++++++++
 src/input/decoder.c                           |   2 +-
 src/input/decoder.h                           |   2 +-
 src/input/es_out.c                            |   6 +-
 src/input/input.c                             | 142 +++++-------------
 src/input/input_internal.h                    |   9 --
 src/input/item.c                              |  48 ++++++
 src/input/meta.c                              |   4 +-
 src/input/stream.h                            |   2 +-
 src/input/stream_memory.c                     |   6 +-
 src/libvlccore.sym                            |   4 +
 src/video_output/vout_subpictures.c           |   5 +-
 test/src/input/demux-run.c                    |   2 +-
 51 files changed, 524 insertions(+), 328 deletions(-)
 create mode 100644 src/input/attachment.c

-- 
2.29.2



More information about the vlc-devel mailing list