Fixed initialisation of tf in file_open(). Without setting the memory to 0,
[cinelerra_cv/mob.git] / cinelerra / virtualconsole.h
blob51e22422c11a1b62ad463b1a9bb72661e1f63f24
1 #ifndef COMMONRENDERTHREAD_H
2 #define COMMONRENDERTHREAD_H
4 #include "arraylist.h"
5 #include "commonrender.inc"
6 #include "module.inc"
7 #include "playabletracks.inc"
8 #include "renderengine.inc"
9 #include "track.inc"
10 #include "virtualnode.inc"
12 // Virtual console runs synchronously for audio and video in
13 // pull mode.
14 class VirtualConsole
16 public:
17 VirtualConsole(RenderEngine *renderengine,
18 CommonRender *commonrender,
19 int data_type);
20 virtual ~VirtualConsole();
22 virtual void create_objects();
23 virtual void get_playable_tracks();
24 int allocate_input_buffers();
25 virtual void new_input_buffer(int ring_buffer) { };
26 virtual void delete_input_buffer(int ring_buffer) { };
27 void start_playback();
29 // Called during each process buffer operation to reset the status
30 // of the attachments to unprocessed.
31 void reset_attachments();
32 void dump();
35 // Build the nodes
36 void build_virtual_console(int persistent_plugins);
38 // Create a new entry node in subclass of desired type.
39 // was new_toplevel_node
40 virtual VirtualNode* new_entry_node(Track *track,
41 Module *module,
42 int track_number);
43 // Append exit node to table when expansion hits the end of a tree.
44 void append_exit_node(VirtualNode *node);
46 Module* module_of(Track *track);
47 Module* module_number(int track_number);
48 // Test for reconfiguration.
49 // If reconfiguration is coming up, truncate length and reset last_playback.
50 int test_reconfigure(int64_t position,
51 int64_t &length,
52 int &last_playback);
55 RenderEngine *renderengine;
56 CommonRender *commonrender;
59 // Total exit nodes. Corresponds to the total playable tracks.
60 // Was total_tracks
61 int total_exit_nodes;
62 // Current exit node being processed. Used to speed up video.
63 int current_exit_node;
64 // Entry node for each playable track
65 // Was toplevel_nodes
66 VirtualNode **entry_nodes;
68 // Exit node for each playable track. Rendering starts here and data is pulled
69 // up the tree. Every virtual module is an exit node.
70 ArrayList<VirtualNode*> exit_nodes;
73 // Order to process nodes
74 // Replaced by pull system
75 // ArrayList<VirtualNode*> render_list;
78 int data_type;
79 // Store result of total_ring_buffers for destructor
80 // Pull method can't use ring buffers for input.
81 // int ring_buffers;
82 // exit conditions
83 int interrupt;
84 int done;
85 // Trace the rendering path of the tree
86 int debug_tree;
99 virtual int init_rendering(int duplicate) {};
100 // Replaced by pull system
101 // int sort_virtual_console();
102 int delete_virtual_console();
104 // Signal effects to deallocate any resources which must be deallocated
105 // after playback.
106 virtual int stop_rendering(int duplicate) {};
108 virtual int send_last_output_buffer() {};
111 PlayableTracks *playable_tracks;
116 #endif