Commit c3b1800a authored by Sam Hocevar's avatar Sam Hocevar

  * configure.in and Makefile.in patches for better SDL support and
    support for $(bindir) $(datadir) and $(libdir) stuff, courtesy
    of Arkadiusz Miskiewicz <misiek@pld.ORG.PL>
  * Ported ggi.so to the new modules API. As for the other modules, only
    the "q" key works. Moreover, VLC doesn't exit cleanly if you close the
    GGI window.
  * Deactivated non-working widgets in the Gnome interface.
  * Added CONTRIBUTORS file.

  Hint of the day: don't expect to code quite long in your bed when sleepy.
parent e630779b
Ethan C. Baldridge <BaldridgeE@cadmus.com>
* Directory browsing code in modules.c
Arkadiusz Miskiewicz <misiek@pld.ORG.PL>
* Makefile and configure patches.
......@@ -18,7 +18,12 @@ SYS=@SYS@
PLUGINS=@PLUGINS@
INSTALL=@INSTALL@
ARCH=@ARCH@
prefix=@prefix@
bindir=@bindir@
datadir=@datadir@
libdir=@libdir@
CC=@CC@
SHELL=@SHELL@
......@@ -304,7 +309,6 @@ PLUGIN_FB = plugins/fb/fb.o \
plugins/fb/vout_fb.o
PLUGIN_GGI = plugins/ggi/ggi.o \
plugins/ggi/intf_ggi.o \
plugins/ggi/vout_ggi.o
PLUGIN_GLIDE = plugins/glide/glide.o \
......@@ -444,15 +448,15 @@ distclean: clean
rm -rf .dep
install:
mkdir -p $(prefix)/bin
$(INSTALL) vlc $(prefix)/bin
mkdir -p $(DESTDIR)$(bindir)
$(INSTALL) vlc $(DESTDIR)$(bindir)
# ugly
for alias in "" @ALIASES@ ; do if test $$alias ; then rm -f $(prefix)/bin/$$alias && ln -s vlc $(prefix)/bin/$$alias ; fi ; done
mkdir -p $(prefix)/lib/videolan/vlc
$(INSTALL) -m 644 $(PLUGINS:%=lib/%.so) $(prefix)/lib/videolan/vlc
mkdir -p $(prefix)/share/videolan
$(INSTALL) -m 644 share/*.psf $(prefix)/share/videolan
$(INSTALL) -m 644 share/*.png $(prefix)/share/videolan
for alias in "" @ALIASES@ ; do if test $$alias ; then rm -f $(DESTDIR)$(bindir)/$$alias && ln -s vlc $(DESTDIR)$(bindir)/$$alias ; fi ; done
mkdir -p $(DESTDIR)$(libdir)/videolan/vlc
$(INSTALL) -m 644 $(PLUGINS:%=lib/%.so) $(DESTDIR)$(libdir)/videolan/vlc
mkdir -p $(DESTDIR)$(datadir)/videolan
$(INSTALL) -m 644 share/*.psf $(DESTDIR)$(datadir)/videolan
$(INSTALL) -m 644 share/*.png $(DESTDIR)$(datadir)/videolan
show:
@echo CC: $(CC)
......
......@@ -171,14 +171,14 @@ AC_ARG_WITH(sdl,
[ PLUGINS=${PLUGINS}"sdl ";
if test "x$withval" != "xyes";
then
LIB_SDL="-l"$withval
LIB_SDL="L /usr/X11R6/lib -l"$withval
else
LIB_SDL="-lSDL"
LIB_SDL="-L/usr/X11R6/lib -lSDL"
fi ])
if test "x$withval" == "x";
then
PLUGINS=${PLUGINS}"sdl "
LIB_SDL="-lSDL"
LIB_SDL="-L/usr/X11R6/lib -lSDL"
fi
AC_ARG_WITH(glide,
[ --with-glide[=name] Glide (3dfx) support (default disabled)],
......
/*****************************************************************************
* ggi.c : GGI plugin for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
*
* Authors:
* Copyright (C) 2000, 2001 VideoLAN
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* 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
......@@ -20,6 +20,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#define MODULE_NAME ggi
/*****************************************************************************
* Preamble
*****************************************************************************/
......@@ -31,88 +33,80 @@
#include "common.h" /* boolean_t, byte_t */
#include "threads.h"
#include "mtime.h"
#include "tests.h"
#include "plugins.h"
#include "interface.h"
#include "audio_output.h"
#include "video.h"
#include "video_output.h"
#include "modules.h"
#include "modules_inner.h"
/*****************************************************************************
* Exported prototypes
* Building configuration tree
*****************************************************************************/
static void vout_GetPlugin( p_vout_thread_t p_vout );
static void intf_GetPlugin( p_intf_thread_t p_intf );
/* Video output */
int vout_GGICreate ( vout_thread_t *p_vout, char *psz_display,
int i_root_window, void *p_data );
int vout_GGIInit ( p_vout_thread_t p_vout );
void vout_GGIEnd ( p_vout_thread_t p_vout );
void vout_GGIDestroy ( p_vout_thread_t p_vout );
int vout_GGIManage ( p_vout_thread_t p_vout );
void vout_GGIDisplay ( p_vout_thread_t p_vout );
void vout_GGISetPalette ( p_vout_thread_t p_vout,
u16 *red, u16 *green, u16 *blue, u16 *transp );
/* Interface */
int intf_GGICreate ( p_intf_thread_t p_intf );
void intf_GGIDestroy ( p_intf_thread_t p_intf );
void intf_GGIManage ( p_intf_thread_t p_intf );
MODULE_CONFIG_START
ADD_WINDOW( "Configuration for GGI module" )
ADD_COMMENT( "For now, the GGI module cannot be configured" )
MODULE_CONFIG_END
/*****************************************************************************
* Capabilities defined in the other files.
******************************************************************************/
extern void vout_getfunctions( function_list_t * p_function_list );
/*****************************************************************************
* GetConfig: get the plugin structure and configuration
* InitModule: get the module structure and configuration.
*****************************************************************************
* We have to fill psz_name, psz_longname and psz_version. These variables
* will be strdup()ed later by the main application because the module can
* be unloaded later to save memory, and we want to be able to access this
* data even after the module has been unloaded.
*****************************************************************************/
plugin_info_t * GetConfig( void )
int InitModule( module_t * p_module )
{
plugin_info_t * p_info = (plugin_info_t *) malloc( sizeof(plugin_info_t) );
p_info->psz_name = "GGI";
p_info->psz_version = VERSION;
p_info->psz_author = "the VideoLAN team <vlc@videolan.org>";
p_module->psz_name = MODULE_STRING;
p_module->psz_longname = "General Graphics Interface module";
p_module->psz_version = VERSION;
p_info->aout_GetPlugin = NULL;
p_info->vout_GetPlugin = vout_GetPlugin;
p_info->intf_GetPlugin = intf_GetPlugin;
p_info->yuv_GetPlugin = NULL;
p_module->i_capabilities = MODULE_CAPABILITY_NULL
| MODULE_CAPABILITY_VOUT;
/* if the GGI libraries are there, assume we can enter the
* initialization part at least, even if we fail afterwards */
p_info->i_score = 0x100;
return( 0 );
}
if( TestProgram( "ggivlc" ) )
/*****************************************************************************
* ActivateModule: set the module to an usable state.
*****************************************************************************
* This function fills the capability functions and the configuration
* structure. Once ActivateModule() has been called, the i_usage can
* be set to 0 and calls to NeedModule() be made to increment it. To unload
* the module, one has to wait until i_usage == 0 and call DeactivateModule().
*****************************************************************************/
int ActivateModule( module_t * p_module )
{
p_module->p_functions = malloc( sizeof( module_functions_t ) );
if( p_module->p_functions == NULL )
{
p_info->i_score += 0x180;
return( -1 );
}
/* If this plugin was requested, score it higher */
if( TestMethod( VOUT_METHOD_VAR, "ggi" ) )
{
p_info->i_score += 0x200;
}
vout_getfunctions( &p_module->p_functions->vout );
p_module->p_config = p_config;
return( p_info );
return( 0 );
}
/*****************************************************************************
* Following functions are only called through the p_info structure
* DeactivateModule: make sure the module can be unloaded.
*****************************************************************************
* This function must only be called when i_usage == 0. If it successfully
* returns, i_usage can be set to -1 and the module unloaded. Be careful to
* lock usage_lock during the whole process.
*****************************************************************************/
static void vout_GetPlugin( p_vout_thread_t p_vout )
int DeactivateModule( module_t * p_module )
{
p_vout->p_sys_create = vout_GGICreate;
p_vout->p_sys_init = vout_GGIInit;
p_vout->p_sys_end = vout_GGIEnd;
p_vout->p_sys_destroy = vout_GGIDestroy;
p_vout->p_sys_manage = vout_GGIManage;
p_vout->p_sys_display = vout_GGIDisplay;
}
free( p_module->p_functions );
static void intf_GetPlugin( p_intf_thread_t p_intf )
{
p_intf->p_sys_create = intf_GGICreate;
p_intf->p_sys_destroy = intf_GGIDestroy;
p_intf->p_sys_manage = intf_GGIManage;
return( 0 );
}
/*****************************************************************************
* intf_ggi.c: GGI interface plugin
* Since GII doesnt seem to work well for keyboard events, the GGI display is
* used, and therefore the GII interface can't be spawned without a video output
* thread. It also needs a kludge to get the visual from the video output GGI
* driver.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_ggi.c,v 1.7 2001/01/05 18:46:43 massiot Exp $
*
* Authors:
*
* 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, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <ggi/ggi.h>
#include "config.h"
#include "common.h"
#include "threads.h"
#include "mtime.h"
#include "plugins.h"
#include "stream_control.h"
#include "input_ext-intf.h"
#include "video.h"
#include "video_output.h"
#include "interface.h"
#include "intf_msg.h"
#include "main.h"
/*****************************************************************************
* intf_sys_t: description and status of GGI interface
*****************************************************************************/
typedef struct intf_sys_s
{
/* GGI system information */
ggi_visual_t p_display; /* display */
} intf_sys_t;
/*****************************************************************************
* External prototypes
*****************************************************************************/
/* vout_SysGetVisual: get back visual from video output thread - in video_ggi.c
* This function is used to get back the display pointer once the video output
* thread has been spawned. */
ggi_visual_t vout_SysGetVisual( vout_thread_t *p_vout );
/*****************************************************************************
* intf_GGICreate: initialize and create GII interface
*****************************************************************************/
int intf_GGICreate( intf_thread_t *p_intf )
{
/* Check that b_video is set */
if( !p_main->b_video )
{
intf_ErrMsg("error: GGI interface require a video output thread");
return( 1 );
}
/* Allocate instance and initialize some members */
p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
if( p_intf->p_sys == NULL )
{
intf_ErrMsg("error: %s", strerror(ENOMEM) );
return( 1 );
}
/* Spawn video output thread */
p_intf->p_vout = vout_CreateThread( main_GetPszVariable( VOUT_DISPLAY_VAR,
NULL), 0,
main_GetIntVariable( VOUT_WIDTH_VAR,
VOUT_WIDTH_DEFAULT ),
main_GetIntVariable( VOUT_HEIGHT_VAR,
VOUT_HEIGHT_DEFAULT ),
NULL, 0,
(void *)&p_intf->p_sys->p_display );
if( p_intf->p_vout == NULL ) /* error */
{
intf_ErrMsg("error: can't create video output thread" );
free( p_intf->p_sys );
return( 1 );
}
/* Assign basic keys */
intf_AssignNormalKeys( p_intf );
return( 0 );
}
/*****************************************************************************
* intf_GGIDestroy: destroy interface
*****************************************************************************/
void intf_GGIDestroy( intf_thread_t *p_intf )
{
/* Close input thread, if any (blocking) */
if( p_intf->p_input )
{
input_DestroyThread( p_intf->p_input, NULL );
}
/* Close video output thread, if any (blocking) */
if( p_intf->p_vout )
{
vout_DestroyThread( p_intf->p_vout, NULL );
}
/* Destroy structure */
free( p_intf->p_sys );
}
/*****************************************************************************
* intf_GGIManage: event loop
*****************************************************************************/
void intf_GGIManage( intf_thread_t *p_intf )
{
int i_key; /* unicode key */
/* For all events in queue */
while( ggiKbhit( p_intf->p_sys->p_display ) )
{
i_key = ggiGetc( p_intf->p_sys->p_display );
if( intf_ProcessKey( p_intf, i_key ) )
{
intf_DbgMsg("unhandled key '%c' (%i)", (char) i_key, i_key );
}
}
}
This diff is collapsed.
......@@ -129,11 +129,13 @@ create_intf_window (void)
gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_playlist",
menubar_view_menu_uiinfo[0].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_set_sensitive (menubar_view_menu_uiinfo[0].widget, FALSE);
gtk_widget_ref (menubar_view_menu_uiinfo[1].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_modules",
menubar_view_menu_uiinfo[1].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_set_sensitive (menubar_view_menu_uiinfo[1].widget, FALSE);
gtk_widget_ref (menubar_uiinfo[2].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_settings",
......@@ -144,6 +146,7 @@ create_intf_window (void)
gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_preferences",
menubar_settings_menu_uiinfo[0].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_set_sensitive (menubar_settings_menu_uiinfo[0].widget, FALSE);
gtk_widget_ref (menubar_uiinfo[3].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_help",
......@@ -193,6 +196,7 @@ create_intf_window (void)
gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_back", toolbar_back,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (toolbar_back);
gtk_widget_set_sensitive (toolbar_back, FALSE);
tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_STOP);
toolbar_stop = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
......@@ -205,6 +209,7 @@ create_intf_window (void)
gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_stop", toolbar_stop,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (toolbar_stop);
gtk_widget_set_sensitive (toolbar_stop, FALSE);
tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_FORWARD);
toolbar_play = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
......@@ -267,6 +272,7 @@ create_intf_window (void)
gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_playlist", toolbar_playlist,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (toolbar_playlist);
gtk_widget_set_sensitive (toolbar_playlist, FALSE);
tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_FIRST);
toolbar_prev = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
......@@ -317,7 +323,7 @@ create_intf_window (void)
gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5);
gtk_misc_set_padding (GTK_MISC (label6), 5, 0);
hscale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (43.75, 0, 100, 1, 6.25, 0)));
hscale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 100, 1, 6.25, 0)));
gtk_widget_ref (hscale);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "hscale", hscale,
(GtkDestroyNotify) gtk_widget_unref);
......
......@@ -124,6 +124,7 @@
<widget>
<class>GtkPixmapMenuItem</class>
<name>menubar_playlist</name>
<sensitive>False</sensitive>
<tooltip>Open the playlist window</tooltip>
<signal>
<name>activate</name>
......@@ -138,6 +139,7 @@
<widget>
<class>GtkPixmapMenuItem</class>
<name>menubar_modules</name>
<sensitive>False</sensitive>
<tooltip>Open the plugin manager</tooltip>
<signal>
<name>activate</name>
......@@ -163,6 +165,7 @@
<widget>
<class>GtkPixmapMenuItem</class>
<name>menubar_preferences</name>
<sensitive>False</sensitive>
<signal>
<name>activate</name>
<handler>on_menubar_preferences_activate</handler>
......@@ -241,6 +244,7 @@
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>toolbar_back</name>
<sensitive>False</sensitive>
<tooltip>Go Backwards</tooltip>
<signal>
<name>clicked</name>
......@@ -258,6 +262,7 @@
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>toolbar_stop</name>
<sensitive>False</sensitive>
<tooltip>Stop Stream</tooltip>
<signal>
<name>clicked</name>
......@@ -328,6 +333,7 @@
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>toolbar_playlist</name>
<sensitive>False</sensitive>
<tooltip>Open Playlist</tooltip>
<signal>
<name>clicked</name>
......@@ -428,7 +434,7 @@
<value_pos>GTK_POS_BOTTOM</value_pos>
<digits>1</digits>
<policy>GTK_UPDATE_DELAYED</policy>
<value>43.75</value>
<value>0</value>
<lower>0</lower>
<upper>100</upper>
<step>1</step>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment