annotate vidix/vidixlib.h @ 23617:ecb7d0fc3dad

Another unneeded xinerama_screen extern
author reimar
date Sun, 24 Jun 2007 10:59:53 +0000
parents 82216ef041e0
children 3baf6a2283da
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
1 /*
23046
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
2 * VIDIX - VIDeo Interface for *niX.
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
3 * Copyright (C) 2002 Nick Kurshev
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
4 * Copyright (C) 2007 Benjamin Zores <ben@geexbox.org>
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
5 *
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
6 * This file is part of MPlayer.
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
7 *
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
8 * MPlayer is free software; you can redistribute it and/or modify
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
9 * it under the terms of the GNU General Public License as published by
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
11 * (at your option) any later version.
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
12 *
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
13 * MPlayer is distributed in the hope that it will be useful,
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
16 * GNU General Public License for more details.
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
17 *
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
18 * You should have received a copy of the GNU General Public License
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
19 * along with MPlayer; if not, write to the Free Software
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
21 *
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
22 * This interface is introduced as universal one to MPEG decoder,
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
23 * Back End Scaler (BES) and YUV2RGB hw accelerators.
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
24 *
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
25 * In the future it may be expanded up to capturing and audio things.
dcc632dd2097 preliminary version
nick
parents:
diff changeset
26 * Main goal of this this interface imlpementation is providing DGA
dcc632dd2097 preliminary version
nick
parents:
diff changeset
27 * everywhere where it's possible (unlike X11 and other).
23046
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
28 *
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
29 * This interface is based on v4l2, fbvid.h, mga_vid.h projects
dcc632dd2097 preliminary version
nick
parents:
diff changeset
30 * and personally my ideas.
23046
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
31 *
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
32 * NOTE: This interface is introduces as driver interface.
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
33 */
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
34
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
35 #ifndef VIDIXLIB_H
dcc632dd2097 preliminary version
nick
parents:
diff changeset
36 #define VIDIXLIB_H
dcc632dd2097 preliminary version
nick
parents:
diff changeset
37
dcc632dd2097 preliminary version
nick
parents:
diff changeset
38 #ifdef __cplusplus
dcc632dd2097 preliminary version
nick
parents:
diff changeset
39 extern "C" {
dcc632dd2097 preliminary version
nick
parents:
diff changeset
40 #endif
dcc632dd2097 preliminary version
nick
parents:
diff changeset
41
dcc632dd2097 preliminary version
nick
parents:
diff changeset
42 #include "vidix.h"
dcc632dd2097 preliminary version
nick
parents:
diff changeset
43
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
44 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
45 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
46 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
47 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
48 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
49 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
50 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
51 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
52 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
53 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
54 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
55 /* 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
56 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
57 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
58 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
59 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
60 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
61 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
62 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
63 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
64 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
65 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
66 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
67 } 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
68
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
69 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
70 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
71 /* 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
72 } 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
73
22865
441582f3ed87 simplified function prototypes to avoid casts but keep external API compatibility
ben
parents: 22862
diff changeset
74 typedef VDXContext * VDL_HANDLE;
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
75
dcc632dd2097 preliminary version
nick
parents:
diff changeset
76 /* returns library version */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
77 unsigned vdlGetVersion( void );
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
78
dcc632dd2097 preliminary version
nick
parents:
diff changeset
79 /* Opens corresponded video driver and returns handle
dcc632dd2097 preliminary version
nick
parents:
diff changeset
80 of associated stream.
dcc632dd2097 preliminary version
nick
parents:
diff changeset
81 path - specifies path where drivers are located.
dcc632dd2097 preliminary version
nick
parents:
diff changeset
82 name - specifies prefered driver name (can be NULL).
dcc632dd2097 preliminary version
nick
parents:
diff changeset
83 cap - specifies driver capability (TYPE_* constants).
3995
0d9de811e312 minor interface changing
nick
parents: 3991
diff changeset
84 verbose - specifies verbose level
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
85 returns !0 if ok else NULL.
dcc632dd2097 preliminary version
nick
parents:
diff changeset
86 */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
87 VDL_HANDLE vdlOpen(const char *path,const char *name,unsigned cap,int verbose);
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
88 /* Closes stream and corresponded driver. */
22865
441582f3ed87 simplified function prototypes to avoid casts but keep external API compatibility
ben
parents: 22862
diff changeset
89 void vdlClose(VDL_HANDLE ctx);
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
90
dcc632dd2097 preliminary version
nick
parents:
diff changeset
91 /* Queries driver capabilities. Return 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
92 int vdlGetCapability(VDL_HANDLE, vidix_capability_t *);
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
93
dcc632dd2097 preliminary version
nick
parents:
diff changeset
94 /* Queries support for given fourcc. Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
95 int vdlQueryFourcc(VDL_HANDLE,vidix_fourcc_t *);
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
96
dcc632dd2097 preliminary version
nick
parents:
diff changeset
97 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
98 int vdlConfigPlayback(VDL_HANDLE, vidix_playback_t *);
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
99
dcc632dd2097 preliminary version
nick
parents:
diff changeset
100 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
101 int vdlPlaybackOn(VDL_HANDLE);
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
102
dcc632dd2097 preliminary version
nick
parents:
diff changeset
103 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
104 int vdlPlaybackOff(VDL_HANDLE);
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
105
dcc632dd2097 preliminary version
nick
parents:
diff changeset
106 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
107 int vdlPlaybackFrameSelect(VDL_HANDLE, unsigned frame_idx );
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
108
dcc632dd2097 preliminary version
nick
parents:
diff changeset
109 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
110 int vdlGetGrKeys(VDL_HANDLE, vidix_grkey_t * );
4070
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 3995
diff changeset
111
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 3995
diff changeset
112 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
113 int vdlSetGrKeys(VDL_HANDLE, const vidix_grkey_t * );
4070
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 3995
diff changeset
114
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 3995
diff changeset
115 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
116 int vdlPlaybackGetEq(VDL_HANDLE, vidix_video_eq_t * );
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
117
dcc632dd2097 preliminary version
nick
parents:
diff changeset
118 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
119 int vdlPlaybackSetEq(VDL_HANDLE, const vidix_video_eq_t * );
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
120
dcc632dd2097 preliminary version
nick
parents:
diff changeset
121 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
122 int vdlPlaybackGetDeint(VDL_HANDLE, vidix_deinterlace_t * );
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
123
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
124 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
125 int vdlPlaybackSetDeint(VDL_HANDLE, const vidix_deinterlace_t * );
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
126
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
127 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
128 int vdlQueryNumOemEffects(VDL_HANDLE, unsigned * number );
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
129
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
130 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
131 int vdlGetOemEffect(VDL_HANDLE, vidix_oem_fx_t * );
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
132
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
133 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
134 int vdlSetOemEffect(VDL_HANDLE, const vidix_oem_fx_t * );
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
135
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
136
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
137 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
138 int vdlPlaybackCopyFrame(VDL_HANDLE, const vidix_dma_t * );
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
139
dcc632dd2097 preliminary version
nick
parents:
diff changeset
140 #ifdef __cplusplus
dcc632dd2097 preliminary version
nick
parents:
diff changeset
141 }
dcc632dd2097 preliminary version
nick
parents:
diff changeset
142 #endif
dcc632dd2097 preliminary version
nick
parents:
diff changeset
143
dcc632dd2097 preliminary version
nick
parents:
diff changeset
144 #endif