summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunil Park <hyunil46.park@samsung.com>2014-12-30 18:12:00 +0900
committerHyunil Park <hyunil46.park@samsung.com>2014-12-30 18:12:00 +0900
commitbc29d8a33c026ca0f5d574cc9f163667ebef4e07 (patch)
tree405fc233385b85fe8eca84c6e04ace5e372988db
parentc244cbbbb20aac7a2413d630b4c0e1b7a1a31f1f (diff)
downloadlibmm-common-bc29d8a33c026ca0f5d574cc9f163667ebef4e07.tar.gz
libmm-common-bc29d8a33c026ca0f5d574cc9f163667ebef4e07.tar.bz2
libmm-common-bc29d8a33c026ca0f5d574cc9f163667ebef4e07.zip
Feature Enhancement : Code is merged to Tizen 2.3 base codesubmit/tizen/20150102.063227
Change-Id: I214491d6ac37c726ab04b2e95c55786f0ffeb3ad
-rw-r--r--configure.ac3
-rw-r--r--include/SLP_MultimediaFW_PG.h8
-rw-r--r--include/mm_debug.h163
-rwxr-xr-x[-rw-r--r--]include/mm_error.h43
-rwxr-xr-x[-rw-r--r--]include/mm_message.h111
-rw-r--r--include/mm_types.h22
-rw-r--r--libmm-common.manifest5
-rw-r--r--mm_attrs.c57
-rw-r--r--mm_attrs_private.c53
-rw-r--r--packaging/libmm-common-0.2.55.tar.gzbin0 -> 3708714 bytes
-rw-r--r--packaging/libmm-common.changes4
-rw-r--r--packaging/libmm-common.manifest5
-rw-r--r--packaging/libmm-common.spec34
13 files changed, 217 insertions, 291 deletions
diff --git a/configure.ac b/configure.ac
index f269382..d86729b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,10 +7,9 @@ AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
# Checks for programs.
-m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AC_PROG_CC
+AM_PROG_AR
AC_PROG_LIBTOOL
-
# Checks for libraries.
# FIXME: Replace `main' with a function in `-lpthread':
AC_CHECK_LIB([pthread], [main])
diff --git a/include/SLP_MultimediaFW_PG.h b/include/SLP_MultimediaFW_PG.h
index 6d7ccd8..104b0a2 100644
--- a/include/SLP_MultimediaFW_PG.h
+++ b/include/SLP_MultimediaFW_PG.h
@@ -3611,9 +3611,9 @@ int err;
-// Init session policy to SHARE
+// Init session policy to MEDIA
-err = mm_session_init (MM_SESSION_TYPE_SHARE);
+err = mm_session_init (MM_SESSION_TYPE_MEDIA);
@@ -3646,9 +3646,9 @@ int err;
-// Init session policy to SHARE
+// Init session policy to MEDIA
-err = mm_session_init (MM_SESSION_TYPE_SHARE);
+err = mm_session_init (MM_SESSION_TYPE_MEDIA);
diff --git a/include/mm_debug.h b/include/mm_debug.h
index dd9f3f8..17d56c9 100644
--- a/include/mm_debug.h
+++ b/include/mm_debug.h
@@ -18,7 +18,7 @@
* limitations under the License.
*
*/
-
+
/* ===========================================================================================
@@ -59,18 +59,6 @@ enum {
MMF_DEBUG_PROFILE = MMF_DEBUG_LEVEL_0,
};
-enum {
- MMF_DEBUG_COLOR_DEFAULT = 0,
- MMF_DEBUG_COLOR_BLACK = 30,
- MMF_DEBUG_COLOR_RED = 31,
- MMF_DEBUG_COLOR_GREEN = 32,
- MMF_DEBUG_COLOR_YELLOW = 33,
- MMF_DEBUG_COLOR_BLUE = 34,
- MMF_DEBUG_COLOR_MAGENTA = 35,
- MMF_DEBUG_COLOR_CYAN = 36,
- MMF_DEBUG_COLOR_WHITE = 37,
-};
-
/******************************************************************************
*
* DEBUG CONFIGURATION
@@ -92,10 +80,6 @@ enum {
#define MMF_DEBUG_FILE "/var/log/mmf-log"
#endif
-#ifndef MMF_DEBUG_COLOR
-#define MMF_DEBUG_COLOR 0
-#endif
-
/******************************************************************************
* DEBUG OUTPUT:
* 0 = None
@@ -104,142 +88,35 @@ enum {
* 3 = Console
* 4 = File
*****************************************************************************/
-#ifndef MMF_DEBUG_OUTPUT
-#define MMF_DEBUG_OUTPUT 1
-#endif
-
-#if (MMF_DEBUG_OUTPUT == 1)
/*
* LOG MANAGER
*/
#include <mm_log.h>
-#define mmf_debug(type, fmt, arg...) \
- { \
- switch (type) { \
- case MMF_DEBUG_VERBOSE: \
- log_print_rel(MMF_LOG_OWNER, LOG_CLASS_VERBOSE, fmt, ##arg); \
- break; \
- case MMF_DEBUG_LOG: \
- log_print_rel(MMF_LOG_OWNER, LOG_CLASS_DEBUG, fmt, ##arg); \
- break; \
- case MMF_DEBUG_INFO: \
- log_print_rel(MMF_LOG_OWNER, LOG_CLASS_INFO, fmt, ##arg); \
- break; \
- case MMF_DEBUG_WARNING: \
- log_print_rel(MMF_LOG_OWNER, LOG_CLASS_WARNING, fmt, ##arg); \
- break; \
- case MMF_DEBUG_ERROR: \
- log_print_rel(MMF_LOG_OWNER, LOG_CLASS_ERR, fmt, ##arg); \
- break; \
- case MMF_DEBUG_CRITICAL: \
- log_print_rel(MMF_LOG_OWNER, LOG_CLASS_CRITICAL, fmt, ##arg); \
- break; \
- } \
- }
-
-#elif (MMF_DEBUG_OUTPUT == 2)
-/*
- * DEBUG MESSAGE SYSTEM
- */
-#include <mid-map.h>
-#include <message-framework-mid.h>
-#include <debug-message.h>
-
-#define mmf_debug(type, fmt, arg...) \
- do { \
- if (type < MMF_DEBUG_LEVEL) \
- debug_message(MID_FMULTIMEDIA, DEBUG_VERBOSE, fmt, ##arg); \
- } while(0)
-
-#elif (MMF_DEBUG_OUTPUT == 3)
-/*
- * CONSOLE
- */
-#include <stdio.h>
-#include <sys/syscall.h>
-#include <unistd.h>
-
-#define mmf_debug(type, fmt, arg...) \
- do { \
- if (type < MMF_DEBUG_LEVEL && type < MMF_DEBUG_LEVEL_ALL) { \
- fprintf(stderr, "[%-10.10s] ", MMF_DEBUG_PREFIX); \
- fprintf(stderr, fmt, ##arg); \
- } \
- } while(0)
-
-#define mmf_debug_color(type, color, fmt, arg...) \
- do { \
- if (type < MMF_DEBUG_LEVEL && type < MMF_DEBUG_LEVEL_ALL) { \
- fprintf(stderr, "\033[%dm", color); \
- fprintf(stderr, "[%-10.10s] ", MMF_DEBUG_PREFIX); \
- fprintf(stderr, fmt, ##arg); \
- fprintf(stderr, "\033[%dm", MMF_DEBUG_COLOR_DEFAULT); \
- } \
- } while(0)
-
-#elif (MMF_DEBUG_OUTPUT == 4)
-/*
- * FILE
- */
-#include <stdio.h>
-#include <stdlib.h>
-
-#define mmf_debug(type, fmt, arg...) \
- do { \
- FILE *fp;
-
- if (type < MMF_DEBUG_LEVEL) { \
- fp = fopen(MMF_DEBUG_FILE, "a"); \
- fprintf(stderr, "[%-10.10s] ", MMF_DEBUG_PREFIX); \
- fprintf(fp, fmt, ##arg); \
- fclose(fp); \
- } \
- } while (0)
-
-#else
-/*
- * NO DEBUG MESSAGE
- */
-#define mmf_debug(type, fmd, arg...)
-
-#endif /* MMF_DEBUG_OUTPUT */
-
/******************************************************************************
*
* DEBUG FUNCTION MACROS
*
*****************************************************************************/
-#if (MMF_DEBUG_COLOR == 1 && MMF_DEBUG_OUTPUT == 3)
-#define debug_verbose(fmt, arg...) mmf_debug_color(MMF_DEBUG_VERBOSE, MMF_DEBUG_COLOR_WHITE, fmt, ##arg)
-#define debug_log(fmt, arg...) mmf_debug_color(MMF_DEBUG_LOG, MMF_DEBUG_COLOR_YELLOW, fmt, ##arg)
-#define debug_msg(fmt, arg...) mmf_debug_color(MMF_DEBUG_INFO, MMF_DEBUG_COLOR_DEFAULT, fmt, ##arg)
-#define debug_warning(fmt, arg...) mmf_debug_color(MMF_DEBUG_WARNING, MMF_DEBUG_COLOR_MAGENTA, fmt, ##arg)
-#define debug_error(fmt, arg...) mmf_debug_color(MMF_DEBUG_ERROR, MMF_DEBUG_COLOR_RED, fmt, ##arg)
-#define debug_critical(fmt, arg...) mmf_debug_color(MMF_DEBUG_CRITICAL, MMF_DEBUG_COLOR_RED, fmt, ##arg)
-#define debug_profile(fmt, arg...) mmf_debug_color(MMF_DEBUG_PROFILE, MMF_DEBUG_COLOR_CYAN, fmt, ##arg)
-#define debug_fenter() mmf_debug_color(MMF_DEBUG_LOG, MMF_DEBUG_COLOR_GREEN, "<ENTER> \n")
-#define debug_fleave() mmf_debug_color(MMF_DEBUG_LOG, MMF_DEBUG_COLOR_GREEN, "<LEAVE> \n")
-#define debug_enter(fmt, arg...) mmf_debug_color(MMF_DEBUG_LOG, MMF_DEBUG_COLOR_GREEN, "<ENTER> [<---] " fmt, ##arg)
-#define debug_leave(fmt, arg...) mmf_debug_color(MMF_DEBUG_LOG, MMF_DEBUG_COLOR_CYAN, "<LEAVE> [--->] " fmt, ##arg)
-#else
-#define debug_verbose(fmt, arg...) mmf_debug(MMF_DEBUG_VERBOSE, fmt, ##arg)
-#define debug_log(fmt, arg...) mmf_debug(MMF_DEBUG_LOG, fmt, ##arg)
-#define debug_msg(fmt, arg...) mmf_debug(MMF_DEBUG_INFO, fmt, ##arg)
-#define debug_warning(fmt, arg...) mmf_debug(MMF_DEBUG_WARNING, fmt, ##arg)
-#define debug_error(fmt, arg...) mmf_debug(MMF_DEBUG_ERROR, fmt, ##arg)
-#define debug_critical(fmt, arg...) mmf_debug(MMF_DEBUG_CRITICAL, fmt, ##arg)
-#define debug_profile(fmt, arg...) mmf_debug(MMF_DEBUG_PROFILE, "<TIMER> " fmt, ##arg)
-#define debug_fenter() mmf_debug(MMF_DEBUG_LOG, "<ENTER> \n")
-#define debug_fleave() mmf_debug(MMF_DEBUG_LOG, "<LEAVE> \n")
-#define debug_enter(fmt, arg...) mmf_debug(MMF_DEBUG_LOG, "<ENTER> [<---] " fmt, ##arg)
-#define debug_leave(fmt, arg...) mmf_debug(MMF_DEBUG_LOG, "<LEAVE> [--->] " fmt, ##arg)
-#endif /* MMF_DEBUG_COLOR */
-
-/* will be deprecated */
-#define err_msg(fmt, arg...) mmf_debug(MMF_DEBUG_ERROR, fmt "\n",##arg)
-#define info_msg(fmt, arg...) mmf_debug(MMF_DEBUG_LOG, fmt "\n", ##arg)
-#define warn_msg(fmt, arg...) mmf_debug(MMF_DEBUG_WARNING, fmt "\n", ##arg)
+#define debug_verbose(fmt, arg...) mm_log_by_owner(MMF_LOG_OWNER, LOG_VERBOSE, fmt, ##arg)
+#define debug_log(fmt, arg...) mm_log_by_owner(MMF_LOG_OWNER, LOG_DEBUG, fmt, ##arg)
+#define debug_msg(fmt, arg...) mm_log_by_owner(MMF_LOG_OWNER, LOG_INFO, fmt, ##arg)
+#define debug_warning(fmt, arg...) mm_log_by_owner(MMF_LOG_OWNER, LOG_WARN, fmt, ##arg)
+#define debug_error(fmt, arg...) mm_log_by_owner(MMF_LOG_OWNER, LOG_ERROR, fmt, ##arg)
+#define debug_critical(fmt, arg...) mm_log_by_owner(MMF_LOG_OWNER, LOG_FATAL, fmt, ##arg)
+#define debug_profile(fmt, arg...) mm_log_by_owner(MMF_LOG_OWNER, LOG_DEBUG,"<TIMER> " fmt, ##arg)
+#define debug_fenter() mm_log_by_owner(MMF_LOG_OWNER, LOG_DEBUG, "<ENTER> \n")
+#define debug_fleave() mm_log_by_owner(MMF_LOG_OWNER, LOG_DEBUG, "<LEAVE> \n")
+#define debug_enter(fmt, arg...) mm_log_by_owner(MMF_LOG_OWNER, LOG_DEBUG,"<ENTER> [<---] " fmt, ##arg)
+#define debug_leave(fmt, arg...) mm_log_by_owner(MMF_LOG_OWNER, LOG_DEBUG,"<LEAVE> [--->] " fmt, ##arg)
+
+#define secure_debug_verbose(fmt, arg...) mm_secure_log_by_owner(MMF_LOG_OWNER, LOG_VERBOSE, fmt, ##arg)
+#define secure_debug_log(fmt, arg...) mm_secure_log_by_owner(MMF_LOG_OWNER, LOG_DEBUG, fmt, ##arg)
+#define secure_debug_msg(fmt, arg...) mm_secure_log_by_owner(MMF_LOG_OWNER, LOG_INFO, fmt, ##arg)
+#define secure_debug_warning(fmt, arg...) mm_secure_log_by_owner(MMF_LOG_OWNER, LOG_WARN, fmt, ##arg)
+#define secure_debug_error(fmt, arg...) mm_secure_log_by_owner(MMF_LOG_OWNER, LOG_ERROR, fmt, ##arg)
+#define secure_debug_critical(fmt, arg...) mm_secure_log_by_owner(MMF_LOG_OWNER, LOG_FATAL, fmt, ##arg)
+#define secure_debug_profile(fmt, arg...) mm_secure_log_by_owner(MMF_LOG_OWNER, LOG_DEBUG, "<TIMER> " fmt, ##arg)
#define return_if_fail(expr) \
if(!(expr)) { \
diff --git a/include/mm_error.h b/include/mm_error.h
index 775b260..1f20754 100644..100755
--- a/include/mm_error.h
+++ b/include/mm_error.h
@@ -46,6 +46,7 @@
#define MM_ERROR_RADIO_CLASS 0x80000300 /**< Category for describing radio error group */
#define MM_ERROR_PLAYER_CLASS 0x80000400 /**< Category for describing player error group */
#define MM_ERROR_FILE_CLASS 0x80000600 /**< Category for describing file error group */
+#define MM_ERROR_STREAMRECORDER_CLASS 0x80000700 /**< Category for describing streamrecorder error group */
#define MM_ERROR_CAMCORDER_CLASS 0x80000800 /**< Category for describing camcorder error group */
#define MM_ERROR_WFD_CLASS 0x80000900 /**< Category for describing wifi-display error group */
#define MM_ERROR_IMAGE_CLASS 0x80000a00 /**< Category for describing image error group */
@@ -94,7 +95,9 @@
#define MM_ERROR_SOUND_END_OF_STREAM (MM_ERROR_SOUND_CLASS | 0x07) /**< End of stream */
#define MM_ERROR_SOUND_SEEK (MM_ERROR_SOUND_CLASS | 0x08) /**< Seek related errors */
#define MM_ERROR_SOUND_INVALID_POINTER (MM_ERROR_SOUND_CLASS | 0x09) /**< Invalid pointer */
+#define MM_ERROR_SOUND_PERMISSION_DENIED (MM_ERROR_SOUND_CLASS | 0x0a) /**< Permission Denied */
#define MM_ERROR_SOUND_NOT_SUPPORTED_OPERATION (MM_ERROR_SOUND_CLASS | 0x10) /**< Not supported operation */
+#define MM_ERROR_SOUND_NO_DATA (MM_ERROR_SOUND_CLASS | 0x11) /**< No data */
#define MM_ERROR_SOUND_INVALID_FILE (MM_ERROR_SOUND_CLASS | 0x21) /**< Invalid file */
#define MM_ERROR_SOUND_INVALID_PATH (MM_ERROR_SOUND_CLASS | 0x22) /**< Invalid path */
@@ -102,6 +105,7 @@
#define MM_ERROR_SOUND_UNSUPPORTED_MEDIA_TYPE (MM_ERROR_SOUND_CLASS | 0x24) /**< Invalid media type */
#define MM_ERROR_SOUND_INTERNAL (MM_ERROR_SOUND_CLASS | 0x25) /**< Internal errors */
#define MM_ERROR_SOUND_INVALID_STATE (MM_ERROR_SOUND_CLASS | 0x26) /**< Invalid state */
+#define MM_ERROR_SOUND_VOLUME_BLOCKED_BY_SAFETY (MM_ERROR_SOUND_CLASS | 0x27) /**< Set volume fail dueto safety volume popup */
#define MM_ERROR_SOUND_VOLUME_NO_INSTANCE (MM_ERROR_SOUND_CLASS | 0x31) /**< No active instance */
#define MM_ERROR_SOUND_VOLUME_CAPTURE_ONLY (MM_ERROR_SOUND_CLASS | 0x32) /**< Capture instance only */
@@ -162,6 +166,8 @@
#define MM_ERROR_PLAYER_DRM_FUTURE_USE (MM_ERROR_PLAYER_CLASS | 0x1b) /**< License for future use */
#define MM_ERROR_PLAYER_DRM_NOT_AUTHORIZED (MM_ERROR_PLAYER_CLASS | 0x1c) /**< Not authorized */
#define MM_ERROR_PLAYER_DRM_OUTPUT_PROTECTION (MM_ERROR_PLAYER_CLASS | 0x1d) /**< Output protected */
+#define MM_ERROR_PLAYER_RESOURCE_LIMIT (MM_ERROR_PLAYER_CLASS | 0x1e) /**< Resource limit */
+#define MM_ERROR_PLAYER_PERMISSION_DENIED (MM_ERROR_PLAYER_CLASS | 0x1f) /**< Permission denied */
#define MM_ERROR_PLAYER_STREAMING_UNSUPPORTED_AUDIO (MM_ERROR_PLAYER_CLASS | 0x22) /**< Unsupported audio */
#define MM_ERROR_PLAYER_STREAMING_UNSUPPORTED_VIDEO (MM_ERROR_PLAYER_CLASS | 0x23) /**< Unsupported video */
@@ -261,6 +267,40 @@
#define MM_ERROR_CAMCORDER_MNOTE_MALLOC (MM_ERROR_CAMCORDER_CLASS | 0x27) /**< Memory allocation for makernote entries failed */
#define MM_ERROR_CAMCORDER_MNOTE_ADD_ENTRY (MM_ERROR_CAMCORDER_CLASS | 0x28) /**< Adding a makernote entry to list failed */
+/*
+ MM_ERROR_STREAMRECORDER_CLASS
+*/
+#define MM_ERROR_STREAMRECORDER_DEVICE (MM_ERROR_STREAMRECORDER_CLASS | 0x01) /**< General error of streamrecorder device */
+
+#define MM_ERROR_STREAMRECORDER_GST_CORE (MM_ERROR_STREAMRECORDER_CLASS | 0x0a) /**< Gst Core error */
+#define MM_ERROR_STREAMRECORDER_GST_LIBRARY (MM_ERROR_STREAMRECORDER_CLASS | 0x0b) /**< Gst library error */
+#define MM_ERROR_STREAMRECORDER_GST_RESOURCE (MM_ERROR_STREAMRECORDER_CLASS | 0x0c) /**< Gst resource error */
+#define MM_ERROR_STREAMRECORDER_GST_STREAM (MM_ERROR_STREAMRECORDER_CLASS | 0x0d) /**< Gst stream error */
+#define MM_ERROR_STREAMRECORDER_GST_STATECHANGE (MM_ERROR_STREAMRECORDER_CLASS | 0x0e) /**< Gst state change failed */
+#define MM_ERROR_STREAMRECORDER_GST_NEGOTIATION (MM_ERROR_STREAMRECORDER_CLASS | 0x0f) /**< Gst negotiation failed */
+#define MM_ERROR_STREAMRECORDER_GST_LINK (MM_ERROR_STREAMRECORDER_CLASS | 0x10) /**< Gst linking failed */
+#define MM_ERROR_STREAMRECORDER_GST_FLOW_ERROR (MM_ERROR_STREAMRECORDER_CLASS | 0x11) /**< Gst linking failed */
+
+#define MM_ERROR_STREAMRECORDER_ENCODER (MM_ERROR_STREAMRECORDER_CLASS | 0x12) /**< General error of Encoder */
+#define MM_ERROR_STREAMRECORDER_ENCODER_BUFFER (MM_ERROR_STREAMRECORDER_CLASS | 0x13) /**< Encoder buffer error */
+#define MM_ERROR_STREAMRECORDER_ENCODER_WRONG_TYPE (MM_ERROR_STREAMRECORDER_CLASS | 0x14) /**< Encoder wrong type (format or param) */
+#define MM_ERROR_STREAMRECORDER_ENCODER_WORKING (MM_ERROR_STREAMRECORDER_CLASS | 0x15) /**< Encoding fail */
+
+#define MM_ERROR_STREAMRECORDER_INVALID_CONDITION (MM_ERROR_STREAMRECORDER_CLASS | 0x16) /**< Invalid pre-condition */
+
+#define MM_ERROR_STREAMRECORDER_INVALID_ARGUMENT (MM_ERROR_STREAMRECORDER_CLASS | 0x18) /**< Invalid Argument */
+
+#define MM_ERROR_STREAMRECORDER_RESPONSE_TIMEOUT (MM_ERROR_STREAMRECORDER_CLASS | 0x1b) /**< Not responsed in time */
+#define MM_ERROR_STREAMRECORDER_NOT_INITIALIZED (MM_ERROR_STREAMRECORDER_CLASS | 0x1c) /**< Not initialized streamrecorder */
+#define MM_ERROR_STREAMRECORDER_LOW_MEMORY (MM_ERROR_STREAMRECORDER_CLASS | 0x1d) /**< Memory alloc failed */
+#define MM_ERROR_STREAMRECORDER_RESOURCE_CREATION (MM_ERROR_STREAMRECORDER_CLASS | 0x1e) /**< Creating resource of streamrecorder failed */
+#define MM_ERROR_STREAMRECORDER_CMD_IS_RUNNING (MM_ERROR_STREAMRECORDER_CLASS | 0x1f) /**< Command is running now */
+
+#define MM_ERROR_STREAMRECORDER_FILE_SIZE_OVER (MM_ERROR_STREAMRECORDER_CLASS | 0x23) /**< File size is greater than max size */
+
+#define MM_ERROR_STREAMRECORDER_AUDIOBUFFER_PUSH (MM_ERROR_STREAMRECORDER_CLASS | 0x26) /**< Exif makernote data construction failed */
+#define MM_ERROR_STREAMRECORDER_VIDEOBUFFER_PUSH (MM_ERROR_STREAMRECORDER_CLASS | 0x27) /**< Memory allocation for makernote entries failed */
+#define MM_ERROR_STREAMRECORDER_BUFFER_CONVERT (MM_ERROR_STREAMRECORDER_CLASS | 0x28) /**< Adding a makernote entry to list failed */
/*
MM_ERROR_WFD_CLASS
@@ -271,6 +311,7 @@
#define MM_ERROR_WFD_NO_OP (MM_ERROR_WFD_CLASS | 0x04) /**< No operation */
#define MM_ERROR_WFD_INVALID_STATE (MM_ERROR_WFD_CLASS | 0x05) /**< Invalid state */
#define MM_ERROR_WFD_INTERNAL (MM_ERROR_WFD_CLASS | 0x06) /**< Internal errors */
+#define MM_ERROR_WFD_NOHDCPKEY (MM_ERROR_WFD_CLASS | 0x07) /**< No HDCP key */
/*
@@ -291,7 +332,7 @@
#define MM_ERROR_TRANSCODE_FILEOPEN (MM_ERROR_TRANSCODE_CLASS | 1) /**< Cannot open file */
#define MM_ERROR_TRANSCODE_INTERNAL (MM_ERROR_TRANSCODE_CLASS | 2) /**< Transcode internal error */
#define MM_ERROR_TRANSCODE_NOT_INITIALIZED (MM_ERROR_TRANSCODE_CLASS | 3) /**< Fail to open transcode device */
-#define MM_ERROR_TRANSCODENO_DECODED_DATA (MM_ERROR_TRANSCODE_CLASS | 4) /**< Fail to control transcode device */
+#define MM_ERROR_TRANSCODE_NO_DECODED_DATA (MM_ERROR_TRANSCODE_CLASS | 4) /**< Fail to control transcode device */
#define MM_ERROR_TRANSCODE_NO_FREE_SPACE (MM_ERROR_TRANSCODE_CLASS | 5) /**< Not enough memory */
#define MM_ERROR_TRANSCODE_INVALID_VALUE (MM_ERROR_TRANSCODE_CLASS | 0x22) /**< Invalid value */
#define MM_ERROR_TRANSCODE_NOT_SUPPORT_FORMAT (MM_ERROR_TRANSCODE_CLASS | 0x23) /**< Not supported transcode format */
diff --git a/include/mm_message.h b/include/mm_message.h
index 1c852ae..6e6d25f 100644..100755
--- a/include/mm_message.h
+++ b/include/mm_message.h
@@ -19,7 +19,7 @@
*
*/
-
+
#ifndef __MM_MESSAGE_H__
#define __MM_MESSAGE_H__
@@ -74,6 +74,7 @@ enum MMMessageType {
MM_MESSAGE_SEEK_COMPLETED, /**< Seek completed */
MM_MESSAGE_PD_DOWNLOADER_START, /**< PD downloader start message */
MM_MESSAGE_PD_DOWNLOADER_END, /**< PD downloader end message */
+ MM_MESSAGE_IMAGE_BUFFER, /**< hls image buffer message type */
MM_MESSAGE_DRM_NO_LICENSE, /**< No license */
MM_MESSAGE_DRM_EXPIRED, /**< Expired license */
MM_MESSAGE_DRM_FUTURE_USE, /**< License for future use */
@@ -96,14 +97,21 @@ enum MMMessageType {
MM_MESSAGE_CAMCORDER_FACE_DETECT_INFO, /**< Face detection information */
MM_MESSAGE_CAMCORDER_VIDEO_CAPTURED, /**< Video captured */
MM_MESSAGE_CAMCORDER_AUDIO_CAPTURED, /**< Audio captured */
+ MM_MESSAGE_CAMCORDER_LOW_LIGHT_STATE, /**< Low light state */
+ MM_MESSAGE_CAMCORDER_CAPTURE_SOUND, /**< Noti to play capture sound - only single capture available */
+ MM_MESSAGE_CAMCORDER_CAPTURE_SOUND_COMPLETED, /**< Noti to play capture sound completed - only single capture available */
/* RADIO */
MM_MESSAGE_RADIO_SCAN_START = 0x300, /**< Radio frequency scanning initiated */
MM_MESSAGE_RADIO_SCAN_INFO, /**< Founded radio frequency report. check message parameters */
- MM_MESSAGE_RADIO_SCAN_FINISH, /**< Radio frequency scanning has finished */
+ MM_MESSAGE_RADIO_SCAN_FINISH, /**< Radio frequency scanning has finished */
MM_MESSAGE_RADIO_SCAN_STOP, /**< Radio frequency scanning has stopped */
MM_MESSAGE_RADIO_SEEK_START, /**< Radio seeking has established */
- MM_MESSAGE_RADIO_SEEK_FINISH, /**< Radio seeking has finished */
+ MM_MESSAGE_RADIO_SEEK_FINISH, /**< Radio seeking has finished */
+ MM_MESSAGE_RADIO_SET_FREQUENCY, /**< Radio set frequency async*/
+ MM_MESSAGE_RADIO_RDS_PS, /**< Radio RDS Program Service Data has arrived> */
+ MM_MESSAGE_RADIO_RDS_RT, /**< Radio RDS Radio Text Data has arrived> */
+
/* MEDIA CALL */
MM_MESSAGE_MEDIACALL_RESERVED = 0x400, /**< Reserved message for Media Call */
@@ -118,6 +126,11 @@ enum MMMessageType {
/* FILE INFO */
MM_MESSAGE_FILEINFO_RESERVED = 0x700, /**< Reserved message for File Info */
+ /* STREAM RECORDER */
+ MM_MESSAGE_STREAMRECORDER_ERROR = 0x800,
+ MM_MESSAGE_STREAMRECORDER_CONSUME_COMPLETE,
+ MM_MESSAGE_STREAMRECORDER_STATE_CHANGED,
+
MM_MESSAGE_NUM, /**< The number of the messages */
};
@@ -138,6 +151,7 @@ enum MMMessageUnionType {
MM_MSG_UNION_RADIO_SCAN,
MM_MSG_UNION_RECORDING_STATUS,
MM_MSG_UNION_REC_VOLUME_DB,
+ MM_MSG_UNION_CONSUME_RECORDER_BUFFER,
};
/*
@@ -146,6 +160,7 @@ enum MMMessageUnionType {
enum MMMessageInterruptedCode {
MM_MSG_CODE_INTERRUPTED_BY_MEDIA = 0,
MM_MSG_CODE_INTERRUPTED_BY_CALL_START,
+ MM_MSG_CODE_INTERRUPTED_BY_CALL_END,
MM_MSG_CODE_INTERRUPTED_BY_EARJACK_UNPLUG,
MM_MSG_CODE_INTERRUPTED_BY_RESOURCE_CONFLICT,
MM_MSG_CODE_INTERRUPTED_BY_ALARM_START,
@@ -154,6 +169,9 @@ enum MMMessageInterruptedCode {
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,
};
/*
@@ -169,65 +187,6 @@ 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.
*/
@@ -311,11 +270,7 @@ typedef struct {
* subtitle
*/
struct {
- 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. */
+ unsigned long duration; /**< duration */
} subtitle;
/**
@@ -324,6 +279,14 @@ typedef struct {
struct {
int frequency; /**< detected active frequency with MM_MESSAGE_RADIO_SCAN_INFO */
} radio_scan;
+
+/**
+ * Radio RDS PS and RT Info
+ */
+ struct {
+ int frequency; /**< The frequency at which the RDS data was obtained> */
+ char* rt_ps; /**< the radio text obtained with MM_MESSAGE_RADIO_RDS_PS and MM_MESSAGE_RADIO_RDS_RT */
+ } radio_rds_text;
/**
* Recording status
*/
@@ -340,6 +303,20 @@ typedef struct {
* Recording volume level - dB
*/
float rec_volume_dB;
+
+ struct {
+ void * consumed_buffer;
+
+ } consumed_mediabuffer;
+
+ /**
+ * Video frame capture
+ */
+ struct {
+ unsigned int width; /* width of captured image */
+ unsigned int height; /* height of captured image */
+ unsigned int orientation; /* orientation of captured image */
+ } captured_frame;
};
int size; /**< Allocated size of 'data' */
diff --git a/include/mm_types.h b/include/mm_types.h
index 502c059..6cd6df1 100644
--- a/include/mm_types.h
+++ b/include/mm_types.h
@@ -18,7 +18,7 @@
* limitations under the License.
*
*/
-
+
/**
* This file declares common data structure of multimedia framework.
*
@@ -44,8 +44,8 @@
#endif
-#define MM_MAX_FILENAME_LEN 256 /**< Maximum length of the file name */
-#define MM_MAX_URL_LEN 4096 /**< Maximum length of the file path */
+#define MM_MAX_FILENAME_LEN 256 /**< Maximum length of the file name */
+#define MM_MAX_URL_LEN 2048 /**< Maximum length of the maximum URL */
/**
* @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 */
/**
@@ -69,6 +69,7 @@ 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 */
};
@@ -78,6 +79,7 @@ enum MMVideoDeviceType {
enum MMAudioDeviceType {
MM_AUDIO_DEVICE_MIC, /**< Mic device */
MM_AUDIO_DEVICE_MODEM, /**< Modem */
+ MM_AUDIO_DEVICE_RADIO, /**< Radio */
MM_AUDIO_DEVICE_NUM, /**< Number of audio capture devices */
};
@@ -166,6 +168,8 @@ enum MMSoftwareVolumeTableType {
MM_SOUND_VOLUME_TYPE_MEDIA, /**< Volume table for Multimedia */
MM_SOUND_VOLUME_TYPE_CALL, /**< Volume table for Call */
MM_SOUND_VOLUME_TYPE_VOIP, /**< Volume table for VOIP */
+ MM_SOUND_VOLUME_TYPE_VOICE, /**< Volume table for VOICE */
+ MM_SOUND_VOLUME_TYPE_SVOICE, /**< Volume table for SVOICE */
MM_SOUND_VOLUME_TYPE_EMERGENCY, /**< Volume table for Emergency (FIXED) */
MM_SOUND_VOLUME_TYPE_NUM,
MM_SOUND_VOLUME_TABLE_NUM = MM_SOUND_VOLUME_TYPE_NUM,
@@ -185,7 +189,7 @@ enum MMSoftwareVolumeGainType {
MM_SOUND_VOLUME_GAIN_MIDI = 7<<8, /**< Volume gain for Midi */
MM_SOUND_VOLUME_GAIN_BOOTING = 8<<8, /**< Volume gain for Booting */
MM_SOUND_VOLUME_GAIN_VIDEO = 9<<8, /**< Volume gain for Video */
- MM_SOUND_VOLUME_GAIN_VIDEO_HDMI = 10<<8, /**< Volume gain for Video HDMI */
+ MM_SOUND_VOLUME_GAIN_TTS = 10<<8, /**< Volume gain for TTS */
MM_SOUND_VOLUME_GAIN_NUM
};
@@ -485,6 +489,14 @@ typedef enum {
MM_DISPLAY_METHOD_CUSTOM_ROI,
}MMDisplayGeometryMethod;
+/*
+ * Enumerations of ROI mode of display geometry method
+ */
+typedef enum {
+ MM_DISPLAY_METHOD_CUSTOM_ROI_FULL_SCREEN = 0,
+ MM_DISPLAY_METHOD_CUSTOM_ROI_LETER_BOX
+}MMDisplayGeometryMethodRoiMode;
+
#ifdef __cplusplus
}
#endif
diff --git a/libmm-common.manifest b/libmm-common.manifest
new file mode 100644
index 0000000..a76fdba
--- /dev/null
+++ b/libmm-common.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_" />
+ </request>
+</manifest>
diff --git a/mm_attrs.c b/mm_attrs.c
index 08fa14d..3904c1d 100644
--- a/mm_attrs.c
+++ b/mm_attrs.c
@@ -20,7 +20,7 @@
*/
-
+
#include <stdio.h>
#include <stdbool.h>
#include <malloc.h>
@@ -134,7 +134,7 @@ int mm_attrs_set_int(MMHandleType h, int idx, int val)
{
return MM_ERROR_COMMON_INVALID_PERMISSION;
}
-
+
if (mmf_attribute_validate_int(item, val))
{
int ret = 0;
@@ -151,7 +151,7 @@ int mm_attrs_set_int(MMHandleType h, int idx, int val)
else if (item->value_spec.type == MMF_VALUE_SPEC_INT_ARRAY)
return MM_ERROR_COMMON_OUT_OF_ARRAY;
else
- return MM_ERROR_COMMON_INVALID_ARGUMENT;
+ return MM_ERROR_COMMON_INVALID_ARGUMENT;
}
@@ -184,7 +184,7 @@ int mm_attrs_set_double(MMHandleType h, int idx, double val)
{
return MM_ERROR_COMMON_INVALID_PERMISSION;
}
-
+
if (mmf_attribute_validate_double(item, val))
{
int ret = 0;
@@ -201,7 +201,7 @@ int mm_attrs_set_double(MMHandleType h, int idx, double val)
else if (item->value_spec.type == MMF_VALUE_SPEC_DOUBLE_ARRAY)
return MM_ERROR_COMMON_OUT_OF_ARRAY;
else
- return MM_ERROR_COMMON_INVALID_ARGUMENT;
+ return MM_ERROR_COMMON_INVALID_ARGUMENT;
}
@@ -260,7 +260,7 @@ int mm_attrs_get_string(MMHandleType h, int idx,char **sval, int *size)
MM_ATTRS_WRITE_LOCK(attrs);
if (!(attrs->items[idx].flags & MM_ATTRS_FLAG_READABLE)) {
- mmf_debug(MMF_DEBUG_LOG, "Access denied.\n");
+ //mmf_debug(MMF_DEBUG_LOG, "Access denied.\n");
MM_ATTRS_WRITE_UNLOCK(attrs);
return MM_ERROR_COMMON_INVALID_PERMISSION;
}
@@ -302,7 +302,7 @@ int mm_attrs_get_data(MMHandleType h, int idx,void **data, int *size)
return_val_if_fail(attrs && idx >= 0 && idx < attrs->count && data, MM_ERROR_COMMON_INVALID_ARGUMENT);
if (!(attrs->items[idx].flags & MM_ATTRS_FLAG_READABLE)) {
- mmf_debug(MMF_DEBUG_LOG, "Access denied.\n");
+ //mmf_debug(MMF_DEBUG_LOG, "Access denied.\n");
return MM_ERROR_COMMON_INVALID_PERMISSION;
}
*data=mmf_value_get_data(&attrs->items[idx].value,size);
@@ -349,7 +349,7 @@ int mm_attrs_set_string_by_name(MMHandleType attrs, const char *name, const char
string = NULL;
size = 0;
}
-
+
return mm_attrs_set_string(attrs, idx, string, size);
}
return -1;
@@ -418,7 +418,8 @@ int mm_attrs_get_double_by_name(MMHandleType attrs, const char *name, double *va
mm_attrs_get_index(attrs, name, &idx);
if (idx >= 0) {
- return mm_attrs_get_double(attrs, idx, val);
+ *val = mm_attrs_get_double(attrs, idx, val);
+ return 0;
}
return MM_ERROR_COMMON_INVALID_ATTRTYPE;
}
@@ -448,10 +449,13 @@ int mm_attrs_set_valist (MMHandleType attrs, char **err_attr_name, const char *a
if (err_attr_name)
*err_attr_name = strdup(name);
- if (ret == MM_ERROR_COMMON_OUT_OF_ARRAY) //to avoid confusing
+ if (ret == MM_ERROR_COMMON_OUT_OF_ARRAY) { //to avoid confusing
+ //mmf_debug(MMF_DEBUG_ERROR, "result of mm_attrs_get_index is MM_ERROR_COMMON_OUT_OF_ARRAY so return(ret = %x, name:%s)",ret, name);
return MM_ERROR_COMMON_ATTR_NOT_EXIST;
- else
+ } else {
+ //mmf_debug(MMF_DEBUG_ERROR, "result of mm_attrs_get_index is %x so return(name:%s)",ret, name);
return ret;
+ }
}
//type check
@@ -464,14 +468,14 @@ int mm_attrs_set_valist (MMHandleType attrs, char **err_attr_name, const char *a
case MM_ATTRS_TYPE_INT:
{
int val = va_arg ((var_args), int);
- mmf_debug(MMF_DEBUG_LOG, "(%s: %d)\n", name, val);
+// mmf_debug(MMF_DEBUG_LOG, "(%s: %d)\n", name, val);
ret = mm_attrs_set_int(attrs, idx, val);
break;
}
case MM_ATTRS_TYPE_DOUBLE:
{
double val = va_arg ((var_args), double);
- mmf_debug(MMF_DEBUG_LOG, "(%s: %f)\n", name, val);
+// mmf_debug(MMF_DEBUG_LOG, "(%s: %f)\n", name, val);
ret = mm_attrs_set_double(attrs, idx, val);
break;
}
@@ -479,7 +483,7 @@ int mm_attrs_set_valist (MMHandleType attrs, char **err_attr_name, const char *a
{
char * val = va_arg ((var_args), char*);
int size = va_arg ((var_args), int);
- mmf_debug(MMF_DEBUG_LOG, "(%s: \'%s\', size: %d)\n", name, val, size);
+// mmf_debug(MMF_DEBUG_LOG, "(%s: \'%s\', size: %d)\n", name, val, size);
ret = mm_attrs_set_string(attrs, idx, (const char*)val, size);
break;
}
@@ -487,23 +491,22 @@ int mm_attrs_set_valist (MMHandleType attrs, char **err_attr_name, const char *a
{
void * val = va_arg ((var_args), void*);
int size = va_arg ((var_args), int);
- mmf_debug(MMF_DEBUG_LOG, "(%s: %p, size: %d)\n", name, val, size);
+// mmf_debug(MMF_DEBUG_LOG, "(%s: %p, size: %d)\n", name, val, size);
ret = mm_attrs_set_data(attrs, idx, val, size);
break;
}
case MM_ATTRS_TYPE_INVALID:
default:
- mmf_debug(MMF_DEBUG_ERROR, "This function doesn't support attribute type(%d, name:%s)\n", attr_type, name);
- if (err_attr_name)
- *err_attr_name = strdup(name);
- ret = MM_ERROR_COMMON_INVALID_ARGUMENT;
+ //mmf_debug(MMF_DEBUG_ERROR, "This function doesn't support attribute type(%d, name:%s)\n", attr_type, name);
+ return MM_ERROR_COMMON_INVALID_ARGUMENT;
+ break;
}
if (ret != MM_ERROR_NONE)
{
if (err_attr_name)
*err_attr_name = strdup(name);
- mmf_debug(MMF_DEBUG_ERROR, "Setting failure.(name:%s)\n", name);
+ //mmf_debug(MMF_DEBUG_ERROR, "Setting failure.(name:%s)\n", name);
return ret;
}
@@ -511,8 +514,10 @@ int mm_attrs_set_valist (MMHandleType attrs, char **err_attr_name, const char *a
name = va_arg (var_args, char*);
}
- if (mmf_attrs_commit_err(attrs, err_attr_name) == -1)
+ if (mmf_attrs_commit_err(attrs, err_attr_name) == -1) {
+ //mmf_debug(MMF_DEBUG_ERROR, "result of mmf_attrs_commit_err is -1 (name:%s)", name);
return MM_ERROR_CAMCORDER_INVALID_ARGUMENT;
+ }
else
return MM_ERROR_NONE;
@@ -590,8 +595,8 @@ int mm_attrs_get_valist (MMHandleType attrs, char **err_attr_name, const char *a
case MM_ATTRS_TYPE_INVALID:
default:
// mmf_debug(MMF_DEBUG_ERROR, "This function doesn't support attribute type(%d, name:%s)\n", attr_type, name);
- if (err_attr_name)
- *err_attr_name = strdup(name);
+ //if (err_attr_name)
+ // *err_attr_name = strdup(name);
ret = MM_ERROR_COMMON_INVALID_ARGUMENT;
}
@@ -599,7 +604,7 @@ int mm_attrs_get_valist (MMHandleType attrs, char **err_attr_name, const char *a
{
if (err_attr_name)
*err_attr_name = strdup(name);
- mmf_debug(MMF_DEBUG_ERROR, "Setting failure.(name:%s)\n", name);
+ //mmf_debug(MMF_DEBUG_ERROR, "Setting failure.(name:%s)\n", name);
return ret;
}
@@ -678,7 +683,7 @@ int mm_attrs_get_info(MMHandleType h, int idx, MMAttrsInfo *info)
info->double_range.dval = attrs->items[idx].value_spec.spec.double_spec.range.dval;
break;
case MM_ATTRS_VALID_TYPE_NONE:
- mmf_debug(MMF_DEBUG_LOG, "Valid type none.\n");
+ //mmf_debug(MMF_DEBUG_LOG, "Valid type none.\n");
break;
case MM_ATTRS_VALID_TYPE_INVALID:
default:
@@ -697,7 +702,7 @@ int mm_attrs_get_info_by_name(MMHandleType h, const char *attr_name, MMAttrsInfo
return_val_if_fail(h, MM_ERROR_COMMON_INVALID_ARGUMENT);
return_val_if_fail(info, MM_ERROR_COMMON_INVALID_ARGUMENT);
- mmf_debug(MMF_DEBUG_LOG, "(attr_name:%s)\n", attr_name);
+ //mmf_debug(MMF_DEBUG_LOG, "(attr_name:%s)\n", attr_name);
mm_attrs_get_index(h, attr_name, &idx);
diff --git a/mm_attrs_private.c b/mm_attrs_private.c
index ab5afa0..973687c 100644
--- a/mm_attrs_private.c
+++ b/mm_attrs_private.c
@@ -50,16 +50,15 @@ int mmf_value_copy(mmf_value_t *dest, const mmf_value_t *src)
dest->value.d_val = src->value.d_val;
break;
case MM_ATTRS_TYPE_STRING:
- if (src->value.s_val)
- {
- dest->value.s_val = strdup(src->value.s_val);
- dest->size = src->size;
- }
- else
- {
+ if (dest->value.s_val) {
+ free(dest->value.s_val);
dest->value.s_val = NULL;
dest->size = 0;
}
+ if (src->value.s_val) {
+ dest->value.s_val = strdup(src->value.s_val);
+ dest->size = src->size;
+ }
break;
case MM_ATTRS_TYPE_DATA:
dest->value.p_val = src->value.p_val;
@@ -143,19 +142,19 @@ void mmf_value_dump(const mmf_value_t *value)
return_if_fail(value);
switch (value->type) {
case MMF_VALUE_TYPE_INT:
- mmf_debug(MMF_DEBUG_LOG, "value[int]: %d\n", value->value.i_val);
+ //mmf_debug(MMF_DEBUG_LOG, "value[int]: %d\n", value->value.i_val);
break;
case MMF_VALUE_TYPE_DOUBLE:
- mmf_debug(MMF_DEBUG_LOG, "value[double]: %f\n", value->value.d_val);
+ //mmf_debug(MMF_DEBUG_LOG, "value[double]: %f\n", value->value.d_val);
break;
case MMF_VALUE_TYPE_STRING:
- mmf_debug(MMF_DEBUG_LOG, "value[string]: %s\n", value->value.s_val);
+ //mmf_debug(MMF_DEBUG_LOG, "value[string]: %s\n", value->value.s_val);
break;
case MMF_VALUE_TYPE_DATA:
- mmf_debug(MMF_DEBUG_LOG, "value[data]: %p\n", value->value.p_val);
+ //mmf_debug(MMF_DEBUG_LOG, "value[data]: %p\n", value->value.p_val);
break;
default:
- mmf_debug(MMF_DEBUG_LOG, "value invalid!!\n");
+ //mmf_debug(MMF_DEBUG_LOG, "value invalid!!\n");
break;
}
}
@@ -348,7 +347,7 @@ bool mmf_attribute_validate_int(mmf_attribute_t *item, int val)
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);
+ //mmf_debug(MMF_DEBUG_LOG, "[mmf_attribute:%s] out of range\n", item->name);
}
break;
case MMF_VALUE_SPEC_INT_ARRAY:
@@ -360,7 +359,7 @@ bool mmf_attribute_validate_int(mmf_attribute_t *item, int val)
}
}
if (!valid) {
- mmf_debug(MMF_DEBUG_LOG, "[mmf_attribute:%s] out of array\n", item->name);
+ //mmf_debug(MMF_DEBUG_LOG, "[mmf_attribute:%s] out of array\n", item->name);
}
break;
default:
@@ -383,7 +382,7 @@ bool mmf_attribute_validate_double(mmf_attribute_t *item, double val)
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);
+ //mmf_debug(MMF_DEBUG_LOG, "[mmf_attribute:%s] out of range\n", item->name);
}
break;
case MMF_VALUE_SPEC_DOUBLE_ARRAY:
@@ -395,7 +394,7 @@ bool mmf_attribute_validate_double(mmf_attribute_t *item, double val)
}
}
if (!valid) {
- mmf_debug(MMF_DEBUG_LOG, "[mmf_attribute:%s] out of array\n", item->name);
+ //mmf_debug(MMF_DEBUG_LOG, "[mmf_attribute:%s] out of array\n", item->name);
}
break;
default:
@@ -510,12 +509,26 @@ MMHandleType mmf_attrs_new(int count)
return_val_if_fail(count > 0, 0);
mmf_attrs_t *attrs;
attrs = (mmf_attrs_t *) malloc (sizeof(mmf_attrs_t));
+
+ if (attrs == NULL) {
+ debug_error("malloc failed");
+ return 0;
+ }
+
attrs->count = count;
attrs->items = (mmf_attribute_t *) malloc (sizeof(mmf_attribute_t) * count);
memset(attrs->items, 0, sizeof(mmf_attribute_t) * count);
if (pthread_mutex_init(&attrs->write_lock, NULL) != 0) {
- mmf_debug(MMF_DEBUG_ERROR, "mutex init failed");
+ //mmf_debug(MMF_DEBUG_ERROR, "mutex init failed");
+ if (attrs) {
+ if (attrs->items) {
+ free(attrs->items);
+ attrs->items = NULL;
+ }
+ free(attrs);
+ attrs=NULL;
+ }
return 0;
}
@@ -533,6 +546,9 @@ MMHandleType mmf_attrs_new_from_data(const char *name,
mmf_attrs_t *attrs;
h = mmf_attrs_new(count);
+ if(!h) {
+ return 0;
+ }
mmf_attrs_init(h, info, count);
attrs = (mmf_attrs_t *) h;
attrs->name = NULL;
@@ -608,7 +624,7 @@ int mmf_attrs_init(MMHandleType h, mmf_attrs_construct_info_t *info, int count)
mmf_value_set_data(&attrs->items[i].value, info[i].default_value,size);
break;
default:
- mmf_debug(MMF_DEBUG_LOG, "ERROR: Invalid MMF_VALUE_TYPE\n");
+ //mmf_debug(MMF_DEBUG_LOG, "ERROR: Invalid MMF_VALUE_TYPE\n");
assert(0);
break;
}
@@ -738,4 +754,3 @@ int mmf_attrs_set_valid_double_array(MMHandleType h, int idx, const double *arra
assert(attrs->items[idx].value_spec.type == MMF_VALUE_SPEC_DOUBLE_ARRAY);
return mmf_value_spec_set_double_array(&attrs->items[idx].value_spec, array, count, dval);
}
-
diff --git a/packaging/libmm-common-0.2.55.tar.gz b/packaging/libmm-common-0.2.55.tar.gz
new file mode 100644
index 0000000..75c09c3
--- /dev/null
+++ b/packaging/libmm-common-0.2.55.tar.gz
Binary files differ
diff --git a/packaging/libmm-common.changes b/packaging/libmm-common.changes
deleted file mode 100644
index 456587b..0000000
--- a/packaging/libmm-common.changes
+++ /dev/null
@@ -1,4 +0,0 @@
-* Wed Jun 12 2013 jbollo <jose.bollo@eurogiciel.fr> accepted/tizen/20130520.101133@1714664
-- Adding a changes log file
-- Pointer handle for 64 bits arch
-
diff --git a/packaging/libmm-common.manifest b/packaging/libmm-common.manifest
deleted file mode 100644
index 017d22d..0000000
--- a/packaging/libmm-common.manifest
+++ /dev/null
@@ -1,5 +0,0 @@
-<manifest>
- <request>
- <domain name="_"/>
- </request>
-</manifest>
diff --git a/packaging/libmm-common.spec b/packaging/libmm-common.spec
index 674f1c0..b7e10d6 100644
--- a/packaging/libmm-common.spec
+++ b/packaging/libmm-common.spec
@@ -1,51 +1,55 @@
Name: libmm-common
-Version: 0.2.55
+Summary: Multimedia Framework Common Lib
+Version: 0.2.84
Release: 0
-Summary: Multimedia Framework Common Library
-Group: Multimedia/Libraries
+Group: TO_BE/FILLED_IN
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
-Source1001: libmm-common.manifest
-BuildRequires: pkgconfig
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(mm-log)
+
%description
-Multimedia Framework Common Library package.
+Multimedia Framework Common Library
%package devel
Summary: Multimedia Framework Common Lib (devel)
Group: Development/Libraries
-Requires: %{name} = %{version}
+Requires: %{name} = %{version}-%{release}
%description devel
-Multimedia Framework Common Library (devel) package.
+Multimedia Framework Common Library (devel)
%prep
%setup -q
-cp %{SOURCE1001} .
+
+./autogen.sh
+CFLAGS="%{optflags} -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" " ./configure --prefix=%{_prefix} ; export CFLAGS
%build
+export CFLAGS+=" -Wall -Wcast-align -Wcast-qual -Wextra -Wno-array-bounds -Wno-empty-body -Wno-ignored-qualifiers -Wno-unused-parameter -Wshadow -Wwrite-strings -Wswitch-default -Wno-unused-but-set-parameter -Wno-unused-but-set-variable"
-CFLAGS="%{optflags} -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" "
-%reconfigure
-%__make %{?_smp_mflags}
+make %{?jobs:-j%jobs}
%install
+rm -rf %{buildroot}
%make_install
+
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
+
%files
-%manifest %{name}.manifest
+%manifest libmm-common.manifest
%defattr(-,root,root,-)
%{_libdir}/libmmfcommon.so.*
-%license LICENSE.APLv2
+
%files devel
-%manifest %{name}.manifest
%defattr(-,root,root,-)
%{_includedir}/mmf/SLP_MultimediaFW_PG.h
%{_includedir}/mmf/mm_types.h