Mercurial > mplayer.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
19270:7d39b911f0bd | 19271:64d82a45a05d |
---|---|
1 | |
2 #include "config.h" | |
3 | |
4 #include <stdlib.h> | |
5 #include <string.h> | |
6 | |
7 #include "stream.h" | |
8 #include "demuxer.h" | |
9 | |
10 #ifdef USE_TV | |
11 extern char* tv_param_channel; | |
12 #endif | |
13 | |
14 | |
15 static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { | |
16 stream->type = STREAMTYPE_DUMMY; | |
17 | |
18 if(strncmp("mf://",stream->url,5) == 0) { | |
19 *file_format = DEMUXER_TYPE_MF; | |
20 } | |
21 #ifdef USE_TV | |
22 else if (strncmp("tv://",stream->url,5) == 0) { | |
23 *file_format = DEMUXER_TYPE_TV; | |
24 if(stream->url[5] != '\0') | |
25 tv_param_channel = strdup(stream->url + 5); | |
26 } | |
27 #endif | |
28 return 1; | |
29 } | |
30 | |
31 | |
32 stream_info_t stream_info_null = { | |
33 "Null stream", | |
34 "null", | |
35 "Albeu", | |
36 "", | |
37 open_s, | |
38 { | |
39 #ifdef USE_TV | |
40 "tv", | |
41 #endif | |
42 "mf", "null", NULL }, | |
43 NULL, | |
44 0 // Urls are an option string | |
45 }; |