Modify 'mm_util_gif_image_set_image' due to unused parameter was removed & 98/148798/5 accepted/tizen/unified/20170913.070613 submit/tizen/20170911.075345
authorJiyong Min <jiyong.min@samsung.com>
Mon, 11 Sep 2017 02:12:32 +0000 (11:12 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Mon, 11 Sep 2017 07:09:33 +0000 (16:09 +0900)
the description of releasing the output buffer has been added.

Change-Id: I0432c784d5d2c4de213be7849582d77bdc1ded57
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
decode-test/image_util_decode_encode_testsuite.c
include/image_util.h
include/image_util_internal.h
packaging/capi-media-image-util.spec
src/image_util.c
src/image_util_internal.c

index e5bee2c..07ed864 100755 (executable)
@@ -634,7 +634,7 @@ gboolean test_encode_gif_frame_by_frame()
                if (ret != IMAGE_UTIL_ERROR_NONE)
                        continue;
 
-               ret = image_util_frame_set_frame(frame, g_test_decode[i].decoded, g_test_decode[i].decode_size);
+               ret = image_util_frame_set_frame(frame, g_test_decode[i].decoded);
                if (ret != IMAGE_UTIL_ERROR_NONE) {
                        image_util_frame_destroy(frame);
                        continue;
index 7ede6ff..57744fd 100755 (executable)
@@ -779,6 +779,7 @@ int image_util_decode_set_input_buffer(image_util_decode_h handle, const unsigne
 * @remarks Either image_util_decode_set_input_path() or image_util_decode_set_input_buffer() should be set.\n
 *          By default the decoded output buffer colorspace will be IMAGE_UTIL_COLORSPACE_RGBA8888.
 *          Use image_util_decode_set_colorspace to change the colorspace.
+*          @a dst_buffer should be released after @a image_util_decode_run() or @a image_util_decode_run_async().
 *
 * @param[in] handle The handle to image util decoding
 * @param[in] dst_buffer The decoded output buffer
@@ -1231,6 +1232,7 @@ int image_util_encode_set_output_path(image_util_encode_h handle, const char *pa
 *          Before 4.0, output buffer setting is not supported for bmp. IMAGE_UTIL_ERROR_NOT_SUPPORTED_FORMAT will be returned for bmp.\n
 *          Since 4.0, output buffer setting has been supported for bmp. Applications can set the output buffer to write encoded bmp.\n
 *          In case of gif encoding, the output buffer will be completely available only after image_util_encode_destroy().
+*          @a dst_buffer should be released after @a image_util_encode_run() or @a image_util_encode_run_async().
 *
 * @param[in] handle The handle to image util encoding
 * @param[in] dst_buffer The output image buffer
index bf09186..eae8bb5 100755 (executable)
@@ -277,15 +277,13 @@ int image_util_frame_set_gif_disposal_mode(image_util_frame_h frame_h, const int
 
 /**
 * @internal
-* @brief Sets the delay of the gif.
+* @brief Sets the frame buffer.
 * @since_tizen 4.0
 *
-* @remarks The unit of the delay time is 10ms. If the delay time set to 50ms, the value of @delay_time should be 5.
-*                If the delay time set to 1 sec, the value of @delay_time should be 100.
+* @remarks You must release the @a buffer using free() after @image_util_frame_destroy.
 *
 * @param[in] frame_h The frame handle to encode
 * @param[in] buffer The frame buffer to encode
-* @param[in] buffer The size of the frame buffer to encode
 *
 * @return @c 0 on success,
 *               otherwise a negative error value
@@ -297,7 +295,7 @@ int image_util_frame_set_gif_disposal_mode(image_util_frame_h frame_h, const int
 * @pre image_util_encode_frame_create()
 * @see image_util_encode_frame_create()
 */
-int image_util_frame_set_frame(image_util_frame_h frame_h, unsigned char *buffer, const unsigned long size);
+int image_util_frame_set_frame(image_util_frame_h frame_h, unsigned char *buffer);
 
 /**
 * @internal
index a95a38c..dcbb97b 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-media-image-util
 Summary:    A Image Utility library in Tizen Native API
-Version:    0.1.24
+Version:    0.1.25
 Release:    2
 Group:      Multimedia/API
 License:    Apache-2.0
index 7ea122b..a86a3c3 100755 (executable)
@@ -1838,7 +1838,7 @@ int image_util_encode_set_input_buffer(image_util_encode_h handle, const unsigne
                        image_util_error("_image_util_encode_get_gif_frame is failed %d", err);
                        return _convert_image_util_error_code(__func__, err);
                }
-               err = mm_util_gif_image_set_image(frame, src_buffer, (unsigned long)sizeof(src_buffer));
+               err = mm_util_gif_image_set_image(frame, src_buffer);
                if (err != MM_UTIL_ERROR_NONE) {
                        image_util_error("mm_util_gif_image_set_delay_time is failed %d", err);
                        return _convert_image_util_error_code(__func__, err);
index f616931..e8502ad 100755 (executable)
@@ -94,17 +94,16 @@ int image_util_frame_set_gif_delay(image_util_frame_h frame_h, const int delay_t
        return IMAGE_UTIL_ERROR_NONE;
 }
 
-int image_util_frame_set_frame(image_util_frame_h frame_h, unsigned char *buffer, const unsigned long size)
+int image_util_frame_set_frame(image_util_frame_h frame_h, unsigned char *buffer)
 {
        int ret = IMAGE_UTIL_ERROR_NONE;
 
        image_util_retvm_if((frame_h == NULL), MM_UTIL_ERROR_INVALID_PARAMETER, "Invalid Handle");
        image_util_retvm_if((buffer == NULL), MM_UTIL_ERROR_INVALID_PARAMETER, "Invalid Buffer");
-       image_util_retvm_if((size == 0), MM_UTIL_ERROR_INVALID_PARAMETER, "Invalid Buffer Size");
 
        frame_s *frame = (frame_s *)frame_h;
 
-       ret = mm_util_gif_image_set_image(frame->frame_h, buffer, size);
+       ret = mm_util_gif_image_set_image(frame->frame_h, buffer);
        if (ret != IMAGE_UTIL_ERROR_NONE) {
                image_util_error("mm_util_gif_image_set_image is failed(%d).", ret);
                return MM_UTIL_ERROR_INVALID_OPERATION;