Mercurial > mplayer.hg
annotate vidix/drivers.c @ 23038:9525b6aac600
u_char is broken under mingw, use unsigned char instead, fix by aurel
author | ben |
---|---|
date | Sat, 21 Apr 2007 12:00:41 +0000 |
parents | 30341a2c2179 |
children | 82216ef041e0 |
rev | line source |
---|---|
22902 | 1 /* |
2 * Copyright (C) 2007 Benjamin Zores <ben@geexbox.org> | |
3 * Vidix drivers registry handler. | |
4 * | |
5 * This program is free software; you can redistribute it and/or modify | |
6 * it under the terms of the GNU General Public License as published by | |
7 * the Free Software Foundation; either version 2 of the License, or | |
8 * (at your option) any later version. | |
9 * | |
10 * This program is distributed in the hope that it will be useful, | |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 * GNU General Public License for more details. | |
14 * | |
15 * You should have received a copy of the GNU General Public License | |
16 * along with this program; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
18 */ | |
19 | |
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
|
20 #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
|
21 #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
|
22 #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
|
23 #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
|
24 |
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 "vidixlib.h" |
22905 | 26 #include "config.h" |
27 #include "libavutil/common.h" | |
28 #include "mpbswap.h" | |
22973 | 29 #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
|
30 |
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
|
31 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
|
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 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
|
34 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
|
35 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
|
36 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
|
37 extern VDXDriver nvidia_drv; |
22974
30341a2c2179
added vidix driver for Permedia2 cards from upstream vidix
ben
parents:
22973
diff
changeset
|
38 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
|
39 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
|
40 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
|
41 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
|
42 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
|
43 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
|
44 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
|
45 |
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 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
|
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 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
|
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 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
|
51 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
|
52 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
|
53 *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
|
54 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
|
55 } |
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 |
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 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
|
58 { |
22973 | 59 #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
|
60 vidix_register_driver (&cyberblade_drv); |
22973 | 61 #endif |
62 #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
|
63 vidix_register_driver (&mach64_drv); |
22973 | 64 #endif |
65 #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
|
66 vidix_register_driver (&mga_drv); |
22973 | 67 #endif |
68 #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
|
69 vidix_register_driver (&mga_crtc2_drv); |
22973 | 70 #endif |
71 #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
|
72 vidix_register_driver (&nvidia_drv); |
22973 | 73 #endif |
22974
30341a2c2179
added vidix driver for Permedia2 cards from upstream vidix
ben
parents:
22973
diff
changeset
|
74 #ifdef CONFIG_VIDIX_DRV_PM2 |
30341a2c2179
added vidix driver for Permedia2 cards from upstream vidix
ben
parents:
22973
diff
changeset
|
75 vidix_register_driver (&pm2_drv); |
30341a2c2179
added vidix driver for Permedia2 cards from upstream vidix
ben
parents:
22973
diff
changeset
|
76 #endif |
22973 | 77 #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
|
78 vidix_register_driver (&pm3_drv); |
22973 | 79 #endif |
80 #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
|
81 vidix_register_driver (&radeon_drv); |
22973 | 82 #endif |
83 #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
|
84 vidix_register_driver (&rage128_drv); |
22973 | 85 #endif |
86 #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
|
87 vidix_register_driver (&savage_drv); |
22973 | 88 #endif |
89 #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
|
90 vidix_register_driver (&sis_drv); |
22973 | 91 #endif |
92 #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
|
93 vidix_register_driver (&unichrome_drv); |
22973 | 94 #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
|
95 } |
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
|
96 |
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 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
|
98 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
|
99 { |
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 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
|
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 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
|
103 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
|
104 |
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 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
|
106 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
|
107 |
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 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
|
109 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
|
110 |
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 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
|
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 (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
|
114 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
|
115 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
|
116 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
|
117 } |
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 |
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 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
|
120 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
|
121 |
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 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
|
123 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
|
124 } |
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 |
22873
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
126 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
|
127 { |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
128 VDXDriver *drv; |
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 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
|
131 |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
132 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
|
133 while (drv) |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
134 { |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
135 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
|
136 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
|
137 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
|
138 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
|
139 } |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
140 } |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
141 |
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
|
142 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
|
143 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
|
144 { |
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 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
|
146 |
22878 | 147 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
|
148 { |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
149 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
|
150 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
|
151 return 0; |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
152 } |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
153 |
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
|
154 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
|
155 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
|
156 { |
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 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
|
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 (!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
|
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 (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
|
162 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
|
163 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
|
164 { |
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 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
|
166 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
|
167 } |
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 } |
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 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
|
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 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
|
173 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
|
174 } |
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 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
|
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 |
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 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
|
179 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
|
180 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
|
181 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
|
182 } |