[mythtv] mpgerecorder.cpp: Why 2 open()'s in OpenV4L2DeviceAsInput() ?

Dennis Lou dlou99 at yahoo.com
Sat May 10 01:41:23 UTC 2008


Why are there two open()'s in mpegrecorder.cpp (line 300 and line 341)?

This is a problem with my cx88_blackbird (I have a feeling this group is very IVTV-centric).  The 2nd fails with a "Device Busy".  I confirmed that it's bad with the following test:

#include <stdio.h>
#include <fcntl.h>

main(){
  int chanfd, readfd;
  if ((chanfd = open ("/dev/video2", O_RDWR)) < 0)
    perror("Can't open for chanfd");
  else if ((readfd = open("/dev/video2", O_RDWR | O_NONBLOCK)) < 0)
    perror("Can't open for readfd");
}

and the 2nd open() is definitely a problem.

-Dennis



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


More information about the mythtv-dev mailing list