# HG changeset patch
# User Darren Salt <[EMAIL PROTECTED]>
# Date 1176221302 -3600
# Node ID d1512848e87ba0c24b8b6859061d235162cab53e
# Parent 7861beeecd3fadaa61f846eb4391c367e8d6b66c
Split the DirectFB plugin into X11 and non-X versions.
This fixes linkage problems for people who want this but don't want X.
diff -r d1512848e87ba0c24b8b6859061d235162cab53e -r
7861beeecd3fadaa61f846eb4391c367e8d6b66c ChangeLog
--- a/ChangeLog Tue Apr 10 17:08:22 2007 +0100
+++ b/ChangeLog Tue Apr 10 17:07:18 2007 +0100
@@ -1,4 +1,5 @@ xine-lib (1.1.6) [UNRELEASED]
xine-lib (1.1.6) [UNRELEASED]
+ * Split the DirectFB plugin into X11 and non-X versions.
xine-lib (1.1.5)
* Security fixes:
diff -r d1512848e87ba0c24b8b6859061d235162cab53e -r
7861beeecd3fadaa61f846eb4391c367e8d6b66c src/video_out/Makefile.am
--- a/src/video_out/Makefile.am Tue Apr 10 17:08:22 2007 +0100
+++ b/src/video_out/Makefile.am Tue Apr 10 17:07:18 2007 +0100
@@ -5,7 +5,7 @@ AM_LDFLAGS = $(xineplug_ldflags)
SUBDIRS = libdha vidix macosx
-EXTRA_DIST = video_out_directfb.c video_out_directx.c video_out_macosx.m
+EXTRA_DIST = video_out_directfb.c video_out_directfb_fb.c
video_out_directfb_x.c video_out_directx.c video_out_macosx.m
VIDIX_CFLAGS = -I$(top_builddir)/src/video_out/vidix \
-I$(top_srcdir)/src/video_out/vidix
@@ -64,6 +64,9 @@ endif
if HAVE_DIRECTFB
directfb_module = xineplug_vo_out_directfb.la
+if HAVE_X11
+directfb_module += xineplug_vo_out_xdirectfb.la
+endif
endif
if HAVE_SDL
@@ -162,9 +165,13 @@ xineplug_vo_out_fb_la_LIBADD = $(MLIB_LI
xineplug_vo_out_fb_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) $(PTHREAD_LIBS)
xineplug_vo_out_fb_la_CFLAGS = $(VISIBILITY_FLAG) $(MLIB_CFLAGS)
-xineplug_vo_out_directfb_la_SOURCES = video_out_directfb.c $(X11OSD)
-xineplug_vo_out_directfb_la_LIBADD = $(XINE_LIB) $(DIRECTFB_LIBS) $(X_LIBS)
$(PTHREAD_LIBS)
+xineplug_vo_out_directfb_la_SOURCES = video_out_directfb_fb.c
+xineplug_vo_out_directfb_la_LIBADD = $(XINE_LIB) $(DIRECTFB_LIBS)
$(PTHREAD_LIBS)
xineplug_vo_out_directfb_la_CFLAGS = $(VISIBILITY_FLAG) $(DIRECTFB_CFLAGS)
-fno-strict-aliasing
+
+xineplug_vo_out_xdirectfb_la_SOURCES = video_out_directfb_x.c $(X11OSD)
+xineplug_vo_out_xdirectfb_la_LIBADD = $(XINE_LIB) $(DIRECTFB_LIBS) $(X_LIBS)
$(PTHREAD_LIBS)
+xineplug_vo_out_xdirectfb_la_CFLAGS = $(VISIBILITY_FLAG) $(DIRECTFB_CFLAGS)
-fno-strict-aliasing
xineplug_vo_out_sdl_la_SOURCES = video_out_sdl.c
xineplug_vo_out_sdl_la_LIBADD = $(SDL_LIBS) $(X_LIBS) $(XINE_LIB)
$(PTHREAD_LIBS)
diff -r d1512848e87ba0c24b8b6859061d235162cab53e -r
7861beeecd3fadaa61f846eb4391c367e8d6b66c src/video_out/video_out_directfb.c
--- a/src/video_out/video_out_directfb.c Tue Apr 10 17:08:22 2007 +0100
+++ b/src/video_out/video_out_directfb.c Tue Apr 10 17:07:18 2007 +0100
@@ -31,7 +31,7 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_X11
+#ifdef DIRECTFB_X11
# include <X11/Xlib.h>
#endif
@@ -44,7 +44,7 @@
#include "xineutils.h"
#include "vo_scale.h"
-#ifdef HAVE_X11
+#ifdef DIRECTFB_X11
# include "x11osd.h"
#endif
@@ -118,7 +118,7 @@ typedef struct directfb_driver_s {
int flicker_filtering;
int field_parity;
-#ifdef HAVE_X11
+#ifdef DIRECTFB_X11
/* X11 related stuff */
Display *display;
int screen;
@@ -317,7 +317,7 @@ static void directfb_update_frame_format
frame->ratio = ratio;
}
-#ifdef HAVE_X11
+#ifdef DIRECTFB_X11
static uint32_t directfb_colorkey_to_pixel (directfb_driver_t *this) {
switch (this->depth) {
case 8:
@@ -343,7 +343,7 @@ static void directfb_clean_output_area (
static void directfb_clean_output_area (directfb_driver_t *this) {
if (this->visual_type == XINE_VISUAL_TYPE_X11 ||
this->visual_type == XINE_VISUAL_TYPE_X11_2) {
-#ifdef HAVE_X11
+#ifdef DIRECTFB_X11
if (this->config.options & DLOP_DST_COLORKEY) {
int i;
@@ -410,7 +410,7 @@ static void directfb_overlay_begin (vo_d
this->ovl_changed += changed;
if (this->ovl_changed) {
-#ifdef HAVE_X11
+#ifdef DIRECTFB_X11
if (this->xoverlay) {
LOCK_DISPLAY();
x11osd_clear (this->xoverlay);
@@ -554,7 +554,7 @@ static void directfb_overlay_blend (vo_d
if (overlay->unscaled) {
if (!this->ovl_changed)
return;
-#ifdef HAVE_X11
+#ifdef DIRECTFB_X11
if (this->xoverlay) {
LOCK_DISPLAY();
x11osd_blend (this->xoverlay, overlay);
@@ -586,7 +586,7 @@ static void directfb_overlay_end (vo_dri
directfb_driver_t *this = (directfb_driver_t *) this_gen;
if (this->ovl_changed) {
-#ifdef HAVE_X11
+#ifdef DIRECTFB_X11
if (this->xoverlay) {
LOCK_DISPLAY();
x11osd_expose (this->xoverlay);
@@ -1120,7 +1120,7 @@ static int directfb_gui_data_exchange (v
switch (data_type) {
case XINE_GUI_SEND_DRAWABLE_CHANGED:
lprintf ("drawable changed.\n");
-#ifdef HAVE_X11
+#ifdef DIRECTFB_X11
if (this->visual_type == XINE_VISUAL_TYPE_X11 ||
this->visual_type == XINE_VISUAL_TYPE_X11_2) {
this->drawable = (Drawable) data;
@@ -1140,7 +1140,7 @@ static int directfb_gui_data_exchange (v
case XINE_GUI_SEND_EXPOSE_EVENT:
lprintf ("expose event.\n");
-#ifdef HAVE_X11
+#ifdef DIRECTFB_X11
if (this->visual_type == XINE_VISUAL_TYPE_X11 ||
this->visual_type == XINE_VISUAL_TYPE_X11_2) {
if (this->xoverlay) {
@@ -1182,7 +1182,7 @@ static void directfb_dispose (vo_driver_
if (this->cur_frame)
this->cur_frame->vo_frame.dispose (&this->cur_frame->vo_frame);
-#ifdef HAVE_X11
+#ifdef DIRECTFB_X11
if (this->visual_type == XINE_VISUAL_TYPE_X11 ||
this->visual_type == XINE_VISUAL_TYPE_X11_2) {
LOCK_DISPLAY();
@@ -1280,7 +1280,7 @@ static void update_config_cb (void *data
this->layer->SetDstColorKey (this->layer, (this->colorkey & 0xff0000) >>
16,
(this->colorkey & 0x00ff00) >>
8,
(this->colorkey & 0x0000ff) >>
0);
-#ifdef HAVE_X11
+#ifdef DIRECTFB_X11
if (this->xoverlay) {
x11osd_colorkey (this->xoverlay,
directfb_colorkey_to_pixel(this), &this->sc);
@@ -1893,6 +1893,7 @@ static void dispose_class_fb (video_driv
free (this);
}
+#ifndef DIRECTFB_X11
static void *init_class_fb (xine_t *xine, void *visual_gen) {
directfb_class_t *this;
const char *error;
@@ -1925,7 +1926,7 @@ static const vo_info_t vo_info_directfb_
/*** XDirectFB plugin functions ****/
-#ifdef HAVE_X11
+#else
static vo_driver_t *open_plugin_x11 (video_driver_class_t *class_gen, const
void *visual_gen) {
directfb_class_t *class = (directfb_class_t *) class_gen;
directfb_driver_t *this;
@@ -2163,9 +2164,10 @@ static const vo_info_t vo_info_directfb_
const plugin_info_t xine_plugin_info[] EXPORTED = {
/* type, API, "name", version, special_info, init_function */
+#ifndef DIRECTFB_X11
{ PLUGIN_VIDEO_OUT, VIDEO_OUT_DRIVER_IFACE_VERSION, "DirectFB",
XINE_VERSION_CODE, &vo_info_directfb_fb, init_class_fb },
-#ifdef HAVE_X11
+#else
{ PLUGIN_VIDEO_OUT, VIDEO_OUT_DRIVER_IFACE_VERSION, "XDirectFB",
XINE_VERSION_CODE, &vo_info_directfb_x11, init_class_x11 },
{ PLUGIN_VIDEO_OUT, VIDEO_OUT_DRIVER_IFACE_VERSION, "XDirectFB",
diff -r d1512848e87ba0c24b8b6859061d235162cab53e -r
7861beeecd3fadaa61f846eb4391c367e8d6b66c src/video_out/video_out_directfb_fb.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/video_out/video_out_directfb_fb.c Tue Apr 10 17:07:18 2007 +0100
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2007 the xine project
+ *
+ * This file is part of xine, a free video player.
+ *
+ * xine 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.
+ *
+ * xine is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY 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
+ *
+ *
+ * DirectFB output plugin (console version wrapper)
+ */
+
+#undef DIRECTFB_X11
+#include "video_out_directfb.c"
diff -r d1512848e87ba0c24b8b6859061d235162cab53e -r
7861beeecd3fadaa61f846eb4391c367e8d6b66c src/video_out/video_out_directfb_x.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/video_out/video_out_directfb_x.c Tue Apr 10 17:07:18 2007 +0100
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2007 the xine project
+ *
+ * This file is part of xine, a free video player.
+ *
+ * xine 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.
+ *
+ * xine is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY 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
+ *
+ *
+ * DirectFB output plugin (X version wrapper)
+ */
+
+#define DIRECTFB_X11
+#include "video_out_directfb.c"
-------------------------------------------------------------------------
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
_______________________________________________
Xine-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xine-cvslog