Mercurial > mplayer.hg
annotate vidix/vidixlib.h @ 22858:6c57087c5a2d
checking for dynamic drivers version number is now pointless
author | ben |
---|---|
date | Sun, 01 Apr 2007 11:13:04 +0000 |
parents | 77def5093daf |
children | b9f09be55449 |
rev | line source |
---|---|
3991 | 1 /* |
2 * vidixlib.h | |
3 * VIDIXLib - Library for VIDeo Interface for *niX | |
4 * This interface is introduced as universal one to MPEG decoder, | |
5 * BES == Back End Scaler and YUV2RGB hw accelerators. | |
6 * In the future it may be expanded up to capturing and audio things. | |
7 * Main goal of this this interface imlpementation is providing DGA | |
8 * everywhere where it's possible (unlike X11 and other). | |
9 * Copyright 2002 Nick Kurshev | |
10 * Licence: GPL | |
11 * This interface is based on v4l2, fbvid.h, mga_vid.h projects | |
12 * and personally my ideas. | |
13 * NOTE: This interface is introduces as APP interface. | |
14 * Don't use it for driver. | |
15 * It provides multistreaming. This mean that APP can handle | |
16 * several streams simultaneously. (Example: Video capturing and video | |
17 * playback or capturing, video playback, audio encoding and so on). | |
18 */ | |
19 #ifndef VIDIXLIB_H | |
20 #define VIDIXLIB_H | |
21 | |
22 #ifdef __cplusplus | |
23 extern "C" { | |
24 #endif | |
25 | |
26 #include "vidix.h" | |
27 | |
22857
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
28 typedef struct VDXDriver { |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
29 const char *name; |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
30 struct VDXDriver *next; |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
31 int (* probe) (int verbose, int force); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
32 int (* get_caps) (vidix_capability_t *cap); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
33 int (*query_fourcc)(vidix_fourcc_t *); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
34 int (*init)(void); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
35 void (*destroy)(void); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
36 int (*config_playback)(vidix_playback_t *); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
37 int (*playback_on)( void ); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
38 int (*playback_off)( void ); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
39 /* Functions below can be missed in driver ;) */ |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
40 int (*frame_sel)( unsigned frame_idx ); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
41 int (*get_eq)( vidix_video_eq_t * ); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
42 int (*set_eq)( const vidix_video_eq_t * ); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
43 int (*get_deint)( vidix_deinterlace_t * ); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
44 int (*set_deint)( const vidix_deinterlace_t * ); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
45 int (*copy_frame)( const vidix_dma_t * ); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
46 int (*get_gkey)( vidix_grkey_t * ); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
47 int (*set_gkey)( const vidix_grkey_t * ); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
48 int (*get_num_fx)( unsigned * ); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
49 int (*get_fx)( vidix_oem_fx_t * ); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
50 int (*set_fx)( const vidix_oem_fx_t * ); |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
51 } VDXDriver; |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
52 |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
53 typedef struct VDXContext { |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
54 VDXDriver *drv; |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
55 /* might be filled in by much more info later on */ |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
56 } VDXContext; |
77def5093daf
switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
4191
diff
changeset
|
57 |
3991 | 58 typedef void * VDL_HANDLE; |
59 | |
60 /* returns library version */ | |
61 extern unsigned vdlGetVersion( void ); | |
62 | |
63 /* Opens corresponded video driver and returns handle | |
64 of associated stream. | |
65 path - specifies path where drivers are located. | |
66 name - specifies prefered driver name (can be NULL). | |
67 cap - specifies driver capability (TYPE_* constants). | |
3995 | 68 verbose - specifies verbose level |
3991 | 69 returns !0 if ok else NULL. |
70 */ | |
3995 | 71 extern VDL_HANDLE vdlOpen(const char *path,const char *name,unsigned cap,int verbose); |
3991 | 72 /* Closes stream and corresponded driver. */ |
73 extern void vdlClose(VDL_HANDLE stream); | |
74 | |
75 /* Queries driver capabilities. Return 0 if ok else errno */ | |
76 extern int vdlGetCapability(VDL_HANDLE, vidix_capability_t *); | |
77 | |
78 /* Queries support for given fourcc. Returns 0 if ok else errno */ | |
79 extern int vdlQueryFourcc(VDL_HANDLE,vidix_fourcc_t *); | |
80 | |
81 /* Returns 0 if ok else errno */ | |
3995 | 82 extern int vdlConfigPlayback(VDL_HANDLE, vidix_playback_t *); |
3991 | 83 |
84 /* Returns 0 if ok else errno */ | |
85 extern int vdlPlaybackOn(VDL_HANDLE); | |
86 | |
87 /* Returns 0 if ok else errno */ | |
88 extern int vdlPlaybackOff(VDL_HANDLE); | |
89 | |
90 /* Returns 0 if ok else errno */ | |
91 extern int vdlPlaybackFrameSelect(VDL_HANDLE, unsigned frame_idx ); | |
92 | |
93 /* Returns 0 if ok else errno */ | |
4070
b61ba6c256dd
Minor interface changes: color and video keys are moved out from playback configuring
nick
parents:
3995
diff
changeset
|
94 extern int vdlGetGrKeys(VDL_HANDLE, vidix_grkey_t * ); |
b61ba6c256dd
Minor interface changes: color and video keys are moved out from playback configuring
nick
parents:
3995
diff
changeset
|
95 |
b61ba6c256dd
Minor interface changes: color and video keys are moved out from playback configuring
nick
parents:
3995
diff
changeset
|
96 /* Returns 0 if ok else errno */ |
b61ba6c256dd
Minor interface changes: color and video keys are moved out from playback configuring
nick
parents:
3995
diff
changeset
|
97 extern int vdlSetGrKeys(VDL_HANDLE, const vidix_grkey_t * ); |
b61ba6c256dd
Minor interface changes: color and video keys are moved out from playback configuring
nick
parents:
3995
diff
changeset
|
98 |
b61ba6c256dd
Minor interface changes: color and video keys are moved out from playback configuring
nick
parents:
3995
diff
changeset
|
99 /* Returns 0 if ok else errno */ |
3991 | 100 extern int vdlPlaybackGetEq(VDL_HANDLE, vidix_video_eq_t * ); |
101 | |
102 /* Returns 0 if ok else errno */ | |
103 extern int vdlPlaybackSetEq(VDL_HANDLE, const vidix_video_eq_t * ); | |
104 | |
105 /* Returns 0 if ok else errno */ | |
4191 | 106 extern int vdlPlaybackGetDeint(VDL_HANDLE, vidix_deinterlace_t * ); |
107 | |
108 /* Returns 0 if ok else errno */ | |
109 extern int vdlPlaybackSetDeint(VDL_HANDLE, const vidix_deinterlace_t * ); | |
110 | |
111 /* Returns 0 if ok else errno */ | |
112 extern int vdlQueryNumOemEffects(VDL_HANDLE, unsigned * number ); | |
113 | |
114 /* Returns 0 if ok else errno */ | |
115 extern int vdlGetOemEffect(VDL_HANDLE, vidix_oem_fx_t * ); | |
116 | |
117 /* Returns 0 if ok else errno */ | |
118 extern int vdlSetOemEffect(VDL_HANDLE, const vidix_oem_fx_t * ); | |
119 | |
120 | |
121 /* Returns 0 if ok else errno */ | |
3991 | 122 extern int vdlPlaybackCopyFrame(VDL_HANDLE, const vidix_dma_t * ); |
123 | |
124 #ifdef __cplusplus | |
125 } | |
126 #endif | |
127 | |
128 #endif |