[Toxine-cvs] CVS: toxine/src/plugins vo_fb.c,NONE,1.1 Makefile.am,1.11,1.12
Brought to you by:
f1rmb
From: Daniel Caujolle-B. <f1...@us...> - 2004-07-18 21:18:40
|
Update of /cvsroot/toxine/toxine/src/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26943 Modified Files: Makefile.am Added Files: vo_fb.c Log Message: fb plugin added (keyboard isn't supported yet). --- NEW FILE: vo_fb.c --- /* ** Copyright (C) 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 <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include "common.h" typedef struct { int init; } fb_private_t; static void init_video_out(toxine_t *tox) { toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; fb_private_t *private = (fb_private_t *) vop->private; private->init = 1; start_watchdog(tox, "xine_open_video_driver"); tox->video.port = xine_open_video_driver(tox->xine, tox->video.name, XINE_VISUAL_TYPE_FB, NULL); stop_watchdog(tox); if(tox->video.port == NULL) { perr("xine_open_video_driver() failed to load '%s' driver.\n", tox->video.name); exit(TOX_ERR_XINE_OPEN_VIDEO_DRIVER); } else pinfo("video driver '%s' successfully 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; fb_private_t *private = (fb_private_t *) vop->private; start_watchdog(tox, "xine_close_video_driver"); xine_close_video_driver(tox->xine, tox->video.port); stop_watchdog(tox); 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; fb_private_t *private = (fb_private_t *) vop->private; if(private->init) deinit_video_out(tox); free(private); free(vop); } static const char *get_identifier(void) { return "framebuffer video out"; } static char *_vo_fb_names[] = { "fb", NULL }; static const char **get_names(void) { return (const char **)_vo_fb_names; } static const char *get_help(void) { return "Video out plugin supporting framebuffer driver.\n"; } static int is_fullscreen(toxine_t *tox) { return 1; } static void fullscreen(toxine_t *tox) { } toxine_vo_plugin_t *toxine_load_vo_plugin(toxine_t *tox) { toxine_vo_plugin_t *fb; fb_private_t *private; fb = (toxine_vo_plugin_t *) xine_xmalloc(sizeof(toxine_vo_plugin_t)); private = (fb_private_t *) xine_xmalloc(sizeof(fb_private_t)); private->init = 0; fb->video_out_init = init_video_out; fb->video_out_event_loop = NULL; fb->video_out_deinit = deinit_video_out; fb->video_out_release = release_video_out; fb->get_identifier = get_identifier; fb->get_names = get_names; fb->get_help = get_help; fb->is_fullscreen = is_fullscreen; fb->receive_xine_event = NULL; fb->fullscreen = fullscreen; fb->private = (void *) private; return fb; } Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/Makefile.am,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- Makefile.am 6 May 2004 19:18:34 -0000 1.11 +++ Makefile.am 18 Jul 2004 21:18:32 -0000 1.12 @@ -15,7 +15,7 @@ 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_dxr3.la toxine_vo_plugin_none.la toxine_vo_plugin_fb.la toxine_vo_plugin_x11_la_SOURCES = vo_x11.c toxine_vo_plugin_x11_la_LDFLAGS = -avoid-version -module $(X_LIBS) $(XTEST_LIBS) \ @@ -33,6 +33,9 @@ toxine_vo_plugin_none_la_SOURCES = vo_none.c toxine_vo_plugin_none_la_LDFLAGS = -avoid-version -module +toxine_vo_plugin_fb_la_SOURCES = vo_fb.c +toxine_vo_plugin_fb_la_LDFLAGS = -avoid-version -module + noinst_HEADERS = vo_plugin.h debug: |