Mercurial > mplayer.hg
annotate libmpdemux/tvi_def.h @ 3731:10130917f37b
warning fix
author | pl |
---|---|
date | Tue, 25 Dec 2001 16:30:25 +0000 |
parents | 178c562948ff |
children | 622a9ade4517 |
rev | line source |
---|---|
2802 | 1 static int init(priv_t *priv, tvi_param_t *params); |
2 static int uninit(priv_t *priv); | |
2790 | 3 static int control(priv_t *priv, int cmd, void *arg); |
2802 | 4 static int start(priv_t *priv); |
2790 | 5 static int grab_video_frame(priv_t *priv, char *buffer, int len); |
6 static int get_video_framesize(priv_t *priv); | |
7 static int grab_audio_frame(priv_t *priv, char *buffer, int len); | |
8 static int get_audio_framesize(priv_t *priv); | |
9 | |
10 static tvi_functions_t functions = | |
11 { | |
12 init, | |
2802 | 13 uninit, |
2790 | 14 control, |
2802 | 15 start, |
2790 | 16 grab_video_frame, |
17 get_video_framesize, | |
18 grab_audio_frame, | |
19 get_audio_framesize | |
20 }; | |
21 | |
22 static tvi_handle_t *new_handle() | |
23 { | |
2819
2e58962dc9fe
cleaned up some warnings, and tv_param_on moved out from #ifdef USE_TV
alex
parents:
2802
diff
changeset
|
24 tvi_handle_t *h = (tvi_handle_t *)malloc(sizeof(tvi_handle_t)); |
2790 | 25 |
26 if (!h) | |
27 return(NULL); | |
2802 | 28 h->priv = (priv_t *)malloc(sizeof(priv_t)); |
2790 | 29 if (!h->priv) |
30 { | |
31 free(h); | |
32 return(NULL); | |
33 } | |
34 memset(h->priv, 0, sizeof(priv_t)); | |
35 h->info = &info; | |
36 h->functions = &functions; | |
2802 | 37 h->params = NULL; |
38 h->seq = 0; | |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2819
diff
changeset
|
39 h->chanlist = -1; |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2819
diff
changeset
|
40 h->chanlist_s = NULL; |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2819
diff
changeset
|
41 h->norm = -1; |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2819
diff
changeset
|
42 h->channel = -1; |
2790 | 43 return(h); |
44 } | |
45 | |
46 static void free_handle(tvi_handle_t *h) | |
47 { | |
3611 | 48 if (h) { |
49 if (h->priv) | |
50 free(h->priv); | |
2790 | 51 free(h); |
3611 | 52 } |
2790 | 53 } |