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 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
class SeekSlider;
class MediaSlider;
class CDMenu : public BMenu
{
public:
......@@ -44,8 +47,8 @@ public:
intf_thread_t *p_intf;
BSlider * p_vol;
BSlider * p_seek;
MediaSlider * p_vol;
SeekSlider * p_seek;
BCheckBox * p_mute;
sem_id fScrubSem;
bool fSeeking;
......
......@@ -66,6 +66,7 @@ public:
bool teardownwindow;
bool is_zoomed;
bool fUsingOverlay;
BScreen *screen;
private:
display_mode old_mode;
......
......@@ -2,7 +2,7 @@
* intf_beos.cpp: beos interface
*****************************************************************************
* 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>
* Samuel Hocevar <sam@zoy.org>
......@@ -126,7 +126,7 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name , intf_thread_t
menu_bar->AddItem( m = new BMenu("File") );
menu_bar->ResizeToPreferred();
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);
m->AddItem(cd_menu);
m->AddSeparatorItem();
......@@ -540,7 +540,7 @@ void MediaSlider::DrawThumb(void)
v->SetHighColor(black);
else
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);
if(IsEnabled())
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
is_zoomed = false;
p_vout = p_video_output;
fDrawThreadID = NULL;
bitmap[0] = NULL;
bitmap[1] = NULL;
rect = Frame();
view = new VLCView(Bounds());
AddChild(view);
bitmap[0] = new BBitmap(Bounds(), B_BITMAP_WILL_OVERLAY|B_BITMAP_RESERVE_OVERLAY_CHANNEL, B_YCbCr422);
fUsingOverlay = true;
i_screen_depth = 32;
i_screen_depth = 16;
p_vout->b_YCbr = true;
if (bitmap[0]->InitCheck() != B_OK)
......@@ -429,14 +431,21 @@ int vout_Init( vout_thread_t *p_vout )
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());
delete p_win->bitmap[0];
delete p_win->bitmap[0];
p_win->bitmap[0] = NULL;
}
}
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());
}
}
return( 0 );
}
......@@ -468,7 +477,38 @@ void vout_Destroy( 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