olaf neophyte and de.po updates, valgrind tweaks, delete green lady, inkscape dpi=96
[goodguy/history.git] / cinelerra-5.1 / cinelerra / pluginserver.h
index 03e9d924198d5dbca7823e4ec8e541f2f3b6f7e1..36447603bb0e1c0ad2f595d04e428be035e1a7f2 100644 (file)
@@ -2,21 +2,21 @@
 /*
  * CINELERRA
  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
- * 
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- * 
+ *
  */
 
 #ifndef PLUGINSERVER_H
@@ -87,7 +87,7 @@ class PluginServer
 
 // Base class created by client
        PluginClient *client;
-// If no path, this is going to be set to a function which 
+// If no path, this is going to be set to a function which
 // instantiates the plugin.
        PluginClient* (*new_plugin)(PluginServer*);
 
@@ -95,6 +95,7 @@ class PluginServer
        int lad_index;
        LADSPA_Descriptor_Function lad_descriptor_function;
        const LADSPA_Descriptor *lad_descriptor;
+
        int use_opengl;
 // FFMPEG support
        const char *ff_name;
@@ -102,7 +103,7 @@ class PluginServer
        VideoDevice *vdevice;
 public:
        PluginServer();
-       PluginServer(MWindow *mwindow, char *path, int type);
+       PluginServer(MWindow *mwindow, const char *path, int type);
        PluginServer(PluginServer &);
        virtual ~PluginServer();
 
@@ -124,9 +125,9 @@ public:
        int open_plugin(int master, Preferences *preferences,
                        EDL *edl, Plugin *plugin);
 // close the plugin
-       int close_plugin();    
-       int get_theme_png_path(char *png_path, const char *theme_dir);
-       int get_theme_png_path(char *png_path, Theme *theme);
+       int close_plugin();
+       void get_plugin_png_name(char *png_name);
+       int get_plugin_png_path(char *png_path, const char *plugin_icons);
        int get_plugin_png_path(char *png_path);
        void dump(FILE *fp=stdout);
 // Release any objects which are required after playback stops.
@@ -164,16 +165,22 @@ public:
        VFrame *get_picon();
        VFrame *get_plugin_images();
 
+       int is_unknown();
+       int is_executable();
+       int is_builtin();
+// ffmpeg
+       int is_ffmpeg();
+       PluginClient *new_ffmpeg_plugin();
 // ladspa
        void set_lad_index(int i);
        int get_lad_index();
        int is_ladspa();
-// ffmpeg
-       int is_ffmpeg();
-       PluginClient *new_ffmpeg_plugin();
+// lv2
+       int is_lv2();
+       PluginClient *new_lv2_plugin();
 // =============================== for realtime plugins
 // save configuration of plugin
-       void save_data(KeyFrame *keyframe);          
+       void save_data(KeyFrame *keyframe);
 // Update EDL and playback engines to reflect changes
        void sync_parameters();
 // set for realtime processor usage
@@ -183,7 +190,7 @@ public:
        void raise_window();
 // cause the plugin to show the GUI
 // Called by MWindow::show_plugin
-       void show_gui();          
+       void show_gui();
        void hide_gui();
 // Update GUI with keyframe settings
        void update_gui();
@@ -207,20 +214,20 @@ public:
 // give the buffers and sizes and prepare processing realtime data
        int init_realtime(int realtime_sched,
                int total_in_buffers,
-               int buffer_size);   
+               int buffer_size);
 // process the data in the buffers
 // input - the current edit's data
 // output - the previous edit's data and the destination of the transition output
-// current_position - Position from start of the transition and 
+// current_position - Position from start of the transition and
 //     relative to the transition.
 // total_len - total len for transition
-       void process_transition(VFrame *input, 
-               VFrame *output, 
+       void process_transition(VFrame *input,
+               VFrame *output,
                int64_t current_position,
-               int64_t total_len);  
-       void process_transition(Samples *input, 
+               int64_t total_len);
+       void process_transition(Samples *input,
                Samples *output,
-               int64_t current_position, 
+               int64_t current_position,
                int64_t fragment_size,
                int64_t total_len);
 
@@ -233,7 +240,7 @@ public:
 // total_len - length of plugin in track units relative to the EDL rate
 // Units are kept relative to the EDL rate so plugins don't need to convert rates
 // to get the keyframes.
-       void process_buffer(VFrame **frame, 
+       void process_buffer(VFrame **frame,
                int64_t current_position,
                double frame_rate,
                int64_t total_len,
@@ -258,8 +265,8 @@ public:
 
 
 // set the fragment position of a buffer before rendering
-       int arm_buffer(int buffer_number, 
-                               int64_t in_fragment_position, 
+       int arm_buffer(int buffer_number,
+                               int64_t in_fragment_position,
                                int64_t out_fragment_position,
                                int double_buffer_in,
                                int double_buffer_out);
@@ -279,20 +286,20 @@ public:
 
 
 // Called by client to read data in non-realtime effect
-       int read_frame(VFrame *buffer, 
-               int channel, 
+       int read_frame(VFrame *buffer,
+               int channel,
                int64_t start_position);
-       int read_samples(Samples *buffer, 
-               int channel, 
+       int read_samples(Samples *buffer,
+               int channel,
                int64_t start_position,
                int64_t len);
 
 
-// Called by client to read data in realtime effect.  
+// Called by client to read data in realtime effect.
 // Returns -1 if error or 0 if success.
-       int read_frame(VFrame *buffer, 
-               int channel, 
-               int64_t start_position, 
+       int read_frame(VFrame *buffer,
+               int channel,
+               int64_t start_position,
                double frame_rate,
 // Set to 1 if the reader can use OpenGL objects.
                int use_opengl = 0);
@@ -342,12 +349,12 @@ public:
 
 // buffers
        int64_t out_buffer_size;   // size of a send buffer to the plugin
-       int64_t in_buffer_size;    // size of a recieve buffer from the plugin
+       int64_t in_buffer_size;    // size of a receive buffer from the plugin
        int total_in_buffers;
        int total_out_buffers;
 
 // number of double buffers for each channel
-       ArrayList<int> ring_buffers_in;    
+       ArrayList<int> ring_buffers_in;
        ArrayList<int> ring_buffers_out;
 // Parameters for automation.  Setting autos to 0 disables automation.
        FloatAuto **start_auto, **end_auto;
@@ -373,7 +380,7 @@ public:
 
        int plugin_open;                 // Whether or not the plugin is open.
 // Specifies what type of plugin.
-       int realtime, multichannel, fileio;  
+       int realtime, multichannel, fileio;
 // Plugin generates media
        int synthesis;
 // What data types the plugin can handle.  One of these is set.
@@ -382,9 +389,8 @@ public:
        int uses_gui;
 // Plugin is a transition
        int transition;
-// name of plugin in english.
-// Compared against the title value in the plugin for resolving symbols.
-       char *title;
+// name/tip of plugin
+       char *title, *tip;
        int64_t written_samples, written_frames;
        char *path;           // location of plugin on disk
        char *data_text;      // pointer to the data that was requested by a save_data command