~akirad/cinecutie/trunk

« back to all changes in this revision

Viewing changes to cinecutie/videowindow.h

  • Committer: Paolo Rampino
  • Date: 2010-02-17 19:46:21 UTC
  • Revision ID: git-v1:c39ff77ffa6ae08441c12e7d7f54e3897ddde7f1
Initial Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/*
 
3
 * CINELERRA
 
4
 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
 
5
 * 
 
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.
 
10
 * 
 
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.
 
15
 * 
 
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
 
19
 * 
 
20
 */
 
21
 
 
22
#ifndef VIDEOWINDOW_H
 
23
#define VIDEOWINDOW_H
 
24
 
 
25
 
 
26
#include "bchash.inc"
 
27
#include "mwindow.inc"
 
28
#include "thread.h"
 
29
#include "vframe.inc"
 
30
#include "videowindowgui.inc"
 
31
 
 
32
 
 
33
class VideoWindow : public Thread
 
34
{
 
35
public:
 
36
        VideoWindow(MWindow *mwindow);
 
37
        ~VideoWindow();
 
38
        
 
39
        int create_objects();
 
40
        int init_window();
 
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);
 
46
        void run();
 
47
 
 
48
        int show_window();
 
49
        int hide_window();
 
50
        int resize_window();
 
51
        int original_size(); // Put the window at its original size
 
52
        int reset();
 
53
        int init_video();
 
54
        int stop_video();
 
55
        int update(BC_Bitmap *frame);
 
56
        int get_w();
 
57
        int get_h();
 
58
        int start_cropping();
 
59
        int stop_cropping();
 
60
        BC_Bitmap* get_bitmap();  // get a bitmap for playback
 
61
 
 
62
// allocated according to playback buffers
 
63
        float **peak_history;
 
64
 
 
65
        int video_visible;
 
66
        int video_cropping;    // Currently performing a cropping operation
 
67
//      float zoom_factor;
 
68
        int video_window_w;    // Horizontal size of the window independant of frame size
 
69
        VFrame **vbuffer;      // output frame buffer
 
70
        VideoWindowGUI *gui;
 
71
        MWindow *mwindow;
 
72
};
 
73
 
 
74
 
 
75
 
 
76
 
 
77
 
 
78
#endif