[mythtv] Supporting more Hardware capture cards

Sam Logen starz909 at yahoo.com
Sun Nov 25 00:45:17 UTC 2007


Well, I received a reply from someone from the V4L
mailing lists, and it appears that what, Daniel, you
called a bug, is intentional.  As Jelle describes it,
it is to make sure that the mpeg device can only be
opened once.

Sam

--- Jelle Foks <jelle at foks.8m.com> wrote:
> The patch that you included makes the change to
> mythtv so that it opens
> the video device once instead of twice. The
> cx88-mpeg device can only be
> opened once (it checks for that). I believe that was
> added as some kind
> of protection for some cards that can choose between
> either hardware
> encoding or qam/atsc demodulation on the mpeg port,
> to prevent a
> recording-in-progress from being screwed up by
> another program opening
> the device... On my own setup, I simply use a
> patched driver where that
> check/lock is disabled...
> 
> I wouldn't say it's a bug in the driver though,
> because afaik it's not a
> bug if a device can't be opened more than once at
> the same time... I'd
> say it's simply not right that mythtv needs to open
> the device twice
> (afaics, there is no need to do so, as shown by the
> result of the patch)...
> 
> It's an issue that needs to be resolved, either on
> mythtv's side or the
> cx88-mpeg drive side. I'm not the one who added the
> lock on the driver
> side, nor am I a mythtv developer, so I'll leave the
> fight between who
> has to change what over to others...
> 
> About closed-captioning, I don't know anything about
> that, but afaik it
> has nothing to do with cx88-blackbird, because
> closed captioning is the
> vbi device, which is supplied by another part of the
> cx88 driver set.
> I've never been able to get closed captioning to
> work with mythtv
> anyway, including with the pvr-350 card supported by
> the ivtv driver, so
> I've always felt there was something borked about
> mythtv's closed
> captioning support... I don't need closed captioning
> support myself, so
> it never bothered me, really...
> 
> Jelle.
> 
> > 
> > Sam
> > 
> > 
> > --- Daniel Kristjansson <danielk at cuymedia.net>
> wrote:
> > 
> >> >From the patch it looks like the problem is with
> >> the Avermedia M150
> >> driver, so it needs to be patched. The problem
> >> appears to be that
> >> the driver only allows the device to be opened
> once,
> >> this is a bug.
> >> I wouldn't totally reject a patch that worked
> around
> >> the driver bug,
> >> but it would need to do the right thing when the
> bug
> >> isn't present
> >> in the drivers, and also properly keep track of
> the
> >> open file
> >> descriptors when the buggy driver is present. The
> >> patch you attached
> >> appears to be more of a proof-of-concept patch.
> >>
> >> -- Daniel
> >>
> >> _______________________________________________
> >> mythtv-dev mailing list
> >> mythtv-dev at mythtv.org
> >>
> >
>
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
> > 
> > 
> > ---Mythtv patch begins here (might be word
> wrapped)---
> > 
> > Index: libs/libmythtv/mpegrecorder.cpp
> >
>
===================================================================
> > --- libs/libmythtv/mpegrecorder.cpp     (revision
> > 14704)
> > +++ libs/libmythtv/mpegrecorder.cpp     (working
> copy)
> > @@ -324,7 +324,7 @@
> > 
> >  bool MpegRecorder::OpenV4L2DeviceAsInput(void)
> >  {
> > -    chanfd = open(videodevice.ascii(), O_RDWR);
> > +    chanfd = open(videodevice.ascii(), O_RDWR |
> > O_NONBLOCK);
> >      if (chanfd < 0)
> >      {
> >          VERBOSE(VB_IMPORTANT, LOC_ERR + "Can't
> open
> > video device. " +
> >  ENO);
> > @@ -447,7 +447,7 @@
> > 
> >      SetVBIOptions(chanfd);
> > 
> > -    readfd = open(videodevice.ascii(), O_RDWR |
> > O_NONBLOCK);
> > +    readfd = chanfd;
> >      if (readfd < 0)
> >      {
> >          VERBOSE(VB_IMPORTANT, LOC_ERR + "Can't
> open
> > video device." +
> >  ENO);
> > 
> > 
> >      
>
____________________________________________________________________________________
> > Never miss a thing.  Make Yahoo your home page. 
> > http://www.yahoo.com/r/hs
> > 
> > --
> > video4linux-list mailing list
> > Unsubscribe
>
mailto:video4linux-list-request at redhat.com?subject=unsubscribe
> >
>
https://www.redhat.com/mailman/listinfo/video4linux-list
> > 
> 



      ____________________________________________________________________________________
Be a better sports nut!  Let your teams follow you 
with Yahoo Mobile. Try it now.  http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ


More information about the mythtv-dev mailing list