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

📄 vid_api.c

📁 最新MTK手机软件源码
💻 C
📖 第 1 页 / 共 4 页
字号:

/*****************************************************************************
 * FUNCTION
 *  media_vid_time_to_frame
 * DESCRIPTION
 *  This function is to map given time to the frame number.
 * PARAMETERS
 *  time        [IN]        
 *  frame       [?]         
 * RETURNS
 *  The result of this action.
 *****************************************************************************/
kal_int32 media_vid_time_to_frame(kal_uint32 time, kal_uint32 *frame)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if ((video_dec_time2frame(time, frame)) == MEDIA_STATUS_OK)
    {
        return MED_RES_OK;
    }
    else
    {
        return MED_RES_ERROR;
    }
}


/*****************************************************************************
 * FUNCTION
 *  media_vid_check_unfinished_file
 * DESCRIPTION
 *  This function is to check unfinished video recording file.
 * PARAMETERS
 *  src_mod_id      [IN]        
 * RETURNS
 *  True/False
 *****************************************************************************/
kal_bool media_vid_check_unfinished_file(module_type src_mod_id)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    return vid_check_unfinished_file();
}


/*****************************************************************************
 * FUNCTION
 *  media_vid_clean_temp_files
 * DESCRIPTION
 *  This function is to clean temp files.
 * PARAMETERS
 *  src_mod_id      [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void media_vid_clean_temp_files(module_type src_mod_id)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    vid_clean_temp_files();
}

#endif /* defined (__MED_VID_MOD__) */ 

#if defined (__MED_MJPG_MOD__)


/*****************************************************************************
 * FUNCTION
 *  media_vid_get_current_play_time
 * DESCRIPTION
 *  This function is to get current time when video playing.
 * PARAMETERS
 *  src_mod_id      [IN]        
 *  time            [?]         
 * RETURNS
 *  The result of this action.(?)
 *****************************************************************************/
void media_vid_get_current_play_time(module_type src_mod_id, kal_uint64 *time)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    *time = vid_context_p->time_played;
}


/*****************************************************************************
 * FUNCTION
 *  media_vid_get_decode_time
 * DESCRIPTION
 *  This function is to get current time by the given frame index.
 * PARAMETERS
 *  src_mod_id      [IN]        
 *  frame_no        [IN]        
 *  time            [?]         
 * RETURNS
 *  The result of this action.
 *****************************************************************************/
kal_int32 media_vid_get_decode_time(module_type src_mod_id, kal_uint32 frame_no, kal_uint64 *time)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    *time = 0;
    return MED_RES_OK;
}


/*****************************************************************************
 * FUNCTION
 *  media_vid_get_current_record_time
 * DESCRIPTION
 *  This function is to get current time when video recording.
 * PARAMETERS
 *  src_mod_id      [IN]        
 *  time            [?]         
 * RETURNS
 *  The result of this action.(?)
 *****************************************************************************/
void media_vid_get_current_record_time(module_type src_mod_id, kal_uint64 *time)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    med_avi_get_cur_record_time(time);
}


/*****************************************************************************
 * FUNCTION
 *  media_vid_get_current_frame_num
 * DESCRIPTION
 *  This function is to get current frame number when video playing.
 * PARAMETERS
 *  src_mod_id      [IN]        
 *  frame_num       [?]         
 * RETURNS
 *  The result of this action.(?)
 *****************************************************************************/
void media_vid_get_current_frame_num(module_type src_mod_id, kal_uint32 *frame_num)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    *frame_num = (kal_uint32) MAX(vid_context_p->current_frame_num, 0);
}

/* dummy code */


/*****************************************************************************
 * FUNCTION
 *  media_vid_frame_to_time
 * DESCRIPTION
 *  
 * PARAMETERS
 *  frame       [IN]        
 *  time        [?]         
 * RETURNS
 *  
 *****************************************************************************/
kal_int32 media_vid_frame_to_time(kal_uint32 frame, kal_uint32 *time)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    return MED_RES_ERROR;
}


/*****************************************************************************
 * FUNCTION
 *  media_vid_time_to_frame
 * DESCRIPTION
 *  
 * PARAMETERS
 *  time        [IN]        
 *  frame       [?]         
 * RETURNS
 *  
 *****************************************************************************/
kal_int32 media_vid_time_to_frame(kal_uint32 time, kal_uint32 *frame)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    return MED_RES_ERROR;
}


/*****************************************************************************
 * FUNCTION
 *  media_vid_check_unfinished_file
 * DESCRIPTION
 *  
 * PARAMETERS
 *  src_mod_id      [IN]        
 * RETURNS
 *  
 *****************************************************************************/
kal_bool media_vid_check_unfinished_file(module_type src_mod_id)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    return KAL_FALSE;
}


/*****************************************************************************
 * FUNCTION
 *  media_vid_clean_temp_files
 * DESCRIPTION
 *  
 * PARAMETERS
 *  src_mod_id      [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void media_vid_clean_temp_files(module_type src_mod_id)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
}

#endif /* defined (__MED_MJPG_MOD__) */ 


/*****************************************************************************
 * FUNCTION
 *  media_vid_set_overlay_palette
 * DESCRIPTION
 *  This function is to set the overlay palette for camera.
 * PARAMETERS
 *  src_mod_id              [IN]        
 *  palette_size            [IN]        
 *  palette_addr_ptr        [?]         
 * RETURNS
 *  void
 *****************************************************************************/
void media_vid_set_overlay_palette(module_type src_mod_id, kal_uint8 palette_size, kal_uint32 *palette_addr_ptr)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    vid_send_set_overlay_palette_req(src_mod_id, palette_size, palette_addr_ptr);
    VID_WAIT_EVENT_EXT(VID_EVT_SET_PAL);
}

#endif /* defined (__MED_VID_MOD__) || defined(__MED_MJPG_MOD__) */ 

#endif /* MED_NOT_PRESENT */ 

⌨️ 快捷键说明

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