summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2017-08-04 02:08:38 (GMT)
committerMinje Ahn <minje.ahn@samsung.com>2017-08-04 05:21:59 (GMT)
commit360b4a11fd2d80a7949dcf1c1a9e387648ce059e (patch)
treec2aa5489c9d501d33d6548519de7a551c57d66ad
parent8df942537485927f0a58f50873cb133a3cc39a62 (diff)
downloadlibmedia-thumbnail-360b4a11fd2d80a7949dcf1c1a9e387648ce059e.zip
libmedia-thumbnail-360b4a11fd2d80a7949dcf1c1a9e387648ce059e.tar.gz
libmedia-thumbnail-360b4a11fd2d80a7949dcf1c1a9e387648ce059e.tar.bz2
Use request_id instead of full path Change-Id: I2e12d7b1c610d6686cf685f0b32c29bfdb9b804d Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
-rwxr-xr-xinclude/media-thumbnail.h2
-rw-r--r--packaging/libmedia-thumbnail.spec2
-rwxr-xr-xsrc/ipc/media-thumb-ipc.c4
-rwxr-xr-xsrc/media-thumbnail.c9
-rwxr-xr-xtest/test-thumb.c2
5 files changed, 7 insertions, 12 deletions
diff --git a/include/media-thumbnail.h b/include/media-thumbnail.h
index 0470768..db1b056 100755
--- a/include/media-thumbnail.h
+++ b/include/media-thumbnail.h
@@ -40,7 +40,7 @@ int thumbnail_request_from_db_async(unsigned int request_id, const char *origin_
int thumbnail_request_extract_raw_data_async(int request_id, const char *origin_path, int width, int height, ThumbRawFunc func, void *user_data, uid_t uid);
int thumbnail_request_from_db(const char *origin_path, char *thumb_path, int max_length, uid_t uid);
-int thumbnail_request_cancel_media(unsigned int request_id, const char *origin_path);
+int thumbnail_request_cancel_media(unsigned int request_id);
int thumbnail_request_cancel_raw_data(int request_id);
int thumbnail_request_cancel_all();
diff --git a/packaging/libmedia-thumbnail.spec b/packaging/libmedia-thumbnail.spec
index a7c382e..6e1cff1 100644
--- a/packaging/libmedia-thumbnail.spec
+++ b/packaging/libmedia-thumbnail.spec
@@ -1,6 +1,6 @@
Name: libmedia-thumbnail
Summary: Media thumbnail service library for multimedia applications
-Version: 0.2.13
+Version: 0.2.14
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0 and PD
diff --git a/src/ipc/media-thumb-ipc.c b/src/ipc/media-thumb-ipc.c
index a897c18..46f7ae8 100755
--- a/src/ipc/media-thumb-ipc.c
+++ b/src/ipc/media-thumb-ipc.c
@@ -751,7 +751,7 @@ int _media_thumb_request_async(int msg_type, unsigned int request_id, const char
thumb_retvm_if(thumb_req == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "Failed to create request element");
thumb_req->msg_type = msg_type;
- thumb_req->path = strdup(origin_path);
+ thumb_req->path = g_strdup(origin_path);
thumb_req->userData = userData;
thumb_req->isCanceled = false;
thumb_req->isRequested= false;
@@ -787,7 +787,7 @@ int _media_thumb_request_raw_data_async(int msg_type, int request_id, const char
thumb_req->msg_type = msg_type;
thumb_req->request_id = request_id;
- thumb_req->path = strdup(origin_path);
+ thumb_req->path = g_strdup(origin_path);
thumb_req->width = width;
thumb_req->height = height;
thumb_req->userData = userData;
diff --git a/src/media-thumbnail.c b/src/media-thumbnail.c
index b690f4c..d481eed 100755
--- a/src/media-thumbnail.c
+++ b/src/media-thumbnail.c
@@ -150,16 +150,11 @@ int thumbnail_request_extract_raw_data_async(int request_id, const char *origin_
return MS_MEDIA_ERR_NONE;
}
-int thumbnail_request_cancel_media(unsigned int request_id, const char *origin_path)
+int thumbnail_request_cancel_media(unsigned int request_id)
{
int err = MS_MEDIA_ERR_NONE;
- if (origin_path == NULL) {
- thumb_err("Invalid parameter");
- return MS_MEDIA_ERR_INVALID_PARAMETER;
- }
-
- err = _media_thumb_request_async(THUMB_REQUEST_CANCEL_MEDIA, request_id, origin_path, NULL, 0);
+ err = _media_thumb_request_async(THUMB_REQUEST_CANCEL_MEDIA, request_id, NULL, NULL, 0);
if (err != MS_MEDIA_ERR_NONE) {
thumb_err("_media_thumb_request failed : %d", err);
return err;
diff --git a/test/test-thumb.c b/test/test-thumb.c
index 7b6c845..47e2903 100755
--- a/test/test-thumb.c
+++ b/test/test-thumb.c
@@ -147,7 +147,7 @@ int main(int argc, char *argv[])
} else if (mode == 2) {
printf("Test thumbnail_request_cancel_media\n");
- err = thumbnail_request_cancel_media(req_id, origin_path);
+ err = thumbnail_request_cancel_media(req_id);
if (err < 0) {
printf("thumbnail_request_cancel_media failed : %d\n", err);
return -1;