4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 #include "mwindow.inc"
30 #include "videowindowgui.inc"
33 class VideoWindow : public Thread
36 VideoWindow(MWindow *mwindow);
39 void create_objects();
41 int load_defaults(BC_Hash *defaults);
42 int update_defaults(BC_Hash *defaults);
43 int get_aspect_ratio(float &aspect_w, float &aspect_h);
44 int fix_size(int &w, int &h, int width_given, float aspect_ratio);
45 int get_full_sizes(int &w, int &h);
51 int original_size(); // Put the window at its original size
55 int update(BC_Bitmap *frame);
60 BC_Bitmap* get_bitmap(); // get a bitmap for playback
62 // allocated according to playback buffers
66 int video_cropping; // Currently performing a cropping operation
68 int video_window_w; // Horizontal size of the window independant of frame size
69 VFrame **vbuffer; // output frame buffer