[vlc-devel] [PATCH 00/14] [RFC] UPNP Server module implementation

Alaric Senat dev.asenat at posteo.net
Fri Mar 19 11:39:55 UTC 2021


Hi,

This patchset adds an interface module that exposes media library's
content via UPNP.
As I mainly finished implementing all the features needed for it to
be usable and testable, the goal of this submission is to get some
comments on the implementation from the community. Eventually, if you
can and want to test it, I'd be also glad to have some feedback on the
practical side of the server!

I know that this is A LOT of new code at the same time. I tried my best
describing all the different parts of the module in the last commit
message so you can have a look at whatever part of the implementation
interests you.
Also here's my branch on gitlab if you like gitlab's GUI better:
https://code.videolan.org/asenat/vlc/-/commits/upnp_server/

I did this whole project under the supervision of Thomas and I'd like to
thank him for his great advices and patience.

Best regards

Alaric Senat (14):
  medialibrary: rename vlc_ml_entry_point_t to vlc_ml_folder_t
  medialibrary: move entry point listing calls to list instead of
    control
  medialibrary: add folder listing
  medialibrary: fix FsFactory::createFile method
  medialibrary: add input_slaves to the ml hierarchy
  medialibrary: expose new ml_file_t values
  medialibrary: fix `directory.cpp" formatting
  medialibrary: fix misleading fs error handling
  renderer_common: use vlc_object instead of vlc_stream
  contrib: bump libupnp to 1.12.1
  contrib: patch libupnp to expose HTTP headers
  stream_out: dlna: publicly expose protocol info function
  stream_out: dlna: constify the profile list
  upnp_server: add the upnp server module

 contrib/src/upnp/SHA512SUMS                   |   2 +-
 contrib/src/upnp/dont_use_down_intf.patch     |  12 -
 contrib/src/upnp/extra-http-headers.patch     | 290 ++++++++++
 contrib/src/upnp/fix_infinite_loop.patch      |  21 -
 contrib/src/upnp/libpthread.patch             |  15 -
 .../src/upnp/libupnp-pthread-w32-checks.patch |  62 +-
 contrib/src/upnp/libupnp-win32-exports.patch  |  34 +-
 contrib/src/upnp/libupnp-win32.patch          |  14 -
 contrib/src/upnp/libupnp-win64.patch          |  67 +--
 contrib/src/upnp/miniserver.patch             |  28 +-
 contrib/src/upnp/missing_win32.patch          |  13 -
 contrib/src/upnp/no-getifinfo.patch           |  18 -
 contrib/src/upnp/rules.mak                    |  28 +-
 contrib/src/upnp/upnp-no-debugfile.patch      |  32 +-
 contrib/src/upnp/use-inet-pton.patch          |  39 ++
 contrib/src/upnp/use-unicode.patch            |  49 --
 contrib/src/upnp/windows-random.patch         |  34 --
 contrib/src/upnp/windows-version-inet.patch   |  42 +-
 extras/package/snap/snapcraft.yaml            |   3 -
 include/vlc_media_library.h                   | 151 +++--
 modules/control/upnp_server/.clang-format     |  16 +
 modules/control/upnp_server/Clients.cpp       | 126 ++++
 modules/control/upnp_server/FileHandler.cpp   | 501 ++++++++++++++++
 modules/control/upnp_server/FileHandler.hpp   |  54 ++
 modules/control/upnp_server/Option.hpp        | 126 ++++
 modules/control/upnp_server/Profiles.hpp      |  57 ++
 modules/control/upnp_server/cds/Container.hpp |  77 +++
 .../upnp_server/cds/FixedContainer.cpp        |  72 +++
 .../upnp_server/cds/FixedContainer.hpp        |  55 ++
 modules/control/upnp_server/cds/Item.cpp      | 246 ++++++++
 modules/control/upnp_server/cds/Item.hpp      |  55 ++
 .../control/upnp_server/cds/MLContainer.hpp   | 202 +++++++
 .../upnp_server/cds/MLFolderContainer.hpp     | 152 +++++
 modules/control/upnp_server/cds/Object.hpp    | 123 ++++
 modules/control/upnp_server/cds/cds.cpp       | 153 +++++
 modules/control/upnp_server/cds/cds.hpp       |  56 ++
 modules/control/upnp_server/ml.hpp            | 144 +++++
 .../upnp_server/share/ConnectionManager.xml   | 132 +++++
 .../upnp_server/share/ContentDirectory.xml    | 207 +++++++
 .../share/X_MS_MediaReceiverRegistrar.xml     |  88 +++
 modules/control/upnp_server/sout.cpp          | 220 +++++++
 modules/control/upnp_server/test/cds.cpp      | 113 ++++
 .../upnp_server/test/cxx_test_helper.hpp      | 257 +++++++++
 modules/control/upnp_server/test/main.cpp     |  26 +
 modules/control/upnp_server/test/utils.cpp    |  71 +++
 modules/control/upnp_server/upnp_server.cpp   | 546 ++++++++++++++++++
 modules/control/upnp_server/upnp_server.hpp   | 133 +++++
 modules/control/upnp_server/utils.cpp         | 280 +++++++++
 modules/control/upnp_server/utils.hpp         |  93 +++
 modules/control/upnp_server/xml_wrapper.hpp   | 130 +++++
 .../gui/macosx/library/VLCLibraryDataTypes.h  |   2 +-
 .../gui/macosx/library/VLCLibraryDataTypes.m  |   2 +-
 modules/gui/macosx/library/VLCLibraryModel.m  |   9 +-
 .../gui/qt/medialibrary/mlfoldersmodel.cpp    |  16 +-
 .../gui/qt/medialibrary/mlfoldersmodel.hpp    |   2 +-
 modules/misc/medialibrary/entities.cpp        |   7 +-
 modules/misc/medialibrary/fs/directory.cpp    | 113 +++-
 modules/misc/medialibrary/fs/directory.h      |   1 +
 modules/misc/medialibrary/fs/file.cpp         |  38 +-
 modules/misc/medialibrary/fs/file.h           |  16 +-
 modules/misc/medialibrary/fs/fs.cpp           |   2 +-
 modules/misc/medialibrary/fs/util.cpp         |   8 +
 modules/misc/medialibrary/fs/util.h           |   1 +
 modules/misc/medialibrary/medialibrary.cpp    |  94 ++-
 modules/misc/medialibrary/medialibrary.h      |   2 +-
 modules/services_discovery/Makefile.am        |  43 +-
 modules/services_discovery/upnp.cpp           |  20 +
 modules/services_discovery/upnp.hpp           |   1 +
 modules/stream_out/chromecast/cast.cpp        |   2 +-
 modules/stream_out/dlna/dlna.cpp              |  30 +-
 modules/stream_out/dlna/dlna.hpp              |  27 +
 modules/stream_out/dlna/profile_names.hpp     |   2 +-
 modules/stream_out/renderer_common.cpp        |  36 +-
 modules/stream_out/renderer_common.hpp        |   3 +-
 src/libvlccore.sym                            |   3 +-
 src/misc/medialibrary.c                       |  13 +-
 76 files changed, 5485 insertions(+), 473 deletions(-)
 delete mode 100644 contrib/src/upnp/dont_use_down_intf.patch
 create mode 100644 contrib/src/upnp/extra-http-headers.patch
 delete mode 100644 contrib/src/upnp/fix_infinite_loop.patch
 delete mode 100644 contrib/src/upnp/libpthread.patch
 delete mode 100644 contrib/src/upnp/missing_win32.patch
 delete mode 100644 contrib/src/upnp/no-getifinfo.patch
 create mode 100644 contrib/src/upnp/use-inet-pton.patch
 delete mode 100644 contrib/src/upnp/use-unicode.patch
 delete mode 100644 contrib/src/upnp/windows-random.patch
 create mode 100644 modules/control/upnp_server/.clang-format
 create mode 100644 modules/control/upnp_server/Clients.cpp
 create mode 100644 modules/control/upnp_server/FileHandler.cpp
 create mode 100644 modules/control/upnp_server/FileHandler.hpp
 create mode 100644 modules/control/upnp_server/Option.hpp
 create mode 100644 modules/control/upnp_server/Profiles.hpp
 create mode 100644 modules/control/upnp_server/cds/Container.hpp
 create mode 100644 modules/control/upnp_server/cds/FixedContainer.cpp
 create mode 100644 modules/control/upnp_server/cds/FixedContainer.hpp
 create mode 100644 modules/control/upnp_server/cds/Item.cpp
 create mode 100644 modules/control/upnp_server/cds/Item.hpp
 create mode 100644 modules/control/upnp_server/cds/MLContainer.hpp
 create mode 100644 modules/control/upnp_server/cds/MLFolderContainer.hpp
 create mode 100644 modules/control/upnp_server/cds/Object.hpp
 create mode 100644 modules/control/upnp_server/cds/cds.cpp
 create mode 100644 modules/control/upnp_server/cds/cds.hpp
 create mode 100644 modules/control/upnp_server/ml.hpp
 create mode 100644 modules/control/upnp_server/share/ConnectionManager.xml
 create mode 100644 modules/control/upnp_server/share/ContentDirectory.xml
 create mode 100644 modules/control/upnp_server/share/X_MS_MediaReceiverRegistrar.xml
 create mode 100644 modules/control/upnp_server/sout.cpp
 create mode 100644 modules/control/upnp_server/test/cds.cpp
 create mode 100644 modules/control/upnp_server/test/cxx_test_helper.hpp
 create mode 100644 modules/control/upnp_server/test/main.cpp
 create mode 100644 modules/control/upnp_server/test/utils.cpp
 create mode 100644 modules/control/upnp_server/upnp_server.cpp
 create mode 100644 modules/control/upnp_server/upnp_server.hpp
 create mode 100644 modules/control/upnp_server/utils.cpp
 create mode 100644 modules/control/upnp_server/utils.hpp
 create mode 100644 modules/control/upnp_server/xml_wrapper.hpp

-- 
2.29.2



More information about the vlc-devel mailing list