annotate libmpdemux/tvi_def.h @ 2870:f46c5556f1e6

radeon_vid: it's in first pre-alpha stage Note: it's not public release and not test version. It's simplest commit of unfinished and not working stuff in hope to attract other developer to this driver. (What is good: this driver is removable from driver list and doesn't cause segfault !!!)
author nick
date Tue, 13 Nov 2001 17:20:47 +0000
parents 2e58962dc9fe
children 60c1b7c0ea21
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
1 static int init(priv_t *priv, tvi_param_t *params);
09d5c9834580 tv update
alex
parents: 2790
diff changeset
2 static int uninit(priv_t *priv);
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
3 static int control(priv_t *priv, int cmd, void *arg);
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
4 static int start(priv_t *priv);
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
5 static int grab_video_frame(priv_t *priv, char *buffer, int len);
98769cea155c added tv subsystem
alex
parents:
diff changeset
6 static int get_video_framesize(priv_t *priv);
98769cea155c added tv subsystem
alex
parents:
diff changeset
7 static int grab_audio_frame(priv_t *priv, char *buffer, int len);
98769cea155c added tv subsystem
alex
parents:
diff changeset
8 static int get_audio_framesize(priv_t *priv);
98769cea155c added tv subsystem
alex
parents:
diff changeset
9
98769cea155c added tv subsystem
alex
parents:
diff changeset
10 static tvi_functions_t functions =
98769cea155c added tv subsystem
alex
parents:
diff changeset
11 {
98769cea155c added tv subsystem
alex
parents:
diff changeset
12 init,
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
13 uninit,
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
14 control,
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
15 start,
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
16 grab_video_frame,
98769cea155c added tv subsystem
alex
parents:
diff changeset
17 get_video_framesize,
98769cea155c added tv subsystem
alex
parents:
diff changeset
18 grab_audio_frame,
98769cea155c added tv subsystem
alex
parents:
diff changeset
19 get_audio_framesize
98769cea155c added tv subsystem
alex
parents:
diff changeset
20 };
98769cea155c added tv subsystem
alex
parents:
diff changeset
21
98769cea155c added tv subsystem
alex
parents:
diff changeset
22 static tvi_handle_t *new_handle()
98769cea155c added tv subsystem
alex
parents:
diff changeset
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
98769cea155c added tv subsystem
alex
parents:
diff changeset
25
98769cea155c added tv subsystem
alex
parents:
diff changeset
26 if (!h)
98769cea155c added tv subsystem
alex
parents:
diff changeset
27 return(NULL);
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
28 h->priv = (priv_t *)malloc(sizeof(priv_t));
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
29 if (!h->priv)
98769cea155c added tv subsystem
alex
parents:
diff changeset
30 {
98769cea155c added tv subsystem
alex
parents:
diff changeset
31 free(h);
98769cea155c added tv subsystem
alex
parents:
diff changeset
32 return(NULL);
98769cea155c added tv subsystem
alex
parents:
diff changeset
33 }
98769cea155c added tv subsystem
alex
parents:
diff changeset
34 memset(h->priv, 0, sizeof(priv_t));
98769cea155c added tv subsystem
alex
parents:
diff changeset
35 h->info = &info;
98769cea155c added tv subsystem
alex
parents:
diff changeset
36 h->functions = &functions;
2802
09d5c9834580 tv update
alex
parents: 2790
diff changeset
37 h->params = NULL;
09d5c9834580 tv update
alex
parents: 2790
diff changeset
38 h->seq = 0;
2790
98769cea155c added tv subsystem
alex
parents:
diff changeset
39 return(h);
98769cea155c added tv subsystem
alex
parents:
diff changeset
40 }
98769cea155c added tv subsystem
alex
parents:
diff changeset
41
98769cea155c added tv subsystem
alex
parents:
diff changeset
42 static void free_handle(tvi_handle_t *h)
98769cea155c added tv subsystem
alex
parents:
diff changeset
43 {
98769cea155c added tv subsystem
alex
parents:
diff changeset
44 if (h->priv)
98769cea155c added tv subsystem
alex
parents:
diff changeset
45 free(h->priv);
98769cea155c added tv subsystem
alex
parents:
diff changeset
46 if (h)
98769cea155c added tv subsystem
alex
parents:
diff changeset
47 free(h);
98769cea155c added tv subsystem
alex
parents:
diff changeset
48 }