📄 vid_api.c
字号:
* void
*****************************************************************************/
void media_vid_stop(module_type src_mod_id)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
vid_send_stop_req(src_mod_id);
VID_WAIT_EVENT(VID_EVT_STOP);
}
/*****************************************************************************
* FUNCTION
* media_vid_file_merge
* DESCRIPTION
* This function is to merge temp files to a video file.
* PARAMETERS
* src_mod_id [IN]
* path [?]
* RETURNS
* void
*****************************************************************************/
void media_vid_file_merge(module_type src_mod_id, kal_wchar *path)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
vid_send_file_merge_req(src_mod_id, path);
VID_WAIT_EVENT(VID_EVT_FILE_MERGE);
}
/*****************************************************************************
* FUNCTION
* media_vid_open_file
* DESCRIPTION
* This function is to open a video file.
* PARAMETERS
* src_mod_id [IN]
* file_name [?]
* seq_num [IN]
* vid_open_file_struct* open_file(?)
* RETURNS
* The result of this action.
*****************************************************************************/
kal_int32 media_vid_open_file(module_type src_mod_id, void *file_name, kal_uint16 seq_num)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
vid_result = MED_RES_OK;
vid_send_open_file_req(src_mod_id, file_name, seq_num, 0);
VID_WAIT_EVENT(VID_EVT_OPEN_FILE);
return vid_result;
}
/*****************************************************************************
* FUNCTION
* media_vid_open_file_to_mem
* DESCRIPTION
* This function is to open a video file.
* PARAMETERS
* src_mod_id [IN]
* file_name [?]
* seq_num [IN]
* vid_open_file_struct* open_file(?)
* RETURNS
* The result of this action.
*****************************************************************************/
kal_int32 media_vid_open_file_to_mem(module_type src_mod_id, void *file_name, kal_uint16 seq_num)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
vid_result = MED_RES_OK;
vid_send_open_file_req(src_mod_id, file_name, seq_num, 1);
VID_WAIT_EVENT(VID_EVT_OPEN_FILE);
return vid_result;
}
/*****************************************************************************
* FUNCTION
* media_vid_close_file
* DESCRIPTION
* This function is to open a video file.
* PARAMETERS
* src_mod_id [IN]
* RETURNS
* The result of this action.(?)
*****************************************************************************/
void media_vid_close_file(module_type src_mod_id)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
vid_send_close_file_req(src_mod_id);
VID_WAIT_EVENT(VID_EVT_CLOSE_FILE);
}
/*****************************************************************************
* FUNCTION
* media_vid_open
* DESCRIPTION
* This function is to open a video file/array/stream.
* PARAMETERS
* src_mod_id [IN]
* open [?]
* vid_open_file_struct* open_file(?)
* kal_uint16 seq_num(?)
* RETURNS
* The result of this action.
*****************************************************************************/
kal_int32 media_vid_open(module_type src_mod_id, vid_open_struct *open)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
vid_result = MED_RES_OK;
vid_send_open_req(src_mod_id, (void*)open);
VID_WAIT_EVENT(VID_EVT_OPEN);
if (open->image_width)
{
*open->image_width = image_x;
}
if (open->image_height)
{
*open->image_height = image_y;
}
if (open->total_time)
{
*open->total_time = vid_total_time;
}
return vid_result;
}
/*****************************************************************************
* FUNCTION
* media_vid_close
* DESCRIPTION
* This function is to close a video file/array/stream.
* PARAMETERS
* src_mod_id [IN]
* RETURNS
* The result of this action.(?)
*****************************************************************************/
void media_vid_close(module_type src_mod_id)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
vid_send_close_req(src_mod_id);
VID_WAIT_EVENT(VID_EVT_CLOSE);
}
/*****************************************************************************
* FUNCTION
* media_vid_play
* DESCRIPTION
* This function is to start video playing.
* PARAMETERS
* src_mod_id [IN]
* play [?]
* RETURNS
* The result of this action.
*****************************************************************************/
kal_int32 media_vid_play(module_type src_mod_id, void *play)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
vid_result = MED_RES_OK;
vid_send_play_req(src_mod_id, play);
VID_WAIT_EVENT(VID_EVT_PLAY);
return vid_result;
}
/*****************************************************************************
* FUNCTION
* media_vid_seek
* DESCRIPTION
* This function is to seek to the given position.
* PARAMETERS
* src_mod_id [IN]
* seek [?]
* RETURNS
* The result of this action.
*****************************************************************************/
kal_int32 media_vid_seek(module_type src_mod_id, vid_seek_struct *seek)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
vid_result = MED_RES_OK;
vid_send_seek_req(src_mod_id, seek);
VID_WAIT_EVENT(VID_EVT_SEEK);
return vid_result;
}
/*****************************************************************************
* FUNCTION
* media_vid_pause
* DESCRIPTION
* This function is to pause the video playing.
* PARAMETERS
* src_mod_id [IN]
* RETURNS
* The result of this action.
*****************************************************************************/
kal_int32 media_vid_pause(module_type src_mod_id)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
vid_result = MED_RES_OK;
vid_send_pause_req(src_mod_id);
VID_WAIT_EVENT(VID_EVT_PAUSE);
return vid_result;
}
/*****************************************************************************
* FUNCTION
* media_vid_resume
* DESCRIPTION
* This function is to resume the video playing.
* PARAMETERS
* src_mod_id [IN]
* RETURNS
* The result of this action.
*****************************************************************************/
kal_int32 media_vid_resume(module_type src_mod_id)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
vid_result = MED_RES_OK;
vid_send_resume_req(src_mod_id);
VID_WAIT_EVENT(VID_EVT_RESUME);
return vid_result;
}
/*****************************************************************************
* FUNCTION
* media_vid_snapshot
* DESCRIPTION
* This function is to get snapshot when the video playing.
* PARAMETERS
* src_mod_id [IN]
* snapshot [?]
* RETURNS
* The result of this action.
*****************************************************************************/
kal_int32 media_vid_snapshot(module_type src_mod_id, vid_snapshot_struct *snapshot)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -