Mercurial > mplayer.hg
annotate vidix/drivers.c @ 34794:4e599d846a1f
Revert r34881: The change was wrong.
author | cehoyos |
---|---|
date | Mon, 30 Apr 2012 10:19:11 +0000 |
parents | ddab7b946042 |
children | 3c5c93a30fb7 |
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 * |
26719 | 17 * You should have received a copy of the GNU General Public License along |
18 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
19 * 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 |
26203 | 27 #include "config.h" |
27079 | 28 #include "vidix.h" |
30550 | 29 #include "drivers.h" |
22905 | 30 #include "libavutil/common.h" |
31 #include "mpbswap.h" | |
22973 | 32 #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
|
33 |
77def5093daf
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 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
|
35 |
77def5093daf
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 cyberblade_drv; |
23275
17fcd644f32e
new VIDIX driver for IVTV cards, original patch by Lutz Koschorreck
ben
parents:
23046
diff
changeset
|
37 extern VDXDriver ivtv_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
|
38 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
|
39 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
|
40 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
|
41 extern VDXDriver nvidia_drv; |
22974
30341a2c2179
added vidix driver for Permedia2 cards from upstream vidix
ben
parents:
22973
diff
changeset
|
42 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
|
43 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
|
44 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
|
45 extern VDXDriver rage128_drv; |
26096 | 46 extern VDXDriver s3_drv; |
27420
917c93c652b0
Add VIDIX driver for SuperH Mobile VEU hardware block.
ben
parents:
27079
diff
changeset
|
47 extern VDXDriver sh_veu_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
|
48 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
|
49 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
|
50 |
77def5093daf
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 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
|
52 { |
77def5093daf
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 VDXDriver **d; |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27420
diff
changeset
|
54 |
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
|
55 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
|
56 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
|
57 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
|
58 *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
|
59 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
|
60 } |
77def5093daf
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
|
61 |
77def5093daf
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 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
|
63 { |
22973 | 64 #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
|
65 vidix_register_driver (&cyberblade_drv); |
22973 | 66 #endif |
23275
17fcd644f32e
new VIDIX driver for IVTV cards, original patch by Lutz Koschorreck
ben
parents:
23046
diff
changeset
|
67 #ifdef CONFIG_VIDIX_DRV_IVTV |
17fcd644f32e
new VIDIX driver for IVTV cards, original patch by Lutz Koschorreck
ben
parents:
23046
diff
changeset
|
68 vidix_register_driver (&ivtv_drv); |
17fcd644f32e
new VIDIX driver for IVTV cards, original patch by Lutz Koschorreck
ben
parents:
23046
diff
changeset
|
69 #endif |
22973 | 70 #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
|
71 vidix_register_driver (&mach64_drv); |
22973 | 72 #endif |
73 #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
|
74 vidix_register_driver (&mga_drv); |
22973 | 75 #endif |
76 #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
|
77 vidix_register_driver (&mga_crtc2_drv); |
22973 | 78 #endif |
79 #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
|
80 vidix_register_driver (&nvidia_drv); |
22973 | 81 #endif |
22974
30341a2c2179
added vidix driver for Permedia2 cards from upstream vidix
ben
parents:
22973
diff
changeset
|
82 #ifdef CONFIG_VIDIX_DRV_PM2 |
30341a2c2179
added vidix driver for Permedia2 cards from upstream vidix
ben
parents:
22973
diff
changeset
|
83 vidix_register_driver (&pm2_drv); |
30341a2c2179
added vidix driver for Permedia2 cards from upstream vidix
ben
parents:
22973
diff
changeset
|
84 #endif |
22973 | 85 #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
|
86 vidix_register_driver (&pm3_drv); |
22973 | 87 #endif |
88 #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
|
89 vidix_register_driver (&radeon_drv); |
22973 | 90 #endif |
91 #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
|
92 vidix_register_driver (&rage128_drv); |
22973 | 93 #endif |
26096 | 94 #ifdef CONFIG_VIDIX_DRV_S3 |
95 vidix_register_driver (&s3_drv); | |
22973 | 96 #endif |
27420
917c93c652b0
Add VIDIX driver for SuperH Mobile VEU hardware block.
ben
parents:
27079
diff
changeset
|
97 #ifdef CONFIG_VIDIX_DRV_SH_VEU |
917c93c652b0
Add VIDIX driver for SuperH Mobile VEU hardware block.
ben
parents:
27079
diff
changeset
|
98 vidix_register_driver (&sh_veu_drv); |
917c93c652b0
Add VIDIX driver for SuperH Mobile VEU hardware block.
ben
parents:
27079
diff
changeset
|
99 #endif |
22973 | 100 #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
|
101 vidix_register_driver (&sis_drv); |
22973 | 102 #endif |
103 #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
|
104 vidix_register_driver (&unichrome_drv); |
22973 | 105 #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
|
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 |
77def5093daf
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 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
|
109 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
|
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 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
|
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: 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
|
115 |
77def5093daf
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 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
|
117 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
|
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 (!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
|
120 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
|
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 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
|
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 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
|
125 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
|
126 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
|
127 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
|
128 } |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27420
diff
changeset
|
129 |
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
|
130 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
|
131 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
|
132 |
77def5093daf
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
|
133 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
|
134 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
|
135 } |
77def5093daf
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
|
136 |
22873
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
137 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
|
138 { |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
139 VDXDriver *drv; |
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 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
|
142 |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
143 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
|
144 while (drv) |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
145 { |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
146 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
|
147 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
|
148 printf (" * %s - %s\n", drv->name, cap.name); |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27420
diff
changeset
|
149 drv = drv->next; |
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 } |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
152 |
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
|
153 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
|
154 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
|
155 { |
77def5093daf
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 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
|
157 |
22878 | 158 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
|
159 { |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
160 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
|
161 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
|
162 return 0; |
030428ba5bb3
allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents:
22858
diff
changeset
|
163 } |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
27420
diff
changeset
|
164 |
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
|
165 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
|
166 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
|
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 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
|
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 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
|
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 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
|
175 { |
77def5093daf
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 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
|
177 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
|
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 } |
77def5093daf
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 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
|
182 { |
77def5093daf
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 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
|
184 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
|
185 } |
77def5093daf
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
|
186 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
|
187 } |
77def5093daf
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
|
188 |
77def5093daf
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
|
189 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
|
190 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
|
191 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
|
192 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
|
193 } |