r726: Implementing ability to add textural info to the labels
[cinelerra_cv/mob.git] / cinelerra / virtualconsole.h
blobf1af75e8f19781edbde0b8ac39fe7f8e43f13799
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 entry nodes. Corresponds to the total playable tracks.
60 // Was total_tracks
61 int total_entry_nodes;
62 // Entry node for each playable track
63 // Was toplevel_nodes
64 VirtualNode **entry_nodes;
66 // Exit node for each playable track. Rendering starts here and data is pulled
67 // up the tree. Every virtual module is an exit node.
68 ArrayList<VirtualNode*> exit_nodes;
71 // Order to process nodes
72 // Replaced by pull system
73 // ArrayList<VirtualNode*> render_list;
76 int data_type;
77 // Store result of total_ring_buffers for destructor
78 // Pull method can't use ring buffers for input.
79 // int ring_buffers;
80 // exit conditions
81 int interrupt;
82 int done;
83 // Trace the rendering path of the tree
84 int debug_tree;
97 virtual int init_rendering(int duplicate) {};
98 // Replaced by pull system
99 // int sort_virtual_console();
100 int delete_virtual_console();
102 // Set duplicate when this virtual console is to share the old resources.
103 virtual int stop_rendering(int duplicate) {};
105 virtual int send_last_output_buffer() {};
108 PlayableTracks *playable_tracks;
113 #endif