From e391a5017e1b0d6f5c9672842cc49797fe50441f Mon Sep 17 00:00:00 2001 From: "jk7744.park" Date: Sat, 24 Oct 2015 16:51:50 +0900 Subject: [PATCH] tizen 2.4 release --- configure.ac | 2 ++ include/mm_error.h | 3 ++- include/mm_message.h | 2 -- include/mm_types.h | 50 ++++++++++++++++++++++++++++++++++++++++++++- mm_attrs_private.c | 41 ++++++++++++++++++------------------- packaging/libmm-common.spec | 2 +- 6 files changed, 74 insertions(+), 26 deletions(-) mode change 100755 => 100644 include/mm_error.h mode change 100755 => 100644 include/mm_message.h diff --git a/configure.ac b/configure.ac index bd9c830..cc12f1c 100644 --- a/configure.ac +++ b/configure.ac @@ -7,6 +7,8 @@ AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) # Checks for programs. +m4_pattern_allow([AM_PROG_AR]) +AM_PROG_AR AC_PROG_CC AC_PROG_LIBTOOL diff --git a/include/mm_error.h b/include/mm_error.h old mode 100755 new mode 100644 index 1f20754..27edb33 --- a/include/mm_error.h +++ b/include/mm_error.h @@ -131,7 +131,8 @@ #define MM_ERROR_RADIO_NO_OP (MM_ERROR_RADIO_CLASS | 0x06) /**< Radio is in desired state */ #define MM_ERROR_RADIO_DEVICE_NOT_OPENED (MM_ERROR_RADIO_CLASS | 0x07) /**< Failed to opne radio devide */ #define MM_ERROR_RADIO_DEVICE_NOT_FOUND (MM_ERROR_RADIO_CLASS | 0x08) /**< Failed to find radio devide */ -#define MM_ERROR_RADIO_PERMISSION_DENIED (MM_ERROR_RADIO_CLASS | 0x08) /**< not supported permission */ +#define MM_ERROR_RADIO_PERMISSION_DENIED (MM_ERROR_RADIO_CLASS | 0x09) /**< Not supported permission */ +#define MM_ERROR_RADIO_NO_ANTENNA (MM_ERROR_RADIO_CLASS | 0x0a) /**< No antenna error */ /* diff --git a/include/mm_message.h b/include/mm_message.h old mode 100755 new mode 100644 index 6e6d25f..9c4f33d --- a/include/mm_message.h +++ b/include/mm_message.h @@ -168,10 +168,8 @@ enum MMMessageInterruptedCode { MM_MSG_CODE_INTERRUPTED_BY_EMERGENCY_START, MM_MSG_CODE_INTERRUPTED_BY_EMERGENCY_END, MM_MSG_CODE_INTERRUPTED_BY_OTHER_PLAYER_APP, - MM_MSG_CODE_INTERRUPTED_BY_RESUMABLE_MEDIA, MM_MSG_CODE_INTERRUPTED_BY_NOTIFICATION_START, MM_MSG_CODE_INTERRUPTED_BY_NOTIFICATION_END, - MM_MSG_CODE_INTERRUPTED_BY_RESUMABLE_CANCELED, }; /* diff --git a/include/mm_types.h b/include/mm_types.h index 77c6cf8..ada2d1e 100644 --- a/include/mm_types.h +++ b/include/mm_types.h @@ -347,7 +347,11 @@ enum MMFileFormatType { MM_FILE_FORMAT_WMA, /**< WMA file format */ MM_FILE_FORMAT_WMV, /**< WMV file format */ MM_FILE_FORMAT_JPG, /**< JPEG file format */ - MM_FILE_FORMAT_FLAC, /**< FLAC file format */ + MM_FILE_FORMAT_FLAC, /**< FLAC file format */ + MM_FILE_FORMAT_M2TS, /**< MPEG2-Transport Stream file format */ + MM_FILE_FORMAT_M2PS, /**< MPEG2-Program Stream file format */ + MM_FILE_FORMAT_M1VIDEO, /**< MPEG1-Video file format */ + MM_FILE_FORMAT_M1AUDIO, /**< MPEG1-Audio file format */ MM_FILE_FORMAT_NUM, /**< Number of file format type */ }; @@ -380,6 +384,7 @@ typedef enum { MM_PIXEL_FORMAT_ARGB, /**< ARGB pixel format */ MM_PIXEL_FORMAT_ENCODED, /**< Encoded pixel format */ MM_PIXEL_FORMAT_ITLV_JPEG_UYVY, /**< FIXME: JPEG+UYVY Interleaved format */ + MM_PIXEL_FORMAT_ENCODED_H264, /**< Encoded H264 format */ MM_PIXEL_FORMAT_NUM /**< Number of the pixel format */ } MMPixelFormatType; @@ -496,6 +501,49 @@ typedef enum { MM_DISPLAY_METHOD_CUSTOM_ROI_LETER_BOX }MMDisplayGeometryMethodRoiMode; + +#define MM_VIDEO_BUFFER_PLANE_MAX 4 /**< Max num of video buffer plane */ +/* + * Enumerations of multimedia video buffer type + */ +typedef enum { + MM_VIDEO_BUFFER_TYPE_PHYSICAL_ADDRESS = 0, + MM_VIDEO_BUFFER_TYPE_DMABUF_FD, + MM_VIDEO_BUFFER_TYPE_TBM_BO +} MMVideoBufferType; + +typedef struct { + void *paddr[MM_VIDEO_BUFFER_PLANE_MAX]; /**< physical address */ + int dmabuf_fd[MM_VIDEO_BUFFER_PLANE_MAX]; /**< dmabuf fd */ + void *bo[MM_VIDEO_BUFFER_PLANE_MAX]; /**< TBM bo */ +} MMVideoBufferHandle; + +/* + * Type definition of multimedia video buffer + */ +typedef struct { + MMVideoBufferType type; /**< buffer type + - The field of handle that type indicates should be filled, + and other fields of handle are optional. */ + MMPixelFormatType format; /**< buffer type */ + int plane_num; /**< number of planes */ + int width[MM_VIDEO_BUFFER_PLANE_MAX]; /**< width of buffer */ + int height[MM_VIDEO_BUFFER_PLANE_MAX]; /**< height of buffer */ + int stride_width[MM_VIDEO_BUFFER_PLANE_MAX]; /**< stride width of buffer */ + int stride_height[MM_VIDEO_BUFFER_PLANE_MAX]; /**< stride height of buffer */ + int size[MM_VIDEO_BUFFER_PLANE_MAX]; /**< size of planes */ + void *data[MM_VIDEO_BUFFER_PLANE_MAX]; /**< data pointer(user address) of planes */ + int handle_num; /**< number of buffer handle */ + int handle_size[MM_VIDEO_BUFFER_PLANE_MAX]; /**< size of handles */ + MMVideoBufferHandle handle; /**< handle of buffer */ + int is_secured; /**< secured buffer flag. ex) TrustZone memory, user can not access it. */ + int flush_request; /**< flush request flag + - If this flag is TRUE, sink element will make copy of last buffer, + and it will return all buffers from src element. + Then, src element can restart without changing pipeline state. */ +} MMVideoBuffer; + + #ifdef __cplusplus } #endif diff --git a/mm_attrs_private.c b/mm_attrs_private.c index c11e5c0..0c837ec 100644 --- a/mm_attrs_private.c +++ b/mm_attrs_private.c @@ -19,7 +19,7 @@ * */ - + #include #include @@ -338,13 +338,13 @@ bool mmf_attribute_validate_int(mmf_attribute_t *item, int val) { return_val_if_fail(item, false); return_val_if_fail(item->value.type == MMF_VALUE_TYPE_INT, false); - + bool valid = true; int i = 0; - + switch (item->value_spec.type) { case MMF_VALUE_SPEC_INT_RANGE: - if (val < item->value_spec.spec.int_spec.range.min || + if (val < item->value_spec.spec.int_spec.range.min || val > item->value_spec.spec.int_spec.range.max) { valid = false; //mmf_debug(MMF_DEBUG_LOG, "[mmf_attribute:%s] out of range\n", item->name); @@ -363,9 +363,9 @@ bool mmf_attribute_validate_int(mmf_attribute_t *item, int val) } break; default: - break; + break; } - + return valid; } @@ -373,13 +373,13 @@ bool mmf_attribute_validate_double(mmf_attribute_t *item, double val) { return_val_if_fail(item, false); return_val_if_fail(item->value.type == MMF_VALUE_TYPE_DOUBLE, false); - + bool valid = true; int i = 0; - + switch (item->value_spec.type) { case MMF_VALUE_SPEC_DOUBLE_RANGE: - if (val < item->value_spec.spec.double_spec.range.min || + if (val < item->value_spec.spec.double_spec.range.min || val > item->value_spec.spec.double_spec.range.max) { valid = false; //mmf_debug(MMF_DEBUG_LOG, "[mmf_attribute:%s] out of range\n", item->name); @@ -398,9 +398,9 @@ bool mmf_attribute_validate_double(mmf_attribute_t *item, double val) } break; default: - break; + break; } - + return valid; } @@ -485,9 +485,9 @@ int mmf_attribute_set_string(mmf_attribute_t *item, const char *string, int size return_val_if_fail(item, -1); if (mmf_value_set_string(&item->tmpval, string,size) == 0) { - if (string) - item->flags |= MM_ATTRS_FLAG_MODIFIED; - + if (string) + item->flags |= MM_ATTRS_FLAG_MODIFIED; + return 0; } return -1; @@ -517,13 +517,12 @@ MMHandleType mmf_attrs_new(int count) attrs->count = count; attrs->items = (mmf_attribute_t *) malloc (sizeof(mmf_attribute_t) * count); - if(attrs->items == NULL) { - debug_error("Failed to malloc for attrs->items."); - free(attrs); - attrs=NULL; - return 0; - } + debug_error("Failed to malloc for attrs->items."); + free(attrs); + attrs=NULL; + return 0; + } memset(attrs->items, 0, sizeof(mmf_attribute_t) * count); @@ -644,7 +643,7 @@ int mmf_attrs_init(MMHandleType h, mmf_attrs_construct_info_t *info, int count) int mmf_attrs_commit(MMHandleType h) { return_val_if_fail(h, -1); - + mmf_attrs_t *attrs = (mmf_attrs_t * )h; int i; int ret = 0; diff --git a/packaging/libmm-common.spec b/packaging/libmm-common.spec index 7ed8d69..2e868f9 100644 --- a/packaging/libmm-common.spec +++ b/packaging/libmm-common.spec @@ -1,6 +1,6 @@ Name: libmm-common Summary: Multimedia Framework Common Lib -Version: 0.2.86 +Version: 0.2.93 Release: 0 Group: TO_BE/FILLED_IN License: Apache-2.0 -- 2.7.4