Aubin Paul wrote:
It looks like this will need to be added to the documentation, as I

Right, there are no docs atm (besides mailinglist archives), mostly because its still changing.


didn't add these are updated Freevo from CVS and it started trying to
from the IVTV input '0' instead of '4'... in fact, it would actively
switch it... maybe we should have it not touch the input if one is not
explicitly defined instead of setting it to '0'

Good idea, I will have input_num default to None instead of 0. I chose 0 because it is most common for linux.


I'm just wondering also, what you use for tuning your satellite box...
I'm using a digital cable box, but I have to set the channels manually
right now...

I am using:


plugin_external_tuner = plugin.activate('tv.irsend_echostar', args=('/etc/lircd-transmit.conf', '/dev/trans', ))

Along with a homebrew IR transmitter, design from http://www.blars.org/blarslirc/ .

You will probably need to use the tv.irsend_generic plugin for any other type of cable box. I blindly made the irsend_generic plugin but I think that "tdb30" who spends some time on the irc channel has had some luck with it with minor modifications.

-Rob


Aubin


On Wed, Dec 31, 2003 at 01:01:15PM -0400, Rob Shortt wrote:

Here is an example of my configuration. Be warned though, this is complicated and easily confusing for users (insert plug for xml based config file here).

VIDEO_GROUPS = [
   VideoGroup(vdev='/dev/video0',
              adev=None,
              input_type='composite',
              input_num=5,
              tuner_type='external',
              desc='Bell ExpressVu',
              group_type='ivtv',
              recordable=True),
   VideoGroup(vdev='/dev/video0',
              adev=None,
              input_type='tuner',
              input_num=4,
              tuner_norm='NTSC',
              tuner_chanlist='us-cable',
              desc='Eastlink Cable',
              group_type='ivtv',
              recordable=True),
   VideoGroup(vdev='/dev/video2',
              adev=None,
              input_type='camera',
              desc='Logitech Quickcam',
              group_type='webcam',
              recordable=False),
]

Valid options for a VideoGroup:

vdev: The video device, such as /dev/video.
adev: The audio device, such as /dev/dsp.
input_type: tuner, composite, svideo, webcam
input_num: The number of this input according to V4L
tuner_type: internal (on a v4l device), or external (cable or sat box)
tuner_norm: NTSC, PAL, SECAM
tuner_chanlist: us-cable,
tuner_chan: If using input_type=tuner and tuner_type=external set this to
what channel it needs to be to get the signal, usually 3 or 4.
recordable: True or False. Can you record from this VideoGroup.
desc: A nice description for this VideoGroup.
group_type: Special variable to identify devices like dvb or ivtv. This
can be left as default, 'normal', or set to 'ivtv' or 'dvb'.



The defaults are:


def __init__(self, vdev='/dev/video', adev='/dev/dsp', input_type='tuner',
input_num=0, tuner_norm='NTSC', tuner_chanlist='us-cable',
tuner_type='internal', tuner_chan=None,
recordable=True, desc='Freevo default VideoGroup',
group_type='normal'):



Also note that IVTV_OPTIONS['input'] is no longer valid and I will be removing it.


So, you see that my default VideoGroup (always VIDEO_GROUPS[0]) is my ivtv device, composite input (number 5). It is an external tuner and I have a plugin to change the channels, which src/tv/channels.py takes care of calling.

Now, since I have multiple VideoGroups I must tell my TV_CHANNELS that some channels are not default (VIDEO_GROUPS[0]). To do this I used the 5th field in TV_CHANNELS since the 4th was taken for time dependant channels. Here is a sample TV_CHANNELS:

TV_CHANNELS = [
   ( 'CAM', '3 CAM', '3', 0, 2 ),
   ( 'C4wgbh.zap2it.com', '4 WGBH', '4', 0, 1 ),
   ( 'C6cihf.zap2it.com', '6 CIHF', '6', 0, 1 ),
   ( 'C7asn.zap2it.com', '7 ASN', '7', 0, 1 ),
   ( 'C9cjch.zap2it.com', '9 CJCH', '9', 0, 1 ),
   ( 'C200cbcc.zap2it.com', '200 CBCC', '200' ),
   ( 'C201cjon.zap2it.com', '201 CJON', '201' ),
   ( 'C202cklt.zap2it.com', '202 CKLT', '202' ),
   ( 'C203asn.zap2it.com', '203 ASN', '203' )
]

You see, everywhere I specify a VideoGroup I set the time field to 0 since I don't wish to do that. Channel 3 uses VIDEO_GROUPS[2] and channelse 4-9 use VIDEO_GROUPS[1]. I have way more satellite channels so I am using VIDEO_GROUPS[0] there (so I don't have to specify it because that's default).

The mplayer tv plugin is the only one smart enough to switch between groups / inputs on the fly. The tv.ivtv_record plugin is able to set the input based on that channel's VideoGroup (input_num field). We could also add support to the generic_record plugin by having another VCR_CMD option (cl_opts or whatever).

Next I am working on a xine patch to set the tuner frequency in slave mode, and add a xine tv viewing plugin. I have refined the one you had previously made, with updates from the video plugin and the current mplayer plugin with the channels.py changes.

-Rob



Aubin Paul wrote:

Hey Rob,

Maybe I missed it, but can post an example of your config that uses
multiple ivtv inputs? I have a digital cable box and I've been using
record-v4l since I couldn't get multiple inputs working.

thanks,

Aubin

On Wed, Dec 31, 2003 at 08:13:17AM -0800, [EMAIL PROTECTED] wrote:


Update of /cvsroot/freevo/freevo/src/tv/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv12830/src/tv/plugins

Modified Files:
mplayer.py Log Message:
Make it possible to change channels between those that have different
VideoGroups. For example, on my setup channel 3 is my webcam, 4-50 is analog cable, and 200+ is my satellite system. I can start on channel 3, see my webcam on the tv (security cam), channel+ and instantly view my cable channels and channel+ through to my satellite channels.



Index: mplayer.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/plugins/mplayer.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** mplayer.py 27 Nov 2003 03:11:08 -0000 1.29
--- mplayer.py 31 Dec 2003 16:13:15 -0000 1.30
***************
*** 10,13 ****
--- 10,20 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.30 2003/12/31 16:13:15 rshortt
+ # Make it possible to change channels between those that have different
+ # VideoGroups. For example, on my setup channel 3 is my webcam, 4-50 is
+ # analog cable, and 200+ is my satellite system. I can start on channel 3,
+ # see my webcam on the tv (security cam), channel+ and instantly view my
+ # cable channels and channel+ through to my satellite channels.
+ #
# Revision 1.29 2003/11/27 03:11:08 rshortt
# Shuffle things around a little bit and add ivtv capabilities. I intend to
***************
*** 149,159 ****



! def Play(self, mode, tuner_channel=None, channel_change=0):


if not tuner_channel:
tuner_channel = self.fc.getChannel()
vg = self.current_vg = self.fc.getVideoGroup(tuner_channel)
!


       # Convert to MPlayer TV setting strings
--- 156,169 ----


! def Play(self, mode, tuner_channel=None):
! ! print 'PLAY CHAN: %s' % tuner_channel


if not tuner_channel:
tuner_channel = self.fc.getChannel()
+ print 'PLAY CHAN: %s' % tuner_channel
vg = self.current_vg = self.fc.getVideoGroup(tuner_channel)
! print 'PLAY GROUP: %s' % vg.desc


       # Convert to MPlayer TV setting strings
***************
*** 173,176 ****
--- 183,187 ----
               ivtv_dev = ivtv.IVTV(vg.vdev)
               ivtv_dev.init_settings()
+                 ivtv_dev.setinput(vg.input_num)
               ivtv_dev.print_settings()
               self.fc.chanSet(tuner_channel)
***************
*** 181,184 ****
--- 192,202 ----
                   args += (config.MPLAYER_ARGS['ivtv'],)

+ elif vg.group_type == 'webcam':
+ self.fc.chanSet(tuner_channel, app='mplayer')
+ tvcmd = ''
+ + if config.MPLAYER_ARGS.has_key('webcam'):
+ args += (config.MPLAYER_ARGS['webcam'],)
+ else:
freq_khz = self.fc.chanSet(tuner_channel, app='mplayer')
***************
*** 255,261 ****
! def Stop(self):
mixer = plugin.getbyname('MIXER')
! if mixer:
mixer.setLineinVolume(0)
mixer.setMicVolume(0)
--- 273,279 ----
! def Stop(self, channel_change=0):
mixer = plugin.getbyname('MIXER')
! if mixer and not channel_change:
mixer.setLineinVolume(0)
mixer.setMicVolume(0)
***************
*** 265,269 ****


       rc.app(self.prev_app)
!         if osd.focused_app():
           osd.focused_app().show()

--- 283,287 ----

       rc.app(self.prev_app)
!         if osd.focused_app() and not channel_change:
           osd.focused_app().show()

***************
*** 280,285 ****
elif event == em.TV_CHANNEL_UP or event == em.TV_CHANNEL_DOWN:
! # XXX: channel Up/Down code will have to be reworked in order
! # to handle multiple VideoGroups between channels.


if self.mode == 'vcr':
--- 298,316 ----
elif event == em.TV_CHANNEL_UP or event == em.TV_CHANNEL_DOWN:
! ! if event == em.TV_CHANNEL_UP:
! nextchan = self.fc.getNextChannel()
! else:
! nextchan = self.fc.getPrevChannel()
! ! print 'NEXT CHAN: %s' % nextchan
! nextvg = self.fc.getVideoGroup(nextchan)
! print 'NEXT GROUP: %s' % nextvg.desc
! ! if self.current_vg != nextvg:
! print 'NEW GROUP!'
! self.Stop(channel_change=1)
! self.Play('tv', nextchan)
! return TRUE


if self.mode == 'vcr':
***************
*** 287,305 ****
elif self.current_vg.group_type == 'ivtv':
! # Go to the prev/next channel in the list
! if event == em.TV_CHANNEL_UP:
! self.fc.chanUp()
! else:
! self.fc.chanDown()
! self.thread.app.write('seek 999999 0\n')


else:
! # Go to the prev/next channel in the list
! if event == em.TV_CHANNEL_UP:
! freq_khz = self.fc.chanUp(app=self.thread.app)
! else:
! freq_khz = self.fc.chanDown(app=self.thread.app)
! new_freq = '%1.3f' % (freq_khz / 1000.0)
self.thread.app.write('tv_set_freq %s\n' % new_freq)
--- 318,326 ----
elif self.current_vg.group_type == 'ivtv':
! self.fc.chanSet(nextchan)
self.thread.app.write('seek 999999 0\n')


else:
! freq_khz = self.fc.chanSet(nextchan, app=self.thread.app)
new_freq = '%1.3f' % (freq_khz / 1000.0)
self.thread.app.write('tv_set_freq %s\n' % new_freq)





------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Freevo-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-cvslog



------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel



------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to