channel = 0;
user_title[0] = 0;
nested_edl = 0;
- is_plugin = 0;
is_selected = 0;
hard_left = 0;
hard_right = 0;
}
+Edit& Edit::operator=(Edit& edit)
+{
+//printf("Edit::operator= called\n");
+ copy_from(&edit);
+ return *this;
+}
+
void Edit::synchronize_params(Edit *edit)
{
copy_from(edit);
return result;
}
+int Edit::operator==(Edit &edit)
+{
+ return identical(edit);
+}
+
double Edit::frames_per_picon()
{
return Units::round(picon_w()) / frame_w();
virtual void clone_from(Edit *edit);
// Compare with edit in same EDL
virtual int identical(Edit &edit);
+ virtual Edit& operator=(Edit& edit);
// Called by Edits and PluginSet.
// Compare with edit in different EDL
virtual void equivalent_output(Edit *edit, int64_t *result);
+ virtual int operator==(Edit& edit);
// When inherited by a plugin need to resample keyframes
virtual void synchronize_params(Edit *edit);
// Used by Edits::insert_edits to shift plugin keyframes
virtual void shift_keyframes(int64_t position) {};
+ virtual int is_plugin() { return 0; }
+ virtual int is_transition() { return 0; }
// Get size of frame to draw on timeline
double picon_w();
int group_id;
// User defined title for timeline
char user_title[BCTEXTLEN];
- int is_plugin, is_selected;
+ int is_selected;
// edge cannot be optimized
int hard_left, hard_right;
// title bar color
}
}
+
+Edits& Edits::operator=(Edits& edits)
+{
+printf("Edits::operator= 1\n");
+ copy_from(&edits);
+ return *this;
+}
+
+
void Edits::insert_asset(Asset *asset, EDL *nested_edl,
int64_t length, int64_t position, int track_number)
{
if( is_glitch(next_edit) )
break;
// both edits are silence & not a plugin
- if( !current->is_plugin && current->silence() &&
- !next_edit->is_plugin && next_edit->silence() )
+ if( !current->is_plugin() && current->silence() &&
+ !next_edit->is_plugin() && next_edit->silence() )
break;
// source channels are identical & assets are identical
if( !result && current->channel == next_edit->channel &&
void equivalent_output(Edits *edits, int64_t *result);
virtual void copy_from(Edits *edits);
+ virtual Edits& operator=(Edits& edits);
// Insert edits from different EDL
void insert_edits(Edits *edits,
int64_t position,
Plugin::Plugin(EDL *edl, Track *track, const char *title)
: Edit(edl, track)
{
- is_plugin = 1;
this->track = track;
this->plugin_set = 0;
strcpy(this->title, title);
Plugin::Plugin(EDL *edl, PluginSet *plugin_set, const char *title)
: Edit(edl, plugin_set)
{
- is_plugin = 1;
this->track = plugin_set->track;
this->plugin_set = plugin_set;
strcpy(this->title, title);
delete keyframes;
}
+Edit& Plugin::operator=(Edit& edit)
+{
+ copy_from(&edit);
+ return *this;
+}
+
+Plugin& Plugin::operator=(Plugin& edit)
+{
+ copy_from(&edit);
+ return *this;
+}
+
+int Plugin::operator==(Plugin& that)
+{
+ return identical(&that);
+}
+
+int Plugin::operator==(Edit& that)
+{
+ return identical((Plugin*)&that);
+}
+
int Plugin::silence()
{
return plugin_type == PLUGIN_NONE ? 1 : 0;
const char *title);
virtual ~Plugin();
+ virtual Plugin& operator=(Plugin& edit);
+ virtual Edit& operator=(Edit& edit);
+
// Called by Edits::equivalent_output to override the keyframe behavior and check
// title.
void equivalent_output(Edit *edit, int64_t *result);
// Descends the plugin tree without creating a virtual console.
int is_synthesis(int64_t position, int direction, int depth);
+ virtual int operator==(Plugin& that);
+ virtual int operator==(Edit& that);
+
void init(const char *title,
int64_t unit_position, int64_t unit_length, int plugin_type,
SharedLocation *shared_location, KeyFrame *default_keyframe);
virtual void copy_from(Edit *edit);
+// Called by == operators, Edit::equivalent output
// to test title and keyframe of transition.
virtual int identical(Plugin *that);
virtual void synchronize_params(Edit *edit);
Plugin *plugin = edl->tracks->plugin_exists(plugin_id);
if( !plugin )
keyframe->copy_data(src);
+ else if( plugin->is_transition() )
+ plugin->get_keyframe()->copy_data(src);
else
// Span keyframes
plugin->keyframes->update_parameter(src);
file->tag.set_property("TITLE", title);
file->tag.set_property("LENGTH", length);
file->append_tag();
- if(on)
- {
+ if( on ) {
file->tag.set_title("ON");
file->append_tag();
file->tag.set_title("/ON");
void Transition::load_xml(FileXML *file)
{
- int result = 0;
file->tag.get_property("TITLE", title);
Plugin::fix_plugin_title(title);
length = file->tag.get_property("LENGTH", length);
on = 0;
- do{
- result = file->read_tag();
- if(!result)
- {
- if(file->tag.title_is("/TRANSITION"))
- {
- result = 1;
- }
- else
- if(file->tag.title_is("ON"))
- {
- on = 1;
- }
- else
- if(file->tag.title_is("KEYFRAME"))
- {
- keyframes->default_auto->load(file);;
- }
- }
- }while(!result);
+ while( !file->read_tag() ) {
+ if( file->tag.title_is("/TRANSITION") ) break;
+ if( file->tag.title_is("ON") ) { on = 1; continue; }
+ if( file->tag.title_is("KEYFRAME") )
+ keyframes->default_auto->load(file);;
+ }
}
-
int Transition::popup_transition(int x, int y)
{
// if(mwindow->session->tracks_vertical)
Transition(EDL *edl, Edit *edit, const char *title, long unit_length);
Edit *edit;
-
-
-
void save_xml(FileXML *file);
void load_xml(FileXML *file);
-
-
-
Transition(Transition *that, Edit *edit);
~Transition();
+ int is_transition() { return 1; }
KeyFrame* get_keyframe();
int reset_parameters();
<title></title>
<meta name="generator" content="LibreOffice 5.2.7.2 (Linux)"/>
<meta name="created" content="00:00:00"/>
- <meta name="changed" content="2019-11-18T19:40:27.221227659"/>
+ <meta name="changed" content="2020-02-11T19:40:27.221227659"/>
<style type="text/css">
body,div,table,thead,tbody,tfoot,tr,th,td,p { font-family:"Liberation Sans"; font-size:x-small }