Dai ragazzi, si può fare... Purtroppo sono nuovo del forum e non riesco a spiegarmi bene.
Comunque ora ci riprovo.
Allora: Leggetevi bene l'how to (il primo post del tread) per avere un'idea di cosa stiate facendo, poi tornate qua.
Il problema è questo: la patch non funziona perchè è stata compilata per la vecchia versione dei driver, cioè la 0.1.0
Quindi dovete seguire queste istruzioni:
Vai su
http://linuxtv.org/hg/v4l-dvb
Se guardi in alto a sinistra, troverai i link gz e bz2 che contengono tutto il malloppo.
Scarica uno dei due e scompattalo
La directory principale nel mio caso si trova in v4l-dvb-83712d149893 (ma i numeri possono essere diversi, non cambia nulla)
I sorgenti uvc si trovano in v4l-dvb-83712d149893/linux/drivers/media/video/uvc ed è qui che andrà collocato il solito file di patch.
Ora, "il solito file di patch" non è più valido.
Purtroppo:
For Jaunty 9.04 beta (tested on 2.6.28-11-generic, but should work with 2.6.12 and later)
1) Download Linux UVC (not the obsolete ones from subversion!) from
http://linuxtv.org/repo/
2) Modify v4l/uvc_video.c by hand according to instructions on the first post in this thread
3) Build and install UVC
By hand according significa che dovete modificare il codice sorgente a mano, inserendo la patch.
Dentro la directory v4l-dvb-83712d149893/linux/drivers/media/video/uvc c'è un file, uvc_video.c
1: apritelo con gedit
2: col comando cerca trovate questo punto del file: [glow=red,2,300]static void uvc_video_decode_data[/glow] (semplicemente cercate questa frase, ce n'è solo una).
La funzione si sviluppa da questa riga all'ultima parentesi graffa prima che inizi "static void uvc_video_decode_end".
Voi dovete sostituire (con un copia incolla) la suddetta funzione del vostro file con questa postata da me (vedrete che la prima e l'ultima parte della funzione sono identiche), cioè:
Codice: Seleziona tutto
static void uvc_video_decode_data(struct uvc_streaming *stream,
struct uvc_buffer *buf, const __u8 *data, int len)
{
struct uvc_video_queue *queue = &stream->queue;
unsigned int maxlen, nbytes, row_size, to_be_copied, shift_right;
void *mem;
if (len <= 0)
return;
/* Copy the video data to the buffer. */
maxlen = buf->buf.length - buf->buf.bytesused;
mem = queue->mem + buf->buf.m.offset + buf->buf.bytesused;
nbytes = min((unsigned int)len, maxlen);
row_size = stream->cur_frame->wWidth *
stream->format->bpp / 8;
/* Each loop "nbytes" is decremented of the number of bytes just copied.
* So are there any other bytes to be copied?
*/
while (nbytes > 0) {
/* As the rows of modified frames have to be fulfilled from
* bottom-left to top-right, each cycle tries to complete a
* single row.
* In this cycle where is it needed to start to store bytes
* within the selected row? From the beginning or shifted
* right? Because other bytes could have been already stored in
* that row without completing it, so it could be needed a right
* shift.
*/
shift_right = buf->buf.bytesused % row_size;
/* In this cycle how many byte can we copy in the selected row?
*/
if (nbytes > row_size - shift_right)
to_be_copied = row_size - shift_right ;
else
to_be_copied = nbytes;
/* "queue->mem + buf->buf.m.offset" is the base-address where to
* start to store the current frame. This address refers to a
* preallocated area (just for a sigle frame) taking part in a
* circular buffer, where to store a fixed number of sequent
* frames.
*/
memcpy(queue->mem + buf->buf.m.offset
/* Go to the end of this frame. */
+ row_size * stream->cur_frame->wHeight
/* Go back for the number of bytes corrisponding to the
* already fully completed rows.
*/
- (buf->buf.bytesused - shift_right)
/* Go back at the starting point of the upper row. */
- row_size
/* Shift right on this row if it is needed. */
+ shift_right,
data,
to_be_copied );
/* Update "data", "byteused" and "nbytes" values. */
data += to_be_copied;
buf->buf.bytesused += to_be_copied ;
nbytes -= to_be_copied;
}
/* Complete the current frame if the buffer size was exceeded. */
if (len > maxlen) {
uvc_trace(UVC_TRACE_FRAME, "Frame complete (overflow).\n");
buf->state = UVC_BUF_STATE_DONE;
}
}
Poi salvate il file.
Infine, dal terminale, posizionato nella cartella /v4l-dvb-83712d149893, lancia
make
Successivamente
sudo make install
sudo make unload
sudo modprobe uvcvideo
Così dovrebbe fungere