Complete chain of passing command line parameters to external renderer

This commit is contained in:
Mario Hüttel 2019-11-15 21:11:41 +01:00
parent fa1a78e54c
commit efb1af7ee0
3 changed files with 8 additions and 4 deletions

View File

@ -104,7 +104,9 @@ static int create_renderers(char **renderers,
fprintf(stderr, _("Please specify shared object for external renderer. Will ignore this renderer.\n")); fprintf(stderr, _("Please specify shared object for external renderer. Will ignore this renderer.\n"));
continue; continue;
} }
output_renderer = GDS_RENDER_OUTPUT_RENDERER(external_renderer_new_with_so(ext_params->so_path)); output_renderer = GDS_RENDER_OUTPUT_RENDERER(
external_renderer_new_with_so_and_param(ext_params->so_path,
ext_params->cli_params));
} else { } else {
continue; continue;
} }

View File

@ -50,9 +50,10 @@ ExternalRenderer *external_renderer_new();
/** /**
* @brief Create new ExternalRenderer object with specified shared object path * @brief Create new ExternalRenderer object with specified shared object path
* @param so_path Path to shared object, the rendering function is searched in * @param so_path Path to shared object, the rendering function is searched in
* @param param_string Command line parameter string passed to external renderer
* @return New object. * @return New object.
*/ */
ExternalRenderer *external_renderer_new_with_so(const char *so_path); ExternalRenderer *external_renderer_new_with_so_and_param(const char *so_path, const char *param_string);
G_END_DECLS G_END_DECLS

View File

@ -271,9 +271,10 @@ ExternalRenderer *external_renderer_new()
return g_object_new(GDS_RENDER_TYPE_EXTERNAL_RENDERER, NULL); return g_object_new(GDS_RENDER_TYPE_EXTERNAL_RENDERER, NULL);
} }
ExternalRenderer *external_renderer_new_with_so(const char *so_path) ExternalRenderer *external_renderer_new_with_so_and_param(const char *so_path, const char *param_string)
{ {
return g_object_new(GDS_RENDER_TYPE_EXTERNAL_RENDERER, "shared-object-path", so_path, NULL); return g_object_new(GDS_RENDER_TYPE_EXTERNAL_RENDERER, "shared-object-path", so_path,
"param-string", param_string,NULL);
} }
/** @} */ /** @} */