suppongo che tu abbia gli strumenti di sviluppo e i devel del kernel installati, se non è così installali.
scaricati il pacchetto: http://linuxtv.org/hg/v4l-dvb/archive/tip.tar.gz
scompattalo suppongo in $HOME/Scaricati:
poi da utente:
$ gedit $HOME/Scaricati/v4l-dvb-abd3aac6644e/linux/drivers/media/video/uvc/uvc_video.c[/code]
sosituisci questa sezione:
[code]
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;
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);
memcpy(mem, data, nbytes);
buf->buf.bytesused += nbytes;
/* 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_READY;
}
}
[/code]
con questa sezione:
[code]
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;
}
}
[/code]
salva chiudi
dai sempre da utente
[code]
$ cd $HOME/Scaricati/v4l-dvb-abd3aac6644e/
$ make
[/code]
vedi se il make termina senza errori.
poi da root :
[code]# modprobe -r uvcvideo
# mv /lib/modules/`uname -r`/kernel/drivers/media/video/uvc/uvcvideo.ko /lib/modules/`uname -r`/kernel/drivers/media/video/uvc/uvcvideo.old
# cp $HOME/Scaricati/v4l-dvb-abd3aac6644e/v4l/uvcvideo.ko /lib/modules/`uname -r`/kernel/drivers/media/video/uvc/uvcvideo.ko
# depmod -a
dai un reboot.
prova ora.
se durante la procedura hai errori, fermati e posta la segnalazione.
sei un drago!..
hai fatto centro…ora va!..
grazie mille vi…
spero che la soluzione possa servire anche a posteri acquirenti di notebook con webcam capovolta…(sti produttori!!!)
Salve a tutti.
Sono un utente nuovo del forum e del mondo debian.
Vi scrivo perché ho il medesimo problema della cam capovolta.
Ho seguito tutti i passi fino a lanciare il comando make ma mi restituisce due errori e non saprei come interpretarli, e figuriamoci risolverli.
Posso postarveli qui di seguito?
$ /home/banphi/Scaricati/v4l-dvb-3724e93f7af5# make
make -C /home/banphi/Scaricati/v4l-dvb-3724e93f7af5/v4l
make[1]: Entering directory `/home/banphi/Scaricati/v4l-dvb-3724e93f7af5/v4l'
Updating/Creating .config
Preparing to compile for kernel version 2.6.32
File not found: /lib/modules/2.6.32-5-686/build/.config at ./scripts/make_kconfig.pl line 32, <IN> line 4.
make[1]: *** No rule to make target `.myconfig', needed by `config-compat.h'. Stop.
make[1]: Leaving directory `/home/banphi/Scaricati/v4l-dvb-3724e93f7af5/v4l'
make: *** [all] Error 2
Spero possiate aiutarmi che è davvero inutile così
Grazie.
Ti do ragione sul mio errore per l’aver attaccato la domanda ad un problema risolto, ma sul fatto che io usi debian non vedo dove sia il problema.
Ho dovuto solamente modificare un paio di comandi ma il principio di base era lo stesso.
E le modifiche fatte al file uvc_video.c non mi sembrano specifiche.
Per finire ho deciso di scrivere qui perché c’è la miglior guida che sono riuscito a trovare fino ad ora, passo passo che per chi non mastica codice è una manna.
Fatti tutti i mea culpa del caso, puoi aiutarmi?
Invece è lì il problema. Il tuo errore è specifico dei sistemi Debian, che io non conosco minimamente.
Hai installato gli strumenti di sviluppo? Compilatore, kernel-devel e header ecc?
Altro non so dirti.
Oltre a quanto già detto da Robyduck, considera anche che Fedora ha una organizzazione del filesystem differente da altre distribuzioni, per cui dovresti cambiare i path ai file.