Author: dmeyer
Date: Mon Nov 6 15:04:54 2006
New Revision: 1984
Modified:
trunk/popcorn/src/backends/mplayer/player.py
Log:
use get_position and get_info from base.py
Modified: trunk/popcorn/src/backends/mplayer/player.py
==============================================================================
--- trunk/popcorn/src/backends/mplayer/player.py (original)
+++ trunk/popcorn/src/backends/mplayer/player.py Mon Nov 6 15:04:54 2006
@@ -157,8 +157,6 @@
self._file = None
self._file_args = []
- self._file_info = {}
- self._position = 0.0
self._filters_pre = []
self._filters_add = []
self._last_line = None
@@ -237,20 +235,20 @@
"LENGTH": ("length", float),
"FILENAME": ("filename", str) }
if attr in info:
- self._file_info[info[attr][0]] = info[attr][1](value)
+ self._streaminfo[info[attr][0]] = info[attr][1](value)
elif line.startswith("Movie-Aspect"):
aspect = line[16:].split(":")[0].replace(",", ".")
if aspect[0].isdigit():
- self._file_info["aspect"] = float(aspect)
+ self._streaminfo["aspect"] = float(aspect)
elif line.startswith("VO:"):
m = re.search("=> (\d+)x(\d+)", line)
if m:
vo_w, vo_h = int(m.group(1)), int(m.group(2))
- if "aspect" not in self._file_info or
self._file_info["aspect"] == 0:
+ if "aspect" not in self._streaminfo or
self._streaminfo["aspect"] == 0:
# No aspect defined, so base it on vo size.
- self._file_info["aspect"] = vo_w / float(vo_h)
+ self._streaminfo["aspect"] = vo_w / float(vo_h)
elif line.startswith("overlay:") and line.find("reusing") == -1:
m = re.search("(\d+)x(\d+)", line)
@@ -493,20 +491,6 @@
self._child_write("seek %f %s" % (value, s.index(type)))
- def get_position(self):
- """
- Get current playing position.
- """
- return self._position
-
-
- def get_info(self):
- """
- Get information about the stream.
- """
- return self._file_info
-
-
#
# Methods for filter handling (not yet in generic and base
#
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog