// power management opaque pointer
void * system_sleep_opaque;
+
+ int enable_opencl;
};
hb_work_object_t * hb_objects = NULL;
return ret;
}
+int hb_get_opencl_enabled(hb_handle_t *h)
+{
+ return h->enable_opencl;
+}
+
int hb_avcodec_close(AVCodecContext *avctx)
{
int ret;
global_verbosity_level = level;
}
+/*
+ * Enable or disable support for OpenCL detection.
+ */
+void hb_opencl_set_enable(hb_handle_t *h, int enable_opencl)
+{
+ h->enable_opencl = enable_opencl;
+}
+
/**
* libhb initialization routine.
* @param verbose HB_DEBUG_NONE or HB_DEBUG_ALL.
- * @param update_check signals libhb to check for updated version from HandBrake website.
* @return Handle to hb_handle_t for use on all subsequent calls to libhb.
*/
hb_handle_t * hb_init( int verbose )
hb_log(" - logical processor count: %d", hb_get_cpu_count());
/* Print OpenCL info here so that it's in all scan and encode logs */
- hb_opencl_info_print();
+ if (hb_get_opencl_enabled(h))
+ {
+ hb_opencl_info_print();
+ }
#ifdef USE_QSV
/* Print QSV info here so that it's in all scan and encode logs */
void hb_register_logger( void (*log_cb)(const char* message) );
hb_handle_t * hb_init( int verbose );
void hb_log_level_set(hb_handle_t *h, int level);
+void hb_opencl_set_enable(hb_handle_t *h, int enable_opencl);
/* hb_get_version() */
const char * hb_get_full_description();
char * hb_dvd_name( char * path );
void hb_dvd_set_dvdnav( int enable );
+int hb_get_opencl_enabled(hb_handle_t *h);
+
/* hb_scan()
Scan the specified path. Can be a DVD device, a VIDEO_TS folder or
a VOB file. If title_index is 0, scan all titles. */
title->video_decode_support = vid_info.video_decode_support;
// TODO: check video dimensions
- title->opencl_support = !!hb_opencl_available();
-
+ hb_handle_t *hb_handle = (hb_handle_t *)data->h;
+ if (hb_get_opencl_enabled(hb_handle))
+ {
+ title->opencl_support = !!hb_opencl_available();
+ }
+
// compute the aspect ratio based on the storage dimensions and PAR.
hb_reduce(&title->dar.num, &title->dar.den,
title->geometry.par.num * title->geometry.width,