Mercurial > mplayer.hg
annotate vidix/vidixlib.h @ 26877:4ab1cfcee430
Add a slave command to stop stream playback.
Mostly useful when used with -idle mode.
Patch by Mathieu Schroeter ( mathieu dot schroeter at gamesover dot ch )
author | ben |
---|---|
date | Tue, 27 May 2008 18:39:57 +0000 |
parents | 3abd1629658b |
children | 553265fda2a6 |
rev | line source |
---|---|
3991 | 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 | 31 * You should have received a copy of the GNU General Public License along |
32 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
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 | 36 #ifndef MPLAYER_VIDIXLIB_H |
37 #define MPLAYER_VIDIXLIB_H | |
3991 | 38 |
39 #ifdef __cplusplus | |
40 extern "C" { | |
41 #endif | |
42 | |
43 #include "vidix.h" | |
44 | |
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
|
45 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
|
46 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
|
47 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
|
48 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
|
49 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
|
50 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
|
51 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
|
52 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
|
53 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
|
54 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
|
55 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
|
56 /* 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
|
57 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
|
58 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
|
59 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
|
60 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
|
61 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
|
62 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
|
63 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
|
64 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
|
65 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
|
66 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
|
67 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
|
68 } 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
|
69 |
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 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
|
71 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
|
72 /* 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
|
73 } 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
|
74 |
22865
441582f3ed87
simplified function prototypes to avoid casts but keep external API compatibility
ben
parents:
22862
diff
changeset
|
75 typedef VDXContext * VDL_HANDLE; |
3991 | 76 |
77 /* returns library version */ | |
22862 | 78 unsigned vdlGetVersion( void ); |
3991 | 79 |
80 /* Opens corresponded video driver and returns handle | |
81 of associated stream. | |
82 path - specifies path where drivers are located. | |
83 name - specifies prefered driver name (can be NULL). | |
84 cap - specifies driver capability (TYPE_* constants). | |
3995 | 85 verbose - specifies verbose level |
3991 | 86 returns !0 if ok else NULL. |
87 */ | |
22862 | 88 VDL_HANDLE vdlOpen(const char *path,const char *name,unsigned cap,int verbose); |
3991 | 89 /* Closes stream and corresponded driver. */ |
22865
441582f3ed87
simplified function prototypes to avoid casts but keep external API compatibility
ben
parents:
22862
diff
changeset
|
90 void vdlClose(VDL_HANDLE ctx); |
3991 | 91 |
92 /* Queries driver capabilities. Return 0 if ok else errno */ | |
22862 | 93 int vdlGetCapability(VDL_HANDLE, vidix_capability_t *); |
3991 | 94 |
95 /* Queries support for given fourcc. Returns 0 if ok else errno */ | |
22862 | 96 int vdlQueryFourcc(VDL_HANDLE,vidix_fourcc_t *); |
3991 | 97 |
98 /* Returns 0 if ok else errno */ | |
22862 | 99 int vdlConfigPlayback(VDL_HANDLE, vidix_playback_t *); |
3991 | 100 |
101 /* Returns 0 if ok else errno */ | |
22862 | 102 int vdlPlaybackOn(VDL_HANDLE); |
3991 | 103 |
104 /* Returns 0 if ok else errno */ | |
22862 | 105 int vdlPlaybackOff(VDL_HANDLE); |
3991 | 106 |
107 /* Returns 0 if ok else errno */ | |
22862 | 108 int vdlPlaybackFrameSelect(VDL_HANDLE, unsigned frame_idx ); |
3991 | 109 |
110 /* Returns 0 if ok else errno */ | |
22862 | 111 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
|
112 |
b61ba6c256dd
Minor interface changes: color and video keys are moved out from playback configuring
nick
parents:
3995
diff
changeset
|
113 /* Returns 0 if ok else errno */ |
22862 | 114 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
|
115 |
b61ba6c256dd
Minor interface changes: color and video keys are moved out from playback configuring
nick
parents:
3995
diff
changeset
|
116 /* Returns 0 if ok else errno */ |
22862 | 117 int vdlPlaybackGetEq(VDL_HANDLE, vidix_video_eq_t * ); |
3991 | 118 |
119 /* Returns 0 if ok else errno */ | |
22862 | 120 int vdlPlaybackSetEq(VDL_HANDLE, const vidix_video_eq_t * ); |
3991 | 121 |
122 /* Returns 0 if ok else errno */ | |
22862 | 123 int vdlPlaybackGetDeint(VDL_HANDLE, vidix_deinterlace_t * ); |
4191 | 124 |
125 /* Returns 0 if ok else errno */ | |
22862 | 126 int vdlPlaybackSetDeint(VDL_HANDLE, const vidix_deinterlace_t * ); |
4191 | 127 |
128 /* Returns 0 if ok else errno */ | |
22862 | 129 int vdlQueryNumOemEffects(VDL_HANDLE, unsigned * number ); |
4191 | 130 |
131 /* Returns 0 if ok else errno */ | |
22862 | 132 int vdlGetOemEffect(VDL_HANDLE, vidix_oem_fx_t * ); |
4191 | 133 |
134 /* Returns 0 if ok else errno */ | |
22862 | 135 int vdlSetOemEffect(VDL_HANDLE, const vidix_oem_fx_t * ); |
4191 | 136 |
137 | |
138 /* Returns 0 if ok else errno */ | |
22862 | 139 int vdlPlaybackCopyFrame(VDL_HANDLE, const vidix_dma_t * ); |
3991 | 140 |
141 #ifdef __cplusplus | |
142 } | |
143 #endif | |
144 | |
26030 | 145 #endif /* MPLAYER_VIDIXLIB_H */ |