3 #include "edlsession.h"
5 #include "playabletracks.h"
6 #include "preferences.h"
7 #include "renderengine.h"
9 #include "transportque.h"
11 #include "videodevice.h"
12 #include "virtualvconsole.h"
13 #include "virtualvnode.h"
18 VirtualVConsole::VirtualVConsole(RenderEngine *renderengine, VRender *vrender)
19 : VirtualConsole(renderengine, vrender, TRACK_VIDEO)
21 //printf("VirtualVConsole::VirtualVConsole\n");
22 this->vrender = vrender;
26 VirtualVConsole::~VirtualVConsole()
28 //printf("VirtualVConsole::~VirtualVConsole 1\n");
31 int VirtualVConsole::total_ring_buffers()
36 void VirtualVConsole::get_playable_tracks()
38 //printf("VirtualVConsole::get_playable_tracks 1\n");
40 playable_tracks = new PlayableTracks(renderengine,
41 commonrender->current_position,
45 void VirtualVConsole::new_input_buffer(int ring_buffer)
47 buffer_in = new VFrame*[total_tracks];
48 //printf("VirtualVConsole::new_input_buffer 1\n");
49 for(int i = 0; i < total_tracks; i++)
51 buffer_in[i] = new VFrame(0,
52 playable_tracks->values[i]->track_w,
53 playable_tracks->values[i]->track_h,
54 renderengine->edl->session->color_model,
59 void VirtualVConsole::delete_input_buffer(int ring_buffer)
61 for(int i = 0; i < total_tracks; i++)
68 VirtualNode* VirtualVConsole::new_toplevel_node(Track *track,
72 return new VirtualVNode(renderengine,
78 buffer_in[track_number],
79 buffer_in[track_number],
86 // start of buffer in project if forward / end of buffer if reverse
87 int VirtualVConsole::process_buffer(int64_t input_position)
92 //printf("VirtualVConsole::process_buffer 1\n");
93 // clear output buffers
94 for(i = 0; i < MAX_CHANNELS; i++)
96 if(vrender->video_out[i])
97 vrender->video_out[i]->clear_frame();
100 //printf("VirtualVConsole::process_buffer 2 %d\n", total_tracks);
102 for(i = 0; i < total_tracks; i++)
103 result |= ((VModule*)virtual_modules[i]->real_module)->render(buffer_in[i],
105 renderengine->command->get_direction());
108 //printf("VirtualVConsole::process_buffer 3 %d\n", render_list.total);
109 // render nodes in sorted list
110 for(i = 0; i < render_list.total; i++)
112 ((VirtualVNode*)render_list.values[i])->render(vrender->video_out,
116 //printf("VirtualVConsole::process_buffer 4\n");
136 int VirtualVConsole::init_rendering(int duplicate)
142 int VirtualVConsole::stop_rendering(int duplicate)
148 int VirtualVConsole::send_last_output_buffer()