Commit 87432971 authored by Richard Shepherd's avatar Richard Shepherd

Some rather boring changes to keep the CVS tree up to date with my (working) build

parent a3c6cd9a
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
class SeekSlider;
class MediaSlider;
class CDMenu : public BMenu class CDMenu : public BMenu
{ {
public: public:
...@@ -44,8 +47,8 @@ public: ...@@ -44,8 +47,8 @@ public:
intf_thread_t *p_intf; intf_thread_t *p_intf;
BSlider * p_vol; MediaSlider * p_vol;
BSlider * p_seek; SeekSlider * p_seek;
BCheckBox * p_mute; BCheckBox * p_mute;
sem_id fScrubSem; sem_id fScrubSem;
bool fSeeking; bool fSeeking;
......
...@@ -66,6 +66,7 @@ public: ...@@ -66,6 +66,7 @@ public:
bool teardownwindow; bool teardownwindow;
bool is_zoomed; bool is_zoomed;
bool fUsingOverlay; bool fUsingOverlay;
BScreen *screen;
private: private:
display_mode old_mode; display_mode old_mode;
......
...@@ -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.20 2001/03/15 01:42:19 sam Exp $ * $Id: intf_beos.cpp,v 1.21 2001/03/17 19:33:22 richards 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>
...@@ -126,7 +126,7 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name , intf_thread_t ...@@ -126,7 +126,7 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name , intf_thread_t
menu_bar->AddItem( m = new BMenu("File") ); menu_bar->AddItem( m = new BMenu("File") );
menu_bar->ResizeToPreferred(); menu_bar->ResizeToPreferred();
m->AddItem( new BMenuItem("Open File...", new BMessage(OPEN_FILE), 'O')); m->AddItem( new BMenuItem("Open File...", new BMessage(OPEN_FILE), 'O'));
cd_menu = new CDMenu("Open DVD"); cd_menu = new CDMenu("Open Disc");
//GetCD("/dev/disk", cd_menu); //GetCD("/dev/disk", cd_menu);
m->AddItem(cd_menu); m->AddItem(cd_menu);
m->AddSeparatorItem(); m->AddSeparatorItem();
...@@ -540,7 +540,7 @@ void MediaSlider::DrawThumb(void) ...@@ -540,7 +540,7 @@ void MediaSlider::DrawThumb(void)
v->SetHighColor(black); v->SetHighColor(black);
else else
v->SetHighColor(tint_color(black, B_LIGHTEN_2_TINT)); v->SetHighColor(tint_color(black, B_LIGHTEN_2_TINT));
r.InsetBy(r.IntegerWidth()/4, r.IntegerHeight()/6); r.InsetBy(r.IntegerWidth()/4, r.IntegerHeight()/(4 * r.IntegerWidth() / r.IntegerHeight()));
v->StrokeEllipse(r); v->StrokeEllipse(r);
if(IsEnabled()) if(IsEnabled())
v->SetHighColor(ui_color(B_PANEL_BACKGROUND_COLOR)); v->SetHighColor(ui_color(B_PANEL_BACKGROUND_COLOR));
......
...@@ -150,13 +150,15 @@ VideoWindow::VideoWindow(BRect frame, const char *name, vout_thread_t *p_video_o ...@@ -150,13 +150,15 @@ VideoWindow::VideoWindow(BRect frame, const char *name, vout_thread_t *p_video_o
is_zoomed = false; is_zoomed = false;
p_vout = p_video_output; p_vout = p_video_output;
fDrawThreadID = NULL; fDrawThreadID = NULL;
bitmap[0] = NULL;
bitmap[1] = NULL;
rect = Frame(); rect = Frame();
view = new VLCView(Bounds()); view = new VLCView(Bounds());
AddChild(view); AddChild(view);
bitmap[0] = new BBitmap(Bounds(), B_BITMAP_WILL_OVERLAY|B_BITMAP_RESERVE_OVERLAY_CHANNEL, B_YCbCr422); bitmap[0] = new BBitmap(Bounds(), B_BITMAP_WILL_OVERLAY|B_BITMAP_RESERVE_OVERLAY_CHANNEL, B_YCbCr422);
fUsingOverlay = true; fUsingOverlay = true;
i_screen_depth = 32; i_screen_depth = 16;
p_vout->b_YCbr = true; p_vout->b_YCbr = true;
if (bitmap[0]->InitCheck() != B_OK) if (bitmap[0]->InitCheck() != B_OK)
...@@ -429,14 +431,21 @@ int vout_Init( vout_thread_t *p_vout ) ...@@ -429,14 +431,21 @@ int vout_Init( vout_thread_t *p_vout )
if(p_win->fUsingOverlay) if(p_win->fUsingOverlay)
{ {
vout_SetBuffers( p_vout, (byte_t *)p_win->bitmap[0]->Bits(), if(p_win->bitmap[0] != NULL)
{
vout_SetBuffers( p_vout, (byte_t *)p_win->bitmap[0]->Bits(),
(byte_t *)p_win->bitmap[0]->Bits()); (byte_t *)p_win->bitmap[0]->Bits());
delete p_win->bitmap[0]; delete p_win->bitmap[0];
p_win->bitmap[0] = NULL;
}
} }
else else
{ {
vout_SetBuffers( p_vout, (byte_t *)p_win->bitmap[0]->Bits(), if((p_win->bitmap[0] != NULL) && (p_win->bitmap[1] != NULL))
{
vout_SetBuffers( p_vout, (byte_t *)p_win->bitmap[0]->Bits(),
(byte_t *)p_win->bitmap[1]->Bits()); (byte_t *)p_win->bitmap[1]->Bits());
}
} }
return( 0 ); return( 0 );
} }
...@@ -468,7 +477,38 @@ void vout_Destroy( vout_thread_t *p_vout ) ...@@ -468,7 +477,38 @@ void vout_Destroy( vout_thread_t *p_vout )
*****************************************************************************/ *****************************************************************************/
int vout_Manage( vout_thread_t *p_vout ) int vout_Manage( vout_thread_t *p_vout )
{ {
return( 0 ); VideoWindow * p_win = p_vout->p_sys->p_window;
rgb_color key;
float minWidth, minHeight, maxWidth, maxHeight;
if( (p_vout->i_width != p_vout->p_sys->i_width) ||
(p_vout->i_height != p_vout->p_sys->i_height) )
{
/* If video output size has changed, change interface window size */
intf_DbgMsg( "resizing output window" );
if(p_win->fUsingOverlay)
{
p_win->Lock();
p_win->view->ClearViewOverlay();
p_vout->p_sys->i_width = p_vout->i_width;
p_vout->p_sys->i_height = p_vout->i_height;;
p_win->GetSizeLimits(&minWidth, &maxWidth, &minHeight, &maxHeight);
p_win->SetSizeLimits((float) p_vout->p_sys->i_width, maxWidth, (float) p_vout->p_sys->i_height, maxHeight);
p_win->ResizeTo(p_vout->p_sys->i_width, p_vout->p_sys->i_height);
p_win->bitmap[0] = new BBitmap(p_win->Bounds(),
B_BITMAP_WILL_OVERLAY|B_BITMAP_RESERVE_OVERLAY_CHANNEL,
B_YCbCr422);
memset(p_win->bitmap[0]->Bits(), 0, p_win->bitmap[0]->BitsLength());
p_win->view->SetViewOverlay(p_win->bitmap[0], p_win->bitmap[0]->Bounds(), p_win->Bounds(), &key, B_FOLLOW_ALL,
B_OVERLAY_FILTER_HORIZONTAL|B_OVERLAY_FILTER_VERTICAL);
p_win->view->SetViewColor(key);
p_win->Unlock();
vout_SetBuffers( p_vout, (byte_t *)p_win->bitmap[0]->Bits(),
(byte_t *)p_win->bitmap[0]->Bits());
delete p_win->bitmap[0];
}
}
return( 0 );
} }
/***************************************************************************** /*****************************************************************************
......
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