bsd lang segv fix, enable bsd lv2, lv2 gui enable fix, proxy/ffmpeg toggle resize...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / recordwindow.C
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 #include "formattools.h"
23 #include "language.h"
24 #include "mwindow.h"
25 #include "mwindowgui.h"
26 #include "record.h"
27 #include "recordwindow.h"
28 #include "videodevice.inc"
29
30 RecordWindow::RecordWindow(MWindow *mwindow, Record *record, int x, int y)
31  : BC_Window(_(PROGRAM_NAME ": Record"),
32         x,
33         y,
34         RECORD_WINDOW_WIDTH,
35         RECORD_WINDOW_HEIGHT,
36         (int)BC_INFINITY,
37         (int)BC_INFINITY,
38         0,
39         0,
40         1)
41 {
42         this->mwindow = mwindow;
43         this->record = record;
44 }
45
46 RecordWindow::~RecordWindow()
47 {
48         delete format_tools;
49 //      delete loadmode;
50 }
51
52
53
54 void RecordWindow::create_objects()
55 {
56 //printf("RecordWindow::create_objects 1\n");
57         add_subwindow(new BC_Title(5, 5, _("Select a file to record to:")));
58
59 //printf("RecordWindow::create_objects 1\n");
60         int x = 5, y = 25;
61         format_tools = new FormatTools(mwindow,
62                                         this,
63                                         record->default_asset);
64 //printf("RecordWindow::create_objects 1\n");
65         format_tools->create_objects(x,
66                                         y,
67                                         1,
68                                         1,
69                                         1,
70                                         1,
71                                         1,
72                                         1,
73                                         /* record->fixed_compression */ 0,
74                                         1,
75                                         0,
76                                         0);
77 //printf("RecordWindow::create_objects 1\n");
78
79 // Not the same as creating a new file at each label.
80 // Load mode is now located in the RecordGUI
81         x = 10;
82 //      loadmode = new LoadMode(this, x, y, &record->load_mode, 1);
83 //      loadmode->create_objects();
84
85         add_subwindow(new BC_OKButton(this));
86 //printf("RecordWindow::create_objects 1\n");
87         add_subwindow(new BC_CancelButton(this));
88 //printf("RecordWindow::create_objects 1\n");
89         show_window();
90 }
91
92
93
94
95
96
97
98 RecordToTracks::RecordToTracks(Record *record, int default_)
99  : BC_CheckBox(200, 270, default_) { this->record = record; }
100 RecordToTracks::~RecordToTracks()
101 {}
102 int RecordToTracks::handle_event()
103 {
104         record->to_tracks = get_value();
105         return 1;
106 }
107