Mercurial > mplayer.hg
annotate libmpdemux/tvi_def.h @ 4321:63fb32311b3b
Fixing compilation on non-MMX but x86 systems
author | nick |
---|---|
date | Wed, 23 Jan 2002 17:09:58 +0000 |
parents | 622a9ade4517 |
children | 8cd761968f35 |
rev | line source |
---|---|
3815 | 1 #include <stdlib.h> /* malloc */ |
2 | |
3 static int init(priv_t *priv); | |
2802 | 4 static int uninit(priv_t *priv); |
2790 | 5 static int control(priv_t *priv, int cmd, void *arg); |
2802 | 6 static int start(priv_t *priv); |
2790 | 7 static int grab_video_frame(priv_t *priv, char *buffer, int len); |
8 static int get_video_framesize(priv_t *priv); | |
9 static int grab_audio_frame(priv_t *priv, char *buffer, int len); | |
10 static int get_audio_framesize(priv_t *priv); | |
11 | |
12 static tvi_functions_t functions = | |
13 { | |
14 init, | |
2802 | 15 uninit, |
2790 | 16 control, |
2802 | 17 start, |
2790 | 18 grab_video_frame, |
19 get_video_framesize, | |
20 grab_audio_frame, | |
21 get_audio_framesize | |
22 }; | |
23 | |
24 static tvi_handle_t *new_handle() | |
25 { | |
2819
2e58962dc9fe
cleaned up some warnings, and tv_param_on moved out from #ifdef USE_TV
alex
parents:
2802
diff
changeset
|
26 tvi_handle_t *h = (tvi_handle_t *)malloc(sizeof(tvi_handle_t)); |
2790 | 27 |
28 if (!h) | |
29 return(NULL); | |
2802 | 30 h->priv = (priv_t *)malloc(sizeof(priv_t)); |
2790 | 31 if (!h->priv) |
32 { | |
33 free(h); | |
34 return(NULL); | |
35 } | |
36 memset(h->priv, 0, sizeof(priv_t)); | |
37 h->info = &info; | |
38 h->functions = &functions; | |
2802 | 39 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
|
40 h->chanlist = -1; |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2819
diff
changeset
|
41 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
|
42 h->norm = -1; |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2819
diff
changeset
|
43 h->channel = -1; |
2790 | 44 return(h); |
45 } | |
46 | |
47 static void free_handle(tvi_handle_t *h) | |
48 { | |
3611 | 49 if (h) { |
50 if (h->priv) | |
51 free(h->priv); | |
2790 | 52 free(h); |
3611 | 53 } |
2790 | 54 } |