The function does not open MRLs, as correctly described in its
documentation, as such it is rather unfortunate that its name uses MRL
instead of URL (especially given that it cannot handle MRLs).
These changes are simply renaming all occurrences of the function, so
that the behavior of the function is properly reflected by its name.
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
playlist_DeleteFromInput() requires recursive search through the whole
playlist to find the correct playlist item. This only makes sense if
the playlist item or playlist item ID are not known.
This makes more sense than returning the input item ID, which is not
exposed in any other place and manner through Lua. And it seems that
was the intent too.
Then again, the value is either way potentially invalid by the time it
is returned.
The previous implementations usage of input_item_GetName resulted in
unexpected data in the filename attribute (given that
input_item_GetName will first query vlc_meta_Title, and if present
return that).
These changes extracts the filename for a given item, including
support for trailing slashes (so that we do not get an empty filename
for a path such as file:///media/).
fixes#17611
Signed-off-by: Pierre Ynard <linkfanel@yahoo.fr>
This compensates the fact that the HTTP access no longer undoes the
Content-Encoding automatically.
However, it also affects other access plug-ins, thus changing the
behaviour. IMO, Lua scripts should be fixed to call
vlc.stream.add_filter (which has existed for 7 years) when they need
it.
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).
The function can only fail if the named variable does not exist. The
only case where the error was actually checked was after another check
that the variable exists (Old RC).
That parameter assumed that the query was part of the path. However it
is not, which leads to invalid host name, and eventually failure when
the path is missing. In practice, passing any value other than '?' as
separator would not work properly.
Remaining vlc_UrlParse() call sites without the option separator do not
support query at the protocol level anyway, so they are unaffected by the
change.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
This avoids SIGPIPE firing when writing to a remote-closed connection-
oriented socket (it is useless for datagram sockets or on Windows
though). SIGPIPE is blocked ins VLC, but not necessarily in LibVLC.
The problem remains for write() on broken pipe and sockets.