* VideoWindow.h: BeOS video window class prototype
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: VideoWindow.h,v 1.9 2001/12/06 10:29:40 tcastley Exp $
+ * $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.
*****************************************************************************/
+#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
{
public:
~VLCView();
void MouseDown(BPoint point);
+ void Draw(BRect updateRect);
};
-class VideoWindow
+class VideoWindow : public BWindow
{
public:
// standard constructor and destructor
- VideoWindow( int width, int height,
- struct vout_thread_s *p_video_output);
+ VideoWindow( int v_width, int v_height,
+ BRect frame);
~VideoWindow();
- void resizeIfRequired(int newWidth, int newHeight);
- void drawBuffer(int bufferIndex);
+ 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_width;
+ 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;
- BWindow *voutWindow;
int i_buffer;
bool teardownwindow;
+ thread_id fDrawThreadID;
+ int mode;
+ int colspace_index;
private:
- // display_mode old_mode;
- thread_id fDrawThreadID;
struct vout_thread_s *p_vout;
};
-class bitmapWindow : public BWindow
-{
-public:
- bitmapWindow(BRect frame, VideoWindow *theOwner);
- ~bitmapWindow();
- // standard window member
- virtual void FrameResized(float width, float height);
- virtual void Zoom(BPoint origin, float width, float height);
-private:
- bool is_zoomed;
- BRect origRect;
- VideoWindow *owner;
-};
-
-
-class directWindow : public BDirectWindow
-{
-public:
- // standard constructor and destructor
- directWindow( BRect frame, VideoWindow *theOwner);
- ~directWindow();
-
- // standard window member
- virtual void FrameResized(float width, float height);
- virtual void Zoom(BPoint origin, float width, float height);
- virtual void DirectConnected(direct_buffer_info *info);
-private:
- bool is_zoomed;
- BRect origRect;
- VideoWindow *owner;
-};
+
\ No newline at end of file