camera/QCamera2/stack/mm-lib2d-interface/src/mm_lib2d.c
/**
 * Function: lib2d_callback_handler
 *
 * Description: Callback handler. Registered with Component
 *     on IMG_COMP_INIT. Will be called when processing
 *     of current request is completed. If component running in
 *     async mode, this is where client will know the execution
 *     is finished for in, out frames.
 *
 * Input parameters:
 *   p_appdata - lib2d test object
 *   p_in_frame - pointer to input frame
 *   p_out_frame - pointer to output frame
 *
 * Return values:
 *   IMG_SUCCESS
 *   IMG_ERR_GENERAL
 *
 * Notes: none
 **/
lib2d_callback_handler
Description: Callback handler. Registered with Component
on IMG_COMP_INIT. Will be called when processing
of current request is completed. If component running in
async mode, this is where client will know the execution
is finished for in, out frames.

Input parameters:
p_appdata - lib2d test object
p_in_frame - pointer to input frame
p_out_frame - pointer to output frame



none
lib2d_callback_handler Description : Callback handler . Registered with Component on IMG_COMP_INIT . Will be called when processing of current request is completed . If component running in async mode this is where client will know the execution is finished for in out frames . Input parameters : p_appdata - lib2d test object p_in_frame - pointer to input frame p_out_frame - pointer to output frame none
int lib2d_callback_handler(void *userdata, img_frame_t *p_in_frame,
  img_frame_t *p_out_frame)
{
  mm_lib2d_obj *lib2d_obj = (mm_lib2d_obj *)userdata;
  lib2d_job_private_info *job_info = NULL;
  if (NULL == userdata) {
    LOGE("invalid event");
    return IMG_ERR_INVALID_INPUT;
  }
  job_info = (lib2d_job_private_info *)p_in_frame->private_data;
  if (job_info->lib2d_client_cb != NULL) {
    job_info->lib2d_client_cb(job_info->userdata, job_info->jobid);
  }
  free(p_in_frame->private_data);
  free(p_in_frame);
  free(p_out_frame);
  return IMG_SUCCESS;
}
int lib2d_callback_handler ( void * userdata , img_frame_t * p_in_frame , img_frame_t * p_out_frame ) { mm_lib2d_obj * lib2d_obj = ( mm_lib2d_obj * ) userdata ; lib2d_job_private_info * job_info = NULL ; if ( NULL == userdata ) { LOGE ( " " ) ; return IMG_ERR_INVALID_INPUT ; } job_info = ( lib2d_job_private_info * ) p_in_frame -> private_data ; if ( job_info -> lib2d_client_cb != NULL ) { job_info -> lib2d_client_cb ( job_info -> userdata , job_info -> jobid ) ; } free ( p_in_frame -> private_data ) ; free ( p_in_frame ) ; free ( p_out_frame ) ; return IMG_SUCCESS ; }
Function: lib2d_callback_handler
 Description: Callback handler.
Function : lib2d_callback_handler Description : Callback handler .
// assert(p_in_frame->private_data == p_out_frame->private_data);