/**
* @brief Media Codec type handle.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
*/
typedef struct mediacodec_s *mediacodec_h;
/**
* @brief Enumeration of media codec support type.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @remarks If this codec is to be used as an encoder or decoder, the codec flag must be set to #MEDIACODEC_ENCODER or
* #MEDIACODEC_DECODER. If user doesn't set optional flag, default flags will be set to #MEDIACODEC_SUPPORT_TYPE_SW.
*/
/**
* @brief Enumerations of media codec type.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
*/
typedef enum {
MEDIACODEC_NONE = 0x0, /**< NONE*/
MEDIACODEC_L16 = 0x1010, /**< L16*/
MEDIACODEC_ALAW = 0x1020, /**< ALAW*/
MEDIACODEC_ULAW = 0x1030, /**< ULAW*/
- MEDIACODEC_AMR = 0x1040, /**< MEDIACDEC_AMR indicates AMR-NB (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
- MEDIACODEC_AMR_NB = 0x1040, /**< AMR-NB (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
- MEDIACODEC_AMR_WB = 0x1041, /**< AMR-WB (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
+ MEDIACODEC_AMR = 0x1040, /**< MEDIACDEC_AMR indicates AMR-NB (Since 2.4)*/
+ MEDIACODEC_AMR_NB = 0x1040, /**< AMR-NB (Since 2.4)*/
+ MEDIACODEC_AMR_WB = 0x1041, /**< AMR-WB (Since 2.4)*/
MEDIACODEC_G729 = 0x1050, /**< G729*/
- MEDIACODEC_AAC = 0x1060, /**< MEDIACDEC_AAC indicates AAC-LC (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
- MEDIACODEC_AAC_LC = 0x1060, /**< AAC-LC (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
- MEDIACODEC_AAC_HE = 0x1061, /**< HE-AAC (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
- MEDIACODEC_AAC_HE_PS = 0x1062, /**< HE-AAC-PS (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
+ MEDIACODEC_AAC = 0x1060, /**< MEDIACDEC_AAC indicates AAC-LC (Since 2.4)*/
+ MEDIACODEC_AAC_LC = 0x1060, /**< AAC-LC (Since 2.4)*/
+ MEDIACODEC_AAC_HE = 0x1061, /**< HE-AAC (Since 2.4)*/
+ MEDIACODEC_AAC_HE_PS = 0x1062, /**< HE-AAC-PS (Since 2.4)*/
MEDIACODEC_MP3 = 0x1070, /**< MP3*/
- MEDIACODEC_VORBIS = 0x1080, /**< VORBIS (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
- MEDIACODEC_FLAC = 0x1090, /**< FLAC (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
- MEDIACODEC_WMAV1 = 0x10A0, /**< WMA version 1 (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
- MEDIACODEC_WMAV2 = 0x10A1, /**< WMA version 2 (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
- MEDIACODEC_WMAPRO = 0x10A2, /**< WMA Professional (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
- MEDIACODEC_WMALSL = 0x10A3, /**< WMA Lossless (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
+ MEDIACODEC_VORBIS = 0x1080, /**< VORBIS (Since 2.4)*/
+ MEDIACODEC_FLAC = 0x1090, /**< FLAC (Since 2.4)*/
+ MEDIACODEC_WMAV1 = 0x10A0, /**< WMA version 1 (Since 2.4)*/
+ MEDIACODEC_WMAV2 = 0x10A1, /**< WMA version 2 (Since 2.4)*/
+ MEDIACODEC_WMAPRO = 0x10A2, /**< WMA Professional (Since 2.4)*/
+ MEDIACODEC_WMALSL = 0x10A3, /**< WMA Lossless (Since 2.4)*/
MEDIACODEC_OPUS = 0x10D0, /**< OPUS (Since 6.0)*/
MEDIACODEC_H261 = 0x2010, /**< H.261*/
MEDIACODEC_MPEG1 = 0x2050, /**< MPEG1*/
MEDIACODEC_MPEG2 = 0x2060, /**< MPEG2*/
MEDIACODEC_MPEG4 = 0x2070, /**< MPEG4*/
- MEDIACODEC_HEVC = 0x2080, /**< HEVC (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
- MEDIACODEC_VP8 = 0x2090, /**< VP8 (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
- MEDIACODEC_VP9 = 0x20A0, /**< VP9 (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
- MEDIACODEC_VC1 = 0x20B0, /**< VC1 (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
+ MEDIACODEC_HEVC = 0x2080, /**< HEVC (Since 2.4)*/
+ MEDIACODEC_VP8 = 0x2090, /**< VP8 (Since 2.4)*/
+ MEDIACODEC_VP9 = 0x20A0, /**< VP9 (Since 2.4)*/
+ MEDIACODEC_VC1 = 0x20B0, /**< VC1 (Since 2.4)*/
} mediacodec_codec_type_e;
/**
* @brief Enumeration of media codec error.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
*/
typedef enum {
MEDIACODEC_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
MEDIACODEC_ERROR_STREAM_NOT_FOUND = TIZEN_ERROR_MEDIACODEC | 0x0a, /**< Cannot find stream */
MEDIACODEC_ERROR_NOT_SUPPORTED_FORMAT = TIZEN_ERROR_MEDIACODEC | 0x0b, /**< Not supported format */
MEDIACODEC_ERROR_BUFFER_NOT_AVAILABLE = TIZEN_ERROR_MEDIACODEC | 0x0c, /**< Not available buffer */
- MEDIACODEC_ERROR_OVERFLOW_INBUFFER = TIZEN_ERROR_MEDIACODEC | 0x0d, /**< Overflow input buffer (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
- MEDIACODEC_ERROR_RESOURCE_OVERLOADED = TIZEN_ERROR_MEDIACODEC | 0x0e, /**< Exceed the instance limits (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif)*/
+ MEDIACODEC_ERROR_OVERFLOW_INBUFFER = TIZEN_ERROR_MEDIACODEC | 0x0d, /**< Overflow input buffer (Since 2.4)*/
+ MEDIACODEC_ERROR_RESOURCE_OVERLOADED = TIZEN_ERROR_MEDIACODEC | 0x0e, /**< Exceed the instance limits (Since 2.4)*/
MEDIACODEC_ERROR_RESOURCE_CONFLICT = TIZEN_ERROR_MEDIACODEC | 0x0f, /**< Interrupted by a resource conflict (Since 5.0)*/
} mediacodec_error_e;
/**
* @brief Enumeration of buffer status.
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
+ * @since_tizen 2.4
*/
typedef enum {
MEDIACODEC_NEED_DATA, /**< The internal queue is running out of data */
/**
* @brief Called when the input buffer(packet) used up.
* @details It will be invoked when mediacodec has used input buffer.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @remarks The @a packet should be released using media_packet_unref().
* @param[in] packet The media packet handle
* @param[in] user_data The user data passed from the callback registration function
/**
* @brief Called when the output buffer is available.
* @details It will be invoked when mediacodec has output buffer.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @remarks The @a packet should be released using media_packet_unref().
* @param[in] packet The media packet handle
* @param[in] user_data The user data passed from the callback registration function
* #MEDIACODEC_ERROR_INVALID_STREAM,
* #MEDIACODEC_ERROR_NOT_SUPPORTED_FORMAT,
* #MEDIACODEC_ERROR_RESOURCE_CONFLICT
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @param[in] error The error code
* @param[in] user_data The user data passed from the callback registration function
* @pre It will be invoked when the error has occurred if you register this callback using mediacodec_set_error_cb().
/**
* @brief Called when there is no data to decode/encode.
* @details It will be invoked when the end-of-stream is reached.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @param[in] user_data The user data passed from the callback registration function
* @pre It will be invoked when the eos event generate if you register this callback using mediacodec_set_eos_cb().
* @see mediacodec_set_eos_cb()
/**
* @brief Called when the mediacodec needs more data or has enough data.
* @details It is recommended that the application stops calling mediacodec_process_input() when #MEDIACODEC_ENOUGH_DATA
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
+ * @since_tizen 2.4
* is invoked.
* @param[in] status The state of the buffer
* @param[in] user_data The user data passed from the callback registration function
/**
* @brief Called once for each supported codec types.
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
+ * @since_tizen 2.4
* @param[in] codec_type The codec type
* @param[in] user_data The user data passed from the foreach function
* @return @c true to continue with the next iteration of the loop, @c false to break out of the loop.
/**
* @brief Creates a mediacodec handle for decoding/encoding.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @remarks you must release @a mediacodec using mediacodec_destroy().\n
* Although you can create multiple mediacodec handles at the same time,
* the mediacodec cannot guarantee proper operation because of limited resources, like
/**
* @brief Destroys the mediacodec handle and releases all its resources.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @remarks To completely shutdown the mediacodec operation, call this function with a valid player handle from any
* mediacodec
*
/**
* @brief Sets the codec type and decoder/encoder.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @remarks If this codec is to be used as a decoder, pass the #MEDIACODEC_DECODER flag.
* If this codec is to be used as an encoder, pass the #MEDIACODEC_ENCODER flag.\n
* The software codec is used as default setting(#MEDIACODEC_SUPPORT_TYPE_SW) if user doesn't set hardware flag.
/**
* @brief Sets the default info for the video decoder.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @param[in] mediacodec The handle to mediacodec
* @param[in] width The width for video decoding.
* @param[in] height The height for video decoding.
/**
* @brief Sets the default info for the video encoder.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @remarks The frame rate is the speed of recording and the speed of playback.
* If user wants the default setting for ratecontrol, set @a target_bits to @c 0.
* @param[in] mediacodec The handle to mediacodec
/**
* @brief Sets the default info for the audio decoder.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @param[in] mediacodec The handle to mediacodec
* @param[in] samplerate The samplerate for audio decoding.
* @param[in] channel The channels for audio decoding.
/**
* @brief Sets the default info for the audio encoder.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @param[in] mediacodec The handle to mediacodec
* @param[in] samplerate The samplerate for audio encoding.
* @param[in] channel The channels for audio encoding.
/**
* @brief Prepares @a mediacodec for encoding/decoding.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @param[in] mediacodec The handle to mediacodec
* @return @c 0 on success, otherwise a negative error value
* @retval #MEDIACODEC_ERROR_NONE Successful
/**
* @brief Unprepares @a mediacodec for encoding/decoding.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @param[in] mediacodec The handle to mediacodec
* @return @c 0 on success, otherwise a negative error value
* @retval #MEDIACODEC_ERROR_NONE Successful
/**
* @brief Decodes/Encodes a packet. The function passed undecoded/unencoded packet to the input queue and decode/encode a
* frame sequentially.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @param[in] mediacodec The handle to mediacodec
* @param[in] inbuf The current input format for the decoder/encoder
* @param[in] timeOutUs The timeout in microseconds. \n
/**
* @brief Gets the decoded or encoded packet from the output queue.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @remarks The @a packet should be released using media_packet_unref().
* @param[in] mediacodec The handle to mediacodec
* @param[out] packet The current output of the decoder/encoder.
/**
* @brief Flushes both input and output buffers.
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
+ * @since_tizen 2.4
* @param[in] mediacodec The handle to mediacodec
* @return @c 0 on success, otherwise a negative error value
* @retval #MEDIACODEC_ERROR_NONE Successful
/**
* @brief Sets empty buffer callback the media codec for process, asynchronously.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @param[in] mediacodec The handle to mediacodec
* @param[in] callback The callback function to register
* @param[in] user_data The user data to be passed to the callback function
/**
* @brief Unsets input buffer used callback the media codec for process, asynchronously.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @param[in] mediacodec The handle to mediacodec
* @return @c 0 on success, otherwise a negative error value
* @retval #MEDIACODEC_ERROR_NONE Successful
/**
* @brief Sets output buffer available callback the media codec for process, asynchronously.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @param[in] mediacodec The handle to mediacodec
* @param[in] callback The callback function to register
* @param[in] user_data The user data to be passed to the callback function
/**
* @brief unsets output buffer available callback the media codec for process, asynchronously.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @param[in] mediacodec The handle to mediacodec
* @return @c 0 on success, otherwise a negative error value
* @retval #MEDIACODEC_ERROR_NONE Successful
/**
* @brief Sets error callback the media codec for process, asynchronously.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @param[in] mediacodec The handle to mediacodec
* @param[in] callback The callback function to register
* @param[in] user_data The user data to be passed to the callback function
/**
* @brief Unsets error callback the media codec for process, asynchronously.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @param[in] mediacodec The handle to mediacodec
* @return @c 0 on success, otherwise a negative error value
* @retval #MEDIACODEC_ERROR_NONE Successful
/**
* @brief Sets eos callback the media codec for process, asynchronously.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @param[in] mediacodec The handle to mediacodec
* @param[in] callback The callback function to register
* @param[in] user_data The user data to be passed to the callback function
/**
* @brief unsets eos callback the media codec for process, asynchronously.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @since_tizen 2.3
* @param[in] mediacodec The handle to mediacodec
* @return @c 0 on success, otherwise a negative error value
* @retval #MEDIACODEC_ERROR_NONE Successful
/**
* @brief Sets a callback function to be invoked when the mediacodec needs more data or has enough data.
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
+ * @since_tizen 2.4
* @param[in] mediacodec The handle to mediacodec
* @param[in] callback The callback function to register
* @param[in] user_data The user data to be passed to the callback function
/**
* @brief Unsets the callback function.
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
+ * @since_tizen 2.4
* @param[in] mediacodec The handle to mediacodec
* @return @c 0 on success, otherwise a negative error value
* @retval #MEDIACODEC_ERROR_NONE Successful
/**
* @brief Retrieves all supported codecs by invoking callback function once for each supported codecs.
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
+ * @since_tizen 2.4
* @param[in] mediacodec The handle to mediacodec
* @param[in] callback The callback function to invoke
* @param[in] user_data The user data to be passed to the callback function
/**
* @brief Verifies whether encoding can be performed with codec_type or not.
- * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
+ * @since_tizen 2.4
* @param[in] mediacodec The handle to mediacodec
* @param[in] codec_type The identifier of the codec type of the encoder.
* @param[in] encoder Whether the encoder or decoder : (@c true = encoder, @c false = decoder).