From: Dan Dennedy Date: Sat, 5 Apr 2014 17:29:13 +0000 (-0700) Subject: Hide the movit.parms properties from serialization. X-Git-Url: https://git.sesse.net/?p=mlt;a=commitdiff_plain;h=55658e76a91c33eeded3093fe2b3b64a539a2417 Hide the movit.parms properties from serialization. These properties were adding unncessary noise in the XML output. --- diff --git a/src/modules/opengl/filter_movit_blur.cpp b/src/modules/opengl/filter_movit_blur.cpp index 62f9542f..c939e18d 100644 --- a/src/modules/opengl/filter_movit_blur.cpp +++ b/src/modules/opengl/filter_movit_blur.cpp @@ -34,7 +34,7 @@ static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format double radius = mlt_properties_anim_get_double( properties, "radius", mlt_filter_get_position( filter, frame ), mlt_filter_get_length2( filter, frame ) ); - mlt_properties_set_double( properties, "movit.parms.float.radius", + mlt_properties_set_double( properties, "_movit.parms.float.radius", radius ); GlslManager::get_instance()->unlock_service( frame ); *format = mlt_image_glsl; diff --git a/src/modules/opengl/filter_movit_convert.cpp b/src/modules/opengl/filter_movit_convert.cpp index 1c95bfef..46d640c7 100644 --- a/src/modules/opengl/filter_movit_convert.cpp +++ b/src/modules/opengl/filter_movit_convert.cpp @@ -148,7 +148,7 @@ static void build_fingerprint( mlt_service service, mlt_frame frame, std::string fingerprint->push_back( ']' ); } - bool disable = mlt_properties_get_int( MLT_SERVICE_PROPERTIES( service ), "movit.parms.int.disable" ); + bool disable = mlt_properties_get_int( MLT_SERVICE_PROPERTIES( service ), "_movit.parms.int.disable" ); if ( disable ) { fingerprint->push_back( 'd' ); } @@ -284,19 +284,19 @@ static void set_movit_parameters( GlslChain *chain, mlt_service service, mlt_fra int count = mlt_properties_count( properties ); for (int i = 0; i < count; ++i) { const char *name = mlt_properties_get_name( properties, i ); - if (strncmp(name, "movit.parms.float.", strlen("movit.parms.float.")) == 0 && + if (strncmp(name, "_movit.parms.float.", strlen("_movit.parms.float.")) == 0 && mlt_properties_get_value( properties, i )) { - bool ok = effect->set_float(name + strlen("movit.parms.float."), + bool ok = effect->set_float(name + strlen("_movit.parms.float."), mlt_properties_get_double( properties, name )); assert(ok); } - if (strncmp(name, "movit.parms.int.", strlen("movit.parms.int.")) == 0 && + if (strncmp(name, "_movit.parms.int.", strlen("_movit.parms.int.")) == 0 && mlt_properties_get_value( properties, i )) { - bool ok = effect->set_int(name + strlen("movit.parms.int."), + bool ok = effect->set_int(name + strlen("_movit.parms.int."), mlt_properties_get_int( properties, name )); assert(ok); } - if (strncmp(name, "movit.parms.vec3.", strlen("movit.parms.vec3.")) == 0 && + if (strncmp(name, "_movit.parms.vec3.", strlen("_movit.parms.vec3.")) == 0 && strcmp(name + strlen(name) - 3, "[0]") == 0 && mlt_properties_get_value( properties, i )) { float val[3]; @@ -308,11 +308,11 @@ static void set_movit_parameters( GlslChain *chain, mlt_service service, mlt_fra *index_char = '2'; val[2] = mlt_properties_get_double( properties, name_copy ); index_char[-1] = '\0'; - bool ok = effect->set_vec3(name_copy + strlen("movit.parms.vec3."), val); + bool ok = effect->set_vec3(name_copy + strlen("_movit.parms.vec3."), val); assert(ok); free(name_copy); } - if (strncmp(name, "movit.parms.vec4.", strlen("movit.parms.vec4.")) == 0 && + if (strncmp(name, "_movit.parms.vec4.", strlen("_movit.parms.vec4.")) == 0 && strcmp(name + strlen(name) - 3, "[0]") == 0 && mlt_properties_get_value( properties, i )) { float val[4]; @@ -326,7 +326,7 @@ static void set_movit_parameters( GlslChain *chain, mlt_service service, mlt_fra *index_char = '3'; val[3] = mlt_properties_get_double( properties, name_copy ); index_char[-1] = '\0'; - bool ok = effect->set_vec4(name_copy + strlen("movit.parms.vec4."), val); + bool ok = effect->set_vec4(name_copy + strlen("_movit.parms.vec4."), val); assert(ok); free(name_copy); } diff --git a/src/modules/opengl/filter_movit_crop.cpp b/src/modules/opengl/filter_movit_crop.cpp index 0dee4b9c..15a0c7af 100644 --- a/src/modules/opengl/filter_movit_crop.cpp +++ b/src/modules/opengl/filter_movit_crop.cpp @@ -78,13 +78,13 @@ static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format mlt_properties properties = MLT_FILTER_PROPERTIES( filter ); GlslManager::get_instance()->lock_service( frame ); - mlt_properties_set_int( properties, "movit.parms.int.width", owidth ); - mlt_properties_set_int( properties, "movit.parms.int.height", oheight ); - mlt_properties_set_double( properties, "movit.parms.float.left", -left ); - mlt_properties_set_double( properties, "movit.parms.float.top", -top ); + mlt_properties_set_int( properties, "_movit.parms.int.width", owidth ); + mlt_properties_set_int( properties, "_movit.parms.int.height", oheight ); + mlt_properties_set_double( properties, "_movit.parms.float.left", -left ); + mlt_properties_set_double( properties, "_movit.parms.float.top", -top ); bool disable = ( *width == owidth && *height == oheight ); - mlt_properties_set_int( properties, "movit.parms.int.disable", disable ); + mlt_properties_set_int( properties, "_movit.parms.int.disable", disable ); GlslManager::get_instance()->unlock_service( frame ); } diff --git a/src/modules/opengl/filter_movit_deconvolution_sharpen.cpp b/src/modules/opengl/filter_movit_deconvolution_sharpen.cpp index f8060184..b7f98600 100644 --- a/src/modules/opengl/filter_movit_deconvolution_sharpen.cpp +++ b/src/modules/opengl/filter_movit_deconvolution_sharpen.cpp @@ -34,14 +34,14 @@ static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format mlt_position position = mlt_filter_get_position( filter, frame ); mlt_position length = mlt_filter_get_length2( filter, frame ); int matrix_size = mlt_properties_anim_get_int( properties, "matrix_size", position, length ); - mlt_properties_set_int( properties, "movit.parms.int.matrix_size", matrix_size ); - mlt_properties_set_double( properties, "movit.parms.float.circle_radius", + mlt_properties_set_int( properties, "_movit.parms.int.matrix_size", matrix_size ); + mlt_properties_set_double( properties, "_movit.parms.float.circle_radius", mlt_properties_anim_get_double( properties, "circle_radius", position, length ) ); - mlt_properties_set_double( properties, "movit.parms.float.gaussian_radius", + mlt_properties_set_double( properties, "_movit.parms.float.gaussian_radius", mlt_properties_anim_get_double( properties, "gaussian_radius", position, length ) ); - mlt_properties_set_double( properties, "movit.parms.float.correlation", + mlt_properties_set_double( properties, "_movit.parms.float.correlation", mlt_properties_anim_get_double( properties, "correlation", position, length ) ); - mlt_properties_set_double( properties, "movit.parms.float.noise", + mlt_properties_set_double( properties, "_movit.parms.float.noise", mlt_properties_anim_get_double( properties, "noise", position, length ) ); // DeconvolutionSharpenEffect compiles the matrix size into the shader, diff --git a/src/modules/opengl/filter_movit_diffusion.cpp b/src/modules/opengl/filter_movit_diffusion.cpp index dcd7fa67..40a21de2 100644 --- a/src/modules/opengl/filter_movit_diffusion.cpp +++ b/src/modules/opengl/filter_movit_diffusion.cpp @@ -33,9 +33,9 @@ static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format GlslManager::get_instance()->lock_service( frame ); mlt_position position = mlt_filter_get_position( filter, frame ); mlt_position length = mlt_filter_get_length2( filter, frame ); - mlt_properties_set_double( properties, "movit.parms.float.radius", + mlt_properties_set_double( properties, "_movit.parms.float.radius", mlt_properties_anim_get_double( properties, "radius", position, length ) ); - mlt_properties_set_double( properties, "movit.parms.float.blurred_mix_amount", + mlt_properties_set_double( properties, "_movit.parms.float.blurred_mix_amount", mlt_properties_anim_get_double( properties, "mix", position, length ) ); GlslManager::get_instance()->unlock_service( frame ); *format = mlt_image_glsl; diff --git a/src/modules/opengl/filter_movit_glow.cpp b/src/modules/opengl/filter_movit_glow.cpp index d1a5bb5d..4ee0f858 100644 --- a/src/modules/opengl/filter_movit_glow.cpp +++ b/src/modules/opengl/filter_movit_glow.cpp @@ -33,11 +33,11 @@ static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format mlt_position position = mlt_filter_get_position( filter, frame ); mlt_position length = mlt_filter_get_length2( filter, frame ); GlslManager::get_instance()->lock_service( frame ); - mlt_properties_set_double( properties, "movit.parms.float.radius", + mlt_properties_set_double( properties, "_movit.parms.float.radius", mlt_properties_anim_get_double( properties, "radius", position, length ) ); - mlt_properties_set_double( properties, "movit.parms.float.blurred_mix_amount", + mlt_properties_set_double( properties, "_movit.parms.float.blurred_mix_amount", mlt_properties_anim_get_double( properties, "blur_mix", position, length ) ); - mlt_properties_set_double( properties, "movit.parms.float.highlight_cutoff", + mlt_properties_set_double( properties, "_movit.parms.float.highlight_cutoff", mlt_properties_anim_get_double( properties, "highlight_cutoff", position, length ) ); GlslManager::get_instance()->unlock_service( frame ); *format = mlt_image_glsl; diff --git a/src/modules/opengl/filter_movit_lift_gamma_gain.cpp b/src/modules/opengl/filter_movit_lift_gamma_gain.cpp index dcabeb59..4107c31b 100644 --- a/src/modules/opengl/filter_movit_lift_gamma_gain.cpp +++ b/src/modules/opengl/filter_movit_lift_gamma_gain.cpp @@ -33,23 +33,23 @@ static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format GlslManager::get_instance()->lock_service( frame ); mlt_position position = mlt_filter_get_position( filter, frame ); mlt_position length = mlt_filter_get_length2( filter, frame ); - mlt_properties_set_double( properties, "movit.parms.vec3.lift[0]", + mlt_properties_set_double( properties, "_movit.parms.vec3.lift[0]", mlt_properties_anim_get_double( properties, "lift_r", position, length ) ); - mlt_properties_set_double( properties, "movit.parms.vec3.lift[1]", + mlt_properties_set_double( properties, "_movit.parms.vec3.lift[1]", mlt_properties_anim_get_double( properties, "lift_g", position, length ) ); - mlt_properties_set_double( properties, "movit.parms.vec3.lift[2]", + mlt_properties_set_double( properties, "_movit.parms.vec3.lift[2]", mlt_properties_anim_get_double( properties, "lift_b", position, length ) ); - mlt_properties_set_double( properties, "movit.parms.vec3.gamma[0]", + mlt_properties_set_double( properties, "_movit.parms.vec3.gamma[0]", mlt_properties_anim_get_double( properties, "gamma_r", position, length ) ); - mlt_properties_set_double( properties, "movit.parms.vec3.gamma[1]", + mlt_properties_set_double( properties, "_movit.parms.vec3.gamma[1]", mlt_properties_anim_get_double( properties, "gamma_g", position, length ) ); - mlt_properties_set_double( properties, "movit.parms.vec3.gamma[2]", + mlt_properties_set_double( properties, "_movit.parms.vec3.gamma[2]", mlt_properties_anim_get_double( properties, "gamma_b", position, length ) ); - mlt_properties_set_double( properties, "movit.parms.vec3.gain[0]", + mlt_properties_set_double( properties, "_movit.parms.vec3.gain[0]", mlt_properties_anim_get_double( properties, "gain_r", position, length ) ); - mlt_properties_set_double( properties, "movit.parms.vec3.gain[1]", + mlt_properties_set_double( properties, "_movit.parms.vec3.gain[1]", mlt_properties_anim_get_double( properties, "gain_g", position, length ) ); - mlt_properties_set_double( properties, "movit.parms.vec3.gain[2]", + mlt_properties_set_double( properties, "_movit.parms.vec3.gain[2]", mlt_properties_anim_get_double( properties, "gain_b", position, length ) ); GlslManager::get_instance()->unlock_service( frame ); *format = mlt_image_glsl; diff --git a/src/modules/opengl/filter_movit_opacity.cpp b/src/modules/opengl/filter_movit_opacity.cpp index eac29757..5c14465b 100644 --- a/src/modules/opengl/filter_movit_opacity.cpp +++ b/src/modules/opengl/filter_movit_opacity.cpp @@ -35,10 +35,10 @@ static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format mlt_position length = mlt_filter_get_length2( filter, frame ); double opacity = mlt_properties_anim_get_double( properties, "opacity", position, length ); double alpha = mlt_properties_anim_get_double( properties, "alpha", position, length ); - mlt_properties_set_double( properties, "movit.parms.vec4.factor[0]", opacity ); - mlt_properties_set_double( properties, "movit.parms.vec4.factor[1]", opacity ); - mlt_properties_set_double( properties, "movit.parms.vec4.factor[2]", opacity ); - mlt_properties_set_double( properties, "movit.parms.vec4.factor[3]", alpha >= 0 ? alpha : opacity ); + mlt_properties_set_double( properties, "_movit.parms.vec4.factor[0]", opacity ); + mlt_properties_set_double( properties, "_movit.parms.vec4.factor[1]", opacity ); + mlt_properties_set_double( properties, "_movit.parms.vec4.factor[2]", opacity ); + mlt_properties_set_double( properties, "_movit.parms.vec4.factor[3]", alpha >= 0 ? alpha : opacity ); GlslManager::get_instance()->unlock_service( frame ); *format = mlt_image_glsl; int error = mlt_frame_get_image( frame, image, format, width, height, writable ); diff --git a/src/modules/opengl/filter_movit_resample.cpp b/src/modules/opengl/filter_movit_resample.cpp index 16aec9e8..4611fe2f 100644 --- a/src/modules/opengl/filter_movit_resample.cpp +++ b/src/modules/opengl/filter_movit_resample.cpp @@ -63,11 +63,11 @@ static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format mlt_properties_set_int( properties, "consumer_deinterlace", 1 ); GlslManager::get_instance()->lock_service( frame ); - mlt_properties_set_int( filter_properties, "movit.parms.int.width", owidth ); - mlt_properties_set_int( filter_properties, "movit.parms.int.height", oheight ); + mlt_properties_set_int( filter_properties, "_movit.parms.int.width", owidth ); + mlt_properties_set_int( filter_properties, "_movit.parms.int.height", oheight ); bool disable = ( iwidth == owidth && iheight == oheight ); - mlt_properties_set_int( filter_properties, "movit.parms.int.disable", disable ); + mlt_properties_set_int( filter_properties, "_movit.parms.int.disable", disable ); *width = owidth; *height = oheight; diff --git a/src/modules/opengl/filter_movit_resize.cpp b/src/modules/opengl/filter_movit_resize.cpp index 32f47c2a..81e0014a 100644 --- a/src/modules/opengl/filter_movit_resize.cpp +++ b/src/modules/opengl/filter_movit_resize.cpp @@ -161,13 +161,13 @@ static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format if ( !error ) { mlt_properties filter_properties = MLT_FILTER_PROPERTIES( filter ); GlslManager::get_instance()->lock_service( frame ); - mlt_properties_set_int( filter_properties, "movit.parms.int.width", *width ); - mlt_properties_set_int( filter_properties, "movit.parms.int.height", *height ); - mlt_properties_set_double( filter_properties, "movit.parms.float.left", rect.x ); - mlt_properties_set_double( filter_properties, "movit.parms.float.top", rect.y ); + mlt_properties_set_int( filter_properties, "_movit.parms.int.width", *width ); + mlt_properties_set_int( filter_properties, "_movit.parms.int.height", *height ); + mlt_properties_set_double( filter_properties, "_movit.parms.float.left", rect.x ); + mlt_properties_set_double( filter_properties, "_movit.parms.float.top", rect.y ); bool disable = ( *width == owidth && *height == oheight ); - mlt_properties_set_int( filter_properties, "movit.parms.int.disable", disable ); + mlt_properties_set_int( filter_properties, "_movit.parms.int.disable", disable ); GlslManager::get_instance()->unlock_service( frame ); diff --git a/src/modules/opengl/filter_movit_saturation.cpp b/src/modules/opengl/filter_movit_saturation.cpp index 90eff2bb..ba7f2e42 100644 --- a/src/modules/opengl/filter_movit_saturation.cpp +++ b/src/modules/opengl/filter_movit_saturation.cpp @@ -33,7 +33,7 @@ static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format GlslManager::get_instance()->lock_service( frame ); mlt_position position = mlt_filter_get_position( filter, frame ); mlt_position length = mlt_filter_get_length2( filter, frame ); - mlt_properties_set_double( properties, "movit.parms.float.saturation", + mlt_properties_set_double( properties, "_movit.parms.float.saturation", mlt_properties_anim_get_double( properties, "saturation", position, length ) ); GlslManager::get_instance()->unlock_service( frame ); *format = mlt_image_glsl; diff --git a/src/modules/opengl/filter_movit_vignette.cpp b/src/modules/opengl/filter_movit_vignette.cpp index 8cabee58..844856ea 100644 --- a/src/modules/opengl/filter_movit_vignette.cpp +++ b/src/modules/opengl/filter_movit_vignette.cpp @@ -33,9 +33,9 @@ static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format GlslManager::get_instance()->lock_service( frame ); mlt_position position = mlt_filter_get_position( filter, frame ); mlt_position length = mlt_filter_get_length2( filter, frame ); - mlt_properties_set_double( properties, "movit.parms.float.radius", + mlt_properties_set_double( properties, "_movit.parms.float.radius", mlt_properties_anim_get_double( properties, "radius", position, length ) ); - mlt_properties_set_double( properties, "movit.parms.float.inner_radius", + mlt_properties_set_double( properties, "_movit.parms.float.inner_radius", mlt_properties_anim_get_double( properties, "inner_radius", position, length ) ); GlslManager::get_instance()->unlock_service( frame ); *format = mlt_image_glsl; diff --git a/src/modules/opengl/filter_movit_white_balance.cpp b/src/modules/opengl/filter_movit_white_balance.cpp index f9d7e5a5..1103077a 100644 --- a/src/modules/opengl/filter_movit_white_balance.cpp +++ b/src/modules/opengl/filter_movit_white_balance.cpp @@ -50,12 +50,12 @@ static int get_image( mlt_frame frame, uint8_t **image, mlt_image_format *format srgb8_to_linear((color_int >> 16) & 0xff), srgb8_to_linear((color_int >> 8) & 0xff) ); - mlt_properties_set_double( properties, "movit.parms.vec3.neutral_color[0]", color.r ); - mlt_properties_set_double( properties, "movit.parms.vec3.neutral_color[1]", color.g ); - mlt_properties_set_double( properties, "movit.parms.vec3.neutral_color[2]", color.b ); + mlt_properties_set_double( properties, "_movit.parms.vec3.neutral_color[0]", color.r ); + mlt_properties_set_double( properties, "_movit.parms.vec3.neutral_color[1]", color.g ); + mlt_properties_set_double( properties, "_movit.parms.vec3.neutral_color[2]", color.b ); double output_color_temperature = mlt_properties_anim_get_double( properties, "color_temperature", position, length ); - mlt_properties_set_double( properties, "movit.parms.float.output_color_temperature", + mlt_properties_set_double( properties, "_movit.parms.float.output_color_temperature", output_color_temperature ); GlslManager::get_instance()->unlock_service( frame ); *format = mlt_image_glsl; diff --git a/src/modules/opengl/transition_movit_luma.cpp b/src/modules/opengl/transition_movit_luma.cpp index f4b99bca..bd7cab85 100644 --- a/src/modules/opengl/transition_movit_luma.cpp +++ b/src/modules/opengl/transition_movit_luma.cpp @@ -60,11 +60,11 @@ static int get_image( mlt_frame a_frame, uint8_t **image, mlt_image_format *form if ( c_frame ) { // Set the Movit parameters. - mlt_properties_set( properties, "movit.parms.float.strength_first", NULL ); - mlt_properties_set( properties, "movit.parms.float.strength_second", NULL ); - mlt_properties_set_double( properties, "movit.parms.float.progress", reverse ? inverse : mix ); - mlt_properties_set_double( properties, "movit.parms.float.transition_width", 1.0 / (softness + 1.0e-4) ); - mlt_properties_set_int( properties, "movit.parms.int.inverse", + mlt_properties_set( properties, "_movit.parms.float.strength_first", NULL ); + mlt_properties_set( properties, "_movit.parms.float.strength_second", NULL ); + mlt_properties_set_double( properties, "_movit.parms.float.progress", reverse ? inverse : mix ); + mlt_properties_set_double( properties, "_movit.parms.float.transition_width", 1.0 / (softness + 1.0e-4) ); + mlt_properties_set_int( properties, "_movit.parms.int.inverse", !mlt_properties_get_int( properties, "invert" ) ); uint8_t *a_image, *b_image, *c_image; @@ -83,11 +83,11 @@ static int get_image( mlt_frame a_frame, uint8_t **image, mlt_image_format *form else { // Set the Movit parameters. - mlt_properties_set( properties, "movit.parms.int.inverse", NULL ); - mlt_properties_set( properties, "movit.parms.float.progress", NULL ); - mlt_properties_set( properties, "movit.parms.float.transition_width", NULL ); - mlt_properties_set_double( properties, "movit.parms.float.strength_first", reverse ? mix : inverse ); - mlt_properties_set_double( properties, "movit.parms.float.strength_second", reverse ? inverse : mix ); + mlt_properties_set( properties, "_movit.parms.int.inverse", NULL ); + mlt_properties_set( properties, "_movit.parms.float.progress", NULL ); + mlt_properties_set( properties, "_movit.parms.float.transition_width", NULL ); + mlt_properties_set_double( properties, "_movit.parms.float.strength_first", reverse ? mix : inverse ); + mlt_properties_set_double( properties, "_movit.parms.float.strength_second", reverse ? inverse : mix ); uint8_t *a_image, *b_image; diff --git a/src/modules/opengl/transition_movit_mix.cpp b/src/modules/opengl/transition_movit_mix.cpp index 9a87f9c5..e9907723 100644 --- a/src/modules/opengl/transition_movit_mix.cpp +++ b/src/modules/opengl/transition_movit_mix.cpp @@ -58,8 +58,8 @@ static int get_image( mlt_frame a_frame, uint8_t **image, mlt_image_format *form double inverse = 1.0 - mix; // Set the Movit parameters. - mlt_properties_set_double( properties, "movit.parms.float.strength_first", reverse ? mix : inverse ); - mlt_properties_set_double( properties, "movit.parms.float.strength_second", reverse ? inverse : mix ); + mlt_properties_set_double( properties, "_movit.parms.float.strength_first", reverse ? mix : inverse ); + mlt_properties_set_double( properties, "_movit.parms.float.strength_second", reverse ? inverse : mix ); uint8_t *a_image, *b_image;