Update of /cvsroot/freevo/kaa/xine/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30717/src
Modified Files:
__init__.py xine.c
Log Message:
Buffer video driver takes a passthrough option to pass the video through
to the real video out (like Xv, say). The buffer callback can prevent
video from being passed through by returning False. Currently kaaplayer
is a mess as it contains a lot of half-working code to test this stuff.
Index: xine.c
===================================================================
RCS file: /cvsroot/freevo/kaa/xine/src/xine.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** xine.c 25 Jul 2005 17:33:45 -0000 1.14
--- xine.c 25 Jul 2005 23:23:57 -0000 1.15
***************
*** 11,14 ****
--- 11,15 ----
#include "event.h"
#include "drivers/buffer.h"
+ #include "post/fork.h"
PyObject *xine_error;
***************
*** 75,78 ****
--- 76,80 ----
xine_init(xine);
xine_register_plugins(xine, xine_vo_buffer_plugin_info);
+ xine_register_plugins(xine, xine_fork_plugin_info);
self->xine = xine;
xine_object_to_pyobject_register(xine, (PyObject *)self);
***************
*** 157,160 ****
--- 159,163 ----
char *driver;
void *finalize_data = NULL;
+ int own = 1;
if (!PyArg_ParseTuple(args, "s", &driver))
***************
*** 166,183 ****
vo_port = xine_open_video_driver(self->xine, driver,
XINE_VISUAL_TYPE_NONE, 0);
} else if (!strcmp(driver, "buffer")) {
! PyObject *callback = PyDict_GetItemString(kwargs, "callback");
! if (!callback) {
! PyErr_Format(xine_error, "Specify callback for buffer driver");
! return NULL;
! }
! vo_port = xine_open_video_driver(self->xine, driver,
XINE_VISUAL_TYPE_NONE, (void *)callback);
}
! if (!vo_port && !PyErr_Occurred()) {
! PyErr_Format(xine_error, "Failed to open driver: %s", driver);
return NULL;
}
! vo = pyxine_new_video_port_pyobject((PyObject *)self, vo_port, 1);
if (!strcmp(driver, "xv") || !strcmp(driver, "auto") || !strcmp(driver,
"xshm")) {
--- 169,183 ----
vo_port = xine_open_video_driver(self->xine, driver,
XINE_VISUAL_TYPE_NONE, 0);
} else if (!strcmp(driver, "buffer")) {
! vo_port = xine_open_video_driver(self->xine, driver,
XINE_VISUAL_TYPE_NONE, (void *)kwargs);
! own = 1;
}
! if (!vo_port) {
! if (!PyErr_Occurred())
! PyErr_Format(xine_error, "Failed to open driver: %s", driver);
return NULL;
}
! vo = pyxine_new_video_port_pyobject((PyObject *)self, vo_port, own);
if (!strcmp(driver, "xv") || !strcmp(driver, "auto") || !strcmp(driver,
"xshm")) {
Index: __init__.py
===================================================================
RCS file: /cvsroot/freevo/kaa/xine/src/__init__.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** __init__.py 25 Jul 2005 17:33:45 -0000 1.15
--- __init__.py 25 Jul 2005 23:23:57 -0000 1.16
***************
*** 153,156 ****
--- 153,159 ----
self._xine.dependencies.append(window._window)
+ if "passthrough" in kwargs:
+ assert(isinstance(kwargs["passthrough"], VideoPort))
+ kwargs["passthrough"] = kwargs["passthrough"]._port
vo = self._xine.open_video_driver(driver, **kwargs)
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog