Update of /cvsroot/freevo/freevo/src/tv/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv31156
Modified Files: mplayer.py Log Message: Shuffle things around a little bit and add ivtv capabilities. I intend to depricate the ivtv_basic_tv plugin in favour of this once since that is just an mplayer plugin as well and I don't want to duplicate too much code. I will focus my development effort on this plugin instead of ivtv_basic_tv and will also be really using this one so I can test it out myself. :) I am planning on adding dvb support to this plugin as well. Index: mplayer.py =================================================================== RCS file: /cvsroot/freevo/freevo/src/tv/plugins/mplayer.py,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** mplayer.py 25 Nov 2003 09:37:00 -0000 1.28 --- mplayer.py 27 Nov 2003 03:11:08 -0000 1.29 *************** *** 10,13 **** --- 10,23 ---- # ----------------------------------------------------------------------- # $Log$ + # Revision 1.29 2003/11/27 03:11:08 rshortt + # Shuffle things around a little bit and add ivtv capabilities. I intend to + # depricate the ivtv_basic_tv plugin in favour of this once since that is + # just an mplayer plugin as well and I don't want to duplicate too much code. + # + # I will focus my development effort on this plugin instead of ivtv_basic_tv + # and will also be really using this one so I can test it out myself. :) + # + # I am planning on adding dvb support to this plugin as well. + # # Revision 1.28 2003/11/25 09:37:00 krister # Bugfixes, works for me now *************** *** 100,103 **** --- 110,114 ---- import tv.epg_xmltv as epg # The Electronic Program Guide from tv.channels import FreevoChannels + import tv.ivtv as ivtv import plugin *************** *** 143,148 **** tuner_channel = self.fc.getChannel() - freq_khz = self.fc.chanSet(tuner_channel, app='mplayer') - tuner_freq = '%1.3f' % (freq_khz / 1000.0) vg = self.current_vg = self.fc.getVideoGroup(tuner_channel) --- 154,157 ---- *************** *** 156,165 **** outfmt = 'outfmt=%s' % config.TV_VIEW_OUTFMT if mode == 'tv': ! tvcmd = ('tv:// -tv driver=%s:freq=%s:%s:%s:' ! '%s:width=%s:height=%s:%s %s' % ! (config.TV_DRIVER, tuner_freq, device, input, norm, ! w, h, outfmt, config.TV_OPTS)) elif mode == 'vcr': --- 165,196 ---- outfmt = 'outfmt=%s' % config.TV_VIEW_OUTFMT + # Build the MPlayer command + args = (config.MPLAYER_NICE, config.MPLAYER_CMD, config.MPLAYER_VO_DEV, + config.MPLAYER_VO_DEV_OPTS) if mode == 'tv': ! if vg.group_type == 'ivtv': ! ivtv_dev = ivtv.IVTV(vg.vdev) ! ivtv_dev.init_settings() ! ivtv_dev.print_settings() ! self.fc.chanSet(tuner_channel) ! ! tvcmd = vg.vdev ! ! if config.MPLAYER_ARGS.has_key('ivtv'): ! args += (config.MPLAYER_ARGS['ivtv'],) ! ! else: ! freq_khz = self.fc.chanSet(tuner_channel, app='mplayer') ! tuner_freq = '%1.3f' % (freq_khz / 1000.0) ! ! tvcmd = ('tv:// -tv driver=%s:freq=%s:%s:%s:' ! '%s:width=%s:height=%s:%s %s' % ! (config.TV_DRIVER, tuner_freq, device, input, norm, ! w, h, outfmt, config.TV_OPTS)) ! ! if config.MPLAYER_ARGS.has_key('tv'): ! args += (config.MPLAYER_ARGS['tv'],) ! elif mode == 'vcr': *************** *** 169,185 **** w, h, outfmt, config.TV_OPTS)) else: print 'Mode "%s" is not implemented' % mode # XXX ui.message() return ! ! # Build the MPlayer command ! args = (config.MPLAYER_NICE, config.MPLAYER_CMD, config.MPLAYER_VO_DEV, ! config.MPLAYER_VO_DEV_OPTS, tvcmd) ! ! if config.MPLAYER_ARGS.has_key('tv'): ! args += (config.MPLAYER_ARGS['tv'],) ! ! mpl = '--prio=%s %s -vo %s%s -fs %s %s -slave' % args command = mpl --- 200,213 ---- w, h, outfmt, config.TV_OPTS)) + if config.MPLAYER_ARGS.has_key('tv'): + args += (config.MPLAYER_ARGS['tv'],) + else: print 'Mode "%s" is not implemented' % mode # XXX ui.message() return ! args += (tvcmd,) ! ! mpl = '--prio=%s %s -vo %s%s -fs %s -slave %s' % args command = mpl *************** *** 252,266 **** elif event == em.TV_CHANNEL_UP or event == em.TV_CHANNEL_DOWN: if self.mode == 'vcr': return ! # 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) # Display a channel changed message --- 280,309 ---- 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': return ! 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) ! self.current_vg = self.fc.getVideoGroup(self.fc.getChannel()) # Display a channel changed message ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Freevo-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-cvslog