Browse Source
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=braindeadpull/2/head
14 changed files with 1312 additions and 83 deletions
@ -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 |
|||
@ -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); |
|||
|
|||
}; |
|||
File diff suppressed because it is too large
@ -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" */ |
|||
Loading…
Reference in new issue