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 entry nodes. Corresponds to the total playable tracks.
61 int total_entry_nodes
;
62 // Entry node for each playable track
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;
77 // Store result of total_ring_buffers for destructor
78 // Pull method can't use ring buffers for input.
83 // Trace the rendering path of the 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
;