summaryrefslogtreecommitdiff
path: root/src/media-thumb-internal.c
diff options
context:
space:
mode:
authorJean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>2014-12-15 15:55:31 +0100
committerJean-BenoƮt MARTIN <jean-benoit.martin@open.eurogiciel.org>2015-01-06 02:23:42 -0800
commit23d402a209ebef8a4203ced3bdcdfee2f89924eb (patch)
tree44b8be4a5638f775dff39cf336b4699e0f3975f6 /src/media-thumb-internal.c
parent37205426f1d5468d4240af9e64b8d308ca13dfe1 (diff)
downloadlibmedia-thumbnail-588c29e82a81d3e3f8ac4a7fcf7cc8a751cf7fa0.tar.gz
libmedia-thumbnail-588c29e82a81d3e3f8ac4a7fcf7cc8a751cf7fa0.tar.bz2
libmedia-thumbnail-588c29e82a81d3e3f8ac4a7fcf7cc8a751cf7fa0.zip
change video frame into gdkpixbuff object Bug-Tizen: TC-2270 Change-Id: I8204d0aed2763150ed4ea6bb136745c093b1af7a Signed-off-by: Jean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>
Diffstat (limited to 'src/media-thumb-internal.c')
-rwxr-xr-xsrc/media-thumb-internal.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/media-thumb-internal.c b/src/media-thumb-internal.c
index 9fc6086..b8ddb9c 100755
--- a/src/media-thumb-internal.c
+++ b/src/media-thumb-internal.c
@@ -581,7 +581,7 @@ int _media_thumb_decode_with_gdk(const char *origin_path,
thumb_info->alpha = gdk_pixbuf_get_has_alpha(pixbuf);
thumb_info->width = thumb_width;
thumb_info->height = thumb_height;
- thumb_info->data = gdk_pixbuf_copy(pixbuf);
+ thumb_info->gdkdata = gdk_pixbuf_copy(pixbuf);
g_object_unref(pixbuf);
return 0;
@@ -1012,6 +1012,7 @@ _media_thumb_video(const char *origin_path,
int width = 0;
int height = 0;
int ret = 0;
+ GdkPixbuf *pixbuf;
drm_bool_type_e drm_type;
ret = (drm_is_drm_file(origin_path, &drm_type) == 1);
@@ -1192,6 +1193,10 @@ _media_thumb_video(const char *origin_path,
SAFE_FREE(thumb_info->data);
return err;
}
+ pixbuf = gdk_pixbuf_new_from_data (thumb_info->data, GDK_COLORSPACE_RGB, FALSE, 8, thumb_info->width, thumb_info->height, 3*thumb_info->width, NULL, NULL);
+ thumb_info->gdkdata = gdk_pixbuf_copy(pixbuf);
+ g_object_unref(pixbuf);
+
} else {
thumb_dbg("no contents information\n");
frame = NULL;