Lines Matching defs:frei0r
22 * frei0r wrapper
28 #include <frei0r.h>
68 Frei0rContext *frei0r = ctx->priv;
69 void *sym = dlsym(frei0r->dl_handle, sym_name);
77 Frei0rContext *frei0r = ctx->priv;
115 frei0r->set_param_value(frei0r->instance, &val, index);
126 Frei0rContext *frei0r = ctx->priv;
129 for (i = 0; i < frei0r->plugin_info.num_params; i++) {
134 frei0r->get_param_info(&info, i);
167 frei0r->get_param_value(frei0r->instance, v, i);
172 frei0r->get_param_value(frei0r->instance, v, i);
177 frei0r->get_param_value(frei0r->instance, v, i);
182 frei0r->get_param_value(frei0r->instance, v, i);
187 frei0r->get_param_value(frei0r->instance, v, i);
203 av_log(ctx, AV_LOG_DEBUG, "Looking for frei0r effect in '%s'\n", path);
210 Frei0rContext *frei0r = ctx->priv;
216 /* see: http://piksel.org/frei0r/1.2/spec/1.2/spec/group__pluglocations.html */
220 if (frei0r->dl_handle = load_path(ctx, p, dl_name))
224 if (!frei0r->dl_handle && (path = getenv("HOME"))) {
226 snprintf(prefix, sizeof(prefix), "%s/.frei0r-1/lib/", path);
227 frei0r->dl_handle = load_path(ctx, prefix, dl_name);
229 if (!frei0r->dl_handle)
230 frei0r->dl_handle = load_path(ctx, "/usr/local/lib/frei0r-1/", dl_name);
231 if (!frei0r->dl_handle)
232 frei0r->dl_handle = load_path(ctx, "/usr/lib/frei0r-1/", dl_name);
233 if (!frei0r->dl_handle) {
240 !(frei0r->get_param_info = load_sym(ctx, "f0r_get_param_info" )) ||
241 !(frei0r->get_param_value = load_sym(ctx, "f0r_get_param_value")) ||
242 !(frei0r->set_param_value = load_sym(ctx, "f0r_set_param_value")) ||
243 !(frei0r->update = load_sym(ctx, "f0r_update" )) ||
244 !(frei0r->construct = load_sym(ctx, "f0r_construct" )) ||
245 !(frei0r->destruct = load_sym(ctx, "f0r_destruct" )) ||
246 !(frei0r->deinit = load_sym(ctx, "f0r_deinit" )))
250 av_log(ctx, AV_LOG_ERROR, "Could not init the frei0r module");
254 f0r_get_plugin_info(&frei0r->plugin_info);
255 pi = &frei0r->plugin_info;
280 Frei0rContext *frei0r = ctx->priv;
282 *frei0r->params = 0;
285 sscanf(args, "%1023[^:=]%c%255c", dl_name, &c, frei0r->params);
292 Frei0rContext *frei0r = ctx->priv;
294 if (frei0r->destruct && frei0r->instance)
295 frei0r->destruct(frei0r->instance);
296 if (frei0r->deinit)
297 frei0r->deinit();
298 if (frei0r->dl_handle)
299 dlclose(frei0r->dl_handle);
301 memset(frei0r, 0, sizeof(*frei0r));
307 Frei0rContext *frei0r = ctx->priv;
309 if (!(frei0r->instance = frei0r->construct(inlink->w, inlink->h))) {
310 av_log(ctx, AV_LOG_ERROR, "Impossible to load frei0r instance");
314 return set_params(ctx, frei0r->params);
319 Frei0rContext *frei0r = ctx->priv;
322 if (frei0r->plugin_info.color_model == F0R_COLOR_MODEL_BGRA8888) {
324 } else if (frei0r->plugin_info.color_model == F0R_COLOR_MODEL_RGBA8888) {
344 Frei0rContext *frei0r = inlink->dst->priv;
349 frei0r->update(frei0r->instance, inpicref->pts * av_q2d(inlink->time_base) * 1000,
359 .name = "frei0r",
360 .description = NULL_IF_CONFIG_SMALL("Apply a frei0r effect."),
383 Frei0rContext *frei0r = ctx->priv;
389 memset(frei0r->params, 0, sizeof(frei0r->params));
393 frame_size, frame_rate, dl_name, &c, frei0r->params);
395 if (av_parse_video_size(&frei0r->w, &frei0r->h, frame_size) < 0) {
405 frei0r->time_base.num = frame_rate_q.den;
406 frei0r->time_base.den = frame_rate_q.num;
414 Frei0rContext *frei0r = ctx->priv;
416 if (av_image_check_size(frei0r->w, frei0r->h, 0, ctx) < 0)
418 outlink->w = frei0r->w;
419 outlink->h = frei0r->h;
420 outlink->time_base = frei0r->time_base;
422 if (!(frei0r->instance = frei0r->construct(outlink->w, outlink->h))) {
423 av_log(ctx, AV_LOG_ERROR, "Impossible to load frei0r instance");
427 return set_params(ctx, frei0r->params);
432 Frei0rContext *frei0r = outlink->src->priv;
435 picref->pts = frei0r->pts++;
439 frei0r->update(frei0r->instance, av_rescale_q(picref->pts, frei0r->time_base, (AVRational){1,1000}),
450 .description = NULL_IF_CONFIG_SMALL("Generate a frei0r source."),