summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/lib/emotion_smart.c
diff options
context:
space:
mode:
authormoom16 <moom16>2005-07-08 20:28:50 +0000
committermoom16 <moom16@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2005-07-08 20:28:50 +0000
commit8e204f7f5668256ec7508a6f88f8c9f8a3c4255e (patch)
tree03a5e471dd8353af13c1a931487a93f865e73acb /legacy/emotion/src/lib/emotion_smart.c
parent8e4e372d878c2a964d9b3ef123c7aa34f0691915 (diff)
* Cancel last changes since it seems there are some license problems.
Sorry guys, I didn't think GPLv2 was so "contaminating" SVN revision: 15677
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/lib/emotion_smart.c63
1 files changed, 25 insertions, 38 deletions
diff --git a/legacy/emotion/src/lib/emotion_smart.c b/legacy/emotion/src/lib/emotion_smart.c
index a5596cb685..834841b038 100644
--- a/legacy/emotion/src/lib/emotion_smart.c
+++ b/legacy/emotion/src/lib/emotion_smart.c
@@ -982,55 +982,42 @@ _pos_set_job(void *data)
982static void 982static void
983_pixels_get(void *data, Evas_Object *obj) 983_pixels_get(void *data, Evas_Object *obj)
984{ 984{
985 Evas_Pixel_Import_Source ps;
985 int iw, ih, w, h; 986 int iw, ih, w, h;
987 int i;
988 unsigned char **rows;
986 Smart_Data *sd; 989 Smart_Data *sd;
987 Emotion_Format format;
988 990
989 sd = data; 991 sd = data;
990 evas_object_image_size_get(obj, &iw, &ih); 992 evas_object_image_size_get(obj, &iw, &ih);
991 sd->module->video_data_size_get(sd->video, &w, &h); 993 sd->module->yuv_size_get(sd->video, &w, &h);
992 if ((w != iw) || (h != ih)) 994 if ((w != iw) || (h != ih))
993 { 995 {
994 evas_object_image_size_set(obj, w, h); 996 evas_object_image_size_set(obj, w, h);
995 iw = w; 997 iw = w;
996 ih = h; 998 ih = h;
997 } 999 }
998 format = sd->module->format_get(sd->video); 1000 ps.format = EVAS_PIXEL_FORMAT_YUV420P_601;
999 if (format == EMOTION_YV12) 1001 ps.w = iw;
1000 { 1002 ps.h = ih;
1001 unsigned char **rows;
1002 Evas_Pixel_Import_Source ps;
1003 1003
1004 ps.format = EVAS_PIXEL_FORMAT_YUV420P_601; 1004 ps.rows = malloc(ps.h * 2 * sizeof(void *));
1005 ps.w = iw; 1005 if (!ps.rows)
1006 ps.h = ih;
1007
1008 ps.rows = malloc(ps.h * 2 * sizeof(void *));
1009 if (!ps.rows)
1010 {
1011 sd->module->frame_done(sd->video);
1012 return;
1013 }
1014
1015 rows = (unsigned char **)ps.rows;
1016
1017 if (sd->module->yuv_rows_get(sd->video, iw, ih,
1018 rows,
1019 &rows[ps.h],
1020 &rows[ps.h + (ps.h / 2)]))
1021 evas_object_image_pixels_import(obj, &ps);
1022 evas_object_image_pixels_dirty_set(obj, 0);
1023 free(ps.rows);
1024 }
1025 else if (format == EMOTION_BGRA)
1026 { 1006 {
1027 unsigned char *bgra_data; 1007 sd->module->frame_done(sd->video);
1028 if (sd->module->bgra_data_get(sd->video, &bgra_data)); 1008 return;
1029 {
1030 evas_object_image_data_set(obj, bgra_data);
1031 }
1032 } 1009 }
1033 1010
1011
1012 rows = (unsigned char **)ps.rows;
1013
1014 if (sd->module->yuv_rows_get(sd->video, iw, ih,
1015 rows,
1016 &rows[ps.h],
1017 &rows[ps.h + (ps.h / 2)]))
1018 evas_object_image_pixels_import(obj, &ps);
1019 evas_object_image_pixels_dirty_set(obj, 0);
1020 free(ps.rows);
1034 sd->module->frame_done(sd->video); 1021 sd->module->frame_done(sd->video);
1035} 1022}
1036 1023