* ggi.c : GGI plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: ggi.c,v 1.2 2002/11/10 18:04:22 sam Exp $
+ * $Id$
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* 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
* (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
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 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 * );
-static void SetPalette ( vout_thread_t *, u16 *, u16 *, u16 * );
+static void SetPalette ( vout_thread_t *, uint16_t *, uint16_t *, uint16_t * );
/*****************************************************************************
* Module descriptor
*****************************************************************************/
#define DISPLAY_TEXT N_("X11 display name")
-#define DISPLAY_LONGTEXT N_("Specify the X11 hardware display you want to use."\
- "\nBy default vlc will use the value of the DISPLAY"\
- " environment variable.")
+#define DISPLAY_LONGTEXT N_( \
+ "Specify the X11 hardware display you want to use.\n" \
+ "By default, VLC will use the value of the DISPLAY " \
+ "environment variable.")
-vlc_module_begin();
- add_category_hint( N_("Miscellaneous"), NULL );
- add_string( "ggi-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT );
+vlc_module_begin();
+ add_string( "ggi-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, VLC_TRUE );
set_description( "General Graphics Interface video output" );
set_capability( "video output", 30 );
set_callbacks( Create, Destroy );
*****************************************************************************/
struct vout_sys_t
{
- /* GGI system informations */
+ /* GGI system information */
ggi_visual_t p_display; /* display device */
ggi_mode mode; /* mode descriptor */
p_pic->p->p_pixels = p_b[ 0 ]->write;
p_pic->p->i_pixel_pitch = p_b[ 0 ]->buffer.plb.pixelformat->size / 8;
p_pic->p->i_lines = p_vout->p_sys->mode.visible.y;
+ p_pic->p->i_visible_lines = p_vout->p_sys->mode.visible.y;
p_pic->p->i_pitch = p_b[ 0 ]->buffer.plb.stride;
* 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;
-
+{
+ vout_thread_t *p_vout = (vout_thread_t *)p_this;
+
CloseDisplay( p_vout );
free( p_vout->p_sys );
* Manage: handle GGI events
*****************************************************************************
* This function should be called regularly by video output thread. It returns
- * a non null value if an error occured.
+ * a non null value if an error occurred.
*****************************************************************************/
static int Manage( vout_thread_t *p_vout )
{
mask = emKeyboard | emPtrButtonPress | emPtrButtonRelease;
ggiEventPoll( p_vout->p_sys->p_display, mask, &tv );
-
+
while( ggiEventsQueued( p_vout->p_sys->p_display, mask) )
{
ggiEventRead( p_vout->p_sys->p_display, &event, mask);
/*****************************************************************************
* SetPalette: sets an 8 bpp palette
*****************************************************************************/
-static void SetPalette( vout_thread_t *p_vout, u16 *red, u16 *green, u16 *blue )
+static void SetPalette( vout_thread_t *p_vout,
+ uint16_t *red, uint16_t *green, uint16_t *blue )
{
ggi_color colors[256];
int i;
-
+
/* Fill colors with color information */
for( i = 0; i < 256; i++ )
{