diff --git a/src/include/switch_core_video.h b/src/include/switch_core_video.h index a29d323f4a..2b079accf9 100644 --- a/src/include/switch_core_video.h +++ b/src/include/switch_core_video.h @@ -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 { diff --git a/src/include/switch_types.h b/src/include/switch_types.h index 1ce561721c..b7b1919560 100644 --- a/src/include/switch_types.h +++ b/src/include/switch_types.h @@ -40,6 +40,7 @@ #include #include +#include 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;