]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7500: use the vpx_image_t from the installed header file to prevent mismatch
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 29 Jan 2015 22:03:58 +0000 (16:03 -0600)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:46:56 +0000 (12:46 -0500)
src/include/switch_core_video.h
src/include/switch_types.h

index a29d323f4a77ac5247748cc4e3af857e54e57613..2b079accf9819af6a5993264589bfe18087c1c12 100644 (file)
@@ -47,6 +47,13 @@ SWITCH_BEGIN_EXTERN_C
 #define SWITCH_IMG_FMT_UV_FLIP   VPX_IMG_FMT_UV_FLIP
 #define SWITCH_IMG_FMT_HAS_ALPHA VPX_IMG_FMT_HAS_ALPHA
 
+
+#define SWITCH_PLANE_PACKED VPX_PLANE_PACKED
+#define SWITCH_PLANE_Y      VPX_PLANE_Y
+#define SWITCH_PLANE_U      VPX_PLANE_U
+#define SWITCH_PLANE_V      VPX_PLANE_V
+#define SWITCH_PLANE_ALPHA  VPX_PLANE_ALPHA
+
 #ifndef VPX_IMG_FMT_HIGH         /* not available in libvpx 1.3.0 (see commit hash e97aea28) */
 #define VPX_IMG_FMT_HIGH         0x800  /**< Image uses 16bit framebuffer */
 #endif
@@ -81,48 +88,7 @@ typedef enum switch_img_fmt {
        SWITCH_IMG_FMT_I44416    = SWITCH_IMG_FMT_I444 | SWITCH_IMG_FMT_HIGH
 } switch_img_fmt_t; /**< alias for enum vpx_img_fmt */
 
-  /**\brief Image Descriptor */
-struct switch_image {
-       switch_img_fmt_t fmt; /**< Image Format */
-
-       /* Image storage dimensions */
-       unsigned int  w;           /**< Stored image width */
-       unsigned int  h;           /**< Stored image height */
-       unsigned int  bit_depth;   /**< Stored image bit-depth */
-
-       /* Image display dimensions */
-       unsigned int  d_w;   /**< Displayed image width */
-       unsigned int  d_h;   /**< Displayed image height */
-
-       /* Chroma subsampling info */
-       unsigned int  x_chroma_shift;   /**< subsampling order, X */
-       unsigned int  y_chroma_shift;   /**< subsampling order, Y */
-
-       /* Image data pointers. */
-#define SWITCH_PLANE_PACKED VPX_PLANE_PACKED
-#define SWITCH_PLANE_Y      VPX_PLANE_Y
-#define SWITCH_PLANE_U      VPX_PLANE_U
-#define SWITCH_PLANE_V      VPX_PLANE_V
-#define SWITCH_PLANE_ALPHA  VPX_PLANE_ALPHA
-
-       unsigned char *planes[4];  /**< pointer to the top left pixel for each plane */
-       int      stride[4];  /**< stride between rows for each plane */
-
-       int     bps; /**< bits per sample (for packed formats) */
-
-       /* The following member may be set by the application to associate data
-        * with this image.
-        */
-       void    *user_priv; /**< may be set by the application to associate data
-                                                *   with this image. */
-
-       /* The following members should be treated as private. */
-       unsigned char *img_data;       /**< private */
-       int      img_data_owner; /**< private */
-       int      self_allocd;    /**< private */
-
-       void    *fb_priv; /**< Frame buffer data associated with the image. */
-};
+typedef vpx_image_t switch_image_t;
 
 /**\brief Representation of a rectangle on a surface */
 typedef struct switch_image_rect {
index 1ce561721c53eb8259b788fb3678565a526ea3aa..b7b19195609e39cc21a48fb7300216fd1326e9f1 100644 (file)
@@ -40,6 +40,7 @@
 
 #include <switch.h>
 #include <switch_json.h>
+#include <switch_core_video.h>
 
 SWITCH_BEGIN_EXTERN_C
 #define SWITCH_ENT_ORIGINATE_DELIM ":_:"
@@ -2111,7 +2112,6 @@ typedef struct switch_caller_extension switch_caller_extension_t;
 typedef struct switch_caller_application switch_caller_application_t;
 typedef struct switch_state_handler_table switch_state_handler_table_t;
 typedef struct switch_timer switch_timer_t;
-typedef struct switch_image switch_image_t;
 typedef struct switch_codec switch_codec_t;
 typedef struct switch_core_thread_session switch_core_thread_session_t;
 typedef struct switch_codec_implementation switch_codec_implementation_t;