MWCapture SDK Linux
3.3.1.LAST_SVN_COMMIT_NUM
|
Typedefs | |
typedef void(* | MW_ENCODER_CALLBACK) (void *user_ptr, const uint8_t *p_frame, uint32_t frame_len, mw_venc_frame_info_t *p_frame_info) |
Callback functions. More... | |
Functions | |
mw_venc_status_t | mw_venc_init () |
Initializes mw_venc. More... | |
mw_venc_status_t | mw_venc_deinit () |
Destroys mw_venc. More... | |
int32_t | mw_venc_get_gpu_num () |
Obtains the number of GPUs for hardware video encoding and decoding. More... | |
mw_venc_status_t | mw_venc_get_gpu_info_by_index (int32_t index, mw_venc_gpu_info_t *info) |
Obtains hardware information of GPU by index. More... | |
mw_venc_status_t | mw_venc_get_default_param (mw_venc_param_t *p_param) |
Gets the default value of encoding parameters. More... | |
uint32_t | mw_venc_get_support_platfrom () |
Gets supported encoding hardware platform. More... | |
mw_venc_handle_t | mw_venc_create (mw_venc_platform_t platform, mw_venc_param_t *p_param, MW_ENCODER_CALLBACK frame_callback, void *user_ptr) |
Creates an encoder. More... | |
mw_venc_handle_t | mw_venc_create_by_index (int32_t index, mw_venc_param_t *p_param, MW_ENCODER_CALLBACK frame_callback, void *user_ptr) |
Ctreats an encoder. More... | |
mw_venc_status_t | mw_venc_put_frame (mw_venc_handle_t handle, uint8_t *p_frame) |
Imports data to encoders. More... | |
mw_venc_status_t | mw_venc_put_frame_ex (mw_venc_handle_t handle, uint8_t *p_frame, int64_t pts) |
Imports data to encoders. More... | |
mw_venc_status_t | mw_venc_destory (mw_venc_handle_t handle) |
Destroys encoders. More... | |
mw_venc_status_t | mw_venc_get_property (mw_venc_handle_t handle, mw_venc_property_t param, void *args) |
Gets encoder parameters. More... | |
mw_venc_status_t | mw_venc_set_property (mw_venc_handle_t handle, mw_venc_property_t param, void *args) |
Sets encoder parameters. More... | |
typedef void(* MW_ENCODER_CALLBACK) (void *user_ptr, const uint8_t *p_frame, uint32_t frame_len, mw_venc_frame_info_t *p_frame_info) |
Callback functions.
out code date.
Related function(s):
mw_venc_create
mw_venc_create_ex
mw_venc_handle_t mw_venc_create | ( | mw_venc_platform_t | platform, |
mw_venc_param_t * | p_param, | ||
MW_ENCODER_CALLBACK | frame_callback, | ||
void * | user_ptr | ||
) |
Creates an encoder.
[in] | platform | Hardware encoding platform |
[in] | p_param | Encoder parameters |
[in] | frame_callback | Encoder callback function |
[in] | user_ptr | Callback parameter |
Usage:
The recommended way to call the function is as follows.
mw_venc_handle_t mw_venc_create_by_index | ( | int32_t | index, |
mw_venc_param_t * | p_param, | ||
MW_ENCODER_CALLBACK | frame_callback, | ||
void * | user_ptr | ||
) |
Ctreats an encoder.
[in] | index | index of GPU used for hardware encoding |
[in] | p_param | parameters of the encoder |
[in] | frame_callback | callback |
[in] | user_ptr | callback parameters |
Usage:
The recommended way to call the function is as follows.
mw_venc_status_t mw_venc_deinit | ( | ) |
Destroys mw_venc.
Usage: Refers to mw_venc_init
mw_venc_status_t mw_venc_destory | ( | mw_venc_handle_t | handle | ) |
Destroys encoders.
[in] | handle | Encoder handle |
MW_VENC_STATUS_SUCCESS | Function call succeeded. |
MW_VENC_STATUS_INVALID_PARAM | Input invalid value(s). |
Usage:
The usage refers to mw_venc_create mw_venc_create_by_index
mw_venc_status_t mw_venc_get_default_param | ( | mw_venc_param_t * | p_param | ) |
Gets the default value of encoding parameters.
[out] | p_param | encoding parameters |
MW_VENC_STATUS_SUCCESS | Function call succeeded. |
MW_VENC_STATUS_INVALID_PARAM | Input invalid value(s). |
Related type(s):
mw_venc_param_t
Sets the default value of the parameters.
mw_venc_status_t mw_venc_get_gpu_info_by_index | ( | int32_t | index, |
mw_venc_gpu_info_t * | info | ||
) |
Obtains hardware information of GPU by index.
MW_VENC_STATUS_SUCCESS | Function call succeeded. |
MW_VENC_STATUS_INVALID_PARAM | Input invalid value(s). |
Related type(s):
mw_venc_gpu_info_t Usage:
Call the function after mw_venc_init
int32_t mw_venc_get_gpu_num | ( | ) |
Obtains the number of GPUs for hardware video encoding and decoding.
Usage: Refers to mw_venc_init Note: Call the function after mw_venc_init
mw_venc_status_t mw_venc_get_property | ( | mw_venc_handle_t | handle, |
mw_venc_property_t | param, | ||
void * | args | ||
) |
Gets encoder parameters.
[in] | handle | Encoder handle |
[in] | param | Parameter type |
[out] | args | Parameter values |
MW_VENC_STATUS_SUCCESS | Function call succeeded. |
MW_VENC_STATUS_INVALID_PARAM | Input invalid value(s). |
MW_VENC_STATUS_FAIL | Failed to get encoder parameters. |
MW_VENC_STATUS_UNSUPPORT | Unsupported parameter type. |
MW_VENC_STATUS_UNKNOWN_ERROR | Failed to get encoder parameters with unknown error. |
Usage:
The usage refers to mw_venc_create mw_venc_create_by_index
uint32_t mw_venc_get_support_platfrom | ( | ) |
Gets supported encoding hardware platform.
Usage:
The recommended way of calling function:
mw_venc_status_t mw_venc_init | ( | ) |
Initializes mw_venc.
Usage: The suggested API call:
mw_venc_status_t mw_venc_put_frame | ( | mw_venc_handle_t | handle, |
uint8_t * | p_frame | ||
) |
Imports data to encoders.
[in] | handle | Encoder handle |
[in] | p_frame | Frame data |
MW_VENC_STATUS_SUCCESS | Function call succeeded. |
MW_VENC_STATUS_INVALID_PARAM | Input invalid value(s). |
MW_VENC_STATUS_FAIL | Function call failed. |
MW_VENC_STATUS_UNKNOWN_ERROR | Function call failed with unknown errors. |
Usage:
The usage refers to mw_venc_create
mw_venc_create_by_index
mw_venc_status_t mw_venc_put_frame_ex | ( | mw_venc_handle_t | handle, |
uint8_t * | p_frame, | ||
int64_t | pts | ||
) |
Imports data to encoders.
[in] | handle | Encoder handle |
[in] | p_frame | Frame data |
[in] | pts | timestamp |
MW_VENC_STATUS_SUCCESS | Function call succeeded |
MW_VENC_STATUS_INVALID_PARAM | Input invalid value(s). |
MW_VENC_STATUS_FAIL | Function call failed. |
MW_VENC_STATUS_UNKNOWN_ERROR | Function call failed with unknown errors. |
Usage:
The usage refers to mw_venc_put_frame
mw_venc_status_t mw_venc_set_property | ( | mw_venc_handle_t | handle, |
mw_venc_property_t | param, | ||
void * | args | ||
) |
Sets encoder parameters.
[in] | handle | Encoder handle [in] param Parameter type |
[in] | args | Parameter values |
MW_VENC_STATUS_SUCCESS | Function call succeeded. |
MW_VENC_STATUS_INVALID_PARAM | Input invalid value(s). |
MW_VENC_STATUS_FAIL | Function call failed. |
MW_VENC_STATUS_UNSUPPORT | Unsupported parameter type. |
Usage:
The usage refers to mw_venc_create mw_venc_create_by_index