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
);
58 // Called by == operators, Edit::equivalent output
59 // to test title and keyframe of transition.
60 virtual int identical(Plugin
*that
);
61 // Called by render_gui. Only need the track, position, and pluginset
62 // to determine a corresponding GUI.
63 int identical_location(Plugin
*that
);
64 virtual void synchronize_params(Edit
*edit
);
65 // Used by Edits::insert_edits and Plugin::shift to shift plugin keyframes
66 void shift_keyframes(int64_t position
);
68 void change_plugin(char *title
,
69 SharedLocation
*shared_location
,
71 // For synchronizing parameters
72 void copy_keyframes(Plugin
*plugin
);
73 // For copying to clipboard
74 void copy_keyframes(int64_t start
,
79 // For editing automation.
80 // Returns the point to restart background rendering at.
81 // -1 means nothing changed.
82 void clear_keyframes(int64_t start
, int64_t end
);
83 void copy(int64_t start
, int64_t end
, FileXML
*file
);
84 void paste(FileXML
*file
);
85 void load(FileXML
*file
);
87 void shift(int64_t difference
);
89 // Called by PluginClient sequence to get rendering parameters
90 KeyFrame
* get_prev_keyframe(int64_t position
, int direction
);
91 KeyFrame
* get_next_keyframe(int64_t position
, int direction
);
92 // If this is a standalone plugin fill its location in the result.
93 // If it's shared copy the shared location into the result
94 void get_shared_location(SharedLocation
*result
);
95 // Get keyframes for editing with automatic creation if enabled.
96 // The direction is always assumed to be forward.
97 virtual KeyFrame
* get_keyframe();
99 // Calculate title given plugin type. Used by TrackCanvas::draw_plugins
100 void calculate_title(char *string
, int use_nudge
);
101 // Resolve objects pointed to by shared_location
102 Track
* get_shared_track();
103 // Plugin* get_shared_plugin();
105 // Need to resample keyframes
106 void resample(double old_rate
, double new_rate
);
108 // The title of the plugin is stored and not the plugindb entry in case it doesn't exist in the db
109 // Title of the plugin currently attached
110 char title
[BCTEXTLEN
];
112 // In and out aren't used anymore.
115 PluginSet
*plugin_set
;
117 // Data for the plugin is stored here. Default keyframe always exists.
118 // As for storing in PluginSet instead of Plugin:
120 // Each plugin needs a default keyframe of its own.
121 // The keyframes are meaningless except for the plugin they're stored in.
122 // Default keyframe has position = 0.
123 // Other keyframes have absolute position.
124 KeyFrames
*keyframes
;
126 // location of plugin if shared
127 SharedLocation shared_location
;
139 // c-file-style: "linux"