1 #include <stdlib.h> /* malloc */
2 #include <string.h> /* memset */
4 static int init(priv_t
*priv
);
5 static int uninit(priv_t
*priv
);
6 static int control(priv_t
*priv
, int cmd
, void *arg
);
7 static int start(priv_t
*priv
);
8 static double grab_video_frame(priv_t
*priv
, char *buffer
, int len
);
9 #ifdef HAVE_TV_BSDBT848
10 static double grabimmediate_video_frame(priv_t
*priv
, char *buffer
, int len
);
12 static int get_video_framesize(priv_t
*priv
);
13 static double grab_audio_frame(priv_t
*priv
, char *buffer
, int len
);
14 static int get_audio_framesize(priv_t
*priv
);
16 static tvi_functions_t functions
=
23 #ifdef HAVE_TV_BSDBT848
24 grabimmediate_video_frame
,
31 static tvi_handle_t
*new_handle(void)
33 tvi_handle_t
*h
= (tvi_handle_t
*)malloc(sizeof(tvi_handle_t
));
37 h
->priv
= (priv_t
*)malloc(sizeof(priv_t
));
43 memset(h
->priv
, 0, sizeof(priv_t
));
45 h
->functions
= &functions
;
54 static void free_handle(tvi_handle_t
*h
)