diff options
author | ben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-07-31 17:39:17 +0000 |
---|---|---|
committer | ben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-07-31 17:39:17 +0000 |
commit | 49867bd432352d19172ab26cf873bd5651e69e25 (patch) | |
tree | c2d419bb4f81564036baa12832a44b8aac27c6d1 /stream/stream_null.c | |
parent | d3b998da64927403879ad588287c178f86b7c849 (diff) | |
download | mpv-49867bd432352d19172ab26cf873bd5651e69e25.tar.bz2 mpv-49867bd432352d19172ab26cf873bd5651e69e25.tar.xz |
introduce new 'stream' directory for all stream layer related components and split them from libmpdemux
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19277 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/stream_null.c')
-rw-r--r-- | stream/stream_null.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/stream/stream_null.c b/stream/stream_null.c new file mode 100644 index 0000000000..a494c7810d --- /dev/null +++ b/stream/stream_null.c @@ -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 +}; |