Commit 07a8286a authored by Sam Hocevar's avatar Sam Hocevar

  * ./include/common.h: BeOS compile fixes.
  * ./plugins/beos/vout_beos.cpp: fixed BeOS video output.
parent 813e5145
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.78 2002/02/24 22:06:50 sam Exp $
* $Id: common.h,v 1.79 2002/02/27 03:47:56 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -277,12 +277,12 @@ struct intf_subscription_s;
/* PAD: PAD(n, d) = CEIL(n ,d) * d */
#define PAD(n, d) ( ((n) % (d)) ? ((((n) / (d)) + 1) * (d)) : (n) )
/* MAX and MIN: self explanatory */
#ifndef MAX
# define MAX(a, b) ( ((a) > (b)) ? (a) : (b) )
/* __MAX and __MIN: self explanatory */
#ifndef __MAX
# define __MAX(a, b) ( ((a) > (b)) ? (a) : (b) )
#endif
#ifndef MIN
# define MIN(a, b) ( ((a) < (b)) ? (a) : (b) )
#ifndef __MIN
# define __MIN(a, b) ( ((a) < (b)) ? (a) : (b) )
#endif
/* MSB (big endian)/LSB (little endian) conversions - network order is always
......
......@@ -3,7 +3,7 @@
* This header provides a portable threads implementation.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: threads.h,v 1.35 2002/02/25 23:59:07 sam Exp $
* $Id: threads.h,v 1.36 2002/02/27 03:47:56 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
......@@ -44,8 +44,6 @@ int pthread_mutexattr_setkind_np( pthread_mutexattr_t *attr, int kind );
# include <cthreads.h>
#elif defined( HAVE_KERNEL_SCHEDULER_H ) /* BeOS */
# undef MAX
# undef MIN
# include <kernel/OS.h>
# include <kernel/scheduler.h>
# include <byteorder.h>
......
......@@ -2,7 +2,7 @@
* vout_beos.cpp: beos video output display method
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: vout_beos.cpp,v 1.42 2002/02/24 20:51:09 gbazin Exp $
* $Id: vout_beos.cpp,v 1.43 2002/02/27 03:47:56 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -435,14 +435,6 @@ int vout_Create( vout_thread_t *p_vout )
* VOUT_ASPECT_FACTOR / p_vout->render.i_aspect;
}
/* Open and initialize device */
if( BeosOpenDisplay( p_vout ) )
{
intf_ErrMsg("vout error: can't open display");
free( p_vout->p_sys );
return( 1 );
}
return( 0 );
}
......@@ -451,18 +443,22 @@ int vout_Create( vout_thread_t *p_vout )
*****************************************************************************/
int vout_Init( vout_thread_t *p_vout )
{
VideoWindow *p_win = p_vout->p_sys->p_window;
int i_index;
picture_t *p_pic;
I_OUTPUTPICTURES = 0;
/* Open and initialize device */
if( BeosOpenDisplay( p_vout ) )
{
intf_ErrMsg("vout error: can't open display");
return 0;
}
p_vout->output.i_width = p_vout->p_sys->i_width;
p_vout->output.i_height = p_vout->p_sys->i_height;
p_vout->output.i_aspect = p_vout->p_sys->i_width
* VOUT_ASPECT_FACTOR
/ p_vout->p_sys->i_height;
* VOUT_ASPECT_FACTOR / p_vout->p_sys->i_height;
p_vout->output.i_chroma = FOURCC_RV32;
p_pic = NULL;
......@@ -510,7 +506,7 @@ int vout_Init( vout_thread_t *p_vout )
*****************************************************************************/
void vout_End( vout_thread_t *p_vout )
{
/* place code here to end the video */
BeosCloseDisplay( p_vout );
}
/*****************************************************************************
......@@ -520,7 +516,6 @@ void vout_End( vout_thread_t *p_vout )
*****************************************************************************/
void vout_Destroy( vout_thread_t *p_vout )
{
BeosCloseDisplay( p_vout );
free( p_vout->p_sys );
}
......@@ -532,7 +527,7 @@ void vout_Destroy( vout_thread_t *p_vout )
*****************************************************************************/
int vout_Manage( vout_thread_t *p_vout )
{
VideoWindow * p_win = p_vout->p_sys->p_window;
// VideoWindow * p_win = p_vout->p_sys->p_window;
// p_win->resizeIfRequired(p_vout->p_sys->pp_buffer[p_vout->p_sys->i_index].i_pic_width,
// p_vout->p_sys->pp_buffer[p_vout->p_sys->i_index].i_pic_height);
......@@ -575,10 +570,9 @@ void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
*****************************************************************************/
static int BeosOpenDisplay( vout_thread_t *p_vout )
{
p_vout->p_sys->p_window = new VideoWindow(
config_GetIntVariable( VOUT_WIDTH_VAR ) - 1,
config_GetIntVariable( VOUT_HEIGHT_VAR ) - 1,
p_vout );
p_vout->p_sys->p_window = new VideoWindow( p_vout->p_sys->i_width - 1,
p_vout->p_sys->i_height - 1,
p_vout );
if( p_vout->p_sys->p_window == NULL )
{
......
......@@ -2,7 +2,7 @@
* dummy.c : dummy plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: dummy.c,v 1.15 2002/02/24 20:51:09 gbazin Exp $
* $Id: dummy.c,v 1.16 2002/02/27 03:47:56 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -48,9 +48,9 @@ MODULE_INIT_START
SET_DESCRIPTION( "dummy functions module" )
/* Capability score set to 0 because we don't want to be spawned
* unless explicitly requested to */
ADD_CAPABILITY( AOUT, 0 )
ADD_CAPABILITY( VOUT, 0 )
ADD_CAPABILITY( INTF, 0 )
ADD_CAPABILITY( AOUT, 1 )
ADD_CAPABILITY( VOUT, 1 )
ADD_CAPABILITY( INTF, 1 )
/* This one is ok. */
ADD_CAPABILITY( INPUT, 100 )
ADD_SHORTCUT( "dummy" )
......
......@@ -9,7 +9,7 @@
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_dvd.c,v 1.121 2002/02/24 20:51:09 gbazin Exp $
* $Id: input_dvd.c,v 1.122 2002/02/27 03:47:56 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -1072,12 +1072,12 @@ static void DVDSeek( input_thread_t * p_input, off_t i_off )
* can be very wide out of such zones */
if( title.p_cell_play[p_dvd->i_prg_cell].i_category & 0xf000 )
{
p_dvd->i_sector = MAX(
p_dvd->i_sector = __MAX(
cell.i_start_sector,
title.p_cell_play[p_dvd->i_prg_cell].i_start_sector );
}
p_dvd->i_end_sector = MIN(
p_dvd->i_end_sector = __MIN(
cell.i_end_sector,
title.p_cell_play[p_dvd->i_prg_cell].i_end_sector );
#undef cell
......@@ -1193,10 +1193,10 @@ static int DVDFindSector( thread_dvd_data_t * p_dvd )
/* Find start and end sectors of new cell */
#if 1
p_dvd->i_sector = MAX(
p_dvd->i_sector = __MAX(
p_dvd->p_ifo->vts.cell_inf.p_cell_map[p_dvd->i_cell].i_start_sector,
title.p_cell_play[p_dvd->i_prg_cell].i_start_sector );
p_dvd->i_end_sector = MIN(
p_dvd->i_end_sector = __MIN(
p_dvd->p_ifo->vts.cell_inf.p_cell_map[p_dvd->i_cell].i_end_sector,
title.p_cell_play[p_dvd->i_prg_cell].i_end_sector );
#else
......
......@@ -2,7 +2,7 @@
* wall.c : Wall video plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: wall.c,v 1.13 2002/02/24 20:51:09 gbazin Exp $
* $Id: wall.c,v 1.14 2002/02/27 03:47:56 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -197,8 +197,8 @@ static int vout_Create( vout_thread_t *p_vout )
psz_method = NULL;
}
p_vout->p_sys->i_col = MAX( 1, MIN( 15, p_vout->p_sys->i_col ) );
p_vout->p_sys->i_row = MAX( 1, MIN( 15, p_vout->p_sys->i_row ) );
p_vout->p_sys->i_col = __MAX( 1, __MIN( 15, p_vout->p_sys->i_col ) );
p_vout->p_sys->i_row = __MAX( 1, __MIN( 15, p_vout->p_sys->i_row ) );
intf_WarnMsg( 3, "filter info: opening a %i x %i wall",
p_vout->p_sys->i_col, p_vout->p_sys->i_row );
......
......@@ -4,7 +4,7 @@
* and spawn threads.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: main.c,v 1.156 2002/02/26 18:25:40 gbazin Exp $
* $Id: main.c,v 1.157 2002/02/27 03:47:56 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -278,7 +278,6 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
p_main->i_warning_level = 0;
#if defined( ENABLE_NLS ) && defined ( HAVE_GETTEXT )
/*
* Support for getext
......@@ -377,7 +376,6 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
intf_WarnMsg( 2, "module: module bank initialized, found %i modules",
p_module_bank->i_count );
/* Check for help on plugins */
if( (p_tmp = config_GetPszVariable( "pluginhelp" )) )
{
......@@ -712,12 +710,12 @@ static int GetConfigurationFromCmdLine( int *pi_argc, char *ppsz_argv[],
{
/* A long option has been recognized */
module_config_t *p_config;
module_config_t *p_conf;
/* Store the configuration option */
p_config = config_FindConfig( p_longopts[i_index].name );
p_conf = config_FindConfig( p_longopts[i_index].name );
switch( p_config->i_type )
switch( p_conf->i_type )
{
case MODULE_CONFIG_ITEM_STRING:
case MODULE_CONFIG_ITEM_FILE:
......
......@@ -2,7 +2,7 @@
* vout_pictures.c : picture management functions
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: vout_pictures.c,v 1.16 2002/02/19 00:50:20 sam Exp $
* $Id: vout_pictures.c,v 1.17 2002/02/27 03:47:56 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -376,8 +376,8 @@ void vout_PlacePicture( vout_thread_t *p_vout, int i_width, int i_height,
}
else
{
*pi_width = MIN( i_width, p_vout->render.i_width );
*pi_height = MIN( i_height, p_vout->render.i_height );
*pi_width = __MIN( i_width, p_vout->render.i_width );
*pi_height = __MIN( i_height, p_vout->render.i_height );
}
if( VOUT_ASPECT_FACTOR * *pi_width / *pi_height < p_vout->render.i_aspect )
......
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