Mercurial > mplayer.hg
diff stream/stream_null.c @ 19271:64d82a45a05d
introduce new 'stream' directory for all stream layer related components and split them from libmpdemux
author | ben |
---|---|
date | Mon, 31 Jul 2006 17:39:17 +0000 |
parents | libmpdemux/stream_null.c@233802490b0e |
children | 11ec1cb3a7ea |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/stream/stream_null.c Mon Jul 31 17:39:17 2006 +0000 @@ -0,0 +1,45 @@ + +#include "config.h" + +#include <stdlib.h> +#include <string.h> + +#include "stream.h" +#include "demuxer.h" + +#ifdef USE_TV +extern char* tv_param_channel; +#endif + + +static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { + stream->type = STREAMTYPE_DUMMY; + + if(strncmp("mf://",stream->url,5) == 0) { + *file_format = DEMUXER_TYPE_MF; + } +#ifdef USE_TV + else if (strncmp("tv://",stream->url,5) == 0) { + *file_format = DEMUXER_TYPE_TV; + if(stream->url[5] != '\0') + tv_param_channel = strdup(stream->url + 5); + } +#endif + return 1; +} + + +stream_info_t stream_info_null = { + "Null stream", + "null", + "Albeu", + "", + open_s, + { +#ifdef USE_TV +"tv", +#endif +"mf", "null", NULL }, + NULL, + 0 // Urls are an option string +};