Author: dmeyer
Date: Fri Dec  8 12:50:57 2006
New Revision: 2185

Modified:
   trunk/popcorn/src/backends/gstreamer/__init__.py
   trunk/popcorn/src/backends/gstreamer/config.cxml
   trunk/popcorn/src/backends/mplayer/config.cxml
   trunk/popcorn/src/backends/xine/__init__.py
   trunk/popcorn/src/backends/xine/config.cxml

Log:
use config file for caps in xine and gstreamer

Modified: trunk/popcorn/src/backends/gstreamer/__init__.py
==============================================================================
--- trunk/popcorn/src/backends/gstreamer/__init__.py    (original)
+++ trunk/popcorn/src/backends/gstreamer/__init__.py    Fri Dec  8 12:50:57 2006
@@ -1,8 +1,43 @@
-from player import GStreamer
+# -*- coding: iso-8859-1 -*-
+# -----------------------------------------------------------------------------
+# gstreamer/__init__.py - gstreamer backend
+# -----------------------------------------------------------------------------
+# $Id$
+#
+# -----------------------------------------------------------------------------
+# kaa.popcorn - Generic Player API
+# Copyright (C) 2006 Jason Tackaberry, Dirk Meyer
+#
+# Please see the file AUTHORS 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
+#
+# -----------------------------------------------------------------------------
+
+# kaa.popcorn imports
 from kaa.popcorn.backends import register
 from kaa.popcorn.ptypes import *
 
+# player imports
+from player import GStreamer
+from config import config
+
 def get_capabilities():
+    """
+    Return capabilities of the gstreamer backend.
+    """
     capabilities = {
         CAP_CANVAS : False,
         CAP_CANVAS : False,
@@ -10,18 +45,19 @@
         CAP_VARIABLE_SPEED : False,
         CAP_VISUALIZATION : True,
 
-        CAP_DVD : 0,
-        CAP_DVD_MENUS : 0,
-        CAP_DEINTERLACE : 8
+        CAP_DVD : config.capability.dvd,
+        CAP_DVD_MENUS : config.capability.dvdmenu,
+        CAP_DEINTERLACE : config.capability.deinterlace
     }
+
     schemes = [ "file", "fifo", "dvd", "vcd", "cdda", "http", "tcp", "udp",
                 "rtp", "smb", "mms", "pnm", "rtsp" ]
 
     # list of extentions when to prefer this player
-    exts = ["mpg", "mpeg", "iso"]
+    exts = config.preferred.extentions.split(' ')
 
     # list of codecs when to prefer this player
-    codecs = []
+    codecs = config.preferred.codecs.split(' ')
 
     return capabilities, schemes, exts, codecs
 

Modified: trunk/popcorn/src/backends/gstreamer/config.cxml
==============================================================================
--- trunk/popcorn/src/backends/gstreamer/config.cxml    (original)
+++ trunk/popcorn/src/backends/gstreamer/config.cxml    Fri Dec  8 12:50:57 2006
@@ -4,4 +4,35 @@
     <var name="activate" default="False">
         <desc lang="en">activate backend</desc>
     </var>
+
+    <group name="capability">
+        <desc>
+            Capability rating of the player. The possible values are between
+            0 (unable to play) up to 10 (perfect). Do not change this unless
+            you know what you are doing.
+        </desc>
+        <var name="dvd" default="0"/>
+        <var name="dvdmenu" default="0"/>
+        <var name="deinterlace" default="0"/>
+    </group>
+
+    <group name="preferred">
+
+        <!-- TODO: find a good default value -->
+        <var name="extentions" type="str">
+            <desc>
+                Comma seperated list of extentions for which this player should
+                be the preferred player.
+            </desc>
+        </var>
+
+        <!-- TODO: find a good default value -->
+        <var name="codecs" type="str">
+            <desc>
+                Comma seperated list of video or audio codecs fourcc codes for
+                which this player should be the preferred player. Use mminfo
+                on a file to get to the needed fourcc code.
+            </desc>
+        </var>
+    </group>
 </config>

Modified: trunk/popcorn/src/backends/mplayer/config.cxml
==============================================================================
--- trunk/popcorn/src/backends/mplayer/config.cxml      (original)
+++ trunk/popcorn/src/backends/mplayer/config.cxml      Fri Dec  8 12:50:57 2006
@@ -7,6 +7,7 @@
     <var name="path" type="str">
         <desc lang="en">Path to mplayer binary (if empty, search $PATH)</desc>
     </var>
+
     <group name="capability">
         <desc>
             Capability rating of the player. The possible values are between
@@ -17,6 +18,7 @@
         <var name="dvdmenu" default="2"/>
         <var name="deinterlace" default="6"/>
     </group>
+
     <group name="preferred">
 
         <!-- TODO: find a good default value -->

Modified: trunk/popcorn/src/backends/xine/__init__.py
==============================================================================
--- trunk/popcorn/src/backends/xine/__init__.py (original)
+++ trunk/popcorn/src/backends/xine/__init__.py Fri Dec  8 12:50:57 2006
@@ -1,8 +1,43 @@
-from player import Xine
+# -*- coding: iso-8859-1 -*-
+# -----------------------------------------------------------------------------
+# xine/__init__.py - xine backend
+# -----------------------------------------------------------------------------
+# $Id$
+#
+# -----------------------------------------------------------------------------
+# kaa.popcorn - Generic Player API
+# Copyright (C) 2006 Jason Tackaberry, Dirk Meyer
+#
+# Please see the file AUTHORS 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
+#
+# -----------------------------------------------------------------------------
+
+# kaa.popcorn imports
 from kaa.popcorn.backends import register
 from kaa.popcorn.ptypes import *
 
+# player imports
+from player import Xine
+from config import config
+
 def get_capabilities():
+    """
+    Return capabilities of the xine backend.
+    """
     capabilities = {
         CAP_CANVAS : True,
         CAP_CANVAS : True,
@@ -10,10 +45,11 @@
         CAP_VARIABLE_SPEED : True,
         CAP_VISUALIZATION : True,
 
-        CAP_DVD : 8,
-        CAP_DVD_MENUS : 8,
-        CAP_DEINTERLACE : 8
+        CAP_DVD : config.capability.dvd,
+        CAP_DVD_MENUS : config.capability.dvdmenu,
+        CAP_DEINTERLACE : config.capability.deinterlace
     }
+
     schemes = [ "file", "fifo", "dvd", "vcd", "cdda", "http", "tcp", "udp",
                 "rtp", "smb", "mms", "pnm", "rtsp", "pvr" ]
 
@@ -23,6 +59,12 @@
     # list of codecs when to prefer this player
     codecs = []
 
+    # list of extentions when to prefer this player
+    exts = config.preferred.extentions.split(' ')
+
+    # list of codecs when to prefer this player
+    codecs = config.preferred.codecs.split(' ')
+
     return capabilities, schemes, exts, codecs
 
 

Modified: trunk/popcorn/src/backends/xine/config.cxml
==============================================================================
--- trunk/popcorn/src/backends/xine/config.cxml (original)
+++ trunk/popcorn/src/backends/xine/config.cxml Fri Dec  8 12:50:57 2006
@@ -20,4 +20,35 @@
     <var name="vsync" default="True">
         <desc lang="en">Enable vsync via OpenGL (applies only to X11 
visuals)</desc>
     </var>
+
+    <group name="capability">
+        <desc>
+            Capability rating of the player. The possible values are between
+            0 (unable to play) up to 10 (perfect). Do not change this unless
+            you know what you are doing.
+        </desc>
+        <var name="dvd" default="8"/>
+        <var name="dvdmenu" default="8"/>
+        <var name="deinterlace" default="8"/>
+    </group>
+
+    <group name="preferred">
+
+        <!-- TODO: find a good default value -->
+        <var name="extentions" type="str">
+            <desc>
+                Comma seperated list of extentions for which this player should
+                be the preferred player.
+            </desc>
+        </var>
+
+        <!-- TODO: find a good default value -->
+        <var name="codecs" type="str">
+            <desc>
+                Comma seperated list of video or audio codecs fourcc codes for
+                which this player should be the preferred player. Use mminfo
+                on a file to get to the needed fourcc code.
+            </desc>
+        </var>
+    </group>
 </config>

-------------------------------------------------------------------------
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-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to