8 #include "keyframe.inc"
9 #include "keyframes.inc"
12 #include "pluginset.inc"
13 #include "pluginpopup.inc"
14 #include "pluginserver.inc"
15 #include "renderengine.inc"
16 #include "sharedlocation.h"
17 #include "virtualnode.inc"
23 // Plugin is inherited by Transition, Plugins
24 class Plugin
: public Edit
27 // Plugin which belongs to a transition.
31 // Called by PluginSet::create_edit, PluginSet::insert_edit_after.
32 // Plugin can't take a track because it would get the edits pointer from
33 // the track instead of the plugin set.
35 PluginSet
*plugin_set
,
39 virtual Plugin
& operator=(Plugin
& edit
);
40 virtual Edit
& operator=(Edit
& edit
);
42 // Called by Edits::equivalent_output to override the keyframe behavior and check
44 void equivalent_output(Edit
*edit
, int64_t *result
);
46 // Called by playable tracks to test for playable server.
47 // Descends the plugin tree without creating a virtual console.
48 int is_synthesis(RenderEngine
*renderengine
,
52 virtual int operator==(Plugin
& that
);
53 virtual int operator==(Edit
& that
);
55 virtual void copy_from(Edit
*edit
);
56 // Called by == operators, Edit::equivalent output
57 // to test title and keyframe of transition.
58 virtual int identical(Plugin
*that
);
59 // Called by render_gui. Only need the track, position, and pluginset
60 // to determine a corresponding GUI.
61 int identical_location(Plugin
*that
);
62 virtual void synchronize_params(Edit
*edit
);
63 // Used by Edits::insert_edits and Plugin::shift to shift plugin keyframes
64 void shift_keyframes(int64_t position
);
66 void change_plugin(char *title
,
67 SharedLocation
*shared_location
,
69 // For synchronizing parameters
70 void copy_keyframes(Plugin
*plugin
);
71 // For copying to clipboard
72 void copy_keyframes(int64_t start
,
77 // For editing automation.
78 // Returns the point to restart background rendering at.
79 // -1 means nothing changed.
80 void clear_keyframes(int64_t start
, int64_t end
);
81 void copy(int64_t start
, int64_t end
, FileXML
*file
);
82 void paste(FileXML
*file
);
83 void load(FileXML
*file
);
85 void shift(int64_t difference
);
87 // Get keyframes for configuring plugin
88 KeyFrame
* get_prev_keyframe(int64_t position
);
89 KeyFrame
* get_next_keyframe(int64_t position
);
90 // If this is a standalone plugin fill its location in the result.
91 // If it's shared copy the shared location into the result
92 void get_shared_location(SharedLocation
*result
);
93 // Get keyframes for editing with automatic creation if enabled
94 virtual KeyFrame
* get_keyframe();
96 // Calculate title given plugin type
97 void calculate_title(char *string
);
98 // Resolve objects pointed to by shared_location
99 Track
* get_shared_track();
100 Plugin
* get_shared_plugin();
102 // Need to resample keyframes
103 void resample(double old_rate
, double new_rate
);
105 // The title of the plugin is stored and not the plugindb entry in case it doesn't exist in the db
106 // Title of the plugin currently attached
107 char title
[BCTEXTLEN
];
109 // In and out aren't used anymore.
112 PluginSet
*plugin_set
;
114 // Data for the plugin is stored here. Default keyframe always exists.
115 // As for storing in PluginSet instead of Plugin:
117 // Each plugin needs a default keyframe of its own.
118 // The keyframes are meaningless except for the plugin they're stored in.
119 // Default keyframe has position = 0.
120 // Other keyframes have absolute position.
121 KeyFrames
*keyframes
;
123 // location of plugin if shared
124 SharedLocation shared_location
;