Do not declare *_sys_t typedefs globally in vlc_common.h. Instead,
declare them locally in each module that provides a definition.
This paves the way to move C++ definitions into anonymous namespaces in
order to respect C++ ODR.
The picture_resource_t and sout_stream_id_sys_t typedefs will be handled
separately, since they require specific additional changes.
See #18033
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Normal user credentials could not be found since the "anonymous" never matched
in keystore.
This is a partial revert of 9366465979
Since we now log anonymous per default. A proper fix need a vlc_credential
change that we won't do now.
Ask the user before trying the anonymous access.
Before this commit, you could connect with a specific user only if the
anonymous access on the server was disabled.
Add a new parameter: psz_flatpath. If not NULL, readdir_helper_additem() will
un-flatten the folder hierarchy. It will create an input item for each sub
folders (separated by '/') of psz_nullpath.
Example: a stream directory that have the following items:
- "foo/bar/item1"
- "foo/bar/item2"
will output the following items while using this new parameter:
- foo
- bar
- item1
- item2
This functionality can be used by "stream directory" modules that have a
flattened folder hierarchy, like libarchive.
Access modules should not need this functionality.
PASS and ACCT are by their definition sensitive data, as such we
should not log their payload when such requests are sent.
These changes simply censors the payload, as well as the number of
bytes sent (so that the length of the payload is not leaked).
fixes#17440
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
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.
Remove "int options, const char *const *options, unsigned option_flags"
arguments from every New() functions since these args are mainly unused. You
now have to call input_item_AddOptions after input item creation to add
options.
Add input_item_net_type enum in order to avoid confusion between 2 int
arguments: i_duration and i_net that could both be -1, 0 or > 0.
Replace input_item_NewWithType and input_item_NewWithTypeExt with
input_item_NewExt.
Add input_item_NewCard, input_item_NewDisc, input_item_NewStream,
input_item_NewDirectory, input_item_NewFile MACRO. These MACROS avoid to use
useless arguments for an item type (for example, it's useless to specify a
duration for a directory type).
This keystore is used to store credentials on memory if no others keystore is
found or if the user doesn't want to store them permanently. This keystore is
owned by libvlc and is shared with all vlc objects. It's released when the
libvlc instance is released.
Instead of a socket file descriptor, client sessions are now run on
top of an abstract I/O stream. This enables e.g. TLS over TLS, which
would be required for HTTPS through HTTPS proxy.