[ACR-1621] media_format: Return invalid parameter error when format mimetype is not... 81/254881/2
authorSangchul Lee <sc11.lee@samsung.com>
Wed, 10 Mar 2021 08:04:21 +0000 (17:04 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 11 Mar 2021 02:49:58 +0000 (11:49 +0900)
[Version] 0.1.40
[Issue Type] Doxygen

Change-Id: Ia484d84b14de81c8cc7903924e4f89c2c85c665a
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
include/media_format.h
packaging/capi-media-tool.spec
src/media_format.c

index 23366e979820920a2af1509031f78496b80719d5..33da5f6439167b7b8c5d19a1ab367f4a9e60e617 100644 (file)
@@ -308,6 +308,7 @@ int media_format_get_type(media_format_h fmt, media_format_type_e *formattype);
 /**
  * @brief Gets container MIME type of media format.
  * @since_tizen 3.0
+ * @remarks Since 6.5, #MEDIA_FORMAT_ERROR_INVALID_OPERATION is removed.
  * @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
  *
@@ -315,7 +316,6 @@ int media_format_get_type(media_format_h fmt, media_format_type_e *formattype);
  *         otherwise a negative error value
  * @retval #MEDIA_FORMAT_ERROR_NONE Successful
  * @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation
  * @see media_format_set_container_mime()
  */
 int media_format_get_container_mime(media_format_h fmt, media_format_mimetype_e *mimetype);
@@ -323,6 +323,7 @@ int media_format_get_container_mime(media_format_h fmt, media_format_mimetype_e
 /**
  * @brief Gets text track information of media format.
  * @since_tizen 3.0
+ * @remarks Since 6.5, #MEDIA_FORMAT_ERROR_INVALID_OPERATION is removed.
  * @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
@@ -331,7 +332,6 @@ int media_format_get_container_mime(media_format_h fmt, media_format_mimetype_e
  *         otherwise a negative error value
  * @retval #MEDIA_FORMAT_ERROR_NONE Successful
  * @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation
  * @see media_format_set_text_mime()
  */
 int media_format_get_text_info(media_format_h fmt, media_format_mimetype_e *mimetype, media_format_text_type_e *type);
@@ -339,6 +339,7 @@ int media_format_get_text_info(media_format_h fmt, media_format_mimetype_e *mime
 /**
  * @brief Gets video information of media format.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @remarks Since 6.5, #MEDIA_FORMAT_ERROR_INVALID_OPERATION is removed.
  * @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
@@ -351,7 +352,6 @@ int media_format_get_text_info(media_format_h fmt, media_format_mimetype_e *mime
  *         otherwise a negative error value
  * @retval #MEDIA_FORMAT_ERROR_NONE Successful
  * @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation
  * @see media_format_set_video_mime()
  * @see media_format_set_video_width()
  * @see media_format_set_video_height()
@@ -363,6 +363,7 @@ int media_format_get_video_info(media_format_h fmt, media_format_mimetype_e *mim
 /**
  * @brief Gets audio information of media format.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @remarks Since 6.5, #MEDIA_FORMAT_ERROR_INVALID_OPERATION is removed.
  * @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
@@ -375,7 +376,6 @@ int media_format_get_video_info(media_format_h fmt, media_format_mimetype_e *mim
  *         otherwise a negative error value
  * @retval #MEDIA_FORMAT_ERROR_NONE Successful
  * @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation
  * @see media_format_set_audio_mime()
  * @see media_format_set_audio_channel()
  * @see media_format_set_audio_samplerate()
@@ -387,6 +387,7 @@ int media_format_get_audio_info(media_format_h fmt, media_format_mimetype_e *mim
 /**
  * @brief Gets audio aac type of media format.
  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
+ * @remarks Since 6.5, #MEDIA_FORMAT_ERROR_INVALID_OPERATION is removed.
  * @param[in] fmt #media_format_h to get audio information
  * @param[out] is_adts AAC ADTS flag of the audio
  *
@@ -394,7 +395,6 @@ int media_format_get_audio_info(media_format_h fmt, media_format_mimetype_e *mim
  *         otherwise a negative error value
  * @retval #MEDIA_FORMAT_ERROR_NONE Successful
  * @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation
  * @see media_format_set_audio_aac_type()
  */
 int media_format_get_audio_aac_type(media_format_h fmt, bool *is_adts);
@@ -402,6 +402,7 @@ int media_format_get_audio_aac_type(media_format_h fmt, bool *is_adts);
 /**
  * @brief Gets audio aac header type of media format.
  * @since_tizen 3.0
+ * @remarks Since 6.5, #MEDIA_FORMAT_ERROR_INVALID_OPERATION is removed.
  * @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
  *
@@ -409,7 +410,6 @@ int media_format_get_audio_aac_type(media_format_h fmt, bool *is_adts);
  *         otherwise a negative error value
  * @retval #MEDIA_FORMAT_ERROR_NONE Successful
  * @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation
  * @see media_format_set_audio_aac_header_type()
  */
 int media_format_get_audio_aac_header_type(media_format_h fmt, media_format_aac_header_type_e *aac_header_type);
@@ -417,6 +417,7 @@ int media_format_get_audio_aac_header_type(media_format_h fmt, media_format_aac_
 /**
  * @brief Gets video frame rate of media format.
  * @since_tizen 3.0
+ * @remarks Since 6.5, #MEDIA_FORMAT_ERROR_INVALID_OPERATION is removed.
  * @param[in] fmt The #media_format_h to get
  * @param[out] frame_rate The video frame rate
  *
@@ -424,7 +425,6 @@ int media_format_get_audio_aac_header_type(media_format_h fmt, media_format_aac_
  *         otherwise a negative error value
  * @retval #MEDIA_FORMAT_ERROR_NONE Successful
  * @retval #MEDIA_FORMAT_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_FORMAT_ERROR_INVALID_OPERATION Invalid operation
  */
 int media_format_get_video_frame_rate(media_format_h fmt, int *frame_rate);
 
index 7bfa1c76245cb51f0ff0d6fdd65a8bdae479c951..f3c86f58b2ab9ce871aaf7aed9dd036814dce785 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-media-tool
 Summary:    A Core API media tool library in Tizen Native API
-Version:    0.1.39
+Version:    0.1.40
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 08defc97e0ee3c3865807232d7e6ec346611e8da..a787f651c084ab01c1f691d24c1b2ef7a09d9f59 100644 (file)
@@ -174,7 +174,7 @@ int media_format_get_text_info(media_format_h fmt, media_format_mimetype_e *mime
 
        if (!CHECK_IS_TEXT(fmt_handle->mimetype)) {
                LOGE("format[%p, mimetype:0x%x] is not for MEDIA_FORMAT_TEXT..", fmt_handle, fmt_handle->mimetype);
-               return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
+               return MEDIA_FORMAT_ERROR_INVALID_PARAMETER;
        }
 
        if (mimetype)
@@ -197,7 +197,7 @@ int media_format_get_video_info(media_format_h fmt, media_format_mimetype_e *mim
 
        if (!CHECK_IS_VIDEO(fmt_handle->mimetype)) {
                LOGE("format[%p, mimetype:0x%x] is not for MEDIA_FORMAT_VIDEO..", fmt_handle, fmt_handle->mimetype);
-               return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
+               return MEDIA_FORMAT_ERROR_INVALID_PARAMETER;
        }
 
        if (mimetype)
@@ -231,7 +231,7 @@ int media_format_get_audio_info(media_format_h fmt, media_format_mimetype_e *mim
 
        if (!CHECK_IS_AUDIO(fmt_handle->mimetype)) {
                LOGE("format[%p, mimetype:0x%x] is not for MEDIA_FORMAT_AUDIO..", fmt_handle, fmt_handle->mimetype);
-               return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
+               return MEDIA_FORMAT_ERROR_INVALID_PARAMETER;
        }
        if (mimetype)
                *mimetype = fmt_handle->mimetype;
@@ -264,7 +264,7 @@ int media_format_get_audio_aac_type(media_format_h fmt, bool *is_adts)
 
        if (!(fmt_handle->mimetype == MEDIA_FORMAT_AAC_LC || fmt_handle->mimetype == MEDIA_FORMAT_AAC_HE || fmt_handle->mimetype == MEDIA_FORMAT_AAC_HE_PS)) {
                LOGE("format[%p, mimetype:0x%x] is not aac format..", fmt_handle, fmt_handle->mimetype);
-               return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
+               return MEDIA_FORMAT_ERROR_INVALID_PARAMETER;
        }
 
        *is_adts = fmt_handle->detail.audio.is_adts;
@@ -284,7 +284,7 @@ int media_format_get_audio_aac_header_type(media_format_h fmt, media_format_aac_
 
        if (!(fmt_handle->mimetype == MEDIA_FORMAT_AAC_LC || fmt_handle->mimetype == MEDIA_FORMAT_AAC_HE || fmt_handle->mimetype == MEDIA_FORMAT_AAC_HE_PS)) {
                LOGE("format[%p, mimetype:0x%x] is not aac format..", fmt_handle, fmt_handle->mimetype);
-               return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
+               return MEDIA_FORMAT_ERROR_INVALID_PARAMETER;
        }
 
        *aac_header_type = fmt_handle->detail.audio.aac_header_type;
@@ -304,7 +304,7 @@ int media_format_get_video_frame_rate(media_format_h fmt, int *frame_rate)
 
        if (!CHECK_IS_VIDEO(fmt_handle->mimetype)) {
                LOGE("format[%p, mimetype:0x%x] is not for MEDIA_FORMAT_VIDEO..", fmt_handle, fmt_handle->mimetype);
-               return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
+               return MEDIA_FORMAT_ERROR_INVALID_PARAMETER;
        }
 
        *frame_rate = fmt_handle->detail.video.frame_rate;