add clip_icon svgs, tweak edl frame_align, fixes for plugin_sets in move_group, fix...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / exportedl.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2006 Andraz Tori
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 EXPORTEDL_H
23 #define EXPORTEDL_H
24
25
26 #include "asset.inc"
27 #include "bitspopup.h"
28 #include "browsebutton.h"
29 #include "cache.inc"
30 #include "compresspopup.h"
31 #include "condition.inc"
32 #include "edit.inc"
33 #include "errorbox.inc"
34 #include "file.inc"
35 #include "guicast.h"
36 #include "mutex.inc"
37 #include "mwindow.inc"
38
39 #define EDLTYPE_CMX3600 1
40
41 class ExportEDLPathText;
42 class ExportEDLWindowTrackList;
43 class ExportEDLWindow;
44
45 class ExportEDLAsset
46 {
47 public:
48         ExportEDLAsset(MWindow *mwindow, EDL *edl);
49         ~ExportEDLAsset();
50         // EDL being exported
51         EDL *edl;
52         // path to file
53         char path[BCTEXTLEN];
54         // type of EDL
55         int edl_type;
56
57         // We are currently exporting a track at once
58         int track_number;
59
60
61         void export_it();
62         MWindow *mwindow;
63
64         int load_defaults();
65         int save_defaults();
66 private:
67         int edit_to_timecodes(Edit *edit,
68                 char *sourceinpoint, char *sourceoutpoint,
69                 char *destinpoint, char *destoutpoint,
70                 char *reel_name);
71         void double_to_CMX3600(double seconds, double frame_rate, char *str);
72
73 };
74
75 class ExportEDLItem : public BC_MenuItem
76 {
77 public:
78         ExportEDLItem(MWindow *mwindow);
79         int handle_event();
80         MWindow *mwindow;
81 };
82
83
84
85 class ExportEDL : public Thread
86 {
87 public:
88         ExportEDL(MWindow *mwindow);
89         ~ExportEDL();
90
91         void start_interactive();
92         void run();
93
94
95 // Force filename to have a 0 padded number if rendering to a list.
96
97         MWindow *mwindow;
98 //      Mutex *package_lock, *counter_lock;
99 // Copy of mwindow preferences
100 //      Preferences *preferences;
101 // Total selection to render in seconds
102         double total_start, total_end;
103
104 // Current open RenderWindow
105         ExportEDLWindow *exportedl_window;
106         ExportEDLAsset *exportasset;
107
108 };
109
110
111 class ExportEDLWindow : public BC_Window
112 {
113 public:
114         ExportEDLWindow(MWindow *mwindow, ExportEDL *exportedl, ExportEDLAsset *exportasset);
115         ~ExportEDLWindow();
116
117         void create_objects();
118
119         ExportEDLAsset *exportasset;
120
121         BrowseButton *path_button;
122         ExportEDLPathText *path_textbox;
123         BC_RecentList *path_recent;
124         ExportEDLWindowTrackList *track_list;
125         ArrayList<BC_ListBoxItem*> items_tracks[2];
126         const char *list_titles[2];
127         int list_widths[2];
128
129         MWindow *mwindow;
130 };
131
132
133
134
135
136 class ExportEDLPathText : public BC_TextBox
137 {
138 public:
139         ExportEDLPathText(int x, int y, ExportEDLWindow *window);
140         ~ExportEDLPathText();
141         int handle_event();
142
143         ExportEDLWindow *window;
144 };
145
146 class ExportEDLWindowTrackList : public BC_ListBox
147 {
148 public:
149         ExportEDLWindowTrackList(ExportEDLWindow *window,
150                 int x, int y, int w, int h);
151
152         int handle_event();
153         ExportEDLWindow *window;
154 };
155
156
157
158
159
160
161
162
163
164 #endif