[vlc-devel] [PATCH 02/21] input/stream: stream-fragments: add initial documentation

Rémi Denis-Courmont remi at remlab.net
Mon Aug 1 18:16:04 CEST 2016


Le dimanche 31 juillet 2016, 22:42:11 Filip Roséen a écrit :
> This commit does not introduce any new functionality, but it describes
> the semantics associated with a new addition to the vlc-core called
> named "Stream Fragments".
> ---
>  include/vlc_stream.h | 100
> +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100
> insertions(+)
> 
> diff --git a/include/vlc_stream.h b/include/vlc_stream.h
> index 2095729..e81005b 100644
> --- a/include/vlc_stream.h
> +++ b/include/vlc_stream.h
> @@ -434,6 +434,106 @@ do { \
>  } while (0)
> 
>  /**
> + * \defgroup stream_fragments Stream Fragments
> + * @{
> + * \section stream_fragments_introduction Introduction to Fragments
> + *
> + * If a stream is a directory, \em stream-fragments is the mechanism used
> to + * specify a sub-item directly in the MRL referring to its parent. In
> short, + * they are used to specify that one would like to access a certain
> entity + * within something else; like a file within a compressed archive,
> or a certain + * track on an audio cd.
> + *
> + * \subsection fragments_introduction What are fragments?
> + *
> + * \em stream-fragments are very much like the fragment described in \link
> + * https://tools.ietf.org/html/rfc3986#section-3.5 RFC3986/3.5
> + * Fragment\endlink, though (has hinted by the plural form of "fragment")
> VLC + * can handle a fragment within a fragment; meaning that one can refer
> to a + * secondary resource (nested entity), within another secondary
> resource. + *

Oh gosh. No please.

URL fragments are URL fragments are URL fragments. They correspond to anchors 
in HTML documents, and their closest equivalent in VLC are title, chapter or 
start time. They intrinsically cannot be nested.

We have had enough troubles due to differing interpretation of URLs and MRLs in 
different code paths. We should know better than to further complicate and 
worsen the problem. And lets not even get started on the many cases whereby 
VLC exchanges URLs to or from another program/source, and all the hacks 
necessary to deal with broken URLs.

tl;dr: don't extend the generic URL syntax in proprietary manners.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list