Duncan,

Sorry for the delay. I now had time to test the patch and it does not
work. it now produces the following command (adding both the non
hardware accellerated VO device and the non HW accel):

 --prio=-20 /usr/bin/mplayer -vo xvidixxvmc  -vc ffmpeg12mc -framedrop  
-ao alsa -fs -autosync 100 -nolirc -autoq 100 -screenw 768 -screenh 576
-fs -slave -cache 8192 /dev/video0


Duncan Webb wrote:
> Paul Sijben wrote:
>   
>> 1.6.1 with the modifications I have shared with the email list ;-)
>>     
>
> Will you try this patch against the original tv/plugins/mplayer.py?
>
> I would like to know if the changes are valid for the HWACCEL stuff.
>
> Duncan
>
>   
> ------------------------------------------------------------------------
>
> --- src/tv/plugins/mplayer.py 2006-10-24 09:44:21.000000000 +0200
> +++ src/tv/plugins/mplayer.py.r8716   2006-12-11 22:00:10.000000000 +0100
> @@ -2,14 +2,14 @@
>  # -----------------------------------------------------------------------
>  # mplayer.py - implementation of a TV function using MPlayer
>  # -----------------------------------------------------------------------
> -# $Id: mplayer.py 8460 2006-10-24 07:44:20Z duncan $
> +# $Id: mplayer.py 8716 2006-12-10 16:50:42Z duncan $
>  #
>  # Notes:
> -# Todo:        
> +# Todo:
>  #
>  # -----------------------------------------------------------------------
>  # Freevo - A Home Theater PC framework
> -# Copyright (C) 2002 Krister Lagerstrom, et al. 
> +# Copyright (C) 2002 Krister Lagerstrom, et al.
>  # Please see the file freevo/Docs/CREDITS for a complete list of authors.
>  #
>  # This program is free software; you can redistribute it and/or modify
> @@ -69,7 +69,7 @@
>  
>      __muted    = 0
>      __igainvol = 0
> -    
> +
>      def __init__(self):
>          self.tuner_chidx = 0    # Current channel, index into 
> config.TV_CHANNELS
>          self.app_mode = 'tv'
> @@ -81,19 +81,20 @@
>  
>          if not tuner_channel:
>              tuner_channel = self.fc.getChannel()
> -            
> +
>          vg = self.current_vg = self.fc.getVideoGroup(tuner_channel, True)
>  
>          # Convert to MPlayer TV setting strings
>          norm = 'norm=%s' % vg.tuner_norm
>          input = 'input=%s' % vg.input_num
>          device= 'device=%s' % vg.vdev
> -            
> +
>          w, h = config.TV_VIEW_SIZE
>          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_HWACCEL, 
> config.MPLAYER_VO_DEV_OPTS_HWACCEL,
>                  config.MPLAYER_VO_DEV_OPTS, config.MPLAYER_AO_DEV, 
> config.MPLAYER_ARGS_DEF)
>  
>          if mode == 'tv':
> @@ -104,7 +105,7 @@
>                  #ivtv_dev.print_settings()
>                  ivtv_dev.close()
>                  self.fc.chanSet(tuner_channel, True)
> -            
> +
>                  tvcmd = vg.vdev
>  
>                  if config.MPLAYER_ARGS.has_key('ivtv'):
> @@ -128,7 +129,7 @@
>  
>                  tvcmd = ('tv:// -tv driver=%s:%s:freq=%s:%s:%s:'
>                           '%s:width=%s:height=%s:%s %s' %
> -                         (config.TV_DRIVER, vg.adev, tuner_freq, device, 
> input, norm, 
> +                         (config.TV_DRIVER, vg.adev, tuner_freq, device, 
> input, norm,
>                            w, h, outfmt, config.TV_OPTS))
>  
>                  if config.MPLAYER_ARGS.has_key('tv'):
> @@ -140,7 +141,7 @@
>  
>                  tvcmd = ('tv:// -tv driver=%s:freq=%s:%s:%s:'
>                           '%s:width=%s:height=%s:%s %s' %
> -                         (config.TV_DRIVER, tuner_freq, device, input, norm, 
> +                         (config.TV_DRIVER, tuner_freq, device, input, norm,
>                            w, h, outfmt, config.TV_OPTS))
>  
>                  if config.MPLAYER_ARGS.has_key('tv'):
> @@ -149,7 +150,7 @@
>          elif mode == 'vcr':
>              tvcmd = ('tv:// -tv driver=%s:%s:%s:'
>                       '%s:width=%s:height=%s:%s %s' %
> -                     (config.TV_DRIVER, device, input, norm, 
> +                     (config.TV_DRIVER, device, input, norm,
>                        w, h, outfmt, config.TV_OPTS))
>  
>              if config.MPLAYER_ARGS.has_key('tv'):
> @@ -161,9 +162,10 @@
>  
>          args += (tvcmd,)
>  
> -        mpl = '--prio=%s %s -vo %s%s -ao %s -fs %s -slave %s %s' % args
> +        mpl = '--prio=%s %s -vo %s%s %s %s -ao %s -fs %s -slave %s %s' % args
>  
>          command = mpl
> +        _debug_('command=\"%s\"', (command))
>          self.mode = mode
>  
>  
> @@ -172,7 +174,7 @@
>          # VCR is mic in
>          # btaudio (different dsp device) will be added later
>          mixer = plugin.getbyname('MIXER')
> -        
> +
>          if mixer and config.MAJOR_AUDIO_CTRL == 'VOL':
>              mixer_vol = mixer.getMainVolume()
>              mixer.setMainVolume(0)
> @@ -182,7 +184,7 @@
>  
>          # Start up the TV task
>          self.app = childapp.ChildApp2(command)
> -        
> +
>          self.prev_app = rc.app()
>          rc.app(self)
>  
> @@ -197,7 +199,7 @@
>          elif mixer:
>              mixer.setLineinVolume(config.TV_IN_VOLUME)
>              mixer.setIgainVolume(config.TV_IN_VOLUME)
> -            
> +
>          if mixer and config.MAJOR_AUDIO_CTRL == 'VOL':
>              mixer.setMainVolume(mixer_vol)
>          elif mixer and config.MAJOR_AUDIO_CTRL == 'PCM':
> @@ -231,16 +233,25 @@
>              rc.post_event(em.PLAY_END)
>              return TRUE
>  
> +        elif event == em.PAUSE or event == em.PLAY:
> +            self.app.write('pause\n')
> +            if DEBUG: print '%s: sending pause to mplayer' % (time.time())
> +            return TRUE
> +
>          elif event in [ em.TV_CHANNEL_UP, em.TV_CHANNEL_DOWN] or 
> s_event.startswith('INPUT_'):
>              if event == em.TV_CHANNEL_UP:
>                  nextchan = self.fc.getNextChannel()
> +                nextchannum = self.fc.getNextChannelNum()
>              elif event == em.TV_CHANNEL_DOWN:
>                  nextchan = self.fc.getPrevChannel()
> +                nextchannum = self.fc.getPrevChannelNum()
>              else:
>                  chan = int( s_event[6] )
>                  nextchan = self.fc.getManChannel(chan)
> +                nextchannum = self.fc.getManChannelNum(chan)
>  
>              nextvg = self.fc.getVideoGroup(nextchan, True)
> +            _debug_('chan=%s, nextchannum=%s, nextchan=%s nextvg=%s' % 
> (chan, nextchannum, nextchan, nextvg))
>  
>              if self.current_vg != nextvg:
>                  self.Stop(channel_change=1)
> @@ -249,10 +260,13 @@
>  
>              if self.mode == 'vcr':
>                  return
> -            
> +
>              elif self.current_vg.group_type == 'dvb':
> -                self.Stop(channel_change=1)
> -                self.Play('tv', nextchan)
> +                card = 0 # May be this should come from video groups or 
> TV_CHANNELS
> +                if em.TV_CHANNEL_UP:
> +                    self.app.write('dvb_set_channel %s %s\n' % (nextchannum, 
> card))
> +                elif em.TV_CHANNEL_DOWN:
> +                    self.app.write('dvb_set_channel %s %s\n' % (nextchannum, 
> card))
>                  return TRUE
>  
>              elif self.current_vg.group_type == 'ivtv':
> @@ -282,6 +296,6 @@
>              cmd = 'osd_show_text "%s"\n' % msg
>              self.app.write(cmd)
>              return FALSE
> -            
> +
>          return FALSE
> -    
> +
>
>   
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> 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
> Freevo-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freevo-users
>   

-- 
Paul Sijben             mailto:[EMAIL PROTECTED]
Amersfoort, NL          http://www.sijben.net
tel:+31 334557522       fax:+31 33 4557523

-------------------------------------------------------------------------
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
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to