Update of /cvsroot/freevo/freevo/src/tv/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv16212
Modified Files:
mplayer.py
Log Message:
Reverting to r1.23 until we sort out some nasties.
Index: mplayer.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/tv/plugins/mplayer.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** mplayer.py 24 Nov 2003 04:40:29 -0000 1.25
--- mplayer.py 24 Nov 2003 13:17:48 -0000 1.26
***************
*** 10,23 ****
# -----------------------------------------------------------------------
# $Log$
! # Revision 1.25 2003/11/24 04:40:29 krister
! # TV viewing is broken(!) Here are some fixes to make it a little better, but it
still cannot change channels when viewing TV.
! #
! # Revision 1.24 2003/11/23 19:53:01 rshortt
! # Move some code into src/tv/channels.py and also make use of Freevo's
! # frequency tables (and custom frequencies).
! #
! # This plugin indirectly makes use of the new VIDEO_GROUPS config item.
! #
! # Please test. I don't have the setup to test this myself.
#
# Revision 1.23 2003/11/06 06:08:38 krister
--- 10,15 ----
# -----------------------------------------------------------------------
# $Log$
! # Revision 1.26 2003/11/24 13:17:48 rshortt
! # Reverting to r1.23 until we sort out some nasties.
#
# Revision 1.23 2003/11/06 06:08:38 krister
***************
*** 83,88 ****
import childapp # Handle child applications
import tv.epg_xmltv as epg # The Electronic Program Guide
! from tv.channels import FreevoChannels
!
import plugin
--- 75,79 ----
import childapp # Handle child applications
import tv.epg_xmltv as epg # The Electronic Program Guide
!
import plugin
***************
*** 118,124 ****
self.tuner_chidx = 0 # Current channel, index into config.TV_CHANNELS
self.app_mode = 'tv'
! self.fc = FreevoChannels()
def Play(self, mode, tuner_channel=None, channel_change=0):
--- 109,156 ----
self.tuner_chidx = 0 # Current channel, index into config.TV_CHANNELS
self.app_mode = 'tv'
!
! def TunerSetChannel(self, tuner_channel):
! for pos in range(len(config.TV_CHANNELS)):
! channel = config.TV_CHANNELS[pos]
! if channel[2] == tuner_channel:
! self.tuner_chidx = pos
! return
! print 'ERROR: Cannot find tuner channel "%s" in the TV channel listing' %
tuner_channel
! self.tuner_chidx = 0
!
!
! def TunerGetChannelInfo(self):
! '''Get program info for the current channel'''
!
! tuner_id = config.TV_CHANNELS[self.tuner_chidx][2]
! chan_name = config.TV_CHANNELS[self.tuner_chidx][1]
! chan_id = config.TV_CHANNELS[self.tuner_chidx][0]
!
! channels = epg.get_guide().GetPrograms(start=time.time(),
! stop=time.time(), chanids=[chan_id])
!
! if channels and channels[0] and channels[0].programs:
! start_s = time.strftime('%H:%M',
time.localtime(channels[0].programs[0].start))
! stop_s = time.strftime('%H:%M',
time.localtime(channels[0].programs[0].stop))
! ts = '(%s-%s)' % (start_s, stop_s)
! prog_info = '%s %s' % (ts, channels[0].programs[0].title)
! else:
! prog_info = 'No info'
!
! return tuner_id, chan_name, prog_info
!
!
! def TunerGetChannel(self):
! return config.TV_CHANNELS[self.tuner_chidx][2]
!
!
! def TunerNextChannel(self):
! self.tuner_chidx = (self.tuner_chidx+1) % len(config.TV_CHANNELS)
+ def TunerPrevChannel(self):
+ self.tuner_chidx = (self.tuner_chidx-1) % len(config.TV_CHANNELS)
+
+
def Play(self, mode, tuner_channel=None, channel_change=0):
***************
*** 126,136 ****
try:
! self.fc.chanSet(tuner_channel, app='mplayer')
except ValueError:
pass
if mode == 'tv':
! tuner_freq = self.fc.chanSet(tuner_channel, app='mplayer')
! tuner_channel = self.fc.getChannel()
cf_norm, cf_input, cf_clist, cf_device = config.TV_SETTINGS.split()
--- 158,167 ----
try:
! self.TunerSetChannel(tuner_channel)
except ValueError:
pass
if mode == 'tv':
! tuner_channel = self.TunerGetChannel()
cf_norm, cf_input, cf_clist, cf_device = config.TV_SETTINGS.split()
***************
*** 152,160 ****
outfmt = 'outfmt=%s' % config.TV_VIEW_OUTFMT
-
tvcmd = ('tv://%s -tv driver=%s:%s:%s:%s:'
'%s:width=%s:height=%s:%s %s' %
! (tuner_channel, config.TV_DRIVER, device,
! input, norm, chanlist, w, h, outfmt, config.TV_OPTS))
# Build the MPlayer command
--- 183,189 ----
outfmt = 'outfmt=%s' % config.TV_VIEW_OUTFMT
tvcmd = ('tv://%s -tv driver=%s:%s:%s:%s:'
'%s:width=%s:height=%s:%s %s' %
! (tuner_channel, config.TV_DRIVER, device, input, norm,
chanlist, w, h, outfmt, config.TV_OPTS))
# Build the MPlayer command
***************
*** 275,287 ****
# Go to the prev/next channel in the list
if event == em.TV_CHANNEL_UP:
! new_freq = self.fc.chanUp(app=self.thread.app)
else:
! new_freq = self.fc.chanDown(app=self.thread.app)
! self.thread.app.write('tv_set_freq %s\n' % new_freq)
# Display a channel changed message
# XXX Experimental, disabled for now
! #tuner_id, chan_name, prog_info = self.fc.getChannelInfo()
#now = time.strftime('%H:%M')
#msg = '%s %s (%s): %s' % (now, chan_name, tuner_id, prog_info)
--- 304,317 ----
# Go to the prev/next channel in the list
if event == em.TV_CHANNEL_UP:
! self.TunerNextChannel()
else:
! self.TunerPrevChannel()
! new_channel = self.TunerGetChannel()
! self.thread.app.write('tv_set_channel %s\n' % new_channel)
# Display a channel changed message
# XXX Experimental, disabled for now
! #tuner_id, chan_name, prog_info = self.TunerGetChannelInfo()
#now = time.strftime('%H:%M')
#msg = '%s %s (%s): %s' % (now, chan_name, tuner_id, prog_info)
***************
*** 295,299 ****
# Display the channel info message
# XXX Experimental, disabled for now
! tuner_id, chan_name, prog_info = self.fc.getChannelInfo()
now = time.strftime('%H:%M')
msg = '%s %s (%s): %s' % (now, chan_name, tuner_id, prog_info)
--- 325,329 ----
# Display the channel info message
# XXX Experimental, disabled for now
! tuner_id, chan_name, prog_info = self.TunerGetChannelInfo()
now = time.strftime('%H:%M')
msg = '%s %s (%s): %s' % (now, chan_name, tuner_id, prog_info)
-------------------------------------------------------
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