Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

virtualconsole.h

Go to the documentation of this file.
00001 #ifndef COMMONRENDERTHREAD_H
00002 #define COMMONRENDERTHREAD_H
00003 
00004 #include "arraylist.h"
00005 #include "commonrender.inc"
00006 #include "module.inc"
00007 #include "playabletracks.inc"
00008 #include "renderengine.inc"
00009 #include "track.inc"
00010 #include "virtualnode.inc"
00011 
00012 // Virtual console runs synchronously for audio and video in
00013 // pull mode.
00014 class VirtualConsole
00015 {
00016 public:
00017         VirtualConsole(RenderEngine *renderengine, 
00018                 CommonRender *commonrender, 
00019                 int data_type);
00020         virtual ~VirtualConsole();
00021 
00022         virtual void create_objects();
00023         virtual void get_playable_tracks();
00024         int allocate_input_buffers();
00025         virtual void new_input_buffer(int ring_buffer) { };
00026         virtual void delete_input_buffer(int ring_buffer) { };
00027         void start_playback();
00028 
00029 // Called during each process buffer operation to reset the status
00030 // of the attachments to unprocessed.
00031         void VirtualConsole::reset_attachments();
00032         void dump();
00033 
00034 
00035 // Build the nodes
00036         void build_virtual_console(int persistent_plugins);
00037 
00038 // Create a new entry node in subclass of desired type.
00039 // was new_toplevel_node
00040         virtual VirtualNode* new_entry_node(Track *track, 
00041                 Module *module, 
00042                 int track_number);
00043 // Append exit node to table when expansion hits the end of a tree.
00044         void append_exit_node(VirtualNode *node);
00045 
00046         Module* module_of(Track *track);
00047         Module* module_number(int track_number);
00048 // Test for reconfiguration.
00049 // If reconfiguration is coming up, truncate length and reset last_playback.
00050         int test_reconfigure(int64_t position, 
00051                 int64_t &length,
00052                 int &last_playback);
00053 
00054 
00055         RenderEngine *renderengine;
00056         CommonRender *commonrender;
00057 
00058 
00059 // Total entry nodes.  Corresponds to the total playable tracks.
00060 // Was total_tracks
00061         int total_entry_nodes;          
00062 // Entry node for each playable track
00063 // Was toplevel_nodes
00064         VirtualNode **entry_nodes;
00065 
00066 // Exit node for each playable track.  Rendering starts here and data is pulled
00067 // up the tree.  Every virtual module is an exit node.
00068         ArrayList<VirtualNode*> exit_nodes;
00069 
00070 
00071 // Order to process nodes
00072 // Replaced by pull system
00073 //      ArrayList<VirtualNode*> render_list;
00074 
00075 
00076         int data_type;
00077 // Store result of total_ring_buffers for destructor
00078 // Pull method can't use ring buffers for input.
00079 //      int ring_buffers;
00080 // exit conditions
00081         int interrupt;
00082         int done;
00083 // Trace the rendering path of the tree
00084         int debug_tree;
00085 
00086 
00087 
00088 
00089 
00090 
00091 
00092 
00093 
00094 
00095 
00096 
00097         virtual int init_rendering(int duplicate) {};
00098 // Replaced by pull system
00099 //      int sort_virtual_console();
00100         int delete_virtual_console();
00101 
00102 // Set duplicate when this virtual console is to share the old resources.
00103         virtual int stop_rendering(int duplicate) {};
00104 
00105         virtual int send_last_output_buffer() {};
00106 
00107 
00108         PlayableTracks *playable_tracks;
00109 };
00110 
00111 
00112 
00113 #endif

Generated on Sun Jan 8 13:39:02 2006 for Cinelerra-svn by  doxygen 1.4.4