annotate libmpdemux/stream_null.c @ 17566:f580a7755ac5

Patch by Stefan Huehner / stefan % huehner ! org \ patch replaces '()' for the correct '(void)' in function declarations/prototypes which have no parameters. The '()' syntax tell thats there is a variable list of arguments, so that the compiler cannot check this. The extra CFLAG '-Wstrict-declarations' shows those cases. Comments about a similar patch applied to ffmpeg: That in C++ these mean the same, but in ANSI C the semantics are different; function() is an (obsolete) K&R C style forward declaration, it basically means that the function can have any number and any types of parameters, effectively completely preventing the compiler from doing any sort of type checking. -- Erik Slagter Defining functions with unspecified arguments is allowed but bad. With arguments unspecified the compiler can't report an error/warning if the function is called with incorrect arguments. -- M\ns Rullg\rd
author rathann
date Thu, 09 Feb 2006 14:08:03 +0000
parents 233802490b0e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9901
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
1
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
2 #include "config.h"
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
3
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
4 #include <stdlib.h>
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
5 #include <string.h>
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
6
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
7 #include "stream.h"
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
8 #include "demuxer.h"
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
9
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
10 #ifdef USE_TV
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
11 extern char* tv_param_channel;
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
12 #endif
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
13
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
14
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
15 static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
16 stream->type = STREAMTYPE_DUMMY;
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
17
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
18 if(strncmp("mf://",stream->url,5) == 0) {
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
19 *file_format = DEMUXER_TYPE_MF;
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
20 }
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
21 #ifdef USE_TV
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
22 else if (strncmp("tv://",stream->url,5) == 0) {
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
23 *file_format = DEMUXER_TYPE_TV;
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
24 if(stream->url[5] != '\0')
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
25 tv_param_channel = strdup(stream->url + 5);
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
26 }
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
27 #endif
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
28 return 1;
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
29 }
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
30
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
31
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
32 stream_info_t stream_info_null = {
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
33 "Null stream",
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
34 "null",
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
35 "Albeu",
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
36 "",
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
37 open_s,
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
38 {
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
39 #ifdef USE_TV
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
40 "tv",
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
41 #endif
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
42 "mf", "null", NULL },
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
43 NULL,
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
44 0 // Urls are an option string
233802490b0e Add a null streamv Currently used for tv and mf. Could be used to
albeu
parents:
diff changeset
45 };