Create a new directory for the libhdr-meta-plugin
Create a build script(ex> Android.bp) & source code(ex> libhdr-meta-default.cpp)
'libhdr_meta_interface_header'
ex) cc_library { name: "libhdr_meta_plugin_default", cflags: [ "-Wno-unused-function", "-DLOG_TAG=\"libhdr-meta\"", ], header_libs: [ "libhdr_meta_interface_header", ], srcs: [ "./srcs/meta/libhdr_meta_default.cpp", ], proprietary: true, }
ex) #include <hdrMetaInterface.h> class hdrMetaImplementation: public hdrMetaInterface { convertHDR10pMeta(void __attribute__((unused)) *in_metadata, unsigned int __attribute__((unused)) in_len, unsigned int __attribute__((unused)) targetMaxLuminance, void __attribute__((unused)) *out_metadata, unsigned int __attribute__((unused)) out_len) { return HDRMETAIF_ERR_MAX; } int configHDR10Tonemap( unsigned int __attribute__((unused)) srcMasteringLuminance, unsigned int __attribute__((unused)) targetMaxLuminance ) { return HDRMETAIF_ERR_MAX; } int computeHDR10Tonemap( double __attribute__((unused)) inX, double __attribute__((unused)) *outY ) { return HDRMETAIF_ERR_MAX; } int getTargetLuminance(int __attribute__((unused))curTargetLuminance, int __attribute__((unused)) *outTargetLuminance) { return HDRMETAIF_ERR_MAX; } void setLogLevel(int __attribute__((unused)) log_level) {} }; hdrMetaInterface *hdrMetaInterface::createInstance(void) { return hdrMetaImplementation(); }
ex) if the name of the plugin library is 'libhdr_meta_plugin_X' cc_library { name: "libhdr_meta_plugin_X", , then replace the following defined value(SOONG_CONFIG_libhdr_meta_plugin) on the BoardConfig.mk with it. SOONG_CONFIG_libhdr_meta_plugin := libhdr_meta_plugin_X