summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2004-06-27 11:16:20 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2004-06-27 11:16:20 +0000
commit29f04d913513a470bc91aff3e6c0fca699e460f8 (patch)
treef98c80765204e178ac1742f86c554f12822a4e57
parent5db55e3f0cf5e541516dc18070a7ac4bb9a2f992 (diff)
downloadxine-lib-29f04d913513a470bc91aff3e6c0fca699e460f8.tar.gz
xine-lib-29f04d913513a470bc91aff3e6c0fca699e460f8.tar.bz2
calling XInitThreads() is definitely the frontend's job, because it has
to call Xlib functions before xine to properly fill x11_visual_t CVS patchset: 6755 CVS date: 2004/06/27 11:16:20
-rw-r--r--ChangeLog3
-rw-r--r--doc/hackersguide/library.sgml6
-rw-r--r--src/video_out/video_out_xshm.c8
-rw-r--r--src/video_out/video_out_xv.c7
4 files changed, 11 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 101db9590..c147fbb37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
xine-lib (1-rc6)
* move win32 frontend into separate module
* fix Xv initialization to enable multiple instances of the Xv plugin
+ * remove XInitThreads() call from some video out plugins, because it
+ might lead to undefined behaviour; calling XInitThreads() is entirely
+ the frontend's job
xine-lib (1-rc5)
* add support for ejecting removable media on Solaris
diff --git a/doc/hackersguide/library.sgml b/doc/hackersguide/library.sgml
index 63e550e3d..907346bc2 100644
--- a/doc/hackersguide/library.sgml
+++ b/doc/hackersguide/library.sgml
@@ -40,6 +40,12 @@
will find a very easy and hopefully self-explaining xine frontend
to give you a start.
</para>
+ <para>
+ One important thing to note is that any X11 based xine-lib frontend
+ must call <function>XInitThreads()</function> before calling the
+ first Xlib function, because xine will access the display from
+ within a different thread than the frontend.
+ </para>
<sect2>
<title>Source code of a simple X11 frontend</title>
<programlisting>
diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c
index 68629a183..9f08d3e13 100644
--- a/src/video_out/video_out_xshm.c
+++ b/src/video_out/video_out_xshm.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_xshm.c,v 1.132 2004/05/09 21:05:34 miguelfreitas Exp $
+ * $Id: video_out_xshm.c,v 1.133 2004/06/27 11:16:20 mroi Exp $
*
* video_out_xshm.c, X11 shared memory extension interface for xine
*
@@ -1046,12 +1046,6 @@ static vo_driver_t *xshm_open_plugin (video_driver_class_t *class_gen, const voi
int cpu_byte_order;
XColor dummy;
- if (!XInitThreads()) {
- xprintf (class->xine, XINE_VERBOSITY_LOG,
- _("video_out_xshm: No thread-safe X libraries available.\n"));
- return NULL;
- }
-
this = (xshm_driver_t *) xine_xmalloc (sizeof (xshm_driver_t));
if (!this)
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index cf1f8b50b..bc6541dac 100644
--- a/src/video_out/video_out_xv.c
+++ b/src/video_out/video_out_xv.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_xv.c,v 1.201 2004/06/26 14:47:34 mroi Exp $
+ * $Id: video_out_xv.c,v 1.202 2004/06/27 11:16:20 mroi Exp $
*
* video_out_xv.c, X11 video extension interface for xine
*
@@ -1522,11 +1522,6 @@ static void dispose_class (video_driver_class_t *this_gen) {
static void *init_class (xine_t *xine, void *visual_gen) {
xv_class_t *this = (xv_class_t *) xine_xmalloc (sizeof (xv_class_t));
- if (!XInitThreads()) {
- xprintf (xine, XINE_VERBOSITY_LOG, _("video_out_xv: No thread-safe X libraries available.\n"));
- return NULL;
- }
-
this->driver_class.open_plugin = open_plugin;
this->driver_class.get_identifier = get_identifier;
this->driver_class.get_description = get_description;