Mailing List archive

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

[linux-dvb] Re: insmod saa7146_core.o debug = 3 for WinTV-NOVA-t



Alexander Nasonov writes:

 > static
 > int read_dvr()
 > {
 >    char buf[188];
 >    int fd, br, i;
 > 
 >    fd = open("/dev/dvb/adapter0/dvr0", O_RDONLY | O_NONBLOCK);
 >    
 >    if(fd < 0)
 >    {
 >       perror("open(\"/dev/dvb/adapter0/dvr0\")");
 >       return -1;
 >    }
 > 
 >    for(i = 0; i < 7; ++i)
 >    {
 >       br = read(fd, buf, 188);
 >       if(br == -1)
 >          perror("read(\"/dev/dvb/adapter0/dvr0\")");
 >       else
 >          printf("%d bytes read\n", br);
 >       
 >       sleep(1);
 >    }
 >    

You should read much more than 188 bytes per second. The TS has a much
higher data rate and we don't buffer that much in the kernel.

 > int main (int argc, char **argv)
 > {
 >    int frontend_fd, demux_fd, dvr_fd;
 >    frontend_fd = setup_frontend();
 >    demux_fd = setup_demux();
 >    close(frontend_fd); // frontend_fd and demux_fd can be closed
 >    close(demux_fd);   // after dvr_fd but it doesn't help too!

You cannot close the demux when you still want to read from dvr.

Marcus

-- 
/--------------------------------------------------------------------\
| Dr. Marcus O.C. Metzler        |                                   |
|--------------------------------|-----------------------------------|
| mocm@metzlerbros.de            | http://www.metzlerbros.de/        |
\--------------------------------------------------------------------/




    


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index