Mercurial > mplayer.hg
annotate vidix/drivers.c @ 23172:37cf8cb6d6a3
Make a function static.
author | eugeni |
---|---|
date | Tue, 01 May 2007 15:07:41 +0000 |
parents | 82216ef041e0 |
children | 17fcd644f32e |
rev | line source |
---|---|
22902 | 1 /* |
23046
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22974
diff
changeset
|
2 * VIDIX Drivers Registry Handler. |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22974
diff
changeset
|
3 * Copyright (C) 2007 Benjamin Zores <ben@geexbox.org> |
22902 | 4 * |
23046
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22974
diff
changeset
|
5 * This file is part of MPlayer. |
22902 | 6 * |
23046
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22974
diff
changeset
|
7 * 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:
22974
diff
changeset
|
8 * 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:
22974
diff
changeset
|
9 * 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:
22974
diff
changeset
|
10 * (at your option) any later version. |
22902 | 11 * |
23046
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22974
diff
changeset
|
12 * 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:
22974
diff
changeset
|
13 * 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:
22974
diff
changeset
|
14 * 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:
22974
diff
changeset
|
15 * GNU General Public License for more details. |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22974
diff
changeset
|
16 * |
82216ef041e0
updated vidix files headers whenever it's possible to have a clear GPL statement
ben
parents:
22974
diff
changeset
|
17 * 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:
22974
diff
changeset
|
18 * 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:
22974
diff
changeset
|
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
22902 | 20 */ |
21 | |
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:
diff
changeset
|
22 #include <stdlib.h> |
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:
diff
changeset
|
23 #include <stdio.h> |
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:
diff
changeset
|
24 #include <errno.h> |
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:
diff
changeset
|
25 #include <string.h> |
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:
diff
changeset
|
26 |
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:
diff
changeset
|
27 #include "vidixlib.h" |
22905 | 28 #include "config.h" |
29 #include "libavutil/common.h" | |
30 #include "mpbswap.h" | |
22973 | 31 #include "config.h" |
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:
diff
changeset
|
32 |
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:
diff
changeset
|
33 VDXDriver *first_driver = NULL; |
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:
diff
changeset
|
34 |
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:
diff
changeset
|
35 extern VDXDriver cyberblade_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:
diff
changeset
|
36 extern VDXDriver mach64_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:
diff
changeset
|
37 extern VDXDriver mga_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:
diff
changeset
|
38 extern VDXDriver mga_crtc2_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:
diff
changeset
|
39 extern VDXDriver nvidia_drv; |
22974
30341a2c2179
added vidix driver for Permedia2 cards from upstream vidix
ben
parents:
22973
diff
changeset
|
40 extern VDXDriver pm2_drv; |
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:
diff
changeset
|
41 extern VDXDriver pm3_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:
diff
changeset
|
42 extern VDXDriver radeon_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:
diff
changeset
|
43 extern VDXDriver rage128_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:
diff
changeset
|
44 extern VDXDriver savage_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:
diff
changeset
|
45 extern VDXDriver sis_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:
diff
changeset
|
46 extern VDXDriver unichrome_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:
diff
changeset
|
47 |
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:
diff
changeset
|
48 static void vidix_register_driver (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:
diff
changeset
|
49 { |
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:
diff
changeset
|
50 VDXDriver **d; |
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:
diff
changeset
|
51 |
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:
diff
changeset
|
52 d = &first_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:
diff
changeset
|
53 while (*d != NULL) |
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:
diff
changeset
|
54 d = &(*d)->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:
diff
changeset
|
55 *d = 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:
diff
changeset
|
56 drv->next = NULL; |
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:
diff
changeset
|
57 } |
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:
diff
changeset
|
58 |
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:
diff
changeset
|
59 void vidix_register_all_drivers (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:
diff
changeset
|
60 { |
22973 | 61 #ifdef CONFIG_VIDIX_DRV_CYBERBLADE |
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:
diff
changeset
|
62 vidix_register_driver (&cyberblade_drv); |
22973 | 63 #endif |
64 #ifdef CONFIG_VIDIX_DRV_MACH64 | |
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:
diff
changeset
|
65 vidix_register_driver (&mach64_drv); |
22973 | 66 #endif |
67 #ifdef CONFIG_VIDIX_DRV_MGA | |
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:
diff
changeset
|
68 vidix_register_driver (&mga_drv); |
22973 | 69 #endif |
70 #ifdef CONFIG_VIDIX_DRV_MGA_CRTC2 | |
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:
diff
changeset
|
71 vidix_register_driver (&mga_crtc2_drv); |
22973 | 72 #endif |
73 #ifdef CONFIG_VIDIX_DRV_NVIDIA | |
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:
diff
changeset
|
74 vidix_register_driver (&nvidia_drv); |
22973 | 75 #endif |
22974
30341a2c2179
added vidix driver for Permedia2 cards from upstream vidix
ben
parents:
22973
diff
changeset
|
76 #ifdef CONFIG_VIDIX_DRV_PM2 |
30341a2c2179
added vidix driver for Permedia2 cards from upstream vidix
ben
parents:
22973
diff
changeset
|
77 vidix_register_driver (&pm2_drv); |
30341a2c2179
added vidix driver for Permedia2 cards from upstream vidix
ben
parents:
22973
diff
changeset
|
78 #endif |
22973 | 79 #ifdef CONFIG_VIDIX_DRV_PM3 |
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:
diff
changeset
|
80 vidix_register_driver (&pm3_drv); |
22973 | 81 #endif |
82 #ifdef CONFIG_VIDIX_DRV_RADEON | |
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:
diff
changeset
|
83 vidix_register_driver (&radeon_drv); |
22973 | 84 #endif |
85 #ifdef CONFIG_VIDIX_DRV_RAGE128 | |
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:
diff
changeset
|
86 vidix_register_driver (&rage128_drv); |
22973 | 87 #endif |
88 #ifdef CONFIG_VIDIX_DRV_SAVAGE | |
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:
diff
changeset
|
89 vidix_register_driver (&savage_drv); |
22973 | 90 #endif |
91 #ifdef CONFIG_VIDIX_DRV_SIS | |
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:
diff
changeset
|
92 vidix_register_driver (&sis_drv); |
22973 | 93 #endif |
94 #ifdef CONFIG_VIDIX_DRV_UNICHROME | |
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:
diff
changeset
|
95 vidix_register_driver (&unichrome_drv); |
22973 | 96 #endif |
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:
diff
changeset
|
97 } |
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:
diff
changeset
|
98 |
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:
diff
changeset
|
99 static int vidix_probe_driver (VDXContext *ctx, 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:
diff
changeset
|
100 unsigned int cap, int verbose) |
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:
diff
changeset
|
101 { |
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:
diff
changeset
|
102 vidix_capability_t vid_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:
diff
changeset
|
103 |
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:
diff
changeset
|
104 if (verbose) |
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:
diff
changeset
|
105 printf ("vidixlib: PROBING: %s\n", drv->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:
diff
changeset
|
106 |
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:
diff
changeset
|
107 if (!drv->probe || drv->probe (verbose, PROBE_NORMAL) != 0) |
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:
diff
changeset
|
108 return 0; |
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:
diff
changeset
|
109 |
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:
diff
changeset
|
110 if (!drv->get_caps || drv->get_caps (&vid_cap) != 0) |
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:
diff
changeset
|
111 return 0; |
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:
diff
changeset
|
112 |
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:
diff
changeset
|
113 if ((vid_cap.type & cap) != 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:
diff
changeset
|
114 { |
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:
diff
changeset
|
115 if (verbose) |
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:
diff
changeset
|
116 printf ("vidixlib: Found %s but has no required capability\n", |
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:
diff
changeset
|
117 drv->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:
diff
changeset
|
118 return 0; |
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:
diff
changeset
|
119 } |
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:
diff
changeset
|
120 |
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:
diff
changeset
|
121 if (verbose) |
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:
diff
changeset
|
122 printf ("vidixlib: %s probed o'k\n", drv->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:
diff
changeset
|
123 |
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:
diff
changeset
|
124 ctx->drv = 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:
diff
changeset
|
125 return 1; |
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:
diff
changeset
|
126 } |
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:
diff
changeset
|
127 |
22873
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
128 static void vidix_list_drivers (void) |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
129 { |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
130 VDXDriver *drv; |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
131 |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
132 printf ("Available VIDIX drivers:\n"); |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
133 |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
134 drv = first_driver; |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
135 while (drv) |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
136 { |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
137 vidix_capability_t cap; |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
138 drv->get_caps (&cap); |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
139 printf (" * %s - %s\n", drv->name, cap.name); |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
140 drv = drv->next; |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
141 } |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
142 } |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
143 |
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:
diff
changeset
|
144 int vidix_find_driver (VDXContext *ctx, 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:
diff
changeset
|
145 unsigned int cap, int verbose) |
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:
diff
changeset
|
146 { |
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:
diff
changeset
|
147 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:
diff
changeset
|
148 |
22878 | 149 if (name && !strcmp (name, "help")) |
22873
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
150 { |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
151 vidix_list_drivers (); |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
152 ctx->drv = NULL; |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
153 return 0; |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
154 } |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
155 |
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:
diff
changeset
|
156 drv = first_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:
diff
changeset
|
157 while (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:
diff
changeset
|
158 { |
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:
diff
changeset
|
159 if (name) /* forced 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:
diff
changeset
|
160 { |
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:
diff
changeset
|
161 if (!strcmp (drv->name, 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:
diff
changeset
|
162 { |
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:
diff
changeset
|
163 if (vidix_probe_driver (ctx, drv, cap, verbose)) |
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:
diff
changeset
|
164 return 1; |
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:
diff
changeset
|
165 else |
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:
diff
changeset
|
166 { |
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:
diff
changeset
|
167 ctx->drv = NULL; |
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:
diff
changeset
|
168 return 0; |
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:
diff
changeset
|
169 } |
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:
diff
changeset
|
170 } |
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:
diff
changeset
|
171 } |
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:
diff
changeset
|
172 else /* auto-probe */ |
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:
diff
changeset
|
173 { |
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:
diff
changeset
|
174 if (vidix_probe_driver (ctx, drv, cap, verbose)) |
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:
diff
changeset
|
175 return 1; |
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:
diff
changeset
|
176 } |
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:
diff
changeset
|
177 drv = drv->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:
diff
changeset
|
178 } |
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:
diff
changeset
|
179 |
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:
diff
changeset
|
180 if (verbose) |
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:
diff
changeset
|
181 printf ("vidixlib: No suitable driver can be found.\n"); |
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:
diff
changeset
|
182 ctx->drv = NULL; |
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:
diff
changeset
|
183 return 0; |
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:
diff
changeset
|
184 } |