diff options
author | Andrey Shelest <a.shelest@samsung.com> | 2014-06-13 17:43:49 +0300 |
---|---|---|
committer | Andrey Shelest <a.shelest@samsung.com> | 2014-06-13 17:45:52 +0300 |
commit | 75e75293da6fb6b8bc97b7315e0a366150d34770 (patch) | |
tree | b028611956a7d2df6e9a905e16fe330af7955dc4 | |
parent | d7abefd924b8cbe245425b70a0c0911ec5e73115 (diff) | |
download | libmm-common-75e75293da6fb6b8bc97b7315e0a366150d34770.tar.gz libmm-common-75e75293da6fb6b8bc97b7315e0a366150d34770.tar.bz2 libmm-common-75e75293da6fb6b8bc97b7315e0a366150d34770.zip |
Updated to version 0.2.55 from tizendev
Change-Id: I6ba3cb26c6aa6e20798d63db52124f9afccd9c13
-rw-r--r-- | include/mm_message.h | 65 | ||||
-rw-r--r-- | include/mm_types.h | 6 | ||||
-rw-r--r-- | mm_attrs.c | 3 | ||||
-rw-r--r-- | packaging/libmm-common.spec | 7 |
4 files changed, 73 insertions, 8 deletions
diff --git a/include/mm_message.h b/include/mm_message.h index 82aa73b..1c852ae 100644 --- a/include/mm_message.h +++ b/include/mm_message.h @@ -169,6 +169,65 @@ enum MMMessagePcmCaptureCode { */ typedef int (*MMMessageCallback) (int id, void *param, void *user_param); +/* + * Enumerations of subtitle attributes for MM_MESSAGE_UPDATE_SUBTITLE messages type. + */ +typedef enum { + /**< region */ + MM_MSG_SUB_ATTRI_REGION_X_POS = 0, /**< x position of subtitle region, float type */ + MM_MSG_SUB_ATTRI_REGION_Y_POS, /**< y position of subtitle region, float type */ + MM_MSG_SUB_ATTRI_REGION_WIDTH, /**< width of subtitle region, float type */ + MM_MSG_SUB_ATTRI_REGION_HEIGHT, /**< height of subtitle region, float type */ + /**< window */ + MM_MSG_SUB_ATTRI_WINDOW_X_PADDING, /**< x padding of subtitle window, float type */ + MM_MSG_SUB_ATTRI_WINDOW_Y_PADDING, /**< y padding of subtitle window, float type */ + MM_MSG_SUB_ATTRI_WINDOW_L_MARGIN, /**< left margin of subtitle window, int type */ + MM_MSG_SUB_ATTRI_WINDOW_R_MARGIN, /**< right margin of subtitle window, int type */ + MM_MSG_SUB_ATTRI_WINDOW_T_MARGIN, /**< top margin of subtitle window, int type */ + MM_MSG_SUB_ATTRI_WINDOW_B_MARGIN, /**< bottom margin of subtitle window, int type */ + MM_MSG_SUB_ATTRI_WINDOW_BG_COLOR, /**< background color of subtitle window, int type */ + MM_MSG_SUB_ATTRI_WINDOW_OPACITY, /**< opacity of subtitle window, float type */ + MM_MSG_SUB_ATTRI_WINDOW_SHOW_BG, /**< how to show window background, uint type */ + /**< font */ + MM_MSG_SUB_ATTRI_FONT_FAMILY, /**< family of subtitle font, char* type */ + MM_MSG_SUB_ATTRI_FONT_SIZE, /**< size of subtitle font, float type */ + MM_MSG_SUB_ATTRI_FONT_WEIGHT, /**< weight of subtitle font, int type */ + MM_MSG_SUB_ATTRI_FONT_STYLE, /**< style of subtitle font, int type */ + MM_MSG_SUB_ATTRI_FONT_COLOR, /**< color of subtitle font, int type */ + MM_MSG_SUB_ATTRI_FONT_BG_COLOR, /**< backgroung color of subtitle font, int type */ + MM_MSG_SUB_ATTRI_FONT_OPACITY, /**< opacity of subtitle font, float type */ + MM_MSG_SUB_ATTRI_FONT_BG_OPACITY, /**< background opacity of subtitle font, float type */ + MM_MSG_SUB_ATTRI_FONT_TOC, /**< text outline color of subtitle font, int type */ + MM_MSG_SUB_ATTRI_FONT_TOT, /**< text outline thickness of subtitle font, int type */ + MM_MSG_SUB_ATTRI_FONT_TOBR, /**< text outline blur radius of subtitle font, int type */ + MM_MSG_SUB_ATTRI_FONT_V_ALIGN, /**< vertical alignment of subtitle font, int type */ + MM_MSG_SUB_ATTRI_FONT_H_ALIGN, /**< horizontal alignment of subtitle font, int type */ +} MMMessageSubAttriType; + +/** + * Subtitle attribute Parameter. + */ +typedef struct { + MMMessageSubAttriType attri_type; /**< subtitle attributes type */ + unsigned int start_pos; /**< the start position among a subtitle line from where the attribute start to apply */ + unsigned int stop_pos; /**< the stop position among a subtitle line at where the attribute stop to apply */ + union { + int _int; + unsigned int _uint; + float _float; + char *_str; + }; +} MMSubAttribute; + +/** + * Subtitle invalid attributes define. + */ +#define MM_SUB_ATTRI_INT_INVALID -1 +#define MM_SUB_ATTRI_UINT_INVALID (unsigned int)(-1) +#define MM_SUB_ATTRI_FLOAT_INVALID 0.0 +#define MM_SUB_ATTRI_STR_INVALID NULL + + /** * Message Parameter. */ @@ -252,7 +311,11 @@ typedef struct { * subtitle */ struct { - unsigned long duration; /**< duration */ + unsigned long timestamp; /**< timestamp */ + unsigned long duration; /**< duration */ + unsigned int type; /**< text or picture. the value of type is 0 if it's text, 1 if it's picture. */ + unsigned int attri_count; /**< attributes count */ + MMSubAttribute **attributes; /**< attributes of MMSubAttribute type. */ } subtitle; /** diff --git a/include/mm_types.h b/include/mm_types.h index 3bc1057..228cd99 100644 --- a/include/mm_types.h +++ b/include/mm_types.h @@ -44,8 +44,8 @@ #endif -#define MM_MAX_FILENAME_LEN 256 /**< Maximum length of the file name */ -#define MM_MAX_URL_LEN 2048 /**< Maximum length of the maximum URL */ +#define MM_MAX_FILENAME_LEN 256 /**< Maximum length of the file name */ +#define MM_MAX_URL_LEN 4096 /**< Maximum length of the file path */ /** * @def Defines range of logical volume factor. @@ -59,7 +59,7 @@ /** * Multimedia Framework handle type. */ -typedef void *MMHandleType; /**< Handle type */ +typedef int MMHandleType; /**< Handle type */ /** @@ -418,8 +418,7 @@ int mm_attrs_get_double_by_name(MMHandleType attrs, const char *name, double *va mm_attrs_get_index(attrs, name, &idx); if (idx >= 0) { - *val = mm_attrs_get_double(attrs, idx, val); - return 0; + return mm_attrs_get_double(attrs, idx, val); } return MM_ERROR_COMMON_INVALID_ATTRTYPE; } diff --git a/packaging/libmm-common.spec b/packaging/libmm-common.spec index f467234..a6aae39 100644 --- a/packaging/libmm-common.spec +++ b/packaging/libmm-common.spec @@ -1,8 +1,8 @@ Name: libmm-common -Version: 0.2.54 +Version: 0.2.55 Release: 0 Summary: Multimedia Framework Common Library -Group: Multimedia Framework/Libraries +Group: Multimedia/Libraries License: Apache-2.0 Source0: %{name}-%{version}.tar.gz Source1001: libmm-common.manifest @@ -32,6 +32,8 @@ make %{?_smp_mflags} %install %make_install +mkdir -p %{buildroot}/usr/share/license +cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name} %post -p /sbin/ldconfig @@ -43,6 +45,7 @@ make %{?_smp_mflags} %manifest %{name}.manifest %defattr(-,root,root,-) %{_libdir}/libmmfcommon.so.* +/usr/share/license/%{name} %files devel |