⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mplayer-1.0pre7try2-xynth.diff

📁 CS架构的多平台的GUI系统
💻 DIFF
📖 第 1 页 / 共 2 页
字号:
i MPlayer-1.0pre7try2/Makefile MPlayer-1.0pre7try2-xynth/Makefile--- MPlayer-1.0pre7try2/Makefile	2005-04-16 23:18:12.000000000 +0300+++ MPlayer-1.0pre7try2-xynth/Makefile	2005-12-02 14:26:56.000000000 +0200@@ -30,7 +30,7 @@ OBJS_MENCODER = $(SRCS_MENCODER:.c=.o) OBJS_MPLAYER = $(SRCS_MPLAYER:.c=.o) -VO_LIBS = $(AA_LIB) $(X_LIB) $(SDL_LIB) $(GGI_LIB) $(MP1E_LIB) $(MLIB_LIB) $(SVGA_LIB) $(DIRECTFB_LIB) $(CACA_LIB)+VO_LIBS = $(AA_LIB) $(X_LIB) $(SDL_LIB) $(GGI_LIB) $(MP1E_LIB) $(MLIB_LIB) $(SVGA_LIB) $(DIRECTFB_LIB) $(XYNTH_LIB) $(CACA_LIB) AO_LIBS = $(ARTS_LIB) $(ESD_LIB) $(JACK_LIB) $(NAS_LIB) $(SGIAUDIO_LIB) $(POLYP_LIB) CODEC_LIBS = $(AV_LIB) $(FAME_LIB) $(MAD_LIB) $(VORBIS_LIB) $(THEORA_LIB) $(FAAD_LIB) $(LIBLZO_LIB) $(DECORE_LIB) $(XVID_LIB) $(DTS_LIB) $(PNG_LIB) $(Z_LIB) $(JPEG_LIB) $(ALSA_LIB) $(XMMS_LIB) $(X264_LIB) COMMON_LIBS = libmpcodecs/libmpcodecs.a $(W32_LIB) $(DS_LIB) libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a osdep/libosdep.a $(DVDREAD_LIB) $(CODEC_LIBS) $(FREETYPE_LIB) $(TERMCAP_LIB) $(CDPARANOIA_LIB) $(MPLAYER_NETWORK_LIB) $(WIN32_LIB) $(GIF_LIB) $(MACOSX_FRAMEWORKS) $(SMBSUPPORT_LIB) $(FRIBIDI_LIB) $(FONTCONFIG_LIB) $(ENCA_LIB)diff -U 3 -H -d -r -N MPlayer-1.0pre7try2/configure MPlayer-1.0pre7try2-xynth/configure--- MPlayer-1.0pre7try2/configure	2005-04-13 14:46:35.000000000 +0300+++ MPlayer-1.0pre7try2-xynth/configure	2005-12-02 14:26:56.000000000 +0200@@ -236,6 +236,7 @@   --enable-dga[=n]       build with DGA [n in {1, 2} ] support [autodetect]   --enable-vesa          build with VESA support [autodetect]   --enable-svga          build with SVGAlib support [autodetect]+  --enable-xynth         build with Xynyh Windowing System support [autodetect]   --enable-sdl           build with SDL render support [autodetect]   --enable-aa            build with AAlib render support [autodetect]   --enable-caca          build with CACA render support [autodetect]@@ -1304,6 +1305,7 @@ _aa=auto _caca=auto _svga=auto+_xynth=auto _vesa=auto _fbdev=auto _dvb=auto@@ -1470,6 +1472,8 @@   --disable-caca)	_caca=no	;;   --enable-svga)	_svga=yes	;;   --disable-svga)	_svga=no	;;+  --enable-xynth)	_xynth=yes	;;+  --disable-xynth)	_xynth=no	;;   --enable-vesa)	_vesa=yes	;;   --disable-vesa)	_vesa=no	;;   --enable-fbdev)	_fbdev=yes	;;@@ -3845,6 +3849,27 @@ echores "$_svga"  +echocheck "Xynth"+if test "$_xynth" = auto ; then+  cat > $TMPC << EOF+#include <xynth.h>+int main(void) { return 0; }+EOF+  _xynth=no+  cc_check  -lxynth && _xynth=yes+fi+if test "$_xynth" = yes ; then+  _def_xynth='#define HAVE_XYNTH 1'+  _ld_xynth='-lxynth'+  _vosrc="$_vosrc vo_xynth.c"+  _vomodules="xynth $_vomodules"+else+  _def_xynth='#undef HAVE_XYNTH'+  _novomodules="xynth $_novomodules"+fi+echores "$_xynth"++ echocheck "FBDev" if test "$_fbdev" = auto ; then   _fbdev=no@@ -6768,6 +6793,7 @@ GIF_LIB = $_ld_gif SDL_LIB = $_ld_sdl SVGA_LIB = $_ld_svga+XYNTH_LIB = $_ld_xynth AA_LIB = $_ld_aa CACA_INC = $_inc_caca CACA_LIB = $_ld_caca@@ -7481,6 +7507,7 @@ $_def_dvb $_def_dvb_in $_def_svga+$_def_xynth $_def_vesa $_def_xdpms $_def_aadiff -U 3 -H -d -r -N MPlayer-1.0pre7try2/libvo/video_out.c MPlayer-1.0pre7try2-xynth/libvo/video_out.c--- MPlayer-1.0pre7try2/libvo/video_out.c	2004-12-21 22:33:51.000000000 +0200+++ MPlayer-1.0pre7try2-xynth/libvo/video_out.c	2005-12-02 14:26:56.000000000 +0200@@ -81,6 +81,7 @@ extern vo_functions_t video_out_fbdev; extern vo_functions_t video_out_fbdev2; extern vo_functions_t video_out_svga;+extern vo_functions_t video_out_xynth; extern vo_functions_t video_out_png; extern vo_functions_t video_out_ggi; extern vo_functions_t video_out_aa;@@ -189,6 +190,9 @@ #ifdef HAVE_SVGALIB 	&video_out_svga, #endif+#ifdef HAVE_XYNTH+	&video_out_xynth,+#endif #ifdef HAVE_AA 	&video_out_aa, #endifdiff -U 3 -H -d -r -N MPlayer-1.0pre7try2/libvo/vo_xynth.c MPlayer-1.0pre7try2-xynth/libvo/vo_xynth.c--- MPlayer-1.0pre7try2/libvo/vo_xynth.c	1970-01-01 02:00:00.000000000 +0200+++ MPlayer-1.0pre7try2-xynth/libvo/vo_xynth.c	2005-10-04 22:20:29.000000000 +0300@@ -0,0 +1,394 @@+/***************************************************************************+    begin                : Thu Jan 22 2004+    copyright            : (C) 2004 - 2005 by Alper Akcan+    email                : distchx@yahoo.com+ ***************************************************************************/++/***************************************************************************+ *                                                                         *+ *   This program is free software; you can redistribute it and/or modify  *+ *   it under the terms of the GNU Lesser General Public License as        *+ *   published by the Free Software Foundation; either version 2.1 of the  *+ *   License, or (at your option) any later version.                       *+ *                                                                         *+ ***************************************************************************/++#include <stdio.h>+#include <stdlib.h>+#include <string.h>+#include <errno.h>+#include <assert.h>+#include <xynth.h>++#include "mplayer.h"+#include "config.h"+#include "video_out.h"+#include "video_out_internal.h"+#include "osdep/keycodes.h"+#include "osdep/getch2.h"++static int running;+static s_rect_t win;+static s_thread_t *tid;+static s_window_t *window;++#define UNUSED(x) ((void)(x))++static void handler_set (void);+static void atexit_handler (s_window_t *w);+static void atexpose_handler (s_window_t *w);+static uint32_t draw_image (mp_image_t *mpi);+static uint32_t query_format(uint32_t format);+static void draw_alpha(int x0, int y0, int w, int h, unsigned char *src, unsigned char *srca, int stride);++static int image_width;+static int image_height;++static vo_info_t info = {+	"Xynth Windowing System",+	"xynth",+	"Alper Akcan <distchx@yahoo.com>",+	""+};++LIBVO_EXTERN(xynth);++static uint32_t preinit(const char *arg)+{+	getch2_disable();+	+	if (s_client_init(&window)) {+		printf("%s:%d\n", __FILE__, __LINE__);+		exit(0);+	}+	+	s_client_atexit(window, atexit_handler);+	+	return 0;+}++static uint32_t control (uint32_t request, void *data, ...)+{+	switch (request) {+		case VOCTRL_QUERY_FORMAT:+			return query_format(*((uint32_t*) data));+		case VOCTRL_DRAW_IMAGE:+			return draw_image((mp_image_t *) data);+		case VOCTRL_PAUSE:+			window->surface->mode = SURFACE_REAL;+			return VO_TRUE;+		case VOCTRL_RESUME:+			window->surface->mode = SURFACE_VIRTUAL;+			return VO_TRUE;+		/*+		     VOCTRL_FULLSCREEN+		     VOCTRL_GET_IMAGE+		     VOCTRL_RESET+		     VOCTRL_GUISUPPORT+		     VOCTRL_SET_EQUALIZER+		     VOCTRL_GET_EQUALIZER+		     VOCTRL_ONTOP+		*/+	}++	return VO_NOTIMPL;+}++static uint32_t config (uint32_t width, uint32_t height, uint32_t d_width,+                        uint32_t d_height, uint32_t flags, char *title,+                        uint32_t format)+{+        int x;+        int y;+	int req_w = (int) width;+	int req_h = (int) height;+	int req_bpp;++	if (!IMGFMT_IS_RGB(format) && !IMGFMT_IS_BGR(format)) {+		assert(0);+		return -1;+	}+	req_bpp = IMGFMT_BGR_DEPTH(format);++	if (vo_dbpp != 0 && vo_dbpp != req_bpp) {+		assert(0);+		return -1;+	}++        if (window->surface->bitsperpixel != req_bpp) {+		exit(0);+	}++	image_width = req_w;+	image_height = req_h;++	if (vo_config_count <= 0) {+		handler_set();+		s_window_new(window, WINDOW_MAIN, NULL);+		s_window_set_title(window, "Mplayer - %s", filename);+		x = (window->surface->linear_buf_width - (int) width) / 2;+		if (x <= 5) x = window->surface->buf.x;+		y = (window->surface->linear_buf_height - (int) height) / 2;+		if (y <= 5) y = window->surface->buf.y;+		s_window_set_coor(window, NO_FORM, x, y, req_w, req_h);+		s_window_set_resizeable(window, 0);+		s_window_show(window);+		s_free(window->surface->vbuf);+		window->surface->width = req_w;+		window->surface->height = req_h;+		window->surface->vbuf = (char *) s_malloc(window->surface->width *+		                                          window->surface->height *+		                                          window->surface->bytesperpixel);+		tid = s_thread_create(s_client_main, window);+		running = 1;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -