]> git.sesse.net Git - vlc/blobdiff - modules/gui/beos/VideoOutput.cpp
Privatized part of vout fields.
[vlc] / modules / gui / beos / VideoOutput.cpp
index 24a30010345e48f2d550c031d9a83c428b6f3a8e..8364ea184a1458306c738c1afc8f1acd47a23e9e 100644 (file)
 #include <WindowScreen.h>
 
 /* VLC headers */
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
 #include <vlc_interface.h>
 #include <vlc_vout.h>
 #include <vlc_keys.h>
@@ -73,7 +77,6 @@ struct vout_sys_t
 
 };
 
-#define MOUSE_IDLE_TIMEOUT 2000000    // two seconds
 #define MIN_AUTO_VSYNC_REFRESH 61    // Hz
 
 /*****************************************************************************
@@ -773,20 +776,20 @@ VideoWindow::_AllocateBuffers(int width, int height, int* mode)
                 {
                     msg_Dbg( p_vout, "using single-buffered overlay" );
                     bitmap_count = 2;
-                    if( bitmap[2] ) { delete bitmap[2]; bitmap[2] = NULL; }
+                    delete bitmap[2]; bitmap[2] = NULL;
                 }
             }
             else
             {
                 msg_Dbg( p_vout, "using simple overlay" );
                 bitmap_count = 1;
-                if( bitmap[1] ) { delete bitmap[1]; bitmap[1] = NULL; }
+                delete bitmap[1]; bitmap[1] = NULL;
             }
             break;
         }
         else
         {
-            if( bitmap[0] ) { delete bitmap[0]; bitmap[0] = NULL; }
+            delete bitmap[0]; bitmap[0] = NULL;
         }
     }
 
@@ -825,9 +828,9 @@ VideoWindow::_AllocateBuffers(int width, int height, int* mode)
 void
 VideoWindow::_FreeBuffers()
 {
-    if( bitmap[0] ) { delete bitmap[0]; bitmap[0] = NULL; }
-    if( bitmap[1] ) { delete bitmap[1]; bitmap[1] = NULL; }
-    if( bitmap[2] ) { delete bitmap[2]; bitmap[2] = NULL; }
+    delete bitmap[0]; bitmap[0] = NULL;
+    delete bitmap[1]; bitmap[1] = NULL;
+    delete bitmap[2]; bitmap[2] = NULL;
     fInitStatus = B_ERROR;
 }
 
@@ -980,6 +983,7 @@ VLCView::VLCView(BRect bounds, vout_thread_t *p_vout_instance )
       fIgnoreDoubleClick(false)
 {
     p_vout = p_vout_instance;
+    fMouseHideTimeout = var_GetInteger(p_vout, "mouse-hide-timeout") * 1000;
     SetViewColor(B_TRANSPARENT_32_BIT);
 }
 
@@ -1120,7 +1124,7 @@ void
 VLCView::MouseUp( BPoint where )
 {
     vlc_value_t val;
-    val.b_bool = VLC_TRUE;
+    val.b_bool = true;
     var_Set( p_vout, "mouse-clicked", val );
 }
 
@@ -1148,7 +1152,7 @@ VLCView::MouseMoved(BPoint point, uint32 transit, const BMessage* dragMessage)
     var_Set( p_vout, "mouse-x", val );
     val.i_int = ( (int)point.y - i_y ) * p_vout->render.i_height / i_height;
     var_Set( p_vout, "mouse-y", val );
-    val.b_bool = VLC_TRUE;
+    val.b_bool = true;
     var_Set( p_vout, "mouse-moved", val );
 }
 
@@ -1165,7 +1169,7 @@ VLCView::Pulse()
     if (!fCursorHidden)
     {
         if (fCursorInside
-            && mdate() - fLastMouseMovedTime > MOUSE_IDLE_TIMEOUT)
+            && mdate() - fLastMouseMovedTime > fMouseHideTimeout)
         {
             be_app->ObscureCursor();
             fCursorHidden = true;
@@ -1217,7 +1221,7 @@ static void BeosCloseDisplay( vout_thread_t *p_vout );
  *****************************************************************************
  * This function allocates and initializes a BeOS vout method.
  *****************************************************************************/
-int E_(OpenVideo) ( vlc_object_t *p_this )
+int OpenVideo ( vlc_object_t *p_this )
 {
     vout_thread_t * p_vout = (vout_thread_t *)p_this;
 
@@ -1267,8 +1271,6 @@ int Init( vout_thread_t *p_vout )
     p_vout->output.i_chroma = colspace[p_vout->p_sys->p_window->colspace_index].chroma;
     p_vout->p_sys->i_index = 0;
 
-    p_vout->b_direct = 1;
-
     p_vout->output.i_rmask  = 0x00ff0000;
     p_vout->output.i_gmask  = 0x0000ff00;
     p_vout->output.i_bmask  = 0x000000ff;
@@ -1340,7 +1342,7 @@ static int Manage( vout_thread_t * p_vout )
  *****************************************************************************
  * Terminate an output method created by DummyCreateOutputMethod
  *****************************************************************************/
-void E_(CloseVideo) ( vlc_object_t *p_this )
+void CloseVideo ( vlc_object_t *p_this )
 {
     vout_thread_t * p_vout = (vout_thread_t *)p_this;