Re: reading from BT878 card ... just hangs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



hi

maybe this pdf by alan cox might help
http://ftp.linux.org.uk/pub/linux/alan/Kernel/Documents/video4linux.pdf

Regards
Puneet
On Thu, 17 Apr 2003 Martin H wrote :

Hi,
I'm trying to write a program to display images from my tv card
(a Hauppauge (bt878)).

When I try reading from it my program just hangs.

I've set up the card...
----
    /* prepare new settings */
    tv_vwin.width = 320;
    tv_vwin.height = 240;

    vid_pic.palette = VIDEO_PALETTE_RGB24;

    vid_chan.channel = 1; /*composite 1*/

    /* set them */
    ioctl(tv_fd, VIDIOCSWIN, &tv_vwin);

    if (ioctl(tv_fd, VIDIOCSPICT, &vid_pic) < 0) {
        perror("Error setting palette\n");
        return 0;
    }

    if (ioctl(tv_fd, VIDIOCSCHAN, &vid_chan) < 0) {
        perror("Error setting channel\n");
        return 0;
    }
 ---

 ...ok as far as I can tell but when I try to read...

---
printf("Trying to read 230400 bytes\n");
bytes_read = read (tv_fd, tv_buff,230400);
printf("Read %d bytes \n",bytes_read);
---

it just hangs on the read. My program still hangs even if I only try to
read 3 bytes.

However if I replace tv_fd with cam_fd , and thus try to read from my
webcam the code works fine.

Are my problems because my tv card doesn't support read operations (is there any way of telling?) or is there something else odd going on?


Thanks for any ideas

	Martin


PS is there a more up-to-date version of the API documentation
anywhere - perhaps one that doesn't mention the seemingly non-existent VIDEO_VC_NORM , mentions that VIDIOCSCHAN might want a structure rather
than an int and tells me what palette 17 is?

Should I be asking this question elsewhere or looking at some other
documentation?




--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/video4linux-list


B+ , BOTH MY BLOOD GROUP AND MY ATTITUDE






[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux