spc210nc philips kamerada görüntü tepe taklak

Başlatan leontes, 10 Aralık 2008 - 13:37:39

« önceki - sonraki »

0 Üyeler ve 1 Ziyaretçi konuyu incelemekte.

leontes

bunu googleda da aradım benim gibi aynı probleme sahip olan başklarıda var ama çözüm bulamadım. spc210nc philips kamera, ubuntu 8.10 da görüntülü görüşme yaptığımda amsn de ekranın 4 te 1 ni kaplıyor ve görüntü tepe taklak duruyor. aynı sorunu yaşayanlar değişik programlarda da bu sorunla karşılaşıyorlarmış. çözümü nedir yardımcı olursanız sevinirim.

heartsmagic

Kameranın çipseti ne?
lsusb bize daha fazla yardımcı olur. Ayrıca bulup da çözüme ulaşamadığın başlıkları da burada görürsek faydalı olabilir.
Hayattan çıkarı olmayanların, ölümden de çıkarı olmayacaktır.
Hayatlarıyla yanlış olanların ölümleriyle doğru olmalarına imkân var mıdır?


Böylece yalan, dünyanın düzenine dönüştürülüyor.

btermeli

Duvarları olmayan bir dünyada, neden pencerelere ihtiyaç duyayım ki???

leontes

leontes@leontes-laptop:~$ lsusb
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 003: ID 03f0:171d Hewlett-Packard Wireless (Bluetooth + WLAN) Interface [Integrated Module]
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0471:032d Philips
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

diyor bu komut.

verdiğiniz linkte bu sorunu çözmüş elemanlar da ne yazık ki onların da çözüm burada dedikleri link şu an çaışmıyor :( ama araştırıyorum bulursam buraya yazıcam. bu kameranın tepe taklak olması sık karşılaşılan bir problem sanırım.

erginemr

O bağlantıya girmeye çalışınca güvenlik uyarısı veriyorsu, bende vtunnel ile girdim:
http://www.vtunnel.com/index.php/1010110A/565711ac7a225547ad4459a59d230e91ff712a0a397937592e30c6e508a6b6595315d482ca333a70faa1aefa48be3b3376fd4b1afba4dbeb16eb430ebd108784b66331b8422621192
Alıntı YapMarco Argiolas arjos85 at gmail.com
Sun Jun 15 16:37:28 CEST 2008

    * Previous message: [linux-uvc-devel] webcam Chicony Electronics
    * Next message: [linux-uvc-devel] SOLVED: upside-down image from SONIX laptop embedded webcam
    * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

Hi everybody,
I'm new of this mailing list and I haven't read all the messaged previously
posted.
However I'm just writing to you in order to help all those who have my same
problem.

Just two weeks ago I bought a new laptop: ASUS F3SR (cpu intel duo T500,
2GB ram, .....) with a Sonix webcam.
On preinstalled Win Vista (excuse me for the heresy) everything works fine.
But on Kubuntu 8.04 the webcam just show me upside-down images.

I've try to solve this problem with a pipe and a vloopback module, but
unluckly I could not make it works.
So I decided to mod the uvcvideo driver...and after some damns I got it
works.
I've added very few lines of code and in just one function.
Has attachement you can find the changed file "uvc_video.c".
In the follow I report the changed function:

----------------------------------------------------------------------------------------

static void uvc_video_decode_data(struct uvc_video_device *video,
        struct uvc_buffer *buf, const __u8 *data, int len)
{
    struct uvc_video_queue *queue = &video->queue;
    unsigned int maxlen, nbytes;
    void *mem;
    //// ADDED VARIABLES /////
    __u8 *mem_tmp;
    int i, k, pixel_size;
    unsigned int size_tmp;
    //// ADDED VARIABLES /////

    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. */

/////////////////// START ADDED CODE
/////////////////////////////////////////////////////////////////////
    // I've just added the "=" operator in order to set "buf->state =
UVC_BUF_STATE_DONE"        //
    // right now without waiting another "round"
//
    if (len >= maxlen) {
        // Total size of the pixel frame                            //
        size_tmp = buf->buf.bytesused - (len - maxlen);

        // Area in which to save the original frame before the conversion
         //
        mem_tmp=(__u8 *) kmalloc(size_tmp , GFP_USER);

        // Copy the original frame in a temporary buffer
//
        memcpy(mem_tmp, queue->mem + buf->buf.m.offset, size_tmp);

        // Size of each pixel, in my case is 4 byte! If you have some
problems with color or    //
        // image coherency just try to change this value in accordance with
your video device    //
        // If you have problem I suggest to try "pixel_size = 2;"
     //
        pixel_size = 4 ;
        // The following cycle just copy pixels from the temporary frame
(originary one)     //
        // in a reverse order: from the last (bottom right in the
upside-down image) to     //
        // the first (top left in the final flipped image)
//
        for (     i=0, k=size_tmp - pixel_size; i < size_tmp; i+=pixel_size,
k-=pixel_size)
            memcpy( (__u8 *)queue->mem + buf->buf.m.offset + i, mem_tmp + k,
pixel_size );
/////////////////// END ADDED CODE
///////////////////////////////////////////////////////////////////////

        uvc_trace(UVC_TRACE_FRAME, "Frame complete (overflow).n");
        buf->state = UVC_BUF_STATE_DONE;
    }
}

--------------------------------------------------------------------------------------------------------

You can either:
- copy this function and substitute to the original one in "uvc_video.c"
or
- use the attachement file and delete the original file.

The following steps are intended for those who have already installed
uvcvideo driver and their webcam is recognised but with upside-down images.

Then you should do:
- close all the program that are using the input video device
- with your terminal go inside the folder where there are the uvcvideo
source files and type:
$ sudo modprobe -r uvcvideo
$ KERNEL_VERSION=`uname -r`
$ find /lib/modules/$KERNEL_VERSION -name uvcvideo.ko
// with the previous command you should get a list of just 2 path in which
uvcvideo.ko is already installed
// one of this ends with "usb/media/uvcvideo.ko", just copy the OTHER one,
in the next steps I will call this  "COPIED_PATH"!!
$ make
$ sudo make install
// "make install" command will install uvcvideo.ko  in
/lib/modules/$(KERNEL_VERSION)/usb/media/
// but you also need to copy uvcvideo.ko in an another dir, and in my case
on kubuntu  this folder
// is /lib/modules/2.6.24-18-generic/ubuntu/media/usbvideo/  but you have to
do:
$ sudo cp uvcvideo.ko COPIED_DIR
$ sudo modprobe uvcvideo

Now your webcam is ready and should work in the right way.
If you have  problems with color or image incoherency, please try to mod my
code (refer to my comments inside the changed code).

Let me know if you have some doubts....
i know i am not an expert of linux...so i could have made some error in the
previous shell commands!!

Please let me know!!
However i hope my help could be useful for someone!!

Ciao

Marco Argiolas