Rob,

I wrote this; it doesn't crash anything, but I don't know it it does
what we'd discussed.  I'll test and post back, would be much cleaner
to have this somewhere else though ;-)

Mick

#if 0 /*
# -----------------------------------------------------------------------
# vdr_close.py - A VDR (DVB) plugin for freevo
# -----------------------------------------------------------------------
#
# Author:
#   Ove Risberg    [EMAIL PROTECTED]
#   Thomas Weber   [EMAIL PROTECTED]
#
# Notes:
#
#   Run "freevo setup vdr-0.3.tgz" and activate the plugin with
#   plugin.activate('vdr', level=5) in your config.
#
#   Requirements:
#   - svdrpylib installed in freevo/src/
#   - a running vdr installation (of course :)
#   - when using tvtime/SVDRP: (Full featured DVB cards)
#       - set SVDRP Timeout in vdrs OSD to 0
#       - make sure to setup svdrphosts.conf correctly
#       - add the color buttons (YELLOW,GREEN,RED,BLUE) to freevo's lirc file
#   - for XINE (Budget DVB cards, streaming client)
#       - xine plugin for vdr. Start vdr with -P'xine -r'
#
#   The Plugin uses several variables from local_conf.py:
#       VDR_VIEWER_PLUGIN='tvtime'  # Wich Viewer? Use either tvtime or xine.
#       VDR_USE_SVDRP=1             # Ignored for tvtime use. When you
use xine, you can use xine's event chain
#                                   # instead of SVDRP to send keypresses.
#       VDR_SVDRP_HOST='localhost'  # This is the host that runs vdr
#       VDR_SVDRP_PORT=2001         # VDR's SVDRP Port. 2001 is
default. Make sure that no other
#                                   # program is sitting on the port!
#       VDR_SVDRP_ALWAYSCLOSE=0     # Should we close/reopen the SVDRP
connection on each keypress? (Safe but SLOW!)
#
#
# The plugin is tested with the following setup:
#   freevo    1.5.0
#   vdr       1.3.10, 1.3.11   (with vdr-xine 0.3.4 or 0.4.2 plugin)
#   xine-lib  1-rc4a, 1-rc5    (with vdr-xine 0.3.4 or 0.4.2 patch)
#   xine-ui   0.99.1, 0.99.2   (with vdr-xine 0.3.4 or 0.4.2 patch)
#
# This is my first freevo plugin and my first Python program so if you find
# anything strange or bugs in the code please email me or the freevo-devel
# maillist so I can correct the error and learn from my mistakes ;-).
#
# Extra key bindings:
#
#   Key        Event
#   ---------- -------
#   F9         RED
#   F10        GREEN
#   F11        YELLOW
#   F12        BLUE
#   BackSpace  BACK
#
# Todo:
#   Recordserver integration
#   Documentation
#
# -----------------------------------------------------------------------
#
# Revision 0.3  2004-09-25 14:00:00 Thomas Weber, Ove Risberg
# Added support for tvtime and svdrp
#
# Revision 0.2  2004-07-09 11:00:00 Ove Risberg
# Fixed problem with freevo 1.5.0 rc4
#
# Revision 0.1  2004-06-29 12:30:00 Ove Risberg
# First release
#
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
# Copyright (C) 2003 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
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MER-
# CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ----------------------------------------------------------------------- */
#endif

#python modules
import re

#freevo modules
import config, menu, rc, plugin, util
from item import Item
import childapp
import pygame.locals as key
from event import *

#vdrpy modules
from vdrpylib.svdrp import SVDRP
import time

class PluginInterface(plugin.DaemonPlugin):
    """
        Sending foo events
    """
    def __init__(self):
        plugin.DaemonPlugin.__init__(self)
        self.poll_interval  = 120000
        self.vdrinterface=plugin.getbyname('VDRINTERFACE');

    def poll(self):
        print "trying to close svdrp"
        self.vdrinterface.vdr.close()


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to