filter-displacement: Fix file dialog and rename filter

This commit is contained in:
Michael Fabian Dirks 2017-06-29 03:42:13 +02:00
parent cde09ce068
commit b37fca2149

View file

@ -21,7 +21,7 @@
Filter::Displacement::Displacement() { Filter::Displacement::Displacement() {
memset(&sourceInfo, 0, sizeof(obs_source_info)); memset(&sourceInfo, 0, sizeof(obs_source_info));
sourceInfo.id = "obs-stream-effects-displacement"; sourceInfo.id = "obs-stream-effects-filter-displacement";
sourceInfo.type = OBS_SOURCE_TYPE_FILTER; sourceInfo.type = OBS_SOURCE_TYPE_FILTER;
sourceInfo.output_flags = OBS_SOURCE_VIDEO; sourceInfo.output_flags = OBS_SOURCE_VIDEO;
sourceInfo.get_name = get_name; sourceInfo.get_name = get_name;
@ -81,7 +81,7 @@ obs_properties_t * Filter::Displacement::get_properties(void *ptr) {
path = reinterpret_cast<Instance*>(ptr)->get_file(); path = reinterpret_cast<Instance*>(ptr)->get_file();
obs_properties_add_path(pr, "file", "File", obs_path_type::OBS_PATH_FILE, obs_properties_add_path(pr, "file", "File", obs_path_type::OBS_PATH_FILE,
"Images (*.png *.jpeg *.jpg *.bmp);*.png *.jpeg *.jpg *.bmp;;All Files (*)", path.c_str()); "Images (*.png *.jpeg *.jpg *.bmp);All Files (*)", path.c_str());
obs_properties_add_float_slider(pr, "ratio", "Distance (%)", 0, 1, 0.01); obs_properties_add_float_slider(pr, "ratio", "Distance (%)", 0, 1, 0.01);
obs_properties_add_float_slider(pr, "scale", "Strength", -1000, 1000, 0.01); obs_properties_add_float_slider(pr, "scale", "Strength", -1000, 1000, 0.01);
return pr; return pr;