/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <stdlib.h> /* malloc(), free() */
-#include <string.h>
#include <errno.h> /* ENOMEM */
#include <ggi/ggi.h>
-#include <vlc/vlc.h>
-#include <vlc/intf.h>
-#include <vlc/vout.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
+#include <vlc_interface.h>
+#include <vlc_vout.h>
/*****************************************************************************
* Local prototypes
/*****************************************************************************
* Module descriptor
*****************************************************************************/
-#define DISPLAY_TEXT N_("X11 display name")
+#define DISPLAY_TEXT N_("X11 display")
#define DISPLAY_LONGTEXT N_( \
- "Specify the X11 hardware display you want to use.\n" \
+ "X11 hardware display to use.\n" \
"By default, VLC will use the value of the DISPLAY " \
"environment variable.")
vlc_module_begin();
- add_string( "ggi-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, VLC_TRUE );
+ add_string( "ggi-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, true );
set_description( "General Graphics Interface video output" );
set_capability( "video output", 30 );
set_callbacks( Create, Destroy );
ggi_directbuffer * pp_buffer[2]; /* buffers */
int i_index;
- vlc_bool_t b_must_acquire; /* must be acquired before writing */
+ bool b_must_acquire; /* must be acquired before writing */
};
/*****************************************************************************
/* Allocate structure */
p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
- {
- msg_Err( p_vout, "out of memory" );
return( 1 );
- }
/* Open and initialize device */
if( OpenDisplay( p_vout ) )
case 'q':
case 'Q':
case GIIUC_Escape:
- p_vout->p_vlc->b_die = 1;
+ vlc_object_kill( p_vout->p_libvlc );
break;
default:
switch( event.pbutton.button )
{
case GII_PBUTTON_LEFT:
- val.b_bool = VLC_TRUE;
+ val.b_bool = true;
var_Set( p_vout, "mouse-clicked", val );
break;
psz_display = config_GetPsz( p_vout, "ggi_display" );
p_vout->p_sys->p_display = ggiOpen( psz_display, NULL );
- if( psz_display ) free( psz_display );
+ free( psz_display );
if( p_vout->p_sys->p_display == NULL )
{
/* Set palette */
if( ggiSetPalette( p_vout->p_sys->p_display, 0, 256, colors ) < 0 )
{
- msg_Err( p_vout, "failed setting palette" );
+ msg_Err( p_vout, "failed to set palette" );
}
}