r885: Don't delete a borrowed frame.
[cinelerra_cv/ct.git] / cinelerra / videowindow.h
blob8d122f4e87aa499b522134496a906d9cb86158bd
1 #ifndef VIDEOWINDOW_H
2 #define VIDEOWINDOW_H
5 #include "bchash.inc"
6 #include "mwindow.inc"
7 #include "thread.h"
8 #include "vframe.inc"
9 #include "videowindowgui.inc"
12 class VideoWindow : public Thread
14 public:
15 VideoWindow(MWindow *mwindow);
16 ~VideoWindow();
18 int create_objects();
19 int init_window();
20 int load_defaults(BC_Hash *defaults);
21 int update_defaults(BC_Hash *defaults);
22 int get_aspect_ratio(float &aspect_w, float &aspect_h);
23 int fix_size(int &w, int &h, int width_given, float aspect_ratio);
24 int get_full_sizes(int &w, int &h);
25 void run();
27 int show_window();
28 int hide_window();
29 int resize_window();
30 int original_size(); // Put the window at its original size
31 int reset();
32 int init_video();
33 int stop_video();
34 int update(BC_Bitmap *frame);
35 int get_w();
36 int get_h();
37 int start_cropping();
38 int stop_cropping();
39 BC_Bitmap* get_bitmap(); // get a bitmap for playback
41 // allocated according to playback buffers
42 float **peak_history;
44 int video_visible;
45 int video_cropping; // Currently performing a cropping operation
46 // float zoom_factor;
47 int video_window_w; // Horizontal size of the window independant of frame size
48 VFrame **vbuffer; // output frame buffer
49 VideoWindowGUI *gui;
50 MWindow *mwindow;
57 #endif