#include <sys/time.h>
#include <sys/resource.h>
#endif
+#if CONFIG_OPENCL
+#include "libavutil/opencl.h"
+#endif
+
static int init_report(const char *env);
if (consumed)
return 0;
- av_log(NULL, AV_LOG_ERROR, "Could not find option '%s' in any of the FFmpeg subsystems "
- "(codec, format, scaler, resampler contexts)\n", opt);
return AVERROR_OPTION_NOT_FOUND;
}
return 0;
}
+#if CONFIG_OPENCL
+int opt_opencl(void *optctx, const char *opt, const char *arg)
+{
+ char *key, *value;
+ const char *opts = arg;
+ int ret = 0;
+ while (*opts) {
+ ret = av_opt_get_key_value(&opts, "=", ":", 0, &key, &value);
+ if (ret < 0)
+ return ret;
+ ret = av_opencl_set_option(key, value);
+ if (ret < 0)
+ return ret;
+ if (*opts)
+ opts++;
+ }
+ return ret;
+}
+#endif
+
void print_error(const char *filename, int err)
{
char errbuf[128];
static void show_help_filter(const char *name)
{
+#if CONFIG_AVFILTER
const AVFilter *filter;
if (!name) {
show_help_children(filter->priv_class, AV_OPT_FLAG_FILTERING_PARAM);
else
printf("No AVOption available\n");
+#else
+ av_log(NULL, AV_LOG_ERROR, "Build without libavfilter; "
+ "can not to satisfy request\n");
+#endif
}
int show_help(void *optctx, const char *opt, const char *arg)