+VideoWindow::VideoWindow( int width, int height,
+ vout_thread_t *p_video_output )
+{
+ if ( BDirectWindow::SupportsWindowMode() )
+ {
+ voutWindow = new directWindow( BRect( 80, 50,
+ 80 + width, 50 + height ), this );
+ }
+ else
+ {
+ voutWindow = new bitmapWindow( BRect( 80, 50,
+ 80 + width, 50 + height ), this );
+ }
+
+ /* set the VideoWindow variables */
+ teardownwindow = false;
+
+ /* create the view to do the display */
+ view = new VLCView( voutWindow->Bounds() );
+ voutWindow->AddChild(view);
+
+ /* Bitmap mode overlay not available, set the system to 32bits
+ * and let BeOS do all the work */
+ bitmap[0] = new BBitmap( voutWindow->Bounds(), B_RGB32);
+ bitmap[1] = new BBitmap( voutWindow->Bounds(), B_RGB32);
+ memset(bitmap[0]->Bits(), 0, bitmap[0]->BitsLength());
+ memset(bitmap[1]->Bits(), 0, bitmap[1]->BitsLength());
+
+ i_width = bitmap[0]->Bounds().IntegerWidth();
+ i_height = bitmap[0]->Bounds().IntegerHeight();
+
+ voutWindow->Show();
+}