Updated to version 0.2.55 from tizendev 72/22972/1
authorAndrey Shelest <a.shelest@samsung.com>
Fri, 13 Jun 2014 14:43:49 +0000 (17:43 +0300)
committerAndrey Shelest <a.shelest@samsung.com>
Fri, 13 Jun 2014 14:45:52 +0000 (17:45 +0300)
Change-Id: I6ba3cb26c6aa6e20798d63db52124f9afccd9c13

include/mm_message.h
include/mm_types.h
mm_attrs.c
packaging/libmm-common.spec

index 82aa73b..1c852ae 100644 (file)
@@ -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;
 
 /**
index 3bc1057..228cd99 100644 (file)
@@ -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 */
 
 
 /**
index e24cdd0..08fa14d 100644 (file)
@@ -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;
 }
index f467234..a6aae39 100644 (file)
@@ -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