Mercurial > mplayer.hg
annotate libmpdemux/tvi_def.h @ 7099:0b70f3dc34eb
Applied patch by Andras Mohari <mayday@varoshaza.nagyatad.hu>, with some
small additions.
* Replaced <UL> with <OL> where it made sense (to me :-)).
* Moved "Developer Cries" into the appendix (as Appendix F)
with s/Flame Wars/Developer Cries/ and
s/In medias res/Developer Cries/.
* Renamed "Appendix X" to "Appendix E".
* Put a "Hint" inside <BLOCKQUOTE>.
* Converted 3-pass encoding and mga_vid installation
instructions to lists.
* Converted options tables (video eq, SDL, fbdev, VESA, DXR3, TV input,
DivX4Linux, AAlib) to <DL> lists.
* The "sections" for MPsub and INSTALLING OSD are numbered and displayed
in the TOC now.
* Changed the text inside some <H4> tags.
author | diego |
---|---|
date | Tue, 27 Aug 2002 18:06:07 +0000 |
parents | 8cd761968f35 |
children | 9fc45fe0d444 |
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); |
5572
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
3815
diff
changeset
|
7 static double grab_video_frame(priv_t *priv, char *buffer, int len); |
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
3815
diff
changeset
|
8 #ifdef HAVE_TV_BSDBT848 |
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
3815
diff
changeset
|
9 static double grabimmediate_video_frame(priv_t *priv, char *buffer, int len); |
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
3815
diff
changeset
|
10 #endif |
2790 | 11 static int get_video_framesize(priv_t *priv); |
5572
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
3815
diff
changeset
|
12 static double grab_audio_frame(priv_t *priv, char *buffer, int len); |
2790 | 13 static int get_audio_framesize(priv_t *priv); |
14 | |
15 static tvi_functions_t functions = | |
16 { | |
17 init, | |
2802 | 18 uninit, |
2790 | 19 control, |
2802 | 20 start, |
2790 | 21 grab_video_frame, |
5572
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
3815
diff
changeset
|
22 #ifdef HAVE_TV_BSDBT848 |
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
3815
diff
changeset
|
23 grabimmediate_video_frame, |
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
3815
diff
changeset
|
24 #endif |
2790 | 25 get_video_framesize, |
26 grab_audio_frame, | |
27 get_audio_framesize | |
28 }; | |
29 | |
30 static tvi_handle_t *new_handle() | |
31 { | |
2819
2e58962dc9fe
cleaned up some warnings, and tv_param_on moved out from #ifdef USE_TV
alex
parents:
2802
diff
changeset
|
32 tvi_handle_t *h = (tvi_handle_t *)malloc(sizeof(tvi_handle_t)); |
2790 | 33 |
34 if (!h) | |
35 return(NULL); | |
2802 | 36 h->priv = (priv_t *)malloc(sizeof(priv_t)); |
2790 | 37 if (!h->priv) |
38 { | |
39 free(h); | |
40 return(NULL); | |
41 } | |
42 memset(h->priv, 0, sizeof(priv_t)); | |
43 h->info = &info; | |
44 h->functions = &functions; | |
2802 | 45 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
|
46 h->chanlist = -1; |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2819
diff
changeset
|
47 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
|
48 h->norm = -1; |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2819
diff
changeset
|
49 h->channel = -1; |
2790 | 50 return(h); |
51 } | |
52 | |
53 static void free_handle(tvi_handle_t *h) | |
54 { | |
3611 | 55 if (h) { |
56 if (h->priv) | |
57 free(h->priv); | |
2790 | 58 free(h); |
3611 | 59 } |
2790 | 60 } |