summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_object_image.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-03-08 15:53:02 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-03-15 11:11:59 +0900
commita58a3532e3e8e890b8cde0ef6d2610466beebd25 (patch)
tree4439fb1a58341f47de4b2f3c49c12116f3c0f0ab /src/lib/evas/canvas/evas_object_image.c
parent8ec48dc268351af4aac6761fdd1f9600cdd3240e (diff)
Evas.Image: remove video surface
Video stuff should move to a proper player class. I still wonder how exactly Tizen video should be handled, as they continue to reject emotion.
Diffstat (limited to '')
-rw-r--r--src/lib/evas/canvas/evas_object_image.c31
1 files changed, 22 insertions, 9 deletions
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index b2480311db..42056bffb6 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -1503,10 +1503,13 @@ _evas_image_efl_gfx_buffer_colorspace_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Dat
1503 return (Efl_Gfx_Colorspace) o->cur->cspace; 1503 return (Efl_Gfx_Colorspace) o->cur->cspace;
1504} 1504}
1505 1505
1506EOLIAN static void 1506EAPI void
1507_evas_image_video_surface_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Video_Surface *surf) 1507evas_object_image_video_surface_set(Evas_Object *eo_obj, Evas_Video_Surface *surf)
1508{ 1508{
1509 EVAS_OBJECT_LEGACY_API(eo_obj);
1510
1509 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); 1511 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
1512 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
1510 evas_object_async_block(obj); 1513 evas_object_async_block(obj);
1511 1514
1512 _evas_image_cleanup(eo_obj, obj, o); 1515 _evas_image_cleanup(eo_obj, obj, o);
@@ -1561,31 +1564,40 @@ _evas_image_video_surface_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Video_Surface
1561 } 1564 }
1562} 1565}
1563 1566
1564EOLIAN static const Evas_Video_Surface* 1567EAPI const Evas_Video_Surface*
1565_evas_image_video_surface_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) 1568evas_object_image_video_surface_get(const Evas_Object *eo_obj)
1566{ 1569{
1570 EVAS_OBJECT_LEGACY_API(eo_obj, NULL);
1571
1572 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
1567 return (!o->video_surface ? NULL : &o->pixels->video); 1573 return (!o->video_surface ? NULL : &o->pixels->video);
1568} 1574}
1569 1575
1570EOLIAN static void 1576EAPI void
1571_evas_image_video_surface_caps_set(Eo *eo_obj, Evas_Image_Data *o, unsigned int caps) 1577evas_object_image_video_surface_caps_set(Evas_Object *eo_obj, unsigned int caps)
1572{ 1578{
1579 EVAS_OBJECT_LEGACY_API(eo_obj);
1580
1573 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); 1581 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
1582 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
1574 evas_object_async_block(obj); 1583 evas_object_async_block(obj);
1575 1584
1576 _evas_image_cleanup(eo_obj, obj, o); 1585 _evas_image_cleanup(eo_obj, obj, o);
1577 1586
1578 if (caps == o->pixels->video_caps) 1587 if (caps == o->pixels->video_caps)
1579 return; 1588 return;
1580 1589
1581 EINA_COW_PIXEL_WRITE_BEGIN(o, pixi_write) 1590 EINA_COW_PIXEL_WRITE_BEGIN(o, pixi_write)
1582 pixi_write->video_caps = caps; 1591 pixi_write->video_caps = caps;
1583 EINA_COW_PIXEL_WRITE_END(o, pixi_write) 1592 EINA_COW_PIXEL_WRITE_END(o, pixi_write)
1584} 1593}
1585 1594
1586EOLIAN static unsigned int 1595EAPI unsigned int
1587_evas_image_video_surface_caps_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) 1596evas_object_image_video_surface_caps_get(const Evas_Object *eo_obj)
1588{ 1597{
1598 EVAS_OBJECT_LEGACY_API(eo_obj, 0);
1599
1600 Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
1589 return (!o->video_surface ? 0 : o->pixels->video_caps); 1601 return (!o->video_surface ? 0 : o->pixels->video_caps);
1590} 1602}
1591 1603
@@ -4868,6 +4880,7 @@ evas_object_image_source_visible_get(const Evas_Object *eo)
4868EAPI Eina_Bool 4880EAPI Eina_Bool
4869evas_object_image_source_unset(Evas_Object *eo_obj) 4881evas_object_image_source_unset(Evas_Object *eo_obj)
4870{ 4882{
4883 EVAS_OBJECT_LEGACY_API(eo_obj, EINA_FALSE);
4871 return efl_canvas_proxy_source_set(eo_obj, NULL); 4884 return efl_canvas_proxy_source_set(eo_obj, NULL);
4872} 4885}
4873 4886