開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
Android
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
None
問題(Question):
在網路上看到這段code 有人知道這種寫法嗎?
jpege_engine_hw_create 呼叫自己?這是要?
另外就是找不到是誰去call這個副程式 會是load library時就被呼叫嗎?
static void jpege_engine_hw_create(jpege_engine_obj_t *p_obj,
jpege_hw_obj_t encoder)
{
if (p_obj) {
// Destroy previous engine if it exists
if (p_obj->destroy) {
p_obj->destroy(p_obj);
}
p_obj->create = &jpege_engine_hw_create;
p_obj->init = &jpege_engine_hw_init;
p_obj->check_start_param = &jpege_engine_hw_check_start_param;
p_obj->start = &jpege_engine_hw_start;
p_obj->abort = &jpege_engine_hw_abort;
p_obj->destroy = &jpege_engine_hw_destroy;
p_obj->p_engine = NULL;
p_obj->encoder = encoder;
p_obj->is_initialized = false;
}
}
補充說明(Supplement):
code來源:
https://goo.gl/UoNaJ2