Commit Graph

53 Commits

Author SHA1 Message Date
Rémi Denis-Courmont cc129a71d7 Remove old mail address from sources 2019-09-04 22:11:04 +03:00
Hugo Beauzée-Luyssen 382ee82228 upnp: Fix windows build
Always include wincrypt before upnp.h
This drops the windows.h include, since it's implied by vlc_common.h
2019-01-10 17:56:53 +01:00
Shaleen Jain 7da4464ca0 dlna: add a DLNA stream out
Add support for casting to a DLNA Media Renderers
implementing the AVTransport service with the
initial support of the default media format.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
2019-01-10 17:14:00 +01:00
William Ung 0d89fe3fd7 upnp: add renderer discoverer
Co-authored-by: Shaleen Jain <shaleen@jain.sh>

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2018-10-28 11:22:13 +01:00
Shaleen Jain 92f2a45aab upnp: fix headers
Header files should be self-contained and should not have
to adhere to special conditions or include order to include the header.
Also add a header guard

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2018-10-28 11:21:40 +01:00
Hugo Beauzée-Luyssen f0639004fc upnp: Use vlc::threads 2018-08-21 13:29:19 +02:00
Jean-Baptiste Kempf b1fb710176 UPnP: split sat>ip parsing function
And add an Auto mode, that works as one would expect

Close #19751
2018-07-29 18:28:48 +02:00
Hugo Beauzée-Luyssen 7f51eb6cff upnp: Fix windows build 2018-06-29 14:14:22 +02:00
Shaleen Jain da4e3c45c0 upnp: move UpnpInstanceWrapper to upnp-wrapper
Move out UpnpInstanceWrapper into its own file
since it no longer has any dependencies on existing
modules and allow other modules to get references to it.
Move as well as the various helper functions that are
directly required by the UpnpInstanceWrapper class
and inline them for a small performance gain.

Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
2018-06-29 13:19:41 +02:00
Shaleen Jain 66839225ff upnp: add and use a callback listener interface
Introduce a Listener interface to
UpnpInstanceWrapper that can be used
by modules to get UpnpEvent callbacks
from libupnp decoupling UpnpInstanceWrapper
from any specific module or its members.

Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
2018-06-29 13:19:15 +02:00
Hugo Beauzée-Luyssen 685f792ff5 win32: Work around an issue in mingw-w64 5.0.x headers
wincrypt.h needs to be included before iphlpapi.h
2017-12-14 17:53:41 +01:00
Sebastian Ramacher 3eb4e03512 upnp: Add support for libupnp 1.8
Callbacks now take const void* as second argument and some members can
only be accessed via getter functions.

Signed-off-by: Sebastian Ramacher <sramacher@debian.org>
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-08-30 10:12:20 +02:00
Rémi Denis-Courmont e4ba64d291 Remove access_t 2017-07-23 08:55:40 +03:00
Felix Paul Kühne 1b77346066 satip: drop requirement of the lua script and simplify parsing
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2016-09-16 15:37:01 +02:00
Jean-Baptiste Kempf d45925ab3e UPnP: relicense to LGPLv2.1+
Thanks to (in no particular order, and not exhaustive):
Thomas Guillem
Hugo Beauzée-Luyssen
Pavlov Konstantin
Mirsal Ennaime
Rémi Denis-Courmont
Steve Lhomme
Jean-Baptiste Kempf
Bastien Penavayre
Chris Clayton
Felix Paul Kühne
Alexandre Pereira Nunes
Antoine Cellerier
Austin Burrow
Denis Charmet
Fabrizio Gennari
Jean-Paul Saman
Naohiro Koriyama
Pere Orga
Ludovic Fauvet
Pierre d'Herbemont
Samuel Hocevar
Rémi Duraffort
2016-07-25 18:10:24 +02:00
Steve Lhomme 6f414985cb upnp: avoid locking each libupnp callback exclusively
UpnpDownloadXmlDoc() can take a while, during that time all other callbacks
are blocking while they could handle simple events quickly (logging) or do
another UpnpDownloadXmlDoc() in parallel.

We only need to lock the MediaServerList in the callbacks when we need it.
And not use it if it's already destroyed.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2016-06-05 14:35:06 +02:00
Steve Lhomme 8c653ca422 upnp: remove MediaServerList::m_lock, it's always used under s_lock protection
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2016-06-05 14:35:06 +02:00
Steve Lhomme cfd37b3bef upnp: remove m_server_list_lock, p_server_list is already protected by s_lock
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2016-06-05 14:35:06 +02:00
Steve Lhomme 417c3cdbab upnp: make p_server_list static
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2016-06-05 14:35:06 +02:00
Thomas Guillem e08970c1ad upnp: fix double lock 2016-06-02 10:37:43 +02:00
Steve Lhomme 46653c821d upnp: rename m_opaque to p_server_list
and also m_callback_lock to m_server_list_lock

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2016-06-01 17:41:43 +02:00
Steve Lhomme 1881166da9 upnp: no need to store the MediaServerList in services_discovery_sys_t
Let UpnpInstanceWrapper manage it completely

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2016-06-01 17:41:43 +02:00
Steve Lhomme 8196bc7944 upnp: the callback is always SD::MediaServerList::Callback() when used
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2016-06-01 17:41:43 +02:00
Steve Lhomme 1e678ab387 upnp: m_sd is never changed
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2016-06-01 17:41:43 +02:00
Hugo Beauzée-Luyssen 47306fda3e upnp: Use m_ prefix for class members instead of _ suffix 2016-05-25 19:06:14 +02:00
Thomas Guillem 760f2c86fe upnp: refactor items addition 2016-05-19 15:55:27 +02:00
Thomas Guillem a64f371c97 upnp: refactor containers addition
And rename addItem to addContainer.
2016-05-19 15:55:27 +02:00
Thomas Guillem 9109718b77 access: re-refactor pf_readdir
This commit changes pf_readdir callback to its original behavior. Accesses and
streams now add items to a node.

Archive stream_filters will now be able to add nodes to a node (when an archive
has directory). This was not possible before.

This commit also adds an access_fsdir helper to help fs accesses (file, smb,
nfs, ftp, sftp) adding items to a node. These accesses need the same treatment
that is now done by this helper:
 - hide hidden files or not (depending on "show-hiddenfiles" option)
 - skip some file extensions (depending on "ignore-filetypes" option)
 - sort items by type and alphabetically (depending on "directory-sort"
   option).
 - For a next commit: attach slaves to items

The directory demux won't do these operations anymore for every access/stream.

This commit doesn't change the interruptible state of the pf_readdir function,
accesses/streams are still interruptible in the middle of a pf_readdir call.

This partially reverts commit 88ffe15878.
2016-05-19 15:55:27 +02:00
Hugo Beauzée-Luyssen 0cff561114 upnp: Fetch the server icon 2016-02-17 15:41:45 +01:00
Thomas Guillem 2d7589e4f4 upnp: correctly fix deadlock when calling UpnpUnRegisterClient
UpnpInstanceWrapper::Callback() can be called while Upnp is unregistering via
UpnpUnRegisterClient(). Both functions locked the same mutex (s_lock) and this
resulted to a deadlock.

Add a new mutex to protect only the upnp callback.
2016-02-08 18:20:41 +01:00
Thomas Guillem 72c84ba4b3 Revert "upnp: fix deadlock when calling UpnpFinish locked"
This reverts commit 7e11257c28.
2016-02-08 18:20:41 +01:00
Thomas Guillem 7e11257c28 upnp: fix deadlock when calling UpnpFinish locked 2016-02-08 16:02:24 +01:00
Hugo Beauzée-Luyssen a5b3733325 upnp: getNextItem: Cosmetics 2016-01-28 12:37:56 +01:00
Thomas Guillem be54040b94 upnp: fix build 2015-12-09 14:52:09 +01:00
Thomas Guillem d76bc0b91a upnp: make pf_readdir interruptible 2015-12-09 12:06:07 +01:00
Hugo Beauzée-Luyssen 34d0997372 upnp: Fix content listing on plex.
Fix #14976
This also removes multiple ununsed url parsing
2015-12-03 14:42:32 +01:00
Hugo Beauzée-Luyssen 1095d828d7 upnp: Read the target url from p_access 2015-12-03 14:42:32 +01:00
Felix Paul Kühne b64e8e787f UPnP discovery: add support for SAT>IP servers (closes #11929, closes #15540)
Some servers don't provide a playlist of their channels, so we need to download the list for the chosen satellite from the web and process it accordingly
2015-10-17 21:40:58 +02:00
Thomas Guillem 88ffe15878 access: refactor pf_readdir
The main advantage is to move the management of the input_item_node_t from all
accesses to the directory demux.
2015-05-20 16:07:32 +02:00
Hugo Beauzée-Luyssen 038cdddb5f upnp: Ensure config.h is included first 2015-05-11 18:30:52 +02:00
Jean-Baptiste Kempf 23a0634c38 Upnp: remove trailing space 2015-03-23 15:00:50 +01:00
Hugo Beauzée-Luyssen f7dfc8f104 UPnP: important rewrite
This is splitting the UPnP module in 2 parts:
- A service discovery module that is solely responsible for discovering
UPnP devices on the network
- An access module that will leverage the recently introduced
pf_readdir callback to list directories.

This removes the need for recursion and handling of all the items from
within the SD module.
2015-03-11 15:38:19 +01:00
Mirsal Ennaime 5725edf9fb upnp sd: Add support for Samsung devices' subtitles extensions
* Request the sec:CaptionInfo and sec:CaptionInfoEx DIDL attributes
 * If one of the two caption attributes are present, build and add an
   input-slave option string which forces the subtitle demux
 * Add the sub-track-id option to input items with subtitles
   so the subtitles are immediately visible
2012-12-28 00:31:33 +01:00
Naohiro KORIYAMA 83a9c8442f upnp: fetch all media items correctly.
Close #6716

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2012-04-30 11:04:30 +02:00
Chris Clayton 02f60487e2 upnp: Support UPnP A/V MediaServer:2 devices
* Accept any version of the MediaServer service
* Browse the advertised ContentDirectory service version

Signed-off-by: Mirsal Ennaime <mirsal@videolan.org>
2011-12-19 04:07:42 +01:00
Pere Orga 9abcaacf83 fix filename self-references
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2011-12-15 17:09:31 +02:00
Rémi Denis-Courmont 6364bc24f8 UPnP: fix warning 2011-05-14 14:09:33 +03:00
Konstantin Pavlov b6f472bae9 UPNP: set input item duration if available in UPNP response. 2011-04-20 17:12:45 +04:00
Konstantin Pavlov 76b349a3d8 UPNP: When removing server, also remove it from SD listings 2011-04-19 17:02:31 +04:00
Jean-Baptiste Kempf 08a82c2be4 Upnp: remove unused function. 2011-04-15 01:34:50 +02:00