* @since_tizen 5.5
*/
typedef enum {
- MEDIA_FORMAT_CHANNEL_POSITION_NONE = -3, /**< Used for position-less channels (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_MONO = -2, /**< Used for mono without direction (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_INVALID = -1, /**< Used for invalid position (Since 5.5) */
+ MEDIA_FORMAT_CHANNEL_POSITION_NONE = -3, /**< Used for position-less channels */
+ MEDIA_FORMAT_CHANNEL_POSITION_MONO = -2, /**< Used for mono without direction */
+ MEDIA_FORMAT_CHANNEL_POSITION_INVALID = -1, /**< Used for invalid position */
/* Normal cases */
- MEDIA_FORMAT_CHANNEL_POSITION_FRONT_LEFT = 0, /**< Front left (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_FRONT_RIGHT, /**< Front Right (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_FRONT_CENTER, /**< Front Center (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_LFE1, /**< Low-frequency effects 1 (subwoofer) (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_REAR_LEFT, /**< Rear left (Since 5.5)*/
- MEDIA_FORMAT_CHANNEL_POSITION_REAR_RIGHT, /**< Rear right (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER, /**< Front left of center (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER, /**< Front right of center (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_REAR_CENTER, /**< Rear center (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_LFE2, /**< Low-frequency effects 2 (subwoofer) (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_SIDE_LEFT, /**< Side left (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_SIDE_RIGHT, /**< Side Right (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_TOP_FRONT_LEFT, /**< Top front left (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_TOP_FRONT_RIGHT, /**< Top front right (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_TOP_FRONT_CENTER, /**< Top front center (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_TOP_CENTER, /**< Top center (Since 5.5)*/
- MEDIA_FORMAT_CHANNEL_POSITION_TOP_REAR_LEFT, /**< Top rear left (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_TOP_REAR_RIGHT, /**< Top rear right (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_TOP_SIDE_LEFT, /**< Top side left (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_TOP_SIDE_RIGHT, /**< Top side right (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_TOP_REAR_CENTER, /**< Top rear center (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_BOTTOM_FRONT_CENTER, /**< Bottom front center (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_BOTTOM_FRONT_LEFT, /**< Bottom front left (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_BOTTOM_FRONT_RIGHT, /**< Bottom front right (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_WIDE_LEFT, /**< Wide left (between front left and side left) (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_WIDE_RIGHT, /**< Wide right (between front right and side right) (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_SURROUND_LEFT, /**< Surround left (between rear left and side left) (Since 5.5) */
- MEDIA_FORMAT_CHANNEL_POSITION_SURROUND_RIGHT /**< Surround right (between rear right and side right) (Since 5.5) */
+ MEDIA_FORMAT_CHANNEL_POSITION_FRONT_LEFT = 0, /**< Front left */
+ MEDIA_FORMAT_CHANNEL_POSITION_FRONT_RIGHT, /**< Front Right */
+ MEDIA_FORMAT_CHANNEL_POSITION_FRONT_CENTER, /**< Front Center */
+ MEDIA_FORMAT_CHANNEL_POSITION_LFE1, /**< Low-frequency effects 1 (subwoofer) */
+ MEDIA_FORMAT_CHANNEL_POSITION_REAR_LEFT, /**< Rear left */
+ MEDIA_FORMAT_CHANNEL_POSITION_REAR_RIGHT, /**< Rear right */
+ MEDIA_FORMAT_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER, /**< Front left of center */
+ MEDIA_FORMAT_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER, /**< Front right of center */
+ MEDIA_FORMAT_CHANNEL_POSITION_REAR_CENTER, /**< Rear center */
+ MEDIA_FORMAT_CHANNEL_POSITION_LFE2, /**< Low-frequency effects 2 (subwoofer) */
+ MEDIA_FORMAT_CHANNEL_POSITION_SIDE_LEFT, /**< Side left */
+ MEDIA_FORMAT_CHANNEL_POSITION_SIDE_RIGHT, /**< Side Right */
+ MEDIA_FORMAT_CHANNEL_POSITION_TOP_FRONT_LEFT, /**< Top front left */
+ MEDIA_FORMAT_CHANNEL_POSITION_TOP_FRONT_RIGHT, /**< Top front right */
+ MEDIA_FORMAT_CHANNEL_POSITION_TOP_FRONT_CENTER, /**< Top front center */
+ MEDIA_FORMAT_CHANNEL_POSITION_TOP_CENTER, /**< Top center */
+ MEDIA_FORMAT_CHANNEL_POSITION_TOP_REAR_LEFT, /**< Top rear left */
+ MEDIA_FORMAT_CHANNEL_POSITION_TOP_REAR_RIGHT, /**< Top rear right */
+ MEDIA_FORMAT_CHANNEL_POSITION_TOP_SIDE_LEFT, /**< Top side left */
+ MEDIA_FORMAT_CHANNEL_POSITION_TOP_SIDE_RIGHT, /**< Top side right */
+ MEDIA_FORMAT_CHANNEL_POSITION_TOP_REAR_CENTER, /**< Top rear center */
+ MEDIA_FORMAT_CHANNEL_POSITION_BOTTOM_FRONT_CENTER, /**< Bottom front center */
+ MEDIA_FORMAT_CHANNEL_POSITION_BOTTOM_FRONT_LEFT, /**< Bottom front left */
+ MEDIA_FORMAT_CHANNEL_POSITION_BOTTOM_FRONT_RIGHT, /**< Bottom front right */
+ MEDIA_FORMAT_CHANNEL_POSITION_WIDE_LEFT, /**< Wide left (between front left and side left) */
+ MEDIA_FORMAT_CHANNEL_POSITION_WIDE_RIGHT, /**< Wide right (between front right and side right) */
+ MEDIA_FORMAT_CHANNEL_POSITION_SURROUND_LEFT, /**< Surround left (between rear left and side left) */
+ MEDIA_FORMAT_CHANNEL_POSITION_SURROUND_RIGHT /**< Surround right (between rear right and side right) */
} media_format_channel_position_e;
/**
* @brief Creates a media format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @details It creates media format. and reference count will be set to 1
- For destroying media_format_h handle, use media_format_unref().
- * @param[out] fmt allocated media_format_h
+ For destroying #media_format_h handle, use media_format_unref().
+ * @param[out] fmt allocated #media_format_h
*
* @return @c 0 on success,
* otherwise a negative error value
/**
* @brief Gets format type of media format.
* @since_tizen 3.0
- * @param[in] fmt The media_format_h to get format type
- * @param[out] formattype The media_format_type_e, ex) MEDIA_FORMAT_AUDIO
+ * @param[in] fmt The #media_format_h to get format type
+ * @param[out] formattype The #media_format_type_e, ex) #MEDIA_FORMAT_AUDIO
*
* @return @c 0 on success,
* otherwise a negative error value
/**
* @brief Gets container MIME type of media format.
* @since_tizen 3.0
- * @param[in] fmt The media_format_h to get container mime type
- * @param[out] mimetype The media_format_mimetype_e, ex) MEDIA_FORMAT_CONTAINER_MP4
+ * @param[in] fmt The #media_format_h to get container mime type
+ * @param[out] mimetype The #media_format_mimetype_e, ex) #MEDIA_FORMAT_CONTAINER_MP4
*
* @return @c 0 on success,
* otherwise a negative error value
/**
* @brief Gets text track information of media format.
* @since_tizen 3.0
- * @param[in] fmt The media_format_h to get text information
- * @param[out] mimetype The media_format_mimetype_e, ex) MEDIA_FORMAT_TEXT_MP4
- * @param[out] type The media_format_text_type_e
+ * @param[in] fmt The #media_format_h to get text information
+ * @param[out] mimetype The #media_format_mimetype_e, ex) #MEDIA_FORMAT_TEXT_MP4
+ * @param[out] type The #media_format_text_type_e
*
* @return @c 0 on success,
* otherwise a negative error value
* @brief Gets video information of media format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @details returns mimetype, width, height, average bps, max bps of this media format.
- * @param[in] fmt media_format_h to get video information
- * @param[out] mimetype media_format_mimetype_e , ex) MEDIA_FORMAT_H264_HP
+ * @param[in] fmt #media_format_h to get video information
+ * @param[out] mimetype #media_format_mimetype_e , ex) #MEDIA_FORMAT_H264_HP
* @param[out] width width of the video
* @param[out] height height of the video
* @param[out] avg_bps average bps of the video
* @brief Gets audio information of media format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @details returns mimetype, channels, height, samplerate bps, max bps of this media format.
- * @param[in] fmt media_format_h to get audio information
- * @param[out] mimetype media_format_mimetype_e , ex) MEDIA_FORMAT_PCM
+ * @param[in] fmt #media_format_h to get audio information
+ * @param[out] mimetype #media_format_mimetype_e , ex) #MEDIA_FORMAT_PCM
* @param[out] channel channel of the audio
* @param[out] samplerate sampling rate of the audio
* @param[out] bit bit resolution of the audio
/**
* @brief Gets audio aac type of media format.
* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
- * @param[in] fmt media_format_h to get audio information
+ * @param[in] fmt #media_format_h to get audio information
* @param[out] is_adts AAC ADTS flag of the audio
*
* @return @c 0 on success,
/**
* @brief Gets audio aac header type of media format.
* @since_tizen 3.0
- * @param[in] fmt The media_format_h to get audio information
- * @param[out] aac_header_type The media_format_aac_header_type_e, ex) MEDIA_FORMAT_AAC_HEADER_ADTS
+ * @param[in] fmt The #media_format_h to get audio information
+ * @param[out] aac_header_type The #media_format_aac_header_type_e, ex) #MEDIA_FORMAT_AAC_HEADER_ADTS
*
* @return @c 0 on success,
* otherwise a negative error value
/**
* @brief Gets video frame rate of media format.
* @since_tizen 3.0
- * @param[in] fmt The media_format_h to get
+ * @param[in] fmt The #media_format_h to get
* @param[out] frame_rate The video frame rate
*
* @return @c 0 on success,
/**
* @brief Sets container MIME type of media format.
* @since_tizen 3.0
- * @param[in] fmt The media_format_h to set
- * @param[in] mimetype The media_format_mimetype_e, ex) MEDIA_FORMAT_MP4
+ * @param[in] fmt The #media_format_h to set
+ * @param[in] mimetype The #media_format_mimetype_e, ex) #MEDIA_FORMAT_MP4
*
* @return @c 0 on success,
* otherwise a negative error value
/**
* @brief Sets text MIME type of media format.
* @since_tizen 3.0
- * @param[in] fmt The media_format_h to set
- * @param[in] mimetype The media_format_mimetype_e, ex) MEDIA_FORMAT_TEXT*
+ * @param[in] fmt The #media_format_h to set
+ * @param[in] mimetype The #media_format_mimetype_e, ex) #MEDIA_FORMAT_TEXT
* @return @c 0 on success,
* otherwise a negative error value
* @retval #MEDIA_FORMAT_ERROR_NONE Successful
/**
* @brief Sets text type of media format.
* @since_tizen 3.0
- * @param[in] fmt The media_format_h to set
+ * @param[in] fmt The #media_format_h to set
* @param[in] type The text type
* @return @c 0 on success,
* otherwise a negative error value
/**
* @brief Sets video MIME type of media format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @param[in] fmt media_format_h to set
- * @param[in] mimetype media_format_mimetype_e , ex) MEDIA_FORMAT_H264_HP
+ * @param[in] fmt #media_format_h to set
+ * @param[in] mimetype #media_format_mimetype_e , ex) #MEDIA_FORMAT_H264_HP
*
* @return @c 0 on success,
* otherwise a negative error value
/**
* @brief Sets video width of media format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @param[in] fmt media_format_h to set
+ * @param[in] fmt #media_format_h to set
* @param[in] width width of the video
* @pre must set video MIME type by media_format_set_video_mime()
*
/**
* @brief Sets video height of media format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @param[in] fmt media_format_h to set
+ * @param[in] fmt #media_format_h to set
* @param[in] height height of the video
* @pre must set video MIME type by media_format_set_video_mime()
*
/**
* @brief Sets video avg_bps of media format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @param[in] fmt media_format_h to set
+ * @param[in] fmt #media_format_h to set
* @param[in] avg_bps average bps of the video
* @pre must set video MIME type by media_format_set_video_mime()
*
/**
* @brief Sets video max_bps of media format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @param[in] fmt media_format_h to set
+ * @param[in] fmt #media_format_h to set
* @param[in] max_bps max bps of the video
* @pre must set video MIME type by media_format_set_video_mime()
*
/**
* @brief Sets video frame rate of media format.
* @since_tizen 3.0
- * @param[in] fmt The media_format_h to set
+ * @param[in] fmt The #media_format_h to set
* @param[in] frame_rate The video frame rate
* @pre must set video MIME type by media_format_set_video_mime()
*
/**
* @brief Sets audio MIME type of media format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @param[in] fmt media_format_h to set audio information
- * @param[in] mimetype media_format_mimetype_e , ex) MEDIA_FORMAT_PCM
+ * @param[in] fmt #media_format_h to set audio information
+ * @param[in] mimetype #media_format_mimetype_e , ex) #MEDIA_FORMAT_PCM
*
* @return @c 0 on success,
* otherwise a negative error value
/**
* @brief Sets audio channel of media format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @param[in] fmt media_format_h to set audio information
+ * @param[in] fmt #media_format_h to set audio information
* @param[in] channel channel of the audio
* @pre must set audio MIME type by media_format_set_audio_mime()
*
/**
* @brief Sets audio samplerate of media format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @param[in] fmt media_format_h to set
+ * @param[in] fmt #media_format_h to set
* @param[in] samplerate sampling rate of the audio
* @pre must set audio MIME type by media_format_set_audio_mime()
*
* @brief Sets audio bit of media format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @details Sets audio bit resolution of this media format
- * @param[in] fmt media_format_h to set
+ * @param[in] fmt #media_format_h to set
* @param[in] bit bit of the audio
* @pre must set audio MIME type by media_format_set_audio_mime()
*
/**
* @brief Sets audio avg_bps of media format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @param[in] fmt media_format_h to set
- * @param[in] avg_bps avg_bps of the audio
+ * @param[in] fmt #media_format_h to set
+ * @param[in] avg_bps average bit per second of the audio
* @pre must set audio MIME type by media_format_set_audio_mime()
*
* @return @c 0 on success,
* @brief Sets audio aac type of media format.
* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
* @details Sets audio aac data type of this media format
- * @param[in] fmt media_format_h to set
+ * @param[in] fmt #media_format_h to set
* @param[in] is_adts aac adts flag of the audio
* @pre must set audio MIME type by media_format_set_audio_mime()
*
/**
* @brief Sets audio aac header type of media format.
* @since_tizen 3.0
- * @param[in] fmt The media_format_h to get audio information
- * @param[in] aac_header_type The media_format_aac_header_type_e, ex) MEDIA_FORMAT_AAC_HEADER_ADTS
+ * @param[in] fmt The #media_format_h to get audio information
+ * @param[in] aac_header_type The #media_format_aac_header_type_e, ex) #MEDIA_FORMAT_AAC_HEADER_ADTS
* @pre must set audio MIME type by media_format_set_audio_mime()
*
* @return @c 0 on success,
int media_format_set_audio_aac_header_type(media_format_h fmt, media_format_aac_header_type_e aac_header_type);
/**
- * @brief Increase reference count of media_format_h object.
+ * @brief Increases reference count of #media_format_h object.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @details increase ref_count of media_format_h
- * @param[in] fmt exist media_format_h
+ * @details increase ref_count of #media_format_h
+ * @param[in] fmt exist #media_format_h
*
* @return @c 0 on success,
* otherwise a negative error value
int media_format_ref(media_format_h fmt);
/**
- * @brief Decrease reference count of media_format_h object.
+ * @brief Decreases reference count of #media_format_h object.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @param[in] fmt exist media_format_h
+ * @param[in] fmt exist #media_format_h
*
* @return @c 0 on success,
* otherwise a negative error value
int media_format_unref(media_format_h fmt);
/**
- * @brief Check whether the media_format_h is writable or not.
+ * @brief Checks whether the #media_format_h is writable or not.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @param[in] fmt exist media_format_h
+ * @param[in] fmt exist #media_format_h
* @param[out] is_writable if ref_count is 1, return true. if not, return false
*
* @return @c 0 on success,
int media_format_is_writable(media_format_h fmt, bool * is_writable);
/**
- * @brief Returns a writable copy of media_format_h.
+ * @brief Returns a writable copy of #media_format_h.
* @details If there is only one reference count on fmt, the caller must be the owner,
* and so this function will return the object unchanged.
* while, if there is more than one reference count on the object, a new object will be returned.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks If a new object is returned, it will not have its own copy of extra data.
* The new object's extra data object will be the original object's extra data.
- * @param[in] fmt exist media_format_h , don't access it after calling this function
- * @param[out] out_fmt new copied media_format_h, the caller is owner of this object
+ * @param[in] fmt exist #media_format_h , don't access it after calling this function
+ * @param[out] out_fmt new copied #media_format_h, the caller is owner of this object
*
* @return @c 0 on success,
* otherwise a negative error value
/**
* @brief Converts the channels in the @a channel_mask to a positions array.
- * @detail The size of the position array is equal to the number of channels,
+ * @details The size of the position array is equal to the number of channels,
* that can be obtained with media_format_get_audio_info().
* @since_tizen 5.5
- * @remarks A @channel_mask with fewer bits set than the number of channels is considered valid.
+ * @remarks A @a channel_mask with fewer bits set than the number of channels is considered valid.
* The @a positions should be released with free().
* @param[in] fmt The media format handle
* @param[in] channel_mask The input channel_mask
* @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation
* @pre The number of channels must be set with media_format_set_audio_channel().
- * @pre The @channel should be set before calling media_format_channel_positions_from_mask().
+ * @pre The channel should be set before calling media_format_channel_positions_from_mask().
* @see media_format_set_audio_channel()
* @see media_format_get_audio_info()
* @par Example
/**
* @brief Converts the @a positions array to a bitmask.
* @since_tizen 5.5
- * @remarks A @channel_mask with fewer bits set than the number of channels is considered valid.
+ * @remarks A @a channel_mask_out with fewer bits set than the number of channels is considered valid.
* @param[in] fmt The media format handle
* @param[in] positions The channel positions array, its lengh is equal to the number of channels
* @param[out] channel_mask_out the output channel mask
* @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation
* @pre The number of channels must be set with media_format_set_audio_channel().
- * @pre The @channel should be set before calling media_format_channel_positions_to_mask().
+ * @pre The channel should be set before calling media_format_channel_positions_to_mask().
* @see media_format_set_audio_channel()
*/
int media_format_channel_positions_to_mask(media_format_h fmt, const media_format_channel_position_e *positions, uint64_t *channel_mask_out);