#define IMAGE_FORMAT_LABEL_BUFFER_SIZE 9
-typedef enum
-{
+typedef enum {
MM_UTIL_ROTATE_0, /**< Rotation 0 degree - no effect */
MM_UTIL_ROTATE_90, /**< Rotation 90 degree */
MM_UTIL_ROTATE_180, /**< Rotation 180 degree */
} mm_util_img_rotate_type_e;
/* Enumerations */
-typedef enum
-{
+typedef enum {
IMGP_CSC = 0,
IMGP_RSZ,
IMGP_ROT,
IMGP_MAX,
} imgp_type_e;
-typedef enum
-{
+typedef enum {
/* YUV planar format */
MM_UTIL_IMG_FMT_YUV420 = 0x00, /**< YUV420 format - planer */
MM_UTIL_IMG_FMT_YUV422, /**< YUV422 format - planer */
MM_UTIL_IMG_FMT_NUM, /**< Number of image formats */
} mm_util_img_format_e;
-typedef enum
-{
+typedef enum {
GSTCS_ERROR_NONE = 0, /**< Successful */
GSTCS_ERROR_INVALID_PARAMETER = -1, /**< Invalid parameter */
GSTCS_ERROR_OUT_OF_MEMORY = -2, /**< Out of memory */
/**
* Image Process Info for dlopen
*/
-typedef struct _imgp_info_s
-{
+typedef struct _imgp_info_s {
char *input_format_label;
mm_util_img_format_e src_format;
unsigned int src_width;
/**
*
- * @remark colorspace converter I420, nv12 etc <-> RGB888 or ARGB8888 etc
+ * @remark colorspace converter I420, nv12 etc <-> RGB888 or ARGB8888 etc
*
- * @remark resize if input_width != output_width or input_height != output_height
+ * @remark resize if input_width != output_width or input_height != output_height
*
- * @remark rotate flip the image
- * @param _imgp_type_e file [in] convert / resize / rotate
- * @param input_ file [in] "filename.yuv" or "filename,rgb" etc
- * @param input_format_lable, output_format_lable [in] I420 or rgb888 etc
+ * @remark rotate flip the image
+ * @param _imgp_type_e file [in] convert / resize / rotate
+ * @param input_ file [in] "filename.yuv" or "filename,rgb" etc
+ * @param input_format_lable, output_format_lable [in] I420 or rgb888 etc
* @param input_width, input_height, output_width, output_height [in] int value
- * @param output_stride, output_elevation [in] output_width value or output_height + padding (using round_up function )
+ * @param output_stride, output_elevation [in] output_width value or output_height + padding (using round_up function )
- * @return This function returns gstremer image processor result value
+ * @return This function returns gstremer image processor result value
* if the resule is -1, then do not execute when the colopsapce converter is not supported
* else if the resule is 0, then you can use output_image pointer(char** value)
*/
-int
-mm_imgp(imgp_info_s* pImgp_info, unsigned char *src, unsigned char *dst, imgp_type_e _imgp_type_e);
+int mm_imgp(imgp_info_s* pImgp_info, unsigned char *src, unsigned char *dst, imgp_type_e _imgp_type_e);
#ifdef __cplusplus__
};
} while (0)
#define gstcs_retm_if(expr, fmt, arg...) do { \
- if(expr) { \
+ if (expr) { \
LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \
return; \
} \
} while (0)
#define gstcs_retvm_if(expr, val, fmt, arg...) do { \
- if(expr) { \
+ if (expr) { \
LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \
return (val); \
} \
} while (0)
-#define GSTCS_FREE(src) { if(src) {g_free(src); src = NULL;} }
-typedef struct _image_format_s
-{
+#define GSTCS_FREE(src) { if (src) {g_free(src); src = NULL; } }
+typedef struct _image_format_s {
char *format_label; /*I420, AYUV, RGB888, BGRA8888 */
char *colorspace; /* yuv, rgb, RGBA */
int width;
GstCaps* caps;
} image_format_s;
-typedef struct _gstreamer_s
-{
+typedef struct _gstreamer_s {
GMainLoop *loop;
GMainContext *context;
GstElement *pipeline;