[vlc-devel] mrl & uri

Rafaël Carré rafael.carre at gmail.com
Fri Jun 26 15:44:29 CEST 2009


Here is the prototype of InputSourceInit() which is responsible for
parsing famous "MRLs", the vlc invention for specifying a demuxer,
tracks for cdda/vcd/dvds, chapters, and perhaps other stuff.

static int InputSourceInit( input_thread_t *p_input,
                            input_source_t *in, const char *psz_mrl,
                            const char *psz_forced_demux )

It is called from Init() with:

    if( InputSourceInit( p_input, &p_input->p->input,
                         p_input->p->p_item->psz_uri, NULL ) )

So, an URI?

No, input_item_t clearly says

    char       *psz_uri;             /**< mrl of this item */

IMO we should just stop using "mrls" but URIs (explanation at the end)

Use cases of MRLs :

- access/demux://blabla

    The demux should be specified otherwise since schemes (the part
    before ":") can not contain "/".
    With input_item_AddOption() for example.

- access://blabla@options (for example cdda:///dev/cdrom@53 , or vcd)

We should use something more correct, but it's not very important
since cdda: is not a registered scheme
(http://en.wikipedia.org/wiki/URI_scheme for the list)

Here is an example from rfc3986:

         \_/   \______________/\_________/ \_________/ \__/
          |           |            |            |        |
       scheme     authority       path        query   fragment

cdda:///dev/cdrom#53 looks fine to me.

If you know of other cases for "MRLs" please state so.

In the end I want to make input_item_t->psz_uri a real "uri" so we
don't have to ask "is it a file path or not?".

The exported functions declared in vlc_playlist.h & vlc_input_item.h
would be documented as taking an URI as input and abort if it's not the

This will quickly help identify the parts of VLC which give file names
as input and correct them.

Rafaël Carré
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090626/78ae01ed/attachment.sig>

More information about the vlc-devel mailing list