use the new colorspace support in evas... :)
SVN revision: 27519
This commit is contained in:
parent
9e27a0d98c
commit
eb21b3503c
|
@ -992,8 +992,54 @@ _pixels_get(void *data, Evas_Object *obj)
|
|||
int iw, ih, w, h;
|
||||
Smart_Data *sd;
|
||||
Emotion_Format format;
|
||||
unsigned char *bgra_data;
|
||||
|
||||
sd = data;
|
||||
evas_object_image_size_get(obj, &iw, &ih);
|
||||
sd->module->video_data_size_get(sd->video, &w, &h);
|
||||
if ((w != iw) || (h != ih))
|
||||
{
|
||||
evas_object_image_colorspace_set(obj, EVAS_COLORSPACE_YCBCR422P601_PL);
|
||||
evas_object_image_alpha_set(obj, 0);
|
||||
evas_object_image_size_set(obj, w, h);
|
||||
iw = w;
|
||||
ih = h;
|
||||
}
|
||||
if ((iw < 1) || (ih < 1))
|
||||
{
|
||||
evas_object_image_pixels_dirty_set(obj, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
format = sd->module->format_get(sd->video);
|
||||
if ((format == EMOTION_FORMAT_YV12) || (format == EMOTION_FORMAT_I420))
|
||||
{
|
||||
unsigned char **rows;
|
||||
|
||||
evas_object_image_colorspace_set(obj, EVAS_COLORSPACE_YCBCR422P601_PL);
|
||||
rows = evas_object_image_data_get(obj, 1);
|
||||
if (rows)
|
||||
{
|
||||
if (sd->module->yuv_rows_get(sd->video, iw, ih,
|
||||
rows,
|
||||
&rows[ih],
|
||||
&rows[ih + (ih / 2)]))
|
||||
evas_object_image_data_update_add(obj, 0, 0, iw, ih);
|
||||
}
|
||||
evas_object_image_data_set(obj, rows);
|
||||
evas_object_image_pixels_dirty_set(obj, 0);
|
||||
}
|
||||
else if (format == EMOTION_FORMAT_BGRA)
|
||||
{
|
||||
if (sd->module->bgra_data_get(sd->video, &bgra_data));
|
||||
{
|
||||
evas_object_image_data_set(obj, bgra_data);
|
||||
evas_object_image_pixels_dirty_set(obj, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
// sd->module->frame_done(sd->video);
|
||||
/*
|
||||
evas_object_image_size_get(obj, &iw, &ih);
|
||||
sd->module->video_data_size_get(sd->video, &w, &h);
|
||||
if ((w != iw) || (h != ih))
|
||||
|
@ -1031,14 +1077,14 @@ _pixels_get(void *data, Evas_Object *obj)
|
|||
}
|
||||
else if (format == EMOTION_FORMAT_BGRA)
|
||||
{
|
||||
unsigned char *bgra_data;
|
||||
if (sd->module->bgra_data_get(sd->video, &bgra_data));
|
||||
{
|
||||
evas_object_image_data_set(obj, bgra_data);
|
||||
evas_object_image_pixels_dirty_set(obj, 0);
|
||||
}
|
||||
}
|
||||
|
||||
sd->module->frame_done(sd->video);
|
||||
*/
|
||||
}
|
||||
|
||||
/*******************************************/
|
||||
|
|
Loading…
Reference in New Issue