[Xorg] XGetVisualInfo

Linguaggi di programmazione: php, perl, python, C, bash e tutti gli altri.
Scrivi risposta
ZeroCoolBit
Prode Principiante
Messaggi: 19
Iscrizione: sabato 28 ottobre 2006, 0:31

[Xorg] XGetVisualInfo

Messaggio da ZeroCoolBit »

Ciao a tutti sto utilizzando la libreria vislib per acquisite immagini da una webcam per poi poterle rielaborare. Il problema è che quando faccio girare il programma di acquisizione (videoin.c) mi segnala un errore ovvero:

Image created
vlGrabInit succeeded
VisLib 1.9.1
depth =  32
detected TrueColor visual (depth 32)
Click in the window to exit
_vlDisplayImage: depth=32 is not supported
vlShow: error: could not display image
_vlDisplayImage: depth=32 is not supported


il pezzo di codice da cui ricava il valore 32 dovrebbe essere questo:

visualList = XGetVisualInfo (display,
                                                                VisualClassMask | VisualScreenMask,
                                                                &visualTemplate,
                                                                &numVisualMatched);

    if (numVisualMatched > 0) {
                /* found a TrueColor visual, use the highest depth */
                depth = 0;
                do {
                        numVisualMatched--;
                        if (visualList[numVisualMatched].depth > depth) {
                                depth = visualList[numVisualMatched].depth;
                                printf("depth =  %d \n ",depth);
                                visual = visualList[numVisualMatched].visual;
                        }
                } while (numVisualMatched > 0);
                printf("detected TrueColor visual (depth %d)\n",depth);
                XFree (visualList);            /* q: will this screw up "visual" ??? */
        }
        else {
                VL_ERROR ("vlDisplayInit: could not find a TrueColor visual\n");
                return (-1);            /* failure */
        }

Io vorrei sapere, ma dove lo va a leggere il valore 32? io ho guardato il mio file di xorg.conf e come deph massima ha impostato 24...
Scrivi risposta

Ritorna a “Programmazione”

Chi c’è in linea

Visualizzano questa sezione: 0 utenti iscritti e 2 ospiti