Author: tack
Date: Sun Apr 2 23:56:45 2006
New Revision: 1380
Modified:
trunk/player/src/xine.py
trunk/player/test/play.py
Log:
Use rowstride of video width * 4 for xine OSD canvas to work around an evas
bug where if rowstride != display width * 4, nothing gets rendered to the
canvas. Also fix a bug in _handle_command_osd_update where if alpha was 0
or visible was False, it wouldn't end up passing the new value to the kaa
driver.
Modified: trunk/player/src/xine.py
==============================================================================
--- trunk/player/src/xine.py (original)
+++ trunk/player/src/xine.py Sun Apr 2 23:56:45 2006
@@ -136,8 +136,9 @@
# FIXME: don't hardcore buffer dimensions
- self._send_command("osd_configure", width, height, aspect, 2000, 2000)
- return self._osd_shmem.addr + 16, 2000 * 4, self._frame_shmem.addr
+ assert(width*height*4 < 2000*2000*4)
+ self._send_command("osd_configure", width, height, aspect)
+ return self._osd_shmem.addr + 16, width * 4, self._frame_shmem.addr
def _handle_command_setup(self, wid):
@@ -246,11 +247,11 @@
if not self._osd_shmem:
return
- if alpha:
+ if alpha != None:
self._driver_control("set_osd_alpha", alpha)
- if visible:
+ if visible != None:
self._driver_control("set_osd_visibility", visible)
- if invalid_regions:
+ if invalid_regions != None:
self._driver_control("osd_invalidate_rect", invalid_regions)
self._osd_shmem.write(chr(BUFFER_UNLOCKED))
@@ -417,7 +418,7 @@
self.signals["end"].emit()
- def _handle_command_osd_configure(self, width, height, aspect,
buffer_width, buffer_height):
+ def _handle_command_osd_configure(self, width, height, aspect):
if not self._osd_shmem:
shmid = shm.getshmid(self._osd_shmkey)
if shmid:
@@ -432,7 +433,7 @@
# TODO: remember these values and emit them to new connections to
# this signal after this point.
self.signals["osd_configure"].emit(width, height, self._osd_shmem.addr
+ 16,
- buffer_width, buffer_height)
+ width, height)
def _handle_command_resize(self, size):
Modified: trunk/player/test/play.py
==============================================================================
--- trunk/player/test/play.py (original)
+++ trunk/player/test/play.py Sun Apr 2 23:56:45 2006
@@ -158,7 +158,10 @@
osd_text = osd_cont.add_child(kaa.canvas.Text("Hello", size = 24), left = 40,
vcenter="50%")
osd.show()
+#osd_cont.move(0,0)
+#r=osd.add_child(kaa.canvas.Rectangle(), color=(255,255,255,255), width=640,
height=640)
kaa.notifier.Timer(output_status_line, player).start(0.1)
+
kaa.signals["stdin_key_press_event"].connect(handle_key, player)
if player.get_window():
player.get_window().signals["key_press_event"].connect(handle_key, player)
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog