Paul Sijben wrote:
> Euhm, thinking a bit more
> 
> Wouldn't it be simpler to let the TV viewing app write a lockfile of the
> device it is using (so in practice something like viewing.video0).
> Then let ivtv_record test for that file when it wants to use that video
> device.  If the device is needed for recording, send a STOP to the TV
> viewing thread and use the device.

upsoon was written for when there is only one TV card in a machine.

IIRC what it does is to open the device and then try to read from it, if
it can't read from it then something is using the device so it sends a
stop event. While you won't be watching two things at the same time then
it sends a stop event which causes the player to stop and allow
recording to work and at the same time writes a lock file to show that
something is recording and prevents the player from playing again.

This means that there may be nothing to do.

In VideoGroup it has a index pointing to the recording device, if not
already this should be the preferred device and switching to the playing
device when there is a conflict. For simplicity, it may not be worth
while trying to allow playing on the other device.

I don't think that you can remove the input from VideoGroups because
this can be used to set a different input device, such as the S-Video.

Also you should be aware that it may not be a desirable feature if two
cards come from two different sources, such as Analogue and DVB-S, so
there needs to be a way to turn it off. I think using the record_group
is the best way.

Here's an example:
  VideoGroup(vdev = '/dev/video0',
    vvbi = '/dev/vbi0',
    adev = '/dev/adsp',
    input_type = 'tuner',
    input_num = 0,
    tuner_norm = CONF.tv,
    tuner_chanlist = CONF.chanlist,
    desc = 'PVR-500 Play Group',
    group_type = 'ivtv',
    record_group = 1),
  VideoGroup(vdev = '/dev/video1',
    vvbi = '/dev/vbi1',
    adev = '/dev/adsp',
    input_type = 'tuner',
    input_num = 0,
    tuner_norm = CONF.tv,
    tuner_chanlist = CONF.chanlist,
    desc = 'PVR-500 Record Group',
    group_type = 'ivtv',
    record_group = None),

In the second entry the record_group is None, it this was 0 then
multiple recording will be activated.

You may have noticed the vvbi which is the video vbi device, I use this
in vbi2srt_record.py for the teletext data to grab the subtitles and to
use it's VPS signal to start and stop recording.

> BTW: I can not find any checks for recording lockfiles in ivtv_xine_tv
> where is checked if you are not ruining a recording in progress by
> starting to watch TV?

ivtv_xine_tv is new on 1.6 and may never have been implemented.

Hope this helps,
Duncan

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to