1 #ifndef COMMONRENDERTHREAD_H
2 #define COMMONRENDERTHREAD_H
5 #include "commonrender.inc"
7 #include "playabletracks.inc"
8 #include "renderengine.inc"
10 #include "virtualnode.inc"
12 // Virtual console runs synchronously for audio and video in
17 VirtualConsole(RenderEngine
*renderengine
,
18 CommonRender
*commonrender
,
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();
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
,
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
,
55 RenderEngine
*renderengine
;
56 CommonRender
*commonrender
;
59 // Total exit nodes. Corresponds to the total playable tracks.
62 // Current exit node being processed. Used to speed up video.
63 int current_exit_node
;
64 // Entry node for each playable track
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;
79 // Store result of total_ring_buffers for destructor
80 // Pull method can't use ring buffers for input.
85 // Trace the rendering path of the 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
106 virtual int stop_rendering(int duplicate
) {};
108 virtual int send_last_output_buffer() {};
111 PlayableTracks
*playable_tracks
;
120 // c-file-style: "linux"