jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a58a3532e3e8e890b8cde0ef6d2610466beebd25

commit a58a3532e3e8e890b8cde0ef6d2610466beebd25
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Tue Mar 8 15:53:02 2016 +0900

    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.
---
 src/lib/evas/Evas_Common.h              | 52 ----------------------
 src/lib/evas/Evas_Legacy.h              | 79 +++++++++++++++++++++++++++++++++
 src/lib/evas/canvas/evas_image.eo       | 33 --------------
 src/lib/evas/canvas/evas_object_image.c | 31 +++++++++----
 4 files changed, 101 insertions(+), 94 deletions(-)

diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 50205a7..c41af8b 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -172,17 +172,6 @@ typedef Eo      Efl_VG;
 
 typedef void                        Evas_Performance; /**< An Evas Performance 
handle */
 typedef struct _Evas_Smart          Evas_Smart; /**< An Evas Smart Object 
handle */
-
-/**
- * @typedef Evas_Video_Surface
- *
- * A generic datatype for video specific surface information
- * @see evas_object_image_video_surface_set
- * @see evas_object_image_video_surface_get
- * @since 1.1
- */
-typedef struct _Evas_Video_Surface Evas_Video_Surface;
-
 typedef int                        Evas_Angle; /**< A type for angle */
 
 struct _Evas_Coord_Rectangle /** A rectangle in Evas_Coord */
@@ -382,47 +371,6 @@ struct _Evas_Native_Surface
    } data; /**< Choose one union data according to your surface. */
 };
 
-/**
- * @def EVAS_VIDEO_SURFACE_VERSION
- * Magic version number to know what the video surf struct looks like
- * @since 1.1
- */
-#define EVAS_VIDEO_SURFACE_VERSION 1
-
-
-typedef void (*Evas_Video_Cb)(void *data, Evas_Object *obj, const 
Evas_Video_Surface *surface);  /**< Evas video callback function signature */
-typedef void (*Evas_Video_Coord_Cb)(void *data, Evas_Object *obj, const 
Evas_Video_Surface *surface, Evas_Coord a, Evas_Coord b);  /**< Evas video 
coordinates callback function signature */
-
-struct _Evas_Video_Surface
-{
-   int                 version; /**< The Evas Video surface version in use 
@see EVAS_VIDEO_SURFACE_VERSION*/
-
-   Evas_Video_Coord_Cb move; /**< Move the video surface to this position */
-   Evas_Video_Coord_Cb resize; /**< Resize the video surface to that size */
-   Evas_Video_Cb       show; /**< Show the video overlay surface */
-   Evas_Video_Cb       hide; /**< Hide the video overlay surface */
-   Evas_Video_Cb       update_pixels; /**< Please update the Evas_Object_Image 
pixels when called */
-
-   Evas_Object        *parent; /**< The parent object */
-   void               *data;
-};
-
-/**
- * Enum values for the Video surface capabilities
- * @see evas_object_image_video_surface_caps_get()
- * @see evas_object_image_video_surface_caps_set()
- */
-
-typedef enum _Evas_Video_Surface_Caps
-{
-   EVAS_VIDEO_SURFACE_MOVE = 1,   /**< Move capability */
-   EVAS_VIDEO_SURFACE_RESIZE = 2,   /**< Resize capability */
-   EVAS_VIDEO_SURFACE_CLIP = 4,   /**< Clip capability */
-   EVAS_VIDEO_SURFACE_BELOW = 8,   /**< Below capability */
-   EVAS_VIDEO_SURFACE_STACKING_CHECK = 16,   /**< Stacking capability */
-   EVAS_VIDEO_SURFACE_IGNORE_WINDOW = 32,   /**< Ignore window capability */
-} Evas_Video_Surface_Caps;
-
 #define EVAS_LAYER_MIN                   -32768 /**< bottom-most layer number 
*/
 #define EVAS_LAYER_MAX                   32767 /**< top-most layer number */
 
diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h
index f5b5e5c..21d29d7 100644
--- a/src/lib/evas/Evas_Legacy.h
+++ b/src/lib/evas/Evas_Legacy.h
@@ -3572,6 +3572,85 @@ EAPI void 
evas_object_image_source_visible_set(Evas_Object *obj, Eina_Bool visib
  */
 EAPI Eina_Bool evas_object_image_source_visible_get(const Evas_Object *obj);
 
+/**
+ * @typedef Evas_Video_Surface
+ *
+ * A generic datatype for video specific surface information
+ * @see evas_object_image_video_surface_set
+ * @see evas_object_image_video_surface_get
+ * @since 1.1
+ */
+typedef struct _Evas_Video_Surface Evas_Video_Surface;
+
+/**
+ * @def EVAS_VIDEO_SURFACE_VERSION
+ * Magic version number to know what the video surf struct looks like
+ * @since 1.1
+ */
+#define EVAS_VIDEO_SURFACE_VERSION 1
+
+typedef void (*Evas_Video_Cb)(void *data, Evas_Object *obj, const 
Evas_Video_Surface *surface);  /**< Evas video callback function signature */
+typedef void (*Evas_Video_Coord_Cb)(void *data, Evas_Object *obj, const 
Evas_Video_Surface *surface, Evas_Coord a, Evas_Coord b);  /**< Evas video 
coordinates callback function signature */
+
+struct _Evas_Video_Surface
+{
+   int                 version; /**< The Evas Video surface version in use 
@see EVAS_VIDEO_SURFACE_VERSION*/
+
+   Evas_Video_Coord_Cb move; /**< Move the video surface to this position */
+   Evas_Video_Coord_Cb resize; /**< Resize the video surface to that size */
+   Evas_Video_Cb       show; /**< Show the video overlay surface */
+   Evas_Video_Cb       hide; /**< Hide the video overlay surface */
+   Evas_Video_Cb       update_pixels; /**< Please update the Evas_Object_Image 
pixels when called */
+
+   Evas_Object        *parent; /**< The parent object */
+   void               *data;
+};
+
+/**
+ * Enum values for the Video surface capabilities
+ * @see evas_object_image_video_surface_caps_get()
+ * @see evas_object_image_video_surface_caps_set()
+ */
+
+typedef enum _Evas_Video_Surface_Caps
+{
+   EVAS_VIDEO_SURFACE_MOVE = 1,   /**< Move capability */
+   EVAS_VIDEO_SURFACE_RESIZE = 2,   /**< Resize capability */
+   EVAS_VIDEO_SURFACE_CLIP = 4,   /**< Clip capability */
+   EVAS_VIDEO_SURFACE_BELOW = 8,   /**< Below capability */
+   EVAS_VIDEO_SURFACE_STACKING_CHECK = 16,   /**< Stacking capability */
+   EVAS_VIDEO_SURFACE_IGNORE_WINDOW = 32,   /**< Ignore window capability */
+} Evas_Video_Surface_Caps;
+
+/**
+ * @brief Set the video surface linked to a given image of the canvas.
+ *
+ * @param[in] surf The new video surface.
+ *
+ * @since 1.1
+ */
+EAPI void evas_object_image_video_surface_set(Evas_Object *obj, 
Evas_Video_Surface *surf);
+
+/**
+ * @brief Get the video surface linekd to a given image of the canvas.
+ *
+ * @return The new video surface.
+ *
+ * @since 1.1
+ */
+EAPI const Evas_Video_Surface *evas_object_image_video_surface_get(const 
Evas_Object *obj);
+
+/**
+ * @brief Set the video surface capabilities to a given image of the canvas.
+ *
+ * @param[in] caps
+ */
+EAPI void evas_object_image_video_surface_caps_set(Evas_Object *obj, unsigned 
int caps);
+
+/** Get the video surface capabilities to a given image of the canvas.
+ */
+EAPI unsigned int evas_object_image_video_surface_caps_get(const Evas_Object 
*obj);
+
 
 /*
  * Converts the raw image data of the given image object to the
diff --git a/src/lib/evas/canvas/evas_image.eo 
b/src/lib/evas/canvas/evas_image.eo
index 23de879..4bb000d 100644
--- a/src/lib/evas/canvas/evas_image.eo
+++ b/src/lib/evas/canvas/evas_image.eo
@@ -88,39 +88,6 @@ class Evas.Image (Evas.Object, Efl.File, Efl.Image, 
Efl.Image_Load, Efl.Image_An
          }
       }
 
-      /* Video */
-      @property video_surface {
-         set {
-            [[Set the video surface linked to a given image of the canvas.
-
-              @since 1.1
-            ]]
-            values {
-               surf: Evas.Video_Surface*; [[The new video surface.]]
-            }
-         }
-         get {
-            [[Get the video surface linekd to a given image of the canvas.
-
-              @since 1.1
-            ]]
-            values {
-               surf: const(Evas.Video_Surface)*; [[The new video surface.]]
-            }
-         }
-      }
-      @property video_surface_caps {
-         set {
-            [[Set the video surface capabilities to a given image of the 
canvas.]]
-         }
-         get {
-            [[Get the video surface capabilities to a given image of the 
canvas.]]
-         }
-         values {
-            caps: uint;
-         }
-      }
-
       /* native surface */
       @property native_surface {
          set {
diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index b248031..42056bf 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
    return (Efl_Gfx_Colorspace) o->cur->cspace;
 }
 
-EOLIAN static void
-_evas_image_video_surface_set(Eo *eo_obj, Evas_Image_Data *o, 
Evas_Video_Surface *surf)
+EAPI void
+evas_object_image_video_surface_set(Evas_Object *eo_obj, Evas_Video_Surface 
*surf)
 {
+   EVAS_OBJECT_LEGACY_API(eo_obj);
+
    Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, 
EVAS_OBJECT_CLASS);
+   Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
    evas_object_async_block(obj);
 
    _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
      }
 }
 
-EOLIAN static const Evas_Video_Surface*
-_evas_image_video_surface_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
+EAPI const Evas_Video_Surface*
+evas_object_image_video_surface_get(const Evas_Object *eo_obj)
 {
+   EVAS_OBJECT_LEGACY_API(eo_obj, NULL);
+
+   Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
    return (!o->video_surface ? NULL : &o->pixels->video);
 }
 
-EOLIAN static void
-_evas_image_video_surface_caps_set(Eo *eo_obj, Evas_Image_Data *o, unsigned 
int caps)
+EAPI void
+evas_object_image_video_surface_caps_set(Evas_Object *eo_obj, unsigned int 
caps)
 {
+   EVAS_OBJECT_LEGACY_API(eo_obj);
+
    Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, 
EVAS_OBJECT_CLASS);
+   Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
    evas_object_async_block(obj);
 
    _evas_image_cleanup(eo_obj, obj, o);
 
    if (caps == o->pixels->video_caps)
-      return;
+     return;
 
    EINA_COW_PIXEL_WRITE_BEGIN(o, pixi_write)
      pixi_write->video_caps = caps;
    EINA_COW_PIXEL_WRITE_END(o, pixi_write)
 }
 
-EOLIAN static unsigned int
-_evas_image_video_surface_caps_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
+EAPI unsigned int
+evas_object_image_video_surface_caps_get(const Evas_Object *eo_obj)
 {
+   EVAS_OBJECT_LEGACY_API(eo_obj, 0);
+
+   Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS);
    return (!o->video_surface ? 0 : o->pixels->video_caps);
 }
 
@@ -4868,6 +4880,7 @@ evas_object_image_source_visible_get(const Evas_Object 
*eo)
 EAPI Eina_Bool
 evas_object_image_source_unset(Evas_Object *eo_obj)
 {
+   EVAS_OBJECT_LEGACY_API(eo_obj, EINA_FALSE);
    return efl_canvas_proxy_source_set(eo_obj, NULL);
 }
 

-- 


Reply via email to