[Toxine-cvs] CVS: toxine/src/plugins vo_caca.c,NONE,1.1 Makefile.am,1.9,1.10 vo_aa.c,1.14,1.15 vo_dx
Brought to you by:
f1rmb
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-09 17:56:36
|
Update of /cvsroot/toxine/toxine/src/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7894/src/plugins Modified Files: Makefile.am vo_aa.c vo_dxr3.c vo_none.c vo_x11.c Added Files: vo_caca.c Log Message: support cacalib output --- NEW FILE: vo_caca.c --- /* ** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program 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. ** ** This program 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. ** */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <unistd.h> #include <errno.h> #include <caca.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include "common.h" typedef struct { int init; } caca_private_t; static void init_video_out(toxine_t *tox) { toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; caca_private_t *private = (caca_private_t *) vop->private; private->init = 1; tox->video.port = xine_open_video_driver(tox->xine, tox->video.name, XINE_VISUAL_TYPE_CACA, NULL); if(tox->video.port == NULL) { fprintf(stderr, "xine_open_video_driver() failed to load '%s' driver.\n", tox->video.name); exit(1); } else fprintf(stderr, "video driver '%s' successfuly loaded.\n", tox->video.name); } static void deinit_video_out(toxine_t *tox) { toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; caca_private_t *private = (caca_private_t *) vop->private; xine_close_video_driver(tox->xine, tox->video.port); tox->video.port = NULL; private->init = 0; } static void release_video_out(toxine_t *tox) { toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.last_plugin; caca_private_t *private = (caca_private_t *) vop->private; if(private->init) deinit_video_out(tox); free(private); free(vop); } static const char *get_identifier(void) { return "CACAlib video out"; } static char *_vo_caca_names[] = { "CACA", NULL }; static const char **get_names(void) { return (const char **)_vo_caca_names; } static const char *get_help(void) { return "Video out plugin supporting ColorAsCiiArt driver.\n"; } static int is_fullscreen(toxine_t *tox) { return 0; } static void fullscreen(toxine_t *tox) { } toxine_vo_plugin_t *toxine_load_vo_plugin(toxine_t *tox) { toxine_vo_plugin_t *caca; caca_private_t *private; caca = (toxine_vo_plugin_t *) xine_xmalloc(sizeof(toxine_vo_plugin_t)); private = (caca_private_t *) xine_xmalloc(sizeof(caca_private_t)); private->init = 0; caca->video_out_init = init_video_out; caca->video_out_event_loop = NULL; caca->video_out_deinit = deinit_video_out; caca->video_out_release = release_video_out; caca->get_identifier = get_identifier; caca->get_names = get_names; caca->get_help = get_help; caca->is_fullscreen = is_fullscreen; caca->receive_xine_event = NULL; caca->fullscreen = fullscreen; caca->private = (void *) private; return caca; } Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Makefile.am 8 Apr 2004 15:27:17 -0000 1.9 +++ Makefile.am 9 Apr 2004 17:43:14 -0000 1.10 @@ -1,6 +1,6 @@ -AM_CFLAGS = @CFLAGS@ @XINE_CFLAGS@ @X_CFLAGS@ $(AALIB_CFLAGS) -DEBUG_CFLAGS = @DEBUG_CFLAGS@ @XINE_CFLAGS@ $(AALIB_CFLAGS) +AM_CFLAGS = @CFLAGS@ @XINE_CFLAGS@ @X_CFLAGS@ $(AALIB_CFLAGS) $(CACA_CFLAGS) +DEBUG_CFLAGS = @DEBUG_CFLAGS@ @XINE_CFLAGS@ $(AALIB_CFLAGS) $(CACA_CFLAGS) libdir = $(TOXINE_PLUGINDIR) @@ -10,7 +10,11 @@ aa_plugin = toxine_vo_plugin_aa.la endif -lib_LTLIBRARIES = $(aa_plugin) toxine_vo_plugin_x11.la \ +if HAVE_CACA +caca_plugin = toxine_vo_plugin_caca.la +endif + +lib_LTLIBRARIES = $(aa_plugin) $(caca_plugin) toxine_vo_plugin_x11.la \ toxine_vo_plugin_dxr3.la toxine_vo_plugin_none.la toxine_vo_plugin_x11_la_SOURCES = vo_x11.c @@ -20,6 +24,9 @@ toxine_vo_plugin_aa_la_SOURCES = vo_aa.c toxine_vo_plugin_aa_la_LDFLAGS = -avoid-version -module $(AALIB_LIBS) -lm +toxine_vo_plugin_caca_la_SOURCES = vo_caca.c +toxine_vo_plugin_caca_la_LDFLAGS = -avoid-version -module $(CACA_LIBS) -lm + toxine_vo_plugin_dxr3_la_SOURCES = vo_dxr3.c toxine_vo_plugin_dxr3_la_LDFLAGS = -avoid-version -module Index: vo_aa.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_aa.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- vo_aa.c 7 Apr 2004 18:21:07 -0000 1.14 +++ vo_aa.c 9 Apr 2004 17:43:14 -0000 1.15 @@ -112,9 +112,6 @@ return "Video out plugin supporting AsciiArt driver.\n"; } -static void receive_xine_event(toxine_t *tox, const xine_event_t *event) { -} - static int is_fullscreen(toxine_t *tox) { return 0; } @@ -139,7 +136,7 @@ aa->get_names = get_names; aa->get_help = get_help; aa->is_fullscreen = is_fullscreen; - aa->receive_xine_event = receive_xine_event; + aa->receive_xine_event = NULL; aa->fullscreen = fullscreen; aa->private = (void *) private; Index: vo_dxr3.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_dxr3.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- vo_dxr3.c 7 Apr 2004 18:21:07 -0000 1.18 +++ vo_dxr3.c 9 Apr 2004 17:43:14 -0000 1.19 @@ -114,9 +114,6 @@ return "Video out plugin supports DXR3/HW+ cards (lb:letterboxed, ws:widescreen).\n"; } -static void receive_xine_event(toxine_t *tox, const xine_event_t *event) { -} - static int is_fullscreen(toxine_t *tox) { return 0; } @@ -140,7 +137,7 @@ dxr3->get_identifier = get_identifier; dxr3->get_names = get_names; dxr3->get_help = get_help; - dxr3->receive_xine_event = receive_xine_event; + dxr3->receive_xine_event = NULL; dxr3->is_fullscreen = is_fullscreen; dxr3->fullscreen = fullscreen; dxr3->private = (void *) private; Index: vo_none.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_none.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- vo_none.c 7 Apr 2004 18:21:07 -0000 1.11 +++ vo_none.c 9 Apr 2004 17:43:14 -0000 1.12 @@ -82,9 +82,6 @@ return "Video out plugin which display nothing (useful for audio only playback).\n"; } -static void receive_xine_event(toxine_t *tox, const xine_event_t *event) { -} - static int is_fullscreen(toxine_t *tox) { return 0; } @@ -109,7 +106,7 @@ none->get_names = get_names; none->get_help = get_help; none->is_fullscreen = is_fullscreen; - none->receive_xine_event = receive_xine_event; + none->receive_xine_event = NULL; none->fullscreen = fullscreen; none->private = (void *) private; Index: vo_x11.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_x11.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- vo_x11.c 8 Apr 2004 16:28:03 -0000 1.25 +++ vo_x11.c 9 Apr 2004 17:43:14 -0000 1.26 @@ -1135,12 +1135,6 @@ /* * */ -static void receive_xine_event(toxine_t *tox, const xine_event_t *event) { -} - -/* - * - */ static int is_fullscreen(toxine_t *tox) { toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; x11_private_t *private = (x11_private_t *) vop->private; @@ -1174,7 +1168,7 @@ x11->get_identifier = get_identifier; x11->get_names = get_names; x11->get_help = get_help; - x11->receive_xine_event = receive_xine_event; + x11->receive_xine_event = NULL; x11->is_fullscreen = is_fullscreen; x11->fullscreen = fullscreen; x11->private = (void *) private; |