X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=plugins%2Fbeos%2Fvout_beos.cpp;h=7926dde6d65c8c92086dba3bb75bc12fd6d7be70;hb=d04b152ba136aa60f9005423eb34d9106b4581e0;hp=979ea3f6d489185c1cfae8837707fd1dfce5da03;hpb=3cbfc06dc36bc0d178793558d52d71348e999106;p=vlc diff --git a/plugins/beos/vout_beos.cpp b/plugins/beos/vout_beos.cpp index 979ea3f6d4..7926dde6d6 100644 --- a/plugins/beos/vout_beos.cpp +++ b/plugins/beos/vout_beos.cpp @@ -340,18 +340,18 @@ static int BeosOpenDisplay ( vout_thread_t *p_vout ); static void BeosCloseDisplay ( vout_thread_t *p_vout ); /***************************************************************************** - * vout_SysCreate: allocates dummy video thread output method + * vout_BeCreate: allocates dummy video thread output method ***************************************************************************** * This function allocates and initializes a dummy vout method. *****************************************************************************/ -int vout_SysCreate( vout_thread_t *p_vout, char *psz_display, +int vout_BeCreate( vout_thread_t *p_vout, char *psz_display, int i_root_window, void *p_data ) { /* Allocate structure */ p_vout->p_sys = (vout_sys_t*) malloc( sizeof( vout_sys_t ) ); if( p_vout->p_sys == NULL ) { - intf_ErrMsg( "error: %s\n", strerror(ENOMEM) ); + intf_ErrMsg( "error: %s", strerror(ENOMEM) ); return( 1 ); } @@ -362,7 +362,7 @@ int vout_SysCreate( vout_thread_t *p_vout, char *psz_display, /* Open and initialize device */ if( BeosOpenDisplay( p_vout ) ) { - intf_ErrMsg("vout error: can't open display\n"); + intf_ErrMsg("vout error: can't open display"); free( p_vout->p_sys ); return( 1 ); } @@ -371,9 +371,9 @@ int vout_SysCreate( vout_thread_t *p_vout, char *psz_display, } /***************************************************************************** - * vout_SysInit: initialize dummy video thread output method + * vout_BeInit: initialize dummy video thread output method *****************************************************************************/ -int vout_SysInit( vout_thread_t *p_vout ) +int vout_BeInit( vout_thread_t *p_vout ) { VideoWindow * p_win = p_vout->p_sys->p_window; u32 i_page_size; @@ -390,7 +390,7 @@ int vout_SysInit( vout_thread_t *p_vout ) p_vout->p_sys->pp_buffer[1] = (byte_t*) malloc( i_page_size ); if( p_vout->p_sys->pp_buffer[0] == NULL || p_vout->p_sys->pp_buffer[0] == NULL ) { - intf_ErrMsg("vout error: can't allocate video memory (%s)\n", strerror(errno) ); + intf_ErrMsg("vout error: can't allocate video memory (%s)", strerror(errno) ); if( p_vout->p_sys->pp_buffer[0] != NULL ) free( p_vout->p_sys->pp_buffer[0] ); if( p_vout->p_sys->pp_buffer[1] != NULL ) free( p_vout->p_sys->pp_buffer[1] ); p_win->locker->Unlock(); @@ -406,9 +406,9 @@ int vout_SysInit( vout_thread_t *p_vout ) } /***************************************************************************** - * vout_SysEnd: terminate dummy video thread output method + * vout_BeEnd: terminate dummy video thread output method *****************************************************************************/ -void vout_SysEnd( vout_thread_t *p_vout ) +void vout_BeEnd( vout_thread_t *p_vout ) { VideoWindow * p_win = p_vout->p_sys->p_window; @@ -422,11 +422,11 @@ void vout_SysEnd( vout_thread_t *p_vout ) } /***************************************************************************** - * vout_SysDestroy: destroy dummy video thread output method + * vout_BeDestroy: destroy dummy video thread output method ***************************************************************************** * Terminate an output method created by DummyCreateOutputMethod *****************************************************************************/ -void vout_SysDestroy( vout_thread_t *p_vout ) +void vout_BeDestroy( vout_thread_t *p_vout ) { BeosCloseDisplay( p_vout ); @@ -434,46 +434,46 @@ void vout_SysDestroy( vout_thread_t *p_vout ) } /***************************************************************************** - * vout_SysManage: handle dummy events + * vout_BeManage: handle dummy events ***************************************************************************** * This function should be called regularly by video output thread. It manages * console events. It returns a non null value on error. *****************************************************************************/ -int vout_SysManage( vout_thread_t *p_vout ) +int vout_BeManage( vout_thread_t *p_vout ) { if( p_vout->i_changes & VOUT_SIZE_CHANGE ) { - intf_DbgMsg("resizing window\n"); + intf_DbgMsg("resizing window"); p_vout->i_changes &= ~VOUT_SIZE_CHANGE; /* Resize window */ p_vout->p_sys->p_window->ResizeTo( p_vout->i_width, p_vout->i_height ); /* Destroy XImages to change their size */ - vout_SysEnd( p_vout ); + vout_BeEnd( p_vout ); /* Recreate XImages. If SysInit failed, the thread can't go on. */ - if( vout_SysInit( p_vout ) ) + if( vout_BeInit( p_vout ) ) { - intf_ErrMsg("error: can't resize display\n"); + intf_ErrMsg("error: can't resize display"); return( 1 ); } /* Tell the video output thread that it will need to rebuild YUV * tables. This is needed since convertion buffer size may have changed */ p_vout->i_changes |= VOUT_YUV_CHANGE; - intf_Msg("Video display resized (%dx%d)\n", p_vout->i_width, p_vout->i_height); + intf_Msg("vout: video display resized (%dx%d)", p_vout->i_width, p_vout->i_height); } return( 0 ); } /***************************************************************************** - * vout_SysDisplay: displays previously rendered output + * vout_BeDisplay: displays previously rendered output ***************************************************************************** * This function send the currently rendered image to dummy image, waits until * it is displayed and switch the two rendering buffers, preparing next frame. *****************************************************************************/ -void vout_SysDisplay( vout_thread_t *p_vout ) +void vout_BeDisplay( vout_thread_t *p_vout ) { VideoWindow * p_win = p_vout->p_sys->p_window; @@ -499,11 +499,11 @@ static int BeosOpenDisplay( vout_thread_t *p_vout ) { /* Create the DirectDraw video window */ p_vout->p_sys->p_window = - new VideoWindow( BRect( 100, 100, 100+p_vout->i_width, 100+p_vout->i_height ), "VideoLAN", p_vout ); + new VideoWindow( BRect( 100, 100, 100+p_vout->i_width-1, 100+p_vout->i_height-1 ), "VideoLAN", p_vout ); if( p_vout->p_sys->p_window == 0 ) { free( p_vout->p_sys ); - intf_ErrMsg( "error: cannot allocate memory for VideoWindow\n" ); + intf_ErrMsg( "error: cannot allocate memory for VideoWindow" ); return( 1 ); } VideoWindow * p_win = p_vout->p_sys->p_window; @@ -519,7 +519,7 @@ static int BeosOpenDisplay( vout_thread_t *p_vout ) switch( p_vout->i_screen_depth ) { case 8: - intf_ErrMsg( "vout error: 8 bit mode not fully supported\n" ); + intf_ErrMsg( "vout error: 8 bit mode not fully supported" ); break; case 15: p_vout->i_red_mask = 0x7c00;