]> git.sesse.net Git - vlc/blob - modules/gui/beos/VideoWindow.h
* ./modules/*: moved plugins to the new tree. Yet untested builds include
[vlc] / modules / gui / beos / VideoWindow.h
1 /*****************************************************************************
2  * VideoWindow.h: BeOS video window class prototype
3  *****************************************************************************
4  * Copyright (C) 1999, 2000, 2001 VideoLAN
5  * $Id: VideoWindow.h,v 1.1 2002/08/04 17:23:43 sam Exp $
6  *
7  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
8  *          Tony Castley <tcastley@mail.powerup.com.au>
9  *          Richard Shepherd <richard@rshepherd.demon.co.uk>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  * 
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
24  *****************************************************************************/
25 #define BITMAP  0
26 #define OVERLAY 1
27 #define OPENGL  2
28
29 typedef struct colorcombo
30 {
31         color_space colspace;
32         const char *name;
33         u32 chroma;
34         int planes;
35         int pixel_bytes;
36 } colorcombo;
37
38 colorcombo colspace[]=
39 {
40         {B_YCbCr420, "B_YCbCr420", VLC_FOURCC('I','4','2','0'), 3, 2},
41         {B_YUV422,   "B_YUV422",   VLC_FOURCC('Y','4','2','2'), 3, 2},
42         {B_YCbCr422, "B_YCbCr422", VLC_FOURCC('Y','U','Y','2'), 3, 2},
43         {B_RGB32,    "B_RGB32",    VLC_FOURCC('R','V','3','2'), 1, 4},
44         {B_RGB16,    "B_RGB16",    VLC_FOURCC('R','V','1','6'), 1, 2}
45 };
46
47 #define COLOR_COUNT 5
48 #define DEFAULT_COL 4
49
50
51 class VLCView : public BView
52 {
53 public:
54         VLCView( BRect bounds);
55         ~VLCView();
56         
57         void MouseDown(BPoint point);
58         void Draw(BRect updateRect);
59 };
60
61
62 class VideoWindow : public BWindow
63 {
64 public:
65     // standard constructor and destructor
66     VideoWindow( int v_width, int v_height,
67                  BRect frame); 
68     ~VideoWindow();
69     
70     void                Zoom(BPoint origin, float width, float height);
71     void            FrameResized(float width, float height);
72     void            FrameMoved(BPoint origin);
73     void            ScreenChanged(BRect frame, color_space mode);
74     void            drawBuffer(int bufferIndex);
75     void            WindowActivated(bool active);
76     int             SelectDrawingMode(int width, int height);
77     void            MessageReceived(BMessage *message);
78     
79     // this is the hook controling direct screen connection
80     int32           i_width;     // incomming bitmap size 
81     int32           i_height;
82     BRect           winSize;     // current window size
83     bool            is_zoomed, vsync;
84     BBitmap             *bitmap[3];
85     VLCView             *view;
86     int             i_buffer;
87     bool                        teardownwindow;
88     thread_id       fDrawThreadID;
89     int             mode;
90     int             colspace_index;
91
92 private:
93     vout_thread_t  *p_vout;
94
95 };
96
97