void BlurMain::read_data(KeyFrame *keyframe) { FileXML input; input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); int result = 0; while(!result) { result = input.read_tag(); if(!result) { if(input.tag.title_is("BLUR")) { config.vertical = input.tag.get_property("VERTICAL", config.vertical); config.horizontal = input.tag.get_property("HORIZONTAL", config.horizontal); config.radius = input.tag.get_property("RADIUS", config.radius); //printf("BlurMain::read_data 1 %d %d %s\n", get_source_position(), keyframe->position, keyframe->get_data()); config.r = input.tag.get_property("R", config.r); config.g = input.tag.get_property("G", config.g); config.b = input.tag.get_property("B", config.b); config.a = input.tag.get_property("A", config.a); config.a_key = input.tag.get_property("A_KEY", config.a_key); } } } }
void ColorBalanceMain::read_data(KeyFrame *keyframe) { FileXML input; input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); int result = 0; while(!result) { result = input.read_tag(); if(!result) { if(input.tag.title_is("COLORBALANCE")) { config.cyan = input.tag.get_property("CYAN", config.cyan); config.magenta = input.tag.get_property("MAGENTA", config.magenta); config.yellow = input.tag.get_property("YELLOW", config.yellow); config.preserve = input.tag.get_property("PRESERVELUMINOSITY", config.preserve); config.lock_params = input.tag.get_property("LOCKPARAMS", config.lock_params); } } } }
void ParametricEQ::read_data(KeyFrame *keyframe) { FileXML input; input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); int result = 0; while(!result) { result = input.read_tag(); if(!result) { if(input.tag.title_is("PARAMETRICEQ")) { config.wetness = input.tag.get_property("WETNESS", config.wetness); config.window_size = input.tag.get_property("WINDOW_SIZE", config.window_size); } else if(input.tag.title_is("BAND")) { int band = input.tag.get_property("NUMBER", 0); config.band[band].freq = input.tag.get_property("FREQ", config.band[band].freq); config.band[band].quality = input.tag.get_property("QUALITY", config.band[band].quality); config.band[band].magnitude = input.tag.get_property("MAGNITUDE", config.band[band].magnitude); config.band[band].mode = input.tag.get_property("MODE", config.band[band].mode); } } } }
void PluginAClientLAD::read_data(KeyFrame *keyframe) { FileXML input; char string[BCTEXTLEN]; input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); config.initialize(server); while(! input.read_tag() ) { //printf("PluginAClientLAD::read_data %s\n", input.tag.get_title()); if(! input.tag.title_is(lad_to_upper(string, plugin_title())) ) continue; const LADSPA_Descriptor *lad_desc = server->lad_descriptor; const LADSPA_PortDescriptor *port_desc = lad_desc->PortDescriptors; int port_count = lad_desc->PortCount; for(int port = 0, i = 0; i < port_count; i++) { if( !LADSPA_IS_PORT_INPUT(port_desc[i]) ) continue; if( !LADSPA_IS_PORT_CONTROL(port_desc[i]) ) continue; PluginAClientLAD::lad_to_upper(string, (char*)lad_desc->PortNames[i]); config.port_data[port] = input.tag.get_property(string, config.port_data[port]); //printf("PluginAClientLAD::read_data %d %f\n", port, config.port_data[port]); port++; } } }
void RGB601Main::read_data(KeyFrame *keyframe) { FileXML input; input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); int result = 0; while(!result) { result = input.read_tag(); if(!result) { if(input.tag.title_is("RGB601")) { config.direction = input.tag.get_property("DIRECTION", config.direction); } } } if(thread) { ((RGB601Window*)thread->window)->update(); } }
void IVTCMain::read_data(KeyFrame *keyframe) { FileXML input; input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); int result = 0; //float new_threshold; while(!result) { result = input.read_tag(); if(!result) { if(input.tag.title_is("IVTC")) { config.frame_offset = input.tag.get_property("FRAME_OFFSET", config.frame_offset); config.first_field = input.tag.get_property("FIRST_FIELD", config.first_field); config.automatic = input.tag.get_property("AUTOMATIC", config.automatic); //new_threshold = input.tag.get_property("AUTO_THRESHOLD", config.auto_threshold); config.pattern = input.tag.get_property("PATTERN", config.pattern); } } } }
void TranslateMain::read_data(KeyFrame *keyframe) { FileXML input; input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); int result = 0; while(!result) { result = input.read_tag(); if(!result) { if(input.tag.title_is("TRANSLATE")) { config.in_x = input.tag.get_property("IN_X", config.in_x); config.in_y = input.tag.get_property("IN_Y", config.in_y); config.in_w = input.tag.get_property("IN_W", config.in_w); config.in_h = input.tag.get_property("IN_H", config.in_h); config.out_x = input.tag.get_property("OUT_X", config.out_x); config.out_y = input.tag.get_property("OUT_Y", config.out_y); config.out_w = input.tag.get_property("OUT_W", config.out_w); config.out_h = input.tag.get_property("OUT_H", config.out_h); } } } }
void SelTempAvgMain::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("SELECTIVE_TEMPORAL_AVERAGE")) { config.frames = input.tag.get_property("FRAMES", config.frames); config.method = input.tag.get_property("METHOD", config.method); config.offsetmode = input.tag.get_property("OFFSETMODE", config.offsetmode); config.paranoid = input.tag.get_property("PARANOID", config.paranoid); config.nosubtract = input.tag.get_property("NOSUBTRACT", config.nosubtract); config.offset_restartmarker_keyframe = input.tag.get_property("OFFSETMODE_RESTARTMODE_KEYFRAME", config.offset_restartmarker_keyframe); config.offset_fixed_value = input.tag.get_property("OFFSETMODE_FIXED_VALUE", config.offset_fixed_value); config.gain = input.tag.get_property("gain", config.gain); config.avg_threshold_RY = input.tag.get_property("AVG_THRESHOLD_RY", config.avg_threshold_RY); config.avg_threshold_GU = input.tag.get_property("AVG_THRESHOLD_GU", config.avg_threshold_GU); config.avg_threshold_BV = input.tag.get_property("AVG_THRESHOLD_BV", config.avg_threshold_BV); config.std_threshold_RY = input.tag.get_property("STD_THRESHOLD_RY", config.std_threshold_RY); config.std_threshold_GU = input.tag.get_property("STD_THRESHOLD_GU", config.std_threshold_GU); config.std_threshold_BV = input.tag.get_property("STD_THRESHOLD_BV", config.std_threshold_BV); config.mask_RY = input.tag.get_property("MASK_RY", config.mask_RY); config.mask_GU = input.tag.get_property("MASK_GU", config.mask_GU); config.mask_BV = input.tag.get_property("MASK_BV", config.mask_BV); } } }
void Synth::read_data(KeyFrame *keyframe) { FileXML input; char string[BCTEXTLEN]; // cause htal file to read directly from text input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); //printf("Synth::read_data %s\n", keyframe->get_data()); int result = 0, current_osc = 0; //int total_oscillators = 0; while(!result) { result = input.read_tag(); if(!result) { if(input.tag.title_is("SYNTH")) { config.wetness = input.tag.get_property("WETNESS", config.wetness); if(is_defaults()) { window_w = input.tag.get_property("WINDOW_W", window_w); window_h = input.tag.get_property("WINDOW_H", window_h); } config.momentary_notes = input.tag.get_property("MOMENTARY_NOTES", config.momentary_notes); //printf("Synth::read_data %d %d %d\n", __LINE__, window_w, window_h); for(int i = 0; i < MAX_FREQS; i++) { sprintf(string, "BASEFREQ_%d", i); config.base_freq[i] = input.tag.get_property(string, (double)0); } config.wavefunction = input.tag.get_property("WAVEFUNCTION", config.wavefunction); //total_oscillators = input.tag.get_property("OSCILLATORS", 0); } else if(input.tag.title_is("OSCILLATOR")) { if(current_osc >= config.oscillator_config.total) config.oscillator_config.append(new SynthOscillatorConfig(current_osc)); config.oscillator_config.values[current_osc]->read_data(&input); current_osc++; } } } while(config.oscillator_config.total > current_osc) config.oscillator_config.remove_object(); }
void SwapFrames::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("SWAPFRAMES")) { config.on = input.tag.get_property("ON", config.on); config.swap_even = input.tag.get_property("SWAP_EVEN", config.swap_even); } } }
void _1080to540Main::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("1080TO540")) { config.first_field = input.tag.get_property("FIRST_FIELD", config.first_field); } } }
void GreyCStorationMain::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("GREYCSTORATION")) { config.amplitude = input.tag.get_property("AMPLITUDE", config.amplitude); config.sharpness = input.tag.get_property("SHARPNESS", config.sharpness); config.anisotropy = input.tag.get_property("ANISOTROPHY", config.anisotropy); config.noise_scale = input.tag.get_property("NOISE_SCALE", config.noise_scale); } } }
void HueEffect::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("HUESATURATION")) { config.hue = input.tag.get_property("HUE", config.hue); config.saturation = input.tag.get_property("SATURATION", config.saturation); config.value = input.tag.get_property("VALUE", config.value); } } }
int SelTempAvgMain::nextkeyframeisoffsetrestart(KeyFrame *keyframe) { FileXML input; input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); while(!input.read_tag()) { if(input.tag.title_is("SELECTIVE_TEMPORAL_AVERAGE")) { return(input.tag.get_property("OFFSETMODE_RESTARTMODE_KEYFRAME", config.offset_restartmarker_keyframe)); } } return (0); }
void Overlay::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("OVERLAY")) { config.mode = input.tag.get_property("MODE", config.mode); config.direction = input.tag.get_property("DIRECTION", config.direction); config.output_layer = input.tag.get_property("OUTPUT_LAYER", config.output_layer); } } }
void DeInterlaceMain::read_data(KeyFrame *keyframe) { FileXML input; char *data = keyframe->get_data(); input.set_shared_input(data, strlen(data)); while(!input.read_tag()) { if(input.tag.title_is("DEINTERLACE")) { config.mode = input.tag.get_property("MODE", config.mode); config.dominance = input.tag.get_property("DOMINANCE", config.dominance); config.adaptive = input.tag.get_property("ADAPTIVE", config.adaptive); config.threshold = input.tag.get_property("THRESHOLD", config.threshold); } } }
void Despike::read_data(KeyFrame *keyframe) { FileXML input; // cause xml file to read directly from text input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); int result = 0; result = input.read_tag(); if(!result) { if(input.tag.title_is("DESPIKE")) { config.level = input.tag.get_property("LEVEL", config.level); config.slope = input.tag.get_property("SLOPE", config.slope); } } }
void OverlayAudio::read_data(KeyFrame *keyframe) { FileXML input; input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); int result = 0; while(!result) { result = input.read_tag(); if(!result) { if(input.tag.title_is("OVERLAY")) { config.output_track = input.tag.get_property("OUTPUT", config.output_track); config.mode = input.tag.get_property("MODE", config.mode); } } } }
void InterpolateVideo::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("INTERPOLATEVIDEO")) { config.input_rate = input.tag.get_property("INPUT_RATE", config.input_rate); config.input_rate = Units::fix_framerate(config.input_rate); config.use_keyframes = input.tag.get_property("USE_KEYFRAMES", config.use_keyframes); config.optic_flow = input.tag.get_property("OPTIC_FLOW", config.optic_flow); config.draw_vectors = input.tag.get_property("DRAW_VECTORS", config.draw_vectors); config.search_radius = input.tag.get_property("SEARCH_RADIUS", config.search_radius); config.macroblock_size = input.tag.get_property("MACROBLOCK_SIZE", config.macroblock_size); } } }
void PitchEffect::read_data(KeyFrame *keyframe) { FileXML input; input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); int result = 0; while(!result) { result = input.read_tag(); if(!result) { if(input.tag.title_is("PITCH")) { config.scale = input.tag.get_property("SCALE", config.scale); config.size = input.tag.get_property("SIZE", config.size); } } } }
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); } } }
void Vocoder::read_data(KeyFrame *keyframe) { FileXML input; input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); int result = 0; while(!result) { result = input.read_tag(); if(!result) { if(input.tag.title_is("VOCODER")) { config.wetness = input.tag.get_property("WETNESS", config.wetness); config.level = input.tag.get_property("LEVEL", config.level); config.carrier_track = input.tag.get_property("OUTPUT", config.carrier_track); config.bands = input.tag.get_property("BANDS", config.bands); } } } }
void DenoiseMJPEG::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("DENOISE_VIDEO2")) { config.radius = input.tag.get_property("RADIUS", config.radius); config.threshold = input.tag.get_property("THRESHOLD", config.threshold); config.threshold2 = input.tag.get_property("THRESHOLD2", config.threshold2); config.sharpness = input.tag.get_property("SHARPNESS", config.sharpness); config.lcontrast = input.tag.get_property("LCONTRAST", config.lcontrast); config.ccontrast = input.tag.get_property("CCONTRAST", config.ccontrast); config.deinterlace = input.tag.get_property("DEINTERLACE", config.deinterlace); config.mode = input.tag.get_property("MODE", config.mode); config.delay = input.tag.get_property("DELAY", config.delay); } } }
void UnsharpMain::read_data(KeyFrame *keyframe) { FileXML input; input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); int result = 0; while(!result) { result = input.read_tag(); if(!result) { if(input.tag.title_is("UNSHARP")) { config.radius = input.tag.get_property("RADIUS", config.radius); config.amount = input.tag.get_property("AMOUNT", config.amount); config.threshold = input.tag.get_property("THRESHOLD", config.threshold); } } } }
void PhotoScaleMain::read_data(KeyFrame *keyframe) { FileXML input; input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); int result = 0; while(!result) { result = input.read_tag(); if(!result) { if(input.tag.title_is("PHOTOSCALE")) { config.width = input.tag.get_property("WIDTH", config.width); config.height = input.tag.get_property("HEIGHT", config.height); config.use_file = input.tag.get_property("USE_FILE", config.use_file); } } } }
void Piano::read_data(KeyFrame *keyframe) { FileXML input; // cause htal file to read directly from text input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); //printf("Piano::read_data %s\n", keyframe->get_data()); int result = 0, current_osc = 0, total_oscillators = 0; while(!result) { result = input.read_tag(); if(!result) { if(input.tag.title_is("SYNTH")) { config.wetness = input.tag.get_property("WETNESS", config.wetness); config.base_freq = input.tag.get_property("BASEFREQ", config.base_freq); config.wavefunction = input.tag.get_property("WAVEFUNCTION", config.wavefunction); total_oscillators = input.tag.get_property("OSCILLATORS", 0); } else if(input.tag.title_is("OSCILLATOR")) { if(current_osc >= config.oscillator_config.total) config.oscillator_config.append(new PianoOscillatorConfig(current_osc)); config.oscillator_config.values[current_osc]->read_data(&input); current_osc++; } } } while(config.oscillator_config.total > current_osc) config.oscillator_config.remove_object(); }