diff options
author | Jeongmo Yang <jm80.yang@samsung.com> | 2015-06-02 10:21:59 +0900 |
---|---|---|
committer | Jeongmo Yang <jm80.yang@samsung.com> | 2015-06-02 10:26:04 +0900 |
commit | 4d6d5412c637422ce6a8724b2c0e721e42eb12e2 (patch) | |
tree | ac8b8e8bc19bbd6b9e954cf853fe8b81c368783e | |
parent | bf3d68cfbb25e2a1d31f0504b38610963fc0504a (diff) | |
download | libmm-common-4d6d5412c637422ce6a8724b2c0e721e42eb12e2.tar.gz libmm-common-4d6d5412c637422ce6a8724b2c0e721e42eb12e2.tar.bz2 libmm-common-4d6d5412c637422ce6a8724b2c0e721e42eb12e2.zip |
1. Fix prevent issuesubmit/tizen/20150602.025305accepted/tizen/wearable/20150603.083007accepted/tizen/tv/20150603.083311accepted/tizen/mobile/20150603.082706accepted/tizen/common/20150603.075156tizen_3.0.2015.q2_common
2. Add new structure - MMVideoBuffer
Change-Id: I8d8d9b269603b69502c20fba28053ec8217fa1a6
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
-rw-r--r-- | include/mm_types.h | 52 | ||||
-rw-r--r-- | mm_attrs_private.c | 7 | ||||
-rw-r--r-- | packaging/libmm-common.spec | 4 |
3 files changed, 53 insertions, 10 deletions
diff --git a/include/mm_types.h b/include/mm_types.h index 1eb029f..1a23c66 100644 --- a/include/mm_types.h +++ b/include/mm_types.h @@ -49,8 +49,8 @@ /** * @def Defines range of logical volume factor. - * It's for logical volume control in player. - * So, don't use this one for media volume. + * It's for logical volume control in player. + * So, don't use this one for media volume. * range : 0 ~ 1.0 (1.0 = 100%) */ #define MM_VOLUME_LEVEL_MIN 0 /**< Minimum factor of volume */ @@ -69,7 +69,6 @@ enum MMVideoDeviceType { MM_VIDEO_DEVICE_NONE = -1, /**< No camera */ MM_VIDEO_DEVICE_CAMERA0, /**< Primary camera */ MM_VIDEO_DEVICE_CAMERA1, /**< Secondary camera */ - MM_VIDEO_DEVICE_CAMERAPLEX, /**< Primary camera + Secondary camera */ MM_VIDEO_DEVICE_NUM, /**< Number of video capture devices */ }; @@ -348,8 +347,8 @@ 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_M2TS, /**< MPEG2-TransportStream file format */ + MM_FILE_FORMAT_FLAC, /**< FLAC file format */ + MM_FILE_FORMAT_M2TS, /**< MPEG2-Transport Stream file format */ MM_FILE_FORMAT_NUM, /**< Number of file format type */ }; @@ -499,6 +498,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 973687c..6f82972 100644 --- a/mm_attrs_private.c +++ b/mm_attrs_private.c @@ -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,6 +517,7 @@ MMHandleType mmf_attrs_new(int count) attrs->count = count; attrs->items = (mmf_attribute_t *) malloc (sizeof(mmf_attribute_t) * count); + return_val_if_fail(attrs->items, 0); memset(attrs->items, 0, sizeof(mmf_attribute_t) * count); if (pthread_mutex_init(&attrs->write_lock, NULL) != 0) { diff --git a/packaging/libmm-common.spec b/packaging/libmm-common.spec index 34e3d87..6d753e9 100644 --- a/packaging/libmm-common.spec +++ b/packaging/libmm-common.spec @@ -1,7 +1,7 @@ Name: libmm-common Summary: Multimedia Framework Common Lib -Version: 0.2.85 -Release: 1 +Version: 0.2.86 +Release: 0 Group: Multimedia/Libraries License: Apache-2.0 Source0: %{name}-%{version}.tar.gz |