annotate vidix/vidixlib.h @ 26979:caa5f90c7cb0

remove C++ inclusion guard from vidix headers
author ben
date Sat, 07 Jun 2008 11:47:33 +0000
parents 0e250247255f
children 3dccfe530193
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.
26718
051b2632f121 consistency cosmetics: Move some parts of file headers around; typo fixes.
diego
parents: 26030
diff changeset
3 *
051b2632f121 consistency cosmetics: Move some parts of file headers around; typo fixes.
diego
parents: 26030
diff changeset
4 * This interface is introduced as universal one to MPEG decoder,
051b2632f121 consistency cosmetics: Move some parts of file headers around; typo fixes.
diego
parents: 26030
diff changeset
5 * Back End Scaler (BES) and YUV2RGB hw accelerators.
051b2632f121 consistency cosmetics: Move some parts of file headers around; typo fixes.
diego
parents: 26030
diff changeset
6 *
051b2632f121 consistency cosmetics: Move some parts of file headers around; typo fixes.
diego
parents: 26030
diff changeset
7 * In the future it may be expanded up to capturing and audio things.
051b2632f121 consistency cosmetics: Move some parts of file headers around; typo fixes.
diego
parents: 26030
diff changeset
8 * Main goal of this this interface imlpementation is providing DGA
051b2632f121 consistency cosmetics: Move some parts of file headers around; typo fixes.
diego
parents: 26030
diff changeset
9 * everywhere where it's possible (unlike X11 and other).
051b2632f121 consistency cosmetics: Move some parts of file headers around; typo fixes.
diego
parents: 26030
diff changeset
10 *
051b2632f121 consistency cosmetics: Move some parts of file headers around; typo fixes.
diego
parents: 26030
diff changeset
11 * This interface is based on v4l2, fbvid.h, mga_vid.h projects
051b2632f121 consistency cosmetics: Move some parts of file headers around; typo fixes.
diego
parents: 26030
diff changeset
12 * and personally my ideas.
051b2632f121 consistency cosmetics: Move some parts of file headers around; typo fixes.
diego
parents: 26030
diff changeset
13 *
051b2632f121 consistency cosmetics: Move some parts of file headers around; typo fixes.
diego
parents: 26030
diff changeset
14 * NOTE: This interface is introduced as driver interface.
051b2632f121 consistency cosmetics: Move some parts of file headers around; typo fixes.
diego
parents: 26030
diff changeset
15 *
23046
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
16 * 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
17 * 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
18 *
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
19 * 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
20 *
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
21 * 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
22 * 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
23 * 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
24 * (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
25 *
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
26 * 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
27 * 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
28 * 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
29 * 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
30 *
26719
3abd1629658b Use standard license headers.
diego
parents: 26718
diff changeset
31 * You should have received a copy of the GNU General Public License along
3abd1629658b Use standard license headers.
diego
parents: 26718
diff changeset
32 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
3abd1629658b Use standard license headers.
diego
parents: 26718
diff changeset
33 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23046
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
34 */
82216ef041e0 updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents: 22902
diff changeset
35
26030
a93e46adb54c Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
36 #ifndef MPLAYER_VIDIXLIB_H
a93e46adb54c Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
37 #define MPLAYER_VIDIXLIB_H
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
38
dcc632dd2097 preliminary version
nick
parents:
diff changeset
39 #include "vidix.h"
dcc632dd2097 preliminary version
nick
parents:
diff changeset
40
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
41 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
42 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
43 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
44 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
45 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
46 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
47 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
48 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
49 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
50 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
51 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
52 /* 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
53 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
54 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
55 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
56 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
57 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
58 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
59 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
60 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
61 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
62 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
63 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
64 } 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
65
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 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
67 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
68 /* 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
69 } 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
22865
441582f3ed87 simplified function prototypes to avoid casts but keep external API compatibility
ben
parents: 22862
diff changeset
71 typedef VDXContext * VDL_HANDLE;
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
72
dcc632dd2097 preliminary version
nick
parents:
diff changeset
73 /* Opens corresponded video driver and returns handle
dcc632dd2097 preliminary version
nick
parents:
diff changeset
74 of associated stream.
dcc632dd2097 preliminary version
nick
parents:
diff changeset
75 path - specifies path where drivers are located.
dcc632dd2097 preliminary version
nick
parents:
diff changeset
76 name - specifies prefered driver name (can be NULL).
dcc632dd2097 preliminary version
nick
parents:
diff changeset
77 cap - specifies driver capability (TYPE_* constants).
3995
0d9de811e312 minor interface changing
nick
parents: 3991
diff changeset
78 verbose - specifies verbose level
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
79 returns !0 if ok else NULL.
dcc632dd2097 preliminary version
nick
parents:
diff changeset
80 */
26975
553265fda2a6 Drop some useless parameter from vidix init routine
ben
parents: 26719
diff changeset
81 VDL_HANDLE vdlOpen(const char *name,unsigned cap,int verbose);
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
82 /* Closes stream and corresponded driver. */
22865
441582f3ed87 simplified function prototypes to avoid casts but keep external API compatibility
ben
parents: 22862
diff changeset
83 void vdlClose(VDL_HANDLE ctx);
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
84
dcc632dd2097 preliminary version
nick
parents:
diff changeset
85 /* Queries driver capabilities. Return 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
86 int vdlGetCapability(VDL_HANDLE, vidix_capability_t *);
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
87
dcc632dd2097 preliminary version
nick
parents:
diff changeset
88 /* Queries support for given fourcc. Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
89 int vdlQueryFourcc(VDL_HANDLE,vidix_fourcc_t *);
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
90
dcc632dd2097 preliminary version
nick
parents:
diff changeset
91 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
92 int vdlConfigPlayback(VDL_HANDLE, vidix_playback_t *);
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
93
dcc632dd2097 preliminary version
nick
parents:
diff changeset
94 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
95 int vdlPlaybackOn(VDL_HANDLE);
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 vdlPlaybackOff(VDL_HANDLE);
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 vdlPlaybackFrameSelect(VDL_HANDLE, unsigned frame_idx );
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 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
105
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 3995
diff changeset
106 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
107 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
108
b61ba6c256dd Minor interface changes: color and video keys are moved out from playback configuring
nick
parents: 3995
diff changeset
109 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
110 int vdlPlaybackGetEq(VDL_HANDLE, vidix_video_eq_t * );
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
111
dcc632dd2097 preliminary version
nick
parents:
diff changeset
112 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
113 int vdlPlaybackSetEq(VDL_HANDLE, const vidix_video_eq_t * );
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
114
dcc632dd2097 preliminary version
nick
parents:
diff changeset
115 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
116 int vdlPlaybackGetDeint(VDL_HANDLE, vidix_deinterlace_t * );
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
117
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
118 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
119 int vdlPlaybackSetDeint(VDL_HANDLE, const vidix_deinterlace_t * );
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
120
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
121 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
122 int vdlQueryNumOemEffects(VDL_HANDLE, unsigned * number );
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 vdlGetOemEffect(VDL_HANDLE, vidix_oem_fx_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 vdlSetOemEffect(VDL_HANDLE, const vidix_oem_fx_t * );
4191
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
129
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
130
62a6135d090e + new features and possibility
nick
parents: 4070
diff changeset
131 /* Returns 0 if ok else errno */
22862
b9f09be55449 useless externs
ben
parents: 22858
diff changeset
132 int vdlPlaybackCopyFrame(VDL_HANDLE, const vidix_dma_t * );
3991
dcc632dd2097 preliminary version
nick
parents:
diff changeset
133
26030
a93e46adb54c Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
134 #endif /* MPLAYER_VIDIXLIB_H */