* 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
{
VLCView( BRect bounds);
~VLCView();
- virtual void MouseDown(BPoint point);
+ void MouseDown(BPoint point);
+ void Draw(BRect updateRect);
};
{
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