annotate vidix/drivers.c @ 22902:d74001dbe2a6

missing headers in vidix drivers registry files
author ben
date Fri, 06 Apr 2007 15:30:39 +0000
parents e0749444591f
children f34e5d778267
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22902
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
1 /*
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
2 * Copyright (C) 2007 Benjamin Zores <ben@geexbox.org>
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
3 * Vidix drivers registry handler.
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
4 *
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
5 * This program is free software; you can redistribute it and/or modify
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
6 * it under the terms of the GNU General Public License as published by
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
7 * the Free Software Foundation; either version 2 of the License, or
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
8 * (at your option) any later version.
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
9 *
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
10 * This program is distributed in the hope that it will be useful,
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
13 * GNU General Public License for more details.
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
14 *
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
15 * You should have received a copy of the GNU General Public License
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
16 * along with this program; if not, write to the Free Software Foundation,
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
18 */
d74001dbe2a6 missing headers in vidix drivers registry files
ben
parents: 22878
diff changeset
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"
77def5093daf switch to 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 #include "../config.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
27 #include "../libavutil/common.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
28 #include "../mpbswap.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
29
77def5093daf switch to 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 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
31
77def5093daf switch to 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 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
33 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
34 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
35 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
36 extern VDXDriver nvidia_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 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
38 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
39 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
40 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
41 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
42 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
43
77def5093daf switch to 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 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
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 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
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 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
49 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
50 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
51 *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
52 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
53 }
77def5093daf switch to 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
77def5093daf switch to 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 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
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 vidix_register_driver (&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
58 vidix_register_driver (&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
59 vidix_register_driver (&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
60 vidix_register_driver (&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
61 vidix_register_driver (&nvidia_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
62 vidix_register_driver (&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
63 vidix_register_driver (&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
64 vidix_register_driver (&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
65 vidix_register_driver (&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
66 vidix_register_driver (&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
67 vidix_register_driver (&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
68 }
77def5093daf switch to 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
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
diff changeset
70 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
71 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
72 {
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
diff changeset
73 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
74
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
diff changeset
75 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
76 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
77
77def5093daf switch to 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 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
79 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
80
77def5093daf switch to 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 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
82 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
83
77def5093daf switch to 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 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
85 {
77def5093daf switch to 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 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
87 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
88 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
89 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
90 }
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
diff changeset
91
77def5093daf switch to 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 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
93 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
94
77def5093daf switch to 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 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
96 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
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
22873
030428ba5bb3 allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents: 22858
diff changeset
99 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
100 {
030428ba5bb3 allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents: 22858
diff changeset
101 VDXDriver *drv;
030428ba5bb3 allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents: 22858
diff changeset
102
030428ba5bb3 allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents: 22858
diff changeset
103 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
104
030428ba5bb3 allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents: 22858
diff changeset
105 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
106 while (drv)
030428ba5bb3 allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents: 22858
diff changeset
107 {
030428ba5bb3 allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents: 22858
diff changeset
108 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
109 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
110 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
111 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
112 }
030428ba5bb3 allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents: 22858
diff changeset
113 }
030428ba5bb3 allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents: 22858
diff changeset
114
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
115 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
116 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
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 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
119
22878
e0749444591f segfaults if name is NULL
ben
parents: 22873
diff changeset
120 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
121 {
030428ba5bb3 allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents: 22858
diff changeset
122 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
123 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
124 return 0;
030428ba5bb3 allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents: 22858
diff changeset
125 }
030428ba5bb3 allow passing :help to -vo [cx]vidix to get list of all compiled in vidix drivers
ben
parents: 22858
diff changeset
126
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
127 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
128 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
129 {
77def5093daf switch to 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 (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
131 {
77def5093daf switch to 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 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
133 {
77def5093daf switch to 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 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
135 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
136 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
137 {
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
diff changeset
138 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
139 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
140 }
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
diff changeset
141 }
77def5093daf switch to 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 }
77def5093daf switch to 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 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
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 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
146 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
147 }
77def5093daf switch to 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 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
149 }
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
diff changeset
150
77def5093daf switch to new internal vidix API, no more dlopen/dlsym, libvidix is now a fully static library with all drivers built-in
ben
parents:
diff changeset
151 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
152 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
153 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
154 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
155 }