2006-08-03 19:43:02 +00:00
|
|
|
/*
|
2008-05-14 17:20:42 +00:00
|
|
|
* stream layer for multiple files input, based on previous work from Albeu
|
2006-08-03 19:43:02 +00:00
|
|
|
*
|
2008-05-14 17:20:42 +00:00
|
|
|
* Copyright (C) 2006 Benjamin Zores
|
2013-07-12 20:11:08 +00:00
|
|
|
* Original author: Albeu
|
2006-08-03 19:43:02 +00:00
|
|
|
*
|
2015-04-13 07:36:54 +00:00
|
|
|
* This file is part of mpv.
|
2006-08-03 19:43:02 +00:00
|
|
|
*
|
2015-04-13 07:36:54 +00:00
|
|
|
* mpv is free software; you can redistribute it and/or modify
|
2008-05-14 17:20:42 +00:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
2015-04-13 07:36:54 +00:00
|
|
|
* mpv is distributed in the hope that it will be useful,
|
2008-05-14 17:20:42 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
2015-04-13 07:36:54 +00:00
|
|
|
* with mpv. If not, see <http://www.gnu.org/licenses/>.
|
2006-08-03 19:43:02 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#include "stream.h"
|
|
|
|
|
|
|
|
static int
|
2014-05-24 12:06:13 +00:00
|
|
|
mf_stream_open (stream_t *stream)
|
2006-08-03 19:43:02 +00:00
|
|
|
{
|
2013-07-12 19:58:11 +00:00
|
|
|
stream->demuxer = "mf";
|
2014-03-26 19:42:09 +00:00
|
|
|
stream->allow_caching = false;
|
2009-07-06 23:26:13 +00:00
|
|
|
|
2006-08-03 19:43:02 +00:00
|
|
|
return STREAM_OK;
|
|
|
|
}
|
|
|
|
|
2007-12-02 13:22:53 +00:00
|
|
|
const stream_info_t stream_info_mf = {
|
stream: fix url_options field, make protocols field not fixed length
The way the url_options field was handled was not entirely sane: it's
actually a flexible array member, so it points to garbage for streams
which do not initialize this member (it just points to the data right
after the struct, which is garbage in theory and practice). This was
not actually a problem, since the field is only used if priv_size is
set (due to how this stuff is used). But it doesn't allow setting
priv_size only, which might be useful in some cases.
Also, make the protocols array not a fixed size array. Most stream
implementations have only 1 protocol prefix, but stream_lavf.c has
over 10 (whitelists ffmpeg protocols). The high size of the fixed
size protocol array wastes space, and it is _still_ annoying to
add new prefixes to stream_lavf (have to bump the maximum length),
so make it arbitrary length.
The two changes (plus some more cosmetic changes) arte conflated into
one, because it was annoying going over all the stream implementations.
2013-08-25 20:49:27 +00:00
|
|
|
.name = "mf",
|
|
|
|
.open = mf_stream_open,
|
2014-06-10 21:56:05 +00:00
|
|
|
.protocols = (const char*const[]){ "mf", NULL },
|
2006-08-03 19:43:02 +00:00
|
|
|
};
|