From: Good Guy Date: Mon, 29 Feb 2016 22:21:01 +0000 (-0700) Subject: plugin fixes and upgrades X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=59753f0e4cfeca734e46ca9ea6dac84cb92bfdce;p=goodguy%2Fhistory.git plugin fixes and upgrades --- diff --git a/cinelerra-5.0/plugins/1080to480/1080to480.C b/cinelerra-5.0/plugins/1080to480/1080to480.C index b57b7afd..bb35f261 100644 --- a/cinelerra-5.0/plugins/1080to480/1080to480.C +++ b/cinelerra-5.0/plugins/1080to480/1080to480.C @@ -257,6 +257,9 @@ void _1080to480Main::save_data(KeyFrame *keyframe) output.tag.set_title("1080TO480"); output.tag.set_property("FIRST_FIELD", config.first_field); output.append_tag(); + output.tag.set_title("/1080TO480"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/1080to540/1080to540.C b/cinelerra-5.0/plugins/1080to540/1080to540.C index 109fc90b..3c6387bc 100644 --- a/cinelerra-5.0/plugins/1080to540/1080to540.C +++ b/cinelerra-5.0/plugins/1080to540/1080to540.C @@ -176,7 +176,7 @@ void _1080to540Main::reduce_field(VFrame *output, VFrame *input, int src_field, int h = input->get_h(); if(h > output->get_h()) h = output->get_h(); - if(w > output->get_w()) h = output->get_w(); + if(w > output->get_w()) w = output->get_w(); #define REDUCE_MACRO(type, temp, components) \ for(int i = 0; i < OUT_ROWS; i++) \ @@ -267,6 +267,9 @@ void _1080to540Main::save_data(KeyFrame *keyframe) output.tag.set_title("1080TO540"); output.tag.set_property("FIRST_FIELD", config.first_field); output.append_tag(); + output.tag.set_title("/1080TO540"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/720to480/720to480.C b/cinelerra-5.0/plugins/720to480/720to480.C index 14377714..8ebd26cf 100644 --- a/cinelerra-5.0/plugins/720to480/720to480.C +++ b/cinelerra-5.0/plugins/720to480/720to480.C @@ -369,6 +369,9 @@ void _720to480Main::save_data(KeyFrame *keyframe) output.tag.set_property("FIRST_FIELD", config.first_field); output.tag.set_property("DIRECTION", config.direction); output.append_tag(); + output.tag.set_title("/720TO480"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/audioscope/audioscope.C b/cinelerra-5.0/plugins/audioscope/audioscope.C index c20c88bc..b80b102c 100644 --- a/cinelerra-5.0/plugins/audioscope/audioscope.C +++ b/cinelerra-5.0/plugins/audioscope/audioscope.C @@ -1146,6 +1146,8 @@ void AudioScope::save_data(KeyFrame *keyframe) output.tag.set_property("MODE", (int)config.mode); output.tag.set_property("TRIGGER_LEVEL", (float)config.trigger_level); output.append_tag(); + output.tag.set_title("/AUDIOSCOPE"); + output.append_tag(); output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/bandslide/bandslide.C b/cinelerra-5.0/plugins/bandslide/bandslide.C index a46f1481..c221902c 100644 --- a/cinelerra-5.0/plugins/bandslide/bandslide.C +++ b/cinelerra-5.0/plugins/bandslide/bandslide.C @@ -196,6 +196,9 @@ void BandSlideMain::save_data(KeyFrame *keyframe) output.tag.set_property("BANDS", bands); output.tag.set_property("DIRECTION", direction); output.append_tag(); + output.tag.set_title("/BANDSLIDE"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/bandslide/bandslide.h b/cinelerra-5.0/plugins/bandslide/bandslide.h index 62823ca9..5a9257c5 100644 --- a/cinelerra-5.0/plugins/bandslide/bandslide.h +++ b/cinelerra-5.0/plugins/bandslide/bandslide.h @@ -24,7 +24,7 @@ class BandSlideMain; class BandSlideWindow; - +class BandSlideConfig; #include "overlayframe.inc" #include "pluginvclient.h" @@ -84,16 +84,18 @@ public: }; +class BandSlideConfig +{ +public: +}; class BandSlideMain : public PluginVClient { public: BandSlideMain(PluginServer *server); ~BandSlideMain(); + PLUGIN_CLASS_MEMBERS(BandSlideConfig); - int load_configuration(); - const char* plugin_title(); - PluginClientWindow* new_window(); // required for all realtime plugins int process_realtime(VFrame *incoming, VFrame *outgoing); void save_data(KeyFrame *keyframe); diff --git a/cinelerra-5.0/plugins/bandwipe/bandwipe.C b/cinelerra-5.0/plugins/bandwipe/bandwipe.C index f3551d30..67028583 100644 --- a/cinelerra-5.0/plugins/bandwipe/bandwipe.C +++ b/cinelerra-5.0/plugins/bandwipe/bandwipe.C @@ -193,6 +193,9 @@ void BandWipeMain::save_data(KeyFrame *keyframe) output.tag.set_property("BANDS", bands); output.tag.set_property("DIRECTION", direction); output.append_tag(); + output.tag.set_title("/BANDWIPE"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/bandwipe/bandwipe.h b/cinelerra-5.0/plugins/bandwipe/bandwipe.h index 12045625..7ebbaf86 100644 --- a/cinelerra-5.0/plugins/bandwipe/bandwipe.h +++ b/cinelerra-5.0/plugins/bandwipe/bandwipe.h @@ -24,6 +24,7 @@ class BandWipeMain; class BandWipeWindow; +class BandWipeConfig; #include "overlayframe.inc" @@ -85,6 +86,11 @@ public: +class BandWipeConfig +{ +public: +}; + class BandWipeMain : public PluginVClient { @@ -92,10 +98,8 @@ public: BandWipeMain(PluginServer *server); ~BandWipeMain(); -// required for all realtime plugins - int load_configuration(); - const char* plugin_title(); - PluginClientWindow* new_window(); + PLUGIN_CLASS_MEMBERS(BandWipeConfig); + int process_realtime(VFrame *incoming, VFrame *outgoing); void save_data(KeyFrame *keyframe); void read_data(KeyFrame *keyframe); diff --git a/cinelerra-5.0/plugins/blur/blur.C b/cinelerra-5.0/plugins/blur/blur.C index e4b86f5c..09b35845 100644 --- a/cinelerra-5.0/plugins/blur/blur.C +++ b/cinelerra-5.0/plugins/blur/blur.C @@ -320,6 +320,9 @@ void BlurMain::save_data(KeyFrame *keyframe) output.tag.set_property("A", config.a); output.tag.set_property("A_KEY", config.a_key); output.append_tag(); + output.tag.set_title("/BLUR"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/brightness/brightness.C b/cinelerra-5.0/plugins/brightness/brightness.C index 96622f88..8acdd46b 100644 --- a/cinelerra-5.0/plugins/brightness/brightness.C +++ b/cinelerra-5.0/plugins/brightness/brightness.C @@ -286,6 +286,9 @@ void BrightnessMain::save_data(KeyFrame *keyframe) output.tag.set_property("CONTRAST", config.contrast); output.tag.set_property("LUMA", config.luma); output.append_tag(); + output.tag.set_title("/BRIGHTNESS"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/cdripper/cdripper.C b/cinelerra-5.0/plugins/cdripper/cdripper.C index 9ebeac20..1d9586ca 100644 --- a/cinelerra-5.0/plugins/cdripper/cdripper.C +++ b/cinelerra-5.0/plugins/cdripper/cdripper.C @@ -255,7 +255,7 @@ int CDRipMain::get_toc() } } -//printf("CDRipMain::get_toc " _LD " " _LD "\n", startlba, endlba); +//printf("CDRipMain::get_toc %jd %jd\n", startlba, endlba); close_drive(); return result; } @@ -315,7 +315,7 @@ int CDRipMain::stop_loop() int CDRipMain::process_loop(Samples **plugin_buffer, int64_t &write_length) { int result = 0; -printf("CDRipMain::process_loop 1\n"); +//printf("CDRipMain::process_loop 1\n"); // render it if(arg.addr.lba < endlba && !endofselection) @@ -326,7 +326,7 @@ printf("CDRipMain::process_loop 1\n"); fragment_length *= NFRAMES * FRAMESIZE; endofselection = 1; } -printf("CDRipMain::process_loop 2 %d " _LD "\n", arg.addr.lba, endlba); +//printf("CDRipMain::process_loop 2 %d %jd\n", arg.addr.lba, endlba); for(i = 0; i < fragment_length; i += NFRAMES * FRAMESIZE, @@ -343,7 +343,7 @@ printf("CDRipMain::process_loop 2 %d " _LD "\n", arg.addr.lba, endlba); if(attempts == 2 && !previewing) printf("Can't read CD audio.\n"); } } -printf("CDRipMain::process_loop 3\n"); +//printf("CDRipMain::process_loop 3\n"); if(arg.addr.lba > startlba) { @@ -362,22 +362,22 @@ printf("CDRipMain::process_loop 3\n"); write_length = fragment_samples; } -printf("CDRipMain::process_loop 5 %d\n", interactive); +//printf("CDRipMain::process_loop 5 %d\n", interactive); currentlength++; if(interactive) { if(!result) result = progress->update(currentlength); } -printf("CDRipMain::process_loop 6\n"); +//printf("CDRipMain::process_loop 6\n"); } else { -printf("CDRipMain::process_loop 7\n"); +//printf("CDRipMain::process_loop 7\n"); endofselection = 1; write_length = 0; } -printf("CDRipMain::process_loop 8 %d %d\n", endofselection, result); +//printf("CDRipMain::process_loop 8 %d %d\n", endofselection, result); return endofselection || result; } diff --git a/cinelerra-5.0/plugins/chromakey/chromakey.C b/cinelerra-5.0/plugins/chromakey/chromakey.C index ba3a565b..adc1528c 100644 --- a/cinelerra-5.0/plugins/chromakey/chromakey.C +++ b/cinelerra-5.0/plugins/chromakey/chromakey.C @@ -591,6 +591,9 @@ void ChromaKey::save_data(KeyFrame *keyframe) output.tag.set_property("SLOPE", config.slope); output.tag.set_property("USE_VALUE", config.use_value); output.append_tag(); + output.tag.set_title("/CHROMAKEY"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/chromakeyhsv/chromakey.C b/cinelerra-5.0/plugins/chromakeyhsv/chromakey.C index 5380f906..3541143c 100644 --- a/cinelerra-5.0/plugins/chromakeyhsv/chromakey.C +++ b/cinelerra-5.0/plugins/chromakeyhsv/chromakey.C @@ -926,94 +926,93 @@ int ChromaKeyHSV::is_realtime() { return 1; } LOAD_CONFIGURATION_MACRO(ChromaKeyHSV, ChromaKeyConfig) -void -ChromaKeyHSV::save_data (KeyFrame * keyframe) +void ChromaKeyHSV::save_data(KeyFrame * keyframe) { - FileXML output; - output.set_shared_output(keyframe->get_data(), MESSAGESIZE); - output.tag.set_title ("CHROMAKEY_HSV"); - output.tag.set_property ("RED", config.red); - output.tag.set_property ("GREEN", config.green); - output.tag.set_property ("BLUE", config.blue); - output.tag.set_property ("MIN_BRIGHTNESS", config.min_brightness); - output.tag.set_property ("MAX_BRIGHTNESS", config.max_brightness); - output.tag.set_property ("SATURATION", config.saturation); - output.tag.set_property ("MIN_SATURATION", config.min_saturation); - output.tag.set_property ("TOLERANCE", config.tolerance); - output.tag.set_property ("IN_SLOPE", config.in_slope); - output.tag.set_property ("OUT_SLOPE", config.out_slope); - output.tag.set_property ("ALPHA_OFFSET", config.alpha_offset); - output.tag.set_property ("SPILL_THRESHOLD", config.spill_threshold); - output.tag.set_property ("SPILL_AMOUNT", config.spill_amount); - output.tag.set_property ("SHOW_MASK", config.show_mask); - output.append_tag (); - output.terminate_string (); + FileXML output; + output.set_shared_output(keyframe->get_data(), MESSAGESIZE); + output.tag.set_title("CHROMAKEY_HSV"); + output.tag.set_property("RED", config.red); + output.tag.set_property("GREEN", config.green); + output.tag.set_property("BLUE", config.blue); + output.tag.set_property("MIN_BRIGHTNESS", config.min_brightness); + output.tag.set_property("MAX_BRIGHTNESS", config.max_brightness); + output.tag.set_property("SATURATION", config.saturation); + output.tag.set_property("MIN_SATURATION", config.min_saturation); + output.tag.set_property("TOLERANCE", config.tolerance); + output.tag.set_property("IN_SLOPE", config.in_slope); + output.tag.set_property("OUT_SLOPE", config.out_slope); + output.tag.set_property("ALPHA_OFFSET", config.alpha_offset); + output.tag.set_property("SPILL_THRESHOLD", config.spill_threshold); + output.tag.set_property("SPILL_AMOUNT", config.spill_amount); + output.tag.set_property("SHOW_MASK", config.show_mask); + output.append_tag(); + output.tag.set_title("/CHROMAKEY_HSV"); + output.append_tag(); + output.append_newline(); + output.terminate_string(); } -void -ChromaKeyHSV::read_data (KeyFrame * keyframe) +void ChromaKeyHSV::read_data(KeyFrame * keyframe) { - FileXML input; - - input.set_shared_input (keyframe->get_data(), strlen (keyframe->get_data())); - - while (!input.read_tag ()) - { - if (input.tag.title_is ("CHROMAKEY_HSV")) - { - config.red = input.tag.get_property ("RED", config.red); - config.green = input.tag.get_property ("GREEN", config.green); - config.blue = input.tag.get_property ("BLUE", config.blue); - config.min_brightness = - input.tag.get_property ("MIN_BRIGHTNESS", config.min_brightness); - config.max_brightness = - input.tag.get_property ("MAX_BRIGHTNESS", config.max_brightness); - config.saturation = - input.tag.get_property ("SATURATION", config.saturation); - config.min_saturation = - input.tag.get_property ("MIN_SATURATION", config.min_saturation); - config.tolerance = - input.tag.get_property ("TOLERANCE", config.tolerance); - config.in_slope = - input.tag.get_property ("IN_SLOPE", config.in_slope); - config.out_slope = - input.tag.get_property ("OUT_SLOPE", config.out_slope); - config.alpha_offset = - input.tag.get_property ("ALPHA_OFFSET", config.alpha_offset); - config.spill_threshold = - input.tag.get_property ("SPILL_THRESHOLD", - config.spill_threshold); - config.spill_amount = - input.tag.get_property ("SPILL_AMOUNT", config.spill_amount); - config.show_mask = - input.tag.get_property ("SHOW_MASK", config.show_mask); + FileXML input; + + input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); + + while( !input.read_tag() ) { + if( input.tag.title_is("CHROMAKEY_HSV") ) { + config.red = input.tag.get_property("RED", config.red); + config.green = input.tag.get_property("GREEN", config.green); + config.blue = input.tag.get_property("BLUE", config.blue); + config.min_brightness = + input.tag.get_property("MIN_BRIGHTNESS", config.min_brightness); + config.max_brightness = + input.tag.get_property("MAX_BRIGHTNESS", config.max_brightness); + config.saturation = + input.tag.get_property("SATURATION", config.saturation); + config.min_saturation = + input.tag.get_property("MIN_SATURATION", config.min_saturation); + config.tolerance = + input.tag.get_property("TOLERANCE", config.tolerance); + config.in_slope = + input.tag.get_property("IN_SLOPE", config.in_slope); + config.out_slope = + input.tag.get_property("OUT_SLOPE", config.out_slope); + config.alpha_offset = + input.tag.get_property("ALPHA_OFFSET", config.alpha_offset); + config.spill_threshold = + input.tag.get_property("SPILL_THRESHOLD", + config.spill_threshold); + config.spill_amount = + input.tag.get_property("SPILL_AMOUNT", config.spill_amount); + config.show_mask = + input.tag.get_property("SHOW_MASK", config.show_mask); + } } - } } NEW_WINDOW_MACRO(ChromaKeyHSV, ChromaKeyWindow) -void ChromaKeyHSV::update_gui () +void ChromaKeyHSV::update_gui() { - if (thread) - { - load_configuration (); - thread->window->lock_window (); - ((ChromaKeyWindow*)thread->window)->min_brightness->update (config.min_brightness); - ((ChromaKeyWindow*)thread->window)->max_brightness->update (config.max_brightness); - ((ChromaKeyWindow*)thread->window)->saturation->update (config.saturation); - ((ChromaKeyWindow*)thread->window)->min_saturation->update (config.min_saturation); - ((ChromaKeyWindow*)thread->window)->tolerance->update (config.tolerance); - ((ChromaKeyWindow*)thread->window)->in_slope->update (config.in_slope); - ((ChromaKeyWindow*)thread->window)->out_slope->update (config.out_slope); - ((ChromaKeyWindow*)thread->window)->alpha_offset->update (config.alpha_offset); - ((ChromaKeyWindow*)thread->window)->spill_threshold->update (config.spill_threshold); - ((ChromaKeyWindow*)thread->window)->spill_amount->update (config.spill_amount); - ((ChromaKeyWindow*)thread->window)->show_mask->update (config.show_mask); - ((ChromaKeyWindow*)thread->window)->update_sample (); - thread->window->unlock_window (); - } + if( thread ) { + load_configuration(); + ChromaKeyWindow *window = (ChromaKeyWindow*)thread->window; + window->lock_window(); + window->min_brightness->update(config.min_brightness); + window->max_brightness->update(config.max_brightness); + window->saturation->update(config.saturation); + window->min_saturation->update(config.min_saturation); + window->tolerance->update(config.tolerance); + window->in_slope->update(config.in_slope); + window->out_slope->update(config.out_slope); + window->alpha_offset->update(config.alpha_offset); + window->spill_threshold->update(config.spill_threshold); + window->spill_amount->update(config.spill_amount); + window->show_mask->update(config.show_mask); + window->update_sample(); + window->unlock_window(); + } } diff --git a/cinelerra-5.0/plugins/color3way/color3way.C b/cinelerra-5.0/plugins/color3way/color3way.C index 07592f78..09908686 100644 --- a/cinelerra-5.0/plugins/color3way/color3way.C +++ b/cinelerra-5.0/plugins/color3way/color3way.C @@ -550,6 +550,9 @@ void Color3WayMain::save_data(KeyFrame *keyframe) } output.append_tag(); + output.tag.set_title("/COLOR3WAY"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/colorbalance/colorbalance.C b/cinelerra-5.0/plugins/colorbalance/colorbalance.C index 4bddc7ac..13d5e629 100644 --- a/cinelerra-5.0/plugins/colorbalance/colorbalance.C +++ b/cinelerra-5.0/plugins/colorbalance/colorbalance.C @@ -544,6 +544,9 @@ void ColorBalanceMain::save_data(KeyFrame *keyframe) output.tag.set_property("PRESERVELUMINOSITY", config.preserve); output.tag.set_property("LOCKPARAMS", config.lock_params); output.append_tag(); + output.tag.set_title("/COLORBALANCE"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/compressor/compressor.C b/cinelerra-5.0/plugins/compressor/compressor.C index ee1cf508..c2b3dc90 100644 --- a/cinelerra-5.0/plugins/compressor/compressor.C +++ b/cinelerra-5.0/plugins/compressor/compressor.C @@ -166,6 +166,8 @@ void CompressorEffect::save_data(KeyFrame *keyframe) output.tag.set_property("SMOOTHING_ONLY", config.smoothing_only); output.tag.set_property("INPUT", config.input); output.append_tag(); + output.tag.set_title("/COMPRESSOR"); + output.append_tag(); output.append_newline(); @@ -175,6 +177,8 @@ void CompressorEffect::save_data(KeyFrame *keyframe) output.tag.set_property("X", config.levels.values[i].x); output.tag.set_property("Y", config.levels.values[i].y); + output.append_tag(); + output.tag.set_title("/LEVEL"); output.append_tag(); output.append_newline(); } diff --git a/cinelerra-5.0/plugins/decimate/decimate.C b/cinelerra-5.0/plugins/decimate/decimate.C index 4d8565fe..0a08373f 100644 --- a/cinelerra-5.0/plugins/decimate/decimate.C +++ b/cinelerra-5.0/plugins/decimate/decimate.C @@ -772,6 +772,9 @@ void Decimate::save_data(KeyFrame *keyframe) // output.tag.set_property("AVERAGED_FRAMES", config.averaged_frames); // output.tag.set_property("LEAST_DIFFERENCE", config.least_difference); output.append_tag(); + output.tag.set_title("/DECIMATE"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/deinterlace/deinterlace.C b/cinelerra-5.0/plugins/deinterlace/deinterlace.C index 208c2b6f..74575854 100644 --- a/cinelerra-5.0/plugins/deinterlace/deinterlace.C +++ b/cinelerra-5.0/plugins/deinterlace/deinterlace.C @@ -559,6 +559,9 @@ void DeInterlaceMain::save_data(KeyFrame *keyframe) // output.tag.set_property("ADAPTIVE", config.adaptive); // output.tag.set_property("THRESHOLD", config.threshold); output.append_tag(); + output.tag.set_title("/DEINTERLACE"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/delayaudio/delayaudio.C b/cinelerra-5.0/plugins/delayaudio/delayaudio.C index 6c95582c..0c0c066f 100644 --- a/cinelerra-5.0/plugins/delayaudio/delayaudio.C +++ b/cinelerra-5.0/plugins/delayaudio/delayaudio.C @@ -113,6 +113,8 @@ void DelayAudio::save_data(KeyFrame *keyframe) output.tag.set_title("DELAYAUDIO"); output.tag.set_property("LENGTH", (double)config.length); output.append_tag(); + output.tag.set_title("/DELAYAUDIO"); + output.append_tag(); output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/delayvideo/delayvideo.C b/cinelerra-5.0/plugins/delayvideo/delayvideo.C index 9489a140..7bdcd6d3 100644 --- a/cinelerra-5.0/plugins/delayvideo/delayvideo.C +++ b/cinelerra-5.0/plugins/delayvideo/delayvideo.C @@ -264,6 +264,8 @@ void DelayVideo::save_data(KeyFrame *keyframe) output.tag.set_title("DELAYVIDEO"); output.tag.set_property("LENGTH", (double)config.length); output.append_tag(); + output.tag.set_title("/DELAYVIDEO"); + output.append_tag(); output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/denoise/denoise.C b/cinelerra-5.0/plugins/denoise/denoise.C index 970a4cd9..3110053b 100644 --- a/cinelerra-5.0/plugins/denoise/denoise.C +++ b/cinelerra-5.0/plugins/denoise/denoise.C @@ -159,8 +159,9 @@ void DenoiseEffect::save_data(KeyFrame *keyframe) output.tag.set_title("DENOISE"); output.tag.set_property("LEVEL", config.level); output.append_tag(); + output.tag.set_title("/DENOISE"); + output.append_tag(); output.append_newline(); - output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/denoisefft/denoisefft.C b/cinelerra-5.0/plugins/denoisefft/denoisefft.C index 20e30e6c..9aba4ea8 100644 --- a/cinelerra-5.0/plugins/denoisefft/denoisefft.C +++ b/cinelerra-5.0/plugins/denoisefft/denoisefft.C @@ -344,8 +344,9 @@ void DenoiseFFTEffect::save_data(KeyFrame *keyframe) output.tag.set_property("SAMPLES", config.samples); output.tag.set_property("LEVEL", config.level); output.append_tag(); + output.tag.set_title("/DENOISEFFT"); + output.append_tag(); output.append_newline(); - output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/denoisemjpeg/denoisemjpeg.C b/cinelerra-5.0/plugins/denoisemjpeg/denoisemjpeg.C index 1ac4e4af..37a93a49 100644 --- a/cinelerra-5.0/plugins/denoisemjpeg/denoisemjpeg.C +++ b/cinelerra-5.0/plugins/denoisemjpeg/denoisemjpeg.C @@ -482,6 +482,9 @@ void DenoiseMJPEG::save_data(KeyFrame *keyframe) output.tag.set_property("MODE", config.mode); output.tag.set_property("DELAY", config.delay); output.append_tag(); + output.tag.set_title("/DENOISE_VIDEO2"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/denoiseseltempavg/seltempavg.C b/cinelerra-5.0/plugins/denoiseseltempavg/seltempavg.C index bfd8dea9..70a991eb 100644 --- a/cinelerra-5.0/plugins/denoiseseltempavg/seltempavg.C +++ b/cinelerra-5.0/plugins/denoiseseltempavg/seltempavg.C @@ -43,7 +43,7 @@ SelTempAvgConfig::SelTempAvgConfig() paranoid = 0; nosubtract = 0; offset_restartmarker_keyframe = 0; - offset_fixed_value = -1000; + offset_fixed_value = -15; gain = 1.00; avg_threshold_RY = 0; avg_threshold_GU = 0; avg_threshold_BV = 0; @@ -817,6 +817,9 @@ void SelTempAvgMain::save_data(KeyFrame *keyframe) output.tag.set_property("MASK_BV", config.mask_BV); output.append_tag(); + output.tag.set_title("/SELECTIVE_TEMPORAL_AVERAGE"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/denoisevideo/denoisevideo.C b/cinelerra-5.0/plugins/denoisevideo/denoisevideo.C index a754cdff..a33488f8 100644 --- a/cinelerra-5.0/plugins/denoisevideo/denoisevideo.C +++ b/cinelerra-5.0/plugins/denoisevideo/denoisevideo.C @@ -173,7 +173,7 @@ int DenoiseVideoToggle::handle_event() { *output = get_value(); plugin->send_configure_change(); - return 0; + return 1; } @@ -451,6 +451,9 @@ void DenoiseVideo::save_data(KeyFrame *keyframe) output.tag.set_property("DO_A", config.do_a); output.tag.set_property("COUNT_CHANGED", config.count_changed); output.append_tag(); + output.tag.set_title("/DENOISE_VIDEO"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/despike/despike.C b/cinelerra-5.0/plugins/despike/despike.C index 3873c66c..5e9f4f80 100644 --- a/cinelerra-5.0/plugins/despike/despike.C +++ b/cinelerra-5.0/plugins/despike/despike.C @@ -100,6 +100,8 @@ void Despike::save_data(KeyFrame *keyframe) output.tag.set_property("LEVEL", config.level); output.tag.set_property("SLOPE", config.slope); output.append_tag(); + output.tag.set_title("/DESPIKE"); + output.append_tag(); output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/diffkey/diffkey.C b/cinelerra-5.0/plugins/diffkey/diffkey.C index 255b7b9c..8cf24262 100644 --- a/cinelerra-5.0/plugins/diffkey/diffkey.C +++ b/cinelerra-5.0/plugins/diffkey/diffkey.C @@ -340,6 +340,9 @@ void DiffKey::save_data(KeyFrame *keyframe) output.tag.set_property("SLOPE", config.slope); output.tag.set_property("DO_VALUE", config.do_value); output.append_tag(); + output.tag.set_title("/DIFFKEY"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/downsample/downsample.C b/cinelerra-5.0/plugins/downsample/downsample.C index 212dc33a..9a4a9207 100644 --- a/cinelerra-5.0/plugins/downsample/downsample.C +++ b/cinelerra-5.0/plugins/downsample/downsample.C @@ -453,6 +453,9 @@ void DownSampleMain::save_data(KeyFrame *keyframe) output.tag.set_property("B", config.b); output.tag.set_property("A", config.a); output.append_tag(); + output.tag.set_title("/DOWNSAMPLE"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/echo/echo.C b/cinelerra-5.0/plugins/echo/echo.C index b3def892..f65f9dc5 100644 --- a/cinelerra-5.0/plugins/echo/echo.C +++ b/cinelerra-5.0/plugins/echo/echo.C @@ -325,6 +325,8 @@ void Echo::save_data(KeyFrame *keyframe) output.tag.set_property("ATTEN", config.atten); output.tag.set_property("OFFSET", config.offset); output.append_tag(); + output.tag.set_title("/ECHO"); + output.append_tag(); output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/echocancel/echocancel.C b/cinelerra-5.0/plugins/echocancel/echocancel.C index ce476fca..b227e6b7 100644 --- a/cinelerra-5.0/plugins/echocancel/echocancel.C +++ b/cinelerra-5.0/plugins/echocancel/echocancel.C @@ -1227,6 +1227,8 @@ void EchoCancel::save_data(KeyFrame *keyframe) output.tag.set_property("W", w); output.tag.set_property("H", h); output.append_tag(); + output.tag.set_title("/ECHOCANCEL"); + output.append_tag(); output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/edge/edge.C b/cinelerra-5.0/plugins/edge/edge.C index 89f757cd..98120bf3 100644 --- a/cinelerra-5.0/plugins/edge/edge.C +++ b/cinelerra-5.0/plugins/edge/edge.C @@ -77,7 +77,7 @@ Edge::~Edge() if(temp) delete temp; } -const char* Edge::plugin_title() { return N_("Edge"); } +const char* Edge::plugin_title() { return _("Edge"); } int Edge::is_realtime() { return 1; } NEW_WINDOW_MACRO(Edge, EdgeWindow); diff --git a/cinelerra-5.0/plugins/fieldframe/fieldframe.C b/cinelerra-5.0/plugins/fieldframe/fieldframe.C index 0780c61b..0cedcad5 100644 --- a/cinelerra-5.0/plugins/fieldframe/fieldframe.C +++ b/cinelerra-5.0/plugins/fieldframe/fieldframe.C @@ -361,6 +361,9 @@ void FieldFrame::save_data(KeyFrame *keyframe) output.tag.set_property("DOMINANCE", config.field_dominance); output.tag.set_property("FIRST_FRAME", config.first_frame); output.append_tag(); + output.tag.set_title("/FIELD_FRAME"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/findobject/findobject.C b/cinelerra-5.0/plugins/findobject/findobject.C index 2f5d1362..64861852 100644 --- a/cinelerra-5.0/plugins/findobject/findobject.C +++ b/cinelerra-5.0/plugins/findobject/findobject.C @@ -35,6 +35,10 @@ #include "surfscan.h" #include "transportque.h" +// Needed with OpenCV version 2.4.8 +#include "opencv2/legacy/legacy.hpp" +#include "opencv2/legacy/compat.hpp" + #include "opencv2/video/tracking.hpp" #include "opencv2/video/background_segm.hpp" @@ -287,6 +291,9 @@ void FindObjectMain::save_data(KeyFrame *keyframe) output.tag.set_property("SMIN", config.smin); output.tag.set_property("BLEND", config.blend); output.append_tag(); + output.tag.set_title("/FINDOBJECT"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } @@ -1087,7 +1094,7 @@ void FindObjectMain::process_blob() delete [] scene_rows; blob_pTracker->Process(scene_image, pMask); -printf("FindObjectMain::process_blob %d %ld %d\n", __LINE__, get_source_position(), blob_pTracker->GetBlobNum()); +printf("FindObjectMain::process_blob %d %jd %d\n", __LINE__, get_source_position(), blob_pTracker->GetBlobNum()); #if 0 @@ -1181,10 +1188,6 @@ int FindObjectMain::process_buffer(VFrame **frame, // TODO: use oblique corners & affine transform object_w = (int)(config.global_block_w * w / 100); object_h = (int)(config.global_block_h * h / 100); - object_x1; - object_y1; - object_x2; - object_y2; object_x1 = (int)(config.block_x * w / 100 - object_w / 2); object_y1 = (int)(config.block_y * h / 100 - object_h / 2); @@ -1200,10 +1203,6 @@ int FindObjectMain::process_buffer(VFrame **frame, scene_w = (int)(config.global_range_w * w / 100); scene_h = (int)(config.global_range_h * h / 100); - scene_x1; - scene_y1; - scene_x2; - scene_y2; scene_x1 = (int)(config.block_x * w / 100 - scene_w / 2); scene_y1 = (int)(config.block_y * h / 100 - scene_h / 2); scene_x2 = scene_x1 + scene_w; @@ -1276,9 +1275,11 @@ int FindObjectMain::process_buffer(VFrame **frame, switch(config.algorithm) { +#if HAVE_OPENCV_SURF case ALGORITHM_SURF: process_surf(); break; +#endif case ALGORITHM_CAMSHIFT: process_camshift(); diff --git a/cinelerra-5.0/plugins/findobject/findobject.h b/cinelerra-5.0/plugins/findobject/findobject.h index 4b30f8a6..f5e5decd 100644 --- a/cinelerra-5.0/plugins/findobject/findobject.h +++ b/cinelerra-5.0/plugins/findobject/findobject.h @@ -29,6 +29,8 @@ #ifndef FINDOBJECT_H #define FINDOBJECT_H +//#include "config.h" + #include #include #include @@ -82,7 +84,9 @@ using namespace cv; #define NO_ALGORITHM 0 +#if HAVE_OPENCV_SURF #define ALGORITHM_SURF 1 +#endif #define ALGORITHM_CAMSHIFT 2 #define ALGORITHM_BLOB 3 diff --git a/cinelerra-5.0/plugins/findobject/findobjectwindow.C b/cinelerra-5.0/plugins/findobject/findobjectwindow.C index 37dbae25..7f9e440c 100644 --- a/cinelerra-5.0/plugins/findobject/findobjectwindow.C +++ b/cinelerra-5.0/plugins/findobject/findobjectwindow.C @@ -484,7 +484,7 @@ int FindObjectAlgorithm::handle_event() void FindObjectAlgorithm::create_objects() { add_item(new BC_MenuItem(to_text(NO_ALGORITHM))); -#ifdef HAVE_OPENCV_SURF +#if HAVE_OPENCV_SURF add_item(new BC_MenuItem(to_text(ALGORITHM_SURF))); #endif add_item(new BC_MenuItem(to_text(ALGORITHM_CAMSHIFT))); @@ -494,7 +494,7 @@ void FindObjectAlgorithm::create_objects() int FindObjectAlgorithm::from_text(char *text) { if(!strcmp(text, _("Don't Calculate"))) return NO_ALGORITHM; -#ifdef HAVE_OPENCV_SURF +#if HAVE_OPENCV_SURF if(!strcmp(text, _("SURF"))) return ALGORITHM_SURF; #endif if(!strcmp(text, _("CAMSHIFT"))) return ALGORITHM_CAMSHIFT; @@ -508,7 +508,7 @@ char* FindObjectAlgorithm::to_text(int mode) { case NO_ALGORITHM: return _("Don't Calculate"); -#ifdef HAVE_OPENCV_SURF +#if HAVE_OPENCV_SURF case ALGORITHM_SURF: return _("SURF"); #endif @@ -524,7 +524,7 @@ int FindObjectAlgorithm::calculate_w(FindObjectWindow *gui) { int result = 0; result = MAX(result, gui->get_text_width(MEDIUMFONT, to_text(NO_ALGORITHM))); -#ifdef HAVE_OPENCV_SURF +#if HAVE_OPENCV_SURF result = MAX(result, gui->get_text_width(MEDIUMFONT, to_text(ALGORITHM_SURF))); #endif result = MAX(result, gui->get_text_width(MEDIUMFONT, to_text(ALGORITHM_CAMSHIFT))); diff --git a/cinelerra-5.0/plugins/flip/flip.C b/cinelerra-5.0/plugins/flip/flip.C index 8fa30581..6c27e8ad 100644 --- a/cinelerra-5.0/plugins/flip/flip.C +++ b/cinelerra-5.0/plugins/flip/flip.C @@ -232,13 +232,20 @@ void FlipMain::save_data(KeyFrame *keyframe) { output.tag.set_title("VERTICAL"); output.append_tag(); + output.tag.set_title("/VERTICAL"); + output.append_tag(); } if(config.flip_horizontal) { output.tag.set_title("HORIZONTAL"); output.append_tag(); + output.tag.set_title("/HORIZONTAL"); + output.append_tag(); } + output.tag.set_title("/FLIP"); + output.append_tag(); + output.append_newline(); output.terminate_string(); // data is now in *text } diff --git a/cinelerra-5.0/plugins/framefield/framefield.C b/cinelerra-5.0/plugins/framefield/framefield.C index fb98f10f..fabe7e0b 100644 --- a/cinelerra-5.0/plugins/framefield/framefield.C +++ b/cinelerra-5.0/plugins/framefield/framefield.C @@ -589,6 +589,9 @@ void FrameField::save_data(KeyFrame *keyframe) output.tag.set_title("FRAME_FIELD"); output.tag.set_property("DOMINANCE", config.field_dominance); output.append_tag(); + output.tag.set_title("/FRAME_FIELD"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/freeverb/freeverb.C b/cinelerra-5.0/plugins/freeverb/freeverb.C index 291497db..27e4a365 100644 --- a/cinelerra-5.0/plugins/freeverb/freeverb.C +++ b/cinelerra-5.0/plugins/freeverb/freeverb.C @@ -502,8 +502,9 @@ void FreeverbEffect::save_data(KeyFrame *keyframe) output.tag.set_property("WIDTH", config.width); output.tag.set_property("MODE", config.mode); output.append_tag(); + output.tag.set_title("/FREEVERB"); + output.append_tag(); output.append_newline(); - output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/freezeframe/freezeframe.C b/cinelerra-5.0/plugins/freezeframe/freezeframe.C index 77893908..08d7d08c 100644 --- a/cinelerra-5.0/plugins/freezeframe/freezeframe.C +++ b/cinelerra-5.0/plugins/freezeframe/freezeframe.C @@ -202,12 +202,19 @@ void FreezeFrameMain::save_data(KeyFrame *keyframe) { output.tag.set_title("ENABLED"); output.append_tag(); + output.tag.set_title("/ENABLED"); + output.append_tag(); } if(config.line_double) { output.tag.set_title("LINE_DOUBLE"); output.append_tag(); + output.tag.set_title("/LINE_DOUBLE"); + output.append_tag(); } + output.tag.set_title("/FREEZEFRAME"); + output.append_tag(); + output.append_newline(); output.terminate_string(); // data is now in *text } @@ -263,7 +270,7 @@ int FreezeFrameMain::process_buffer(VFrame *frame, frame->get_h(), frame->get_color_model(), -1); -//printf("FreezeFrameMain::process_buffer 1 " _LD "\n", first_frame_position); +//printf("FreezeFrameMain::process_buffer 1 %jd\n", first_frame_position); read_frame(first_frame, 0, get_direction() == PLAY_REVERSE ? first_frame_position + 1 : first_frame_position, diff --git a/cinelerra-5.0/plugins/gain/gain.C b/cinelerra-5.0/plugins/gain/gain.C index 0eda4bdd..a83dc029 100644 --- a/cinelerra-5.0/plugins/gain/gain.C +++ b/cinelerra-5.0/plugins/gain/gain.C @@ -118,6 +118,8 @@ void Gain::save_data(KeyFrame *keyframe) output.tag.set_title("GAIN"); output.tag.set_property("LEVEL", config.level); output.append_tag(); + output.tag.set_title("/GAIN"); + output.append_tag(); output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/gamma/gamma.C b/cinelerra-5.0/plugins/gamma/gamma.C index 4c66a8ff..23026f07 100644 --- a/cinelerra-5.0/plugins/gamma/gamma.C +++ b/cinelerra-5.0/plugins/gamma/gamma.C @@ -533,6 +533,9 @@ void GammaMain::save_data(KeyFrame *keyframe) output.tag.set_property("AUTOMATIC", config.automatic); output.tag.set_property("PLOT", config.plot); output.append_tag(); + output.tag.set_title("/GAMMA"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/gradient/gradient.C b/cinelerra-5.0/plugins/gradient/gradient.C index 247458eb..d4142ad9 100644 --- a/cinelerra-5.0/plugins/gradient/gradient.C +++ b/cinelerra-5.0/plugins/gradient/gradient.C @@ -772,6 +772,9 @@ void GradientMain::save_data(KeyFrame *keyframe) output.tag.set_property("CENTER_X", config.center_x); output.tag.set_property("CENTER_Y", config.center_y); output.append_tag(); + output.tag.set_title("/GRADIENT"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/graphic/graphic.C b/cinelerra-5.0/plugins/graphic/graphic.C index 36d94ed3..456b12c6 100644 --- a/cinelerra-5.0/plugins/graphic/graphic.C +++ b/cinelerra-5.0/plugins/graphic/graphic.C @@ -1108,6 +1108,8 @@ void GraphicEQ::save_data(KeyFrame *keyframe) output.tag.set_property("W", w); output.tag.set_property("H", h); output.append_tag(); + output.tag.set_title("/GRAPHICEQ"); + output.append_tag(); output.append_newline(); for(int i = 0; i < config.points.total; i++) @@ -1116,8 +1118,10 @@ void GraphicEQ::save_data(KeyFrame *keyframe) output.tag.set_property("X", config.points.values[i]->freq); output.tag.set_property("Y", config.points.values[i]->value); output.append_tag(); + output.tag.set_title("/POINT"); + output.append_tag(); + output.append_newline(); } - if(config.points.total) output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/histogram/histogram.C b/cinelerra-5.0/plugins/histogram/histogram.C index fae3b8b8..b2487857 100644 --- a/cinelerra-5.0/plugins/histogram/histogram.C +++ b/cinelerra-5.0/plugins/histogram/histogram.C @@ -207,14 +207,10 @@ void HistogramMain::save_data(KeyFrame *keyframe) //printf("HistogramMain::save_data %d %f %d\n", config.input_min[i], config.input_mid[i], config.input_max[i]); } + output.append_tag(); + output.tag.set_title("/HISTOGRAM"); output.append_tag(); output.append_newline(); - - - - - - output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/huesaturation/huesaturation.C b/cinelerra-5.0/plugins/huesaturation/huesaturation.C index be5fadef..d8b90ea6 100644 --- a/cinelerra-5.0/plugins/huesaturation/huesaturation.C +++ b/cinelerra-5.0/plugins/huesaturation/huesaturation.C @@ -589,6 +589,9 @@ void HueEffect::save_data(KeyFrame *keyframe) output.tag.set_property("SATURATION", config.saturation); output.tag.set_property("VALUE", config.value); output.append_tag(); + output.tag.set_title("/HUESATURATION"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } void HueEffect::read_data(KeyFrame *keyframe) diff --git a/cinelerra-5.0/plugins/interpolate/interpolate.C b/cinelerra-5.0/plugins/interpolate/interpolate.C index 0c63ad0d..7cede4ab 100644 --- a/cinelerra-5.0/plugins/interpolate/interpolate.C +++ b/cinelerra-5.0/plugins/interpolate/interpolate.C @@ -203,6 +203,9 @@ void InterpolatePixelsMain::save_data(KeyFrame *keyframe) output.tag.set_property("X", config.x); output.tag.set_property("Y", config.y); output.append_tag(); + output.tag.set_title("/INTERPOLATEPIXELS"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/interpolateaudio/interpolateaudio.C b/cinelerra-5.0/plugins/interpolateaudio/interpolateaudio.C index 98ac413e..c995b432 100644 --- a/cinelerra-5.0/plugins/interpolateaudio/interpolateaudio.C +++ b/cinelerra-5.0/plugins/interpolateaudio/interpolateaudio.C @@ -93,16 +93,8 @@ InterpolateAudioEffect::~InterpolateAudioEffect() -const char* InterpolateAudioEffect::plugin_title() -{ - return _("Interpolate"); -} - - -int InterpolateAudioEffect::is_realtime() -{ - return 1; -} +const char* InterpolateAudioEffect::plugin_title() { return _("Interpolate"); } +int InterpolateAudioEffect::is_realtime() { return 1; } diff --git a/cinelerra-5.0/plugins/interpolatevideo/interpolatevideo.C b/cinelerra-5.0/plugins/interpolatevideo/interpolatevideo.C index a0313931..c70d6adb 100644 --- a/cinelerra-5.0/plugins/interpolatevideo/interpolatevideo.C +++ b/cinelerra-5.0/plugins/interpolatevideo/interpolatevideo.C @@ -842,13 +842,10 @@ int InterpolateVideo::process_buffer(VFrame *frame, -int InterpolateVideo::is_realtime() -{ - return 1; -} NEW_WINDOW_MACRO(InterpolateVideo, InterpolateVideoWindow) const char* InterpolateVideo::plugin_title() { return _("Interpolate Video"); } +int InterpolateVideo::is_realtime() { return 1; } int InterpolateVideo::load_configuration() { @@ -959,6 +956,9 @@ void InterpolateVideo::save_data(KeyFrame *keyframe) output.tag.set_property("SEARCH_RADIUS", config.search_radius); output.tag.set_property("MACROBLOCK_SIZE", config.macroblock_size); output.append_tag(); + output.tag.set_title("/INTERPOLATEVIDEO"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/invertaudio/invert.C b/cinelerra-5.0/plugins/invertaudio/invert.C index 94295845..c030bffa 100644 --- a/cinelerra-5.0/plugins/invertaudio/invert.C +++ b/cinelerra-5.0/plugins/invertaudio/invert.C @@ -29,23 +29,12 @@ class InvertAudioEffect : public PluginAClient { public: InvertAudioEffect(PluginServer *server) - : PluginAClient(server) - { - }; - ~InvertAudioEffect() - { - }; + : PluginAClient(server) {}; + ~InvertAudioEffect() {}; - const char* plugin_title() - { - return _("Invert Audio"); - }; - int is_realtime() - { - return 1; - }; - int process_realtime(int64_t size, Samples *input_ptr, Samples *output_ptr) - { + const char* plugin_title() { return _("Invert Audio"); }; + int is_realtime() { return 1; }; + int process_realtime(int64_t size, Samples *input_ptr, Samples *output_ptr) { double *output_samples = output_ptr->get_data(); double *input_samples = input_ptr->get_data(); for(int i = 0; i < size; i++) diff --git a/cinelerra-5.0/plugins/invertvideo/invert.C b/cinelerra-5.0/plugins/invertvideo/invert.C index f17000da..d24b10f8 100644 --- a/cinelerra-5.0/plugins/invertvideo/invert.C +++ b/cinelerra-5.0/plugins/invertvideo/invert.C @@ -232,6 +232,9 @@ void InvertVideoEffect::save_data(KeyFrame *keyframe) output.tag.set_property("B", config.b); output.tag.set_property("A", config.a); output.append_tag(); + output.tag.set_title("/INVERTVIDEO"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/irissquare/irissquare.C b/cinelerra-5.0/plugins/irissquare/irissquare.C index c7c0911c..c98646cb 100644 --- a/cinelerra-5.0/plugins/irissquare/irissquare.C +++ b/cinelerra-5.0/plugins/irissquare/irissquare.C @@ -156,6 +156,9 @@ void IrisSquareMain::save_data(KeyFrame *keyframe) output.tag.set_title("IRISSQUARE"); output.tag.set_property("DIRECTION", direction); output.append_tag(); + output.tag.set_title("/IRISSQUARE"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/ivtc/ivtc.C b/cinelerra-5.0/plugins/ivtc/ivtc.C index 830a1721..f85c3a7a 100644 --- a/cinelerra-5.0/plugins/ivtc/ivtc.C +++ b/cinelerra-5.0/plugins/ivtc/ivtc.C @@ -106,6 +106,9 @@ void IVTCMain::save_data(KeyFrame *keyframe) output.tag.set_property("AUTO_THRESHOLD", config.auto_threshold); output.tag.set_property("PATTERN", config.pattern); output.append_tag(); + output.tag.set_title("/IVTC"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/lens/lens.C b/cinelerra-5.0/plugins/lens/lens.C index 209884a7..24916156 100644 --- a/cinelerra-5.0/plugins/lens/lens.C +++ b/cinelerra-5.0/plugins/lens/lens.C @@ -778,6 +778,9 @@ void LensMain::save_data(KeyFrame *keyframe) output.tag.set_property("CENTER_Y", config.center_y); output.tag.set_property("DRAW_GUIDES", config.draw_guides); output.append_tag(); + output.tag.set_title("/LENS"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/level/leveleffect.C b/cinelerra-5.0/plugins/level/leveleffect.C index 5c7e28c4..e08f1263 100644 --- a/cinelerra-5.0/plugins/level/leveleffect.C +++ b/cinelerra-5.0/plugins/level/leveleffect.C @@ -225,8 +225,9 @@ void SoundLevelEffect::save_data(KeyFrame *keyframe) output.tag.set_title("SOUNDLEVEL"); output.tag.set_property("DURATION", config.duration); output.append_tag(); + output.tag.set_title("/SOUNDLEVEL"); + output.append_tag(); output.append_newline(); - output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/linearblur/linearblur.C b/cinelerra-5.0/plugins/linearblur/linearblur.C index 53c90be5..090f6c85 100644 --- a/cinelerra-5.0/plugins/linearblur/linearblur.C +++ b/cinelerra-5.0/plugins/linearblur/linearblur.C @@ -573,6 +573,9 @@ void LinearBlurMain::save_data(KeyFrame *keyframe) output.tag.set_property("B", config.b); output.tag.set_property("A", config.a); output.append_tag(); + output.tag.set_title("/LINEARBLUR"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/livevideo/livevideo.C b/cinelerra-5.0/plugins/livevideo/livevideo.C index 23b63d50..c675acf5 100644 --- a/cinelerra-5.0/plugins/livevideo/livevideo.C +++ b/cinelerra-5.0/plugins/livevideo/livevideo.C @@ -598,6 +598,9 @@ void LiveVideo::save_data(KeyFrame *keyframe) output.tag.set_title("LIVEVIDEO"); output.tag.set_property("CHANNEL", config.channel); output.append_tag(); + output.tag.set_title("/LIVEVIDEO"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/loopaudio/loopaudio.C b/cinelerra-5.0/plugins/loopaudio/loopaudio.C index 517dcbd9..60c368ee 100644 --- a/cinelerra-5.0/plugins/loopaudio/loopaudio.C +++ b/cinelerra-5.0/plugins/loopaudio/loopaudio.C @@ -308,6 +308,9 @@ void LoopAudio::save_data(KeyFrame *keyframe) output.tag.set_title("LOOPAUDIO"); output.tag.set_property("SAMPLES", config.samples); output.append_tag(); + output.tag.set_title("/LOOPAUDIO"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/loopvideo/loopvideo.C b/cinelerra-5.0/plugins/loopvideo/loopvideo.C index c29189ae..fb5448d1 100644 --- a/cinelerra-5.0/plugins/loopvideo/loopvideo.C +++ b/cinelerra-5.0/plugins/loopvideo/loopvideo.C @@ -258,6 +258,9 @@ void LoopVideo::save_data(KeyFrame *keyframe) output.tag.set_title("LOOPVIDEO"); output.tag.set_property("FRAMES", config.frames); output.append_tag(); + output.tag.set_title("/LOOPVIDEO"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/motion.new/motion.C b/cinelerra-5.0/plugins/motion.new/motion.C index 5fac22c1..66c0146a 100644 --- a/cinelerra-5.0/plugins/motion.new/motion.C +++ b/cinelerra-5.0/plugins/motion.new/motion.C @@ -362,6 +362,9 @@ void MotionMain::save_data(KeyFrame *keyframe) output.tag.set_property("HORIZONTAL_ONLY", config.horizontal_only); output.tag.set_property("VERTICAL_ONLY", config.vertical_only); output.append_tag(); + output.tag.set_title("/MOTION"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/motion/motion.C b/cinelerra-5.0/plugins/motion/motion.C index 37f6baa0..2303bfb3 100644 --- a/cinelerra-5.0/plugins/motion/motion.C +++ b/cinelerra-5.0/plugins/motion/motion.C @@ -1649,7 +1649,7 @@ float RotateScan::scan_frame(VFrame *previous_frame, case MotionScan::LOAD: { char string[BCTEXTLEN]; - sprintf(string, "%s" _LDv(06), + sprintf(string, "%s%06jd", ROTATION_FILE, plugin->get_source_position()); FILE *input = fopen(string, "r"); if(input) @@ -1821,7 +1821,7 @@ float RotateScan::scan_frame(VFrame *previous_frame, if(!skip && plugin->config.tracking_type == MotionScan::SAVE) { char string[BCTEXTLEN]; - sprintf(string, "%s" _LDv(06), + sprintf(string, "%s%06jd", ROTATION_FILE, plugin->get_source_position()); FILE *output = fopen(string, "w"); if(output) diff --git a/cinelerra-5.0/plugins/motion2point/motion.C b/cinelerra-5.0/plugins/motion2point/motion.C index 39a6f73f..8911fd07 100644 --- a/cinelerra-5.0/plugins/motion2point/motion.C +++ b/cinelerra-5.0/plugins/motion2point/motion.C @@ -358,6 +358,9 @@ void MotionMain2::save_data(KeyFrame *keyframe) output.tag.set_property("HORIZONTAL_ONLY", config.horizontal_only); output.tag.set_property("VERTICAL_ONLY", config.vertical_only); output.append_tag(); + output.tag.set_title("/MOTION2"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } @@ -711,7 +714,7 @@ int MotionMain2::process_buffer(VFrame **frame, #ifdef DEBUG -printf("MotionMain2::process_buffer 1 start_position=" _LD "\n", start_position); +printf("MotionMain2::process_buffer 1 start_position=%jd\n", start_position); #endif diff --git a/cinelerra-5.0/plugins/motionblur/motionblur.C b/cinelerra-5.0/plugins/motionblur/motionblur.C index a2228081..4f166142 100644 --- a/cinelerra-5.0/plugins/motionblur/motionblur.C +++ b/cinelerra-5.0/plugins/motionblur/motionblur.C @@ -492,6 +492,9 @@ void MotionBlurMain::save_data(KeyFrame *keyframe) output.tag.set_property("RADIUS", config.radius); output.tag.set_property("STEPS", config.steps); output.append_tag(); + output.tag.set_title("/MOTIONBLUR"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/oilpainting/oil.C b/cinelerra-5.0/plugins/oilpainting/oil.C index 36ac15df..62450439 100644 --- a/cinelerra-5.0/plugins/oilpainting/oil.C +++ b/cinelerra-5.0/plugins/oilpainting/oil.C @@ -341,6 +341,9 @@ void OilEffect::save_data(KeyFrame *keyframe) output.tag.set_property("RADIUS", config.radius); output.tag.set_property("USE_INTENSITY", config.use_intensity); output.append_tag(); + output.tag.set_title("/OIL_PAINTING"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/overlay/overlay.C b/cinelerra-5.0/plugins/overlay/overlay.C index c43ce53b..d3bdd92c 100644 --- a/cinelerra-5.0/plugins/overlay/overlay.C +++ b/cinelerra-5.0/plugins/overlay/overlay.C @@ -43,8 +43,6 @@ class OverlayConfig public: OverlayConfig(); - - static const char* mode_to_text(int mode); int mode; @@ -65,10 +63,6 @@ public: }; }; - - - - class OverlayMode : public BC_PopupMenu { public: @@ -118,11 +112,6 @@ public: OverlayOutput *output; }; - - - - - class Overlay : public PluginVClient { public: @@ -152,17 +141,6 @@ public: int input_layer2; }; - - - - - - - - - - - OverlayConfig::OverlayConfig() { mode = TRANSFER_NORMAL; @@ -172,45 +150,33 @@ OverlayConfig::OverlayConfig() const char* OverlayConfig::mode_to_text(int mode) { - switch(mode) - { - case TRANSFER_NORMAL: - return _("Normal"); - break; - - case TRANSFER_REPLACE: - return _("Replace"); - break; - - case TRANSFER_ADDITION: - return _("Addition"); - break; - - case TRANSFER_SUBTRACT: - return _("Subtract"); - break; - - case TRANSFER_MULTIPLY: - return _("Multiply"); - break; - - case TRANSFER_DIVIDE: - return _("Divide"); - break; - - case TRANSFER_MAX: - return _("Max"); - break; - - case TRANSFER_MIN: - return _("Min"); - break; - - default: - return _("Normal"); - break; + switch(mode) { + case TRANSFER_NORMAL: return _("Normal"); + case TRANSFER_ADDITION: return _("Addition"); + case TRANSFER_SUBTRACT: return _("Subtract"); + case TRANSFER_MULTIPLY: return _("Multiply"); + case TRANSFER_DIVIDE: return _("Divide"); + case TRANSFER_REPLACE: return _("Replace"); + case TRANSFER_MAX: return _("Max"); + case TRANSFER_MIN: return _("Min"); + case TRANSFER_AVERAGE: return _("Average"); + case TRANSFER_DARKEN: return _("Darken"); + case TRANSFER_LIGHTEN: return _("Lighten"); + case TRANSFER_DST: return _("Dst"); + case TRANSFER_DST_ATOP: return _("DstAtop"); + case TRANSFER_DST_IN: return _("DstIn"); + case TRANSFER_DST_OUT: return _("DstOut"); + case TRANSFER_DST_OVER: return _("DstOver"); + case TRANSFER_SRC: return _("Src"); + case TRANSFER_SRC_ATOP: return _("SrcAtop"); + case TRANSFER_SRC_IN: return _("SrcIn"); + case TRANSFER_SRC_OUT: return _("SrcOut"); + case TRANSFER_SRC_OVER: return _("SrcOver"); + case TRANSFER_OR: return _("Or"); + case TRANSFER_XOR: return _("Xor"); + default: break; } - return ""; + return _("Normal"); } const char* OverlayConfig::direction_to_text(int direction) @@ -291,14 +257,9 @@ void OverlayWindow::create_objects() -OverlayMode::OverlayMode(Overlay *plugin, - int x, - int y) - : BC_PopupMenu(x, - y, - 150, - OverlayConfig::mode_to_text(plugin->config.mode), - 1) +OverlayMode::OverlayMode(Overlay *plugin, int x, int y) + : BC_PopupMenu(x, y, 150, + OverlayConfig::mode_to_text(plugin->config.mode), 1) { this->plugin = plugin; } @@ -459,7 +420,6 @@ int Overlay::process_buffer(VFrame **frame, load_configuration(); -printf("Overlay::process_buffer mode=%d\n", config.mode); if(!temp) temp = new VFrame(0, -1, frame[0]->get_w(), diff --git a/cinelerra-5.0/plugins/overlayaudio/overlayaudio.C b/cinelerra-5.0/plugins/overlayaudio/overlayaudio.C index 21a98450..11704a82 100644 --- a/cinelerra-5.0/plugins/overlayaudio/overlayaudio.C +++ b/cinelerra-5.0/plugins/overlayaudio/overlayaudio.C @@ -364,6 +364,8 @@ void OverlayAudio::save_data(KeyFrame *keyframe) output.tag.set_property("OUTPUT", config.output_track); output.tag.set_property("MODE", config.mode); output.append_tag(); + output.tag.set_title("/OVERLAY"); + output.append_tag(); output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/parametric/parametric.C b/cinelerra-5.0/plugins/parametric/parametric.C index ec93ffce..804bc7de 100644 --- a/cinelerra-5.0/plugins/parametric/parametric.C +++ b/cinelerra-5.0/plugins/parametric/parametric.C @@ -869,9 +869,14 @@ void ParametricEQ::save_data(KeyFrame *keyframe) output.tag.set_property("MAGNITUDE", config.band[i].magnitude); output.tag.set_property("MODE", config.band[i].mode); output.append_tag(); + output.tag.set_title("/BAND"); + output.append_tag(); output.append_newline(); } + output.tag.set_title("/PARAMETRICEQ"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/perspective/perspective.C b/cinelerra-5.0/plugins/perspective/perspective.C index c2eb184a..26a2e774 100644 --- a/cinelerra-5.0/plugins/perspective/perspective.C +++ b/cinelerra-5.0/plugins/perspective/perspective.C @@ -670,6 +670,9 @@ void PerspectiveMain::save_data(KeyFrame *keyframe) output.tag.set_property("WINDOW_W", config.window_w); output.tag.set_property("WINDOW_H", config.window_h); output.append_tag(); + output.tag.set_title("/PERSPECTIVE"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/photoscale/photoscale.C b/cinelerra-5.0/plugins/photoscale/photoscale.C index 71639577..fd9b6ed2 100644 --- a/cinelerra-5.0/plugins/photoscale/photoscale.C +++ b/cinelerra-5.0/plugins/photoscale/photoscale.C @@ -445,6 +445,9 @@ void PhotoScaleMain::save_data(KeyFrame *keyframe) output.tag.set_property("HEIGHT", config.height); output.tag.set_property("USE_FILE", config.use_file); output.append_tag(); + output.tag.set_title("/PHOTOSCALE"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/piano/piano.C b/cinelerra-5.0/plugins/piano/piano.C index 033b91b2..3b471ba1 100644 --- a/cinelerra-5.0/plugins/piano/piano.C +++ b/cinelerra-5.0/plugins/piano/piano.C @@ -128,6 +128,9 @@ void Piano::save_data(KeyFrame *keyframe) config.oscillator_config.values[i]->save_data(&output); } + output.tag.set_title("/SYNTH"); + output.append_tag(); + output.append_newline(); output.terminate_string(); // data is now in *text } @@ -143,7 +146,8 @@ int Piano::show_gui() int Piano::set_string() { - if(thread) thread->window->set_title(gui_string); + if( thread ) + thread->window->set_title(gui_string); return 0; } diff --git a/cinelerra-5.0/plugins/pitch/pitch.C b/cinelerra-5.0/plugins/pitch/pitch.C index d49f4e14..bb3361b6 100644 --- a/cinelerra-5.0/plugins/pitch/pitch.C +++ b/cinelerra-5.0/plugins/pitch/pitch.C @@ -95,8 +95,9 @@ void PitchEffect::save_data(KeyFrame *keyframe) output.tag.set_property("SCALE", config.scale); output.tag.set_property("SIZE", config.size); output.append_tag(); + output.tag.set_title("/PITCH"); + output.append_tag(); output.append_newline(); - output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/polar/polar.C b/cinelerra-5.0/plugins/polar/polar.C index 0b964740..1752588e 100644 --- a/cinelerra-5.0/plugins/polar/polar.C +++ b/cinelerra-5.0/plugins/polar/polar.C @@ -316,6 +316,9 @@ void PolarEffect::save_data(KeyFrame *keyframe) output.tag.set_property("DEPTH", config.depth); output.tag.set_property("ANGLE", config.angle); output.append_tag(); + output.tag.set_title("/POLAR"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/radialblur/radialblur.C b/cinelerra-5.0/plugins/radialblur/radialblur.C index 04339ca8..7e536fec 100644 --- a/cinelerra-5.0/plugins/radialblur/radialblur.C +++ b/cinelerra-5.0/plugins/radialblur/radialblur.C @@ -465,6 +465,9 @@ void RadialBlurMain::save_data(KeyFrame *keyframe) output.tag.set_property("B", config.b); output.tag.set_property("A", config.a); output.append_tag(); + output.tag.set_title("/RADIALBLUR"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/reframert/reframert.C b/cinelerra-5.0/plugins/reframert/reframert.C index c9d086f9..edba7e12 100644 --- a/cinelerra-5.0/plugins/reframert/reframert.C +++ b/cinelerra-5.0/plugins/reframert/reframert.C @@ -432,6 +432,9 @@ void ReframeRT::save_data(KeyFrame *keyframe) output.tag.set_property("STRETCH", config.stretch); output.tag.set_property("INTERPOLATE", config.interp); output.append_tag(); + output.tag.set_title("/REFRAMERT"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/removegaps/removegaps.C b/cinelerra-5.0/plugins/removegaps/removegaps.C index a0538097..6107d9c5 100644 --- a/cinelerra-5.0/plugins/removegaps/removegaps.C +++ b/cinelerra-5.0/plugins/removegaps/removegaps.C @@ -293,6 +293,9 @@ void RemoveGaps::save_data(KeyFrame *keyframe) output.tag.set_property("DURATION", config.duration); output.tag.set_property("THRESHOLD", config.threshold); output.append_tag(); + output.tag.set_title("/REMOVEGAPS"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/resamplert/resamplert.C b/cinelerra-5.0/plugins/resamplert/resamplert.C index 7b956931..e6de8c34 100644 --- a/cinelerra-5.0/plugins/resamplert/resamplert.C +++ b/cinelerra-5.0/plugins/resamplert/resamplert.C @@ -258,6 +258,9 @@ void ResampleRT::save_data(KeyFrame *keyframe) output.tag.set_title("RESAMPLERT"); output.tag.set_property("SCALE", config.scale); output.append_tag(); + output.tag.set_title("/RESAMPLERT"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/reverb/reverb.C b/cinelerra-5.0/plugins/reverb/reverb.C index 1d4ec5fb..d309465e 100644 --- a/cinelerra-5.0/plugins/reverb/reverb.C +++ b/cinelerra-5.0/plugins/reverb/reverb.C @@ -315,10 +315,6 @@ void Reverb::save_data(KeyFrame *keyframe) output.tag.set_title("/REVERB"); output.append_tag(); output.append_newline(); -//printf("Reverb::save_data 1\n"); - - - output.terminate_string(); //printf("Reverb::save_data 2\n"); } @@ -598,7 +594,7 @@ void ReverbConfig::boundaries() void ReverbConfig::dump() { - printf("ReverbConfig::dump %f " _LD " %f %f " _LD " " _LD " " _LD " " _LD "\n", + printf("ReverbConfig::dump %f %jd %f %f %jd %jd %jd %jd\n", level_init, delay_init, ref_level1, ref_level2, ref_total, ref_length, lowpass1, lowpass2); } diff --git a/cinelerra-5.0/plugins/reverseaudio/reverseaudio.C b/cinelerra-5.0/plugins/reverseaudio/reverseaudio.C index a468c4d7..fbab14bd 100644 --- a/cinelerra-5.0/plugins/reverseaudio/reverseaudio.C +++ b/cinelerra-5.0/plugins/reverseaudio/reverseaudio.C @@ -319,6 +319,9 @@ void ReverseAudio::save_data(KeyFrame *keyframe) output.tag.set_title("REVERSEAUDIO"); output.tag.set_property("ENABLED", config.enabled); output.append_tag(); + output.tag.set_title("/REVERSEAUDIO"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/reversevideo/reversevideo.C b/cinelerra-5.0/plugins/reversevideo/reversevideo.C index 72db6dcd..367b0bdb 100644 --- a/cinelerra-5.0/plugins/reversevideo/reversevideo.C +++ b/cinelerra-5.0/plugins/reversevideo/reversevideo.C @@ -287,6 +287,9 @@ void ReverseVideo::save_data(KeyFrame *keyframe) output.tag.set_title("REVERSEVIDEO"); output.tag.set_property("ENABLED", config.enabled); output.append_tag(); + output.tag.set_title("/REVERSEVIDEO"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/rgb601/rgb601.C b/cinelerra-5.0/plugins/rgb601/rgb601.C index 1de2e00b..273fccea 100644 --- a/cinelerra-5.0/plugins/rgb601/rgb601.C +++ b/cinelerra-5.0/plugins/rgb601/rgb601.C @@ -91,6 +91,9 @@ void RGB601Main::save_data(KeyFrame *keyframe) output.tag.set_title("RGB601"); output.tag.set_property("DIRECTION", config.direction); output.append_tag(); + output.tag.set_title("/RGB601"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/rgbshift/rgbshift.C b/cinelerra-5.0/plugins/rgbshift/rgbshift.C index b4b705c5..e192f25f 100644 --- a/cinelerra-5.0/plugins/rgbshift/rgbshift.C +++ b/cinelerra-5.0/plugins/rgbshift/rgbshift.C @@ -244,6 +244,9 @@ void RGBShiftEffect::save_data(KeyFrame *keyframe) output.tag.set_property("B_DX", config.b_dx); output.tag.set_property("B_DY", config.b_dy); output.append_tag(); + output.tag.set_title("/RGBSHIFT"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/rotate/rotate.C b/cinelerra-5.0/plugins/rotate/rotate.C index e3eb8dd5..0ebeb60d 100644 --- a/cinelerra-5.0/plugins/rotate/rotate.C +++ b/cinelerra-5.0/plugins/rotate/rotate.C @@ -643,6 +643,9 @@ void RotateEffect::save_data(KeyFrame *keyframe) output.tag.set_property("DRAW_PIVOT", (int)config.draw_pivot); // output.tag.set_property("INTERPOLATE", (int)config.bilinear); output.append_tag(); + output.tag.set_title("/ROTATE"); + output.append_tag(); + output.append_newline(); output.terminate_string(); // data is now in *text } diff --git a/cinelerra-5.0/plugins/scale/scale.C b/cinelerra-5.0/plugins/scale/scale.C index 6f4ffb26..f4285f40 100644 --- a/cinelerra-5.0/plugins/scale/scale.C +++ b/cinelerra-5.0/plugins/scale/scale.C @@ -128,6 +128,9 @@ void ScaleMain::save_data(KeyFrame *keyframe) output.tag.set_property("HEIGHT", config.height); output.tag.set_property("CONSTRAIN", config.constrain); output.append_tag(); + output.tag.set_title("/SCALE"); + output.append_tag(); + output.append_newline(); output.terminate_string(); // data is now in *text } diff --git a/cinelerra-5.0/plugins/sharpen/sharpen.C b/cinelerra-5.0/plugins/sharpen/sharpen.C index 11324252..c8384934 100644 --- a/cinelerra-5.0/plugins/sharpen/sharpen.C +++ b/cinelerra-5.0/plugins/sharpen/sharpen.C @@ -207,25 +207,13 @@ void SharpenMain::save_data(KeyFrame *keyframe) output.set_shared_output(keyframe->get_data(), MESSAGESIZE); output.tag.set_title("SHARPNESS"); output.tag.set_property("VALUE", config.sharpness); + output.tag.set_property("INTERLACE", config.interlace); + output.tag.set_property("HORIZONTAL", config.horizontal); + output.tag.set_property("LUMINANCE", config.luminance); output.append_tag(); - - if(config.interlace) - { - output.tag.set_title("INTERLACE"); - output.append_tag(); - } - - if(config.horizontal) - { - output.tag.set_title("HORIZONTAL"); - output.append_tag(); - } - - if(config.luminance) - { - output.tag.set_title("LUMINANCE"); - output.append_tag(); - } + output.tag.set_title("/SHARPNESS"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } @@ -236,9 +224,6 @@ void SharpenMain::read_data(KeyFrame *keyframe) input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); int result = 0; - int new_interlace = 0; - int new_horizontal = 0; - int new_luminance = 0; while(!result) { @@ -249,30 +234,14 @@ void SharpenMain::read_data(KeyFrame *keyframe) if(input.tag.title_is("SHARPNESS")) { config.sharpness = input.tag.get_property("VALUE", config.sharpness); + config.interlace = input.tag.get_property("INTERLACE", config.interlace); + config.horizontal = input.tag.get_property("HORIZONTAL", config.horizontal); + config.luminance = input.tag.get_property("LUMINANCE", config.luminance); //printf("SharpenMain::read_data %f\n", sharpness); } - else - if(input.tag.title_is("INTERLACE")) - { - new_interlace = 1; - } - else - if(input.tag.title_is("HORIZONTAL")) - { - new_horizontal = 1; - } - else - if(input.tag.title_is("LUMINANCE")) - { - new_luminance = 1; - } } } - config.interlace = new_interlace; - config.horizontal = new_horizontal; - config.luminance = new_luminance; - if(config.sharpness > MAXSHARPNESS) config.sharpness = MAXSHARPNESS; else diff --git a/cinelerra-5.0/plugins/shiftinterlace/shiftinterlace.C b/cinelerra-5.0/plugins/shiftinterlace/shiftinterlace.C index 47d45cc9..3e6b57be 100644 --- a/cinelerra-5.0/plugins/shiftinterlace/shiftinterlace.C +++ b/cinelerra-5.0/plugins/shiftinterlace/shiftinterlace.C @@ -282,6 +282,8 @@ void ShiftInterlaceMain::save_data(KeyFrame *keyframe) output.tag.set_property("ODD_OFFSET", config.odd_offset); output.tag.set_property("EVEN_OFFSET", config.even_offset); output.append_tag(); + output.tag.set_title("/SHIFTINTERLACE"); + output.append_tag(); output.append_newline(); output.terminate_string(); // data is now in *text diff --git a/cinelerra-5.0/plugins/slide/slide.C b/cinelerra-5.0/plugins/slide/slide.C index 5692a713..ad03b5c1 100644 --- a/cinelerra-5.0/plugins/slide/slide.C +++ b/cinelerra-5.0/plugins/slide/slide.C @@ -223,6 +223,9 @@ void SlideMain::save_data(KeyFrame *keyframe) output.tag.set_property("MOTION_DIRECTION", motion_direction); output.tag.set_property("DIRECTION", direction); output.append_tag(); + output.tag.set_title("/SLIDE"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/spectrogram/spectrogram.C b/cinelerra-5.0/plugins/spectrogram/spectrogram.C index f78c60c4..ff971a7d 100644 --- a/cinelerra-5.0/plugins/spectrogram/spectrogram.C +++ b/cinelerra-5.0/plugins/spectrogram/spectrogram.C @@ -1249,6 +1249,8 @@ void Spectrogram::save_data(KeyFrame *keyframe) output.tag.set_property("W", (int)w); output.tag.set_property("H", (int)h); output.append_tag(); + output.tag.set_title("/SPECTROGRAM"); + output.append_tag(); output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/swapchannels/swapchannels.C b/cinelerra-5.0/plugins/swapchannels/swapchannels.C index f15b06ee..bbfd4e6a 100644 --- a/cinelerra-5.0/plugins/swapchannels/swapchannels.C +++ b/cinelerra-5.0/plugins/swapchannels/swapchannels.C @@ -227,6 +227,8 @@ void SwapMain::save_data(KeyFrame *keyframe) output.tag.set_property("BLUE", config.blue); output.tag.set_property("ALPHA", config.alpha); output.append_tag(); + output.tag.set_title("/SWAPCHANNELS"); + output.append_tag(); output.append_newline(); output.terminate_string(); // data is now in *text diff --git a/cinelerra-5.0/plugins/swapframes/swapframes.C b/cinelerra-5.0/plugins/swapframes/swapframes.C index cfe4d3b0..c6280972 100644 --- a/cinelerra-5.0/plugins/swapframes/swapframes.C +++ b/cinelerra-5.0/plugins/swapframes/swapframes.C @@ -243,6 +243,9 @@ void SwapFrames::save_data(KeyFrame *keyframe) output.tag.set_property("ON", config.on); output.tag.set_property("SWAP_EVEN", config.swap_even); output.append_tag(); + output.tag.set_title("/SWAPFRAMES"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/synthesizer/synthesizer.C b/cinelerra-5.0/plugins/synthesizer/synthesizer.C index 0188d07f..546aaf91 100644 --- a/cinelerra-5.0/plugins/synthesizer/synthesizer.C +++ b/cinelerra-5.0/plugins/synthesizer/synthesizer.C @@ -164,6 +164,9 @@ void Synth::save_data(KeyFrame *keyframe) config.oscillator_config.values[i]->save_data(&output); } + output.tag.set_title("/SYNTH"); + output.append_tag(); + output.append_newline(); output.terminate_string(); //printf("Synth::save_data %d %s\n", __LINE__, output.string); // data is now in *text diff --git a/cinelerra-5.0/plugins/threshold/threshold.C b/cinelerra-5.0/plugins/threshold/threshold.C index 5e269aa0..b61fb48e 100644 --- a/cinelerra-5.0/plugins/threshold/threshold.C +++ b/cinelerra-5.0/plugins/threshold/threshold.C @@ -127,15 +127,8 @@ ThresholdMain::~ThresholdMain() delete threshold_engine; } -int ThresholdMain::is_realtime() -{ - return 1; -} - -const char* ThresholdMain::plugin_title() -{ - return _("Threshold"); -} +const char* ThresholdMain::plugin_title() { return _("Threshold"); } +int ThresholdMain::is_realtime() { return 1; } @@ -175,38 +168,39 @@ int ThresholdMain::process_buffer(VFrame *frame, void ThresholdMain::save_data(KeyFrame *keyframe) { - FileXML file; - file.set_shared_output(keyframe->get_data(), MESSAGESIZE); - file.tag.set_title("THRESHOLD"); - file.tag.set_property("MIN", config.min); - file.tag.set_property("MAX", config.max); - file.tag.set_property("PLOT", config.plot); - config.low_color.set_property(file.tag, "LOW_COLOR"); - config.mid_color.set_property(file.tag, "MID_COLOR"); - config.high_color.set_property(file.tag, "HIGH_COLOR"); - file.append_tag(); - file.tag.set_title("/THRESHOLD"); - file.append_tag(); - file.terminate_string(); + FileXML output; + output.set_shared_output(keyframe->get_data(), MESSAGESIZE); + output.tag.set_title("THRESHOLD"); + output.tag.set_property("MIN", config.min); + output.tag.set_property("MAX", config.max); + output.tag.set_property("PLOT", config.plot); + config.low_color.set_property(output.tag, "LOW_COLOR"); + config.mid_color.set_property(output.tag, "MID_COLOR"); + config.high_color.set_property(output.tag, "HIGH_COLOR"); + output.append_tag(); + output.tag.set_title("/THRESHOLD"); + output.append_tag(); + output.append_newline(); + output.terminate_string(); } void ThresholdMain::read_data(KeyFrame *keyframe) { - FileXML file; + FileXML input; const char *data = keyframe->get_data(); - file.set_shared_input((char *)data, strlen(data)); + input.set_shared_input((char *)data, strlen(data)); int result = 0; while(!result) { - result = file.read_tag(); + result = input.read_tag(); if(!result) { - config.min = file.tag.get_property("MIN", config.min); - config.max = file.tag.get_property("MAX", config.max); - config.plot = file.tag.get_property("PLOT", config.plot); - config.low_color = config.low_color.get_property(file.tag, "LOW_COLOR"); - config.mid_color = config.mid_color.get_property(file.tag, "MID_COLOR"); - config.high_color = config.high_color.get_property(file.tag, "HIGH_COLOR"); + config.min = input.tag.get_property("MIN", config.min); + config.max = input.tag.get_property("MAX", config.max); + config.plot = input.tag.get_property("PLOT", config.plot); + config.low_color = config.low_color.get_property(input.tag, "LOW_COLOR"); + config.mid_color = config.mid_color.get_property(input.tag, "MID_COLOR"); + config.high_color = config.high_color.get_property(input.tag, "HIGH_COLOR"); } } config.boundaries(); diff --git a/cinelerra-5.0/plugins/threshold/thresholdwindow.C b/cinelerra-5.0/plugins/threshold/thresholdwindow.C index 0178326c..4fb3bb21 100644 --- a/cinelerra-5.0/plugins/threshold/thresholdwindow.C +++ b/cinelerra-5.0/plugins/threshold/thresholdwindow.C @@ -379,7 +379,7 @@ int ThresholdLowColorThread::handle_new_color(int output, int alpha) window->update_low_color(); window->flush(); plugin->send_configure_change(); - return 0; + return 1; } @@ -399,7 +399,7 @@ int ThresholdMidColorThread::handle_new_color(int output, int alpha) window->update_mid_color(); window->flush(); plugin->send_configure_change(); - return 0; + return 1; } @@ -419,7 +419,7 @@ int ThresholdHighColorThread::handle_new_color(int output, int alpha) window->update_high_color(); window->flush(); plugin->send_configure_change(); - return 0; + return 1; } diff --git a/cinelerra-5.0/plugins/timeavg/timeavg.C b/cinelerra-5.0/plugins/timeavg/timeavg.C index 445bbf7f..7b7a0921 100644 --- a/cinelerra-5.0/plugins/timeavg/timeavg.C +++ b/cinelerra-5.0/plugins/timeavg/timeavg.C @@ -372,7 +372,7 @@ int TimeAvgMain::process_buffer(VFrame *frame, reset_accum(w, h, color_model); } -// printf("TimeAvgMain::process_buffer %d prev_frame=" _LD " start_position=" _LD "\n", +// printf("TimeAvgMain::process_buffer %d prev_frame=%jd start_position=%jd\n", // __LINE__, prev_frame, start_position); for(int64_t i = prev_frame; i <= start_position; i++) { @@ -382,7 +382,7 @@ int TimeAvgMain::process_buffer(VFrame *frame, frame_rate, 0); add_accum(frame); -printf("TimeAvgMain::process_buffer %d prev_frame=" _LD " start_position=" _LD " i=" _LD "\n", +printf("TimeAvgMain::process_buffer %d prev_frame=%jd start_position=%jd i=%jd\n", __LINE__, prev_frame, start_position, i); } @@ -1036,6 +1036,9 @@ void TimeAvgMain::save_data(KeyFrame *keyframe) output.tag.set_property("THRESHOLD", config.threshold); output.tag.set_property("BORDER", config.border); output.append_tag(); + output.tag.set_title("/TIME_AVERAGE"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/timefront/timefront.C b/cinelerra-5.0/plugins/timefront/timefront.C index 88dc2987..ead498d1 100644 --- a/cinelerra-5.0/plugins/timefront/timefront.C +++ b/cinelerra-5.0/plugins/timefront/timefront.C @@ -432,7 +432,7 @@ int TimeFrontTrackUsage::handle_event() plugin->config.track_usage = from_text(get_text()); gui->update_shape(); plugin->send_configure_change(); - return 0; + return 1; } @@ -1117,6 +1117,9 @@ void TimeFrontMain::save_data(KeyFrame *keyframe) output.tag.set_property("INVERT", config.invert); output.tag.set_property("SHOW_GRAYSCALE", config.show_grayscale); output.append_tag(); + output.tag.set_title("/TIMEFRONT"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/timestretchrt/timestretchrt.C b/cinelerra-5.0/plugins/timestretchrt/timestretchrt.C index 3df979b8..c36d68ee 100644 --- a/cinelerra-5.0/plugins/timestretchrt/timestretchrt.C +++ b/cinelerra-5.0/plugins/timestretchrt/timestretchrt.C @@ -242,7 +242,7 @@ int TimeStretchRT::process_buffer(int64_t size, engine->update(config.scale, sample_rate, config.size); need_reconfigure = 0; //printf("TimeStretchRT::process_buffer %d start_position=" _LD -// " prev_position=" _LD " scale=%f source_start=" _LD "\n", +// " prev_position=%jd scale=%f source_start=%jd\n", // __LINE__, start_position, prev_position, config.scale, source_start); } @@ -301,6 +301,9 @@ void TimeStretchRT::save_data(KeyFrame *keyframe) output.tag.set_property("SCALE", config.scale); output.tag.set_property("SIZE", config.size); output.append_tag(); + output.tag.set_title("/TIMESTRETCHRT"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/titler/title.C b/cinelerra-5.0/plugins/titler/title.C index 8ccdb2a3..2379201d 100644 --- a/cinelerra-5.0/plugins/titler/title.C +++ b/cinelerra-5.0/plugins/titler/title.C @@ -1384,15 +1384,22 @@ int TitleMain::load_freetype_face(FT_Library &freetype_library, BC_FontEntry* TitleMain::get_font() { int style = 0; - int mask; - - style |= (config.style & BC_FONT_ITALIC) ? FL_SLANT_ITALIC : FL_SLANT_ROMAN; - style |= (config.style & BC_FONT_BOLD) ? FL_WEIGHT_BOLD : FL_WEIGHT_NORMAL; + int mask, pref; + + style |= (config.style & BC_FONT_ITALIC) ? + FL_SLANT_ITALIC | FL_SLANT_OBLIQUE : FL_SLANT_ROMAN; + style |= (config.style & BC_FONT_BOLD) ? + FL_WEIGHT_BOLD | FL_WEIGHT_DEMIBOLD | + FL_WEIGHT_EXTRABOLD| FL_WEIGHT_BLACK | FL_WEIGHT_EXTRABLACK : + FL_WEIGHT_BOOK | FL_WEIGHT_NORMAL | FL_WEIGHT_MEDIUM | + FL_WEIGHT_LIGHT | FL_WEIGHT_EXTRALIGHT | FL_WEIGHT_THIN; + + pref = style & (FL_SLANT_ITALIC | FL_WEIGHT_BOLD | FL_WEIGHT_NORMAL); mask = FL_WEIGHT_MASK | FL_SLANT_MASK; BC_Resources *resources = BC_WindowBase::get_resources(); - return resources->find_fontentry(config.font, style, mask); + return resources->find_fontentry(config.font, style, mask, pref); } int TitleMain::get_char_height() diff --git a/cinelerra-5.0/plugins/titler/titlewindow.C b/cinelerra-5.0/plugins/titler/titlewindow.C index a2ad2cf7..17178fc3 100644 --- a/cinelerra-5.0/plugins/titler/titlewindow.C +++ b/cinelerra-5.0/plugins/titler/titlewindow.C @@ -242,17 +242,23 @@ void TitleWindow::create_objects() add_tool(style_title = new BC_Title(x, y, _("Style:"))); add_tool(italic = new TitleItalic(client, this, x, y + 20)); + int w1 = italic->get_w(); add_tool(bold = new TitleBold(client, this, x, y + 50)); + if( bold->get_w() > w1 ) w1 = bold->get_w(); #ifdef USE_OUTLINE - add_tool(stroke = new TitleStroke(client, this, x, y + 110)); + add_tool(stroke = new TitleStroke(client, this, x, y + 80)); + if( stroke->get_w() > w1 ) w1 = stroke->get_w(); #endif - x += 90; + x += w1 + 10; add_tool(justify_title = new BC_Title(x, y, _("Justify:"))); add_tool(left = new TitleLeft(client, this, x, y + 20)); + w1 = left->get_w(); add_tool(center = new TitleCenter(client, this, x, y + 50)); + if( center->get_w() > w1 ) w1 = center->get_w(); add_tool(right = new TitleRight(client, this, x, y + 80)); + if( right->get_w() > w1 ) w1 = right->get_w(); - x += 80; + x += w1 + 10; add_tool(top = new TitleTop(client, this, x, y + 20)); add_tool(mid = new TitleMid(client, this, x, y + 50)); add_tool(bottom= new TitleBottom(client, this, x, y + 80)); @@ -282,28 +288,36 @@ void TitleWindow::create_objects() y += 50; add_tool(dropshadow_title = new BC_Title(x, y, _("Drop shadow:"))); + w1 = dropshadow_title->get_w(); dropshadow = new TitleDropShadow(client, this, x, y + 20); dropshadow->create_objects(); - x += 100; + if( dropshadow->get_w() > w1 ) w1 = dropshadow->get_w(); + x += w1 + 10; add_tool(fadein_title = new BC_Title(x, y, _("Fade in (sec):"))); + w1 = fadein_title->get_w(); add_tool(fade_in = new TitleFade(client, this, &client->config.fade_in, x, y + 20)); - x += 100; + if( fade_in->get_w() > w1 ) w1 = fade_in->get_w(); + x += w1 + 10; add_tool(fadeout_title = new BC_Title(x, y, _("Fade out (sec):"))); + w1 = fadeout_title->get_w(); add_tool(fade_out = new TitleFade(client, this, &client->config.fade_out, x, y + 20)); - x += 110; + if( fade_out->get_w() > w1 ) w1 = fade_out->get_w(); + x += w1 + 10; add_tool(speed_title = new BC_Title(x, y, _("Speed:"))); + w1 = speed_title->get_w(); speed = new TitleSpeed(client, this, x, y + 20); speed->create_objects(); - x += 110; + if( speed->get_w() > w1 ) w1 = speed->get_w(); + x += w1 + 10; color_x = x; - color_y = y + 20; + color_y = y + 16; x += COLOR_W + 5; - add_tool(color_button = new TitleColorButton(client, this, x, y + 20, 0)); - x += color_button->get_w(); + add_tool(color_button = new TitleColorButton(client, this, x, y + 16, 0)); + x += color_button->get_w() + 5; color_thread = new TitleColorThread(client, this, 0); x = color_x; diff --git a/cinelerra-5.0/plugins/translate/translate.C b/cinelerra-5.0/plugins/translate/translate.C index 72bf5df7..13e42388 100644 --- a/cinelerra-5.0/plugins/translate/translate.C +++ b/cinelerra-5.0/plugins/translate/translate.C @@ -137,7 +137,9 @@ void TranslateMain::save_data(KeyFrame *keyframe) output.tag.set_property("OUT_W", config.out_w); output.tag.set_property("OUT_H", config.out_h); output.append_tag(); - + output.tag.set_title("/TRANSLATE"); + output.append_tag(); + output.append_newline(); output.terminate_string(); // data is now in *text } @@ -172,25 +174,24 @@ void TranslateMain::read_data(KeyFrame *keyframe) } - - - - - +#define EPSILON 0.001 int TranslateMain::process_realtime(VFrame *input_ptr, VFrame *output_ptr) { - VFrame *input, *output; - - - input = input_ptr; - output = output_ptr; + VFrame *input = input_ptr; + VFrame *output = output_ptr; load_configuration(); //printf("TranslateMain::process_realtime 1 %p\n", input); - if(input->get_rows()[0] == output->get_rows()[0]) - { + if( input->get_rows()[0] == output->get_rows()[0] ) { + if( temp_frame && ( + temp_frame->get_w() != input_ptr->get_w() || + temp_frame->get_h() != input_ptr->get_h() || + temp_frame->get_color_model() != input_ptr->get_color_model() ) ) { + delete temp_frame; + temp_frame = 0; + } if(!temp_frame) temp_frame = new VFrame(0, -1, @@ -211,39 +212,87 @@ int TranslateMain::process_realtime(VFrame *input_ptr, VFrame *output_ptr) output->clear_frame(); + if( config.in_w < EPSILON ) return 1; + if( config.in_h < EPSILON ) return 1; + if( config.out_w < EPSILON ) return 1; + if( config.out_h < EPSILON ) return 1; -// printf("TranslateMain::process_realtime 3 output=%p input=%p config.w=%f config.h=%f" -// "%f %f %f %f -> %f %f %f %f\n", output, input, config.w, config.h, -// in_x1, in_y1, in_x2, in_y2, out_x1, out_y1, out_x2, out_y2); - overlayer->overlay(output, input, - config.in_x, config.in_y, - config.in_x + config.in_w, config.in_y + config.in_h, - config.out_x, config.out_y, - config.out_x + config.out_w, config.out_y + config.out_h, - 1, TRANSFER_REPLACE, get_interpolation_type()); - return 0; -} + float ix1 = config.in_x, ox1 = config.out_x; + float ix2 = ix1 + config.in_w; + if( ix1 < 0 ) { + ox1 -= ix1; + ix2 = config.in_w; + ix1 = 0; + } + + if(ix2 > output->get_w()) + ix2 = output->get_w(); + float iy1 = config.in_y, oy1 = config.out_y; + float iy2 = iy1 + config.in_h; + + if( iy1 < 0 ) { + oy1 -= iy1; + iy2 = config.in_h; + iy1 = 0; + } + + if( iy2 > output->get_h() ) + iy2 = output->get_h(); + + float cx = config.out_w / config.in_w; + float cy = config.out_h / config.in_h; + + float ox2 = ox1 + (ix2 - ix1) * cx; + float oy2 = oy1 + (iy2 - iy1) * cy; + + if( ox1 < 0 ) { + ix1 += -ox1 / cx; + ox1 = 0; + } + if( oy1 < 0 ) { + iy1 += -oy1 / cy; + oy1 = 0; + } + if( ox2 > output->get_w() ) { + ix2 -= (ox2 - output->get_w()) / cx; + ox2 = output->get_w(); + } + if( oy2 > output->get_h() ) { + iy2 -= (oy2 - output->get_h()) / cy; + oy2 = output->get_h(); + } + + if( ix1 >= ix2 ) return 1; + if( iy1 >= iy2 ) return 1; + if( ox1 >= ox2 ) return 1; + if( oy1 >= oy2 ) return 1; + + overlayer->overlay(output, input, + ix1, iy1, ix2, iy2, + ox1, oy1, ox2, oy2, + 1, TRANSFER_REPLACE, + get_interpolation_type()); + return 0; +} NEW_WINDOW_MACRO(TranslateMain, TranslateWin) void TranslateMain::update_gui() { - if(thread) - { - if(load_configuration()) - { - thread->window->lock_window(); - ((TranslateWin*)thread->window)->in_x->update(config.in_x); - ((TranslateWin*)thread->window)->in_y->update(config.in_y); - ((TranslateWin*)thread->window)->in_w->update(config.in_w); - ((TranslateWin*)thread->window)->in_h->update(config.in_h); - ((TranslateWin*)thread->window)->out_x->update(config.out_x); - ((TranslateWin*)thread->window)->out_y->update(config.out_y); - ((TranslateWin*)thread->window)->out_w->update(config.out_w); - ((TranslateWin*)thread->window)->out_h->update(config.out_h); - thread->window->unlock_window(); - } - } + if( !thread ) return; + if( !load_configuration() ) return; + + TranslateWin *window = (TranslateWin*)thread->window; + window->lock_window(); + window->in_x->update(config.in_x); + window->in_y->update(config.in_y); + window->in_w->update(config.in_w); + window->in_h->update(config.in_h); + window->out_x->update(config.out_x); + window->out_y->update(config.out_y); + window->out_w->update(config.out_w); + window->out_h->update(config.out_h); + window->unlock_window(); } diff --git a/cinelerra-5.0/plugins/unsharp/unsharp.C b/cinelerra-5.0/plugins/unsharp/unsharp.C index 186e24a5..3e50ac68 100644 --- a/cinelerra-5.0/plugins/unsharp/unsharp.C +++ b/cinelerra-5.0/plugins/unsharp/unsharp.C @@ -140,6 +140,9 @@ void UnsharpMain::save_data(KeyFrame *keyframe) output.tag.set_property("AMOUNT", config.amount); output.tag.set_property("THRESHOLD", config.threshold); output.append_tag(); + output.tag.set_title("/UNSHARP"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/videoscope/videoscope.C b/cinelerra-5.0/plugins/videoscope/videoscope.C index 586fb3e3..178091cf 100644 --- a/cinelerra-5.0/plugins/videoscope/videoscope.C +++ b/cinelerra-5.0/plugins/videoscope/videoscope.C @@ -263,6 +263,8 @@ void VideoScopeEffect::save_data(KeyFrame *keyframe) output.tag.set_property("USE_WAVE_PARADE", use_wave_parade); } + output.append_tag(); + output.tag.set_title("/VIDEOSCOPE"); output.append_tag(); output.append_newline(); output.terminate_string(); diff --git a/cinelerra-5.0/plugins/vocoder/vocoder.C b/cinelerra-5.0/plugins/vocoder/vocoder.C index 7d3c03c4..8f60d76b 100644 --- a/cinelerra-5.0/plugins/vocoder/vocoder.C +++ b/cinelerra-5.0/plugins/vocoder/vocoder.C @@ -398,8 +398,9 @@ void Vocoder::save_data(KeyFrame *keyframe) output.tag.set_property("OUTPUT", config.carrier_track); output.tag.set_property("BANDS", config.bands); output.append_tag(); + output.tag.set_title("/VOCODER"); + output.append_tag(); output.append_newline(); - output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/wave/wave.C b/cinelerra-5.0/plugins/wave/wave.C index 412527e3..ce37965c 100644 --- a/cinelerra-5.0/plugins/wave/wave.C +++ b/cinelerra-5.0/plugins/wave/wave.C @@ -486,6 +486,9 @@ void WaveEffect::save_data(KeyFrame *keyframe) output.tag.set_property("PHASE", config.phase); output.tag.set_property("WAVELENGTH", config.wavelength); output.append_tag(); + output.tag.set_title("/WAVE"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/whirl/whirl.C b/cinelerra-5.0/plugins/whirl/whirl.C index d36f776a..d1a20435 100644 --- a/cinelerra-5.0/plugins/whirl/whirl.C +++ b/cinelerra-5.0/plugins/whirl/whirl.C @@ -401,6 +401,9 @@ void WhirlEffect::save_data(KeyFrame *keyframe) output.tag.set_property("PINCH", config.pinch); output.tag.set_property("RADIUS", config.radius); output.append_tag(); + output.tag.set_title("/WHIRL"); + output.append_tag(); + output.append_newline(); output.terminate_string(); // data is now in *text } diff --git a/cinelerra-5.0/plugins/wipe/wipe.C b/cinelerra-5.0/plugins/wipe/wipe.C index afa5d2ac..d5163652 100644 --- a/cinelerra-5.0/plugins/wipe/wipe.C +++ b/cinelerra-5.0/plugins/wipe/wipe.C @@ -158,6 +158,9 @@ void WipeMain::save_data(KeyFrame *keyframe) output.tag.set_title("WIPE"); output.tag.set_property("DIRECTION", direction); output.append_tag(); + output.tag.set_title("/WIPE"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/yuv/yuv.C b/cinelerra-5.0/plugins/yuv/yuv.C index 99a81dc5..4cdad02a 100644 --- a/cinelerra-5.0/plugins/yuv/yuv.C +++ b/cinelerra-5.0/plugins/yuv/yuv.C @@ -235,6 +235,9 @@ void YUVEffect::save_data(KeyFrame *keyframe) output.tag.set_property("U", config.u); output.tag.set_property("V", config.v); output.append_tag(); + output.tag.set_title("/YUV"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/yuvshift/yuvshift.C b/cinelerra-5.0/plugins/yuvshift/yuvshift.C index 98f0d743..b1ab69c3 100644 --- a/cinelerra-5.0/plugins/yuvshift/yuvshift.C +++ b/cinelerra-5.0/plugins/yuvshift/yuvshift.C @@ -244,6 +244,9 @@ void YUVShiftEffect::save_data(KeyFrame *keyframe) output.tag.set_property("V_DX", config.v_dx); output.tag.set_property("V_DY", config.v_dy); output.append_tag(); + output.tag.set_title("/YUVSHIFT"); + output.append_tag(); + output.append_newline(); output.terminate_string(); } diff --git a/cinelerra-5.0/plugins/zoomblur/zoomblur.C b/cinelerra-5.0/plugins/zoomblur/zoomblur.C index 246d33f3..2b38a4da 100644 --- a/cinelerra-5.0/plugins/zoomblur/zoomblur.C +++ b/cinelerra-5.0/plugins/zoomblur/zoomblur.C @@ -624,6 +624,9 @@ void ZoomBlurMain::save_data(KeyFrame *keyframe) output.tag.set_property("B", config.b); output.tag.set_property("A", config.a); output.append_tag(); + output.tag.set_title("/ZOOMBLUR"); + output.append_tag(); + output.append_newline(); output.terminate_string(); }