]> git.sesse.net Git - vlc/blobdiff - plugins/beos/VideoWindow.h
Fixed the color_space problem. Overlays now work.
[vlc] / plugins / beos / VideoWindow.h
index e39b50831b39c80d8e22e001647d6f0dd104a383..ebcd1ca30e54ca24a5bf9269371f0c9f5f76f9ed 100644 (file)
@@ -2,6 +2,7 @@
  * VideoWindow.h: BeOS video window class prototype
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
+ * $Id: VideoWindow.h,v 1.16 2002/04/01 07:37:53 tcastley Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Tony Castley <tcastley@mail.powerup.com.au>
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
-#include <Slider.h>
-#include <Accelerant.h>
-#include <Bitmap.h>
+#define BITMAP  0
+#define OVERLAY 1
+#define OPENGL  2
+
+typedef struct colorcombo
+{
+       color_space colspace;
+       const char *name;
+       u32 chroma;
+       int planes;
+} colorcombo;
+
+colorcombo colspace[]=
+{
+       {B_YUV422,   "B_YUV422",   FOURCC_Y422, 3},
+       {B_YCbCr422, "B_YCbCr422", FOURCC_YUY2, 3},
+       {B_RGB32,    "B_RGB32",    FOURCC_RV32, 1},
+       {B_RGB16,    "B_RGB16",    FOURCC_RV16, 1}
+};
+
+#define COLOR_COUNT 4
+#define DEFAULT_COL 2
+
 
 class VLCView : public BView
 {
@@ -31,7 +52,8 @@ public:
        VLCView( BRect bounds);
        ~VLCView();
        
-       virtual void MouseDown(BPoint point);
+       void MouseDown(BPoint point);
+       void Draw(BRect updateRect);
 };
 
 
@@ -39,37 +61,35 @@ class VideoWindow : public BWindow
 {
 public:
     // standard constructor and destructor
-    VideoWindow( BRect frame, const char *name,
-                 struct vout_thread_s *p_video_output); 
+    VideoWindow( int v_width, int v_height,
+                 BRect frame); 
     ~VideoWindow();
-
-    // standard window member
-    virtual bool    QuitRequested();
-    virtual void    FrameResized(float width, float height);
-    virtual void    MessageReceived(BMessage *message);
-    virtual void       Zoom(BPoint origin, float width, float height);
-
+    
+    void               Zoom(BPoint origin, float width, float height);
+    void            FrameResized(float width, float height);
+    void            FrameMoved(BPoint origin);
+    void            ScreenChanged(BRect frame, color_space mode);
+    void            drawBuffer(int bufferIndex);
+    void            WindowActivated(bool active);
+    int             SelectDrawingMode(int width, int height);
+    
     // this is the hook controling direct screen connection
-    int32                   i_bytes_per_pixel;
-    int32                   i_screen_depth;
-    struct vout_thread_s   *p_vout;
-     
-    int32           fRowBytes;
-
-    uint32          fNumClipRects;
-
-    int                                i_buffer_index;
-    bool            fDirty;
-    thread_id       fDrawThreadID;
-    BBitmap                    *bitmap[2];
-    VLCView                    *view;
+    int32           i_width;     // incomming bitmap size 
+    int32           i_height;
+    BRect           winSize;     // current window size
+    bool            is_zoomed, vsync;
+    BBitmap            *bitmap[2];
+    BBitmap         *overlaybitmap;
+    VLCView            *view;
+    int             i_buffer;
     bool                       teardownwindow;
-    bool                       is_zoomed;
-    bool                       fUsingOverlay;
+    thread_id       fDrawThreadID;
+    int             mode;
+    int             colspace_index;
 
 private:
-       display_mode old_mode;
-       BRect rect;
+    struct vout_thread_s   *p_vout;
 
 };
 
\ No newline at end of file