mirror of
https://code.videolan.org/videolan/vlc
synced 2024-08-27 04:21:53 +02:00
Portage du client sous BeOS. Il manque encore l'audio mais �a marche.
En cadeau bonux un nouvel input_file qui permet de lire les vob. Il faur rajouter la ligne suivante dans vlc.init: spawn-input method=10 filename=braindead
This commit is contained in:
parent
9a72669315
commit
551607d315
@ -29,7 +29,7 @@ default:
|
||||
$(dependancies): .dep/%.d: %.c
|
||||
@test -d .dep/$(dir $*) || mkdir -p .dep/$(dir $*)
|
||||
@echo "generating dependancies for $*.c"
|
||||
@$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $< \
|
||||
@$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) $< \
|
||||
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
|
||||
.dep\/$(subst /,\/,$*).d : /g'\'' > $@; \
|
||||
[ -s $@ ] || rm -f $@'
|
||||
|
65
Makefile.in
65
Makefile.in
@ -1,4 +1,5 @@
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
################################################################################
|
||||
# vlc (VideoLAN Client) main makefile
|
||||
# (c)1998 VideoLAN
|
||||
@ -19,7 +20,7 @@ AOUT += dsp
|
||||
AOUT += dummy
|
||||
|
||||
# Video output settings
|
||||
VOUT += x11
|
||||
#VOUT += x11
|
||||
#VOUT += fb
|
||||
#VOUT += ggi
|
||||
#VOUT += glide
|
||||
@ -68,8 +69,8 @@ DEBUG=0
|
||||
|
||||
#----------------- do not change anything below this line ----------------------
|
||||
|
||||
prefix=@prefix@
|
||||
INSTALL=@INSTALL@
|
||||
prefix=/usr/local
|
||||
INSTALL=/bin/install -c
|
||||
|
||||
################################################################################
|
||||
# Configuration pre-processing
|
||||
@ -127,11 +128,11 @@ ifeq ($(SYS),LINUX)
|
||||
LIB += -lpthread -ldl
|
||||
endif
|
||||
|
||||
ifeq ($SYS),BEOS)
|
||||
LIB += -llibroot -llibgame -llibbe
|
||||
endif
|
||||
|
||||
ifeq ($(SYS),BEOS)
|
||||
LIB += -lbe -lroot -lgame
|
||||
else
|
||||
LIB += -lm
|
||||
endif
|
||||
|
||||
#
|
||||
# C compiler flags: compilation
|
||||
@ -141,6 +142,9 @@ CCFLAGS += -Wall
|
||||
CCFLAGS += -D_REENTRANT
|
||||
CCFLAGS += -D_GNU_SOURCE
|
||||
|
||||
# flags needed for clean beos compilation
|
||||
CCFLAGS += -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual
|
||||
|
||||
# Optimizations : don't compile debug versions with them
|
||||
CCFLAGS += -O6
|
||||
CCFLAGS += -ffast-math -funroll-loops -fargument-noalias-global
|
||||
@ -192,7 +196,7 @@ LCFLAGS += -Wall
|
||||
# Debugging support
|
||||
ifeq ($(DEBUG),1)
|
||||
CFLAGS += -g
|
||||
#CFLAGS += -pg
|
||||
CFLAGS += -pg
|
||||
endif
|
||||
|
||||
#################################################################################
|
||||
@ -276,6 +280,7 @@ misc_obj = misc/mtime.o \
|
||||
misc/plugins.o \
|
||||
misc/decoder_fifo.o
|
||||
|
||||
|
||||
C_OBJ = $(interface_obj) \
|
||||
$(input_obj) \
|
||||
$(audio_output_obj) \
|
||||
@ -289,6 +294,10 @@ C_OBJ = $(interface_obj) \
|
||||
$(vlan_obj) \
|
||||
$(misc_obj)
|
||||
|
||||
ifeq ($(SYS), BEOS)
|
||||
CPP_OBJ = misc/beos_specific.o
|
||||
endif
|
||||
|
||||
#
|
||||
# Assembler Objects
|
||||
#
|
||||
@ -317,9 +326,10 @@ PLUGIN_OBJ = $(intf_plugin) $(aout_plugin) $(vout_plugin)
|
||||
# Other lists of files
|
||||
#
|
||||
C_OBJ := $(C_OBJ:%.o=src/%.o)
|
||||
CPP_OBJ := $(CPP_OBJ:%.o=src/%.o)
|
||||
ASM_OBJ := $(ASM_OBJ:%.o=src/%.o)
|
||||
sources := $(C_OBJ:%.o=%.c) $(PLUGIN_OBJ:%.so=%.c)
|
||||
dependancies := $(sources:%.c=.dep/%.d)
|
||||
sources_c := $(C_OBJ:%.o=%.c)
|
||||
dependancies := $(sources_c:%.c=.dep/%.d)
|
||||
|
||||
# All symbols must be exported
|
||||
export
|
||||
@ -331,10 +341,10 @@ export
|
||||
#
|
||||
# Virtual targets
|
||||
#
|
||||
all: vlc
|
||||
all: vlc plugins
|
||||
|
||||
clean:
|
||||
rm -f $(C_OBJ) $(ASM_OBJ) $(PLUGIN_OBJ)
|
||||
rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(PLUGIN_OBJ)
|
||||
|
||||
distclean: clean
|
||||
rm -f **/*.o **/*.so **/*~ *.log
|
||||
@ -376,8 +386,15 @@ FORCE:
|
||||
#
|
||||
# Real targets
|
||||
#
|
||||
vlc: $(C_OBJ) $(ASM_OBJ) $(PLUGIN_OBJ)
|
||||
$(CC) $(CCFLAGS) $(LCFLAGS) $(CFLAGS) --export-dynamic -rdynamic -o $@ $(C_OBJ) $(ASM_OBJ)
|
||||
vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
|
||||
ifeq ($(SYS), BEOS)
|
||||
$(CC) $(CCFLAGS) $(LCFLAGS) $(CFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
|
||||
# ln -s ../vlc ./plugins/_APP_
|
||||
else
|
||||
$(CC) $(CCFLAGS) $(LCFLAGS) $(CFLAGS) --export-dynamic -rdynamic -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
|
||||
endif
|
||||
|
||||
plugins: $(PLUGIN_OBJ)
|
||||
|
||||
#
|
||||
# Generic rules (see below)
|
||||
@ -391,19 +408,23 @@ $(C_OBJ): %.o: %.c
|
||||
@echo "compiling $*.o from $*.c"
|
||||
@$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
$(CPP_OBJ): %.o: %.cpp
|
||||
@echo "compiling $*.o from $*.cpp"
|
||||
@$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
$(ASM_OBJ): %.o: Makefile.dep
|
||||
$(ASM_OBJ): %.o: %.S
|
||||
@echo "assembling $*.o from $*.S"
|
||||
@$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
$(PLUGIN_OBJ): %.so: Makefile.dep
|
||||
$(PLUGIN_OBJ): %.so: .dep/%.d
|
||||
#$(PLUGIN_OBJ): %.so: Makefile.dep
|
||||
#$(PLUGIN_OBJ): %.so: .dep/%.d
|
||||
|
||||
# audio plugins
|
||||
plugins/aout/aout_dummy.so plugins/aout/aout_dsp.so: %.so: %.c
|
||||
@echo "compiling $*.so from $*.c"
|
||||
ifeq ($(SYS), BEOS)
|
||||
@$(CC) $(CCFLAGS) $(CFLAGS) -nostart -o $@ $<
|
||||
@$(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
|
||||
else
|
||||
@$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
|
||||
endif
|
||||
@ -421,7 +442,7 @@ plugins/intf/intf_dummy.so plugins/vout/vout_dummy.so \
|
||||
plugins/intf/intf_fb.so plugins/vout/vout_fb.so: %.so: %.c
|
||||
@echo "compiling $*.so from $*.c"
|
||||
ifeq ($(SYS), BEOS)
|
||||
@$(CC) $(CCFLAGS) $(CFLAGS) -nostart -o $@ $<
|
||||
@$(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
|
||||
else
|
||||
@$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
|
||||
endif
|
||||
@ -446,6 +467,14 @@ plugins/intf/intf_ggi.so plugins/vout/vout_ggi.so: %.so: %.c
|
||||
@echo "compiling $*.so from $*.c"
|
||||
@$(CC) $(CCFLAGS) $(CFLAGS) -lggi -shared -o $@ $<
|
||||
|
||||
plugins/intf/intf_beos.so: %.so: %.cpp
|
||||
@echo "compiling $*.so from $*.cpp"
|
||||
@$(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
|
||||
|
||||
plugins/vout/vout_beos.so: %.so: %.cpp
|
||||
@echo "compiling $*.so from $*.cpp"
|
||||
@$(CC) $(LCFLAGS) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
|
||||
|
||||
|
||||
################################################################################
|
||||
# Note on generic rules and dependancies
|
||||
|
39
include/beos_specific.h
Normal file
39
include/beos_specific.h
Normal file
@ -0,0 +1,39 @@
|
||||
/*****************************************************************************
|
||||
* beos_init.h: Initialization for BeOS specific features
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1999, 2000 VideoLAN
|
||||
*
|
||||
* Authors:
|
||||
* Jean-Marc Dressler
|
||||
*
|
||||
* 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-1307, USA.
|
||||
*****************************************************************************/
|
||||
|
||||
/*****************************************************************************
|
||||
* Prototypes
|
||||
*****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void beos_Init( void );
|
||||
void beos_Clean( void );
|
||||
char * beos_GetProgramPath( void );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
80
include/beos_window.h
Normal file
80
include/beos_window.h
Normal file
@ -0,0 +1,80 @@
|
||||
/*****************************************************************************
|
||||
* beos_window.h: beos window class prototype
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1999, 2000 VideoLAN
|
||||
*
|
||||
* Authors:
|
||||
* Jean-Marc Dressler
|
||||
*
|
||||
* 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-1307, USA.
|
||||
*****************************************************************************/
|
||||
|
||||
class VideoWindow : public BDirectWindow
|
||||
{
|
||||
public:
|
||||
// standard constructor and destructor
|
||||
VideoWindow(BRect frame, const char *name, vout_thread_t *p_video_output);
|
||||
~VideoWindow();
|
||||
|
||||
// standard window member
|
||||
virtual bool QuitRequested();
|
||||
virtual void MessageReceived(BMessage *message);
|
||||
|
||||
// this is the hook controling direct screen connection
|
||||
virtual void DirectConnected(direct_buffer_info *info);
|
||||
|
||||
int32 i_bytes_per_pixel;
|
||||
int32 i_screen_depth;
|
||||
vout_thread_t *p_vout;
|
||||
|
||||
uint8 *fBits;
|
||||
int32 fRowBytes;
|
||||
color_space fFormat;
|
||||
clipping_rect fBounds;
|
||||
|
||||
uint32 fNumClipRects;
|
||||
clipping_rect *fClipList;
|
||||
|
||||
bool fDirty;
|
||||
bool fReady;
|
||||
bool fConnected;
|
||||
bool fConnectionDisabled;
|
||||
BLocker *locker;
|
||||
thread_id fDrawThreadID;
|
||||
};
|
||||
|
||||
class InterfaceWindow : public BWindow
|
||||
{
|
||||
public:
|
||||
InterfaceWindow( BRect frame, const char *name, intf_thread_t *p_intf );
|
||||
~InterfaceWindow();
|
||||
|
||||
// standard window member
|
||||
virtual bool QuitRequested();
|
||||
virtual void MessageReceived(BMessage *message);
|
||||
|
||||
intf_thread_t *p_interface;
|
||||
};
|
||||
|
||||
class InterfaceView : public BView
|
||||
{
|
||||
public:
|
||||
InterfaceView();
|
||||
~InterfaceView();
|
||||
|
||||
virtual void MessageReceived(BMessage *message);
|
||||
|
||||
};
|
@ -103,12 +103,14 @@ typedef struct video_parser_s * p_video_parser_t;
|
||||
#define PAD(n, d) ( ((n) % (d)) ? ((((n) / (d)) + 1) * (d)) : (n) )
|
||||
|
||||
/* MAX and MIN: self explanatory */
|
||||
//#ifndef SYS_BEOS
|
||||
#ifndef MAX
|
||||
#define MAX(a, b) ( ((a) > (b)) ? (a) : (b) )
|
||||
#endif
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) ( ((a) < (b)) ? (a) : (b) )
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
/* MSB (big endian)/LSB (little endian) convertions - network order is always
|
||||
* MSB, and should be used for both network communications and files. Note that
|
||||
|
@ -23,6 +23,8 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*****************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(HAVE_PTHREAD_H) /* pthreads (Linux & BSD for example) */
|
||||
#include <pthread.h>
|
||||
|
||||
@ -30,9 +32,10 @@
|
||||
#include <cthreads.h>
|
||||
|
||||
#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H) /* BeOS */
|
||||
#undef MAX
|
||||
#undef MIN
|
||||
#include <kernel/OS.h>
|
||||
#include <kernel/scheduler.h>
|
||||
|
||||
#else
|
||||
#error no threads available on your system !
|
||||
#endif
|
||||
@ -228,12 +231,11 @@ static __inline__ int vlc_mutex_init( vlc_mutex_t *p_mutex )
|
||||
return 0;
|
||||
|
||||
#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
|
||||
/*
|
||||
// check the arguments and whether it's already been initialized
|
||||
if( !p_mutex )
|
||||
return B_BAD_VALUE;
|
||||
|
||||
if( p_mutex->init == 9999 )
|
||||
return EALREADY;
|
||||
if( !p_mutex ) return B_BAD_VALUE;
|
||||
if( p_mutex->init == 9999 ) return EALREADY;
|
||||
*/
|
||||
|
||||
p_mutex->lock = create_sem( 1, "BeMutex" );
|
||||
p_mutex->owner = -1;
|
||||
@ -257,18 +259,16 @@ static __inline__ int vlc_mutex_lock( vlc_mutex_t *p_mutex )
|
||||
|
||||
#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
|
||||
status_t err;
|
||||
|
||||
if( !p_mutex )
|
||||
return B_BAD_VALUE;
|
||||
|
||||
if( p_mutex->init < 2000 )
|
||||
return B_NO_INIT;
|
||||
/*
|
||||
if( !p_mutex ) return B_BAD_VALUE;
|
||||
if( p_mutex->init < 2000 ) return B_NO_INIT;
|
||||
|
||||
lazy_init_mutex( p_mutex );
|
||||
|
||||
*/
|
||||
err = acquire_sem( p_mutex->lock );
|
||||
if( !err )
|
||||
p_mutex->owner = find_thread( NULL );
|
||||
/*
|
||||
if( !err ) p_mutex->owner = find_thread( NULL );
|
||||
*/
|
||||
|
||||
return err;
|
||||
|
||||
@ -288,11 +288,9 @@ static __inline__ int vlc_mutex_unlock( vlc_mutex_t *p_mutex )
|
||||
return 0;
|
||||
|
||||
#elif defined(HAVE_KERNEL_SCHEDULER_H) && defined(HAVE_KERNEL_OS_H)
|
||||
if(! p_mutex)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
if( p_mutex->init < 2000 )
|
||||
return B_NO_INIT;
|
||||
/*
|
||||
if(! p_mutex) return B_BAD_VALUE;
|
||||
if( p_mutex->init < 2000 ) return B_NO_INIT;
|
||||
|
||||
lazy_init_mutex( p_mutex );
|
||||
|
||||
@ -300,6 +298,7 @@ static __inline__ int vlc_mutex_unlock( vlc_mutex_t *p_mutex )
|
||||
return ENOLCK;
|
||||
|
||||
p_mutex->owner = -1;
|
||||
*/
|
||||
release_sem( p_mutex->lock );
|
||||
return B_OK;
|
||||
|
||||
|
@ -95,7 +95,6 @@ aout_thread_t *aout_CreateThread( int *pi_status )
|
||||
|
||||
/* Request an interface plugin */
|
||||
psz_method = main_GetPszVariable( AOUT_METHOD_VAR, AOUT_DEFAULT_METHOD );
|
||||
|
||||
if( RequestPlugin( &p_aout->aout_plugin, "aout", psz_method ) )
|
||||
{
|
||||
intf_ErrMsg( "error: could not open audio plugin aout_%s.so\n", psz_method );
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -349,7 +349,7 @@ static void QueueMsg( intf_msg_t *p_msg, int i_type, char *psz_format, va_list a
|
||||
* Convert message to string
|
||||
*/
|
||||
#ifdef SYS_BEOS
|
||||
psz_str = (char*) malloc( INTF_MAX_MSG_SIZE );
|
||||
psz_str = (char*) malloc( strlen(psz_format) + INTF_MAX_MSG_SIZE );
|
||||
vsprintf( psz_str, psz_format, ap );
|
||||
#else
|
||||
vasprintf( &psz_str, psz_format, ap );
|
||||
|
@ -48,6 +48,10 @@
|
||||
|
||||
#include "audio_output.h"
|
||||
|
||||
#ifdef SYS_BEOS
|
||||
#include "beos_specific.h"
|
||||
#endif
|
||||
|
||||
#include "main.h"
|
||||
|
||||
/*****************************************************************************
|
||||
@ -146,6 +150,13 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
|
||||
main_t main_data; /* root of all data - see main.h */
|
||||
p_main = &main_data; /* set up the global variable */
|
||||
|
||||
/*
|
||||
* System specific initialization code
|
||||
*/
|
||||
#ifdef SYS_BEOS
|
||||
beos_Init();
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Read configuration, initialize messages interface and set up program
|
||||
*/
|
||||
@ -221,6 +232,13 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
|
||||
input_VlanDestroy();
|
||||
}
|
||||
|
||||
/*
|
||||
* System specific cleaning code
|
||||
*/
|
||||
#ifdef SYS_BEOS
|
||||
beos_Clean();
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Terminate messages interface and program
|
||||
*/
|
||||
|
94
src/misc/beos_specific.cpp
Normal file
94
src/misc/beos_specific.cpp
Normal file
@ -0,0 +1,94 @@
|
||||
/*****************************************************************************
|
||||
* beos_init.cpp: Initialization for BeOS specific features
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1999, 2000 VideoLAN
|
||||
*
|
||||
* Authors:
|
||||
* Jean-Marc Dressler
|
||||
*
|
||||
* 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-1307, USA.
|
||||
*****************************************************************************/
|
||||
#include "defs.h"
|
||||
|
||||
#include <Application.h>
|
||||
#include <Roster.h>
|
||||
#include <Path.h>
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "common.h"
|
||||
#include "threads.h"
|
||||
#include "mtime.h"
|
||||
}
|
||||
#include "beos_specific.h"
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Static vars
|
||||
*****************************************************************************/
|
||||
static vlc_thread_t beos_app_thread;
|
||||
static char * psz_beos_program_path;
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
void beos_AppThread( void * args )
|
||||
{
|
||||
BApplication * BeApp = new BApplication("application/x-VLC");
|
||||
BeApp->Run();
|
||||
delete BeApp;
|
||||
}
|
||||
|
||||
void beos_Init( void )
|
||||
{
|
||||
int i_lenght;
|
||||
BPath path;
|
||||
app_info info;
|
||||
|
||||
vlc_thread_create( &beos_app_thread, "app thread", (vlc_thread_func_t)beos_AppThread, 0 );
|
||||
msleep( 100000 );
|
||||
// FIXME: we need to verify that be_app is initialized and the msleep is not enough
|
||||
// but the following code does not work as it should and I have no good
|
||||
// solution at the moment.
|
||||
//while( be_app == NULL )
|
||||
// msleep( 5000 );
|
||||
|
||||
be_app->GetAppInfo(&info);
|
||||
BEntry entry(&info.ref);
|
||||
entry.GetPath(&path);
|
||||
path.GetParent(&path);
|
||||
i_lenght = strlen( path.Path() );
|
||||
psz_beos_program_path = (char*) malloc( i_lenght+1 ); /* XXX */
|
||||
strcpy( psz_beos_program_path, path.Path() );
|
||||
}
|
||||
|
||||
void beos_Clean( void )
|
||||
{
|
||||
free( psz_beos_program_path ); /* XXX */
|
||||
be_app->PostMessage( B_QUIT_REQUESTED );
|
||||
vlc_thread_join( beos_app_thread );
|
||||
}
|
||||
|
||||
char * beos_GetProgramPath( void )
|
||||
{
|
||||
return( psz_beos_program_path );
|
||||
}
|
||||
|
||||
} /* extern "C" */
|
@ -35,6 +35,10 @@
|
||||
#error no dynamic plugins available on your system !
|
||||
#endif
|
||||
|
||||
#ifdef SYS_BEOS
|
||||
#include "beos_specific.h"
|
||||
#endif
|
||||
|
||||
#include "plugins.h"
|
||||
|
||||
#define PLUGIN_PATH_COUNT 5
|
||||
@ -54,15 +58,21 @@ int RequestPlugin ( plugin_id_t * p_plugin, char * psz_mask, char * psz_name )
|
||||
|
||||
for ( i_count = 0 ; i_count < PLUGIN_PATH_COUNT ; i_count++ )
|
||||
{
|
||||
#ifdef SYS_BEOS
|
||||
char * psz_program_path;
|
||||
|
||||
psz_program_path = beos_GetProgramPath();
|
||||
psz_plugin = malloc( strlen(psz_plugin_path[i_count]) + strlen(psz_program_path) + i_length + 6 );
|
||||
sprintf( psz_plugin, "%s/%s/%s_%s.so", psz_program_path, psz_plugin_path[i_count], psz_mask, psz_name );
|
||||
#else
|
||||
psz_plugin = malloc( strlen(psz_plugin_path[i_count]) + i_length + 6 );
|
||||
sprintf( psz_plugin, "%s/%s_%s.so", psz_plugin_path[i_count], psz_mask, psz_name );
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_DLFCN_H)
|
||||
*p_plugin = dlopen( psz_plugin, RTLD_NOW | RTLD_GLOBAL );
|
||||
|
||||
#elif defined(HAVE_IMAGE_H)
|
||||
*p_plugin = load_add_on( psz_plugin );
|
||||
|
||||
#endif
|
||||
|
||||
free( psz_plugin );
|
||||
@ -70,11 +80,9 @@ int RequestPlugin ( plugin_id_t * p_plugin, char * psz_mask, char * psz_name )
|
||||
#if defined(HAVE_DLFCN_H)
|
||||
if( *p_plugin != NULL )
|
||||
return( 0 );
|
||||
|
||||
#elif defined(HAVE_IMAGE_H)
|
||||
if( *p_plugin >= 0 )
|
||||
return( 0 );
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -85,10 +93,8 @@ void TrashPlugin ( plugin_id_t plugin )
|
||||
{
|
||||
#if defined(HAVE_DLFCN_H)
|
||||
dlclose( plugin );
|
||||
|
||||
#elif defined(HAVE_IMAGE_H)
|
||||
unload_add_on( plugin );
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -96,15 +102,12 @@ void * GetPluginFunction ( plugin_id_t plugin, char *psz_name )
|
||||
{
|
||||
#if defined(HAVE_DLFCN_H)
|
||||
return( dlsym(plugin, psz_name) );
|
||||
|
||||
#elif defined(HAVE_IMAGE_H)
|
||||
void * p_func;
|
||||
|
||||
void * p_func;
|
||||
if( get_image_symbol( plugin, psz_name, B_SYMBOL_TYPE_TEXT, &p_func ) )
|
||||
return( NULL );
|
||||
else
|
||||
return( p_func );
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1191,7 +1191,9 @@ last_display_date = display_date;
|
||||
if( b_display && !(p_vout->i_changes & VOUT_NODISPLAY_CHANGE) )
|
||||
{
|
||||
p_vout->p_sys_display( p_vout );
|
||||
#ifndef SYS_BEOS
|
||||
p_vout->i_buffer_index = ++p_vout->i_buffer_index & 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -439,7 +439,7 @@ void vpar_InitCrop( vpar_thread_t * p_vpar )
|
||||
*****************************************************************************/
|
||||
|
||||
/* Function for filling up the lookup table for mb_addr_inc */
|
||||
static void __inline__ FillMbAddrIncTable( vpar_thread_t * p_vpar,
|
||||
static void FillMbAddrIncTable( vpar_thread_t * p_vpar,
|
||||
int i_start, int i_end, int i_step,
|
||||
int * pi_value, int i_length )
|
||||
{
|
||||
@ -502,7 +502,7 @@ void vpar_InitMbAddrInc( vpar_thread_t * p_vpar )
|
||||
*****************************************************************************/
|
||||
|
||||
/* Fonction for filling up the tables */
|
||||
static void __inline__ FillMBType( vpar_thread_t * p_vpar,
|
||||
static void FillMBType( vpar_thread_t * p_vpar,
|
||||
int i_mb_type,
|
||||
int i_start,
|
||||
int i_end,
|
||||
@ -563,7 +563,7 @@ void vpar_InitBMBType( vpar_thread_t * p_vpar )
|
||||
*****************************************************************************/
|
||||
|
||||
/* First fonction for filling the table */
|
||||
static void __inline__ FillDCTTable( dct_lookup_t * p_tab_dest, dct_lookup_t * p_tab_src,
|
||||
static void FillDCTTable( dct_lookup_t * p_tab_dest, dct_lookup_t * p_tab_src,
|
||||
int i_step, int i_nb_elem, int i_offset )
|
||||
{
|
||||
int i_dummy, i_dummy2;
|
||||
@ -619,7 +619,7 @@ void vpar_InitDCTTables( vpar_thread_t * p_vpar )
|
||||
/*****************************************************************************
|
||||
* DecodeMPEG1NonIntra : decode MPEG-1 non-intra blocks
|
||||
*****************************************************************************/
|
||||
static __inline__ void DecodeMPEG1NonIntra( vpar_thread_t * p_vpar,
|
||||
static void DecodeMPEG1NonIntra( vpar_thread_t * p_vpar,
|
||||
macroblock_t * p_mb, int i_b,
|
||||
int i_chroma_format )
|
||||
{
|
||||
@ -730,7 +730,7 @@ static __inline__ void DecodeMPEG1NonIntra( vpar_thread_t * p_vpar,
|
||||
/*****************************************************************************
|
||||
* DecodeMPEG1Intra : decode MPEG-1 intra blocks
|
||||
*****************************************************************************/
|
||||
static __inline__ void DecodeMPEG1Intra( vpar_thread_t * p_vpar,
|
||||
static void DecodeMPEG1Intra( vpar_thread_t * p_vpar,
|
||||
macroblock_t * p_mb, int i_b ,
|
||||
int i_chroma_format )
|
||||
{
|
||||
@ -877,7 +877,7 @@ static __inline__ void DecodeMPEG1Intra( vpar_thread_t * p_vpar,
|
||||
/*****************************************************************************
|
||||
* DecodeMPEG2NonIntra : decode MPEG-2 non-intra blocks
|
||||
*****************************************************************************/
|
||||
static __inline__ void DecodeMPEG2NonIntra( vpar_thread_t * p_vpar,
|
||||
static void DecodeMPEG2NonIntra( vpar_thread_t * p_vpar,
|
||||
macroblock_t * p_mb, int i_b,
|
||||
int i_chroma_format )
|
||||
{
|
||||
@ -986,7 +986,7 @@ static __inline__ void DecodeMPEG2NonIntra( vpar_thread_t * p_vpar,
|
||||
/*****************************************************************************
|
||||
* DecodeMPEG2Intra : decode MPEG-2 intra blocks
|
||||
*****************************************************************************/
|
||||
static __inline__ void DecodeMPEG2Intra( vpar_thread_t * p_vpar,
|
||||
static void DecodeMPEG2Intra( vpar_thread_t * p_vpar,
|
||||
macroblock_t * p_mb, int i_b,
|
||||
int i_chroma_format )
|
||||
{
|
||||
@ -1136,7 +1136,7 @@ static __inline__ void DecodeMPEG2Intra( vpar_thread_t * p_vpar,
|
||||
/****************************************************************************
|
||||
* MotionCode : Parse the next motion code
|
||||
****************************************************************************/
|
||||
static __inline__ int MotionCode( vpar_thread_t * p_vpar )
|
||||
static int MotionCode( vpar_thread_t * p_vpar )
|
||||
{
|
||||
int i_code;
|
||||
static lookup_t pl_mv_tab0[8] =
|
||||
@ -1185,7 +1185,7 @@ static __inline__ int MotionCode( vpar_thread_t * p_vpar )
|
||||
/****************************************************************************
|
||||
* DecodeMotionVector : Decode a motion_vector
|
||||
****************************************************************************/
|
||||
static __inline__ void DecodeMotionVector( int * pi_prediction, int i_r_size,
|
||||
static void DecodeMotionVector( int * pi_prediction, int i_r_size,
|
||||
int i_motion_code, int i_motion_residual, int i_full_pel )
|
||||
{
|
||||
int i_limit, i_vector;
|
||||
@ -1212,7 +1212,7 @@ static __inline__ void DecodeMotionVector( int * pi_prediction, int i_r_size,
|
||||
/****************************************************************************
|
||||
* MotionVector : Parse the next motion_vector field
|
||||
****************************************************************************/
|
||||
static __inline__ void MotionVector( vpar_thread_t * p_vpar,
|
||||
static void MotionVector( vpar_thread_t * p_vpar,
|
||||
macroblock_t * p_mb, int i_r,
|
||||
int i_s, int i_full_pel, int i_structure )
|
||||
{
|
||||
@ -1321,7 +1321,7 @@ static __inline__ void MotionVector( vpar_thread_t * p_vpar,
|
||||
/*****************************************************************************
|
||||
* DecodeMVMPEG1 : Parse the next MPEG-1 motion vectors
|
||||
*****************************************************************************/
|
||||
static __inline__ void DecodeMVMPEG1( vpar_thread_t * p_vpar,
|
||||
static void DecodeMVMPEG1( vpar_thread_t * p_vpar,
|
||||
macroblock_t * p_mb, int i_s, int i_structure )
|
||||
{
|
||||
MotionVector( p_vpar, p_mb, 0, i_s,
|
||||
@ -1331,7 +1331,7 @@ static __inline__ void DecodeMVMPEG1( vpar_thread_t * p_vpar,
|
||||
/*****************************************************************************
|
||||
* DecodeMVMPEG2 : Parse the next MPEG-2 motion_vectors field
|
||||
*****************************************************************************/
|
||||
static __inline__ void DecodeMVMPEG2( vpar_thread_t * p_vpar,
|
||||
static void DecodeMVMPEG2( vpar_thread_t * p_vpar,
|
||||
macroblock_t * p_mb, int i_s, int i_structure )
|
||||
{
|
||||
if( p_vpar->mb.i_mv_count == 1 )
|
||||
@ -1364,7 +1364,7 @@ static __inline__ void DecodeMVMPEG2( vpar_thread_t * p_vpar,
|
||||
/*****************************************************************************
|
||||
* MacroblockAddressIncrement : Get the macroblock_address_increment field
|
||||
*****************************************************************************/
|
||||
static __inline__ int MacroblockAddressIncrement( vpar_thread_t * p_vpar )
|
||||
static int MacroblockAddressIncrement( vpar_thread_t * p_vpar )
|
||||
{
|
||||
int i_addr_inc = 0;
|
||||
/* Index in the lookup table mb_addr_inc */
|
||||
@ -1390,7 +1390,7 @@ static __inline__ int MacroblockAddressIncrement( vpar_thread_t * p_vpar )
|
||||
/*****************************************************************************
|
||||
* IMBType : macroblock_type in I pictures
|
||||
*****************************************************************************/
|
||||
static __inline__ int IMBType( vpar_thread_t * p_vpar )
|
||||
static int IMBType( vpar_thread_t * p_vpar )
|
||||
{
|
||||
/* Take two bits for testing */
|
||||
int i_type = ShowBits( &p_vpar->bit_stream, 2 );
|
||||
@ -1408,7 +1408,7 @@ static __inline__ int IMBType( vpar_thread_t * p_vpar )
|
||||
/*****************************************************************************
|
||||
* PMBType : macroblock_type in P pictures
|
||||
*****************************************************************************/
|
||||
static __inline__ int PMBType( vpar_thread_t * p_vpar )
|
||||
static int PMBType( vpar_thread_t * p_vpar )
|
||||
{
|
||||
/* Testing on 6 bits */
|
||||
int i_type = ShowBits( &p_vpar->bit_stream, 6 );
|
||||
@ -1422,7 +1422,7 @@ static __inline__ int PMBType( vpar_thread_t * p_vpar )
|
||||
/*****************************************************************************
|
||||
* BMBType : macroblock_type in B pictures
|
||||
*****************************************************************************/
|
||||
static __inline__ int BMBType( vpar_thread_t * p_vpar )
|
||||
static int BMBType( vpar_thread_t * p_vpar )
|
||||
{
|
||||
/* Testing on 6 bits */
|
||||
int i_type = ShowBits( &p_vpar->bit_stream, 6 );
|
||||
@ -1437,7 +1437,7 @@ static __inline__ int BMBType( vpar_thread_t * p_vpar )
|
||||
/*****************************************************************************
|
||||
* DMBType : macroblock_type in D pictures
|
||||
*****************************************************************************/
|
||||
static __inline__ int DMBType( vpar_thread_t * p_vpar )
|
||||
static int DMBType( vpar_thread_t * p_vpar )
|
||||
{
|
||||
return GetBits( &p_vpar->bit_stream, 1 );
|
||||
}
|
||||
@ -1445,7 +1445,7 @@ static __inline__ int DMBType( vpar_thread_t * p_vpar )
|
||||
/*****************************************************************************
|
||||
* CodedPattern420 : coded_block_pattern with 4:2:0 chroma
|
||||
*****************************************************************************/
|
||||
static __inline__ int CodedPattern420( vpar_thread_t * p_vpar )
|
||||
static int CodedPattern420( vpar_thread_t * p_vpar )
|
||||
{
|
||||
/* Take the max 9 bits length vlc code for testing */
|
||||
int i_vlc = ShowBits( &p_vpar->bit_stream, 9 );
|
||||
@ -1460,7 +1460,7 @@ static __inline__ int CodedPattern420( vpar_thread_t * p_vpar )
|
||||
/*****************************************************************************
|
||||
* CodedPattern422 : coded_block_pattern with 4:2:2 chroma
|
||||
*****************************************************************************/
|
||||
static __inline__ int CodedPattern422( vpar_thread_t * p_vpar )
|
||||
static int CodedPattern422( vpar_thread_t * p_vpar )
|
||||
{
|
||||
int i_vlc = ShowBits( &p_vpar->bit_stream, 9 );
|
||||
|
||||
@ -1474,7 +1474,7 @@ static __inline__ int CodedPattern422( vpar_thread_t * p_vpar )
|
||||
/*****************************************************************************
|
||||
* CodedPattern444 : coded_block_pattern with 4:4:4 chroma
|
||||
*****************************************************************************/
|
||||
static __inline__ int CodedPattern444( vpar_thread_t * p_vpar )
|
||||
static int CodedPattern444( vpar_thread_t * p_vpar )
|
||||
{
|
||||
int i_vlc = ShowBits( &p_vpar->bit_stream, 9 );
|
||||
|
||||
@ -1487,7 +1487,7 @@ static __inline__ int CodedPattern444( vpar_thread_t * p_vpar )
|
||||
/*****************************************************************************
|
||||
* InitMacroblock : Initialize macroblock values
|
||||
*****************************************************************************/
|
||||
static __inline__ void InitMacroblock( vpar_thread_t * p_vpar,
|
||||
static void InitMacroblock( vpar_thread_t * p_vpar,
|
||||
macroblock_t * p_mb, int i_coding_type,
|
||||
int i_chroma_format,
|
||||
int i_structure,
|
||||
@ -1522,7 +1522,7 @@ static __inline__ void InitMacroblock( vpar_thread_t * p_vpar,
|
||||
/*****************************************************************************
|
||||
* UpdateContext : Update the p_vpar contextual values
|
||||
*****************************************************************************/
|
||||
static __inline__ void UpdateContext( vpar_thread_t * p_vpar, int i_structure )
|
||||
static void UpdateContext( vpar_thread_t * p_vpar, int i_structure )
|
||||
{
|
||||
/* Update macroblock real position. */
|
||||
p_vpar->mb.i_l_x += 16;
|
||||
@ -1540,7 +1540,7 @@ static __inline__ void UpdateContext( vpar_thread_t * p_vpar, int i_structure )
|
||||
/*****************************************************************************
|
||||
* SkippedMacroblock : Generate a skipped macroblock with NULL motion vector
|
||||
*****************************************************************************/
|
||||
static __inline__ void SkippedMacroblock( vpar_thread_t * p_vpar, int i_mb,
|
||||
static void SkippedMacroblock( vpar_thread_t * p_vpar, int i_mb,
|
||||
int i_mb_base, int i_coding_type,
|
||||
int i_chroma_format,
|
||||
int i_structure,
|
||||
@ -1600,7 +1600,7 @@ static __inline__ void SkippedMacroblock( vpar_thread_t * p_vpar, int i_mb,
|
||||
/*****************************************************************************
|
||||
* MacroblockModes : Get the macroblock_modes structure
|
||||
*****************************************************************************/
|
||||
static __inline__ void MacroblockModes( vpar_thread_t * p_vpar,
|
||||
static void MacroblockModes( vpar_thread_t * p_vpar,
|
||||
macroblock_t * p_mb,
|
||||
int i_chroma_format,
|
||||
int i_coding_type,
|
||||
@ -1747,7 +1747,7 @@ if( p_vpar->picture.b_error ) \
|
||||
} \
|
||||
}
|
||||
|
||||
static __inline__ void ParseMacroblock(
|
||||
static void ParseMacroblock(
|
||||
vpar_thread_t * p_vpar,
|
||||
int * pi_mb_address, /* previous address to be
|
||||
* used for mb_addr_incr */
|
||||
@ -1981,7 +1981,7 @@ i_count++;
|
||||
/*****************************************************************************
|
||||
* SliceHeader : Parse the next slice structure
|
||||
*****************************************************************************/
|
||||
static __inline__ void SliceHeader( vpar_thread_t * p_vpar,
|
||||
static void SliceHeader( vpar_thread_t * p_vpar,
|
||||
int * pi_mb_address, int i_mb_base,
|
||||
u32 i_vert_code, boolean_t b_high,
|
||||
boolean_t b_dp_scalable,
|
||||
@ -2057,7 +2057,7 @@ static __inline__ void SliceHeader( vpar_thread_t * p_vpar,
|
||||
/*****************************************************************************
|
||||
* PictureData : Parse off all macroblocks (ISO/IEC 13818-2 6.2.3.7)
|
||||
*****************************************************************************/
|
||||
static __inline__ void PictureData( vpar_thread_t * p_vpar, int i_mb_base,
|
||||
static void PictureData( vpar_thread_t * p_vpar, int i_mb_base,
|
||||
boolean_t b_high, boolean_t b_dp_scalable,
|
||||
boolean_t b_mpeg2, int i_coding_type,
|
||||
int i_chroma_format, int i_structure,
|
||||
|
Loading…
Reference in New Issue
Block a user