-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Duncan Webb
Sent: Tuesday, May 27, 2008 3:42 PM
To: [email protected]
Subject: Re: [Freevo-users] Problem changing Video Group Inputs

David Frager wrote:
> Several months ago, I started seeing a problem changing between inputs 
> on a single video card.
> 
> I have 2 channels configured:
> TV_CHANNELS = [
>    ('svideo',      'S-Video Input',    '0', '', '0'),
>    ('composite',   'Composite Input',  '-1', '', '1'),
> ]
> 
> No matter which channel I selected via "Watch TV", the input would not 
> change.  I had to issue the change to the input using v4l2-cfg 
> --set-input #.
> 
> I did find that if I turned on debugging or used the --trace option, 
> the inputs did change as expected.
> 
> After some addition testing over the weekend, I was able to solve my 
> problem by adding a sleep of 1 second in the location identified 
> below.  It appears that the ivtv_xine plugin sends the change of input 
> request via a write the STDIN.  My guess is that when the request is 
> send, xine is not able to accept this input.  The additional 1 second
seems to be enough time delay.
> 
>        if switch_vg:
>             # switch to a different video group
>             time.sleep(1)
>             ivtv_dev = ivtv.IVTV(new_vg.vdev)
>             ivtv_dev.init_settings()
>             self.xine.SetInput(new_vg.input_num)
>             # disable embedded vbi data
>             self.embed = ivtv_dev.getvbiembed()
>             ivtv_dev.setvbiembed(0)
> 
> I have this working in my local environment, and would like to see 
> some permanent solution included in the build environment.

Thanks for this, some good tracing of the problem. I only wonder if a 1
second delay is okay in all cases.

The ivtv driver is a bit fussy about changing standards and inputs, the
video stream needs to be switched off and restarted again. I'm not sure if
the xine does this, if it doesn't then this may need to be fixed in the ivtv
module.

Cheers
Duncan

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-users

It appears that the changing of the input is not done via the ivtv driver,
but rather appears to be a write the the STDIN of xine:

<From ivtv_xine_tv.py>
   def SetInput(self, input):
        """ set a different input """
        _debug_('XineControl.SetInput=%r' % (input,), 1)
        self.app.write('PVRSetInput#%s\n' % input)

<From childapp.py>
# Write a string to the app.
    def write(self, line):
        _debug_('ChildApp.write(line=%r) to pid %s' % (line.strip('\n'),
self.child.pid), 2)
        #self.shild.communicate(line)
        try:
            self.child.stdin.write(line)
            self.child.stdin.flush()
        except IOError:
            _debug_('ChildApp.write(line=%r): failed' % (line.strip('\n'),),
DWARNING)


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to