From 4c270ec59c7e10e41c224a44f874d306cb81e5e6 Mon Sep 17 00:00:00 2001 From: Pavlov Konstantin Date: Fri, 20 Jun 2008 00:46:04 +0400 Subject: [PATCH] Remove glide video output module. --- build-vlc | 2 - config.in | 4 - configure.ac | 27 --- modules/LIST | 1 - modules/video_output/Modules.am | 1 - modules/video_output/glide.c | 326 -------------------------------- po/POTFILES.in | 1 - 7 files changed, 362 deletions(-) delete mode 100644 modules/video_output/glide.c diff --git a/build-vlc b/build-vlc index e6aa06aeab..1e47799156 100755 --- a/build-vlc +++ b/build-vlc @@ -46,7 +46,6 @@ DIRECTX directx WINGDI wingdi SVGALIB svgalib GGI ggi -GLIDE glide AA aa CACA caca OSS oss @@ -111,7 +110,6 @@ WITHFRIBIDICONFIGPATH fribidi-config-path WITHQTE qte WITHDIRECTX directx WITHGGI ggi -WITHGLIDE glide WITHCACACONFIGPATH caca-config-path WITHMAD mad WITHMADTREE mad-tree diff --git a/config.in b/config.in index 0a1b35bec6..9828ec5acc 100644 --- a/config.in +++ b/config.in @@ -127,10 +127,6 @@ bool 'GGI support' CONFIG_GGI if [ "$CONFIG_GGI" = "y" ]; then string ' Path to libggi' CONFIG_WITHGGI "" fi -bool 'Glide (3dfx) support' CONFIG_GLIDE -if [ "$CONFIG_GLIDE" = "y" ]; then - string ' Path to libglide' CONFIG_WITHGLIDE "" -fi bool 'aalib output' CONFIG_AA bool 'cacalib output' CONFIG_CACA if [ "$CONFIG_CACA" = "y" ]; then diff --git a/configure.ac b/configure.ac index a76eb3d244..24e3998c24 100644 --- a/configure.ac +++ b/configure.ac @@ -4411,33 +4411,6 @@ then fi ]) fi -dnl -dnl Glide module -dnl -AC_ARG_ENABLE(glide, - [ --enable-glide Glide (3dfx) support (default disabled)]) -if test "${enable_glide}" = "yes" -then - CFLAGS_save="${CFLAGS}" - AC_ARG_WITH(glide, - [ --with-glide=PATH path to libglide], - [ if test "${with_glide}" != "no" -a -n "${with_glide}" - then - VLC_ADD_CPPFLAGS([glide],[-I${with_glide}/include]) - VLC_ADD_LIBS([glide],[-L${with_glide}/lib]) - CFLAGS="$CFLAGS -I${with_glide}/include" - fi ]) - CFLAGS="$CFLAGS -I/usr/include/glide" - AC_CHECK_HEADER(glide.h,[ - VLC_ADD_PLUGIN([glide]) - VLC_ADD_LIBS([glide],[-lglide2x -lm]) - VLC_ADD_CPPFLAGS([glide],[-I/usr/include/glide]) - ],[ - AC_MSG_ERROR([You don't have libglide. Install it or do not use --enable-glide]) - ]) - CFLAGS="${CFLAGS_save}" -fi - dnl dnl AA plugin dnl diff --git a/modules/LIST b/modules/LIST index 15ea1b49ed..5359542e56 100644 --- a/modules/LIST +++ b/modules/LIST @@ -119,7 +119,6 @@ $Id$ * gaussianblur: gaussian blur video filter * gestures: mouse gestures control plugin * ggi: video output module using the GGI API. - * glide: video output module using the Glide API. * glwin32: a opengl provider using DirectX OpenGL * glx: a opengl provider using X11 OpenGL * gme: game music files demuxer diff --git a/modules/video_output/Modules.am b/modules/video_output/Modules.am index f73cf65c4f..134e4d3395 100644 --- a/modules/video_output/Modules.am +++ b/modules/video_output/Modules.am @@ -8,7 +8,6 @@ SOURCES_aa = aa.c SOURCES_caca = caca.c SOURCES_fb = fb.c SOURCES_ggi = ggi.c -SOURCES_glide = glide.c SOURCES_vout_sdl = sdl.c SOURCES_svgalib = svgalib.c SOURCES_mga = mga.c diff --git a/modules/video_output/glide.c b/modules/video_output/glide.c deleted file mode 100644 index 6cc87d2178..0000000000 --- a/modules/video_output/glide.c +++ /dev/null @@ -1,326 +0,0 @@ -/***************************************************************************** - * glide.c : 3dfx Glide plugin for vlc - ***************************************************************************** - * Copyright (C) 2000, 2001 the VideoLAN team - * $Id$ - * - * Authors: Samuel Hocevar - * - * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ - -/***************************************************************************** - * Preamble - *****************************************************************************/ -#include /* ENOMEM */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include - -#ifndef __linux__ -# include /* for glide ? */ -#endif -#include -#include /* Glide kbhit() and getch() */ - -#define GLIDE_WIDTH 800 -#define GLIDE_HEIGHT 600 -#define GLIDE_BITS_PER_PLANE 16 -#define GLIDE_BYTES_PER_PIXEL 2 - -/***************************************************************************** - * Local prototypes - *****************************************************************************/ -static int Create ( vlc_object_t * ); -static void Destroy ( vlc_object_t * ); - -static int Init ( vout_thread_t * ); -static void End ( vout_thread_t * ); -static int Manage ( vout_thread_t * ); -static void Display ( vout_thread_t *, picture_t * ); - -static int OpenDisplay ( vout_thread_t * ); -static void CloseDisplay ( vout_thread_t * ); - -/***************************************************************************** - * Module descriptor - *****************************************************************************/ -vlc_module_begin(); - set_description( N_("3dfx Glide video output") ); - set_capability( "video output", 20 ); - add_shortcut( "3dfx" ); - set_callbacks( Create, Destroy ); -vlc_module_end(); - -/***************************************************************************** - * vout_sys_t: Glide video output method descriptor - ***************************************************************************** - * This structure is part of the video output thread descriptor. - * It describes the Glide specific properties of an output thread. - *****************************************************************************/ -struct vout_sys_t -{ - GrLfbInfo_t p_buffer_info; /* back buffer info */ - - uint8_t * pp_buffer[2]; - int i_index; -}; - -/***************************************************************************** - * Create: allocates Glide video thread output method - ***************************************************************************** - * This function allocates and initializes a Glide vout method. - *****************************************************************************/ -static int Create( vlc_object_t *p_this ) -{ - vout_thread_t *p_vout = (vout_thread_t *)p_this; - - /* Allocate structure */ - p_vout->p_sys = malloc( sizeof( vout_sys_t ) ); - if( p_vout->p_sys == NULL ) - return( 1 ); - - /* Open and initialize device */ - if( OpenDisplay( p_vout ) ) - { - msg_Err( p_vout, "cannot open display" ); - free( p_vout->p_sys ); - return( 1 ); - } - - p_vout->pf_init = Init; - p_vout->pf_end = End; - p_vout->pf_manage = Manage; - p_vout->pf_render = NULL; - p_vout->pf_display = Display; - - return( 0 ); -} - -/***************************************************************************** - * Init: initialize Glide video thread output method - *****************************************************************************/ -static int Init( vout_thread_t *p_vout ) -{ - int i_index; - picture_t *p_pic; - - /* FIXME: we don't set i_chroma !! */ - p_vout->output.i_rmask = 0xf800; - p_vout->output.i_gmask = 0x07e0; - p_vout->output.i_bmask = 0x001f; - - I_OUTPUTPICTURES = 0; - - p_pic = NULL; - - /* Find an empty picture slot */ - for( i_index = 0 ; i_index < VOUT_MAX_PICTURES ; i_index++ ) - { - if( p_vout->p_picture[ i_index ].i_status == FREE_PICTURE ) - { - p_pic = p_vout->p_picture + i_index; - break; - } - } - - if( p_pic == NULL ) - { - return -1; - } - - /* We know the chroma, allocate a buffer which will be used - * directly by the decoder */ - p_pic->i_planes = 1; - - p_pic->p->p_pixels = p_vout->p_sys->pp_buffer[p_vout->p_sys->i_index]; - p_pic->p->i_lines = GLIDE_HEIGHT; - p_pic->p->i_visible_lines = GLIDE_HEIGHT; - p_pic->p->i_pitch = p_vout->p_sys->p_buffer_info.strideInBytes; - /*1024 * GLIDE_BYTES_PER_PIXEL*/ - p_pic->p->i_pixel_pitch = GLIDE_BYTES_PER_PIXEL; - p_pic->p->i_visible_pitch = GLIDE_WIDTH * GLIDE_BYTES_PER_PIXEL; - - p_pic->i_status = DESTROYED_PICTURE; - p_pic->i_type = DIRECT_PICTURE; - - PP_OUTPUTPICTURE[ 0 ] = p_pic; - - I_OUTPUTPICTURES = 1; - - return 0; -} - -/***************************************************************************** - * End: terminate Glide video thread output method - *****************************************************************************/ -static void End( vout_thread_t *p_vout ) -{ - ; -} - -/***************************************************************************** - * Destroy: destroy Glide video thread output method - ***************************************************************************** - * Terminate an output method created by Create - *****************************************************************************/ -static void Destroy( vlc_object_t *p_this ) -{ - vout_thread_t *p_vout = (vout_thread_t *)p_this; - CloseDisplay( p_vout ); - free( p_vout->p_sys ); -} - -/***************************************************************************** - * Manage: handle Glide events - ***************************************************************************** - * This function should be called regularly by video output thread. It manages - * console events. It returns a non null value on error. - *****************************************************************************/ -static int Manage( vout_thread_t *p_vout ) -{ - int buf; - - /* very Linux specific - see tlib.c in Glide for other versions */ - while( kbhit() ) - { - buf = getch(); - - switch( (char)buf ) - { - case 'q': - vlc_object_kill( p_vout->p_libvlc ); - break; - - default: - break; - } - } - - return 0; -} - -/***************************************************************************** - * Display: displays previously rendered output - *****************************************************************************/ -static void Display( vout_thread_t *p_vout, picture_t *p_pic ) - -{ - grLfbUnlock( GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER ); - - grBufferSwap( 0 ); - - if ( grLfbLock(GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER, - GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE, - &p_vout->p_sys->p_buffer_info) == FXFALSE ) - { - msg_Err( p_vout, "cannot take 3dfx back buffer lock" ); - } -} - -/* following functions are local */ - -/***************************************************************************** - * OpenDisplay: open and initialize 3dfx device - *****************************************************************************/ - -static int OpenDisplay( vout_thread_t *p_vout ) -{ - static char version[80]; - GrHwConfiguration hwconfig; - GrScreenResolution_t resolution = GR_RESOLUTION_800x600; - GrLfbInfo_t p_front_buffer_info; /* front buffer info */ - - grGlideGetVersion( version ); - grGlideInit(); - - if( !grSstQueryHardware(&hwconfig) ) - { - msg_Err( p_vout, "cannot get 3dfx hardware config" ); - return( 1 ); - } - - grSstSelect( 0 ); - if( !grSstWinOpen( 0, resolution, GR_REFRESH_60Hz, - GR_COLORFORMAT_ABGR, GR_ORIGIN_UPPER_LEFT, 2, 1 ) ) - { - msg_Err( p_vout, "cannot open 3dfx screen" ); - return( 1 ); - } - - /* disable dithering */ - /*grDitherMode( GR_DITHER_DISABLE );*/ - - /* clear both buffers */ - grRenderBuffer( GR_BUFFER_BACKBUFFER ); - grBufferClear( 0, 0, 0 ); - grRenderBuffer( GR_BUFFER_FRONTBUFFER ); - grBufferClear( 0, 0, 0 ); - grRenderBuffer( GR_BUFFER_BACKBUFFER ); - - p_vout->p_sys->p_buffer_info.size = sizeof( GrLfbInfo_t ); - p_front_buffer_info.size = sizeof( GrLfbInfo_t ); - - /* lock the buffers to find their adresses */ - if ( grLfbLock(GR_LFB_WRITE_ONLY, GR_BUFFER_FRONTBUFFER, - GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE, - &p_front_buffer_info) == FXFALSE ) - { - msg_Err( p_vout, "cannot take 3dfx front buffer lock" ); - grGlideShutdown(); - return( 1 ); - } - grLfbUnlock( GR_LFB_WRITE_ONLY, GR_BUFFER_FRONTBUFFER ); - - if ( grLfbLock(GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER, - GR_LFBWRITEMODE_565, GR_ORIGIN_UPPER_LEFT, FXFALSE, - &p_vout->p_sys->p_buffer_info) == FXFALSE ) - { - msg_Err( p_vout, "cannot take 3dfx back buffer lock" ); - grGlideShutdown(); - return( 1 ); - } - grLfbUnlock( GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER ); - - grBufferClear( 0, 0, 0 ); - - p_vout->p_sys->pp_buffer[0] = p_vout->p_sys->p_buffer_info.lfbPtr; - p_vout->p_sys->pp_buffer[1] = p_front_buffer_info.lfbPtr; - p_vout->p_sys->i_index = 0; - - return( 0 ); -} - -/***************************************************************************** - * CloseDisplay: close and reset 3dfx device - ***************************************************************************** - * Returns all resources allocated by OpenDisplay and restore the original - * state of the device. - *****************************************************************************/ -static void CloseDisplay( vout_thread_t *p_vout ) -{ - /* unlock the hidden buffer */ - grLfbUnlock( GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER ); - - /* shutdown Glide */ - grGlideShutdown(); -} - diff --git a/po/POTFILES.in b/po/POTFILES.in index 0bd0f9bee6..3068a91cde 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1228,7 +1228,6 @@ modules/video_output/caca.c modules/video_output/directfb.c modules/video_output/fb.c modules/video_output/ggi.c -modules/video_output/glide.c modules/video_output/hd1000v.cpp modules/video_output/image.c modules/video_output/mga.c