#include "filexml.h"
#include "floatautos.h"
#include "language.h"
+#include "mainerror.h"
#include "module.h"
#include "patch.h"
#include "plugin.h"
// Clamp to end of transition
int64_t transition_len = 0;
Plugin *transition = get_edl()->tracks->plugin_exists(transition_id);
- if( transition && previous_edit ) {
+ if( transition && transition->on && previous_edit ) {
transition_len = transition->length * sample_rate / edl_rate;
if(direction == PLAY_FORWARD &&
start_position < edit_startproject + transition_len &&
// Read transition into temp and render
- if(transition && previous_edit)
+ if(transition && transition->on && previous_edit)
{
int64_t previous_startproject = previous_edit->startproject *
sample_rate /
{
current_position = start_position - edit_startproject;
}
-
- transition_server->process_transition(
- transition_temp,
- &output,
- current_position,
- transition_fragment_len,
- transition->length);
+ if( transition_server ) {
+ transition_server->process_transition(
+ transition_temp, &output, current_position,
+ transition_fragment_len, transition->length);
+ }
+ else
+ eprintf("missing transition plugin: %s\n", transition->title);
// Reverse output buffer here so transitions always render forward.
if(direction == PLAY_REVERSE)
if(renderengine) {
PluginServer *plugin_server = MWindow::scan_plugindb(transition->title,
track->data_type);
- transition_server = new PluginServer(*plugin_server);
- transition_server->open_plugin(0,
- get_preferences(),
- get_edl(),
- transition);
- transition_server->init_realtime(
- get_edl()->session->real_time_playback &&
- renderengine->command->realtime,
- 1,
- get_buffer_size());
+ if( plugin_server ) {
+ transition_server = new PluginServer(*plugin_server);
+ transition_server->open_plugin(0, get_preferences(), get_edl(),
+ transition);
+ transition_server->init_realtime(
+ get_edl()->session->real_time_playback &&
+ renderengine->command->realtime, 1, get_buffer_size());
+ }
}
else
if(plugin_array) {
PluginServer *plugin_server = MWindow::scan_plugindb(transition->title,
plugin_array->data_type);
- transition_server = new PluginServer(*plugin_server);
- transition_server->open_plugin(0,
- get_preferences(),
- get_edl(),
- transition);
- transition_server->init_realtime(
- 0,
- 1,
- get_buffer_size());
+ if( plugin_server ) {
+ transition_server = new PluginServer(*plugin_server);
+ transition_server->open_plugin(0, get_preferences(), get_edl(),
+ transition);
+ transition_server->init_realtime( 0, 1, get_buffer_size());
+ }
}
}
}
void TrackCanvas::draw_transitions()
{
int64_t x, y, w, h;
+ if( !mwindow->edl->session->auto_conf->transitions ) return;
for(Track *track = mwindow->edl->tracks->first; track; track = track->next) {
if( track->is_hidden() ) continue;
#include "file.h"
#include "filexml.h"
#include "floatautos.h"
+#include "mainerror.h"
#include "maskauto.h"
#include "maskautos.h"
#include "mwindow.h"
pos = Units::to_int64((double)input_position / frame_rate * edl_rate);
if( renderengine->preferences->cache_transitions && !use_cache &&
// cache transitions, not caching and inside transition
- vnext && vnext->transition && file->get_video_length() >= 0 &&
- pos >= vnext->startproject &&
+ vnext && vnext->transition && vnext->transition->on &&
+ file->get_video_length() >= 0 && pos >= vnext->startproject &&
pos < vnext->startproject + vnext->transition->length ) {
file->set_cache_frames(0);
file->set_layer(current_edit->channel);
// (*transition_input), (*transition_input)->get_pbuffer(),
// output, output->get_pbuffer());
+ if( transition_server ) {
// Execute plugin with transition_input and output here
- if( renderengine )
- transition_server->set_use_opengl(use_opengl, renderengine->video);
- transition_server->process_transition((*transition_input), output,
- (direction == PLAY_FORWARD) ?
- (start_position_project - current_edit->startproject) :
- (start_position_project - current_edit->startproject - 1),
- transition->length);
+ if( renderengine )
+ transition_server->set_use_opengl(use_opengl, renderengine->video);
+ transition_server->process_transition((*transition_input), output,
+ (direction == PLAY_FORWARD) ?
+ (start_position_project - current_edit->startproject) :
+ (start_position_project - current_edit->startproject - 1),
+ transition->length);
+ }
+ else
+ eprintf("missing transition plugin: %s\n", transition->title);
}
else {
// Load output buffer