From 0990d32e82b205ee637294c130320cfe997a88b7 Mon Sep 17 00:00:00 2001 From: Good Guy Date: Mon, 14 Nov 2022 16:31:29 -0700 Subject: [PATCH] Credit Andrew for noting unused files --- cinelerra-5.1/cinelerra/RELEASE_NOTES | 35 -- cinelerra-5.1/cinelerra/TODO | 146 ------ cinelerra-5.1/cinelerra/TODO.mine | 168 ------- cinelerra-5.1/cinelerra/TODO.r1027 | 157 ------- cinelerra-5.1/cinelerra/TODO.r1040 | 159 ------- cinelerra-5.1/cinelerra/presets.C.sav | 410 ----------------- cinelerra-5.1/cinelerra/presets.h.sav | 108 ----- cinelerra-5.1/cinelerra/presets.inc.sav | 32 -- cinelerra-5.1/cinelerra/presetsgui.C.sav | 504 --------------------- cinelerra-5.1/cinelerra/presetsgui.C.sav1 | 503 -------------------- cinelerra-5.1/cinelerra/presetsgui.h.sav | 170 ------- cinelerra-5.1/cinelerra/presetsgui.inc.sav | 33 -- cinelerra-5.1/doc/whatsnew_2_1.html | 4 - cinelerra-5.1/mpeg2enc/TODO | 10 - 14 files changed, 2439 deletions(-) delete mode 100644 cinelerra-5.1/cinelerra/RELEASE_NOTES delete mode 100644 cinelerra-5.1/cinelerra/TODO delete mode 100644 cinelerra-5.1/cinelerra/TODO.mine delete mode 100644 cinelerra-5.1/cinelerra/TODO.r1027 delete mode 100644 cinelerra-5.1/cinelerra/TODO.r1040 delete mode 100644 cinelerra-5.1/cinelerra/presets.C.sav delete mode 100644 cinelerra-5.1/cinelerra/presets.h.sav delete mode 100644 cinelerra-5.1/cinelerra/presets.inc.sav delete mode 100644 cinelerra-5.1/cinelerra/presetsgui.C.sav delete mode 100644 cinelerra-5.1/cinelerra/presetsgui.C.sav1 delete mode 100644 cinelerra-5.1/cinelerra/presetsgui.h.sav delete mode 100644 cinelerra-5.1/cinelerra/presetsgui.inc.sav delete mode 100644 cinelerra-5.1/doc/whatsnew_2_1.html delete mode 100644 cinelerra-5.1/mpeg2enc/TODO diff --git a/cinelerra-5.1/cinelerra/RELEASE_NOTES b/cinelerra-5.1/cinelerra/RELEASE_NOTES deleted file mode 100644 index a14d828b..00000000 --- a/cinelerra-5.1/cinelerra/RELEASE_NOTES +++ /dev/null @@ -1,35 +0,0 @@ -1.1.0 - -Titler fonts installed by rpm. -XMovie decodes ac3 according to redesigned liba52 channel mappings. -Quicktime MPEG4 parameters debugged. -Gradient effect. -Background rendering over a renderfarm. -Renderfarm clients automatically reduced to idle priority. -Better MJPA decoding on single processors. -Better title functionality in 16 bit colormodels. -Undo for effect keyframes. -Effect GUI's cleared during undo for effect attachment. -Fewer lockups on startup. -Proper keyframe interpolation in scale effect. -Stamp timecode in titler. -Memory leak in rendering stages removed. -Removed legacy plugin server code. -Downsample video resolution. -Option to generate sequence header in every GOP for MPEG2. -LADSPA support. -Listbox doesn't enter drag_icon state when dragging column division. -Radial, linear, and zoom blur. -Effect rendering bug fixed. -64 bit mpeg transport stream seeking beyond 2 gigs. -More accurate mask drawing when projector is zoomed. -Clear labels updates CWindow -More accurate YUV/RGB conversions. -Histogram. -Perspective. -Import partial tgas -Copy keyframes doesn't copy default keyframe. -Track highlighting offset by vertical scroll. -Multiple video scope, spectrogram, and histogram displays may be opened. -HutSaturation in YUV colorspaces. -Undo for masks. diff --git a/cinelerra-5.1/cinelerra/TODO b/cinelerra-5.1/cinelerra/TODO deleted file mode 100644 index 726163ff..00000000 --- a/cinelerra-5.1/cinelerra/TODO +++ /dev/null @@ -1,146 +0,0 @@ -BIG BUGS ----------------- -Nested EDLs with different colormodels crash. -Effects not getting rendered if multiple effects have random starting times. -Drag effect before timeline is finished drawing after a load -> lockup -Load a sound file. Change the file on the disk. Crash on exit. -Change asset path, CPlayback never returns to redraw the frame. - - - - - - -WISH LIST ----------------- - -Private plugin data storage in the track. - - save_private(position) & load_private(position) calls - - the problem is the playback thread doesn't have access to the timeline EDL - - would need a call to send data back to the timeline EDL -Double click -> select edit -> drag to expand selection by edit -Remove unused files from project and disk. -clear button in error dialog -Option to display full path for assets -custom button bar - - preferences window with possible buttons and current buttons for the 3 main windows - - buttons need different implementations for each window because of locking - - order is fixed - - drag from possible buttons to current buttons to add - - drag from current buttons to possible buttons to remove - - remove icons after dragging out of possible buttons - - prev/next edit - - save - - open - - record - - new - - keyframe straight or curved - - modify labels - - modify effects - - align on frames -undo menu showing previous 20 steps to undo - - or page in resources window -Page in resources window for overlays -Common service for audio and video drivers. - - -time stretch rubber band - - before or after effects - -Music synthesis - - all roads lead to having just audio & video tracks - - asset or effect - -Image synthesis - - asset or effect - - particle system - - track motion of every pixel, determine Z for every pixel - - track motion for successively smaller macroblocks - - synthesize picture using cubes and compare - - - - -rendering, playback, record settings bound to EDL. -histogram parade - either toggle, different plugin, or plugin replacement -editing in place -Apply motion tracking to another effect or mask. - - currently involves matchmoving an alpha multiply track -Denoise from mjpeg tools. - - yuvdeinterlace -Check for output asset being used in project before rendering. -Extended MPEG video support - - need accurate beginning and ending frames - - 1: direct copy of MPEG video frames - - 2: multiplexer settings under audio - - 3: support program stream using mplex and fifos - - support transport stream using makets and fifos for mplex when it supports it - - encode AC3 audio only with video. 6 channel support - -Time average with median. -Remove unused resources function. -Session management -Signal handling for non interactive rendering. -Sound level using readahead buffer. -Asset searches. -Asset organization in subfolders. -Field based reverse video. -Zoomblur transition -Zoom transition - - - - - - - - - - -NOT GOING TO HAPPEN ---------------------- -Hide controls in Record Monitor -Quicktime mp3 needs standards check - - no need for mp3 anymore -Dissolve doesn't work in YUVA OpenGL - - not reproducible -Batch filename not saved from recording dialog if cancelled. - - not reproducible - - - - - - - -Not reproducible ----------------------- -Quit freezes when background rendering is on. - - No quit during slow effect with background rendering. - - Not reproducible. - - - - - - - - - - - -B ------------ -Doesn't support window managers with user placement of windows. -Remember Asset list position. - - - - - - - - -On hold --------------- -Paste non realtime plugins leading to a dialog box. diff --git a/cinelerra-5.1/cinelerra/TODO.mine b/cinelerra-5.1/cinelerra/TODO.mine deleted file mode 100644 index fe68087b..00000000 --- a/cinelerra-5.1/cinelerra/TODO.mine +++ /dev/null @@ -1,168 +0,0 @@ -Big bugs ----------------- -Node framerates not displaying. -Drag effect before timeline is finished drawing after a load -> lockup -Quicktime mp3 needs standards check - - no need for mp3 anymore -Importing assets of the same name but different resolutions crashes because the -formats aren't updated. -Default pan keyframe gets pasted when dragging edit from one track to another. -Undo doesn't restore project title from previous load. - - New file can be saved under old filename if undo is used. - - Current title changes in save function and could not be restored in redo. -Load a sound file. Change the file on the disk. Crash on exit. -Batch filename not saved from recording dialog if cancelled. -TOC progress sometimes doesn't automatically close if not updated at least once. -Labels always edited when concatenating new files to existing tracks. -Need to paste silence when pasting segment from a silent part of a track. -Slow undo updating if many still frames. -Change asset path, CPlayback never returns to redraw the frame. -First toggle between playback window and fullscreen sometimes crashes. -Cursor position is wrong during looped playback -fix AC3 gain problem. -Dissolve doesn't work in YUVA OpenGL - - - - - - -Big Features ----------------- -Documentation - - 2 point motion tracking - - lens - - swap frames -clear button in error dialog -FLAC -WMV 9 & 3 -QDM2 -AVI with AC3 audio has audio ID 0x2000 -Option to display full path for assets -custom button bar - - preferences window with possible buttons and current buttons for the 3 main windows - - buttons need different implementations for each window because of locking - - order is fixed - - drag from possible buttons to current buttons to add - - drag from current buttons to possible buttons to remove - - remove icons after dragging out of possible buttons - - prev/next edit - - save - - open - - record - - new - - keyframe straight or curved -undo menu showing previous 20 steps to undo - - or page in resources window -Page in resources window for overlays -Common service for audio and video drivers. -Embedded sequences - - pulldown menu of sequences - - tabs for sequences - - sequence naming - -time stretch rubber band - - before or after effects - -Music synthesis - - track type, asset or effect - -Image synthesis - - track type, asset or effect - - particle system - - track motion of every pixel, determine Z for every pixel - - track motion for successively smaller macroblocks - - synthesize picture using cubes and compare - -Digital TV - - dump network tuner - - combined tuner driver for audio and video - - channel scan only detects physical number and pids default to 0 - - user adds channels based on physical number - - dialog adds new subchannels as they're detected - - user selects PID's for audio and video in the channel edit dialog - - filters PID's because of image format differences - - software preview of video and audio. - - Maybe audio decoded in the record driver with playback on the playback device. - - - - -rendering, playback, record settings bound to EDL. -histogram parade - either toggle, different plugin, or plugin replacement -editing in place -Apply motion tracking to another effect or mask. - - currently involves matchmoving an alpha multiply track -Denoise from mjpeg tools. - - yuvdeinterlace -Check for output asset being used in project before rendering. -Extended MPEG video support - - need accurate beginning and ending frames - - 1: direct copy of MPEG video frames - - 2: multiplexer settings under audio - - 3: support program stream using mplex and fifos - - support transport stream using makets and fifos for mplex when it supports it - - encode AC3 audio only with video. 6 channel support - -Time average with median. -Remove unused resources function. -Session management -Signal handling for non interactive rendering. -Sound level using readahead buffer. -Asset searches. -Asset organization in subfolders. -Field based reverse video. -Zoomblur transition -Zoom transition - - - - - - - - - - -Not going to happen ---------------------- -Hide controls in Record Monitor - - - - - - - - -Not reproducible ----------------------- -Quit freezes when background rendering is on. - - No quit during slow effect with background rendering. - - Not reproducible. - - - - - - - - - - - -B ------------ -Doesn't support window managers with user placement of windows. -Remember Asset list position. - - - - - - - - -On hold --------------- -Paste non realtime plugins leading to a dialog box. diff --git a/cinelerra-5.1/cinelerra/TODO.r1027 b/cinelerra-5.1/cinelerra/TODO.r1027 deleted file mode 100644 index 0e562d36..00000000 --- a/cinelerra-5.1/cinelerra/TODO.r1027 +++ /dev/null @@ -1,157 +0,0 @@ -Big bugs ----------------- -Node framerates not displaying. -Drag effect before timeline is finished drawing after a load -> lockup -Quicktime mp3 needs standards check - - no need for mp3 anymore -Importing assets of the same name but different resolutions crashes because the -formats aren't updated. -Default pan keyframe gets pasted when dragging edit from one track to another. -Undo doesn't restore project title from previous load. - - New file can be saved under old filename if undo is used. - - Current title changes in save function and could not be restored in redo. -Load a sound file. Change the file on the disk. Crash on exit. -Batch filename not saved from recording dialog if cancelled. -TOC progress sometimes doesn't automatically close if not updated at least once. -Labels always edited when concatenating new files to existing tracks. -Need to paste silence when pasting segment from a silent part of a track. -Slow undo updating if many still frames. -Change asset path, CPlayback never returns to redraw the frame. -First toggle between playback window and fullscreen sometimes crashes. -Cursor position is wrong during looped playback -fix AC3 gain problem. - - - - - - - -Big Features ----------------- -Documentation - - 2 point motion tracking - - lens -FLAC -AVI with AC3 audio has audio ID 0x2000 -Option to display full path for assets -custom button bar - - preferences window with possible buttons and current buttons for the 3 main windows - - order is fixed - - drag from possible buttons to current buttons to add - - drag from current buttons to possible buttons to remove - - remove icons after dragging out of possible buttons - - prev/next edit - - save - - open - - record - - new - - keyframe straight or curved -filebox history should be alphabetical but still deleted based on age - - but File history isn't -undo menu showing previous 20 steps to undo - - page in resources window -Page in resources window for overlays -Common service for audio and video drivers. -time stretch rubber band - - before or after effects - -Music synthesis - - track type, asset or effect - -Image synthesis - - track type, asset or effect - - particle system - - track motion of every pixel, determine Z for every pixel - - track motion for successively smaller macroblocks - -Digital TV - - dump network tuner - - combined tuner driver for audio and video - - channel scan only detects physical number and pids default to 0 - - user adds channels based on physical number - - dialog adds new subchannels as they're detected - - user selects PID's for audio and video in the channel edit dialog - - software preview of video and audio. Maybe decoded in the record driver. - - - - -rendering, playback, record settings bound to EDL. -histogram parade - either toggle, different plugin, or plugin replacement -editing in place -Apply motion tracking to another effect or mask. - - currently involves matchmoving an alpha multiply track -Denoise from mjpeg tools. - - yuvdeinterlace -Check for output asset being used in project before rendering. -Extended MPEG video support - - need accurate beginning and ending frames - - 1: direct copy of MPEG video frames - - 2: multiplexer settings under audio - - 3: support program stream using mplex and fifos - - support transport stream using makets and fifos for mplex when it supports it - - encode AC3 audio only with video. 6 channel support - -Time average with median. -Remove unused resources function. -Session management -Signal handling for non interactive rendering. -Sound level using readahead buffer. -Asset searches. -Asset organization in subfolders. -Field based reverse video. -Zoomblur transition -Zoom transition - - - - - - - - - - -Not going to happen ---------------------- -Hide controls in Record Monitor - - - - - - - - -Not reproducible ----------------------- -Quit freezes when background rendering is on. - - No quit during slow effect with background rendering. - - Not reproducible. - - - - - - - - - - - -B ------------ -Doesn't support window managers with user placement of windows. -Remember Asset list position. - - - - - - - - -On hold --------------- -Paste non realtime plugins leading to a dialog box. diff --git a/cinelerra-5.1/cinelerra/TODO.r1040 b/cinelerra-5.1/cinelerra/TODO.r1040 deleted file mode 100644 index bbfc80fa..00000000 --- a/cinelerra-5.1/cinelerra/TODO.r1040 +++ /dev/null @@ -1,159 +0,0 @@ -Big bugs ----------------- -Node framerates not displaying. -Drag effect before timeline is finished drawing after a load -> lockup -Quicktime mp3 needs standards check - - no need for mp3 anymore -Importing assets of the same name but different resolutions crashes because the -formats aren't updated. -Default pan keyframe gets pasted when dragging edit from one track to another. -Undo doesn't restore project title from previous load. - - New file can be saved under old filename if undo is used. - - Current title changes in save function and could not be restored in redo. -Load a sound file. Change the file on the disk. Crash on exit. -Batch filename not saved from recording dialog if cancelled. -TOC progress sometimes doesn't automatically close if not updated at least once. -Labels always edited when concatenating new files to existing tracks. -Need to paste silence when pasting segment from a silent part of a track. -Slow undo updating if many still frames. -Change asset path, CPlayback never returns to redraw the frame. -First toggle between playback window and fullscreen sometimes crashes. -Cursor position is wrong during looped playback -fix AC3 gain problem. - - - - - - - -Big Features ----------------- -Embedded sequences -Documentation - - 2 point motion tracking - - lens -FLAC -Tilter should be baking on a transparent layer and applying alpha to that layer in a second pass. -AVI with AC3 audio has audio ID 0x2000 -Option to display full path for assets -custom button bar - - preferences window with possible buttons and current buttons for the 3 main windows - - order is fixed - - drag from possible buttons to current buttons to add - - drag from current buttons to possible buttons to remove - - remove icons after dragging out of possible buttons - - prev/next edit - - save - - open - - record - - new - - keyframe straight or curved -filebox history should be alphabetical but still deleted based on age - - but File history isn't -undo menu showing previous 20 steps to undo - - page in resources window -Page in resources window for overlays -Common service for audio and video drivers. -time stretch rubber band - - before or after effects - -Music synthesis - - track type, asset or effect - -Image synthesis - - track type, asset or effect - - particle system - - track motion of every pixel, determine Z for every pixel - - track motion for successively smaller macroblocks - -Digital TV - - dump network tuner - - combined tuner driver for audio and video - - channel scan only detects physical number and pids default to 0 - - user adds channels based on physical number - - dialog adds new subchannels as they're detected - - user selects PID's for audio and video in the channel edit dialog - - software preview of video and audio. Maybe decoded in the record driver. - - - - -rendering, playback, record settings bound to EDL. -histogram parade - either toggle, different plugin, or plugin replacement -editing in place -Apply motion tracking to another effect or mask. - - currently involves matchmoving an alpha multiply track -Denoise from mjpeg tools. - - yuvdeinterlace -Check for output asset being used in project before rendering. -Extended MPEG video support - - need accurate beginning and ending frames - - 1: direct copy of MPEG video frames - - 2: multiplexer settings under audio - - 3: support program stream using mplex and fifos - - support transport stream using makets and fifos for mplex when it supports it - - encode AC3 audio only with video. 6 channel support - -Time average with median. -Remove unused resources function. -Session management -Signal handling for non interactive rendering. -Sound level using readahead buffer. -Asset searches. -Asset organization in subfolders. -Field based reverse video. -Zoomblur transition -Zoom transition - - - - - - - - - - -Not going to happen ---------------------- -Hide controls in Record Monitor - - - - - - - - -Not reproducible ----------------------- -Quit freezes when background rendering is on. - - No quit during slow effect with background rendering. - - Not reproducible. - - - - - - - - - - - -B ------------ -Doesn't support window managers with user placement of windows. -Remember Asset list position. - - - - - - - - -On hold --------------- -Paste non realtime plugins leading to a dialog box. diff --git a/cinelerra-5.1/cinelerra/presets.C.sav b/cinelerra-5.1/cinelerra/presets.C.sav deleted file mode 100644 index d97dfb2b..00000000 --- a/cinelerra-5.1/cinelerra/presets.C.sav +++ /dev/null @@ -1,410 +0,0 @@ - -/* - * CINELERRA - * Copyright (C) 2008 Adam Williams - * - * 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 - * - */ - -#include "bcsignals.h" -#include "bcwindowbase.inc" -#include "cstrdup.h" -#include "file.h" -#include "filesystem.h" -#include "filexml.h" -#include "keyframe.h" -#include "messages.inc" -#include "mwindow.h" -#include "pluginserver.h" -#include "preferences.inc" -#include "presets.h" - -#include -#include - -PresetsDB::PresetsDB() -{ -} - - -void PresetsDB::clear() -{ - plugins.remove_all_objects(); -} - -void PresetsDB::load() -{ - clear(); - - FileXML file; - char path[BCTEXTLEN]; - char string[BCTEXTLEN]; - sprintf(path, "%s/%s", File::get_config_path(), PRESETS_FILE); - FileSystem fs; - fs.complete_path(path); - file.read_from_file(path); - int result = 0; - - do - { - result = file.read_tag(); - if(!result) - { - if(file.tag.title_is("PLUGIN")) - { - PresetsDBPlugin *plugin = 0; - sprintf(string, "Unknown"); - const char *title = file.tag.get_property("TITLE", string); - -// Search for existing plugin - for(int i = 0; i < plugins.size(); i++) - { - if(!strcasecmp(plugins.get(i)->title, title)) - { - plugin = plugins.get(i); - break; - } - } - -// Create new plugin - if(!plugin) - { - plugin = new PresetsDBPlugin(title); - plugins.append(plugin); - } - - plugin->load(&file); - } - } - }while(!result); -} - -void PresetsDB::save() -{ - FileXML file; - for(int i = 0; i < plugins.size(); i++) - { - PresetsDBPlugin *plugin = plugins.get(i); - plugin->save(&file); - } - file.terminate_string(); - - char path[BCTEXTLEN]; - sprintf(path, "%s/%s", File::get_config_path(), PRESETS_FILE); - FileSystem fs; - fs.complete_path(path); - file.write_to_file(path); -} - - -int PresetsDB::get_total_presets(char *plugin_title) -{ - for(int i = 0; i < plugins.size(); i++) - { - PresetsDBPlugin *plugin = plugins.get(i); - if(!strcasecmp(plugin->title, plugin_title)) - { - return plugin->keyframes.size(); - } - } - - return 0; -} - -char* PresetsDB::get_preset_title(char *plugin_title, int number) -{ - for(int i = 0; i < plugins.size(); i++) - { - PresetsDBPlugin *plugin = plugins.get(i); - if(!strcasecmp(plugin->title, plugin_title)) - { - if(number < plugin->keyframes.size()) - { - return plugin->keyframes.get(number)->title; - } - else - { - printf("PresetsDB::get_preset_title %d buffer overrun\n", __LINE__); - } - break; - } - } - return 0; -} - -char* PresetsDB::get_preset_data(char *plugin_title, int number) -{ - for(int i = 0; i < plugins.size(); i++) - { - PresetsDBPlugin *plugin = plugins.get(i); - if(!strcasecmp(plugin->title, plugin_title)) - { - if(number < plugin->keyframes.size()) - { - return plugin->keyframes.get(number)->data; - } - else - { - printf("PresetsDB::get_preset_data %d buffer overrun\n", __LINE__); - } - break; - } - } - return 0; -} - -PresetsDBPlugin* PresetsDB::get_plugin(const char *plugin_title) -{ - for(int i = 0; i < plugins.size(); i++) - { - PresetsDBPlugin *plugin = plugins.get(i); - if(!strcasecmp(plugin->title, plugin_title)) - { - return plugin; - } - } - return 0; -} - -PresetsDBPlugin* PresetsDB::new_plugin(const char *plugin_title) -{ - PresetsDBPlugin *result = new PresetsDBPlugin(plugin_title); - plugins.append(result); - return result; -} - - -void PresetsDB::save_preset(const char *plugin_title, const char *preset_title, char *data) -{ - PresetsDBPlugin *plugin = get_plugin(plugin_title); - if(!plugin) plugin = new_plugin(plugin_title); - PresetsDBKeyframe *keyframe = plugin->get_keyframe(preset_title); - if(!keyframe) keyframe = plugin->new_keyframe(preset_title); - keyframe->set_data(data); - save(); - -} - - -void PresetsDB::delete_preset(const char *plugin_title, const char *preset_title) -{ - PresetsDBPlugin *plugin = get_plugin(plugin_title); - if(plugin) - { - plugin->delete_keyframe(preset_title); - } - save(); -} - -void PresetsDB::load_preset(const char *plugin_title, const char *preset_title, KeyFrame *keyframe) -{ - PresetsDBPlugin *plugin = get_plugin(plugin_title); - if(plugin) - { - plugin->load_preset(preset_title, keyframe); - } -} - -int PresetsDB::preset_exists(const char *plugin_title, const char *preset_title) -{ - PresetsDBPlugin *plugin = get_plugin(plugin_title); - if(plugin) - { - return plugin->preset_exists(preset_title); - } - return 0; -} - - - - -PresetsDBKeyframe::PresetsDBKeyframe(const char *title) -{ - this->title = cstrdup(title); - data = 0; -} - -PresetsDBKeyframe::~PresetsDBKeyframe() -{ - delete [] title; - delete [] data; -} - -void PresetsDBKeyframe::set_data(char *data) -{ - delete [] this->data; - this->data = cstrdup(data); -} - - - -PresetsDBPlugin::PresetsDBPlugin(const char *title) -{ - this->title = cstrdup(title); -} - -PresetsDBPlugin::~PresetsDBPlugin() -{ - keyframes.remove_all_objects(); - delete [] title; -} - -void PresetsDBPlugin::load(FileXML *file) -{ - int result = 0; - char string[BCTEXTLEN]; - - do - { - result = file->read_tag(); - if(!result) - { - if(file->tag.title_is("/PLUGIN")) break; - else - if(file->tag.title_is("KEYFRAME")) - { - sprintf(string, "Unknown"); - const char *keyframe_title = file->tag.get_property("TITLE", string); - PresetsDBKeyframe *keyframe = new PresetsDBKeyframe(keyframe_title); - - char data[MESSAGESIZE]; - int len = file->read_data_until("/KEYFRAME", data, MESSAGESIZE-1); - data[len] = 0; - keyframe->set_data(data); - keyframes.append(keyframe); - - } - } - }while(!result); - - -} - -void PresetsDBPlugin::save(FileXML *file) -{ - file->tag.set_title("PLUGIN"); - file->tag.set_property("TITLE", title); - file->append_tag(); - file->append_newline(); - - for(int j = 0; j < keyframes.size(); j++) - { - PresetsDBKeyframe *keyframe = keyframes.get(j); - file->tag.set_title("KEYFRAME"); - file->tag.set_property("TITLE", keyframe->title); - file->append_tag(); - file->append_text(keyframe->data); - file->tag.set_title("/KEYFRAME"); - file->append_tag(); - file->append_newline(); - } - - file->tag.set_title("/PLUGIN"); - file->append_tag(); - file->append_newline(); -} - -PresetsDBKeyframe* PresetsDBPlugin::get_keyframe(const char *title) -{ - for(int i = 0; i < keyframes.size(); i++) - { - PresetsDBKeyframe *keyframe = keyframes.get(i); - if(!strcasecmp(keyframe->title, title)) return keyframe; - } - return 0; -} - -void PresetsDBPlugin::delete_keyframe(const char *title) -{ - for(int i = 0; i < keyframes.size(); i++) - { - PresetsDBKeyframe *keyframe = keyframes.get(i); - if(!strcasecmp(keyframe->title, title)) - { - keyframes.remove_object_number(i); - return; - } - } -} - - -PresetsDBKeyframe* PresetsDBPlugin::new_keyframe(const char *title) -{ - PresetsDBKeyframe *keyframe = new PresetsDBKeyframe(title); - keyframes.append(keyframe); - return keyframe; -} - -void PresetsDBPlugin::load_preset(const char *preset_title, KeyFrame *keyframe) -{ - PresetsDBKeyframe *src = get_keyframe(preset_title); - if(src) - { - keyframe->set_data(src->data); -// Save as the plugin's default -// Need the path -//printf("PresetsDBPlugin::load_preset %d %s\n", __LINE__, title); - PluginServer *server = MWindow::scan_plugindb(title, -1); - if(!server) - { - } - else - { - char path[BCTEXTLEN]; - server->get_defaults_path(path); - FileSystem fs; - fs.complete_path(path); - - FILE *fd = fopen(path, "w"); - if(fd) - { - if(!fwrite(src->data, strlen(src->data), 1, fd)) - { - fprintf(stderr, "PresetsDBPlugin::load_preset %d \"%s\": %s\n", - __LINE__, - path, - strerror(errno)); - } - - fclose(fd); - } - else - { - fprintf(stderr, "PresetsDBPlugin::load_preset %d \"%s\": %s\n", - __LINE__, - path, - strerror(errno)); - } - } - } -} - -int PresetsDBPlugin::preset_exists(const char *preset_title) -{ - PresetsDBKeyframe *src = get_keyframe(preset_title); - if(src) - { - return 1; - } - return 0; -} - - - - - - - diff --git a/cinelerra-5.1/cinelerra/presets.h.sav b/cinelerra-5.1/cinelerra/presets.h.sav deleted file mode 100644 index 99d3c10b..00000000 --- a/cinelerra-5.1/cinelerra/presets.h.sav +++ /dev/null @@ -1,108 +0,0 @@ - -/* - * CINELERRA - * Copyright (C) 2008 Adam Williams - * - * 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 PRESETS_H -#define PRESETS_H - - -#include "arraylist.h" -#include "filexml.inc" -#include "keyframe.inc" - - -// Front end for a DB of presets for all plugins - -// A single preset -class PresetsDBKeyframe -{ -public: - PresetsDBKeyframe(const char *title); - ~PresetsDBKeyframe(); - - void set_data(char *data); - - char *title; - char *data; -}; - -// Presets for a single plugin -class PresetsDBPlugin -{ -public: - PresetsDBPlugin(const char *title); - ~PresetsDBPlugin(); - - - void load(FileXML *file); - void save(FileXML *file); - -// Get a preset by name - PresetsDBKeyframe* get_keyframe(const char *title); -// Create a new keyframe - PresetsDBKeyframe* new_keyframe(const char *title); - void delete_keyframe(const char *title); -// Load a preset into the keyframe - void load_preset(const char *preset_title, KeyFrame *keyframe); - int preset_exists(const char *preset_title); - - ArrayList keyframes; - char *title; -}; - -class PresetsDB -{ -public: - PresetsDB(); - -// Load the database from the file. - void load(); -// Save the database to the file. - void save(); - -// Get the total number of presets for a plugin - int get_total_presets(char *plugin_title); -// Get the title of a preset - char* get_preset_title(char *plugin_title, int number); -// Get the data for a preset - char* get_preset_data(char *plugin_title, int number); -// Get a pluginDB by name - PresetsDBPlugin* get_plugin(const char *plugin_title); -// Create a pluginDB - PresetsDBPlugin* new_plugin(const char *plugin_title); - void save_preset(const char *plugin_title, const char *preset_title, char *data); - void delete_preset(const char *plugin_title, const char *preset_title); -// Load a preset into the keyframe - void load_preset(const char *plugin_title, const char *preset_title, KeyFrame *keyframe); - int preset_exists(const char *plugin_title, const char *preset_title); - -private: -// Remove all plugin data - void clear(); - - ArrayList plugins; -}; - - - -#endif - - - diff --git a/cinelerra-5.1/cinelerra/presets.inc.sav b/cinelerra-5.1/cinelerra/presets.inc.sav deleted file mode 100644 index 3718d19a..00000000 --- a/cinelerra-5.1/cinelerra/presets.inc.sav +++ /dev/null @@ -1,32 +0,0 @@ - -/* - * CINELERRA - * Copyright (C) 2008 Adam Williams - * - * 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 PRESETS_INC -#define PRESETS_INC - - -class PresetsDB; - -#endif - - - - diff --git a/cinelerra-5.1/cinelerra/presetsgui.C.sav b/cinelerra-5.1/cinelerra/presetsgui.C.sav deleted file mode 100644 index 48abf86f..00000000 --- a/cinelerra-5.1/cinelerra/presetsgui.C.sav +++ /dev/null @@ -1,504 +0,0 @@ - -/* - * CINELERRA - * Copyright (C) 2008 Adam Williams - * - * 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 - * - */ - -#if 0 - - - - -#include "edl.h" -#include "keyframe.h" -#include "keys.h" -#include "language.h" -#include "localsession.h" -#include "mainsession.h" -#include "mainundo.h" -#include "mwindow.h" -#include "mwindowgui.h" -#include "plugin.h" -#include "presets.h" -#include "presetsgui.h" -#include "theme.h" -#include "trackcanvas.h" -#include "tracks.h" - - - - - - - - - - - -PresetsThread::PresetsThread(MWindow *mwindow) - : BC_DialogThread() -{ - this->mwindow = mwindow; - plugin = 0; - data = new ArrayList; - presets_db = new PresetsDB; - plugin_title[0] = 0; - window_title[0] = 0; -} - -PresetsThread::~PresetsThread() -{ - close_window(); - delete data; -} - -void PresetsThread::calculate_list() -{ - data->remove_all_objects(); - int total_presets = presets_db->get_total_presets(plugin_title); - for(int i = 0; i < total_presets; i++) - { - data->append(new BC_ListBoxItem(presets_db->get_preset_title( - plugin_title, - i))); - } -} - - -void PresetsThread::start_window(Plugin *plugin) -{ - if(!BC_DialogThread::is_running()) - { - this->plugin = plugin; - plugin->calculate_title(plugin_title, 0); - sprintf(window_title, _(PROGRAM_NAME ": %s Presets"), plugin_title); - - -// Calculate database - presets_db->load(); - calculate_list(); - - - mwindow->gui->unlock_window(); - BC_DialogThread::start(); - mwindow->gui->lock_window("PresetsThread::start_window"); - } -} - -BC_Window* PresetsThread::new_gui() -{ - mwindow->gui->lock_window("PresetsThread::new_gui"); - int x = mwindow->gui->get_abs_cursor_x(0) - - mwindow->session->plugindialog_w / 2; - int y = mwindow->gui->get_abs_cursor_y(0) - - mwindow->session->plugindialog_h / 2; - - PresetsWindow *window = new PresetsWindow(mwindow, - this, - x, - y, - window_title); - - window->create_objects(); - mwindow->gui->unlock_window(); - return window; -} - -void PresetsThread::handle_done_event(int result) -{ -// Apply the preset - if(!result) - { - char *title = ((PresetsWindow*)get_gui())->title_text->get_text(); - apply_preset(title); - } -} - -void PresetsThread::handle_close_event(int result) -{ -} - -void PresetsThread::save_preset(char *title) -{ - get_gui()->unlock_window(); - mwindow->gui->lock_window("PresetsThread::save_preset"); - -// Test EDL for plugin existence - if(!mwindow->edl->tracks->plugin_exists(plugin)) - { - mwindow->gui->unlock_window(); - get_gui()->lock_window("PresetsThread::save_preset 2"); - return; - } - - -// Get current plugin keyframe - EDL *edl = mwindow->edl; - Track *track = plugin->track; - KeyFrame *keyframe = plugin->get_prev_keyframe( - track->to_units(edl->local_session->get_selectionstart(1), 0), - PLAY_FORWARD); - -// Send to database - presets_db->save_preset(plugin_title, title, keyframe->get_data()); - - mwindow->gui->unlock_window(); - get_gui()->lock_window("PresetsThread::save_preset 2"); - - -// Update list - calculate_list(); - ((PresetsWindow*)get_gui())->list->update(data, - 0, - 0, - 1); -} - -void PresetsThread::delete_preset(char *title) -{ - get_gui()->unlock_window(); - mwindow->gui->lock_window("PresetsThread::save_preset"); - -// Test EDL for plugin existence - if(!mwindow->edl->tracks->plugin_exists(plugin)) - { - mwindow->gui->unlock_window(); - get_gui()->lock_window("PresetsThread::delete_preset 1"); - return; - } - - presets_db->delete_preset(plugin_title, title); - - mwindow->gui->unlock_window(); - get_gui()->lock_window("PresetsThread::delete_preset 2"); - - -// Update list - calculate_list(); - ((PresetsWindow*)get_gui())->list->update(data, - 0, - 0, - 1); -} - - -void PresetsThread::apply_preset(char *title) -{ - if(presets_db->preset_exists(plugin_title, title)) - { - get_gui()->unlock_window(); - mwindow->gui->lock_window("PresetsThread::apply_preset"); - -// Test EDL for plugin existence - if(!mwindow->edl->tracks->plugin_exists(plugin)) - { - mwindow->gui->unlock_window(); - get_gui()->lock_window("PresetsThread::delete_preset 1"); - return; - } - - mwindow->undo->update_undo_before(); - KeyFrame *keyframe = plugin->get_keyframe(); - presets_db->load_preset(plugin_title, title, keyframe); - mwindow->save_backup(); - mwindow->undo->update_undo_after(_("apply preset"), LOAD_AUTOMATION); - - mwindow->update_plugin_guis(); - mwindow->gui->canvas->draw_overlays(); - mwindow->gui->canvas->flash(); - mwindow->sync_parameters(CHANGE_PARAMS); - - mwindow->gui->unlock_window(); - get_gui()->lock_window("PresetsThread::apply_preset"); - } -} - - - - - -PresetsList::PresetsList(PresetsThread *thread, - PresetsWindow *window, - int x, - int y, - int w, - int h) - : BC_ListBox(x, - y, - w, - h, - LISTBOX_TEXT, - thread->data) -{ - this->thread = thread; - this->window = window; -} - -int PresetsList::selection_changed() -{ - window->title_text->update( - thread->data->get(get_selection_number(0, 0))->get_text()); - return 0; -} - -int PresetsList::handle_event() -{ - window->set_done(0); - return 0; -} - - - - - - - - - - -PresetsText::PresetsText(PresetsThread *thread, - PresetsWindow *window, - int x, - int y, - int w) - : BC_TextBox(x, - y, - w, - 1, - "") -{ - this->thread = thread; - this->window = window; -} - -int PresetsText::handle_event() -{ - return 0; -} - - - - - - - - - - - - - - - - - -PresetsDelete::PresetsDelete(PresetsThread *thread, - PresetsWindow *window, - int x, - int y) - : BC_GenericButton(x, y, _("Delete")) -{ - this->thread = thread; - this->window = window; -} - -int PresetsDelete::handle_event() -{ - thread->delete_preset(window->title_text->get_text()); - return 1; -} - - - - - - - -PresetsSave::PresetsSave(PresetsThread *thread, - PresetsWindow *window, - int x, - int y) -: BC_GenericButton(x, y, _("Save")) -{ - this->thread = thread; - this->window = window; -} - -int PresetsSave::handle_event() -{ - thread->save_preset(window->title_text->get_text()); - return 1; -} - - - - - - - - -PresetsApply::PresetsApply(PresetsThread *thread, - PresetsWindow *window, - int x, - int y) - : BC_GenericButton(x, y, _("Apply")) -{ - this->thread = thread; - this->window = window; -} - -int PresetsApply::handle_event() -{ - thread->apply_preset(window->title_text->get_text()); - return 1; -} - - - -PresetsOK::PresetsOK(PresetsThread *thread, - PresetsWindow *window) - : BC_OKButton(window) -{ - this->thread = thread; - this->window = window; -} - -int PresetsOK::keypress_event() -{ - if(get_keypress() == RETURN) - { -printf("PresetsOK::keypress_event %d\n", __LINE__); - if(thread->presets_db->preset_exists(thread->plugin_title, - window->title_text->get_text())) - { -printf("PresetsOK::keypress_event %d\n", __LINE__); - window->set_done(0); - return 1; - } - else - { -printf("PresetsOK::keypress_event %d\n", __LINE__); - thread->save_preset(window->title_text->get_text()); - return 1; - } - } - return 0; -} - - - - - - - - - - -PresetsWindow::PresetsWindow(MWindow *mwindow, - PresetsThread *thread, - int x, - int y, - char *title_string) - : BC_Window(title_string, - x, y, - mwindow->session->presetdialog_w, - mwindow->session->presetdialog_h, - xS(320), yS(240), 1, 0, 1) -{ - this->mwindow = mwindow; - this->thread = thread; -} - -void PresetsWindow::create_objects() -{ - Theme *theme = mwindow->theme; - - lock_window("PresetsWindow::create_objects"); - theme->get_presetdialog_sizes(this); - - add_subwindow(title1 = new BC_Title(theme->presets_list_x, - theme->presets_list_y - BC_Title::calculate_h(this, "P") - theme->widget_border, - _("Saved presets:"))); - add_subwindow(list = new PresetsList(thread, - this, - theme->presets_list_x, - theme->presets_list_y, - theme->presets_list_w, - theme->presets_list_h)); - add_subwindow(title2 = new BC_Title(theme->presets_text_x, - theme->presets_text_y - BC_Title::calculate_h(this, "P") - theme->widget_border, - _("Preset title:"))); - add_subwindow(title_text = new PresetsText(thread, - this, - theme->presets_text_x, - theme->presets_text_y, - theme->presets_text_w)); - add_subwindow(delete_button = new PresetsDelete(thread, - this, - theme->presets_delete_x, - theme->presets_delete_y)); - add_subwindow(save_button = new PresetsSave(thread, - this, - theme->presets_save_x, - theme->presets_save_y)); - add_subwindow(apply_button = new PresetsApply(thread, - this, - theme->presets_apply_x, - theme->presets_apply_y)); - - add_subwindow(new PresetsOK(thread, this)); - add_subwindow(new BC_CancelButton(this)); - - show_window(); - unlock_window(); -} - -int PresetsWindow::resize_event(int w, int h) -{ - Theme *theme = mwindow->theme; - mwindow->session->presetdialog_w = w; - mwindow->session->presetdialog_h = h; - theme->get_presetdialog_sizes(this); - - title1->reposition_window(theme->presets_list_x, - theme->presets_list_y - BC_Title::calculate_h(this, "P") - theme->widget_border); - title2->reposition_window(theme->presets_text_x, - theme->presets_text_y - BC_Title::calculate_h(this, "P") - theme->widget_border); - list->reposition_window(theme->presets_list_x, - theme->presets_list_y, - theme->presets_list_w, - theme->presets_list_h); - title_text->reposition_window(theme->presets_text_x, - theme->presets_text_y, - theme->presets_text_w); - delete_button->reposition_window(theme->presets_delete_x, - theme->presets_delete_y); - save_button->reposition_window(theme->presets_save_x, - theme->presets_save_y); - apply_button->reposition_window(theme->presets_apply_x, - theme->presets_apply_y); - return 0; -} - - - - - - -#endif - diff --git a/cinelerra-5.1/cinelerra/presetsgui.C.sav1 b/cinelerra-5.1/cinelerra/presetsgui.C.sav1 deleted file mode 100644 index 43c4c39e..00000000 --- a/cinelerra-5.1/cinelerra/presetsgui.C.sav1 +++ /dev/null @@ -1,503 +0,0 @@ - -/* - * CINELERRA - * Copyright (C) 2008 Adam Williams - * - * 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 - * - */ - -#if 0 - - - - -#include "edl.h" -#include "keyframe.h" -#include "keys.h" -#include "language.h" -#include "localsession.h" -#include "mainsession.h" -#include "mainundo.h" -#include "mwindow.h" -#include "mwindowgui.h" -#include "plugin.h" -#include "presets.h" -#include "presetsgui.h" -#include "theme.h" -#include "trackcanvas.h" -#include "tracks.h" - - - - - - - - - - - -PresetsThread::PresetsThread(MWindow *mwindow) - : BC_DialogThread() -{ - this->mwindow = mwindow; - plugin = 0; - data = new ArrayList; - presets_db = new PresetsDB; - plugin_title[0] = 0; - window_title[0] = 0; -} - -PresetsThread::~PresetsThread() -{ - delete data; -} - -void PresetsThread::calculate_list() -{ - data->remove_all_objects(); - int total_presets = presets_db->get_total_presets(plugin_title); - for(int i = 0; i < total_presets; i++) - { - data->append(new BC_ListBoxItem(presets_db->get_preset_title( - plugin_title, - i))); - } -} - - -void PresetsThread::start_window(Plugin *plugin) -{ - if(!BC_DialogThread::is_running()) - { - this->plugin = plugin; - plugin->calculate_title(plugin_title, 0); - sprintf(window_title, PROGRAM_NAME ": %s Presets", plugin_title); - - -// Calculate database - presets_db->load(); - calculate_list(); - - - mwindow->gui->unlock_window(); - BC_DialogThread::start(); - mwindow->gui->lock_window("PresetsThread::start_window"); - } -} - -BC_Window* PresetsThread::new_gui() -{ - mwindow->gui->lock_window("PresetsThread::new_gui"); - int x = mwindow->gui->get_abs_cursor_x(0) - - mwindow->session->plugindialog_w / 2; - int y = mwindow->gui->get_abs_cursor_y(0) - - mwindow->session->plugindialog_h / 2; - - PresetsWindow *window = new PresetsWindow(mwindow, - this, - x, - y, - window_title); - - window->create_objects(); - mwindow->gui->unlock_window(); - return window; -} - -void PresetsThread::handle_done_event(int result) -{ -// Apply the preset - if(!result) - { - char *title = ((PresetsWindow*)get_gui())->title_text->get_text(); - apply_preset(title); - } -} - -void PresetsThread::handle_close_event(int result) -{ -} - -void PresetsThread::save_preset(char *title) -{ - get_gui()->unlock_window(); - mwindow->gui->lock_window("PresetsThread::save_preset"); - -// Test EDL for plugin existence - if(!mwindow->edl->tracks->plugin_exists(plugin)) - { - mwindow->gui->unlock_window(); - get_gui()->lock_window("PresetsThread::save_preset 2"); - return; - } - - -// Get current plugin keyframe - EDL *edl = mwindow->edl; - Track *track = plugin->track; - KeyFrame *keyframe = plugin->get_prev_keyframe( - track->to_units(edl->local_session->get_selectionstart(1), 0), - PLAY_FORWARD); - -// Send to database - presets_db->save_preset(plugin_title, title, keyframe->get_data()); - - mwindow->gui->unlock_window(); - get_gui()->lock_window("PresetsThread::save_preset 2"); - - -// Update list - calculate_list(); - ((PresetsWindow*)get_gui())->list->update(data, - 0, - 0, - 1); -} - -void PresetsThread::delete_preset(char *title) -{ - get_gui()->unlock_window(); - mwindow->gui->lock_window("PresetsThread::save_preset"); - -// Test EDL for plugin existence - if(!mwindow->edl->tracks->plugin_exists(plugin)) - { - mwindow->gui->unlock_window(); - get_gui()->lock_window("PresetsThread::delete_preset 1"); - return; - } - - presets_db->delete_preset(plugin_title, title); - - mwindow->gui->unlock_window(); - get_gui()->lock_window("PresetsThread::delete_preset 2"); - - -// Update list - calculate_list(); - ((PresetsWindow*)get_gui())->list->update(data, - 0, - 0, - 1); -} - - -void PresetsThread::apply_preset(char *title) -{ - if(presets_db->preset_exists(plugin_title, title)) - { - get_gui()->unlock_window(); - mwindow->gui->lock_window("PresetsThread::apply_preset"); - -// Test EDL for plugin existence - if(!mwindow->edl->tracks->plugin_exists(plugin)) - { - mwindow->gui->unlock_window(); - get_gui()->lock_window("PresetsThread::delete_preset 1"); - return; - } - - mwindow->undo->update_undo_before(); - KeyFrame *keyframe = plugin->get_keyframe(); - presets_db->load_preset(plugin_title, title, keyframe); - mwindow->save_backup(); - mwindow->undo->update_undo_after(_("apply preset"), LOAD_AUTOMATION); - - mwindow->update_plugin_guis(); - mwindow->gui->canvas->draw_overlays(); - mwindow->gui->canvas->flash(); - mwindow->sync_parameters(CHANGE_PARAMS); - - mwindow->gui->unlock_window(); - get_gui()->lock_window("PresetsThread::apply_preset"); - } -} - - - - - -PresetsList::PresetsList(PresetsThread *thread, - PresetsWindow *window, - int x, - int y, - int w, - int h) - : BC_ListBox(x, - y, - w, - h, - LISTBOX_TEXT, - thread->data) -{ - this->thread = thread; - this->window = window; -} - -int PresetsList::selection_changed() -{ - window->title_text->update( - thread->data->get(get_selection_number(0, 0))->get_text()); - return 0; -} - -int PresetsList::handle_event() -{ - window->set_done(0); - return 0; -} - - - - - - - - - - -PresetsText::PresetsText(PresetsThread *thread, - PresetsWindow *window, - int x, - int y, - int w) - : BC_TextBox(x, - y, - w, - 1, - "") -{ - this->thread = thread; - this->window = window; -} - -int PresetsText::handle_event() -{ - return 0; -} - - - - - - - - - - - - - - - - - -PresetsDelete::PresetsDelete(PresetsThread *thread, - PresetsWindow *window, - int x, - int y) - : BC_GenericButton(x, y, _("Delete")) -{ - this->thread = thread; - this->window = window; -} - -int PresetsDelete::handle_event() -{ - thread->delete_preset(window->title_text->get_text()); - return 1; -} - - - - - - - -PresetsSave::PresetsSave(PresetsThread *thread, - PresetsWindow *window, - int x, - int y) -: BC_GenericButton(x, y, C_("Save")) -{ - this->thread = thread; - this->window = window; -} - -int PresetsSave::handle_event() -{ - thread->save_preset(window->title_text->get_text()); - return 1; -} - - - - - - - - -PresetsApply::PresetsApply(PresetsThread *thread, - PresetsWindow *window, - int x, - int y) - : BC_GenericButton(x, y, _("Apply")) -{ - this->thread = thread; - this->window = window; -} - -int PresetsApply::handle_event() -{ - thread->apply_preset(window->title_text->get_text()); - return 1; -} - - - -PresetsOK::PresetsOK(PresetsThread *thread, - PresetsWindow *window) - : BC_OKButton(window) -{ - this->thread = thread; - this->window = window; -} - -int PresetsOK::keypress_event() -{ - if(get_keypress() == RETURN) - { -printf("PresetsOK::keypress_event %d\n", __LINE__); - if(thread->presets_db->preset_exists(thread->plugin_title, - window->title_text->get_text())) - { -printf("PresetsOK::keypress_event %d\n", __LINE__); - window->set_done(0); - return 1; - } - else - { -printf("PresetsOK::keypress_event %d\n", __LINE__); - thread->save_preset(window->title_text->get_text()); - return 1; - } - } - return 0; -} - - - - - - - - - - -PresetsWindow::PresetsWindow(MWindow *mwindow, - PresetsThread *thread, - int x, - int y, - char *title_string) - : BC_Window(title_string, - x, y, - mwindow->session->presetdialog_w, - mwindow->session->presetdialog_h, - xS(320), yS(240), 1, 0, 1) -{ - this->mwindow = mwindow; - this->thread = thread; -} - -void PresetsWindow::create_objects() -{ - Theme *theme = mwindow->theme; - - lock_window("PresetsWindow::create_objects"); - theme->get_presetdialog_sizes(this); - - add_subwindow(title1 = new BC_Title(theme->presets_list_x, - theme->presets_list_y - BC_Title::calculate_h(this, "P") - theme->widget_border, - _("Saved presets:"))); - add_subwindow(list = new PresetsList(thread, - this, - theme->presets_list_x, - theme->presets_list_y, - theme->presets_list_w, - theme->presets_list_h)); - add_subwindow(title2 = new BC_Title(theme->presets_text_x, - theme->presets_text_y - BC_Title::calculate_h(this, "P") - theme->widget_border, - _("Preset title:"))); - add_subwindow(title_text = new PresetsText(thread, - this, - theme->presets_text_x, - theme->presets_text_y, - theme->presets_text_w)); - add_subwindow(delete_button = new PresetsDelete(thread, - this, - theme->presets_delete_x, - theme->presets_delete_y)); - add_subwindow(save_button = new PresetsSave(thread, - this, - theme->presets_save_x, - theme->presets_save_y)); - add_subwindow(apply_button = new PresetsApply(thread, - this, - theme->presets_apply_x, - theme->presets_apply_y)); - - add_subwindow(new PresetsOK(thread, this)); - add_subwindow(new BC_CancelButton(this)); - - show_window(); - unlock_window(); -} - -int PresetsWindow::resize_event(int w, int h) -{ - Theme *theme = mwindow->theme; - mwindow->session->presetdialog_w = w; - mwindow->session->presetdialog_h = h; - theme->get_presetdialog_sizes(this); - - title1->reposition_window(theme->presets_list_x, - theme->presets_list_y - BC_Title::calculate_h(this, "P") - theme->widget_border); - title2->reposition_window(theme->presets_text_x, - theme->presets_text_y - BC_Title::calculate_h(this, "P") - theme->widget_border); - list->reposition_window(theme->presets_list_x, - theme->presets_list_y, - theme->presets_list_w, - theme->presets_list_h); - title_text->reposition_window(theme->presets_text_x, - theme->presets_text_y, - theme->presets_text_w); - delete_button->reposition_window(theme->presets_delete_x, - theme->presets_delete_y); - save_button->reposition_window(theme->presets_save_x, - theme->presets_save_y); - apply_button->reposition_window(theme->presets_apply_x, - theme->presets_apply_y); - return 0; -} - - - - - - -#endif - diff --git a/cinelerra-5.1/cinelerra/presetsgui.h.sav b/cinelerra-5.1/cinelerra/presetsgui.h.sav deleted file mode 100644 index 52d2cf5c..00000000 --- a/cinelerra-5.1/cinelerra/presetsgui.h.sav +++ /dev/null @@ -1,170 +0,0 @@ - -/* - * CINELERRA - * Copyright (C) 2008 Adam Williams - * - * 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 PRESETSGUI_H -#define PRESETSGUI_H - - -// Presets for effects & transitions -#if 0 - -#include "bcdialog.h" -#include "guicast.h" -#include "mwindow.inc" -#include "plugin.inc" -#include "presets.inc" - -class PresetsWindow; - - - - - -class PresetsThread : public BC_DialogThread -{ -public: - PresetsThread(MWindow *mwindow); - ~PresetsThread(); - - void calculate_list(); - void start_window(Plugin *plugin); - BC_Window* new_gui(); - void handle_done_event(int result); - void handle_close_event(int result); - void save_preset(char *title); - void delete_preset(char *title); - void apply_preset(char *title); - - char window_title[BCTEXTLEN]; - char plugin_title[BCTEXTLEN]; - MWindow *mwindow; - Plugin *plugin; - ArrayList *data; - PresetsDB *presets_db; -}; - -class PresetsList : public BC_ListBox -{ -public: - PresetsList(PresetsThread *thread, - PresetsWindow *window, - int x, - int y, - int w, - int h); - int selection_changed(); - int handle_event(); - PresetsThread *thread; - PresetsWindow *window; -}; - -class PresetsText : public BC_TextBox -{ -public: - PresetsText(PresetsThread *thread, - PresetsWindow *window, - int x, - int y, - int w); - int handle_event(); - PresetsThread *thread; - PresetsWindow *window; -}; - - -class PresetsDelete : public BC_GenericButton -{ -public: - PresetsDelete(PresetsThread *thread, - PresetsWindow *window, - int x, - int y); - int handle_event(); - PresetsThread *thread; - PresetsWindow *window; -}; - -class PresetsSave : public BC_GenericButton -{ -public: - PresetsSave(PresetsThread *thread, - PresetsWindow *window, - int x, - int y); - int handle_event(); - PresetsThread *thread; - PresetsWindow *window; -}; - -class PresetsApply : public BC_GenericButton -{ -public: - PresetsApply(PresetsThread *thread, - PresetsWindow *window, - int x, - int y); - int handle_event(); - PresetsThread *thread; - PresetsWindow *window; -}; - -class PresetsOK : public BC_OKButton -{ -public: - PresetsOK(PresetsThread *thread, - PresetsWindow *window); - int keypress_event(); - PresetsThread *thread; - PresetsWindow *window; -}; - - -class PresetsWindow : public BC_Window -{ -public: - PresetsWindow(MWindow *mwindow, - PresetsThread *thread, - int x, - int y, - char *title_string); - - void create_objects(); - int resize_event(int w, int h); - - PresetsList *list; - PresetsText *title_text; - PresetsDelete *delete_button; - PresetsSave *save_button; - PresetsApply *apply_button; - BC_Title *title1; - BC_Title *title2; - MWindow *mwindow; - PresetsThread *thread; -}; - - - -#endif - -#endif - - - diff --git a/cinelerra-5.1/cinelerra/presetsgui.inc.sav b/cinelerra-5.1/cinelerra/presetsgui.inc.sav deleted file mode 100644 index 641cd17c..00000000 --- a/cinelerra-5.1/cinelerra/presetsgui.inc.sav +++ /dev/null @@ -1,33 +0,0 @@ - -/* - * CINELERRA - * Copyright (C) 2008 Adam Williams - * - * 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 PRESETSGUI_INC -#define PRESETSGUI_INC - - -class PresetsThread; -class PresetsWindow; - -#endif - - - - diff --git a/cinelerra-5.1/doc/whatsnew_2_1.html b/cinelerra-5.1/doc/whatsnew_2_1.html deleted file mode 100644 index 6c202f61..00000000 --- a/cinelerra-5.1/doc/whatsnew_2_1.html +++ /dev/null @@ -1,4 +0,0 @@ -

What's new in Cinelerra 2.1

- -So many big things happened in 2.1 that a simple CHANGELOG won't do. - diff --git a/cinelerra-5.1/mpeg2enc/TODO b/cinelerra-5.1/mpeg2enc/TODO deleted file mode 100644 index acd4fad1..00000000 --- a/cinelerra-5.1/mpeg2enc/TODO +++ /dev/null @@ -1,10 +0,0 @@ -TODO -==== - - - update vbv_delay calculation to agree with November 1994 - (WG11 approved IS draft of ISO/IEC 13818-2). - - - allow intra only encoding of sequences (disable ipflag in - putseq.c) - - -- 2.26.2