Tizen Native API
5.0
|
The Media Codec APIs provides functions for encoding and decoding using media data.
#include <media_codec.h>
This API is related with the following features:
It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature Element.
MEDIA CODEC API allows : The API allows you to direct access to the media codec on device. It operates on "raw" data, so any file headers must be stripped off. media_packet is used for zero-copy.
Functions | |
int | mediacodec_create (mediacodec_h *mediacodec) |
Creates a mediacodec handle for decoding/encoding. | |
int | mediacodec_destroy (mediacodec_h mediacodec) |
Destroys the mediacodec handle and releases all its resources. | |
int | mediacodec_set_codec (mediacodec_h mediacodec, mediacodec_codec_type_e codec_type, int flags) |
Sets the codec type and decoder/encoder. | |
int | mediacodec_set_vdec_info (mediacodec_h mediacodec, int width, int height) |
Sets the default info for the video decoder. | |
int | mediacodec_set_venc_info (mediacodec_h mediacodec, int width, int height, int fps, int target_bits) |
Sets the default info for the video encoder. | |
int | mediacodec_set_adec_info (mediacodec_h mediacodec, int samplerate, int channel, int bit) |
Sets the default info for the audio decoder. | |
int | mediacodec_set_aenc_info (mediacodec_h mediacodec, int samplerate, int channel, int bit, int bitrate) |
Sets the default info for the audio encoder. | |
int | mediacodec_configure_from_media_format (mediacodec_h mediacodec, media_format_h format, int flags) |
Sets the codec type and codec default info via media format. | |
int | mediacodec_prepare (mediacodec_h mediacodec) |
Prepares mediacodec for encoding/decoding. | |
int | mediacodec_unprepare (mediacodec_h mediacodec) |
Unprepares mediacodec for encoding/decoding. | |
int | mediacodec_process_input (mediacodec_h mediacodec, media_packet_h inbuf, uint64_t timeOutUs) |
Decodes/Encodes a packet. The function passed undecoded/unencoded packet to the input queue and decode/encode a frame sequentially. | |
int | mediacodec_get_output (mediacodec_h mediacodec, media_packet_h *packet, uint64_t timeOutUs) |
Gets the decoded or encoded packet from the output queue. | |
int | mediacodec_flush_buffers (mediacodec_h mediacodec) |
Flushes both input and output buffers. | |
int | mediacodec_set_input_buffer_used_cb (mediacodec_h mediacodec, mediacodec_input_buffer_used_cb callback, void *user_data) |
Sets empty buffer callback the media codec for process, asynchronously. | |
int | mediacodec_unset_input_buffer_used_cb (mediacodec_h mediacodec) |
Unsets input buffer used callback the media codec for process, asynchronously. | |
int | mediacodec_set_output_buffer_available_cb (mediacodec_h mediacodec, mediacodec_output_buffer_available_cb callback, void *user_data) |
Sets output buffer available callback the media codec for process, asynchronously. | |
int | mediacodec_unset_output_buffer_available_cb (mediacodec_h mediacodec) |
unsets output buffer available callback the media codec for process, asynchronously. | |
int | mediacodec_set_error_cb (mediacodec_h mediacodec, mediacodec_error_cb callback, void *user_data) |
Sets error callback the media codec for process, asynchronously. | |
int | mediacodec_unset_error_cb (mediacodec_h mediacodec) |
Unsets error callback the media codec for process, asynchronously. | |
int | mediacodec_set_eos_cb (mediacodec_h mediacodec, mediacodec_eos_cb callback, void *user_data) |
Sets eos callback the media codec for process, asynchronously. | |
int | mediacodec_unset_eos_cb (mediacodec_h mediacodec) |
unsets eos callback the media codec for process, asynchronously. | |
int | mediacodec_set_buffer_status_cb (mediacodec_h mediacodec, mediacodec_buffer_status_cb callback, void *user_data) |
Sets a callback function to be invoked when the mediacodec needs more data or has enough data. | |
int | mediacodec_unset_buffer_status_cb (mediacodec_h mediacodec) |
Unsets the callback function. | |
int | mediacodec_foreach_supported_codec (mediacodec_h mediacodec, mediacodec_supported_codec_cb callback, void *user_data) |
Retrieves all supported codecs by invoking callback function once for each supported codecs. | |
int | mediacodec_get_supported_type (mediacodec_h mediacodec, mediacodec_codec_type_e codec_type, bool encoder, int *support_type) |
Verifies whether encoding can be performed with codec_type or not. | |
int | mediacodec_get_packet_pool (mediacodec_h mediacodec, media_packet_pool_h *pool) |
Gets the media packet pool allocated for recycling media packets. | |
Typedefs | |
typedef struct mediacodec_s * | mediacodec_h |
Media Codec type handle. | |
typedef void(* | mediacodec_input_buffer_used_cb )(media_packet_h packet, void *user_data) |
Called when the input buffer(packet) used up. | |
typedef void(* | mediacodec_output_buffer_available_cb )(media_packet_h packet, void *user_data) |
Called when the output buffer is available. | |
typedef void(* | mediacodec_error_cb )(mediacodec_error_e error, void *user_data) |
Called when the error has occured. | |
typedef void(* | mediacodec_eos_cb )(void *user_data) |
Called when there is no data to decode/encode. | |
typedef void(* | mediacodec_buffer_status_cb )(mediacodec_status_e status, void *user_data) |
Called when the mediacodec needs more data or has enough data. | |
typedef bool(* | mediacodec_supported_codec_cb )(mediacodec_codec_type_e codec_type, void *user_data) |
Called once for each supported codec types. |
typedef void(* mediacodec_buffer_status_cb)(mediacodec_status_e status, void *user_data) |
Called when the mediacodec needs more data or has enough data.
It is recommended that the application stops calling mediacodec_process_input() when MEDIACODEC_ENOUGH_DATA
[in] | status | The state of the buffer |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* mediacodec_eos_cb)(void *user_data) |
Called when there is no data to decode/encode.
It will be invoked when the end-of-stream is reached.
[in] | user_data | The user data passed from the callback registration function |
typedef void(* mediacodec_error_cb)(mediacodec_error_e error, void *user_data) |
Called when the error has occured.
It will be invoked when the error has occured. Following error codes can be delivered. MEDIACODEC_ERROR_INTERNAL, MEDIACODEC_ERROR_INVALID_STREAM, MEDIACODEC_ERROR_NOT_SUPPORTED_FORMAT, MEDIACODEC_ERROR_RESOURCE_CONFLICT
[in] | error | The error code |
[in] | user_data | The user data passed from the callback registration function |
typedef struct mediacodec_s* mediacodec_h |
Media Codec type handle.
typedef void(* mediacodec_input_buffer_used_cb)(media_packet_h packet, void *user_data) |
Called when the input buffer(packet) used up.
It will be invoked when mediacodec has used input buffer.
[in] | packet | The media packet handle |
[in] | user_data | The user data passed from the callback registration function |
typedef void(* mediacodec_output_buffer_available_cb)(media_packet_h packet, void *user_data) |
Called when the output buffer is available.
It will be invoked when mediacodec has output buffer.
[in] | packet | The media packet handle |
[in] | user_data | The user data passed from the callback registration function |
typedef bool(* mediacodec_supported_codec_cb)(mediacodec_codec_type_e codec_type, void *user_data) |
Called once for each supported codec types.
[in] | codec_type | The codec type |
[in] | user_data | The user data passed from the foreach function |
true
to continue with the next iteration of the loop, false
to break out of the loop. Enumerations of media codec type.
enum mediacodec_error_e |
Enumeration of media codec error.
enum mediacodec_status_e |
Enumeration of media codec support type.
int mediacodec_configure_from_media_format | ( | mediacodec_h | mediacodec, |
media_format_h | format, | ||
int | flags | ||
) |
Sets the codec type and codec default info via media format.
Sets the value via media format instead of mediacodec_set_codec(), mediacodec_set_venc_info(), mediacodec_set_vdec_info(), mediacodec_set_aenc_info(), and mediacodec_set_adec_info().
[in] | mediacodec | The mediacodec handle |
[in] | format | The media_format_h of input data |
[in] | flags | The encoding/decoding scheme, values of mediacodec_support_type_e combined with bitwise 'or' |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_CODEC_NOT_FOUND | Unsupported codec |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_create | ( | mediacodec_h * | mediacodec | ) |
Creates a mediacodec handle for decoding/encoding.
[out] | mediacodec | A new handle to mediacodec |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIACODEC_ERROR_INVALID_OPERATION | Invalid operation |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_destroy | ( | mediacodec_h | mediacodec | ) |
Destroys the mediacodec handle and releases all its resources.
[in] | mediacodec | The handle to mediacodec to be destroyed. |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIACODEC_ERROR_INVALID_OPERATION | Invalid operation |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_flush_buffers | ( | mediacodec_h | mediacodec | ) |
Flushes both input and output buffers.
[in] | mediacodec | The handle to mediacodec |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_foreach_supported_codec | ( | mediacodec_h | mediacodec, |
mediacodec_supported_codec_cb | callback, | ||
void * | user_data | ||
) |
Retrieves all supported codecs by invoking callback function once for each supported codecs.
[in] | mediacodec | The handle to mediacodec |
[in] | callback | The callback function to invoke |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_get_output | ( | mediacodec_h | mediacodec, |
media_packet_h * | packet, | ||
uint64_t | timeOutUs | ||
) |
Gets the decoded or encoded packet from the output queue.
[in] | mediacodec | The handle to mediacodec |
[out] | packet | The current output of the decoder/encoder. this function passed decoded/encoded frame to output queue. |
[in] | timeOutUs | The timeout in microseconds. The input buffer wait up to "timeOutUs" microseconds. |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIACODEC_ERROR_INVALID_OPERATION | Invalid operation |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_get_packet_pool | ( | mediacodec_h | mediacodec, |
media_packet_pool_h * | pool | ||
) |
Gets the media packet pool allocated for recycling media packets.
The user can get the pool allocated with the number of packets are required to be used in codecs.
It is recommended to use media packet pool for better stability and performance.
[in] | mediacodec | The mediacodec handle |
[out] | pool | The allocated pool handle |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIACODEC_ERROR_INVALID_OPERATION | The user calls mediacodec_get_packet_pool() before calling mediacodec_prepare(). |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_get_supported_type | ( | mediacodec_h | mediacodec, |
mediacodec_codec_type_e | codec_type, | ||
bool | encoder, | ||
int * | support_type | ||
) |
Verifies whether encoding can be performed with codec_type or not.
[in] | mediacodec | The handle to mediacodec |
[in] | codec_type | The identifier of the codec type of the encoder. |
[in] | encoder | Whether the encoder or decoder : (true = encoder, false = decoder). |
[out] | support_type | (MEDIACODEC_SUPPORT_TYPE_HW = mediacodec can be performed with hardware codec, MEDIACODEC_SUPPORT_TYPE_SW = mediacodec can be performed with software codec) |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) #include <media_codec.h> mediacodec_h mediacodec; mediacodec_support_type_e type; mediacodec_codec_type_e codec_type = MEDIACODEC_H264; mediacodec_create(&mediacodec); mediacodec_get_supported_type(mediacodec, codec_type, 1, &type); if(type == MEDIACODEC_SUPPORT_TYPE_HW) // only h/w supported else if (type == MEDIACODEC_SUPPORT_TYPE_SW) // only s/w supported else if (type == (MEDIACODEC_SUPPORT_TYPE_HW|MEDIACODEC_SUPPORT_TYPE_SW) // both supported mediacodec_set_codec(mediacodec, codec_type, MEDIACODEC_ENCODER | MEDIACODEC_SUPPORT_TYPE_HW); |
int mediacodec_prepare | ( | mediacodec_h | mediacodec | ) |
Prepares mediacodec for encoding/decoding.
[in] | mediacodec | The handle to mediacodec |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIACODEC_ERROR_INVALID_OPERATION | Invalid operation |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
MEDIACODEC_ERROR_RESOURCE_OVERLOADED | Exceed the instance limits (Since 5.0) |
MEDIACODEC_ERROR_INTERNAL | Internal error (Since 5.0) |
int mediacodec_process_input | ( | mediacodec_h | mediacodec, |
media_packet_h | inbuf, | ||
uint64_t | timeOutUs | ||
) |
Decodes/Encodes a packet. The function passed undecoded/unencoded packet to the input queue and decode/encode a frame sequentially.
[in] | mediacodec | The handle to mediacodec |
[in] | inbuf | The current input format for the decoder/encoder |
[in] | timeOutUs | The timeout in microseconds. The input buffer wait up to "timeOutUs" microseconds. |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIACODEC_ERROR_INVALID_OPERATION | Invalid operation |
MEDIACODEC_ERROR_OVERFLOW_INBUFFER | Overflow inputbuffer |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_set_adec_info | ( | mediacodec_h | mediacodec, |
int | samplerate, | ||
int | channel, | ||
int | bit | ||
) |
Sets the default info for the audio decoder.
[in] | mediacodec | The handle to mediacodec |
[in] | samplerate | The samplerate for audio decoding. |
[in] | channel | The channels for audio decoding. |
[in] | bit | The bits resolution for audio decoding. |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIACODEC_ERROR_INVALID_OPERATION | Invalid operation |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_set_aenc_info | ( | mediacodec_h | mediacodec, |
int | samplerate, | ||
int | channel, | ||
int | bit, | ||
int | bitrate | ||
) |
Sets the default info for the audio encoder.
[in] | mediacodec | The handle to mediacodec |
[in] | samplerate | The samplerate for audio encoding. |
[in] | channel | The channels for audio encoding. |
[in] | bit | The bits resolution for audio encoding. |
[in] | bitrate | The bitrate for audio encoding. |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIACODEC_ERROR_INVALID_OPERATION | Invalid operation |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_set_buffer_status_cb | ( | mediacodec_h | mediacodec, |
mediacodec_buffer_status_cb | callback, | ||
void * | user_data | ||
) |
Sets a callback function to be invoked when the mediacodec needs more data or has enough data.
[in] | mediacodec | The handle to mediacodec |
[in] | callback | The callback function to register |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_set_codec | ( | mediacodec_h | mediacodec, |
mediacodec_codec_type_e | codec_type, | ||
int | flags | ||
) |
Sets the codec type and decoder/encoder.
[in] | mediacodec | The handle of mediacodec |
[in] | codec_type | The identifier of the codec type of the decoder/encoder |
[in] | flags | The encoding/decoding scheme, defined by mediacodec_support_type_e |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIACODEC_ERROR_INVALID_OPERATION | Invalid operation |
MEDIACODEC_ERROR_CODEC_NOT_FOUND | Codec not found |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_set_eos_cb | ( | mediacodec_h | mediacodec, |
mediacodec_eos_cb | callback, | ||
void * | user_data | ||
) |
Sets eos callback the media codec for process, asynchronously.
[in] | mediacodec | The handle to mediacodec |
[in] | callback | The callback function to register |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_set_error_cb | ( | mediacodec_h | mediacodec, |
mediacodec_error_cb | callback, | ||
void * | user_data | ||
) |
Sets error callback the media codec for process, asynchronously.
[in] | mediacodec | The handle to mediacodec |
[in] | callback | The callback function to register |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_set_input_buffer_used_cb | ( | mediacodec_h | mediacodec, |
mediacodec_input_buffer_used_cb | callback, | ||
void * | user_data | ||
) |
Sets empty buffer callback the media codec for process, asynchronously.
[in] | mediacodec | The handle to mediacodec |
[in] | callback | The callback function to register |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_set_output_buffer_available_cb | ( | mediacodec_h | mediacodec, |
mediacodec_output_buffer_available_cb | callback, | ||
void * | user_data | ||
) |
Sets output buffer available callback the media codec for process, asynchronously.
[in] | mediacodec | The handle to mediacodec |
[in] | callback | The callback function to register |
[in] | user_data | The user data to be passed to the callback function |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_set_vdec_info | ( | mediacodec_h | mediacodec, |
int | width, | ||
int | height | ||
) |
Sets the default info for the video decoder.
[in] | mediacodec | The handle to mediacodec |
[in] | width | The width for video decoding. |
[in] | height | The height for video decoding. |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIACODEC_ERROR_INVALID_OPERATION | Invalid operation |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_set_venc_info | ( | mediacodec_h | mediacodec, |
int | width, | ||
int | height, | ||
int | fps, | ||
int | target_bits | ||
) |
Sets the default info for the video encoder.
0
. [in] | mediacodec | The handle to mediacodec |
[in] | width | The width for video encoding. |
[in] | height | The height for video encoding. |
[in] | fps | The frame rate in frames per second. |
[in] | target_bits | The target bitrates in bits per second.(a unit of kbit) |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIACODEC_ERROR_INVALID_OPERATION | Invalid operation |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_unprepare | ( | mediacodec_h | mediacodec | ) |
Unprepares mediacodec for encoding/decoding.
[in] | mediacodec | The handle to mediacodec |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIACODEC_ERROR_INVALID_OPERATION | Invalid operation |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_unset_buffer_status_cb | ( | mediacodec_h | mediacodec | ) |
Unsets the callback function.
[in] | mediacodec | The handle to mediacodec |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_unset_eos_cb | ( | mediacodec_h | mediacodec | ) |
unsets eos callback the media codec for process, asynchronously.
[in] | mediacodec | The handle to mediacodec |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_unset_error_cb | ( | mediacodec_h | mediacodec | ) |
Unsets error callback the media codec for process, asynchronously.
[in] | mediacodec | The handle to mediacodec |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_unset_input_buffer_used_cb | ( | mediacodec_h | mediacodec | ) |
Unsets input buffer used callback the media codec for process, asynchronously.
[in] | mediacodec | The handle to mediacodec |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |
int mediacodec_unset_output_buffer_available_cb | ( | mediacodec_h | mediacodec | ) |
unsets output buffer available callback the media codec for process, asynchronously.
[in] | mediacodec | The handle to mediacodec |
0
on success, otherwise a negative error value MEDIACODEC_ERROR_NONE | Successful |
MEDIACODEC_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIACODEC_ERROR_NOT_SUPPORTED_ON_DEVICE | Not supported on device (Since 4.0) |