Commit 2a2cf8b1 authored by Tony Castley's avatar Tony Castley

Changes to ensure BeOS plugins compile and function

Implemented a intf_vlc_wrapper to "shield" the BeOS code from the underlying
vlc structurs, yet to be completed.
Attempted to fix subtitle and audio selection, currently not working.
parent 64d33dc9
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* InterfaceWindow.h: BeOS interface window class prototype * InterfaceWindow.h: BeOS interface window class prototype
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: InterfaceWindow.h,v 1.14 2002/07/23 00:39:16 sam Exp $ * $Id: InterfaceWindow.h,v 1.15 2002/07/23 12:42:17 tcastley Exp $
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au> * Tony Castley <tcastley@mail.powerup.com.au>
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
/*****************************************************************************
* intf_sys_t: description and status of FB interface
*****************************************************************************/
class MediaControlView; class MediaControlView;
class PlayListWindow; class PlayListWindow;
...@@ -65,8 +68,10 @@ public: ...@@ -65,8 +68,10 @@ public:
private: private:
intf_thread_t *p_intf; intf_thread_t *p_intf;
bool b_empty_playlist; bool b_empty_playlist;
bool b_mute;
BFilePanel *file_panel; BFilePanel *file_panel;
PlayListWindow* playlist_window; PlayListWindow* playlist_window;
BMenuItem *miOnTop; BMenuItem *miOnTop;
Intf_VLCWrapper * p_vlc_wrapper;
}; };
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* MsgVals.h * MsgVals.h
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: MsgVals.h,v 1.10 2002/07/22 11:39:56 tcastley Exp $ * $Id: MsgVals.h,v 1.11 2002/07/23 12:42:17 tcastley Exp $
* *
* Authors: Tony Castley <tcastley@mail.powerup.com.au> * Authors: Tony Castley <tcastley@mail.powerup.com.au>
* *
...@@ -36,7 +36,7 @@ const uint32 SLOWER_PLAY = 'SLPL'; ...@@ -36,7 +36,7 @@ const uint32 SLOWER_PLAY = 'SLPL';
const uint32 SEEK_PLAYBACK = 'SEEK'; const uint32 SEEK_PLAYBACK = 'SEEK';
const uint32 VOLUME_CHG = 'VOCH'; const uint32 VOLUME_CHG = 'VOCH';
const uint32 VOLUME_MUTE = 'MUTE'; const uint32 VOLUME_MUTE = 'MUTE';
const uint32 SELECT_CHANNEL = 'CHAN'; const uint32 SELECT_AUDIO = 'AUDI';
const uint32 SELECT_SUBTITLE = 'SUBT'; const uint32 SELECT_SUBTITLE = 'SUBT';
const uint32 PREV_TITLE = 'PRTI'; const uint32 PREV_TITLE = 'PRTI';
const uint32 NEXT_TITLE = 'NXTI'; const uint32 NEXT_TITLE = 'NXTI';
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* VideoWindow.h: BeOS video window class prototype * VideoWindow.h: BeOS video window class prototype
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: VideoWindow.h,v 1.22 2002/07/23 00:39:16 sam Exp $ * $Id: VideoWindow.h,v 1.23 2002/07/23 12:42:17 tcastley Exp $
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au> * Tony Castley <tcastley@mail.powerup.com.au>
...@@ -45,7 +45,7 @@ colorcombo colspace[]= ...@@ -45,7 +45,7 @@ colorcombo colspace[]=
}; };
#define COLOR_COUNT 5 #define COLOR_COUNT 5
#define DEFAULT_COL 3 #define DEFAULT_COL 4
class VLCView : public BView class VLCView : public BView
...@@ -74,7 +74,7 @@ public: ...@@ -74,7 +74,7 @@ public:
void drawBuffer(int bufferIndex); void drawBuffer(int bufferIndex);
void WindowActivated(bool active); void WindowActivated(bool active);
int SelectDrawingMode(int width, int height); int SelectDrawingMode(int width, int height);
bool QuitRequested(); void MessageReceived(BMessage *message);
// this is the hook controling direct screen connection // this is the hook controling direct screen connection
int32 i_width; // incomming bitmap size int32 i_width; // incomming bitmap size
...@@ -82,7 +82,6 @@ public: ...@@ -82,7 +82,6 @@ public:
BRect winSize; // current window size BRect winSize; // current window size
bool is_zoomed, vsync; bool is_zoomed, vsync;
BBitmap *bitmap[3]; BBitmap *bitmap[3];
BBitmap *overlaybitmap;
VLCView *view; VLCView *view;
int i_buffer; int i_buffer;
bool teardownwindow; bool teardownwindow;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_beos.cpp: beos interface * intf_beos.cpp: beos interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: intf_beos.cpp,v 1.42 2002/07/20 18:01:42 sam Exp $ * $Id: intf_beos.cpp,v 1.43 2002/07/23 12:42:17 tcastley Exp $
* *
* Authors: Jean-Marc Dressler <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -35,18 +35,9 @@ ...@@ -35,18 +35,9 @@
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <vlc/intf.h> #include <vlc/intf.h>
#include "intf_vlc_wrapper.h"
#include "InterfaceWindow.h" #include "InterfaceWindow.h"
/*****************************************************************************
* intf_sys_t: description and status of FB interface
*****************************************************************************/
struct intf_sys_t
{
InterfaceWindow * p_window;
char i_key;
};
extern "C" extern "C"
{ {
...@@ -89,7 +80,9 @@ static int intf_Open( intf_thread_t *p_intf ) ...@@ -89,7 +80,9 @@ static int intf_Open( intf_thread_t *p_intf )
msg_Err( p_intf, "out of memory" ); msg_Err( p_intf, "out of memory" );
return( 1 ); return( 1 );
} }
p_intf->p_sys->i_key = -1; // p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
p_intf->p_sys->p_input = NULL;
/* Create the interface window */ /* Create the interface window */
p_intf->p_sys->p_window = p_intf->p_sys->p_window =
...@@ -110,6 +103,13 @@ static int intf_Open( intf_thread_t *p_intf ) ...@@ -110,6 +103,13 @@ static int intf_Open( intf_thread_t *p_intf )
*****************************************************************************/ *****************************************************************************/
static void intf_Close( intf_thread_t *p_intf ) static void intf_Close( intf_thread_t *p_intf )
{ {
if( p_intf->p_sys->p_input )
{
vlc_object_release( p_intf->p_sys->p_input );
}
// msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
/* Destroy the interface window */ /* Destroy the interface window */
p_intf->p_sys->p_window->Lock(); p_intf->p_sys->p_window->Lock();
p_intf->p_sys->p_window->Quit(); p_intf->p_sys->p_window->Quit();
...@@ -126,16 +126,31 @@ static void intf_Run( intf_thread_t *p_intf ) ...@@ -126,16 +126,31 @@ static void intf_Run( intf_thread_t *p_intf )
{ {
while( !p_intf->b_die ) while( !p_intf->b_die )
{ {
/* Manage the slider */ /* Update the input */
if( p_intf->p_vlc->p_input_bank->pp_input[0] != NULL if( p_intf->p_sys->p_input != NULL )
&& p_intf->p_sys->p_window != NULL)
{ {
if( p_intf->p_sys->p_input->b_dead )
{
vlc_object_release( p_intf->p_sys->p_input );
p_intf->p_sys->p_input = NULL;
}
/* Manage the slider */
p_intf->p_sys->p_window->updateInterface(); p_intf->p_sys->p_window->updateInterface();
} }
if( p_intf->p_sys->p_input == NULL )
{
p_intf->p_sys->p_input =
(input_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_INPUT,
FIND_ANYWHERE );
}
/* Wait a bit */ /* Wait a bit */
msleep( INTF_IDLE_SLEEP ); msleep( INTF_IDLE_SLEEP );
} }
} }
} /* extern "C" */ } /* extern "C" */
......
This diff is collapsed.
/*****************************************************************************
* intf_vlc_wrapper.h: BeOS plugin for vlc (derived from MacOS X port )
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_vlc_wrapper.h,v 1.2 2002/07/23 12:42:17 tcastley Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
* Tony Casltey <tony@castley.net>
*
* 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, USA.
*****************************************************************************/
class InterfaceWindow;
/*****************************************************************************
* intf_sys_t: description and status of FB interface
*****************************************************************************/
struct intf_sys_t
{
InterfaceWindow *p_window;
char i_key;
/* The input thread */
input_thread_t * p_input;
/* The messages window */
// msg_subscription_t * p_sub;
/* DVD mode */
vlc_bool_t b_disabled_menus;
vlc_bool_t b_loop;
vlc_bool_t b_mute;
int i_part;
int i_saved_volume;
int i_channel;
};
/* Intf_VLCWrapper is a singleton class
(only one instance at any time) */
class Intf_VLCWrapper
{
public:
static Intf_VLCWrapper *getVLCWrapper(intf_thread_t *p_if);
~Intf_VLCWrapper();
// bool manage();
void quit();
int inputGetStatus();
/* playlist control */
bool playlistPlay();
void playlistPause();
void playlistStop();
void playlistNext();
void playlistPrev();
void playlistSkip(int i);
void playlistGoto(int i);
/* Playback Modes
PLAYLIST_REPEAT_CURRENT
PLAYLIST_FORWARD
PLAYLIST_BACKWARD
PLAYLIST_FORWARD_LOOP
PLAYLIST_BACKWARD_LOOP
PLAYLIST_RANDOM
PLAYLIST_REVERSE_RANDOM
*/
/* Stream Control */
void playSlower();
void playFaster();
/* input control */
int getStatus();
void setStatus(int status);
void inputSeek();
void toggleProgram(int i_program);
void toggleTitle(int i_title);
void toggleChapter(int i_chapter);
void toggleLanguage(int i_language);
void toggleSubtitle(int i_subtitle);
void channelNext();
void channelPrev();
void eject();
/* playback info */
BString* getTimeAsString();
float getTimeAsFloat();
void setTimeAsFloat(float i_offset);
BList* playlistAsArray();
/* open file/disc/network */
void openFiles(BList *o_files);
void openDisc(BString o_type, BString o_device, int i_title, int i_chapter);
void openNet(BString o_addr, int i_port);
void openNetChannel(BString o_addr, int i_port);
void openNetHTTP(BString o_addr);
/* audio stuff */
void volumeMute( bool mute );
/* menus management */
void setupMenus();
private:
Intf_VLCWrapper( intf_thread_t *p_if );
es_descriptor_t * p_audio_es;
intf_thread_t *p_intf;
};
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