⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cam_ilm.c

📁 最新MTK手机软件源码
💻 C
📖 第 1 页 / 共 3 页
字号:
    ilm_ptr->peer_buff_ptr = NULL;

    msg_send_ext_queue(ilm_ptr);

}


/*****************************************************************************
 * FUNCTION
 *  cam_send_barcode_stop_capture_req
 * DESCRIPTION
 *  This function is to send camera stop request message.
 * PARAMETERS
 *  src_mod_id      [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void cam_send_barcode_stop_capture_req(module_type src_mod_id)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_cam_stop_req_struct *msg_p = NULL;
    ilm_struct *ilm_ptr = NULL;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    msg_p = (media_cam_stop_req_struct*) construct_local_para(sizeof(media_cam_stop_req_struct), TD_CTRL);

    ilm_ptr = allocate_ilm(src_mod_id);
    ilm_ptr->src_mod_id = src_mod_id;
    ilm_ptr->dest_mod_id = MOD_MED;
    ilm_ptr->sap_id = MED_SAP;

    ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_CAM_BARCODE_STOP_CAPTURE_REQ;
    ilm_ptr->local_para_ptr = (local_para_struct*) msg_p;
    ilm_ptr->peer_buff_ptr = NULL;

    msg_send_ext_queue(ilm_ptr);

}
#endif


/*****************************************************************************
 * FUNCTION
 *  cam_send_capture_req
 * DESCRIPTION
 *  This function is to send camera capture request message.
 * PARAMETERS
 *  src_mod_id      [IN]        
 *  data            [?]         
 * RETURNS
 *  void
 *****************************************************************************/
void cam_send_capture_req(module_type src_mod_id, void *data)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_cam_capture_req_struct *msg_p = NULL;
    ilm_struct *ilm_ptr = NULL;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    msg_p = (media_cam_capture_req_struct*) construct_local_para(sizeof(media_cam_capture_req_struct), TD_CTRL);

    kal_mem_cpy(
        ((kal_uint8*) msg_p) + sizeof(local_para_struct),
        ((kal_uint8*) data) + sizeof(local_para_struct),
        sizeof(media_cam_capture_req_struct) - sizeof(local_para_struct));

    ilm_ptr = allocate_ilm(src_mod_id);
    ilm_ptr->src_mod_id = src_mod_id;
    ilm_ptr->dest_mod_id = MOD_MED;
    ilm_ptr->sap_id = MED_SAP;

    ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_CAM_CAPTURE_REQ;
    ilm_ptr->local_para_ptr = (local_para_struct*) msg_p;
    ilm_ptr->peer_buff_ptr = NULL;

    msg_send_ext_queue(ilm_ptr);

}

#if defined (BARCODE_SUPPORT)
/*****************************************************************************
 * FUNCTION
 *  cam_send_barcode_capture_req
 * DESCRIPTION
 *  This function is to send camera capture request message.
 * PARAMETERS
 *  src_mod_id      [IN]        
 *  data            [?]         
 * RETURNS
 *  void
 *****************************************************************************/
void cam_send_barcode_capture_req(module_type src_mod_id, void *data)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_cam_barcode_capture_struct *msg_p = NULL;
    ilm_struct *ilm_ptr = NULL;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    msg_p = (media_cam_barcode_capture_struct*)
        construct_local_para(sizeof(media_cam_barcode_capture_struct), TD_CTRL);

    kal_mem_cpy(
        ((kal_uint8*) msg_p) + sizeof(local_para_struct),
        ((kal_uint8*) data) + sizeof(local_para_struct),
        sizeof(media_cam_barcode_capture_struct) - sizeof(local_para_struct));

    ilm_ptr = allocate_ilm(src_mod_id);
    ilm_ptr->src_mod_id = src_mod_id;
    ilm_ptr->dest_mod_id = MOD_MED;
    ilm_ptr->sap_id = MED_SAP;

    ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_CAM_BARCODE_CAPTURE_REQ;
    ilm_ptr->local_para_ptr = (local_para_struct*) msg_p;
    ilm_ptr->peer_buff_ptr = NULL;

    msg_send_ext_queue(ilm_ptr);

}
#endif


/*****************************************************************************
 * FUNCTION
 *  cam_send_set_param_req
 * DESCRIPTION
 *  This function is to send set parameter request message.
 * PARAMETERS
 *  src_mod_id      [IN]        
 *  param_id        [IN]        
 *  value           [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void cam_send_set_param_req(module_type src_mod_id, kal_uint16 param_id, kal_int16 value)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_cam_set_param_req_struct *msg_p = NULL;
    ilm_struct *ilm_ptr = NULL;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    msg_p = (media_cam_set_param_req_struct*) construct_local_para(sizeof(media_cam_set_param_req_struct), TD_CTRL);

    msg_p->param_id = param_id;
    msg_p->value = value;

    ilm_ptr = allocate_ilm(src_mod_id);
    ilm_ptr->src_mod_id = src_mod_id;
    ilm_ptr->dest_mod_id = MOD_MED;
    ilm_ptr->sap_id = MED_SAP;

    ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_CAM_SET_PARAM_REQ;
    ilm_ptr->local_para_ptr = (local_para_struct*) msg_p;
    ilm_ptr->peer_buff_ptr = NULL;

    msg_send_ext_queue(ilm_ptr);

}


/*****************************************************************************
 * FUNCTION
 *  cam_send_set_flash_req
 * DESCRIPTION
 *  This function is to send set flash request message.
 * PARAMETERS
 *  src_mod_id      [IN]        
 *  flash_mode      [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void cam_send_set_flash_req(module_type src_mod_id, kal_int16 flash_mode)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_cam_set_flash_req_struct *msg_p = NULL;
    ilm_struct *ilm_ptr = NULL;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    msg_p = (media_cam_set_flash_req_struct*) construct_local_para(sizeof(media_cam_set_flash_req_struct), TD_CTRL);

    msg_p->flash_mode = flash_mode;

    ilm_ptr = allocate_ilm(src_mod_id);
    ilm_ptr->src_mod_id = src_mod_id;
    ilm_ptr->dest_mod_id = MOD_MED;
    ilm_ptr->sap_id = MED_SAP;

    ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_CAM_SET_FLASH_REQ;
    ilm_ptr->local_para_ptr = (local_para_struct*) msg_p;
    ilm_ptr->peer_buff_ptr = NULL;

    msg_send_ext_queue(ilm_ptr);

}


/*****************************************************************************
 * FUNCTION
 *  cam_send_cal_mwb_req
 * DESCRIPTION
 *  This function is to send calculate manual WB req
 * PARAMETERS
 *  src_mod_id      [IN]        
 *  pmwb            [?]         
 *  op_type         [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void cam_send_cal_mwb_req(module_type src_mod_id, void *pmwb, kal_uint8 op_type)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_cam_mwb_operation_req_struct *msg_p = NULL;
    ilm_struct *ilm_ptr = NULL;
    cam_mwb_process_struct *mwb_p = (cam_mwb_process_struct*) pmwb;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    msg_p = (media_cam_mwb_operation_req_struct*)
        construct_local_para(sizeof(media_cam_mwb_operation_req_struct), TD_CTRL);

    msg_p->pmwb = (media_cam_mwb_process_struct*) mwb_p;
    msg_p->op_type = op_type;
    ilm_ptr = allocate_ilm(src_mod_id);
    ilm_ptr->src_mod_id = src_mod_id;
    ilm_ptr->dest_mod_id = MOD_MED;
    ilm_ptr->sap_id = MED_SAP;

    ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_CAM_CAL_MANUAL_WB_REQ;
    ilm_ptr->local_para_ptr = (local_para_struct*) msg_p;
    ilm_ptr->peer_buff_ptr = NULL;

    msg_send_ext_queue(ilm_ptr);

}


/*****************************************************************************
 * FUNCTION
 *  cam_send_mwb_operation_req
 * DESCRIPTION
 *  This function is to send mwb operation req
 * PARAMETERS
 *  src_mod_id      [IN]        
 *  op_type         [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void cam_send_mwb_operation_req(module_type src_mod_id, kal_uint8 op_type)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_cam_mwb_operation_req_struct *msg_p;
    ilm_struct *ilm_ptr;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    msg_p = (media_cam_mwb_operation_req_struct*)
        construct_local_para(sizeof(media_cam_mwb_operation_req_struct), TD_CTRL);

    msg_p->op_type = op_type;
    msg_p->pmwb = NULL;
    ilm_ptr = allocate_ilm(src_mod_id);
    ilm_ptr->src_mod_id = src_mod_id;
    ilm_ptr->dest_mod_id = MOD_MED;
    ilm_ptr->sap_id = MED_SAP;

    ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_CAM_MWB_OPERATION_REQ;
    ilm_ptr->local_para_ptr = (local_para_struct*) msg_p;
    ilm_ptr->peer_buff_ptr = NULL;

    msg_send_ext_queue(ilm_ptr);
}


/*****************************************************************************
 * FUNCTION
 *  cam_send_set_overlay_palette_req
 * DESCRIPTION
 *  This function is to send set overlay palette request message.
 * PARAMETERS
 *  src_mod_id          [IN]        
 *  palette_size        [IN]        
 *  palette_addr        [?]         
 * RETURNS
 *  void
 *****************************************************************************/
void cam_send_set_overlay_palette_req(module_type src_mod_id, kal_uint8 palette_size, kal_uint32 *palette_addr)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_cam_set_overlay_palette_req_struct *msg_p;
    ilm_struct *ilm_ptr;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    msg_p = (media_cam_set_overlay_palette_req_struct*)
        construct_local_para(sizeof(media_cam_set_overlay_palette_req_struct), TD_CTRL);

    msg_p->palette_size = palette_size;
    msg_p->palette_addr = palette_addr;

    ilm_ptr = allocate_ilm(src_mod_id);
    ilm_ptr->src_mod_id = src_mod_id;
    ilm_ptr->dest_mod_id = MOD_MED;
    ilm_ptr->sap_id = MED_SAP;

    ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_CAM_SET_OVERLAY_PALETTE_REQ;
    ilm_ptr->local_para_ptr = (local_para_struct*) msg_p;
    ilm_ptr->peer_buff_ptr = NULL;

    msg_send_ext_queue(ilm_ptr);

}


/*****************************************************************************
 * FUNCTION
 *  cam_send_ready_ind
 * DESCRIPTION
 *  This function is to send camera ready indication message.
 * PARAMETERS
 *  result      [IN]        
 *  module_type src_mod_id(?)
 *  kal_uint16 param_id(?)
 *  kal_int16 value(?)
 * RETURNS
 *  void
 *****************************************************************************/
void cam_send_ready_ind(kal_int16 result)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_cam_ready_ind_struct *ind_p;
    ilm_struct *ilm_ptr = NULL;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    /* send indication message to L4 */
    ind_p = (media_cam_ready_ind_struct*) construct_local_para(sizeof(media_cam_ready_ind_struct), TD_CTRL);

    ind_p->result = result;
    ind_p->seq_num = cam_context_p->seq_num;

    ilm_ptr = allocate_ilm(MOD_MED);
    ilm_ptr->src_mod_id = MOD_MED;
    ilm_ptr->dest_mod_id = cam_context_p->src_mod;
    ilm_ptr->sap_id = MED_SAP;

    ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_CAM_READY_IND;
    ilm_ptr->local_para_ptr = (local_para_struct*) ind_p;
    ilm_ptr->peer_buff_ptr = NULL;

    msg_send_ext_queue(ilm_ptr);

}


/*****************************************************************************
 * FUNCTION
 *  cam_send_preview_fail_ind
 * DESCRIPTION
 *  This function is to send camera preview fail indication message.
 * PARAMETERS

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -