It is not used in POSIX systems. On other system it probably don't make a
difference anymore, only Windows has actual useful values for
VLC_THREAD_PRIORITY_XXX. The synchronization is more important than having some
threads called more often than others.
Previously when libupnp was built with IPv6 enabled only the adapters
supporting IPv6 were accepted. libupnp does support IPv4 even when built
with IPv6, this commit accept both kinds of adapters instead of
excluding the ones that does not support IPv6 at all.
`UpnpInit` is deprecated and unmaintained since 1.6. It is known to be
vulnerable (CVE-2020-12695). Dropping its support simplifies a lot the
network code as solely a net interface name is required by `UpnpInit2`
now.
The SMB modules cannot do the Bonjour lookup, so resolve the hostname
and forward the first IP, which typically is the preferred value.
This fixes vlc-ios#1319
`UpnpInit` is deprecated since 1.8 and removed in 1.14. `UpnpInit2`
offer a better replacement, working for both ipv6 and ipv4. There is no
reason to keep using `UpnpInit` apart from keeping the module usable
with 1.6.
This is a partial revert of 785c6dfe. Some servers (notably PLEX, UMS,
and some TV sets) amend the exposed media type with additional subtypes
for further differentiation not relevant to VLC, so it is actually
correct to compare the beginning of the string only.
For instance "object.container" can turn into
"object.container.storageFolder" or "object.container.person.musicArtist"
so the plain strcmp will fail to recognize the container nature.
Fixes vlc-ios#1239
see e967f81f6a.
note, this does **not** affect cat-based module selection items
(of which there are just three in use by the core), since that
mechanism uses subcats not cats.
The module was checking if it could handle the protocol by checking
if a module matching the module name is present, but for smb the
module names are dsm and smb2.
Fix vlc-ios#917
The implementation of the MTP service discovery could only support one
device at a time.
Now that the structures to store a list of devices is in place, perform
a diff between the known devices and the detected devices to update the
list accordingly.
Refactor to use a list of devices, and use a device node, parent of all
discovered media for the device.
This also prepares to add support for several MTP devices at the same
time.
Fixes#26085
Allocating the pp_items array required to know the number of items in
advance.
To do so, the mtp module hijacked the progression callback to know the
number of items on listing (which was called once for each item, but in
the end the total value was correct).
This callback function accepts a "userdata" having type `void const *`,
so it not intended to write to it, but it still worked without ugly cast
due to an additional redirection (p_sys).
To prepare further refactors (multi-device support), remove this
callback hack and use a vlc_vector to append items on-the-fly.
LIBMTP_Get_Friendlyname() may return an empty string. Since it is not
NULL, this name was used as the device name.
Instead, in that case, fallback to the model name.
The try/catch for exception safety was already needed there, and this
simplify the code a lot, so this moves the allocation into unique_ptr to
benefit from RAII destructors.
In addition, this commit change the call to free(p_sys) into the correct
C++ delete, avoiding a mismatch new/free.
Introduced in 0d89fe3fd7.
the lowercase "auto" default option value did not match the uppercase
"Auto" in the choice list.
option values should typically be lowercase. this fixes the mistake with
the case of the choice value, whilst maintaining backwards compatibility
with existing CLI usage and from saved settings files. this was the
clear preference for fixing this resulting from the MR discussion.
(no functional change)
- better prepare for the next commit where we need to support both "Auto"
and "auto".
- avoid multiple `strdup()`.
- avoid avoidable string comparisons.
The config "advanced" flag was unused and has been removed by
6a7a137f7b.
It has been removed from many add_*() macros, but not all. Remove it
from the remaining macros.
where identical to shorttext, or near enough.
bad because:
- wastes resources.
- useless tooltips in prefs GUI (poor UX) - tooltip longtext should add
something of value.
- useless repetition of text in certain help output.
in some cases they differed only in full-stop, creating unnecessary extra
burden on translators.
As pointed out in #25055 the choice of url option delimiter is probably
meant to be that way. std::string.find() returns std::string::npos (aka
-1) in case of no match.
Signed-off-by: Thomas Guillem <thomas@gllm.fr>