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

📄 cam_ilm.c

📁 最新MTK手机软件源码
💻 C
📖 第 1 页 / 共 3 页
字号:
 *  result      [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void cam_send_preview_fail_ind(kal_int16 result)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_cam_preview_fail_ind_struct *ind_p;
    ilm_struct *ilm_ptr = NULL;

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

    ind_p->result = result;

    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_PREVIEW_FAIL_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_event_ind
 * DESCRIPTION
 *  This function is to send camera event indication message.
 * PARAMETERS
 *  event       [IN]        
 *  cause       [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void cam_send_event_ind(kal_uint8 event, kal_uint8 cause)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_cam_event_ind_struct *ind_p;
    ilm_struct *ilm_ptr = NULL;

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

    ind_p->event = event;
    ind_p->cause = cause;

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

    ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_CAM_EVENT_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_capture_event_ind
 * DESCRIPTION
 *  This function is to send camera capture event indication message.
 * PARAMETERS
 *  result      [IN]        
 *  count       [IN]        
 *  kal_uint8 event(?)
 * RETURNS
 *  void
 *****************************************************************************/
void cam_send_capture_event_ind(kal_int16 result, kal_uint16 count)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_cam_capture_event_ind_struct *ind_p;
    ilm_struct *ilm_ptr = NULL;

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

    ind_p->result = result;
    ind_p->count = count;

    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_CAPTURE_EVENT_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_autofocus_process_done_ind
 * DESCRIPTION
 *  This function is to send camera autofocus event indication message.
 * PARAMETERS
 *  event       [IN]        
 *  result      [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void cam_send_autofocus_process_done_ind(kal_uint8 event, kal_uint8 result)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_cam_event_ind_struct *ind_p;
    ilm_struct *ilm_ptr = NULL;

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

    ind_p->event = event;
    ind_p->cause = result;

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

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

    msg_send_ext_queue(ilm_ptr);

}

#if defined (BARCODE_SUPPORT)
/*****************************************************************************
 * FUNCTION
 *  cam_send_barcode_decode_done_ind
 * DESCRIPTION
 *  This function is to send camera autofocus event indication message.
 * PARAMETERS
 *  event       [IN]        
 *  result      [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void cam_send_barcode_decode_done_ind(kal_uint8 event, kal_uint8 result, kal_uint8 encoding, kal_uint8 nsymbol, kal_uint8 symbolid, kal_uint8 paritydata)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_cam_barcode_event_ind_struct *ind_p;
    ilm_struct *ilm_ptr = NULL;

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

    ind_p->event = event;
    ind_p->cause = result;
    ind_p->encoding = encoding;
    ind_p->nsymbol = nsymbol;
    ind_p->symbolid = symbolid;
    ind_p->paritydata = paritydata;

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

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

    msg_send_ext_queue(ilm_ptr);

}
#endif


/*****************************************************************************
 * FUNCTION
 *  cam_send_start_fast_zoom_req
 * DESCRIPTION
 *  This function is to send camera start fast zoom request message.
 * PARAMETERS
 *  src_mod_id      [IN]        
 *  zoom_in         [IN]        
 *  zoom_limit      [IN]        
 *  zoom_step       [IN]        
 *  zoom_speed      [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void cam_send_start_fast_zoom_req(
        module_type src_mod_id,
        kal_bool zoom_in,
        kal_uint8 zoom_limit,
        kal_uint8 zoom_step,
        kal_uint8 zoom_speed)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_cam_start_fast_zoom_req_struct *msg_p = NULL;
    ilm_struct *ilm_ptr = NULL;

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

    msg_p->zoom_in = zoom_in;
    msg_p->zoom_limit = zoom_limit;
    msg_p->zoom_step = zoom_step;
    msg_p->zoom_speed = zoom_speed;

    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_START_FAST_ZOOM_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_stop_fast_zoom_req
 * DESCRIPTION
 *  This function is to send camera stop fast zoom request message.
 * PARAMETERS
 *  src_mod_id      [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void cam_send_stop_fast_zoom_req(module_type src_mod_id)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_cam_stop_fast_zoom_req_struct *msg_p = NULL;
    ilm_struct *ilm_ptr = NULL;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    msg_p = (media_cam_stop_fast_zoom_req_struct*)
        construct_local_para(sizeof(media_cam_stop_fast_zoom_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_STOP_FAST_ZOOM_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_get_fast_zoom_factor_req
 * DESCRIPTION
 *  This function is to send camera get fast zoom factor request message.
 * PARAMETERS
 *  src_mod_id      [IN]        
 *  factor          [?]         
 * RETURNS
 *  void
 *****************************************************************************/
void cam_send_get_fast_zoom_factor_req(module_type src_mod_id, kal_uint8 *factor)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_cam_get_fast_zoom_factor_req_struct *msg_p = NULL;
    ilm_struct *ilm_ptr = NULL;

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

    msg_p->factor = factor;

    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_GET_FAST_ZOOM_FACTOR_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_get_focus_steps_req
 * DESCRIPTION
 *  This function is to send camera get focus steps request message.
 * PARAMETERS
 *  src_mod_id          [IN]        
 *  total_steps         [?]         
 *  current_steps       [?]         
 *  flag                [?]         
 * RETURNS
 *  void
 *****************************************************************************/
void cam_send_get_focus_steps_req(
        module_type src_mod_id,
        kal_uint32 *total_steps,
        kal_uint32 *current_steps,
        kal_bool *flag)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_cam_get_focus_steps_req_struct *msg_p = NULL;
    ilm_struct *ilm_ptr = NULL;

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

    msg_p->total_steps = total_steps;
    msg_p->current_steps = current_steps;
    msg_p->flag = flag;

    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_GET_FOCUS_STEPS_REQ;
    ilm_ptr->local_para_ptr = (local_para_struct*) msg_p;
    ilm_ptr->peer_buff_ptr = NULL;

    msg_send_ext_queue(ilm_ptr);
}

#endif /* __MED_CAM_MOD__ */ 

#endif /* MED_NOT_PRESENT */ 

⌨️ 快捷键说明

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