the description of releasing the output buffer has been added.
Change-Id: I0432c784d5d2c4de213be7849582d77bdc1ded57
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
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;
* @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
* 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
/**
* @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
* @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
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
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);
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;