tweak map media vicon popup timeline drag/select
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / pluginarray.h
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 PLUGINARRAY_H
23 #define PLUGINARRAY_H
24
25
26 #include "arraylist.h"
27 #include "cache.inc"
28 #include "edl.inc"
29 #include "file.inc"
30 #include "keyframe.inc"
31 #include "module.inc"
32 #include "mwindow.inc"
33 #include "pluginserver.inc"
34 #include "recordableatracks.inc"
35 #include "track.inc"
36
37
38 #include <stdint.h>
39 // The plugin array does the real work of a non realtime effect.
40
41
42 class PluginArray : public ArrayList<PluginServer*>
43 {
44 public:
45         PluginArray(int data_type);
46         virtual ~PluginArray();
47
48         PluginServer* scan_plugindb(char *title);
49         int start_plugins(MWindow *mwindow,
50                 EDL *edl,
51                 PluginServer *plugin_server,
52                 KeyFrame *keyframe,
53                 int64_t start,
54                 int64_t end,
55                 File *file);
56         int run_plugins();
57         int stop_plugins();
58         virtual void create_modules() {};
59         virtual void create_buffers() {};
60         virtual void get_buffers() {};
61 /*
62  *      virtual void load_module(int module,
63  *              int64_t input_position,
64  *              int64_t len) {};
65  */
66         virtual void process_realtime(int module,
67                 int64_t input_position,
68                 int64_t len) {};
69         virtual int process_loop(int module, int64_t &write_length) { return 0; }
70         virtual int write_buffers(int64_t len) { return 0; }
71         virtual int64_t get_bufsize() { return 0; }
72         virtual int total_tracks() { return 0; }
73         virtual void get_recordable_tracks() {}
74         virtual Track* track_number(int number) { return 0; }
75         virtual int write_samples_derived(int64_t samples_written) { return 0; }
76         virtual int write_frames_derived(int64_t frames_written) { return 0; }
77         virtual int start_plugins_derived() { return 0; }
78         virtual int start_realtime_plugins_derived() { return 0; }
79         virtual int stop_plugins_derived() { return 0; }
80         virtual int render_track(int track, int64_t fragment_len, int64_t position) { return 0; }
81
82         Module **modules;
83         MWindow *mwindow;
84         CICache *cache;
85         EDL *edl;
86         PluginServer *plugin_server;
87         KeyFrame *keyframe;
88 // output file
89         File *file;
90         int64_t buffer_size;
91 // Start and end of segment in units
92         int64_t start, end;
93         int done;
94         int error;
95         int data_type;
96 };
97
98
99
100 #endif