Commit 6d1e0c51 authored by Tony Castley's avatar Tony Castley

Added funcionality for vertical retrace sync for refresh rates 60Hz or lower

(Thanks Rudolf)
Fixed the Prev Title Bug, now works.
parent 710f02f2
......@@ -2,7 +2,7 @@
* InterfaceWindow.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: InterfaceWindow.cpp,v 1.8 2001/11/30 09:49:48 tcastley Exp $
* $Id: InterfaceWindow.cpp,v 1.9 2001/12/06 10:29:40 tcastley Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -428,7 +428,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
i_id = p_intf->p_input->stream.p_selected_area->i_id - 1;
/* Disallow area 0 since it is used for video_ts.vob */
if( i_id < 0 )
if( i_id > 0 )
{
p_area = p_intf->p_input->stream.pp_areas[i_id];
input_ChangeArea( p_intf->p_input, (input_area_t*)p_area );
......
......@@ -2,7 +2,7 @@
* VideoWindow.h: BeOS video window class prototype
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: VideoWindow.h,v 1.8 2001/12/01 06:38:53 tcastley Exp $
* $Id: VideoWindow.h,v 1.9 2001/12/06 10:29:40 tcastley Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au>
......@@ -22,8 +22,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include <Bitmap.h>
class VLCView : public BView
{
public:
......
......@@ -2,7 +2,7 @@
* vout_beos.cpp: beos video output display method
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: vout_beos.cpp,v 1.33 2001/12/01 06:38:53 tcastley Exp $
* $Id: vout_beos.cpp,v 1.34 2001/12/06 10:29:40 tcastley Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -108,19 +108,51 @@ BWindow *beos_GetAppWindow(char *name)
return window;
}
/*****************************************************************************
/****************************************************************************
*
* DrawingThread : thread that really does the drawing
*****************************************************************************/
****************************************************************************
*/
int32 Draw(void *data)
{
//rudolf: sync init:
BScreen *screen;
display_mode disp_mode;
static uint32 refresh, oldrefresh = 0;
screen = new BScreen();
screen-> GetMode(&disp_mode);
refresh =
(disp_mode.timing.pixel_clock * 1000)/((disp_mode.timing.h_total)*
(disp_mode.timing.v_total));
if (!(refresh == oldrefresh))
{
printf("\nNew refreshrate is %d:Hz\n",refresh);
oldrefresh = refresh;
if (refresh < 61)
{
printf("Enabling retrace sync.\n");
}
else
{
printf("Disabling retrace sync.\n");
}
}
VideoWindow* p_win;
p_win = (VideoWindow *) data;
if ( p_win->voutWindow->LockLooper() )
if ( p_win-> voutWindow-> LockLooper() )
{
p_win->view->DrawBitmap( p_win->bitmap[p_win->i_buffer],
p_win->bitmap[p_win->i_buffer]->Bounds(),
p_win->voutWindow->Bounds() );
p_win->voutWindow->UnlockLooper();
//rudolf: sync:
if (refresh < 61)
{
screen-> WaitForRetrace(22000);//set timeout for < 45 Hz...
}
p_win-> view-> DrawBitmap( p_win-> bitmap[p_win-> i_buffer],
p_win-> bitmap[p_win-> i_buffer]-> Bounds(),
p_win-> voutWindow-> Bounds() );
p_win-> voutWindow-> UnlockLooper();
}
return B_OK;
}
......
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