Update to version tizen 2.3 base on Gstreaemr 1.x 79/34979/1 accepted/tizen/common/20150210.094528 accepted/tizen/mobile/20150211.014746 accepted/tizen/tv/20150217.103455 accepted/tizen/wearable/20150211.014105 submit/tizen/20150209.023238 submit/tizen_tv/20150210.000000 submit/tizen_tv/20150212.080449 submit/tizen_tv/20150216.072255
authorHyunil Park <hyunil46.park@samsung.com>
Thu, 5 Feb 2015 07:42:54 +0000 (16:42 +0900)
committerHyunil Park <hyunil46.park@samsung.com>
Thu, 5 Feb 2015 07:42:54 +0000 (16:42 +0900)
Change-Id: I33a92b5c9222a76df5e5d8aec6cb6e6846b455b8
Signed-off-by: Hyunil Park <hyunil46.park@samsung.com>
CMakeLists.txt
doc/images/capi_media_player_state_diagram.png [new file with mode: 0644]
doc/player_doc.h [new file with mode: 0644]
include/player.h
include/player_private.h
packaging/capi-media-player.spec
src/player.c
test/CMakeLists.txt
test/player_test.c [changed mode: 0644->0755]

index fd241cb..db2bb42 100644 (file)
@@ -10,8 +10,8 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(INC_DIR include)
 INCLUDE_DIRECTORIES(${INC_DIR})
 
-SET(dependents "dlog mm-player capi-base-common capi-media-sound-manager mm-ta")
-SET(pc_dependents "capi-base-common capi-media-sound-manager")
+SET(dependents "libtbm capi-media-tool dlog mm-player capi-base-common capi-media-sound-manager gstreamer-1.0 evas ecore elementary")
+SET(pc_dependents "libtbm capi-media-tool capi-base-common capi-media-sound-manager")
 
 INCLUDE(FindPkgConfig)
 pkg_check_modules(${fw_name} REQUIRED ${dependents})
diff --git a/doc/images/capi_media_player_state_diagram.png b/doc/images/capi_media_player_state_diagram.png
new file mode 100644 (file)
index 0000000..2d62d99
Binary files /dev/null and b/doc/images/capi_media_player_state_diagram.png differ
diff --git a/doc/player_doc.h b/doc/player_doc.h
new file mode 100644 (file)
index 0000000..534a2f5
--- /dev/null
@@ -0,0 +1,359 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __TIZEN_MEDIA_PLAYER_DOC_H__
+#define __TIZEN_MEDIA_PLAYER_DOC_H__
+
+
+/**
+ * @file player_doc.h
+ * @brief This file contains high level documentation on the Player API.
+ */
+
+/**
+ * @ingroup CAPI_MEDIA_FRAMEWORK
+ * @defgroup CAPI_MEDIA_PLAYER_MODULE Player
+ * @brief The @ref CAPI_MEDIA_PLAYER_MODULE API provides functions for media playback and controlling media playback attributes.
+ *
+ * @section CAPI_MEDIA_PLAYER_MODULE_HEADER Required Header
+ *    \#include <player.h>
+ *
+ * @section CAPI_MEDIA_PLAYER_OVERVIEW Overview
+ * The Player API provides a way to play multimedia content. Content can be played from a file, from the network, or from memory.
+ * It gives the ability to start/stop/pause/mute, set the playback position (that is, seek), perform various status queries, and control the display.
+ *
+ * Additional functions allow registering notifications via callback functions for various state change events.
+ *
+ * This API also enables collaboration with the GUI service to present a video.
+ *
+ * @subsection CAPI_MEDIA_PLAYER_LIFE_CYCLE_STATE_DIAGRAM State Diagram
+ * Playback of multimedia content is controlled by a state machine.
+ * The following diagram shows the life cycle and states of the Player.
+ *
+ * @image html capi_media_player_state_diagram.png
+ *
+ * @subsection CAPI_MEDIA_PLAYER_LIFE_CYCLE_STATE_TRANSITIONS State Transitions
+ * <div><table class="doxtable" >
+ *     <tr>
+ *        <th><b>FUNCTION</b></th>
+ *        <th><b>PRE-STATE</b></th>
+ *        <th><b>POST-STATE</b></th>
+ *        <th><b>SYNC TYPE</b></th>
+ *     </tr>
+ *     <tr>
+ *        <td>player_create()</td>
+ *        <td>NONE</td>
+ *        <td>IDLE</td>
+ *        <td>SYNC</td>
+ *     </tr>
+ *     <tr>
+ *         <td>player_destroy()</td>
+ *         <td>IDLE</td>
+ *         <td>NONE</td>
+ *         <td>SYNC</td>
+ *     </tr>
+ *     <tr>
+ *        <td>player_prepare()</td>
+ *        <td>IDLE</td>
+ *        <td>READY</td>
+ *        <td>SYNC</td>
+ *     </tr>
+ *     <tr>
+ *        <td>player_prepare_async()</td>
+ *        <td>IDLE</td>
+ *        <td>READY</td>
+ *        <td>ASYNC</td>
+ *     </tr>
+ *     <tr>
+ *        <td>player_unprepare()</td>
+ *        <td>READY, PLAYING or PAUSED</td>
+ *        <td>IDLE</td>
+ *        <td>SYNC</td>
+ *     </tr>
+ *     <tr>
+ *        <td>player_start()</td>
+ *        <td>READY or PAUSED</td>
+ *        <td>PLAYING</td>
+ *        <td>SYNC</td>
+ *     </tr>
+ *     <tr>
+ *        <td>player_stop()</td>
+ *        <td>PLAYING</td>
+ *        <td>READY</td>
+ *        <td>SYNC</td>
+ *     </tr>
+ *     <tr>
+ *        <td>player_pause()</td>
+ *        <td>PLAYING</td>
+ *        <td>PAUSED</td>
+ *        <td>SYNC</td>
+ *     </tr>
+ * </table></div>
+ *
+ * @subsection CAPI_MEDIA_PLAYER_LIFE_CYCLE_STATE_DEPENDENT_FUNCTIONS State Dependent Function Calls
+ * The following table shows state-dependent function calls.
+ * It is forbidden to call the functions listed below in wrong states.
+ * Violation of this rule may result in unpredictable behavior.
+ * <div><table class="doxtable" >
+ * <tr>
+ *    <th><b>FUNCTION</b></th>
+ *    <th><b>VALID STATES</b></th>
+ *    <th><b>DESCRIPTION</b></th>
+ * </tr>
+ * <tr>
+ *    <td>player_create()</td>
+ *    <td>ANY</td>
+ *    <td>-</td>
+ * </tr>
+ * <tr>
+ *    <td>player_destroy()</td>
+ *    <td>ANY</td>
+ *    <td>-</td>
+ * </tr>
+ * <tr>
+ *    <td>player_prepare()</td>
+ *    <td>IDLE</td>
+ *    <td>This function must be called after player_create()</td>
+ * </tr>
+ * <tr>
+ *    <td>player_unprepare()</td>
+ *    <td>READY/PAUSED/PLAYING</td>
+ *    <td>This function must be called after player_stop() or player_start() or player_pause()</td>
+ * </tr>
+ * <tr>
+ *    <td>player_start()</td>
+ *    <td>READY/ PAUSED</td>
+ *    <td>This function must be called after player_prepare()</td>
+ * </tr>
+ * <tr>
+ *    <td>player_stop()</td>
+ *    <td>PLAYING/ PAUSED</td>
+ *    <td>This function must be called after player_start() or player_pause()</td>
+ * </tr>
+ * <tr>
+ *    <td>player_pause()</td>
+ *    <td>PLAYING</td>
+ *    <td>This function must be called after player_start()</td>
+ * </tr>
+ * <tr>
+ *    <td>player_set_completed_cb()<BR> player_set_interrupted_cb()<BR> player_set_error_cb()<BR> player_set_buffering_cb()<BR> player_set_subtitle_updated_cb()</td>
+ *    <td>IDLE/ READY/ PLAYING/ PAUSED</td>
+ *    <td>This function must be called after player_create()</td>
+ * </tr>
+ * <tr>
+ *    <td>player_unset_completed_cb()<BR> player_unset_interrupted_cb()<BR> player_unset_error_cb()<BR> player_unset_buffering_cb()<BR> player_unset_subtitle_updated_cb()</td>
+ *    <td>IDLE/ READY/ PLAYING/ PAUSED</td>
+ *    <td>This function must be called after register callback functions such as player_set_completed_cb()</td>
+ * </tr>
+ * <tr>
+ *    <td>player_get_state()</td>
+ *    <td>ANY</td>
+ *    <td>-</td>
+ * </tr>
+ * <tr>
+ *    <td>player_set_uri()</td>
+ *    <td>IDLE</td>
+ *    <td>This function must be called before player_prepare() </td>
+ * </tr>
+ * <tr>
+ *    <td>player_set_memory_buffer()</td>
+ *    <td>IDLE</td>
+ *    <td>This function must be called before player_prepare() </td>
+ * </tr>
+ * <tr>
+ *    <td>player_set_subtitle_path()</td>
+ *    <td>IDLE</td>
+ *    <td>This function must be called before player_prepare() </td>
+ * </tr>
+ * <tr>
+ *    <td>player_set_volume()</td>
+ *    <td>IDLE/ READY/ PLAYING/ PAUSED</td>
+ *    <td>This function must be called after player_create()</td>
+ * </tr>
+ * <tr>
+ *    <td>player_get_volume()</td>
+ *    <td>IDLE/ READY/ PLAYING/ PAUSED</td>
+ *    <td>This function must be called after player_create()</td>
+ * </tr>
+ * <tr>
+ *    <td>player_set_sound_type()</td>
+ *    <td>IDLE</td>
+ *    <td>This function must be called after player_create()</td>
+ * </tr>
+ * <tr>
+ *    <td>player_set_mute()</td>
+ *    <td>IDLE/ READY/ PLAYING/ PAUSED</td>
+ *    <td>This function must be called after player_create()</td>
+ * </tr>
+ * <tr>
+ *    <td>player_is_muted()</td>
+ *    <td>IDLE/ READY/ PLAYING/ PAUSED</td>
+ *    <td>This function must be called after player_create()</td>
+ * </tr>
+ * <tr>
+ *    <td>player_set_looping()</td>
+ *    <td>IDLE/ READY/ PLAYING/ PAUSED</td>
+ *    <td>This function must be called after player_create()</td>
+ * </tr>
+ * <tr>
+ *    <td>player_is_looping()</td>
+ *    <td>IDLE/ READY/ PLAYING/ PAUSED</td>
+ *    <td>This function must be called after player_create()</td>
+ * </tr>
+ * <tr>
+ *    <td>player_get_duration()</td>
+ *    <td>PLAYING/ PAUSED</td>
+ *    <td>This function must be called after player_start()</td>
+ * </tr>
+ * <tr>
+ *    <td>player_set_display()</td>
+ *    <td>IDLE</td>
+ *    <td>This function must be called before player_prepare()</td>
+ * </tr>
+ * <tr>
+ *    <td>player_set_display_mode() <BR> player_set_display_visible()</td>
+ *    <td>IDLE/ READY/ PLAYING/ PAUSED</td>
+ *    <td>This function must be called after player_create()</td>
+ * </tr>
+  * <tr>
+ *    <td>player_get_display_rotation() <BR> player_is_display_visible()</td>
+ *    <td>IDLE/ READY/ PLAYING/ PAUSED</td>
+ *    <td>This function must be called after player_create()</td>
+ * </tr>
+ * <tr>
+ *    <td>player_get_video_size()</td>
+ *    <td>READY/ PLAYING/ PAUSED</td>
+ *    <td>This function must be called after player_prepare()</td>
+ * </tr>
+ * </table></div>
+ *
+ * @subsection CAPI_MEDIA_PLAYER_LIFE_CYCLE_ASYNCHRONOUS_OPERATIONS Asynchronous Operations
+ * All functions that change the player state are synchronous except player_prepare_async(), player_set_play_position(), and player_capture_video().
+ * Thus the result is passed to the application via the callback mechanism.
+ *
+ * @subsection CAPI_MEDIA_PLAYER_LIFE_CYCLE_CALLBACK_OPERATIONS Callback(Event) Operations
+ * <div><table class="doxtable" >
+ *     <tr>
+ *        <th><b>REGISTER</b></th>
+ *        <th><b>UNREGISTER</b></th>
+ *        <th><b>CALLBACK</b></th>
+ *        <th><b>DESCRIPTION</b></th>
+ *     </tr>
+ *              <tr>
+ *        <td>player_set_completed_cb()</td>
+ *        <td>player_unset_completed_cb()</td>
+ *        <td>player_completed_cb()</td>
+ *        <td>called when playback is completed </td>
+ *     </tr>
+ *              <tr>
+ *        <td>player_set_interrupted_cb()</td>
+ *        <td>player_unset_interrupted_cb()</td>
+ *        <td>player_interrupted_cb()</td>
+ *        <td>called when playback is interrupted by #player_interrupted_code_e </td>
+ *     </tr>
+ *              <tr>
+ *        <td>player_set_error_cb()</td>
+ *        <td>player_unset_error_cb()</td>
+ *        <td>player_error_cb()</td>
+ *        <td>called when an error has occurred</td>
+ *     </tr>
+ *              <tr>
+ *        <td>player_set_buffering_cb()</td>
+ *        <td>player_unset_buffering_cb()</td>
+ *        <td>player_buffering_cb()</td>
+ *        <td>called during content buffering </td>
+ *     </tr>
+ *              <tr>
+ *        <td>player_set_progressive_download_message_cb()</td>
+ *        <td>player_unset_progressive_download_message_cb()</td>
+ *        <td>player_pd_message_cb()</td>
+ *        <td>called when a progressive download starts or completes</td>
+ *     </tr>
+ *              <tr>
+ *        <td>player_set_subtitle_updated_cb()</td>
+ *        <td>player_unset_subtitle_updated_cb()</td>
+ *        <td>player_subtitle_updated_cb()</td>
+ *        <td>called when a subtitle updates </td>
+ *     </tr>
+ *              <tr>
+ *        <td>player_set_media_packet_video_frame_decoded_cb()</td>
+ *        <td>player_unset_media_packet_video_frame_decoded_cb()</td>
+ *        <td>player_media_packet_video_decoded_cb()</td>
+ *        <td>called when a video frame is decoded </td>
+ *     </tr>
+
+ *</table></div>
+ *
+ */
+
+
+/**
+ * @ingroup CAPI_MEDIA_PLAYER_MODULE
+ * @defgroup CAPI_MEDIA_PLAYER_DISPLAY_MODULE Display
+ * @brief The @ref CAPI_MEDIA_PLAYER_DISPLAY_MODULE API provides functions to control the display.
+ * @section CAPI_MEDIA_PLAYER_DISPLAY_MODULE_HEADER Required Header
+ *    \#include <player.h>
+ *
+ * @section CAPI_MEDIA_PLAYER_DISPLAY_MODULE_OVERVIEW Overview
+ * The API allows you to manage the display of the player.
+ * This API provides functions to set and get various display properties:
+ * - mode
+ * - rotation
+ * - visibility
+ *
+*/
+
+/**
+ * @ingroup CAPI_MEDIA_PLAYER_MODULE
+ * @defgroup CAPI_MEDIA_PLAYER_STREAM_INFO_MODULE Stream Information
+ * @brief The @ref CAPI_MEDIA_PLAYER_STREAM_INFO_MODULE API provides functions to get audio and video stream information, such as codec type, video width or height, bit rate, and so on.
+ * @section CAPI_MEDIA_PLAYER_AUDIO_EFFECT_MODULE_HEADER Required Header
+ *    \#include <player.h>
+ *
+ * @section CAPI_MEDIA_PLAYER_STREAM_INFO_MODULE_OVERVIEW Overview
+ * The Player stream information API allows you to get media stream information, including:
+ * - Content metadata, such as the tile, artist, album title and genre.
+ * - Audio stream information, such as audio codec type, sample rate, channels, and bit rate.
+ * - Video stream information, such as video codec type, video width and height.
+ *
+*/
+
+/**
+ * @ingroup CAPI_MEDIA_PLAYER_MODULE
+ * @defgroup CAPI_MEDIA_PLAYER_AUDIO_EFFECT_MODULE Audio Effect
+ * @brief The @ref CAPI_MEDIA_PLAYER_AUDIO_EFFECT_MODULE API provides functions to control the audio effect.
+ * @section CAPI_MEDIA_PLAYER_AUDIO_EFFECT_MODULE_HEADER Required Header
+ *    \#include <player.h>
+ *
+ * @section CAPI_MEDIA_PLAYER_AUDIO_EFFECT_MODULE_MODULE_OVERVIEW Overview
+ * The Audio effect API allows you to apply effects to the player:
+ * - Equalizer
+ *
+ *
+*/
+
+/**
+ * @ingroup CAPI_MEDIA_PLAYER_MODULE
+ * @defgroup CAPI_MEDIA_PLAYER_SUBTITLE_MODULE Subtitle
+ * @brief The @ref CAPI_MEDIA_PLAYER_SUBTITLE_MODULE API provides functions to control the subtitle.
+ * @section CAPI_MEDIA_PLAYER_SUBTITLE_MODULE_HEADER Required Header
+ *    \#include <player.h>
+ *
+ *
+*/
+
+#endif /* __TIZEN_MEDIA_PLAYER_DOC_H__ */
index 6df06de..a65d3ad 100644 (file)
 #define DEPRECATED __attribute__((deprecated))
 #endif
 
-
 #include <tizen.h>
 #include <sound_manager.h>
-//#include <media_packet.h> We are going to support new feature.
+#include <media_packet.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -65,10 +64,6 @@ typedef enum
  * @brief Enumeration for media player's error codes.
  * @since_tizen 2.3
  */
-
-/*
-PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE,PLAYER_ERROR_RESOURCE_LIMIT, PLAYER_ERROR_PERMISSION_DENIED are added. 
-*/
 typedef enum
 {
     PLAYER_ERROR_NONE   = TIZEN_ERROR_NONE,                                 /**< Successful */
@@ -106,8 +101,7 @@ typedef enum
     PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT,    /**< Interrupted by a resource conflict */
     PLAYER_INTERRUPTED_BY_ALARM,                /**< Interrupted by an alarm */
     PLAYER_INTERRUPTED_BY_EMERGENCY,            /**< Interrupted by an emergency */
-    PLAYER_INTERRUPTED_BY_RESUMABLE_MEDIA,      /**< Interrupted by resumable media application*/ //->will be deprecated
-   // PLAYER_INTERRUPTED_BY_NOTIFICATION,         /**< Interrupted by a notification */
+    PLAYER_INTERRUPTED_BY_NOTIFICATION,         /**< Interrupted by a notification */
 } player_interrupted_code_e;
 
 /**
@@ -126,11 +120,9 @@ typedef enum
  */
 typedef enum
 {
-  PLAYER_DISPLAY_TYPE_X11 = 0,                 /**< X surface display */ //--> will be deprecated
-  PLAYER_DISPLAY_TYPE_EVAS = 1,                /**< Evas image object surface display */ //--> will be deprecated
-  //PLAYER_DISPLAY_TYPE_OVERLAY = 0,    /**< Overlay surface display */
-  //PLAYER_DISPLAY_TYPE_EVAS,           /**< Evas image object surface display */
-  //PLAYER_DISPLAY_TYPE_NONE,           /**< This disposes off buffers */
+    PLAYER_DISPLAY_TYPE_OVERLAY = 0,    /**< Overlay surface display */
+    PLAYER_DISPLAY_TYPE_EVAS,           /**< Evas image object surface display */
+    PLAYER_DISPLAY_TYPE_NONE,           /**< This disposes off buffers */
 } player_display_type_e;
 
 /**
@@ -145,8 +137,8 @@ typedef enum
 } audio_latency_mode_e;
 
 /**
- * @brief Player display handle
- *
+ * @brief The player display handle.
+ * @since_tizen 2.3
  */
 typedef void* player_display_h;
 
@@ -156,8 +148,7 @@ typedef void* player_display_h;
  * @since_tizen 2.3
  */
 #include <stdint.h>
-#define GET_DISPLAY(x) ((void*)((intptr_t)(x))) //--> will be deprecated
-//#define GET_DISPLAY(x) (void*)(x)
+#define GET_DISPLAY(x) ((void*)((intptr_t)(x))) //solve cast pointer error for x86_64
 #endif
 
 /**
@@ -187,13 +178,12 @@ typedef enum
  */
 typedef enum
 {
-       PLAYER_DISPLAY_MODE_LETTER_BOX = 0,     /**< Letter box*/
-       PLAYER_DISPLAY_MODE_ORIGIN_SIZE,                /**< Origin size*/
-       PLAYER_DISPLAY_MODE_FULL_SCREEN,                /**< full-screen*/
-       PLAYER_DISPLAY_MODE_CROPPED_FULL,       /**< Cropped full-screen*/
-       PLAYER_DISPLAY_MODE_ORIGIN_OR_LETTER,   /**< Origin size (if surface size is larger than video size(width/height)) or Letter box (if video size(width/height) is larger than surface size)*/
-       PLAYER_DISPLAY_MODE_ROI,                        /**< ROI mode*/ //--> will be deprecated
-    //PLAYER_DISPLAY_MODE_DST_ROI,            /**< Dst ROI mode */
+    PLAYER_DISPLAY_MODE_LETTER_BOX = 0,     /**< Letter box */
+    PLAYER_DISPLAY_MODE_ORIGIN_SIZE,        /**< Origin size */
+    PLAYER_DISPLAY_MODE_FULL_SCREEN,        /**< Full-screen */
+    PLAYER_DISPLAY_MODE_CROPPED_FULL,       /**< Cropped full-screen */
+    PLAYER_DISPLAY_MODE_ORIGIN_OR_LETTER,   /**< Origin size (if surface size is larger than video size(width/height)) or Letter box (if video size(width/height) is larger than surface size) */
+    PLAYER_DISPLAY_MODE_DST_ROI,            /**< Dst ROI mode */
 } player_display_mode_e;
 
 /**
@@ -211,7 +201,7 @@ typedef enum
  */
 typedef enum
 {
-       PLAYER_CONTENT_INFO_ALBUM,      /**< Album */
+    PLAYER_CONTENT_INFO_ALBUM,      /**< Album */
     PLAYER_CONTENT_INFO_ARTIST,     /**< Artist */
     PLAYER_CONTENT_INFO_AUTHOR,     /**< Author */
     PLAYER_CONTENT_INFO_GENRE,      /**< Genre */
@@ -220,113 +210,9 @@ typedef enum
 } player_content_info_e;
 
 /**
- * @brief  Enumerations of media stream content information
- */
-typedef enum
-{
-  PLAYER_TRACK_TYPE_AUDIO,             /**< Audio Track */
-  PLAYER_TRACK_TYPE_VIDEO,             /**< Video Track */
-  PLAYER_TRACK_TYPE_TEXT,      /**< Text Track */
-} player_track_type_e DEPRECATED; // will be deprecated
-/**
- * @}
- */
-
-/**
- * @addtogroup CAPI_MEDIA_PLAYER_AUDIO_EFFECT_MODULE
- * @{
- */
-
-/**
- * @brief Enumerations of audio effect
- */
-typedef enum{
-       AUDIO_EFFECT_3D = 1,    /**< 3D effect */
-       AUDIO_EFFECT_BASS,              /**< Bass effect */
-       AUDIO_EFFECT_ROOM,              /**< Room effect */
-       AUDIO_EFFECT_REVERB,    /**< Reverberation effect */
-       AUDIO_EFFECT_CLARITY,   /**< Clarity effect */
-} audio_effect_e DEPRECATED; // will be deprecated
-
-/**
- * @brief Enumerations of preset audio effect
- */
-typedef enum{
-       AUDIO_EFFECT_PRESET_AUTO = 0,           /**< Auto */
-       AUDIO_EFFECT_PRESET_NONE,                       /**< None */
-       AUDIO_EFFECT_PRESET_POP,                        /**< POP */
-       AUDIO_EFFECT_PRESET_ROCK,                       /**< Rock */
-       AUDIO_EFFECT_PRESET_DANCE,                      /**< Dance */
-       AUDIO_EFFECT_PRESET_JAZZ,                       /**< Jazz */
-       AUDIO_EFFECT_PRESET_CLASSIC,            /**< Classic */
-       AUDIO_EFFECT_PRESET_VOCAL,                      /**< Vocal */
-       AUDIO_EFFECT_PRESET_BASS_BOOST,         /**< Bass boost */
-       AUDIO_EFFECT_PRESET_TREBLE_BOOST,       /**< Treble boost */
-       AUDIO_EFFECT_PRESET_MTHEATER,           /**< Theater */
-       AUDIO_EFFECT_PRESET_EXTERNALIZATION,/**< Externalization */
-       AUDIO_EFFECT_PRESET_CAFE,                       /**< Cafe */
-       AUDIO_EFFECT_PRESET_CONCERT_HALL,       /**< Concert Hall */
-       AUDIO_EFFECT_PRESET_VOICE,                      /**< Voice */
-       AUDIO_EFFECT_PRESET_MOVIE,                      /**< Movie */
-       AUDIO_EFFECT_PRESET_VIRTUAL_5_1,        /**< Virtual 5.1 */
-       AUDIO_EFFECT_PRESET_HIPHOP,                     /**< HipHop */
-       AUDIO_EFFECT_PRESET_RNB,                        /**< R&B */
-       AUDIO_EFFECT_PRESET_FLAT,                       /**< Flat */
-} audio_effect_preset_e DEPRECATED; // will be deprecated
-
-/**
- * @brief      Called once for each supported audio effect.
- * @param[in] effect  The audio effect
- * @param[in] user_data The user data passed from the foreach function
- * @return     @c true to continue with the next iteration of the loop, \n @c false to break outsp of the loop.
- * @pre        player_audio_effect_foreach_supported_effect() will invoke this callback.
- * @see        player_audio_effect_foreach_supported_effect()
- */
-typedef bool (*player_audio_effect_supported_effect_cb)(audio_effect_e effect, void *user_data) DEPRECATED;
-
-/**
- * @brief      Called once for each supported preset audio effect.
- * @param[in] preset  The preset audio effect
- * @param[in] user_data The user data passed from the foreach function
- * @return     @c true to continue with the next iteration of the loop, \n @c false to break outsp of the loop.
- * @pre        player_audio_effect_foreach_supported_preset() will invoke this callback.
- * @see        player_audio_effect_foreach_supported_preset()
- */
-typedef bool (*player_audio_effect_supported_preset_cb)(audio_effect_preset_e preset, void *user_data) DEPRECATED;
-
-/**
  * @}
  */
 
-/**
- * @addtogroup CAPI_MEDIA_PLAYER_X11_DISPLAY_MODULE
- * @{
- */
-
-/**
- * @internal
- * @brief  Called when the media player needs updated xid.
- * @remarks If current display type is not #PLAYER_DISPLAY_TYPE_X11, no operation is performed.
- * @param[in]   user_data  The user data passed from the callback registration function
- * @pre It will be invoked when player needs updated xid if you register this callback using player_set_x11_display_pixmap()
- * @return     The updated xid
- * @see player_set_x11_display_pixmap()
- */
-typedef unsigned int (*player_x11_pixmap_updated_cb)(void *user_data) DEPRECATED;
-
-/**
- * @internal
- * @brief  Called when the media player needs to inform rendering error.
- * @remarks If current display type is not #PLAYER_DISPLAY_TYPE_X11, no operation is performed.
- * @param[in]   pixmap_id  The pixmap_id where the rendering error is occurred
- * @param[in]   user_data  The user data passed from the callback registration function
- * @see player_set_x11_display_pixmap_error_cb()
- */
-typedef void (*player_x11_pixmap_error_cb)(unsigned int *pixmap_id, void *user_data) DEPRECATED;
-
-/**
- * @}
- */
 
 /**
  * @addtogroup CAPI_MEDIA_PLAYER_SUBTITLE_MODULE
@@ -449,30 +335,7 @@ typedef void (*player_video_captured_cb)(unsigned char *data, int width, int hei
  * @param[in] pkt Reference pointer to the media packet
  * @param[in] user_data The user data passed from the callback registration function
  */
-//typedef void (*player_media_packet_video_decoded_cb)(media_packet_h pkt, void *user_data);
-
-/**
- * @brief  Called when the video frame is decoded.
- * @remarks The color space format of the captured image is #IMAGE_UTIL_COLORSPACE_RGB888.
- * @param[in]   data   The decoded video frame data
- * @param[in]   width  The width of video frame
- * @param[in]   height The height of video frame
- * @param[in]   size   The size of video frame
- * @param[in]   user_data      The user data passed from the callback registration function
- * @see player_set_video_frame_decoded_cb()
- * @see player_unset_video_frame_decoded_cb()
- */
-typedef void (*player_video_frame_decoded_cb)(unsigned char *data, int width, int height, unsigned int size, void *user_data) DEPRECATED;
-
-/**
- * @brief  Called when the audio frame is decoded.
- * @param[in]   data   The decoded audio frame data
- * @param[in]   size   The size of audio frame
- * @param[in]   user_data      The user data passed from the callback registration function
- * @see player_set_audio_frame_decoded_cb()
- * @see player_unset_audio_frame_decoded_cb()
- */
-typedef void (*player_audio_frame_decoded_cb)(unsigned char *data, unsigned int size, void *user_data) DEPRECATED;
+typedef void (*player_media_packet_video_decoded_cb)(media_packet_h pkt, void *user_data);
 
 /**
  * @brief Creates a player handle for playing multimedia content.
@@ -800,46 +663,6 @@ int player_pause(player_h player);
 
 /**
  * @brief Sets the seek position for playback, asynchronously.
- * @param[in] player The handle to media player
- * @param[in] millisecond The position in milliseconds from the start to seek to
- * @param[in] callback The callback function to register
- * @param[in] user_data        The user data to be passed to the callback function
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @retval #PLAYER_ERROR_SEEK_FAILED Seek operation failure
- * @pre The player state must be one of these: #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
- * @post It invokes player_seek_completed_cb() when seek operation completes, if you set a callback.
- * @see player_get_position()
- * @see player_get_position_ratio()
- * @see player_set_position_ratio()
- */
-int player_set_position(player_h player, int millisecond, player_seek_completed_cb callback, void *user_data) DEPRECATED;
-
-/**
- * @brief Sets the seek position for playback, asynchronously.
- * @param[in] player The handle to media player
- * @param[in] millisecond The position in milliseconds from the start to seek to
- * @param[in] accurate if true, the position selected will be returned but, this might be considerably slow.
- * @param[in] callback The callback function to register
- * @param[in] user_data        The user data to be passed to the callback function
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @retval #PLAYER_ERROR_SEEK_FAILED Seek operation failure
- * @pre The player state must be one of these: #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
- * @post It invokes player_seek_completed_cb() when seek operation completes, if you set a callback.
- * @see player_get_position()
- * @see player_get_position_ratio()
- * @see player_set_position_ratio()
- */
-int player_seek(player_h player, int millisecond, bool accurate, player_seek_completed_cb callback, void *user_data) DEPRECATED;
-
-
-/**
- * @brief Sets the seek position for playback, asynchronously.
  * @since_tizen 2.3
  * @param[in] player The handle to the media player
  * @param[in] millisecond The position in milliseconds from the start to the seek point
@@ -857,42 +680,7 @@ int player_seek(player_h player, int millisecond, bool accurate, player_seek_com
  * @post It invokes player_seek_completed_cb() when seek operation completes, if you set a callback.
  * @see player_get_play_position()
  */
-//int player_set_play_position(player_h player, int millisecond, bool accurate, player_seek_completed_cb callback, void *user_data);
-
-/**
- * @brief Sets the playback position specified by percent of media content played, asynchronously.
- * @param[in] player The handle to media player
- * @param[in] percent The position in percentage from the start to seek to. \n The position is relative to content. (length, 0 = beginning, 100 = end)
- * @param[in] callback The callback function to register
- * @param[in] user_data        The user data to be passed to the callback function
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @retval #PLAYER_ERROR_SEEK_FAILED Seek operation failure
- * @pre The player state must be one of these: #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
- * @post It invokes player_seek_completed_cb() when seek operation completes, if you set a callback.
- * @see player_get_position()
- * @see player_get_position_ratio()
- * @see player_set_position()
- */
-int player_set_position_ratio(player_h player, int percent, player_seek_completed_cb callback, void *user_data) DEPRECATED;
-
-/**
- * @brief Gets current position in milliseconds.
- * @param[in]   player The handle to media player
- * @param[out]  millisecond The current position in milliseconds
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @retval #PLAYER_ERROR_SEEK_FAILED Seek operation failure
- * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
- * @see player_get_position_ratio()
- * @see player_set_position()
- * @see player_set_position_ratio()
- */
-int player_get_position(player_h player, int *millisecond) DEPRECATED;
+int player_set_play_position(player_h player, int millisecond, bool accurate, player_seek_completed_cb callback, void *user_data);
 
 /**
  * @brief Gets the current position in milliseconds.
@@ -908,23 +696,7 @@ int player_get_position(player_h player, int *millisecond) DEPRECATED;
  * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
  * @see player_set_play_position()
  */
-//int player_get_play_position(player_h player, int *millisecond);
-
-/**DEPRECATED
- * @brief Gets the playback position specified by percent of media content played.
- * @param[in]   player The handle to media player
- * @param[out]  percent The current position in percentage [0, 100]
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @retval #PLAYER_ERROR_SEEK_FAILED Seek operation failure
- * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
- * @see player_get_position()
- * @see player_set_position()
- * @see player_set_position_ratio()
- */
-int player_get_position_ratio(player_h player, int *percent) DEPRECATED;
+int player_get_play_position(player_h player, int *millisecond);
 
 /**
  * @brief Sets the player's mute status.
@@ -1021,18 +793,6 @@ int player_is_looping(player_h player, bool *looping);
 int player_set_display(player_h player, player_display_type_e type, player_display_h display);
 
 /**
- * @brief Gets the availability of display mode change
- * @remark The result can be changed by display setting.
- * @param[in] player The handle to media player
- * @param[out] changeable The cuurent availability of display mode change (@c true = changeable, @c false = non-changeable )
- * @return 0 on success, otherwise a negative error value.
- * @retval  #PLAYER_ERROR_NONE Successful
- * @retval  #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @see        player_set_display_mode()
- */
-int player_is_display_mode_changeable(player_h player, bool* changeable) DEPRECATED;
-
-/**
  * @}
  */
 
@@ -1073,19 +833,6 @@ int player_get_display_mode(player_h player, player_display_mode_e *mode);
 
 /**
  * @brief Sets the visibility of the x surface video display
- * @remarks If current display type is not #PLAYER_DISPLAY_TYPE_X11, no operation is performed.
- * @param[in] player   The handle to media player
- * @param[in] rotation The visibility of display (@c true = visible, @c false = non-visible )
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_STATE Invalid state
- * @see        player_is_x11_display_visible()
- */
-int player_set_x11_display_visible(player_h player, bool visible) DEPRECATED;
-
-/**
- * @brief Sets the visibility of the x surface video display
  * @since_tizen 2.3
  * @param[in] player   The handle to the media player
  * @param[in] visible The visibility of the display (@c true = visible, @c false = non-visible )
@@ -1096,19 +843,7 @@ int player_set_x11_display_visible(player_h player, bool visible) DEPRECATED;
  * @retval #PLAYER_ERROR_INVALID_STATE Invalid state
  * @see        player_is_display_visible()
  */
-//int player_set_display_visible(player_h player, bool visible);
-
-/**
- * @brief Gets a visibility of the x surface video display
- * @remarks If current display type is not #PLAYER_DISPLAY_TYPE_X11, no operation is performed.
- * @param[in] player The handle to media player
- * @param[out] visible The current visibility of display (@c true = visible, @c false = non-visible )
- * @return 0 on success, otherwise a negative error value.
- * @retval  #PLAYER_ERROR_NONE Successful
- * @retval  #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @see        player_set_x11_display_visible()
- */
-int player_is_x11_display_visible(player_h player, bool* visible) DEPRECATED;
+int player_set_display_visible(player_h player, bool visible);
 
 /**
  * @brief Gets the visibility of the x surface video display.
@@ -1121,21 +856,7 @@ int player_is_x11_display_visible(player_h player, bool* visible) DEPRECATED;
  * @retval  #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
  * @see        player_set_display_visible()
  */
-//int player_is_display_visible(player_h player, bool* visible);
-
-/**
- * @brief Sets the rotation settings of the x surface video display
- * @details Use this function to change the video orientation to portrait mode.
- * @remarks If current display type is not #PLAYER_DISPLAY_TYPE_X11, no operation is performed.
- * @param[in] player   The handle to media player
- * @param[in] rotation The rotation of display
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_STATE Invalid state
- * @see  player_get_x11_display_rotation()
- */
-int player_set_x11_display_rotation(player_h player, player_display_rotation_e rotation) DEPRECATED;
+int player_is_display_visible(player_h player, bool* visible);
 
 /**
  * @brief Sets the rotation settings of the video surface display.
@@ -1153,19 +874,7 @@ int player_set_x11_display_rotation(player_h player, player_display_rotation_e r
  * @see  player_set_display
  * @see  player_get_display_rotation()
  */
-//int player_set_display_rotation(player_h player, player_display_rotation_e rotation);
-
-/**
- * @brief Gets a rotation of the x surface video display
- * @remarks If current display type is not #PLAYER_DISPLAY_TYPE_X11, no operation is performed.
- * @param[in] player The handle to media player
- * @param[out] rotation The current rotation of display
- * @return 0 on success, otherwise a negative error value.
- * @retval  #PLAYER_ERROR_NONE Successful
- * @retval  #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @see        player_set_x11_display_rotation()
- */
-int player_get_x11_display_rotation( player_h player, player_display_rotation_e *rotation) DEPRECATED;
+int player_set_display_rotation(player_h player, player_display_rotation_e rotation);
 
 /**
  * @brief Gets the rotation of the video surface display.
@@ -1178,97 +887,7 @@ int player_get_x11_display_rotation( player_h player, player_display_rotation_e
  * @retval  #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
  * @see     player_set_display_rotation()
  */
-//int player_get_display_rotation( player_h player, player_display_rotation_e *rotation);
-
-/**
- * @brief Sets the zoom level of the x surface video display
- * @remarks If current display type is not #PLAYER_DISPLAY_TYPE_X11, no operation is performed.
- * @param[in] player   The handle to media player
- * @param[in] level The level of zoom [1~9]
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_STATE Invalid state
- * @see  player_get_x11_display_zoom()
- */
-int player_set_x11_display_zoom(player_h player, int level) DEPRECATED;
-
-/**
- * @brief Gets a zoom level of the x surface video display
- * @remarks If current display type is not #PLAYER_DISPLAY_TYPE_X11, no operation is performed.
- * @param[in] player The handle to media player
- * @param[out] level The level of zoom [1~9]
- * @return 0 on success, otherwise a negative error value.
- * @retval  #PLAYER_ERROR_NONE Successful
- * @retval  #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @see        player_set_x11_display_zoom()
- */
-int player_get_x11_display_zoom( player_h player, int *level) DEPRECATED;
-
-/**
- * @internal
- * @brief Registers a callback function to be invoked when player need updated xid.
- * @param[in] player   The handle to media player
- * @param[in] callback The callback function to register
- * @param[in] user_data        The user data to be passed to the callback function
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @pre The player state must be either #PLAYER_STATE_IDLE by player_create() or #PLAYER_STATE_READY by player_prepare().
- * @post  player_set_x11_display_pixmap() will be invoked
- * @see player_set_x11_display_pixmap()
- */
-int player_set_x11_display_pixmap (player_h player, player_x11_pixmap_updated_cb callback, void *user_data) DEPRECATED;
-
-/**
- * @internal
- * @brief Registers a callback function to be invoked when failure of rendering video frame happen.
- * @param[in] player   The handle to media player
- * @param[in] callback The callback function to register
- * @param[in] user_data        The user data to be passed to the callback function
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_STATE Invalid state
- * @pre The player state must be either #PLAYER_STATE_IDLE by player_create() or #PLAYER_STATE_READY by player_prepare().
- * @post  player_set_x11_display_pixmap_error_cb() will be invoked
- * @see player_set_x11_display_pixmap_error_cb()
- */
-int player_set_x11_display_pixmap_error_cb (player_h player, player_x11_pixmap_error_cb callback, void *user_data) DEPRECATED;
-
-/**
- * @brief Sets information of ROI
- * @remarks If current display mode is not #PLAYER_DISPLAY_MODE_ROI, #PLAYER_ERROR_INVALID_OPERATION will be returned.
- * @param[in] player   The handle to media player
- * @param[in] x The x coordinate of ROI
- * @param[in] y The y coordinate of ROI
- * @param[in] w The width of ROI
- * @param[in] h The height of ROI
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_STATE Invalid state
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @see  player_get_x11_display_roi()
- */
-int player_set_x11_display_roi (player_h player, int x, int y, int w, int h) DEPRECATED;
-
-/**
- * @brief Gets information of ROI
- * @remarks If current display mode is not #PLAYER_DISPLAY_MODE_ROI, #PLAYER_ERROR_INVALID_OPERATION will be returned.
- * @param[in] player   The handle to media player
- * @param[out] x The x coordinate of ROI
- * @param[out] y The y coordinate of ROI
- * @param[out] w The width of ROI
- * @param[out] h The height of ROI
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_STATE Invalid state
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @see  player_set_x11_display_roi()
- */
-int player_get_x11_display_roi (player_h player, int *x, int *y, int *w, int *h) DEPRECATED;
+int player_get_display_rotation( player_h player, player_display_rotation_e *rotation);
 
 /**
  * @}
@@ -1276,29 +895,6 @@ int player_get_x11_display_roi (player_h player, int *x, int *y, int *w, int *h)
 
 
 /**
- * @addtogroup CAPI_MEDIA_PLAYER_EVAS_DISPLAY_MODULE
- * @{
- */
-
-/**
- * @brief Sets the evas surface video display scaling status.
- * @remarks If current display type is not #PLAYER_DISPLAY_TYPE_EVAS, no operation is performed.
- * @remarks If the scaling status is @c false, player_is_display_mode_changeable() always return @a false.
- * @param[in]   player The handle to media player
- * @param[in]   enable New evas surface video display scaling status: (@c true = scaling, @c false = not scaled)
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
- */
-int player_enable_evas_display_scaling(player_h player, bool enable) DEPRECATED;
-
-/**
- * @}
- */
-
-/**
  * @addtogroup CAPI_MEDIA_PLAYER_STREAM_INFO_MODULE
  * @{
  */
@@ -1438,21 +1034,6 @@ int player_get_album_art(player_h player, void **album_art, int *size);
  */
 int player_get_duration(player_h player, int *duration);
 
-
-/**
- * @brief Gets the track count
- * @param[in] player The handle to media player
- * @param [in] type The track type
- * @param [out] count The count of track
- * @return 0 on success, otherwise a negative error value
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
- * @pre The player state must be one of these: #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
- */
-int player_get_track_count(player_h player, player_track_type_e type, int *count) DEPRECATED;
-
 /**
  * @}
  */
@@ -1464,136 +1045,6 @@ int player_get_track_count(player_h player, player_track_type_e type, int *count
  */
 
 /**
- * @brief Sets an audio effect value.
- * @param[in] player The handle to media player
- * @param[in] effect The audio effect type
- * @param[in] value The value of given effect type
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
- * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
- * @see player_audio_effect_get_value()
- * @see player_audio_effect_clear()
- * @see player_audio_effect_get_value_range()
- */
-int player_audio_effect_set_value(player_h player, audio_effect_e effect, int value) DEPRECATED;
-
-/**
- * @brief Gets an audio effect value.
- * @param[in] player The handle to media player
- * @param[in] effect The audio effect type
- * @param[out] value The value of given effect type
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
- * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
- * @see player_audio_effect_set_value()
- */
-int player_audio_effect_get_value(player_h player, audio_effect_e effect, int *value) DEPRECATED;
-
-/**
- * @brief Clears audio effect.
- * @param[in] player The handle to media player
- * @param[in] effect The audio effect type
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
- * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
- * @see player_audio_effect_set_value()
- */
-int player_audio_effect_clear(player_h player, audio_effect_e effect) DEPRECATED;
-
-/**
- * @brief Gets the range of audio effect value.
- * @param[in] player The handle to media player
- * @param[in] effect The audio effect type
- * @param[out] min The minumum value to be set
- * @param[out] max The maximum value to be set
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
- * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
- * @see player_audio_effect_set_value()
- */
-int player_audio_effect_get_value_range(player_h player, audio_effect_e effect, int* min, int* max) DEPRECATED;
-
-/**
- * @brief Checks whether the given effect is avaliable or not.
- * @param[in] player The handle to media player
- * @param[in] effect The audio effect to be checked
- * @param[out] available @c true if the specified audio effect is available, else @c false
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
- * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
- */
-int player_audio_effect_is_available(player_h player, audio_effect_e effect, bool *available) DEPRECATED;
-
-/**
- * @brief Retrieves all supported audio effects by invoking callback function once for each supported audio effect.
- * @param[in] player The handle to media player
- * @param[in] callback    The callback function to invoke
- * @param[in] user_data        The user data to be passed to the callback function
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
- * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
- * @post       This function invokes player_audio_effect_supported_effect_cb() repeatly to retrieve each supported audio effect.
- * @see        player_audio_effect_set_value()
- * @see        player_audio_effect_get_value()
- * @see        player_audio_effect_foreach_supported_effect()
- */
-int player_audio_effect_foreach_supported_effect(player_h player, player_audio_effect_supported_effect_cb callback, void *user_data) DEPRECATED;
-
-/**
- * @brief Sets an preset audio effect.
- * @remarks Audio effects or equalizer which is set be ignored.
- * @param[in] player The handle to media player
- * @param[in] preset The preset audio effect
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
- * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
- * @see player_audio_effect_preset_is_available()
- * @see player_audio_effect_foreach_supported_preset()
- */
-int player_audio_effect_set_preset(player_h player, audio_effect_preset_e preset) DEPRECATED;
-
-/**
- * @brief Checks whether the given preset is avaliable or not.
- * @param[in] player The handle to media player
- * @param[in] preset The preset to be checked
- * @param[out] available @c true if the specified preset is available, else @c false
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
- * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
- */
-int player_audio_effect_preset_is_available(player_h player, audio_effect_preset_e preset, bool *available) DEPRECATED;
-
-/**
- * @brief Retrieves all supported presets by invoking callback function once for each supported preset audio effect.
- * @param[in] player The handle to media player
- * @param[in] callback    The callback function to invoke
- * @param[in] user_data        The user data to be passed to the callback function
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
- * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
- * @post       This function invokes player_audio_effect_supported_preset_cb() repeatly to retrieve each supported preset audio effect.
- * @see        player_audio_effect_set_preset()
- * @see        player_audio_effect_supported_preset_cb()
- */
-int player_audio_effect_foreach_supported_preset(player_h player, player_audio_effect_supported_preset_cb callback, void *user_data) DEPRECATED;
-/**
  * @brief Gets the number of equalizer bands.
  * @since_tizen 2.3
  * @param[in] player The handle to the media player
@@ -2084,21 +1535,6 @@ int player_set_subtitle_updated_cb(player_h player, player_subtitle_updated_cb c
 int player_unset_subtitle_updated_cb(player_h player);
 
 /**
- * @brief Sets the seek position for subtitle.
- * @remarks Only MicroDVD/SubViewer(*.sub), SAMI(*.smi), and SubRip(*.srt) subtitle formats are supported.
- * @param[in]  player The handle to media player
- * @param[in]  millisecond The position in milliseconds from the start to seek to
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
- * @pre The subtitle must be set by player_set_subtitle_path().
- * @pre The player state must be one of: #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
- */
-int player_set_subtitle_position(player_h player, int millisecond) DEPRECATED;
-
-/**
  * @internal
  * @brief Sets the seek position for the subtitle.
  * @since_tizen 2.3
@@ -2114,7 +1550,7 @@ int player_set_subtitle_position(player_h player, int millisecond) DEPRECATED;
  * @pre The subtitle must be set by calling player_set_subtitle_path().
  * @pre The player state must be one of these: #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED.
  */
-//int player_set_subtitle_position_offset(player_h player, int millisecond);
+int player_set_subtitle_position_offset(player_h player, int millisecond);
 
 /**
  * @brief Registers a media packet video callback function to be called once per frame.
@@ -2136,7 +1572,7 @@ int player_set_subtitle_position(player_h player, int millisecond) DEPRECATED;
  * @pre        The player's state should be #PLAYER_STATE_IDLE. And, #PLAYER_DISPLAY_TYPE_NONE should be set by calling player_set_display.
  * @see player_unset_media_packet_video_frame_decoded_cb
  */
-//int player_set_media_packet_video_frame_decoded_cb(player_h player, player_media_packet_video_decoded_cb callback, void *user_data);
+int player_set_media_packet_video_frame_decoded_cb(player_h player, player_media_packet_video_decoded_cb callback, void *user_data);
 
 /**
  * @brief Unregisters the callback function.
@@ -2148,64 +1584,7 @@ int player_set_subtitle_position(player_h player, int millisecond) DEPRECATED;
  * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
  * @see player_set_media_packet_video_frame_decoded_cb()
  */
-//int player_unset_media_packet_video_frame_decoded_cb(player_h player);
-
-
-/**
- * @brief Registers a callback function to be invoked when video frame is decoded.
- * @param[in] player   The handle to media player
- * @param[in] callback The callback function to register
- * @param[in] user_data        The user data to be passed to the callback function
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @pre The player state must be #PLAYER_STATE_IDLE by player_create() or player_unprepare().
- * @post  player_video_frame_decoded_cb() will be invoked
- * @see player_unset_video_frame_decoded_cb()
- * @see player_video_frame_decoded_cb()
- */
-int player_set_video_frame_decoded_cb(player_h player, player_video_frame_decoded_cb callback, void *user_data) DEPRECATED;
-
-/**
- * @brief Unregisters the callback function.
- * @param[in] player The handle to media player
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @see player_set_video_frame_decoded_cb()
- */
-int player_unset_video_frame_decoded_cb(player_h player) DEPRECATED;
-
-/**
- * @brief Registers a callback function to be invoked when audio frame is decoded.
- * @param[in] player   The handle to media player
- * @param[in] start The start position to decode.
- * @param[in] end      The end position to decode.
- * @param[in] callback The callback function to register
- * @param[in] user_data        The user data to be passed to the callback function
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @pre The player state must be #PLAYER_STATE_IDLE by player_create() or player_unprepare().
- * @post  player_audio_frame_decoded_cb() will be invoked
- * @see player_unset_audio_frame_decoded_cb()
- * @see player_audio_frame_decoded_cb()
- */
-int player_set_audio_frame_decoded_cb(player_h player, int start, int end, player_audio_frame_decoded_cb callback, void *user_data) DEPRECATED;
-
-/**
- * @brief Unregisters the callback function.
- * @param[in] player The handle to media player
- * @return 0 on success, otherwise a negative error value.
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @see player_set_audio_frame_decoded_cb()
- */
-int player_unset_audio_frame_decoded_cb(player_h player) DEPRECATED;
+int player_unset_media_packet_video_frame_decoded_cb(player_h player);
 
 /**
  * @}
index 7466ab2..fbdae85 100644 (file)
 extern "C" {
 #endif
 
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+#define LOG_TAG "TIZEN_N_PLAYER"
+
+#define PLAYER_CHECK_CONDITION(condition,error,msg)     \
+                if(condition) {} else \
+                { LOGE("[%s] %s(0x%08x)",__FUNCTION__, msg,error); return error;}; \
+
+#define PLAYER_INSTANCE_CHECK(player)   \
+        PLAYER_CHECK_CONDITION(player != NULL, PLAYER_ERROR_INVALID_PARAMETER,"PLAYER_ERROR_INVALID_PARAMETER")
+
+#define PLAYER_STATE_CHECK(player,expected_state)       \
+        PLAYER_CHECK_CONDITION(player->state == expected_state,PLAYER_ERROR_INVALID_STATE,"PLAYER_ERROR_INVALID_STATE")
+
+#define PLAYER_NULL_ARG_CHECK(arg)      \
+        PLAYER_CHECK_CONDITION(arg != NULL,PLAYER_ERROR_INVALID_PARAMETER,"PLAYER_ERROR_INVALID_PARAMETER")
+
+#define PLAYER_RANGE_ARG_CHECK(arg, min, max)      \
+        PLAYER_CHECK_CONDITION(arg <= max,PLAYER_ERROR_INVALID_PARAMETER,"PLAYER_ERROR_INVALID_PARAMETER")             \
+        PLAYER_CHECK_CONDITION(arg >= min,PLAYER_ERROR_INVALID_PARAMETER,"PLAYER_ERROR_INVALID_PARAMETER")
+
 typedef enum {
        _PLAYER_EVENT_TYPE_PREPARE,
        _PLAYER_EVENT_TYPE_COMPLETE,
@@ -32,8 +54,7 @@ typedef enum {
        _PLAYER_EVENT_TYPE_SUBTITLE,
        _PLAYER_EVENT_TYPE_CAPTURE,
        _PLAYER_EVENT_TYPE_SEEK,
-    //_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME,
-       _PLAYER_EVENT_TYPE_VIDEO_FRAME,
+       _PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME,
        _PLAYER_EVENT_TYPE_AUDIO_FRAME,
        _PLAYER_EVENT_TYPE_VIDEO_FRAME_RENDER_ERROR,
        _PLAYER_EVENT_TYPE_PD,
@@ -55,8 +76,15 @@ typedef struct _player_s{
        bool is_display_visible;
        bool is_progressive_download;
        pthread_t prepare_async_thread;
+       GHashTable *ecore_jobs;
+       player_error_e error_code;
+       bool is_doing_jobs;
+       media_format_h pkt_fmt;
 } player_s;
 
+int __player_convert_error_code(int code, char* func_name);
+bool __player_state_validate(player_s * handle, player_state_e threshold);
+
 #ifdef __cplusplus
 }
 #endif
index 388b6fe..5e6e084 100644 (file)
@@ -10,11 +10,12 @@ License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
 Source1001:    capi-media-player.manifest
 BuildRequires:  cmake
+BuildRequires:  pkgconfig(gstreamer-1.0)
+BuildRequires:  pkgconfig(gstreamer-plugins-base-1.0)
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(mm-player)
 BuildRequires:  pkgconfig(capi-base-common)
 BuildRequires:  pkgconfig(capi-media-sound-manager)
-BuildRequires:  pkgconfig(mm-ta)
 BuildRequires:  pkgconfig(appcore-efl)
 BuildRequires:  pkgconfig(elementary)
 BuildRequires:  pkgconfig(ecore)
@@ -25,6 +26,8 @@ BuildRequires:  pkgconfig(ecore-x)
 %if %{with wayland}
 BuildRequires:  pkgconfig(ecore-wayland)
 %endif
+BuildRequires:  pkgconfig(capi-media-tool)
+BuildRequires:  pkgconfig(libtbm)
 
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
@@ -47,6 +50,12 @@ cp %{SOURCE1001} .
 
 
 %build
+%if 0%{?sec_build_binary_debug_enable}
+export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
+#export CFLAGS+=" -D_USE_X_DIRECT_"
+export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
+export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
+%endif
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
 %if %{with wayland}
@@ -60,7 +69,6 @@ MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
          -DX11_SUPPORT=Off
 %endif
 
-
 make %{?jobs:-j%jobs}
 
 %install
@@ -69,6 +77,8 @@ mkdir -p %{buildroot}/usr/share/license
 mkdir -p %{buildroot}/usr/bin
 cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
 cp test/player_test %{buildroot}/usr/bin
+#cp test/player_media_packet_test %{buildroot}/usr/bin
+
 %make_install
 
 %post -p /sbin/ldconfig
index 97036c0..4349f4e 100644 (file)
 #include <player.h>
 #include <player_private.h>
 #include <dlog.h>
-#include <mm_ta.h>
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-#define LOG_TAG "TIZEN_N_PLAYER"
-
-/*
-* Internal Macros
-*/
-
-#define PLAYER_CHECK_CONDITION(condition,error,msg)    \
-               if(condition) {} else \
-               { LOGE("[%s] %s(0x%08x)",__FUNCTION__, msg,error); return error;}; \
-
-#define PLAYER_INSTANCE_CHECK(player)  \
-       PLAYER_CHECK_CONDITION(player != NULL, PLAYER_ERROR_INVALID_PARAMETER,"PLAYER_ERROR_INVALID_PARAMETER")
-
-#define PLAYER_STATE_CHECK(player,expected_state)      \
-       PLAYER_CHECK_CONDITION(player->state == expected_state,PLAYER_ERROR_INVALID_STATE,"PLAYER_ERROR_INVALID_STATE")
-
-#define PLAYER_NULL_ARG_CHECK(arg)     \
-       PLAYER_CHECK_CONDITION(arg != NULL,PLAYER_ERROR_INVALID_PARAMETER,"PLAYER_ERROR_INVALID_PARAMETER")
+#include <Evas.h>
+#include <Ecore.h>
+#include <Elementary.h>
+#include <Ecore.h>
+#include <tbm_bufmgr.h>
+#include <tbm_surface_internal.h>
+#include <gst/gst.h>
+
+#define __JOB_KEY_PREPARED             "prepared"
+#define __JOB_KEY_ERROR                "error"
+#define __JOB_KEY_SEEK_DONE    "seek_done"
+#define __JOB_KEY_EOS                  "eos"
+
+#define __RELEASEIF_PREPARE_THREAD(thread_id) \
+       do { \
+               if (thread_id) \
+               { \
+                       pthread_join(thread_id, NULL); \
+                       thread_id = 0; \
+                       LOGI("prepare thread released\n"); \
+               } \
+       }while(0)
+
+#define __DELETE_ECORE_ITEM(ecore_job) \
+       do { \
+               if (ecore_job) \
+               { \
+                       ecore_job_del(ecore_job); \
+                       ecore_job = NULL; \
+               } \
+       }while(0)
+
+#define        __ADD_ECORE_JOB(handle, key, job_callback)      \
+       do \
+       {       \
+               Ecore_Job *job = NULL; \
+               job = ecore_job_add(job_callback, (void *)handle); \
+               LOGI("adding %s job - %p\n", key, job); \
+               g_hash_table_insert(handle->ecore_jobs, g_strdup(key), job); \
+       \
+       } while(0)
+
+#define        __REMOVE_ECORE_JOB(handle, job_key) \
+       do \
+       {       \
+               LOGI("%s done so, remove\n", job_key); \
+               g_hash_table_remove(handle->ecore_jobs, job_key); \
+               handle->is_doing_jobs = FALSE;  \
+       } while(0)
 
 /*
 * Internal Implementation
 */
-static int __convert_error_code(int code, char* func_name)
+int __player_convert_error_code(int code, char* func_name)
 {
        int ret = PLAYER_ERROR_INVALID_OPERATION;
        char* msg="PLAYER_ERROR_INVALID_OPERATION";
@@ -85,14 +111,14 @@ static int __convert_error_code(int code, char* func_name)
                case MM_ERROR_PLAYER_INVALID_STREAM:
                case MM_ERROR_PLAYER_STREAMING_FAIL:
                case MM_ERROR_PLAYER_NO_OP:
-               case MM_ERROR_NOT_SUPPORT_API:
                        ret = PLAYER_ERROR_INVALID_OPERATION;
                        msg = "PLAYER_ERROR_INVALID_OPERATION";
                        break;
                case MM_ERROR_PLAYER_SOUND_EFFECT_INVALID_STATUS:
+               case MM_ERROR_NOT_SUPPORT_API:
                case MM_ERROR_PLAYER_SOUND_EFFECT_NOT_SUPPORTED_FILTER:
-                       ret = PLAYER_ERROR_INVALID_OPERATION;
-                       msg = "PLAYER_ERROR_INVALID_OPERATION (NOT SUPPORTED AUDIO EFFECT)";
+                       ret =PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE;
+                       msg = "PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE";
                        break;
                case  MM_ERROR_PLAYER_NO_FREE_SPACE:
                        ret = PLAYER_ERROR_FILE_NO_SPACE_ON_DEVICE;
@@ -173,18 +199,181 @@ static int __convert_error_code(int code, char* func_name)
                        ret = PLAYER_ERROR_DRM_FUTURE_USE;
                        msg = "PLAYER_ERROR_DRM_FUTURE_USE";
                        break;
+               case MM_ERROR_PLAYER_DRM_OUTPUT_PROTECTION:
+                       ret = PLAYER_ERROR_DRM_NOT_PERMITTED;
+                       msg = "PLAYER_ERROR_DRM_NOT_PERMITTED";
+                       break;
+               case MM_ERROR_PLAYER_RESOURCE_LIMIT:
+                       ret = PLAYER_ERROR_RESOURCE_LIMIT;
+                       msg = "PLAYER_ERROR_RESOURCE_LIMIT";
+                       break;
+               case MM_ERROR_PLAYER_PERMISSION_DENIED:
+                       ret = PLAYER_ERROR_PERMISSION_DENIED;
+                       msg = "PLAYER_ERROR_PERMISSION_DENIED";
        }
        LOGE("[%s] %s(0x%08x) : core fw error(0x%x)",func_name,msg, ret, code);
        return ret;
 }
 
+int _player_get_tbm_surface_format(int in_format, uint32_t *out_format)
+{
+       if (in_format <= MM_PIXEL_FORMAT_INVALID ||
+           in_format >= MM_PIXEL_FORMAT_NUM ||
+           out_format == NULL) {
+               LOGE("INVALID_PARAMETER : in_format %d, out_format ptr %p", in_format, out_format);
+               return PLAYER_ERROR_INVALID_PARAMETER;
+       }
+
+       switch (in_format) {
+       case MM_PIXEL_FORMAT_NV12:
+       case MM_PIXEL_FORMAT_NV12T:
+               *out_format = TBM_FORMAT_NV12;
+               break;
+       case MM_PIXEL_FORMAT_NV16:
+               *out_format = TBM_FORMAT_NV16;
+               break;
+       case MM_PIXEL_FORMAT_NV21:
+               *out_format = TBM_FORMAT_NV21;
+               break;
+       case MM_PIXEL_FORMAT_YUYV:
+               *out_format = TBM_FORMAT_YUYV;
+               break;
+       case MM_PIXEL_FORMAT_UYVY:
+       case MM_PIXEL_FORMAT_ITLV_JPEG_UYVY:
+               *out_format = TBM_FORMAT_UYVY;
+               break;
+       case MM_PIXEL_FORMAT_422P:
+               *out_format = TBM_FORMAT_YUV422;
+               break;
+       case MM_PIXEL_FORMAT_I420:
+               *out_format = TBM_FORMAT_YUV420;
+               break;
+       case MM_PIXEL_FORMAT_YV12:
+               *out_format = TBM_FORMAT_YVU420;
+               break;
+       case MM_PIXEL_FORMAT_RGB565:
+               *out_format = TBM_FORMAT_RGB565;
+               break;
+       case MM_PIXEL_FORMAT_RGB888:
+               *out_format = TBM_FORMAT_RGB888;
+               break;
+       case MM_PIXEL_FORMAT_RGBA:
+               *out_format = TBM_FORMAT_RGBA8888;
+               break;
+       case MM_PIXEL_FORMAT_ARGB:
+               *out_format = TBM_FORMAT_ARGB8888;
+               break;
+       default:
+               LOGE("invalid in_format %d", in_format);
+               return PLAYER_ERROR_INVALID_PARAMETER;
+       }
+
+       return PLAYER_ERROR_NONE;
+}
+
+int _player_get_media_packet_mimetype(int in_format, media_format_mimetype_e *mimetype)
+{
+       if (in_format <= MM_PIXEL_FORMAT_INVALID ||
+           in_format >= MM_PIXEL_FORMAT_NUM ||
+           mimetype == NULL) {
+               LOGE("INVALID_PARAMETER : in_format %d, mimetype ptr %p", in_format, mimetype);
+               return PLAYER_ERROR_INVALID_PARAMETER;
+       }
+
+       switch (in_format) {
+       case MM_PIXEL_FORMAT_NV12:
+       case MM_PIXEL_FORMAT_NV12T:
+               *mimetype = MEDIA_FORMAT_NV12;
+               break;
+       case MM_PIXEL_FORMAT_NV16:
+               *mimetype = MEDIA_FORMAT_NV16;
+               break;
+       case MM_PIXEL_FORMAT_NV21:
+               *mimetype = MEDIA_FORMAT_NV21;
+               break;
+       case MM_PIXEL_FORMAT_YUYV:
+               *mimetype = MEDIA_FORMAT_YUYV;
+               break;
+       case MM_PIXEL_FORMAT_UYVY:
+       case MM_PIXEL_FORMAT_ITLV_JPEG_UYVY:
+               *mimetype = MEDIA_FORMAT_UYVY;
+               break;
+       case MM_PIXEL_FORMAT_422P:
+               *mimetype = MEDIA_FORMAT_422P;
+               break;
+       case MM_PIXEL_FORMAT_I420:
+               *mimetype = MEDIA_FORMAT_I420;
+               break;
+       case MM_PIXEL_FORMAT_YV12:
+               *mimetype = MEDIA_FORMAT_YV12;
+               break;
+       case MM_PIXEL_FORMAT_RGB565:
+               *mimetype = MEDIA_FORMAT_RGB565;
+               break;
+       case MM_PIXEL_FORMAT_RGB888:
+               *mimetype = MEDIA_FORMAT_RGB888;
+               break;
+       case MM_PIXEL_FORMAT_RGBA:
+               *mimetype = MEDIA_FORMAT_RGBA;
+               break;
+       case MM_PIXEL_FORMAT_ARGB:
+               *mimetype = MEDIA_FORMAT_ARGB;
+               break;
+       default:
+               LOGE("invalid in_format %d", in_format);
+               return PLAYER_ERROR_INVALID_PARAMETER;
+       }
+
+       return PLAYER_ERROR_NONE;
+}
+
+int _player_media_packet_finalize(media_packet_h pkt, int error_code, void *user_data)
+{
+       int ret = 0;
+       void *internal_buffer = NULL;
+       tbm_surface_h tsurf = NULL;
+
+       if (pkt == NULL || user_data == NULL) {
+               LOGE("invalid parameter buffer %p, user_data %p", pkt, user_data);
+               return MEDIA_PACKET_FINALIZE;
+       }
+
+       ret = media_packet_get_extra(pkt, &internal_buffer);
+       if (ret != MEDIA_PACKET_ERROR_NONE) {
+               LOGE("media_packet_get_extra failed 0x%x", ret);
+               return MEDIA_PACKET_FINALIZE;
+       }
+
+       /*LOGD("pointer gst buffer %p, ret 0x%x", internal_buffer, ret);*/
+
+       if (internal_buffer) {
+               gst_buffer_unref((GstBuffer *)internal_buffer);
+               internal_buffer = NULL;
+       }
+
+       ret = media_packet_get_tbm_surface(pkt, &tsurf);
+       if (ret != MEDIA_PACKET_ERROR_NONE) {
+               LOGE("media_packet_get_tbm_surface failed 0x%x", ret);
+               return MEDIA_PACKET_FINALIZE;
+        }
+
+       if (tsurf) {
+               tbm_surface_destroy(tsurf);
+                tsurf = NULL;
+       }
+
+       return MEDIA_PACKET_FINALIZE;
+}
+
 static player_interrupted_code_e __convert_interrupted_code(int code)
 {
        player_interrupted_code_e ret = PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT;
        switch(code)
        {
+               case MM_MSG_CODE_INTERRUPTED_BY_CALL_END:
                case MM_MSG_CODE_INTERRUPTED_BY_ALARM_END:
                case MM_MSG_CODE_INTERRUPTED_BY_EMERGENCY_END:
+               case MM_MSG_CODE_INTERRUPTED_BY_NOTIFICATION_END:
                        ret = PLAYER_INTERRUPTED_COMPLETED;
                        break;
                case MM_MSG_CODE_INTERRUPTED_BY_MEDIA:
@@ -200,12 +389,12 @@ static player_interrupted_code_e __convert_interrupted_code(int code)
                case MM_MSG_CODE_INTERRUPTED_BY_ALARM_START:
                        ret = PLAYER_INTERRUPTED_BY_ALARM;
                        break;
+               case MM_MSG_CODE_INTERRUPTED_BY_NOTIFICATION_START:
+                       ret = PLAYER_INTERRUPTED_BY_NOTIFICATION;
+                       break;
                case MM_MSG_CODE_INTERRUPTED_BY_EMERGENCY_START:
                        ret = PLAYER_INTERRUPTED_BY_EMERGENCY;
                        break;
-               case MM_MSG_CODE_INTERRUPTED_BY_RESUMABLE_MEDIA:
-                       ret = PLAYER_INTERRUPTED_BY_RESUMABLE_MEDIA;
-                       break;
                case MM_MSG_CODE_INTERRUPTED_BY_RESOURCE_CONFLICT:
                default :
                        ret = PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT;
@@ -223,7 +412,7 @@ static player_state_e __convert_player_state(MMPlayerStateType state)
                return state +1;
 }
 
-static bool __player_state_validate(player_s * handle, player_state_e threshold)
+bool __player_state_validate(player_s * handle, player_state_e threshold)
 {
        if (handle->state < threshold)
                return FALSE;
@@ -251,29 +440,71 @@ static int __unset_callback(_player_event_e type, player_h player)
        return PLAYER_ERROR_NONE;
 }
 
+static void __job_prepared_cb(void *user_data)
+{
+       player_s * handle = (player_s*)user_data;
+       LOGI("Start");
+       handle->is_doing_jobs = TRUE;
+       handle->state = PLAYER_STATE_READY;
+       ((player_prepared_cb)handle->user_cb[_PLAYER_EVENT_TYPE_PREPARE])(handle->user_data[_PLAYER_EVENT_TYPE_PREPARE]);
+       handle->user_cb[_PLAYER_EVENT_TYPE_PREPARE] = NULL;
+       handle->user_data[_PLAYER_EVENT_TYPE_PREPARE] = NULL;
+       __REMOVE_ECORE_JOB(handle, __JOB_KEY_PREPARED);
+       LOGI("End");
+}
+
+static void __job_error_cb(void *user_data)
+{
+       player_s * handle = (player_s*)user_data;
+       LOGI("Start");
+       handle->is_doing_jobs = TRUE;
+       ((player_error_cb)handle->user_cb[_PLAYER_EVENT_TYPE_ERROR])(handle->error_code,handle->user_data[_PLAYER_EVENT_TYPE_ERROR]);
+       __REMOVE_ECORE_JOB(handle, __JOB_KEY_ERROR);
+       LOGI("End");
+}
+
+static void __job_seek_done_cb(void *user_data)
+{
+       player_s * handle = (player_s*)user_data;
+       LOGI("Start");
+       handle->is_doing_jobs = TRUE;
+       ((player_seek_completed_cb)handle->user_cb[_PLAYER_EVENT_TYPE_SEEK])(handle->user_data[_PLAYER_EVENT_TYPE_SEEK]);
+       handle->user_cb[_PLAYER_EVENT_TYPE_SEEK] = NULL;
+       handle->user_data[_PLAYER_EVENT_TYPE_SEEK] = NULL;
+       __REMOVE_ECORE_JOB(handle, __JOB_KEY_SEEK_DONE);
+       LOGI("End");
+}
+
+static void __job_eos_cb(void *user_data)
+{
+       player_s * handle = (player_s*)user_data;
+       LOGI("Start");
+       handle->is_doing_jobs = TRUE;
+       ((player_completed_cb)handle->user_cb[_PLAYER_EVENT_TYPE_COMPLETE])(handle->user_data[_PLAYER_EVENT_TYPE_COMPLETE]);
+       __REMOVE_ECORE_JOB(handle, __JOB_KEY_EOS);
+       LOGI("End");
+}
+
 static int __msg_callback(int message, void *param, void *user_data)
 {
        player_s * handle = (player_s*)user_data;
        MMMessageParamType *msg = (MMMessageParamType*)param;
-       LOGE("[%s] Start : Got message type : 0x%x" ,__FUNCTION__, message);
+       LOGW("[%s] Got message type : 0x%x" ,__FUNCTION__, message);
        player_error_e err_code = PLAYER_ERROR_NONE;
        switch(message)
        {
                case MM_MESSAGE_ERROR: //0x01
-                       err_code = __convert_error_code(msg->code,(char*)__FUNCTION__);
+                       err_code = __player_convert_error_code(msg->code,(char*)__FUNCTION__);
                        break;
                case  MM_MESSAGE_STATE_CHANGED: //0x03
-                       LOGE("STATE CHANGED INTERNALLY - from : %d,  to : %d (CAPI State : %d)", msg->state.previous, msg->state.current, handle->state);
+                       LOGI("STATE CHANGED INTERNALLY - from : %d,  to : %d (CAPI State : %d)", msg->state.previous, msg->state.current, handle->state);
                        if ((handle->is_progressive_download && msg->state.previous == MM_PLAYER_STATE_NULL && msg->state.current == MM_PLAYER_STATE_READY) ||
                                (msg->state.previous == MM_PLAYER_STATE_READY && msg->state.current == MM_PLAYER_STATE_PAUSED))
                        {
                                if(handle->user_cb[_PLAYER_EVENT_TYPE_PREPARE]) // asyc && prepared cb has been set
                                {
-                                       LOGE("[%s] Prepared! [current state : %d]", __FUNCTION__, handle->state);
-                                       handle->state = PLAYER_STATE_READY;
-                                       ((player_prepared_cb)handle->user_cb[_PLAYER_EVENT_TYPE_PREPARE])(handle->user_data[_PLAYER_EVENT_TYPE_PREPARE]);
-                                       handle->user_cb[_PLAYER_EVENT_TYPE_PREPARE] = NULL;
-                                       handle->user_data[_PLAYER_EVENT_TYPE_PREPARE] = NULL;
+                                       LOGI("[%s] Prepared! [current state : %d]", __FUNCTION__, handle->state);
+                                       __ADD_ECORE_JOB(handle, __JOB_KEY_PREPARED, __job_prepared_cb);
                                }
                        }
                        break;
@@ -284,13 +515,12 @@ static int __msg_callback(int message, void *param, void *user_data)
                        }
                        break;
                case MM_MESSAGE_BEGIN_OF_STREAM: //0x104
-                               MMTA_ACUM_ITEM_END("[CAPI] player_start ~ BOS", 0);
-                               LOGE("[%s] Ready to streaming information (BOS) [current state : %d]", __FUNCTION__, handle->state);
+                               LOGI("[%s] Ready to streaming information (BOS) [current state : %d]", __FUNCTION__, handle->state);
                        break;
                case MM_MESSAGE_END_OF_STREAM://0x105
                        if( handle->user_cb[_PLAYER_EVENT_TYPE_COMPLETE] )
                        {
-                               ((player_completed_cb)handle->user_cb[_PLAYER_EVENT_TYPE_COMPLETE])(handle->user_data[_PLAYER_EVENT_TYPE_COMPLETE]);
+                               __ADD_ECORE_JOB(handle, __JOB_KEY_EOS, __job_eos_cb);
                        }
                        break;
                case MM_MESSAGE_BUFFERING: //0x103
@@ -311,7 +541,7 @@ static int __msg_callback(int message, void *param, void *user_data)
                        }
                        break;
                case MM_MESSAGE_CONNECTION_TIMEOUT: //0x102
-                       LOGE("[%s] PLAYER_ERROR_CONNECTION_FAILED (0x%08x) : CONNECTION_TIMEOUT" ,__FUNCTION__, PLAYER_ERROR_CONNECTION_FAILED);
+                       LOGI("[%s] PLAYER_ERROR_CONNECTION_FAILED (0x%08x) : CONNECTION_TIMEOUT" ,__FUNCTION__, PLAYER_ERROR_CONNECTION_FAILED);
                        err_code = PLAYER_ERROR_CONNECTION_FAILED;
                        break;
                case MM_MESSAGE_UPDATE_SUBTITLE: //0x109
@@ -321,7 +551,7 @@ static int __msg_callback(int message, void *param, void *user_data)
                        }
                        break;
                case MM_MESSAGE_VIDEO_NOT_CAPTURED: //0x113
-                       LOGE("[%s] PLAYER_ERROR_VIDEO_CAPTURE_FAILED (0x%08x)",__FUNCTION__, PLAYER_ERROR_VIDEO_CAPTURE_FAILED);
+                       LOGI("[%s] PLAYER_ERROR_VIDEO_CAPTURE_FAILED (0x%08x)",__FUNCTION__, PLAYER_ERROR_VIDEO_CAPTURE_FAILED);
                        if( handle->user_cb[_PLAYER_EVENT_TYPE_ERROR] )
                        {
                                ((player_error_cb)handle->user_cb[_PLAYER_EVENT_TYPE_ERROR])(PLAYER_ERROR_VIDEO_CAPTURE_FAILED,handle->user_data[_PLAYER_EVENT_TYPE_ERROR]);
@@ -341,6 +571,30 @@ static int __msg_callback(int message, void *param, void *user_data)
                                else
                                {
                                        MMPlayerVideoCapture* capture = (MMPlayerVideoCapture *)msg->data;
+
+                                       switch ( msg->captured_frame.orientation )
+                                       {
+                                               case 0:
+                                               case 180:
+                                               {
+                                                       /* use video resolution from above */
+                                               }
+                                               break;
+                                               case 90:
+                                               case 270:
+                                               {
+                                                       /* use calculated size during rotation */
+                                                       w = msg->captured_frame.width;
+                                                       h = msg->captured_frame.height;
+                                               }
+                                               break;
+                                               default:
+                                               break;
+                                       }
+
+                                       LOGI("[%s] captured image width : %d   height : %d", __FUNCTION__, w, h);
+
+                                       /* call application callback */
                                        ((player_video_captured_cb)handle->user_cb[_PLAYER_EVENT_TYPE_CAPTURE])(capture->data, w, h, capture->size, handle->user_data[_PLAYER_EVENT_TYPE_CAPTURE]);
 
                                        if (capture->data)
@@ -354,32 +608,22 @@ static int __msg_callback(int message, void *param, void *user_data)
                        }
                        break;
                case MM_MESSAGE_FILE_NOT_SUPPORTED: //0x10f
-                       LOGE("[%s] PLAYER_ERROR_NOT_SUPPORTED_FILE (0x%08x) : FILE_NOT_SUPPORTED" ,__FUNCTION__, PLAYER_ERROR_NOT_SUPPORTED_FILE);
+                       LOGI("[%s] PLAYER_ERROR_NOT_SUPPORTED_FILE (0x%08x) : FILE_NOT_SUPPORTED" ,__FUNCTION__, PLAYER_ERROR_NOT_SUPPORTED_FILE);
                        err_code = PLAYER_ERROR_NOT_SUPPORTED_FILE;
                        break;
                case MM_MESSAGE_FILE_NOT_FOUND: //0x110
-                       LOGE("[%s] PLAYER_ERROR_NOT_SUPPORTED_FILE (0x%08x) : FILE_NOT_FOUND" ,__FUNCTION__, PLAYER_ERROR_NOT_SUPPORTED_FILE);
+                       LOGI("[%s] PLAYER_ERROR_NOT_SUPPORTED_FILE (0x%08x) : FILE_NOT_FOUND" ,__FUNCTION__, PLAYER_ERROR_NOT_SUPPORTED_FILE);
                        err_code = PLAYER_ERROR_NOT_SUPPORTED_FILE;
                        break;
                case MM_MESSAGE_SEEK_COMPLETED: //0x114
                        if (handle->display_type != ((int)MM_DISPLAY_SURFACE_NULL) && handle->state == PLAYER_STATE_READY)
                        {
                                if(handle->is_display_visible)
-                               {
-                                       int ret = MM_ERROR_NONE;
-                                       ret = mm_player_set_attribute(handle->mm_handle, NULL,"display_visible" , 1, (char*)NULL);
-                                       if(ret != MM_ERROR_NONE)
-                                       {
-                                               LOGW("[%s] Failed to set display visible (0x%x)" ,__FUNCTION__, ret);
-                                       }
-
-                               }
+                                       mm_player_set_attribute(handle->mm_handle, NULL,"display_visible" , 1, (char*)NULL);
                        }
                        if( handle->user_cb[_PLAYER_EVENT_TYPE_SEEK])
                        {
-                               ((player_seek_completed_cb)handle->user_cb[_PLAYER_EVENT_TYPE_SEEK])(handle->user_data[_PLAYER_EVENT_TYPE_SEEK]);
-                               handle->user_cb[_PLAYER_EVENT_TYPE_SEEK] = NULL;
-                               handle->user_data[_PLAYER_EVENT_TYPE_SEEK] = NULL;
+                               __ADD_ECORE_JOB(handle, __JOB_KEY_SEEK_DONE, __job_seek_done_cb);
                        }
                        break;
                case MM_MESSAGE_UNKNOWN: //0x00
@@ -399,44 +643,138 @@ static int __msg_callback(int message, void *param, void *user_data)
 
        if(err_code != PLAYER_ERROR_NONE && handle->user_cb[_PLAYER_EVENT_TYPE_ERROR])
        {
-               ((player_error_cb)handle->user_cb[_PLAYER_EVENT_TYPE_ERROR])(err_code,handle->user_data[_PLAYER_EVENT_TYPE_ERROR]);
+               handle->error_code = err_code;
+               __ADD_ECORE_JOB(handle, __JOB_KEY_ERROR, __job_error_cb);
        }
-       LOGE("[%s] End", __FUNCTION__);
+       LOGW("[%s] End", __FUNCTION__);
        return 1;
 }
 
-static bool  __video_stream_callback(void *stream, int stream_size, void *user_data, int width, int height)
+static bool  __video_stream_callback(void *stream, void *user_data)
 {
        player_s * handle = (player_s*)user_data;
-       if( handle->user_cb[_PLAYER_EVENT_TYPE_VIDEO_FRAME])
-       {
-               if(handle->state==PLAYER_STATE_PLAYING)
-                       ((player_video_frame_decoded_cb)handle->user_cb[_PLAYER_EVENT_TYPE_VIDEO_FRAME])((unsigned char *)stream, width, height, stream_size, handle->user_data[_PLAYER_EVENT_TYPE_VIDEO_FRAME]);
-               else
-                       LOGE("[%s] Skip stream - current state : %d", __FUNCTION__,handle->state);
-       }
-       return TRUE;
-}
+       MMPlayerVideoStreamDataType *video_stream = (MMPlayerVideoStreamDataType *)stream;
+
+       if (handle->user_cb[_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME]) // media packet and zero-copy
+       {
+               media_packet_h pkt = NULL;
+               tbm_surface_h tsurf = NULL;
+               uint32_t bo_format = 0;
+               int i;
+               int bo_num;
+               int ret = 0;
+               media_format_mimetype_e mimetype = MEDIA_FORMAT_NV12;
+               bool make_pkt_fmt = false;
+
+               /* create tbm surface */
+               for (i = 0, bo_num = 0 ; i < BUFFER_MAX_PLANE_NUM ; i++) {
+                       if (video_stream->bo[i]) {
+                               bo_num++;
+                       }
+               }
 
-static bool  __audio_stream_callback(void *stream, int stream_size, void *user_data)
-{
-       player_s * handle = (player_s*)user_data;
-       if( handle->user_cb[_PLAYER_EVENT_TYPE_AUDIO_FRAME] )
-       {
-               if(handle->state==PLAYER_STATE_PLAYING)
-                       ((player_audio_frame_decoded_cb)handle->user_cb[_PLAYER_EVENT_TYPE_AUDIO_FRAME])((unsigned char *)stream, stream_size, handle->user_data[_PLAYER_EVENT_TYPE_AUDIO_FRAME]);
-               else
-                       LOGE("[%s] Skip stream - current state : %d", __FUNCTION__,handle->state);
-       }
-       return TRUE;
-}
+               /* get tbm surface format */
+               ret = _player_get_tbm_surface_format(video_stream->format, &bo_format);
+               ret |= _player_get_media_packet_mimetype(video_stream->format, &mimetype);
+
+               if (bo_num > 0 && ret == PLAYER_ERROR_NONE) {
+                       tsurf = tbm_surface_internal_create_with_bos(video_stream->width, video_stream->height, bo_format, (tbm_bo *)video_stream->bo, bo_num);
+                       /*LOGD("tbm surface %p", tsurf);*/
+               } else if (bo_num == 0) {
+                       int plane_idx = 0;
+                       tbm_surface_info_s tsuri;
+                       unsigned char *ptr = video_stream->data;
+
+                       if (!ptr) return TRUE;
+
+                       tsurf = tbm_surface_create(video_stream->width, video_stream->height,  bo_format);
+                       if (tsurf) {
+                               /* map surface to set data */
+                               if (tbm_surface_map (tsurf, TBM_SURF_OPTION_READ|TBM_SURF_OPTION_WRITE, &tsuri)) {
+                                       LOGE("tbm_surface_map failed");
+                                       return TRUE;
+                               }
 
-static bool  __video_frame_render_error_callback(void *param, void *user_data)
-{
-       player_s * handle = (player_s*)user_data;
-       if( handle->user_cb[_PLAYER_EVENT_TYPE_VIDEO_FRAME_RENDER_ERROR])
-       {
-               ((player_x11_pixmap_error_cb)handle->user_cb[_PLAYER_EVENT_TYPE_VIDEO_FRAME_RENDER_ERROR])((unsigned int *)param, handle->user_data[_PLAYER_EVENT_TYPE_VIDEO_FRAME_RENDER_ERROR]);
+                               for ( plane_idx = 0; plane_idx < tsuri.num_planes; plane_idx++ ) {
+                                       memcpy(tsuri.planes[plane_idx].ptr, ptr, tsuri.planes[plane_idx].size);
+                                       ptr += tsuri.planes[plane_idx].size;
+                               }
+                       } else {
+                               LOGW("tbm_surface_create failed");
+                       }
+               }
+
+               if (tsurf) {
+                       /* check media packet format */
+                       if (handle->pkt_fmt) {
+                               int pkt_fmt_width = 0;
+                               int pkt_fmt_height = 0;
+                               media_format_mimetype_e pkt_fmt_mimetype = MEDIA_FORMAT_NV12;
+
+                               media_format_get_video_info(handle->pkt_fmt, &pkt_fmt_mimetype, &pkt_fmt_width, &pkt_fmt_height, NULL, NULL);
+                               if (pkt_fmt_mimetype != mimetype ||
+                                   pkt_fmt_width != video_stream->width ||
+                                   pkt_fmt_height != video_stream->height) {
+                                       LOGW("different format. current 0x%x, %dx%d, new 0x%x, %dx%d",
+                                            pkt_fmt_mimetype, pkt_fmt_width, pkt_fmt_height, mimetype, video_stream->width, video_stream->height);
+                                       media_format_unref(handle->pkt_fmt);
+                                       handle->pkt_fmt = NULL;
+                                       make_pkt_fmt = true;
+                               }
+                       } else {
+                               make_pkt_fmt = true;
+                       }
+
+                       /* create packet format */
+                       if (make_pkt_fmt) {
+                               LOGW("make new pkt_fmt - mimetype 0x%x, %dx%d", mimetype, video_stream->width, video_stream->height);
+                               ret = media_format_create(&handle->pkt_fmt);
+                               if (ret == MEDIA_FORMAT_ERROR_NONE) {
+                                       ret = media_format_set_video_mime(handle->pkt_fmt, mimetype);
+                                       ret |= media_format_set_video_width(handle->pkt_fmt, video_stream->width);
+                                       ret |= media_format_set_video_height(handle->pkt_fmt, video_stream->height);
+                                       LOGW("media_format_set_video_mime,width,height ret : 0x%x", ret);
+                               } else {
+                                       LOGW("media_format_create failed");
+                               }
+                       }
+
+                       /* create media packet */
+                       ret = media_packet_create_from_tbm_surface(handle->pkt_fmt, tsurf, (media_packet_finalize_cb)_player_media_packet_finalize, (void *)handle, &pkt);
+                       if (ret != MEDIA_PACKET_ERROR_NONE) {
+                               LOGE("media_packet_create_from_tbm_surface failed");
+
+                               tbm_surface_destroy(tsurf);
+                               tsurf = NULL;
+                       }
+               } else {
+                       LOGE("failed to create tbm surface %dx%d, format %d, bo_num %d", video_stream->width, video_stream->height, video_stream->format, bo_num);
+               }
+
+               if (pkt) {
+                       /*LOGD("media packet %p, internal buffer %p", pkt, stream->internal_buffer);*/
+
+                       /* set internal buffer */
+                       if (video_stream->internal_buffer)
+                               ret = media_packet_set_extra(pkt, video_stream->internal_buffer);
+
+                       if (ret != MEDIA_PACKET_ERROR_NONE) {
+                               LOGE("media_packet_set_extra failed");
+
+                               media_packet_destroy(pkt);
+                               pkt = NULL;
+                       } else {
+                               /* increase ref count of gst buffer */
+                               if (video_stream->internal_buffer)
+                                       gst_buffer_ref((GstBuffer *)video_stream->internal_buffer);
+
+                               /* call media packet callback */
+                               ((player_media_packet_video_decoded_cb)handle->user_cb[_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME])(pkt, handle->user_data[_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME]);
+
+                               if (bo_num == 0)
+                                       tbm_surface_unmap(tsurf);
+                       }
+               }
        }
        return TRUE;
 }
@@ -463,64 +801,36 @@ static int __pd_message_callback(int message, void *param, void *user_data)
        }
        return 0;
 }
-
-static bool __supported_audio_effect_type (int  filter, int type, void *user_data)
+static void __job_key_to_remove(gpointer key)
 {
-       player_s * handle = (player_s*)user_data;
-       if(filter != MM_AUDIO_EFFECT_TYPE_CUSTOM || type == MM_AUDIO_EFFECT_CUSTOM_EQ)
-       {
-               LOGI("[%s] Skip invalid filter: %d or type : %d",__FUNCTION__, filter, type);
-               return TRUE;
-       }
-
-       if( handle->user_cb[_PLAYER_EVENT_TYPE_SUPPORTED_AUDIO_EFFECT] )
-       {
-               return ((player_audio_effect_supported_effect_cb)handle->user_cb[_PLAYER_EVENT_TYPE_SUPPORTED_AUDIO_EFFECT])(type, handle->user_data[_PLAYER_EVENT_TYPE_SUPPORTED_AUDIO_EFFECT]);
-       }
-       return FALSE;
+       LOGI("%s",key);
+       g_free(key);
 }
 
-static bool __supported_audio_effect_preset (int  filter, int type, void *user_data)
+static void __job_value_to_destroy(gpointer value)
 {
-       player_s * handle = (player_s*)user_data;
-       if(filter != MM_AUDIO_EFFECT_TYPE_PRESET)
-       {
-               LOGI("[%s] Skip invalid filter: %d or type : %d",__FUNCTION__, filter, type);
-               return TRUE;
-       }
-
-       if( handle->user_cb[_PLAYER_EVENT_TYPE_SUPPORTED_AUDIO_EFFECT_PRESET] )
-       {
-               return ((player_audio_effect_supported_effect_cb)handle->user_cb[_PLAYER_EVENT_TYPE_SUPPORTED_AUDIO_EFFECT_PRESET])(type, handle->user_data[_PLAYER_EVENT_TYPE_SUPPORTED_AUDIO_EFFECT_PRESET]);
-       }
-       return FALSE;
+       Ecore_Job *job = (Ecore_Job *)value;
+       LOGI("%p", job);
+       __DELETE_ECORE_ITEM(job);
 }
 
-
 /*
 * Public Implementation
 */
 
 int player_create (player_h *player)
 {
-       LOGE("[%s] Start", __FUNCTION__);
        PLAYER_INSTANCE_CHECK(player);
-       MMTA_INIT();
-       MMTA_ACUM_ITEM_BEGIN("[CoreAPI] player_create", 0);
        player_s * handle;
        handle = (player_s*)malloc( sizeof(player_s));
-       if (handle != NULL) 
-       {
-               LOGE("[%s] Start, %p", __FUNCTION__, handle);
+       if (handle != NULL)
                memset(handle, 0 , sizeof(player_s));
-       }
        else
        {
                LOGE("[%s] PLAYER_ERROR_OUT_OF_MEMORY(0x%08x)" ,__FUNCTION__,PLAYER_ERROR_OUT_OF_MEMORY);
                return PLAYER_ERROR_OUT_OF_MEMORY;
        }
        int ret = mm_player_create(&handle->mm_handle);
-       MMTA_ACUM_ITEM_END("[CoreAPI] player_create", 0);
        if( ret != MM_ERROR_NONE)
        {
                LOGE("[%s] PLAYER_ERROR_INVALID_OPERATION(0x%08x)" ,__FUNCTION__,PLAYER_ERROR_INVALID_OPERATION);
@@ -536,26 +846,38 @@ int player_create (player_h *player)
                handle->display_type = MM_DISPLAY_SURFACE_NULL; // means DISPLAY_TYPE_NONE(3)
                handle->is_stopped=false;
                handle->is_display_visible=true;
-               LOGE("[%s] End, new handle : %p", __FUNCTION__, *player);
+               handle->ecore_jobs = g_hash_table_new_full(g_str_hash, g_str_equal, __job_key_to_remove, __job_value_to_destroy);
+               LOGI("[%s] new handle : %p", __FUNCTION__, *player);
                return PLAYER_ERROR_NONE;
        }
 }
 
 int player_destroy (player_h player)
 {
-       LOGE("[%s] Start, handle to destroy : %p", __FUNCTION__, player);
+       LOGI("[%s] Start, handle to destroy : %p", __FUNCTION__, player);
        PLAYER_INSTANCE_CHECK(player);
        player_s * handle = (player_s *) player;
-       MMTA_ACUM_ITEM_SHOW_RESULT_TO(MMTA_SHOW_FILE);
-       MMTA_RELEASE();
-
-       if (handle->prepare_async_thread)
+       if (handle->is_doing_jobs)
        {
-               pthread_join(handle->prepare_async_thread, NULL);
-               handle->prepare_async_thread = 0;
+               LOGE("jobs not completed. can't do destroy");
+               return PLAYER_ERROR_INVALID_OPERATION;
+       }
+
+       g_hash_table_remove_all(handle->ecore_jobs);
+       g_hash_table_unref(handle->ecore_jobs);
+
+       __RELEASEIF_PREPARE_THREAD(handle->prepare_async_thread);
+
+       int ret = mm_player_destroy(handle->mm_handle);
+
+       if (handle->pkt_fmt) {
+               media_format_unref(handle->pkt_fmt);
+               handle->pkt_fmt = NULL;
        }
 
-       if (mm_player_destroy(handle->mm_handle)!= MM_ERROR_NONE)
+       LOGI("[%s] Done mm_player_destroy", __FUNCTION__);
+
+       if (ret != MM_ERROR_NONE)
        {
                LOGE("[%s] PLAYER_ERROR_INVALID_OPERATION(0x%08x)" ,__FUNCTION__,PLAYER_ERROR_INVALID_OPERATION);
                return PLAYER_ERROR_INVALID_OPERATION;
@@ -565,7 +887,7 @@ int player_destroy (player_h player)
                handle->state = PLAYER_STATE_NONE;
                free(handle);
                handle= NULL;
-               LOGE("[%s] End", __FUNCTION__);
+               LOGI("[%s] End", __FUNCTION__);
                return PLAYER_ERROR_NONE;
        }
 }
@@ -575,24 +897,37 @@ __prepare_async_thread_func(void *data)
 {
        player_s *handle = data;
        int ret = MM_ERROR_NONE;
-       LOGE("[%s] Start", __FUNCTION__);
+       LOGI("[%s]", __FUNCTION__);
 
        ret = mm_player_pause(handle->mm_handle);
-       if(ret != MM_ERROR_NONE) // MM_MESSAGE_ERROR should be posted through __msg_callback
+       if(ret != MM_ERROR_NONE)
        {
                LOGE("[%s] Failed to pause - core fw error(0x%x)", __FUNCTION__, ret);
+               /*MM_MESSAGE_ERROR will not be posted as player_prepare(sync API) works with return value
+               of mm_player_pause So in case of async API we post the error message to application from here*/
+               MMMessageParamType msg_param;
+               msg_param.code = ret;
+               __msg_callback(MM_MESSAGE_ERROR, (void *)&msg_param, (void *)handle);
+
+               ret = mm_player_unrealize(handle->mm_handle);
+               if (ret != MM_ERROR_NONE)
+                       LOGE("[%s] Failed to unrealize - 0x%x", __FUNCTION__,ret);
        }
-       LOGE("[%s] End", __FUNCTION__);
+       LOGI("[%s], done", __FUNCTION__);
        return NULL;
 }
 
 int player_prepare_async (player_h player, player_prepared_cb callback, void* user_data)
 {
-       LOGE("[%s] Start", __FUNCTION__);
+       LOGI("[%s] Start", __FUNCTION__);
        PLAYER_INSTANCE_CHECK(player);
        player_s * handle = (player_s *) player;
        PLAYER_STATE_CHECK(handle,PLAYER_STATE_IDLE);
 
+       int ret;
+       int visible;
+       int value;
+
        if(handle->user_cb[_PLAYER_EVENT_TYPE_PREPARE])
        {
                LOGE("[%s] PLAYER_ERROR_INVALID_OPERATION (0x%08x) : preparing... we can't do any more " ,__FUNCTION__, PLAYER_ERROR_INVALID_OPERATION);
@@ -600,12 +935,11 @@ int player_prepare_async (player_h player, player_prepared_cb callback, void* us
        }
        else
        {
-               LOGI("[%s] Event type : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_PREPARE);
+               //LOGI("[%s] Event type : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_PREPARE);
                handle->user_cb[_PLAYER_EVENT_TYPE_PREPARE] = callback;
                handle->user_data[_PLAYER_EVENT_TYPE_PREPARE] = user_data;
        }
 
-       int ret;
        ret = mm_player_set_message_callback(handle->mm_handle, __msg_callback, (void*)handle);
        if(ret != MM_ERROR_NONE)
        {
@@ -622,24 +956,32 @@ int player_prepare_async (player_h player, player_prepared_cb callback, void* us
        }
        else
        {
-               ret = mm_player_set_attribute(handle->mm_handle, NULL,"display_visible", 0, (char*)NULL);
-                if(ret != MM_ERROR_NONE)
-                {
-                        LOGW("[%s] Failed to set display visible (0x%x)" ,__FUNCTION__, ret);
-                }
-       }
+               ret = mm_player_get_attribute(handle->mm_handle, NULL,"display_visible" ,&visible, (char*)NULL);
+               if(ret != MM_ERROR_NONE)
+               {
+                       return __player_convert_error_code(ret,(char*)__FUNCTION__);
+               }
+               if(!visible)
+               {
+                       value = FALSE;
+               }
+               else
+               {
+                       value = TRUE;
+               }
 
-       ret = mm_player_set_attribute(handle->mm_handle, NULL, "profile_prepare_async", 1, (char*)NULL);
-       if(ret != MM_ERROR_NONE)
-       {
-               LOGE("[%s] Failed to set profile_async_start '1' (0x%x)" ,__FUNCTION__, ret);
+               ret = mm_player_set_attribute(handle->mm_handle, NULL, "display_visible", value, (char*)NULL);
+               if(ret != MM_ERROR_NONE)
+               {
+                       return __player_convert_error_code(ret,(char*)__FUNCTION__);
+               }
        }
 
        ret = mm_player_realize(handle->mm_handle);
        if(ret != MM_ERROR_NONE)
        {
                LOGE("[%s] Failed to realize - 0x%x", __FUNCTION__, ret);
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
 
        if (!handle->is_progressive_download)
@@ -654,19 +996,20 @@ int player_prepare_async (player_h player, player_prepared_cb callback, void* us
                }
        }
 
-       LOGE("[%s] End", __FUNCTION__);
+       LOGI("[%s] End", __FUNCTION__);
        return PLAYER_ERROR_NONE;
 }
 
 int player_prepare (player_h player)
 {
-       LOGE("[%s] Start", __FUNCTION__);
+       LOGI("[%s] Start", __FUNCTION__);
        PLAYER_INSTANCE_CHECK(player);
-       MMTA_ACUM_ITEM_BEGIN("[CoreAPI] player_prepare", 0);
        player_s * handle = (player_s *) player;
        PLAYER_STATE_CHECK(handle,PLAYER_STATE_IDLE);
 
        int ret;
+       int visible;
+       int value;
        ret = mm_player_set_message_callback(handle->mm_handle, __msg_callback, (void*)handle);
        if(ret != MM_ERROR_NONE)
        {
@@ -683,7 +1026,22 @@ int player_prepare (player_h player)
        }
        else
        {
-               ret = mm_player_set_attribute(handle->mm_handle, NULL,"display_visible" , 0, (char*)NULL);
+               ret = mm_player_get_attribute(handle->mm_handle, NULL,"display_visible" ,&visible, (char*)NULL);
+               if(ret != MM_ERROR_NONE)
+               {
+                       return __player_convert_error_code(ret,(char*)__FUNCTION__);
+               }
+               if(!visible)
+               {
+                       value = FALSE;
+               }
+               else
+               {
+                       value = TRUE;
+               }
+
+               mm_player_set_attribute(handle->mm_handle, NULL, "display_visible", value, (char*)NULL);
+
                if(ret != MM_ERROR_NONE)
                {
                        LOGW("[%s] Failed to set display display_visible '0' (0x%x)" ,__FUNCTION__, ret);
@@ -694,51 +1052,71 @@ int player_prepare (player_h player)
        if(ret != MM_ERROR_NONE)
        {
                LOGE("[%s] Failed to realize - 0x%x", __FUNCTION__,ret);
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
 
        if (!handle->is_progressive_download)
                ret = mm_player_pause(handle->mm_handle);
 
-       MMTA_ACUM_ITEM_END("[CoreAPI] player_prepare", 0);
        if(ret != MM_ERROR_NONE)
        {
+               int uret;
+               uret = mm_player_unrealize(handle->mm_handle);
+               if (uret != MM_ERROR_NONE)
+                       LOGE("[%s] Failed to unrealize - 0x%x", __FUNCTION__,uret);
+
                LOGE("[%s] Failed to pause - 0x%x", __FUNCTION__,ret);
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
                handle->state = PLAYER_STATE_READY;
-               LOGE("[%s] End", __FUNCTION__);
+               LOGI("[%s] End", __FUNCTION__);
                return PLAYER_ERROR_NONE;
        }
 }
 
 int player_unprepare (player_h player)
 {
-       LOGE("[%s] Start", __FUNCTION__);
+       LOGI("[%s] Start", __FUNCTION__);
        PLAYER_INSTANCE_CHECK(player);
        player_s * handle = (player_s *) player;
-       if (!__player_state_validate(handle, PLAYER_STATE_READY))
+
+       if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
        {
                LOGE("[%s] PLAYER_ERROR_INVALID_STATE(0x%08x) : current state - %d" ,__FUNCTION__,PLAYER_ERROR_INVALID_STATE, handle->state);
                return PLAYER_ERROR_INVALID_STATE;
        }
 
+       __RELEASEIF_PREPARE_THREAD(handle->prepare_async_thread);
+
        int ret = mm_player_unrealize(handle->mm_handle);
+
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
+               if (handle->user_cb[_PLAYER_EVENT_TYPE_SEEK])
+               {
+                       handle->user_cb[_PLAYER_EVENT_TYPE_SEEK] = NULL;
+                       handle->user_data[_PLAYER_EVENT_TYPE_SEEK] = NULL;
+               }
+
+               if (handle->user_cb[_PLAYER_EVENT_TYPE_PREPARE])
+               {
+                       handle->user_cb[_PLAYER_EVENT_TYPE_PREPARE] = NULL;
+                       handle->user_data[_PLAYER_EVENT_TYPE_PREPARE] = NULL;
+               }
+
                handle->state = PLAYER_STATE_IDLE;
                handle->display_type = MM_DISPLAY_SURFACE_NULL; // means DISPLAY_TYPE_NONE(3)
                handle->is_set_pixmap_cb = false;
                handle->is_stopped=false;
                handle->is_display_visible=true;
                handle->is_progressive_download=false;
-               LOGE("[%s] End", __FUNCTION__);
+               LOGI("[%s] End", __FUNCTION__);
                return PLAYER_ERROR_NONE;
        }
 }
@@ -750,14 +1128,66 @@ int player_set_uri (player_h player, const char *uri)
        player_s * handle = (player_s *) player;
        PLAYER_STATE_CHECK(handle,PLAYER_STATE_IDLE);
 
-       int uri_length = strlen(uri);
-       int ret = mm_player_set_attribute(handle->mm_handle, NULL,MM_PLAYER_CONTENT_URI , uri, uri_length, (char*)NULL);
+       int ret = mm_player_set_uri(handle->mm_handle, uri);
+
+       if(ret != MM_ERROR_NONE)
+       {
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
+       }
+       else
+               return PLAYER_ERROR_NONE;
+}
+
+int player_set_next_uri (player_h player, const char *uri)
+{
+       PLAYER_INSTANCE_CHECK(player);
+       player_s * handle = (player_s *) player;
+       if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
+       {
+               LOGE("[%s] PLAYER_ERROR_INVALID_STATE(0x%08x) : current state - %d" ,__FUNCTION__,PLAYER_ERROR_INVALID_STATE, handle->state);
+               return PLAYER_ERROR_INVALID_STATE;
+       }
+
+       int ret = mm_player_set_next_uri(handle->mm_handle, uri);
+
+       if(ret != MM_ERROR_NONE)
+       {
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
+       }
+       else
+               return PLAYER_ERROR_NONE;
+}
+
+int player_get_next_uri (player_h player, char **uri)
+{
+       PLAYER_INSTANCE_CHECK(player);
+       player_s * handle = (player_s *) player;
+       char* next_uri = NULL;
+
+       if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
+       {
+               LOGE("[%s] PLAYER_ERROR_INVALID_STATE(0x%08x) : current state - %d" ,__FUNCTION__,PLAYER_ERROR_INVALID_STATE, handle->state);
+               return PLAYER_ERROR_INVALID_STATE;
+       }
+
+       int ret = mm_player_get_next_uri(handle->mm_handle, &next_uri);
+
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
+       {
+               *uri = NULL;
+               if(next_uri != NULL)
+               {
+                       *uri = strdup(next_uri);
+                       free(next_uri);
+               }
+
+               next_uri = NULL;
                return PLAYER_ERROR_NONE;
+       }
 }
 
 int player_set_memory_buffer (player_h player, const void *data, int size)
@@ -774,7 +1204,7 @@ int player_set_memory_buffer (player_h player, const void *data, int size)
        int ret = mm_player_set_attribute(handle->mm_handle, NULL,MM_PLAYER_CONTENT_URI, uri, strlen(uri), MM_PLAYER_MEMORY_SRC, data,size,(char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
                return PLAYER_ERROR_NONE;
@@ -788,7 +1218,7 @@ int player_get_state (player_h player, player_state_e *state)
        *state = handle->state;
        MMPlayerStateType currentStat = MM_PLAYER_STATE_NULL;
        mm_player_get_state(handle->mm_handle, &currentStat);
-       LOGI("[%s] State : %d (FW state : %d)", __FUNCTION__,handle->state, currentStat);
+       //LOGI("[%s] State : %d (FW state : %d)", __FUNCTION__,handle->state, currentStat);
        return PLAYER_ERROR_NONE;
 }
 
@@ -804,7 +1234,7 @@ int player_set_volume (player_h player, float left, float right)
        int ret = mm_player_set_volume(handle->mm_handle,&vol);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
@@ -822,7 +1252,7 @@ int player_get_volume (player_h player, float *left, float *right)
        int ret = mm_player_get_volume(handle->mm_handle,&vol);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
@@ -846,7 +1276,7 @@ int player_set_sound_type(player_h player, sound_type_e type)
        int ret = mm_player_set_attribute(handle->mm_handle, NULL,"sound_volume_type" , type, (char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
                return PLAYER_ERROR_NONE;
@@ -857,9 +1287,9 @@ int player_set_audio_latency_mode(player_h player, audio_latency_mode_e latency_
        PLAYER_INSTANCE_CHECK(player);
        player_s * handle = (player_s *) player;
 
-       int ret = mm_player_set_attribute(handle->mm_handle, NULL,"audio_latency_mode" , latency_mode, (char*)NULL);
+       int ret = mm_player_set_attribute(handle->mm_handle, NULL,"sound_latency_mode" , latency_mode, (char*)NULL);
        if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        else
                return PLAYER_ERROR_NONE;
 }
@@ -870,29 +1300,26 @@ int player_get_audio_latency_mode(player_h player, audio_latency_mode_e *latency
        PLAYER_NULL_ARG_CHECK(latency_mode);
        player_s * handle = (player_s *) player;
 
-       int ret = mm_player_get_attribute(handle->mm_handle, NULL,"audio_latency_mode" , latency_mode, (char*)NULL);
+       int ret = mm_player_get_attribute(handle->mm_handle, NULL,"sound_latency_mode" , latency_mode, (char*)NULL);
        if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        else
                return PLAYER_ERROR_NONE;
 }
 
 int player_start (player_h player)
 {
-       LOGE("[%s] Start", __FUNCTION__);
+       LOGI("[%s] Start", __FUNCTION__);
        PLAYER_INSTANCE_CHECK(player);
-       MMTA_ACUM_ITEM_BEGIN("[CAPI] player_start only", 0);
-       MMTA_ACUM_ITEM_BEGIN("[CAPI] player_start ~ BOS", 0);
        player_s * handle = (player_s *) player;
        int ret;
        if ( handle->state  ==PLAYER_STATE_READY || handle->state ==PLAYER_STATE_PAUSED)
        {
-               if(handle->display_type == PLAYER_DISPLAY_TYPE_X11 || handle->display_type == PLAYER_DISPLAY_TYPE_EVAS)
+               if(handle->display_type == PLAYER_DISPLAY_TYPE_OVERLAY || handle->display_type == PLAYER_DISPLAY_TYPE_EVAS)
                {
                        if(handle->is_display_visible)
                        {
                                ret = mm_player_set_attribute(handle->mm_handle, NULL,"display_visible" , 1, (char*)NULL);
-                               LOGE("[%s] show video display : %d",__FUNCTION__, ret);
                        }
                }
 
@@ -905,7 +1332,7 @@ int player_start (player_h player)
                        }
 
                        ret = mm_player_start(handle->mm_handle);
-                       LOGE("[%s] stop -> start() ",__FUNCTION__);
+                       LOGI("[%s] stop -> start() ",__FUNCTION__);
                }
                else
                {
@@ -923,43 +1350,48 @@ int player_start (player_h player)
 
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
                handle->is_stopped = FALSE;
                handle->state = PLAYER_STATE_PLAYING;
-               LOGE("[%s] End", __FUNCTION__);
+               LOGI("[%s] End", __FUNCTION__);
                return PLAYER_ERROR_NONE;
        }
 }
 
 int player_stop (player_h player)
 {
-       LOGE("[%s] Start", __FUNCTION__);
+       LOGI("[%s] Start", __FUNCTION__);
        PLAYER_INSTANCE_CHECK(player);
        player_s * handle = (player_s *) player;
        if (handle->state == PLAYER_STATE_PLAYING || handle->state == PLAYER_STATE_PAUSED)
        {
                int ret = mm_player_stop(handle->mm_handle);
+
+               if(handle->display_type == PLAYER_DISPLAY_TYPE_OVERLAY || handle->display_type == PLAYER_DISPLAY_TYPE_EVAS)
+               {
+                       ret = mm_player_set_attribute(handle->mm_handle, NULL,"display_visible" , 0, (char*)NULL);
+               }
+
                if(ret != MM_ERROR_NONE)
                {
-                       return __convert_error_code(ret,(char*)__FUNCTION__);
+                       return __player_convert_error_code(ret,(char*)__FUNCTION__);
                }
-               if(handle->display_type == PLAYER_DISPLAY_TYPE_X11 || handle->display_type == PLAYER_DISPLAY_TYPE_EVAS)
+               else
                {
-                       ret = mm_player_set_attribute(handle->mm_handle, NULL,"display_visible" , 0, (char*)NULL);
-                       if(ret != MM_ERROR_NONE)
+                       if (handle->user_cb[_PLAYER_EVENT_TYPE_SEEK])
                        {
-                               return __convert_error_code(ret,(char*)__FUNCTION__);
+                               handle->user_cb[_PLAYER_EVENT_TYPE_SEEK] = NULL;
+                               handle->user_data[_PLAYER_EVENT_TYPE_SEEK] = NULL;
                        }
-                       LOGE("[%s] show video display : %d",__FUNCTION__, ret);
-               }
 
-               handle->state = PLAYER_STATE_READY;
-               handle->is_stopped = TRUE;
-               LOGE("[%s] End", __FUNCTION__);
-               return PLAYER_ERROR_NONE;
+                       handle->state = PLAYER_STATE_READY;
+                       handle->is_stopped = TRUE;
+                       LOGI("[%s] End", __FUNCTION__);
+                       return PLAYER_ERROR_NONE;
+               }
        }
        else
        {
@@ -970,7 +1402,7 @@ int player_stop (player_h player)
 
 int player_pause (player_h player)
 {
-       LOGE("[%s] Start", __FUNCTION__);
+       LOGI("[%s] Start", __FUNCTION__);
        PLAYER_INSTANCE_CHECK(player);
        player_s * handle = (player_s *) player;
        PLAYER_STATE_CHECK(handle,PLAYER_STATE_PLAYING);
@@ -978,12 +1410,12 @@ int player_pause (player_h player)
        int ret = mm_player_pause(handle->mm_handle);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
                handle->state = PLAYER_STATE_PAUSED;
-               LOGE("[%s] End", __FUNCTION__);
+               LOGI("[%s] End", __FUNCTION__);
                return PLAYER_ERROR_NONE;
        }
 }
@@ -992,7 +1424,6 @@ int player_set_position (player_h player, int millisecond, player_seek_completed
 {
        PLAYER_INSTANCE_CHECK(player);
        PLAYER_CHECK_CONDITION(millisecond>=0  ,PLAYER_ERROR_INVALID_PARAMETER ,"PLAYER_ERROR_INVALID_PARAMETER" );
-
        player_s * handle = (player_s *) player;
        if (!__player_state_validate(handle, PLAYER_STATE_READY))
        {
@@ -1007,20 +1438,22 @@ int player_set_position (player_h player, int millisecond, player_seek_completed
        }
        else
        {
-               LOGE("[%s] Event type : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_SEEK);
+               LOGI("[%s] Event type : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_SEEK);
                handle->user_cb[_PLAYER_EVENT_TYPE_SEEK] = callback;
                handle->user_data[_PLAYER_EVENT_TYPE_SEEK] = user_data;
        }
        int ret = mm_player_set_attribute(handle->mm_handle, NULL, "accurate_seek", 1, (char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
 
        ret = mm_player_set_position(handle->mm_handle, MM_PLAYER_POS_FORMAT_TIME, millisecond);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               handle->user_cb[_PLAYER_EVENT_TYPE_SEEK] = NULL;
+               handle->user_data[_PLAYER_EVENT_TYPE_SEEK] = NULL;
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
@@ -1028,7 +1461,7 @@ int player_set_position (player_h player, int millisecond, player_seek_completed
        }
 }
 
-int player_seek (player_h player, int millisecond, bool accurate, player_seek_completed_cb callback, void *user_data)
+int player_set_play_position (player_h player, int millisecond, bool accurate, player_seek_completed_cb callback, void *user_data)
 {
        PLAYER_INSTANCE_CHECK(player);
        PLAYER_CHECK_CONDITION(millisecond>=0  ,PLAYER_ERROR_INVALID_PARAMETER ,"PLAYER_ERROR_INVALID_PARAMETER" );
@@ -1046,7 +1479,7 @@ int player_seek (player_h player, int millisecond, bool accurate, player_seek_co
        }
        else
        {
-               LOGE("[%s] Event type : %d, pos : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_SEEK, millisecond);
+               LOGI("[%s] Event type : %d, pos : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_SEEK, millisecond);
                handle->user_cb[_PLAYER_EVENT_TYPE_SEEK] = callback;
                handle->user_data[_PLAYER_EVENT_TYPE_SEEK] = user_data;
        }
@@ -1054,41 +1487,14 @@ int player_seek (player_h player, int millisecond, bool accurate, player_seek_co
        int ret = mm_player_set_attribute(handle->mm_handle, NULL, "accurate_seek", accurated, (char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        ret = mm_player_set_position(handle->mm_handle, MM_PLAYER_POS_FORMAT_TIME, millisecond);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       }
-       else
-       {
-               return PLAYER_ERROR_NONE;
-       }
-}
-
-int player_set_position_ratio (player_h player, int percent, player_seek_completed_cb callback, void *user_data)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       PLAYER_CHECK_CONDITION(percent>=0 && percent <= 100 ,PLAYER_ERROR_INVALID_PARAMETER ,"PLAYER_ERROR_INVALID_PARAMETER" );
-
-       player_s * handle = (player_s *) player;
-       if(handle->user_cb[_PLAYER_EVENT_TYPE_SEEK])
-       {
-               LOGE("[%s] PLAYER_ERROR_SEEK_FAILED (0x%08x) : seeking... we can't do any more " ,__FUNCTION__, PLAYER_ERROR_SEEK_FAILED);
-               return PLAYER_ERROR_SEEK_FAILED;
-       }
-       else
-       {
-               LOGI("[%s] Event type : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_SEEK);
-               handle->user_cb[_PLAYER_EVENT_TYPE_SEEK] = callback;
-               handle->user_data[_PLAYER_EVENT_TYPE_SEEK] = user_data;
-       }
-
-       int ret = mm_player_set_position(handle->mm_handle, MM_PLAYER_POS_FORMAT_PERCENT , percent);
-       if(ret != MM_ERROR_NONE)
-       {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               handle->user_cb[_PLAYER_EVENT_TYPE_SEEK] = NULL;
+               handle->user_data[_PLAYER_EVENT_TYPE_SEEK] = NULL;
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
@@ -1096,7 +1502,7 @@ int player_set_position_ratio (player_h player, int percent, player_seek_complet
        }
 }
 
-int player_get_position (player_h player, int *millisecond)
+int player_get_play_position (player_h player, int *millisecond)
 {
        PLAYER_INSTANCE_CHECK(player);
        PLAYER_NULL_ARG_CHECK(millisecond);
@@ -1110,7 +1516,7 @@ int player_get_position (player_h player, int *millisecond)
        int ret = mm_player_get_position(handle->mm_handle, MM_PLAYER_POS_FORMAT_TIME , &pos);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
@@ -1119,30 +1525,7 @@ int player_get_position (player_h player, int *millisecond)
        }
 }
 
-int player_get_position_ratio (player_h player,int *percent)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       PLAYER_NULL_ARG_CHECK(percent);
-       player_s * handle = (player_s *) player;
-       if (!__player_state_validate(handle, PLAYER_STATE_READY))
-       {
-               LOGE("[%s] PLAYER_ERROR_INVALID_STATE(0x%08x) : current state - %d" ,__FUNCTION__,PLAYER_ERROR_INVALID_STATE, handle->state);
-               return PLAYER_ERROR_INVALID_STATE;
-       }
-       int pos;
-       int ret = mm_player_get_position(handle->mm_handle, MM_PLAYER_POS_FORMAT_PERCENT, &pos);
-       if(ret != MM_ERROR_NONE)
-       {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       }
-       else
-       {
-               *percent=pos;
-               return PLAYER_ERROR_NONE;
-       }
-}
-
-int player_set_mute (player_h player, bool muted)
+int player_set_mute (player_h player, bool muted)
 {
        PLAYER_INSTANCE_CHECK(player);
        player_s * handle = (player_s *) player;
@@ -1150,7 +1533,7 @@ int player_set_mute (player_h player, bool muted)
        int ret = mm_player_set_mute(handle->mm_handle, muted);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
@@ -1168,7 +1551,7 @@ int player_is_muted (player_h player, bool *muted)
        int ret = mm_player_get_mute(handle->mm_handle, &_mute);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
@@ -1203,7 +1586,7 @@ int       player_set_looping (player_h player, bool looping)
 
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
@@ -1225,7 +1608,7 @@ int player_is_looping (player_h player, bool *looping)
        int ret = mm_player_get_attribute(handle->mm_handle, NULL,MM_PLAYER_PLAYBACK_COUNT , &count, (char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
@@ -1255,12 +1638,12 @@ int player_get_duration (player_h player, int *duration)
        int ret = mm_player_get_attribute(handle->mm_handle, NULL,MM_PLAYER_CONTENT_DURATION, &_duration, (char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
                *duration = _duration;
-               LOGI("[%s] duration : %d",__FUNCTION__,_duration);
+               //LOGI("[%s] duration : %d",__FUNCTION__,_duration);
                return PLAYER_ERROR_NONE;
        }
 }
@@ -1269,6 +1652,9 @@ int player_set_display(player_h player, player_display_type_e type, player_displ
 {
        PLAYER_INSTANCE_CHECK(player);
        player_s * handle = (player_s *) player;
+       Evas_Object *obj = NULL;
+       const char *object_type = NULL;
+       void *set_handle = NULL;
 
        int ret;
        if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
@@ -1277,6 +1663,12 @@ int player_set_display(player_h player, player_display_type_e type, player_displ
                return PLAYER_ERROR_INVALID_STATE;
        }
 
+       if (type != PLAYER_DISPLAY_TYPE_NONE && display == NULL)
+       {
+               LOGE("display type[%d] is not NONE, but display handle is NULL", type);
+               return PLAYER_ERROR_INVALID_PARAMETER;
+       }
+
        if (handle->is_set_pixmap_cb)
        {
                if (handle->state < PLAYER_STATE_READY)
@@ -1292,12 +1684,57 @@ int player_set_display(player_h player, player_display_type_e type, player_displ
                }
        }
 
-       void* temp;
+       void* temp = NULL;
+       if (type == PLAYER_DISPLAY_TYPE_NONE)
+       {
+               /* NULL surface */
+               handle->display_handle = 0;
+               handle->display_type = (int)MM_DISPLAY_SURFACE_NULL;
+               set_handle = NULL;
+       }
+       else
+       {
+               /* get handle from overlay or evas surface */
+               obj = (Evas_Object *)display;
+               object_type = evas_object_type_get(obj);
+               if (object_type)
+               {
+                       temp = handle->display_handle;
+                       if (type == PLAYER_DISPLAY_TYPE_OVERLAY && !strcmp(object_type, "elm_win"))
+                       {
+                               /* x window overlay surface */
+                               LOGI("overlay surface type");
+                               handle->display_handle = (void *)elm_win_xwindow_get(obj);
+                               set_handle = &(handle->display_handle);
+                       }
+                       else if (type == PLAYER_DISPLAY_TYPE_EVAS && !strcmp(object_type, "image"))
+                       {
+                               /* evas object surface */
+                               LOGI("evas surface type");
+                               handle->display_handle = display;
+                               set_handle = display;
+                       }
+                       else
+                       {
+                               LOGE("invalid surface type");
+                               return PLAYER_ERROR_INVALID_PARAMETER;
+                       }
+               }
+               else
+               {
+                       LOGE("falied to get evas object type from %p", obj);
+                       return PLAYER_ERROR_INVALID_PARAMETER;
+               }
+       }
+
+       /* set display handle */
        if (handle->display_type == (int)MM_DISPLAY_SURFACE_NULL || type == handle->display_type) // first time or same type
        {
-               temp = handle->display_handle;
-               handle->display_handle = display;
-               ret = mm_player_set_attribute(handle->mm_handle, NULL, "display_surface_type", type, "display_overlay" , type == PLAYER_DISPLAY_TYPE_X11 ? &handle->display_handle : display, sizeof(display), (char*)NULL);
+               ret = mm_player_set_attribute(handle->mm_handle, NULL,
+                       "display_surface_type", type,
+                       "display_overlay", set_handle,
+                       sizeof(display), (char*)NULL);
+
                if (ret != MM_ERROR_NONE)
                {
                        handle->display_handle = temp;
@@ -1305,17 +1742,19 @@ int player_set_display(player_h player, player_display_type_e type, player_displ
                }
                else
                {
-                       handle->display_type = type;
-                       LOGE("[%s] video display has been changed- type :%d, addr : 0x%x",__FUNCTION__,handle->display_type, handle->display_handle);
+                       if (type != PLAYER_DISPLAY_TYPE_NONE)
+                       {
+                               handle->display_type = type;
+                               LOGI("[%s] video display has been changed- type :%d, addr : 0x%x",
+                                       __FUNCTION__,handle->display_type, handle->display_handle);
+                       }
+                       else
+                               LOGI("NULL surface");
                }
-               LOGE("[%s] video display has been updated - type :%d",__FUNCTION__,type);
        }
        else //changing surface case
        {
-               temp = handle->display_handle;
-               handle->display_handle = display;
-
-               ret = mm_player_change_videosink(handle->mm_handle, type, type == PLAYER_DISPLAY_TYPE_X11 ? &handle->display_handle : display);
+               ret = mm_player_change_videosink(handle->mm_handle, type, set_handle);
                if (ret != MM_ERROR_NONE)
                {
                        handle->display_handle = temp;
@@ -1332,62 +1771,32 @@ int player_set_display(player_h player, player_display_type_e type, player_displ
                else
                {
                        handle->display_type = type;
-                       LOGE("[%s] video display has been changed- type :%d, addr : 0x%x",__FUNCTION__,handle->display_type, handle->display_handle);
+                       LOGI("[%s] video display has been changed- type :%d, addr : 0x%x",
+                               __FUNCTION__,handle->display_type, handle->display_handle);
                }
        }
 
        if(ret != MM_ERROR_NONE)
        {
                handle->display_type = MM_DISPLAY_SURFACE_NULL;
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
-               LOGE("[%s] End",__FUNCTION__);
                return PLAYER_ERROR_NONE;
        }
 }
 
-int player_is_display_mode_changeable(player_h player, bool* changeable)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       PLAYER_NULL_ARG_CHECK(changeable);
-       player_s * handle = (player_s *) player;
-       switch(handle->display_type)
-       {
-               case PLAYER_DISPLAY_TYPE_X11:
-                       *changeable = TRUE;
-                       break;
-               case PLAYER_DISPLAY_TYPE_EVAS:
-               {
-                       char *sink_name = NULL;
-                       int length;
-                       int scaling;
-                       int ret = mm_player_get_attribute(handle->mm_handle, NULL,"display_evas_surface_sink" ,&sink_name, &length, "display_evas_do_scaling", &scaling, (char*)NULL);
-                       if(ret != MM_ERROR_NONE)
-                               *changeable = FALSE;
-                       if (!strncmp(sink_name,"evaspixmapsink",length) && scaling==1)
-                       {
-                               *changeable = TRUE;
-                       }
-                       break;
-               }
-               default:
-                       *changeable = FALSE;
-                       break;
-       }
-       return PLAYER_ERROR_NONE;
-}
-
 int player_set_display_mode(player_h player, player_display_mode_e mode)
 {
        PLAYER_INSTANCE_CHECK(player);
        player_s * handle = (player_s *) player;
+       LOGI("[%s] mode:%d", __FUNCTION__, mode);
 
        int ret = mm_player_set_attribute(handle->mm_handle, NULL,"display_method" , mode, (char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
                return PLAYER_ERROR_NONE;
@@ -1401,7 +1810,7 @@ int player_get_display_mode(player_h player, player_display_mode_e *mode)
        int ret = mm_player_get_attribute(handle->mm_handle, NULL,"display_method"  ,mode, (char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
@@ -1411,7 +1820,7 @@ int player_get_display_mode(player_h player, player_display_mode_e *mode)
 
 int player_set_playback_rate(player_h player, float rate)
 {
-       LOGE("[%s] rate : %0.1f", __FUNCTION__, rate);
+       LOGI("[%s] rate : %0.1f", __FUNCTION__, rate);
        PLAYER_INSTANCE_CHECK(player);
        PLAYER_CHECK_CONDITION(rate>=-5.0 && rate <= 5.0 ,PLAYER_ERROR_INVALID_PARAMETER,"PLAYER_ERROR_INVALID_PARAMETER" );
        player_s * handle = (player_s *) player;
@@ -1436,13 +1845,13 @@ int player_set_playback_rate(player_h player, float rate)
                        ret = PLAYER_ERROR_INVALID_OPERATION;
                        break;
                default:
-                       return __convert_error_code(ret,(char*)__FUNCTION__);
+                       return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        return ret;
 }
 
 
-int player_set_x11_display_rotation(player_h player, player_display_rotation_e rotation)
+int player_set_display_rotation(player_h player, player_display_rotation_e rotation)
 {
        PLAYER_INSTANCE_CHECK(player);
        player_s * handle = (player_s *) player;
@@ -1450,13 +1859,13 @@ int player_set_x11_display_rotation(player_h player, player_display_rotation_e r
        int ret = mm_player_set_attribute(handle->mm_handle, NULL,MM_PLAYER_VIDEO_ROTATION , rotation, (char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
                return PLAYER_ERROR_NONE;
 }
 
-int player_get_x11_display_rotation( player_h player, player_display_rotation_e *rotation)
+int player_get_display_rotation( player_h player, player_display_rotation_e *rotation)
 {
        PLAYER_INSTANCE_CHECK(player);
        PLAYER_NULL_ARG_CHECK(rotation);
@@ -1464,7 +1873,7 @@ int player_get_x11_display_rotation( player_h player, player_display_rotation_e
        int ret = mm_player_get_attribute(handle->mm_handle, NULL,MM_PLAYER_VIDEO_ROTATION ,rotation, (char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
@@ -1472,7 +1881,7 @@ int player_get_x11_display_rotation( player_h player, player_display_rotation_e
        }
 }
 
-int player_set_x11_display_visible(player_h player, bool visible)
+int player_set_display_visible(player_h player, bool visible)
 {
        PLAYER_INSTANCE_CHECK(player);
        player_s * handle = (player_s *) player;
@@ -1486,7 +1895,7 @@ int player_set_x11_display_visible(player_h player, bool visible)
        int ret = mm_player_set_attribute(handle->mm_handle, NULL,"display_visible" , value, (char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
@@ -1495,7 +1904,7 @@ int player_set_x11_display_visible(player_h player, bool visible)
        }
 }
 
-int player_is_x11_display_visible(player_h player, bool* visible)
+int player_is_display_visible(player_h player, bool* visible)
 {
        PLAYER_INSTANCE_CHECK(player);
        PLAYER_NULL_ARG_CHECK(visible);
@@ -1504,7 +1913,7 @@ int player_is_x11_display_visible(player_h player, bool* visible)
        int ret = mm_player_get_attribute(handle->mm_handle, NULL,"display_visible" ,&count, (char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
@@ -1521,202 +1930,6 @@ int player_is_x11_display_visible(player_h player, bool* visible)
        }
 }
 
-int player_set_x11_display_zoom(player_h player, int level)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       PLAYER_CHECK_CONDITION(level>0 && level < 10 ,PLAYER_ERROR_INVALID_PARAMETER,"PLAYER_ERROR_INVALID_PARAMETER" );
-
-       player_s * handle = (player_s *) player;
-       int ret = mm_player_set_attribute(handle->mm_handle, NULL,"display_zoom" , level, (char*)NULL);
-       if(ret != MM_ERROR_NONE)
-       {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       }
-       else
-               return PLAYER_ERROR_NONE;
-}
-
-int player_get_x11_display_zoom( player_h player, int *level)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       PLAYER_NULL_ARG_CHECK(level);
-       player_s * handle = (player_s *) player;
-       int _level;
-       int ret = mm_player_get_attribute(handle->mm_handle, NULL,"display_zoom" , &_level, (char*)NULL);
-       if(ret != MM_ERROR_NONE)
-       {
-               *level=-1;
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       }
-       else
-       {
-               *level = _level;
-               return PLAYER_ERROR_NONE;
-       }
-}
-
-int player_set_x11_display_pixmap (player_h player, player_x11_pixmap_updated_cb callback, void *user_data)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       PLAYER_NULL_ARG_CHECK(callback);
-       player_s * handle = (player_s *) player;
-
-       if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
-       {
-               LOGE("[%s] PLAYER_ERROR_INVALID_STATE(0x%08x) : current state - %d" ,__FUNCTION__,PLAYER_ERROR_INVALID_STATE, handle->state);
-               return PLAYER_ERROR_INVALID_STATE;
-       }
-
-       if (!handle->is_set_pixmap_cb && handle->display_type != ((int)MM_DISPLAY_SURFACE_NULL))
-       {
-               LOGE("[%s] player_set_display() was set, try it again after calling player_unprepare()" ,__FUNCTION__,PLAYER_ERROR_INVALID_OPERATION);
-               LOGE("[%s] PLAYER_ERROR_INVALID_OPERATION(0x%08x)" ,__FUNCTION__,PLAYER_ERROR_INVALID_OPERATION);
-               return PLAYER_ERROR_INVALID_OPERATION;
-       }
-
-       int ret = mm_player_set_attribute(handle->mm_handle, NULL, "display_surface_type", MM_DISPLAY_SURFACE_X_EXT, "display_overlay" , callback , sizeof(callback), "display_overlay_user_data", user_data, sizeof(user_data), (char*)NULL);
-       if(ret != MM_ERROR_NONE)
-       {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       }
-       else
-       {
-               handle->is_set_pixmap_cb = true;
-               handle->display_type = MM_DISPLAY_SURFACE_X;
-               handle->display_handle = callback;
-               LOGE("[%s] video display has been changed- type :%d, pixmap_callback addr : 0x%x",__FUNCTION__,handle->display_type, handle->display_handle);
-               return PLAYER_ERROR_NONE;
-       }
-
-}
-
-int player_set_x11_display_pixmap_error_cb (player_h player, player_x11_pixmap_error_cb callback, void *user_data)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       PLAYER_NULL_ARG_CHECK(callback);
-       player_s * handle = (player_s *) player;
-
-       if (!__player_state_validate(handle, PLAYER_STATE_IDLE))
-       {
-               LOGE("[%s] PLAYER_ERROR_INVALID_STATE(0x%08x) : current state - %d" ,__FUNCTION__,PLAYER_ERROR_INVALID_STATE, handle->state);
-               return PLAYER_ERROR_INVALID_STATE;
-       }
-
-       int ret = mm_player_set_video_frame_render_error_callback(handle->mm_handle, __video_frame_render_error_callback, (void*)handle);
-       if(ret != MM_ERROR_NONE)
-       {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       }
-       else
-       {
-               LOGE("[%s] set pixmap_error_cb(0x%08x) and user_data(0x%8x)" ,__FUNCTION__, callback, user_data);
-               handle->user_cb[_PLAYER_EVENT_TYPE_VIDEO_FRAME_RENDER_ERROR] = callback;
-               handle->user_data[_PLAYER_EVENT_TYPE_VIDEO_FRAME_RENDER_ERROR] = user_data;
-               LOGI("[%s] Event type : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_VIDEO_FRAME_RENDER_ERROR);
-               return PLAYER_ERROR_NONE;
-       }
-}
-
-int player_set_x11_display_roi (player_h player, int x, int y, int w, int h)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       PLAYER_CHECK_CONDITION(x >= 0 && y >= 0 && w >= 0 && h >= 0,PLAYER_ERROR_INVALID_PARAMETER,"PLAYER_ERROR_INVALID_PARAMETER" );
-
-       player_display_mode_e mode;
-       player_s * handle = (player_s *) player;
-
-       int ret = mm_player_get_attribute(handle->mm_handle, NULL,"display_method", &mode, (char*)NULL);
-       if(ret != MM_ERROR_NONE)
-       {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       }
-       if (mode != PLAYER_DISPLAY_MODE_ROI)
-       {
-               ret = MM_ERROR_PLAYER_INTERNAL;
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       }
-
-       ret = mm_player_set_attribute(handle->mm_handle, NULL,
-                                                       "display_roi_x", x,
-                                                       "display_roi_y", y,
-                                                       "display_roi_width", w,
-                                                       "display_roi_height", h,
-                                                       (char*)NULL);
-       if(ret != MM_ERROR_NONE)
-       {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       }
-       else
-       {
-               return PLAYER_ERROR_NONE;
-       }
-}
-
-int player_get_x11_display_roi (player_h player, int *x, int *y, int *w, int *h)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       PLAYER_NULL_ARG_CHECK(x);
-       PLAYER_NULL_ARG_CHECK(y);
-       PLAYER_NULL_ARG_CHECK(w);
-       PLAYER_NULL_ARG_CHECK(h);
-
-       player_display_mode_e mode;
-       player_s * handle = (player_s *) player;
-       int _x = 0;
-       int _y = 0;
-       int _w = 0;
-       int _h = 0;
-
-       int ret = mm_player_get_attribute(handle->mm_handle, NULL,"display_method", &mode, (char*)NULL);
-       if(ret != MM_ERROR_NONE)
-       {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       }
-       if (mode != PLAYER_DISPLAY_MODE_ROI)
-       {
-               ret = MM_ERROR_PLAYER_INTERNAL;
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       }
-
-       ret = mm_player_get_attribute(handle->mm_handle, NULL,
-                                                       "display_roi_x", &_x,
-                                                       "display_roi_y", &_y,
-                                                       "display_roi_width", &_w,
-                                                       "display_roi_height", &_h,
-                                                       (char*)NULL);
-       if(ret != MM_ERROR_NONE)
-       {
-               *x = _x = 0;
-               *y = _y = 0;
-               *w = _w = 0;
-               *h = _h = 0;
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       }
-       else
-       {
-               *x = _x;
-               *y = _y;
-               *w = _w;
-               *h = _h;
-               return PLAYER_ERROR_NONE;
-       }
-}
-
-int player_enable_evas_display_scaling(player_h player, bool enable)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       player_s * handle = (player_s *) player;
-
-       int scaling = enable?1:0;
-       int ret = mm_player_set_attribute(handle->mm_handle, NULL,"display_evas_do_scaling" , scaling, (char*)NULL);
-       if(ret != MM_ERROR_NONE)
-       {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       }
-       else
-               return PLAYER_ERROR_NONE;
-}
-
 int player_get_content_info(player_h player, player_content_info_e key, char ** value)
 {
        PLAYER_INSTANCE_CHECK(player);
@@ -1759,7 +1972,7 @@ int player_get_content_info(player_h player, player_content_info_e key, char **
        int ret = mm_player_get_attribute(handle->mm_handle, NULL,attr ,&val, &val_len, (char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
@@ -1798,7 +2011,7 @@ int player_get_codec_info(player_h player, char **audio_codec, char **video_code
        int ret = mm_player_get_attribute(handle->mm_handle, NULL,MM_PLAYER_AUDIO_CODEC,&audio,&audio_len,MM_PLAYER_VIDEO_CODEC,&video,&video_len,(char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
@@ -1833,7 +2046,7 @@ int player_get_audio_stream_info(player_h player, int *sample_rate, int *channel
        int ret = mm_player_get_attribute(handle->mm_handle, NULL,MM_PLAYER_AUDIO_SAMPLERATE,sample_rate,MM_PLAYER_AUDIO_CHANNEL,channel,MM_PLAYER_AUDIO_BITRATE,bit_rate,(char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        return PLAYER_ERROR_NONE;
 }
@@ -1852,7 +2065,7 @@ int player_get_video_stream_info(player_h player, int *fps, int *bit_rate)
        int ret = mm_player_get_attribute(handle->mm_handle, NULL,"content_video_fps",fps,"content_video_bitrate",bit_rate,(char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        return PLAYER_ERROR_NONE;
 }
@@ -1873,13 +2086,13 @@ int player_get_video_size (player_h player, int *width, int *height)
        int ret = mm_player_get_attribute(handle->mm_handle, NULL,MM_PLAYER_VIDEO_WIDTH ,&w,  MM_PLAYER_VIDEO_HEIGHT, &h, (char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
                *width = w;
                *height = h;
-               LOGE("[%s] width : %d, height : %d",__FUNCTION__,w, h);
+               LOGI("[%s] width : %d, height : %d",__FUNCTION__,w, h);
                return PLAYER_ERROR_NONE;
        }
 }
@@ -1898,155 +2111,11 @@ int player_get_album_art(player_h player, void **album_art, int *size)
        int ret = mm_player_get_attribute(handle->mm_handle, NULL,"tag_album_cover",album_art,size,(char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       }
-       return PLAYER_ERROR_NONE;
-}
-
-int player_get_track_count(player_h player, player_track_type_e type, int *count)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       PLAYER_NULL_ARG_CHECK(count);
-       player_s * handle = (player_s *) player;
-       if (!__player_state_validate(handle, PLAYER_STATE_READY))
-       {
-               LOGE("[%s] PLAYER_ERROR_INVALID_STATE (0x%08x) :  current state - %d" ,__FUNCTION__, PLAYER_ERROR_INVALID_STATE, handle->state);
-               return PLAYER_ERROR_INVALID_STATE;
-       }
-       int ret = mm_player_get_track_count(handle->mm_handle, type, count);
-       if(ret != MM_ERROR_NONE)
-       {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       }
-       return PLAYER_ERROR_NONE;
-}
-
-int player_audio_effect_set_value(player_h player, audio_effect_e effect, int value)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       player_s * handle = (player_s *) player;
-       int ret = mm_player_audio_effect_custom_set_level(handle->mm_handle,effect,0,value);
-       if(ret != MM_ERROR_NONE)
-       {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       }
-       else
-       {
-               ret = mm_player_audio_effect_custom_apply(handle->mm_handle);
-               return (ret==MM_ERROR_NONE)?PLAYER_ERROR_NONE:__convert_error_code(ret,(char*)__FUNCTION__);
-       }
-}
-
-int player_audio_effect_get_value(player_h player, audio_effect_e effect, int *value)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       PLAYER_NULL_ARG_CHECK(value);
-       player_s * handle = (player_s *) player;
-       int ret = mm_player_audio_effect_custom_get_level(handle->mm_handle,effect,0,value);
-       if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       else
-               return PLAYER_ERROR_NONE;
-}
-
-int player_audio_effect_clear(player_h player, audio_effect_e effect)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       player_s * handle = (player_s *) player;
-       int ret = mm_player_audio_effect_custom_clear_ext_all(handle->mm_handle);
-       if(ret != MM_ERROR_NONE)
-       {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       }
-       else
-       {
-               ret = mm_player_audio_effect_custom_apply(handle->mm_handle);
-               return (ret==MM_ERROR_NONE)?PLAYER_ERROR_NONE:__convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
-}
-
-int player_audio_effect_get_value_range(player_h player, audio_effect_e effect, int* min, int* max)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       PLAYER_NULL_ARG_CHECK(min);
-       PLAYER_NULL_ARG_CHECK(max);
-       player_s * handle = (player_s *) player;
-       int ret = mm_player_audio_effect_custom_get_level_range(handle->mm_handle, effect, min, max);
-       if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       else
-               return PLAYER_ERROR_NONE;
-}
-
-int player_audio_effect_is_available(player_h player, audio_effect_e effect, bool *available)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       PLAYER_NULL_ARG_CHECK(available);
-       player_s * handle = (player_s *) player;
-       int ret = mm_player_is_supported_custom_effect_type(handle->mm_handle, effect);
-       if(ret != MM_ERROR_NONE)
-               *available = FALSE;
-       else
-               *available = TRUE;
        return PLAYER_ERROR_NONE;
 }
 
-int player_audio_effect_foreach_supported_effect(player_h player, player_audio_effect_supported_effect_cb callback, void *user_data)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       PLAYER_NULL_ARG_CHECK(callback);
-       player_s * handle = (player_s *) player;
-
-       LOGI("[%s] Event type : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_SUPPORTED_AUDIO_EFFECT);
-       handle->user_cb[_PLAYER_EVENT_TYPE_SUPPORTED_AUDIO_EFFECT] = callback;
-       handle->user_data[_PLAYER_EVENT_TYPE_SUPPORTED_AUDIO_EFFECT] = user_data;
-       int ret = mm_player_get_foreach_present_supported_effect_type(handle->mm_handle, MM_AUDIO_EFFECT_TYPE_CUSTOM, __supported_audio_effect_type, (void*)handle);
-       if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       else
-               return PLAYER_ERROR_NONE;
-}
-
-int player_audio_effect_set_preset(player_h player, audio_effect_preset_e preset)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       player_s * handle = (player_s *) player;
-       int ret = mm_player_audio_effect_preset_apply(handle->mm_handle, preset);
-       if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       else
-               return PLAYER_ERROR_NONE;
-}
-
-int player_audio_effect_preset_is_available(player_h player, audio_effect_preset_e preset, bool *available)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       PLAYER_NULL_ARG_CHECK(available);
-       player_s * handle = (player_s *) player;
-       int ret = mm_player_is_supported_preset_effect_type(handle->mm_handle, preset);
-       if(ret != MM_ERROR_NONE)
-               *available = FALSE;
-       else
-               *available = TRUE;
-       return PLAYER_ERROR_NONE;
-}
-
-int player_audio_effect_foreach_supported_preset(player_h player, player_audio_effect_supported_preset_cb callback, void *user_data)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       PLAYER_NULL_ARG_CHECK(callback);
-       player_s * handle = (player_s *) player;
-
-       LOGI("[%s] Event type : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_SUPPORTED_AUDIO_EFFECT_PRESET);
-       handle->user_cb[_PLAYER_EVENT_TYPE_SUPPORTED_AUDIO_EFFECT_PRESET] = callback;
-       handle->user_data[_PLAYER_EVENT_TYPE_SUPPORTED_AUDIO_EFFECT_PRESET] = user_data;
-       int ret = mm_player_get_foreach_present_supported_effect_type(handle->mm_handle, MM_AUDIO_EFFECT_TYPE_PRESET, __supported_audio_effect_preset, (void*)handle);
-       if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       else
-               return PLAYER_ERROR_NONE;
-}
-
 int player_audio_effect_get_equalizer_bands_count (player_h player, int *count)
 {
        PLAYER_INSTANCE_CHECK(player);
@@ -2054,7 +2123,7 @@ int player_audio_effect_get_equalizer_bands_count (player_h player, int *count)
        player_s * handle = (player_s *) player;
        int ret = mm_player_audio_effect_custom_get_eq_bands_number(handle->mm_handle, count);
        if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        else
                return PLAYER_ERROR_NONE;
 }
@@ -2067,12 +2136,12 @@ int player_audio_effect_set_equalizer_all_bands(player_h player, int *band_level
        int ret = mm_player_audio_effect_custom_set_level_eq_from_list(handle->mm_handle, band_levels, length);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
                ret = mm_player_audio_effect_custom_apply(handle->mm_handle);
-               return (ret==MM_ERROR_NONE)?PLAYER_ERROR_NONE:__convert_error_code(ret,(char*)__FUNCTION__);
+               return (ret==MM_ERROR_NONE)?PLAYER_ERROR_NONE:__player_convert_error_code(ret,(char*)__FUNCTION__);
        }
 }
 
@@ -2083,12 +2152,12 @@ int player_audio_effect_set_equalizer_band_level(player_h player, int index, int
        int ret = mm_player_audio_effect_custom_set_level(handle->mm_handle,MM_AUDIO_EFFECT_CUSTOM_EQ, index, level);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
                ret = mm_player_audio_effect_custom_apply(handle->mm_handle);
-               return (ret==MM_ERROR_NONE)?PLAYER_ERROR_NONE:__convert_error_code(ret,(char*)__FUNCTION__);
+               return (ret==MM_ERROR_NONE)?PLAYER_ERROR_NONE:__player_convert_error_code(ret,(char*)__FUNCTION__);
        }
 }
 
@@ -2099,7 +2168,7 @@ int player_audio_effect_get_equalizer_band_level(player_h player, int index, int
        player_s * handle = (player_s *) player;
        int ret = mm_player_audio_effect_custom_get_level(handle->mm_handle,MM_AUDIO_EFFECT_CUSTOM_EQ, index, level);
        if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        else
                return PLAYER_ERROR_NONE;
 }
@@ -2112,7 +2181,7 @@ int player_audio_effect_get_equalizer_level_range(player_h player, int* min, int
        player_s * handle = (player_s *) player;
        int ret = mm_player_audio_effect_custom_get_level_range(handle->mm_handle, MM_AUDIO_EFFECT_CUSTOM_EQ, min, max);
        if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        else
                return PLAYER_ERROR_NONE;
 }
@@ -2124,7 +2193,7 @@ int player_audio_effect_get_equalizer_band_frequency(player_h player, int index,
        player_s * handle = (player_s *) player;
        int ret = mm_player_audio_effect_custom_get_eq_bands_freq(handle->mm_handle, index, frequency);
        if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        else
                return PLAYER_ERROR_NONE;
 }
@@ -2136,7 +2205,7 @@ int player_audio_effect_get_equalizer_band_frequency_range(player_h player, int
        player_s * handle = (player_s *) player;
        int ret = mm_player_audio_effect_custom_get_eq_bands_width(handle->mm_handle, index, range);
        if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        else
                return PLAYER_ERROR_NONE;
 }
@@ -2148,12 +2217,12 @@ int player_audio_effect_equalizer_clear(player_h player)
        int ret = mm_player_audio_effect_custom_clear_eq_all(handle->mm_handle);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
                ret = mm_player_audio_effect_custom_apply(handle->mm_handle);
-               return (ret==MM_ERROR_NONE)?PLAYER_ERROR_NONE:__convert_error_code(ret,(char*)__FUNCTION__);
+               return (ret==MM_ERROR_NONE)?PLAYER_ERROR_NONE:__player_convert_error_code(ret,(char*)__FUNCTION__);
        }
 }
 
@@ -2173,23 +2242,26 @@ int player_audio_effect_equalizer_is_available(player_h player, bool *available)
 int player_set_subtitle_path(player_h player,const char* path)
 {
        PLAYER_INSTANCE_CHECK(player);
-       PLAYER_NULL_ARG_CHECK(path);
        player_s * handle = (player_s *) player;
-       PLAYER_STATE_CHECK(handle,PLAYER_STATE_IDLE);
 
-       int ret = mm_player_set_attribute(handle->mm_handle, NULL,"subtitle_uri" , path, strlen(path), (char*)NULL);
+       if ((path == NULL) && (handle->state != PLAYER_STATE_IDLE))
+       {
+               return PLAYER_ERROR_INVALID_PARAMETER;
+       }
+
+       int ret = mm_player_set_external_subtitle_path(handle->mm_handle, path);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
                return PLAYER_ERROR_NONE;
 }
 
-int player_set_subtitle_position(player_h player, int millisecond)
+int player_set_subtitle_position_offset(player_h player, int millisecond)
 {
        PLAYER_INSTANCE_CHECK(player);
-       PLAYER_CHECK_CONDITION(millisecond>=0  ,PLAYER_ERROR_INVALID_PARAMETER ,"PLAYER_ERROR_INVALID_PARAMETER" );
+//PLAYER_CHECK_CONDITION(millisecond>=0  ,PLAYER_ERROR_INVALID_PARAMETER ,"PLAYER_ERROR_INVALID_PARAMETER" );
        player_s * handle = (player_s *) player;
        if (!__player_state_validate(handle, PLAYER_STATE_PLAYING))
        {
@@ -2200,7 +2272,7 @@ int player_set_subtitle_position(player_h player, int millisecond)
        int ret = mm_player_adjust_subtitle_position(handle->mm_handle, MM_PLAYER_POS_FORMAT_TIME, millisecond);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
                return PLAYER_ERROR_NONE;
@@ -2213,10 +2285,10 @@ int player_set_progressive_download_path(player_h player, const char *path)
        player_s * handle = (player_s *) player;
        PLAYER_STATE_CHECK(handle,PLAYER_STATE_IDLE);
 
-       int ret = mm_player_set_attribute(handle->mm_handle, NULL,"pd_mode", MM_PLAYER_PD_MODE_URI, "pd_location", path, strlen(path), (char*)NULL);
+       int ret = mm_player_set_attribute(handle->mm_handle, NULL, "pd_mode", MM_PLAYER_PD_MODE_URI, "pd_location", path, strlen(path), (char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
@@ -2242,7 +2314,7 @@ int player_get_progressive_download_status(player_h player, unsigned long *curre
        int ret = mm_player_get_pd_status(handle->mm_handle, &_current, &_total);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
@@ -2265,12 +2337,12 @@ int player_capture_video(player_h player, player_video_captured_cb callback, voi
        }
        else
        {
-               LOGE("[%s] Event type : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_CAPTURE);
+               LOGI("[%s] Event type : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_CAPTURE);
                handle->user_cb[_PLAYER_EVENT_TYPE_CAPTURE] = callback;
                handle->user_data[_PLAYER_EVENT_TYPE_CAPTURE] = user_data;
        }
 
-       if(handle->state == PLAYER_STATE_PAUSED || handle->state == PLAYER_STATE_PLAYING )
+       if(handle->state >= PLAYER_STATE_READY)
        {
                int ret = mm_player_do_video_capture(handle->mm_handle);
                if(ret==MM_ERROR_PLAYER_NO_OP)
@@ -2284,7 +2356,7 @@ int player_capture_video(player_h player, player_video_captured_cb callback, voi
                {
                        handle->user_cb[_PLAYER_EVENT_TYPE_CAPTURE] = NULL;
                        handle->user_data[_PLAYER_EVENT_TYPE_CAPTURE] = NULL;
-                       return __convert_error_code(ret,(char*)__FUNCTION__);
+                       return __player_convert_error_code(ret,(char*)__FUNCTION__);
                }
                else
                        return PLAYER_ERROR_NONE;
@@ -2309,7 +2381,7 @@ int player_set_streaming_cookie(player_h player, const char *cookie, int size)
        int ret = mm_player_set_attribute(handle->mm_handle, NULL,"streaming_cookie", cookie, size, (char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
                return PLAYER_ERROR_NONE;
@@ -2326,7 +2398,7 @@ int player_set_streaming_user_agent(player_h player, const char *user_agent, int
        int ret = mm_player_set_attribute(handle->mm_handle, NULL,"streaming_user_agent", user_agent, size, (char*)NULL);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
                return PLAYER_ERROR_NONE;
@@ -2348,7 +2420,7 @@ int player_get_streaming_download_progress(player_h player, int *start, int *cur
        int ret = mm_player_get_buffer_position(handle->mm_handle,MM_PLAYER_POS_FORMAT_PERCENT,&_start,&_current);
        if(ret != MM_ERROR_NONE)
        {
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        }
        else
        {
@@ -2408,121 +2480,92 @@ int player_unset_subtitle_updated_cb (player_h player)
        return __unset_callback(_PLAYER_EVENT_TYPE_SUBTITLE,player);
 }
 
-int player_set_video_frame_decoded_cb(player_h player, player_video_frame_decoded_cb callback, void *user_data)
+int player_set_progressive_download_message_cb(player_h player, player_pd_message_cb callback, void *user_data)
 {
        PLAYER_INSTANCE_CHECK(player);
        PLAYER_NULL_ARG_CHECK(callback);
        player_s * handle = (player_s *) player;
-       if (handle->state != PLAYER_STATE_IDLE )
+       if (handle->state != PLAYER_STATE_IDLE  &&  handle->state != PLAYER_STATE_READY)
        {
                LOGE("[%s] PLAYER_ERROR_INVALID_STATE(0x%08x) : current state - %d" ,__FUNCTION__,PLAYER_ERROR_INVALID_STATE, handle->state);
                return PLAYER_ERROR_INVALID_STATE;
        }
 
-       int ret = mm_player_set_video_stream_callback(handle->mm_handle, __video_stream_callback, (void*)handle);
+       int ret = mm_player_set_pd_message_callback(handle->mm_handle, __pd_message_callback, (void*)handle);
        if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
 
-       handle->user_cb[_PLAYER_EVENT_TYPE_VIDEO_FRAME] = callback;
-       handle->user_data[_PLAYER_EVENT_TYPE_VIDEO_FRAME] = user_data;
-       LOGI("[%s] Event type : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_VIDEO_FRAME);
+       handle->user_cb[_PLAYER_EVENT_TYPE_PD] = callback;
+       handle->user_data[_PLAYER_EVENT_TYPE_PD] = user_data;
+       LOGI("[%s] Event type : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_PD);
        return PLAYER_ERROR_NONE;
 }
 
-int player_unset_video_frame_decoded_cb(player_h player)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       player_s * handle = (player_s *) player;
-       handle->user_cb[_PLAYER_EVENT_TYPE_VIDEO_FRAME] = NULL;
-       handle->user_data[_PLAYER_EVENT_TYPE_VIDEO_FRAME] = NULL;
-       LOGI("[%s] Event type : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_VIDEO_FRAME);
-       int ret = mm_player_set_video_stream_callback(handle->mm_handle, NULL, NULL);
-       if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-       else
-               return PLAYER_ERROR_NONE;
-}
-
-int player_set_audio_frame_decoded_cb(player_h player, int start, int end, player_audio_frame_decoded_cb callback, void *user_data)
+int player_unset_progressive_download_message_cb(player_h player)
 {
        PLAYER_INSTANCE_CHECK(player);
-       PLAYER_NULL_ARG_CHECK(callback);
-       PLAYER_CHECK_CONDITION(start>=0 ,PLAYER_ERROR_INVALID_PARAMETER,"PLAYER_ERROR_INVALID_PARAMETER" );
-       PLAYER_CHECK_CONDITION(end>=start ,PLAYER_ERROR_INVALID_PARAMETER,"PLAYER_ERROR_INVALID_PARAMETER" );
        player_s * handle = (player_s *) player;
-       if (handle->state != PLAYER_STATE_IDLE)
-       {
-               LOGE("[%s] PLAYER_ERROR_INVALID_STATE(0x%08x) : current state - %d" ,__FUNCTION__,PLAYER_ERROR_INVALID_STATE, handle->state);
-               return PLAYER_ERROR_INVALID_STATE;
-       }
 
-       int ret = mm_player_set_attribute(handle->mm_handle, NULL, "pcm_extraction",TRUE, "pcm_extraction_start_msec", start, "pcm_extraction_end_msec", end, NULL);
-       if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+       handle->user_cb[_PLAYER_EVENT_TYPE_PD] = NULL;
+       handle->user_data[_PLAYER_EVENT_TYPE_PD] = NULL;
+       LOGI("[%s] Event type : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_PD);
 
-       ret = mm_player_set_audio_stream_callback(handle->mm_handle, __audio_stream_callback, (void*)handle);
+       int ret = mm_player_set_pd_message_callback(handle->mm_handle, NULL, NULL);
        if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-
-       handle->user_cb[_PLAYER_EVENT_TYPE_AUDIO_FRAME] = callback;
-       handle->user_data[_PLAYER_EVENT_TYPE_AUDIO_FRAME] = user_data;
-       LOGI("[%s] Event type : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_AUDIO_FRAME);
-       return PLAYER_ERROR_NONE;
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
+       else
+               return PLAYER_ERROR_NONE;
 }
 
-int player_unset_audio_frame_decoded_cb(player_h player)
+int player_ignore_session(player_h player)
 {
        PLAYER_INSTANCE_CHECK(player);
        player_s * handle = (player_s *) player;
+       PLAYER_STATE_CHECK(handle,PLAYER_STATE_IDLE);
 
-       handle->user_cb[_PLAYER_EVENT_TYPE_AUDIO_FRAME] = NULL;
-       handle->user_data[_PLAYER_EVENT_TYPE_AUDIO_FRAME] = NULL;
-       LOGI("[%s] Event type : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_AUDIO_FRAME);
-
-       int ret = mm_player_set_attribute(handle->mm_handle, NULL, "pcm_extraction",FALSE, NULL);
-       if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
-
-       ret = mm_player_set_audio_stream_callback(handle->mm_handle, NULL, NULL);
+       int ret = MM_ERROR_NONE; //CHECK = mm_player_ignore_session(handle->mm_handle);
        if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        else
                return PLAYER_ERROR_NONE;
 }
 
-int player_set_progressive_download_message_cb(player_h player, player_pd_message_cb callback, void *user_data)
+int player_set_media_packet_video_frame_decoded_cb(player_h player, player_media_packet_video_decoded_cb callback, void *user_data)
 {
        PLAYER_INSTANCE_CHECK(player);
        PLAYER_NULL_ARG_CHECK(callback);
+
        player_s * handle = (player_s *) player;
-       if (handle->state != PLAYER_STATE_IDLE  &&  handle->state != PLAYER_STATE_READY)
+       if (handle->state != PLAYER_STATE_IDLE)
        {
                LOGE("[%s] PLAYER_ERROR_INVALID_STATE(0x%08x) : current state - %d" ,__FUNCTION__,PLAYER_ERROR_INVALID_STATE, handle->state);
                return PLAYER_ERROR_INVALID_STATE;
        }
 
-       int ret = mm_player_set_pd_message_callback(handle->mm_handle, __pd_message_callback, (void*)handle);
+       mm_player_enable_media_packet_video_stream(handle->mm_handle, TRUE);
+
+       int ret = mm_player_set_video_stream_callback(handle->mm_handle, __video_stream_callback, (void*)handle);
        if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
+
+       handle->user_cb[_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME] = callback;
+       handle->user_data[_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME] = user_data;
+       LOGI("Event type : %d ", _PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME);
 
-       handle->user_cb[_PLAYER_EVENT_TYPE_PD] = callback;
-       handle->user_data[_PLAYER_EVENT_TYPE_PD] = user_data;
-       LOGI("[%s] Event type : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_PD);
        return PLAYER_ERROR_NONE;
 }
 
-int player_unset_progressive_download_message_cb(player_h player)
+int player_unset_media_packet_video_frame_decoded_cb(player_h player)
 {
        PLAYER_INSTANCE_CHECK(player);
        player_s * handle = (player_s *) player;
+       handle->user_cb[_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME] = NULL;
+       handle->user_data[_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME] = NULL;
+       LOGI("Event type : %d ", _PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME);
 
-       handle->user_cb[_PLAYER_EVENT_TYPE_PD] = NULL;
-       handle->user_data[_PLAYER_EVENT_TYPE_PD] = NULL;
-       LOGI("[%s] Event type : %d ",__FUNCTION__, _PLAYER_EVENT_TYPE_PD);
-
-       int ret = mm_player_set_pd_message_callback(handle->mm_handle, NULL, NULL);
+       int ret = mm_player_set_video_stream_callback(handle->mm_handle, NULL, NULL);
        if(ret != MM_ERROR_NONE)
-               return __convert_error_code(ret,(char*)__FUNCTION__);
+               return __player_convert_error_code(ret,(char*)__FUNCTION__);
        else
                return PLAYER_ERROR_NONE;
 }
index 1df3198..35bf443 100644 (file)
@@ -19,6 +19,7 @@ FOREACH(flag ${${fw_test}_CFLAGS})
 ENDFOREACH(flag)
 
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib/gstreamer-0.10")
 
 IF(WAYLAND_SUPPORT)
     ADD_DEFINITIONS("-DHAVE_WAYLAND")
old mode 100644 (file)
new mode 100755 (executable)
index 176c567..ed2f1de
@@ -13,7 +13,6 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-
 #include <player.h>
 #include <pthread.h>
 #include <glib.h>
 #include <Ecore_Wayland.h>
 #endif
 
-
+//#define _USE_X_DIRECT_
+#ifdef _USE_X_DIRECT_
+#include <X11/Xlib.h>
+#endif
 #define PACKAGE "player_test"
-#define MAX_STRING_LEN         2048
+#define MAX_STRING_LEN 2048
 #define MMTS_SAMPLELIST_INI_DEFAULT_PATH "/opt/etc/mmts_filelist.ini"
+#define PLAYER_TEST_DUMP_PATH_PREFIX   "/opt/usr/media/dump_pcm_"
 #define INI_SAMPLE_LIST_MAX 9
+#define DEFAULT_HTTP_TIMEOUT -1
+
+gboolean g_memory_playback = FALSE;
 char g_uri[MAX_STRING_LEN];
 char g_subtitle_uri[MAX_STRING_LEN];
-
+FILE *g_pcm_fd;
 enum
 {
        CURRENT_STATUS_MAINMENU,
+       CURRENT_STATUS_HANDLE_NUM,
        CURRENT_STATUS_FILENAME,
        CURRENT_STATUS_VOLUME,
+       CURRENT_STATUS_SOUND_TYPE,
        CURRENT_STATUS_MUTE,
-       CURRENT_STATUS_REAL_POSITION_TIME,
-       CURRENT_STATUS_KEY_FRAME_POSITION_TIME,
-       CURRENT_STATUS_POSITION_PERCENT,
+       CURRENT_STATUS_POSITION_TIME,
        CURRENT_STATUS_LOOPING,
+       CURRENT_STATUS_DISPLAY_SURFACE_CHANGE,
        CURRENT_STATUS_DISPLAY_MODE,
        CURRENT_STATUS_DISPLAY_ROTATION,
        CURRENT_STATUS_DISPLAY_VISIBLE,
-       CURRENT_STATUS_DISPLAY_ROI,
-       CURRENT_STATUS_SUBTITLE_FILENAME
+       CURRENT_STATUS_DISPLAY_ROI_MODE,
+       CURRENT_STATUS_DISPLAY_DST_ROI,
+       CURRENT_STATUS_DISPLAY_SRC_CROP,
+       CURRENT_STATUS_SUBTITLE_FILENAME,
+       CURRENT_STATUS_AUDIO_EQUALIZER,
 };
 
+#define MAX_HANDLE 20
+
+/* for video display */
+Evas_Object* g_xid;
+Evas_Object* g_eo_win;
+Evas_Object* g_eo[MAX_HANDLE] = {0};
+int g_current_surface_type = PLAYER_DISPLAY_TYPE_OVERLAY;
+
 struct appdata
 {
-       Evas *evas;
-       Ecore_Evas *ee;
-       Evas_Object *win;
 
-       Evas_Object *layout_main; /* layout widget based on EDJ */
-       #ifdef HAVE_X11
+       Evas_Object *win;
+       Evas_Object *bg;
+       Evas_Object *rect;
+#ifdef HAVE_X11
        Ecore_X_Window xid;
-       #elif HAVE_WAYLAND
+#elif HAVE_WAYLAND
        unsigned int xid;
-       #endif
+#endif
+       Evas_Object *layout_main; /* layout widget based on EDJ */
        /* add more variables here */
 };
 
+static Evas_Object *create_bg(Evas_Object *pParent)
+{
+       if(!pParent) {
+               return NULL;
+       }
+
+       Evas_Object *pObj = NULL;
+
+       pObj = elm_bg_add(pParent);
+       evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(pParent, pObj);
+       evas_object_color_set(pObj, 0, 0, 0, 0);
+       evas_object_show(pObj);
+       return pObj;
+}
+
 static void win_del(void *data, Evas_Object *obj, void *event)
 {
                elm_exit();
@@ -76,8 +110,7 @@ static void win_del(void *data, Evas_Object *obj, void *event)
 
 static Evas_Object* create_win(const char *name)
 {
-               Evas_Object *eo;
-               int w, h;
+       Evas_Object *eo = NULL;
 
                printf ("[%s][%d] name=%s\n", __func__, __LINE__, name);
 
@@ -86,58 +119,103 @@ static Evas_Object* create_win(const char *name)
                                elm_win_title_set(eo, name);
                                elm_win_borderless_set(eo, EINA_TRUE);
                                evas_object_smart_callback_add(eo, "delete,request",win_del, NULL);
-                               #ifdef HAVE_X11
-                               Ecore_X_Window xwin;
-                               xwin = elm_win_xwindow_get(eo);
-                               if (xwin != 0)
-                                 ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h);
-                               else {
-                               #endif
-                               #ifdef HAVE_WAYLAND
-                               Ecore_Wl_Window *wlwin;
-                               wlwin = elm_win_wl_window_get(eo);
-                               if (wlwin != NULL)
-                               ecore_wl_screen_size_get(&w, &h);
-                               #endif
-                               #ifdef HAVE_X11
-                               }
-                               #endif
-                               evas_object_resize(eo, w, h);
+                               elm_win_autodel_set(eo, EINA_TRUE);
                }
-
                return eo;
 }
 
+static Evas_Object *create_image_object(Evas_Object *eo_parent)
+{
+       if(!eo_parent) {
+               return NULL;
+       }
+       Evas *evas = evas_object_evas_get(eo_parent);
+       Evas_Object *eo = NULL;
+
+       eo = evas_object_image_add(evas);
+
+       return eo;
+}
+
+static Evas_Object *create_render_rect(Evas_Object *pParent)
+{
+       if(!pParent) {
+               return NULL;
+       }
+
+       Evas *pEvas = evas_object_evas_get(pParent);
+       Evas_Object *pObj = evas_object_rectangle_add(pEvas);
+       if(pObj == NULL) {
+               return NULL;
+       }
+
+       evas_object_size_hint_weight_set(pObj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_color_set(pObj, 0, 0, 0, 0);
+       evas_object_render_op_set(pObj, EVAS_RENDER_COPY);
+       evas_object_show(pObj);
+       elm_win_resize_object_add(pParent, pObj);
+
+       return pObj;
+}
+
 static int app_create(void *data)
 {
-               struct appdata *ad = data;
-               Evas_Object *win;
-               /* create window */
-               win = create_win(PACKAGE);
-               if (win == NULL)
-                               return -1;
-               ad->win = win;
-               evas_object_show(win);
-               return 0;
+       struct appdata *ad = data;
+       Evas_Object *win = NULL;
+
+       /* use gl backend */
+       elm_config_preferred_engine_set("opengl_x11");
+
+       /* create window */
+       win = create_win(PACKAGE);
+       if (win == NULL)
+                       return -1;
+       ad->win = win;
+       g_eo_win = win;
+       ad->bg = create_bg(ad->win);
+       ad->rect = create_render_rect(ad->win);
+       g_xid = ad->win;
+       /* Create evas image object for EVAS surface */
+       g_eo[0] = create_image_object(ad->win);
+       evas_object_image_size_set(g_eo[0], 500, 500);
+       evas_object_image_fill_set(g_eo[0], 0, 0, 500, 500);
+       evas_object_resize(g_eo[0], 500, 500);
+
+       elm_win_activate(win);
+       evas_object_show(win);
+
+       return 0;
 }
 
 static int app_terminate(void *data)
 {
-               struct appdata *ad = data;
-
-               if (ad->win)
-                               evas_object_del(ad->win);
+       struct appdata *ad = data;
+       int i = 0;
 
-               return 0;
+       for (i = 0 ; i < MAX_HANDLE; i++)
+       {
+               if (g_eo[i])
+               {
+                       evas_object_del(g_eo[i]);
+                       g_eo[i] = NULL;
+               }
+       }
+       if (g_eo_win) {
+               evas_object_del(g_eo_win);
+               g_eo_win = NULL;
+       }
+       ad->win = NULL;
+       return 0;
 }
 
 struct appcore_ops ops = {
-               .create = app_create,
-               .terminate = app_terminate,
+       .create = app_create,
+       .terminate = app_terminate,
 };
 
 struct appdata ad;
-static player_h g_player = 0;
+static player_h g_player[MAX_HANDLE] = {0};
+int g_handle_num = 1;
 int g_menu_state = CURRENT_STATUS_MAINMENU;
 char g_file_list[9][256];
 gboolean quit_pushing;
@@ -167,19 +245,29 @@ static void completed_cb(void *user_data)
        g_print("[Player_Test] completed_cb!!!!\n");
 }
 
-static void audio_frame_decoded_cb(unsigned char *data, unsigned int size, void *user_data)
+static void error_cb(int code, void *user_data)
 {
-       int pos=0;
-       player_get_position(g_player, &pos);
-       g_print("[Player_Test] audio_frame_decoded_cb [size: %d] --- current pos : %d!!!!\n", size, pos);
+       g_print("[Player_Test] error_cb!!!! code : %d\n", code);
+}
+
+static void interrupted_cb(player_interrupted_code_e code, void *user_data)
+{
+       g_print("[Player_Test] interrupted_cb!!!! code : %d\n", code);
 }
 
-void video_frame_decoded_cb(unsigned char *data, int width, int height, unsigned int size, void *user_data)
+#if 0
+static void audio_frame_decoded_cb(unsigned char *data, unsigned int size, void *user_data)
 {
        int pos=0;
-       player_get_position(g_player, &pos);
-       g_print("[Player_Test] video_frame_decoded_cb!!!! width: %d, height : %d, size :%d ---- current pos: %d  \n",width, height,size,pos);
+
+       if (data && g_pcm_fd)
+       {
+               fwrite(data, 1, size, g_pcm_fd);
+       }
+       player_get_play_position(g_player[0], &pos);
+       g_print("[Player_Test] audio_frame_decoded_cb [size: %d] --- current pos : %d!!!!\n", size, pos);
 }
+#endif
 
 static void subtitle_updated_cb(unsigned long duration, char *text, void *user_data)
 {
@@ -191,22 +279,74 @@ static void video_captured_cb(unsigned char *data, int width, int height,unsigne
        g_print("[Player_Test] video_captured_cb!!!! width: %d, height : %d, size : %d \n",width, height,size);
 }
 
+int    _save(unsigned char * src, int length)
+{      //unlink(CAPTUERD_IMAGE_SAVE_PATH);
+       FILE* fp;
+       char filename[256] = {0,};
+       static int WRITE_COUNT = 0;
+
+       //gchar *filename  = CAPTUERD_IMAGE_SAVE_PATH;
+       sprintf (filename, "ALBUM_ART_IMAGE_%d", WRITE_COUNT);
+       WRITE_COUNT++;
+       fp=fopen(filename, "w+");
+       if(fp==NULL)
+       {
+               g_print("file open error!!\n");
+               return FALSE;
+       }
+       else
+       {
+               g_print("open success\n");
+               if(fwrite(src, 1, length, fp )!=1)
+               {
+                       g_print("file write error!!\n");
+                       fclose(fp);
+                       return FALSE;
+               }
+               g_print("write success(%s)\n", filename);
+               fclose(fp);
+       }
+
+       return TRUE;
+}
+
+static void reset_display()
+{
+       int i = 0;
+
+       /* delete evas window, if it is */
+       for (i = 0 ; i < MAX_HANDLE; i++)
+       {
+               if (g_eo[i])
+               {
+                       evas_object_del(g_eo[i]);
+                       g_eo[i] = NULL;
+               }
+       }
+
+}
+
 static void input_filename(char *filename)
 {
        int len = strlen(filename);
+       int i = 0;
 
        if ( len < 0 || len > MAX_STRING_LEN )
                return;
-       if(g_player!=NULL)
-       {
-               player_unprepare(g_player);
-               player_destroy(g_player);
-       }
-       g_player = 0;
 
-       if ( player_create(&g_player) != PLAYER_ERROR_NONE )
+       for (i = 0; i < g_handle_num; i++)
        {
-               g_print("player create is failed\n");
+               if(g_player[i]!=NULL)
+               {
+                       player_unprepare(g_player[i]);
+                       player_destroy(g_player[i]);
+               }
+               g_player[i] = 0;
+
+               if ( player_create(&g_player[i]) != PLAYER_ERROR_NONE )
+               {
+                       g_print("player create is failed\n");
+               }
        }
 
        strncpy (g_uri, filename,len);
@@ -228,19 +368,38 @@ static void input_filename(char *filename)
        g_sprintf(uri, "mem://ext=%s,size=%d", ext ? ext : "", file_size);
        g_print("[uri] = %s\n", uri);
 
-       mm_player_set_attribute(g_player,
+       mm_player_set_attribute(g_player[0],
                                                                &g_err_name,
                                                                "profile_uri", uri, strlen(uri),
                                                                "profile_user_param", g_media_mem, file_size
                                                                NULL);
 #else
-       //player_set_uri(g_player, filename);
+       //player_set_uri(g_player[0], filename);
 #endif /* APPSRC_TEST */
 
        int ret;
        player_state_e state;
-       ret = player_get_state(g_player, &state);
-       g_print("1. After player_create() - Current State : %d \n", state);
+       for (i = 0; i < g_handle_num; i++)
+       {
+               ret = player_get_state(g_player[i], &state);
+               g_print("player_get_state returned [%d]", ret);
+               g_print("1. After player_create() - Current State : %d \n", state);
+       }
+}
+
+// use this API instead of player_set_uri
+static void player_set_memory_buffer_test()
+{
+       GMappedFile *file;
+    gsize file_size;
+    guint8* g_media_mem = NULL;
+
+       file = g_mapped_file_new (g_uri, FALSE, NULL);
+    file_size = g_mapped_file_get_length (file);
+    g_media_mem = (guint8 *) g_mapped_file_get_contents (file);
+
+    int ret = player_set_memory_buffer(g_player[0], (void*)g_media_mem, file_size);
+    g_print("player_set_memory_buffer ret : %d\n", ret);
 }
 
 static void _player_prepare(bool async)
@@ -251,90 +410,274 @@ static void _player_prepare(bool async)
        if ( slen > 0 && slen < MAX_STRING_LEN )
        {
                g_print("0. set subtile path() (size : %d) - %s  \n", slen, g_subtitle_uri);
-               player_set_subtitle_path(g_player,g_subtitle_uri);
-               player_set_subtitle_updated_cb(g_player, subtitle_updated_cb, (void*)g_player);
+               player_set_subtitle_path(g_player[0],g_subtitle_uri);
+               player_set_subtitle_updated_cb(g_player[0], subtitle_updated_cb, (void*)g_player[0]);
+       }
+       if (g_current_surface_type == PLAYER_DISPLAY_TYPE_OVERLAY)
+       {
+               player_set_display(g_player[0], g_current_surface_type, GET_DISPLAY(g_xid));
+               player_set_buffering_cb(g_player[0], buffering_cb, (void*)g_player[0]);
+               player_set_completed_cb(g_player[0], completed_cb, (void*)g_player[0]);
+               player_set_interrupted_cb(g_player[0], interrupted_cb, (void*)g_player[0]);
+               player_set_error_cb(g_player[0], error_cb, (void*)g_player[0]);
+               if (g_memory_playback)
+                       player_set_memory_buffer_test();
+               else
+                       player_set_uri(g_player[0], g_uri);
+       }
+       else
+       {
+               int i = 0;
+               for (i = 0; i < g_handle_num; i++)
+               {
+                       player_set_display(g_player[i], g_current_surface_type, g_eo[i]);
+                       player_set_buffering_cb(g_player[i], buffering_cb, (void*)g_player[i]);
+                       player_set_completed_cb(g_player[i], completed_cb, (void*)g_player[i]);
+                       player_set_interrupted_cb(g_player[i], interrupted_cb, (void*)g_player[i]);
+                       player_set_error_cb(g_player[i], error_cb, (void*)g_player[i]);
+                       if (g_memory_playback)
+                               player_set_memory_buffer_test();
+                       else
+                               player_set_uri(g_player[i], g_uri);
+               }
        }
-       #ifdef HAVE_X11
-       player_set_display(g_player,PLAYER_DISPLAY_TYPE_X11,GET_DISPLAY(ad.xid));
-       #elif HAVE_WAYLAND
-       player_set_display(g_player,PLAYER_DISPLAY_TYPE_EVAS,GET_DISPLAY(ad.xid));
-       #endif
-
-
-       player_set_buffering_cb(g_player, buffering_cb, (void*)g_player);
-       player_set_completed_cb(g_player, completed_cb, (void*)g_player);
-       player_set_uri(g_player, g_uri);
 
-       if ( async )
+       if (g_current_surface_type == PLAYER_DISPLAY_TYPE_OVERLAY)
        {
-               ret = player_prepare_async(g_player, prepared_cb, (void*) g_player);
+               if ( async )
+               {
+                       ret = player_prepare_async(g_player[0], prepared_cb, (void*) g_player[0]);
+               }
+               else
+                       ret = player_prepare(g_player[0]);
        }
        else
-               ret = player_prepare(g_player);
+       {
+               int i = 0;
+               for (i = 0; i < g_handle_num; i++)
+               {
+                       if ( async )
+                       {
+                               ret = player_prepare_async(g_player[i], prepared_cb, (void*) g_player[i]);
+                       }
+                       else
+                               ret = player_prepare(g_player[i]);
+               }
+       }
 
        if ( ret != PLAYER_ERROR_NONE )
        {
                g_print("prepare is failed (errno = %d) \n", ret);
        }
        player_state_e state;
-       ret = player_get_state(g_player, &state);
-       g_print("After player_prepare() - Current State : %d \n", state);
+       if (g_current_surface_type == PLAYER_DISPLAY_TYPE_OVERLAY)
+       {
+               ret = player_get_state(g_player[0], &state);
+               g_print("After player_prepare() - Current State : %d \n", state);
+       }
+       else
+       {
+               int i = 0;
+               for (i = 0; i < g_handle_num; i++)
+               {
+                       ret = player_get_state(g_player[i], &state);
+                       g_print("After player_prepare() - Current State : %d \n", state);
+               }
+       }
+
 }
 
 static void _player_unprepare()
 {
        int ret = FALSE;
-       ret = player_unprepare(g_player);
-       if ( ret != PLAYER_ERROR_NONE )
+       int i = 0;
+       if (g_current_surface_type == PLAYER_DISPLAY_TYPE_OVERLAY)
        {
-               g_print("unprepare is failed (errno = %d) \n", ret);
+               ret = player_unprepare(g_player[0]);
+               if ( ret != PLAYER_ERROR_NONE )
+               {
+                       g_print("unprepare is failed (errno = %d) \n", ret);
+               }
+               ret = player_unset_subtitle_updated_cb(g_player[0]);
+               g_print("player_unset_subtitle_updated_cb ret %d\n", ret);
+
+               ret = player_unset_buffering_cb(g_player[0]);
+               g_print("player_unset_buffering_cb ret %d\n", ret);
+
+               ret = player_unset_completed_cb(g_player[0]);
+               g_print("player_unset_completed_cb ret %d\n", ret);
+
+               ret = player_unset_interrupted_cb(g_player[0]);
+               g_print("player_unset_interrupted_cb ret %d\n", ret);
+
+               ret = player_unset_error_cb(g_player[0]);
+               g_print("player_unset_error_cb ret %d\n", ret);
+
        }
+       else
+       {
+               for (i = 0; i < g_handle_num ; i++)
+               {
+                       if(g_player[i]!=NULL)
+                       {
+                               ret = player_unprepare(g_player[i]);
+                               if ( ret != PLAYER_ERROR_NONE )
+                               {
+                                       g_print("unprepare is failed (errno = %d) \n", ret);
+                               }
+                               ret = player_unset_subtitle_updated_cb(g_player[i]);
+                               g_print("player_unset_subtitle_updated_cb [%d] ret %d\n", i, ret);
+
+                               ret = player_unset_buffering_cb(g_player[i]);
+                               g_print("player_unset_buffering_cb [%d] ret %d\n", i, ret);
+
+                               ret = player_unset_completed_cb(g_player[i]);
+                               g_print("player_unset_completed_cb [%d] ret %d\n", i, ret);
+
+                               ret = player_unset_interrupted_cb(g_player[i]);
+                               g_print("player_unset_interrupted_cb [%d] ret %d\n", i, ret);
+
+                               ret = player_unset_error_cb(g_player[i]);
+                               g_print("player_unset_error_cb [%d] ret %d\n", i, ret);
+                       }
+               }
+       }
+       reset_display();
        memset(g_subtitle_uri, 0 , sizeof(g_subtitle_uri));
        player_state_e state;
-       ret = player_get_state(g_player, &state);
-       g_print(" After player_unprepare() - Current State : %d \n", state);
+       if (g_current_surface_type == PLAYER_DISPLAY_TYPE_OVERLAY)
+       {
+               ret = player_get_state(g_player[0], &state);
+               g_print(" After player_unprepare() - Current State : %d \n", state);
+       }
+       else
+       {
+               for (i = 0; i < g_handle_num ; i++)
+               {
+                       ret = player_get_state(g_player[i], &state);
+                       g_print(" After player_unprepare() - Current State : %d \n", state);
+               }
+       }
+}
+
+static void _player_destroy()
+{
+       int i = 0;
+       if (g_current_surface_type == PLAYER_DISPLAY_TYPE_OVERLAY)
+       {
+               player_unprepare(g_player[0]);
+               for (i = 0; i < g_handle_num ; i++)
+               {
+                       player_destroy(g_player[i]);
+                       g_player[i] = 0;
+               }
+       }
+       else
+       {
+               for (i = 0; i < g_handle_num ; i++)
+               {
+                       if(g_player[i]!=NULL)
+                       {
+                               player_unprepare(g_player[i]);
+                               player_destroy(g_player[i]);
+                               g_player[i] = 0;
+                       }
+               }
+       }
 }
 
 static void _player_play()
 {
        int bRet = FALSE;
-       bRet = player_start(g_player);
+       int i = 0;
+       if (g_current_surface_type == PLAYER_DISPLAY_TYPE_OVERLAY)
+       {
+               bRet = player_start(g_player[0]);
+               g_print("player_start returned [%d]", bRet);
+       }
+       else
+       {
+               for (i = 0; i < g_handle_num ; i++)
+               {
+                       bRet = player_start(g_player[i]);
+                       g_print("player_start returned [%d]", bRet);
+               }
+       }
 }
 
 static void _player_stop()
 {
        int bRet = FALSE;
-       bRet = player_stop(g_player);
+       int i = 0;
+       if (g_current_surface_type == PLAYER_DISPLAY_TYPE_OVERLAY)
+       {
+               bRet = player_stop(g_player[0]);
+               g_print("player_stop returned [%d]", bRet);
+       }
+       else
+       {
+               for (i = 0; i < g_handle_num ; i++)
+               {
+                       bRet = player_stop(g_player[i]);
+                       g_print("player_stop returned [%d]", bRet);
+               }
+       }
 }
 
 static void _player_resume()
 {
        int bRet = FALSE;
-       bRet = player_start(g_player);
+       int i = 0;
+       if (g_current_surface_type == PLAYER_DISPLAY_TYPE_OVERLAY)
+       {
+               bRet = player_start(g_player[0]);
+               g_print("player_start returned [%d]", bRet);
+       }
+       else
+       {
+               for (i = 0; i < g_handle_num ; i++)
+               {
+                       bRet = player_start(g_player[i]);
+                       g_print("player_start returned [%d]", bRet);
+               }
+       }
 }
 
 static void _player_pause()
 {
        int bRet = FALSE;
-       bRet = player_pause(g_player);
+       int i = 0;
+       if (g_current_surface_type == PLAYER_DISPLAY_TYPE_OVERLAY)
+       {
+               bRet = player_pause(g_player[0]);
+               g_print("player_pause returned [%d]", bRet);
+       }
+       else
+       {
+               for (i = 0; i < g_handle_num ; i++)
+               {
+                       bRet = player_pause(g_player[i]);
+                       g_print("player_pause returned [%d]", bRet);
+               }
+       }
 }
 
 static void _player_state()
 {
        player_state_e state;
-       player_get_state(g_player, &state);
+       player_get_state(g_player[0], &state);
        g_print("                                                            ==> [Player_Test] Current Player State : %d\n", state);
 }
 
 static void _player_set_progressive_download()
 {
-       player_set_progressive_download_path(g_player, "/opt/test.pd");
-       player_set_progressive_download_message_cb(g_player, progress_down_cb, (void*)g_player);
+       player_set_progressive_download_path(g_player[0], "/opt/test.pd");
+       player_set_progressive_download_message_cb(g_player[0], progress_down_cb, (void*)g_player[0]);
 }
 
 static void set_volume(float volume)
 {
-       if ( player_set_volume(g_player, volume, volume) != PLAYER_ERROR_NONE )
+       if ( player_set_volume(g_player[0], volume, volume) != PLAYER_ERROR_NONE )
        {
                g_print("failed to set volume\n");
        }
@@ -342,13 +685,13 @@ static void set_volume(float volume)
 
 static void get_volume(float* left, float* right)
 {
-       player_get_volume(g_player, left, right);
+       player_get_volume(g_player[0], left, right);
        g_print("                                                            ==> [Player_Test] volume - left : %f, right : %f\n", *left, *right);
 }
 
 static void set_mute(bool mute)
 {
-       if ( player_set_mute(g_player, mute) != PLAYER_ERROR_NONE )
+       if ( player_set_mute(g_player[0], mute) != PLAYER_ERROR_NONE )
        {
                g_print("failed to set_mute\n");
        }
@@ -356,44 +699,41 @@ static void set_mute(bool mute)
 
 static void get_mute(bool *mute)
 {
-       player_is_muted(g_player, mute);
+       player_is_muted(g_player[0], mute);
        g_print("                                                            ==> [Player_Test] mute = %d\n", *mute);
 }
 
+static void set_sound_type(sound_type_e type)
+{
+       if ( player_set_sound_type(g_player[0], type) != PLAYER_ERROR_NONE )
+       {
+               g_print("failed to set sound type(%d)\n", type);
+       }
+       else
+               g_print("set sound type(%d) success", type);
+}
+
 static void get_position()
 {
        int position = 0;
-       int percent = 0;
        int ret;
-       ret = player_get_position(g_player, &position);
-       g_print("                                                            ==> [Player_Test] player_get_position() return : %d\n",ret);
-       ret = player_get_position_ratio(g_player, &percent);
-       g_print("                                                            ==> [Player_Test] player_get_position_ratio() return : %d\n",ret);
-       g_print("                                                            ==> [Player_Test] Pos: [%d ] msec\n", position);
-       g_print("                                                            ==> [Player_Test] Pos: [%d] percent\n", percent);
+       ret = player_get_play_position(g_player[0], &position);
+       g_print("                                                            ==> [Player_Test] player_get_play_position()%d return : %d\n", ret, position);
 }
 
-static void set_position(int position, bool flag)
+static void set_position(int position)
 {
-       if ( player_seek(g_player,  position, flag, seek_completed_cb, g_player) != PLAYER_ERROR_NONE )
+       if ( player_set_play_position(g_player[0],  position, TRUE, seek_completed_cb, g_player[0]) != PLAYER_ERROR_NONE )
        {
                g_print("failed to set position\n");
        }
 }
 
-static void set_position_ratio(int percent)
-{
-       if ( player_set_position_ratio(g_player, percent, seek_completed_cb, g_player) != PLAYER_ERROR_NONE )
-       {
-               g_print("failed to set position ratio\n");
-       }
-}
-
 static void get_duration()
 {
        int duration = 0;
        int ret;
-       ret = player_get_duration(g_player, &duration);
+       ret = player_get_duration(g_player[0], &duration);
        g_print("                                                            ==> [Player_Test] player_get_duration() return : %d\n",ret);
        g_print("                                                            ==> [Player_Test] Duration: [%d ] msec\n",duration);
 }
@@ -402,20 +742,21 @@ static void get_stream_info()
 {
        int w = 0;
        int h = 0;
+
        char *value = NULL;
-       player_get_content_info(g_player, PLAYER_CONTENT_INFO_ALBUM,  &value);
+       player_get_content_info(g_player[0], PLAYER_CONTENT_INFO_ALBUM,  &value);
        g_print("                                                            ==> [Player_Test] PLAYER_CONTENT_INFO_ALBUM: [%s ] \n",value);
-       player_get_content_info(g_player, PLAYER_CONTENT_INFO_ARTIST,  &value);
+       player_get_content_info(g_player[0], PLAYER_CONTENT_INFO_ARTIST,  &value);
        g_print("                                                            ==> [Player_Test] PLAYER_CONTENT_INFO_ARTIST: [%s ] \n",value);
-       player_get_content_info(g_player, PLAYER_CONTENT_INFO_AUTHOR,  &value);
+       player_get_content_info(g_player[0], PLAYER_CONTENT_INFO_AUTHOR,  &value);
        g_print("                                                            ==> [Player_Test] PLAYER_CONTENT_INFO_AUTHOR: [%s ] \n",value);
-       player_get_content_info(g_player, PLAYER_CONTENT_INFO_GENRE,  &value);
+       player_get_content_info(g_player[0], PLAYER_CONTENT_INFO_GENRE,  &value);
        g_print("                                                            ==> [Player_Test] PLAYER_CONTENT_INFO_GENRE: [%s ] \n",value);
-       player_get_content_info(g_player, PLAYER_CONTENT_INFO_TITLE,  &value);
+       player_get_content_info(g_player[0], PLAYER_CONTENT_INFO_TITLE,  &value);
        g_print("                                                            ==> [Player_Test] PLAYER_CONTENT_INFO_TITLE: [%s ] \n",value);
        void *album;
        int size;
-       player_get_album_art(g_player, &album, &size);
+       player_get_album_art(g_player[0], &album, &size);
        g_print("                                                            ==> [Player_Test] Album art : [ data : %p, size : %d ]\n", (unsigned int *)album, size);
        if(value!=NULL)
        {
@@ -426,12 +767,16 @@ static void get_stream_info()
        int sample_rate;
        int channel;
        int bit_rate;
-       player_get_audio_stream_info(g_player, &sample_rate, &channel, &bit_rate);
+       int fps, v_bit_rate;
+       player_get_audio_stream_info(g_player[0], &sample_rate, &channel, &bit_rate);
        g_print("                                                            ==> [Player_Test] Sample Rate: [%d ] , Channel: [%d ] , Bit Rate: [%d ] \n",sample_rate,channel,bit_rate);
 
+       player_get_video_stream_info(g_player[0], &fps, &v_bit_rate);
+       g_print("                                                            ==> [Player_Test] fps: [%d ] , Bit Rate: [%d ] \n",fps,v_bit_rate);
+
        char *audio_codec = NULL;
        char *video_codec = NULL;
-       player_get_codec_info(g_player, &audio_codec, &video_codec);
+       player_get_codec_info(g_player[0], &audio_codec, &video_codec);
        if(audio_codec!=NULL)
        {
                g_print("                                                            ==> [Player_Test] Audio Codec: [%s ] \n",audio_codec);
@@ -444,27 +789,116 @@ static void get_stream_info()
                free(video_codec);
                video_codec = NULL;
        }
-       player_get_video_size(g_player, &w, &h);
+       player_get_video_size(g_player[0], &w, &h);
        g_print("                                                            ==> [Player_Test] Width: [%d ] , Height: [%d ] \n",w,h);
-}
+ }
 
 static void set_looping(bool looping)
 {
-       if ( player_set_looping(g_player, looping) != PLAYER_ERROR_NONE )
+       if (g_current_surface_type == PLAYER_DISPLAY_TYPE_OVERLAY)
        {
-               g_print("failed to set_looping\n");
+               if ( player_set_looping(g_player[0], looping) != PLAYER_ERROR_NONE )
+               {
+                       g_print("failed to set_looping\n");
+               }
+       }
+       else
+       {
+               int i = 0;
+               for (i = 0; i < g_handle_num; i++)
+               {
+                       if ( player_set_looping(g_player[i], looping) != PLAYER_ERROR_NONE )
+                       {
+                               g_print("failed to set_looping\n");
+                       }
+               }
        }
 }
 
 static void get_looping(bool *looping)
 {
-       player_is_looping(g_player, looping);
+       player_is_looping(g_player[0], looping);
        g_print("                                                            ==> [Player_Test] looping = %d\n", *looping);
 }
 
+static void change_surface(int option)
+{
+       player_display_type_e surface_type = 0;
+       int ret = PLAYER_ERROR_NONE;
+
+       switch (option)
+       {
+       case 0: /* X surface */
+               surface_type = PLAYER_DISPLAY_TYPE_OVERLAY;
+               g_print("change surface type to X\n");
+               break;
+       case 1: /* EVAS surface */
+               surface_type = PLAYER_DISPLAY_TYPE_EVAS;
+               g_print("change surface type to EVAS\n");
+               break;
+       default:
+               g_print("invalid surface type\n");
+               return;
+       }
+
+       if (surface_type == g_current_surface_type)
+       {
+               g_print("same with the previous surface type(%d)\n", g_current_surface_type);
+               return;
+       }
+       else
+       {
+               player_state_e player_state = PLAYER_STATE_NONE;
+               ret = player_get_state(g_player[0], &player_state);
+               if (ret)
+               {
+                       g_print("failed to player_get_state(), ret(0x%x)\n", ret);
+               }
+               /* state check */
+               if (player_state == PLAYER_STATE_NONE || player_state == PLAYER_STATE_IDLE )
+               {
+                       reset_display();
+
+                       if (surface_type == PLAYER_DISPLAY_TYPE_OVERLAY)
+                       {
+                               g_xid = g_eo_win;
+                               ret = player_set_display(g_player[0], surface_type, GET_DISPLAY(g_xid));
+                       }
+                       else
+                       {
+                               int i = 0;
+                               for (i = 0; i < g_handle_num ; i++)
+                               {
+                                       /* Create evas image object for EVAS surface */
+                                       if (!g_eo[i])
+                                       {
+                                               g_eo[i] = create_image_object(g_eo_win);
+                                               evas_object_image_size_set(g_eo[i], 500, 500);
+                                               evas_object_image_fill_set(g_eo[i], 0, 0, 500, 500);
+                                               evas_object_resize(g_eo[i], 500, 500);
+                                               evas_object_move(g_eo[i], i*20, i*20);
+                                       }
+                                       ret = player_set_display(g_player[i], surface_type, g_eo[i]);
+                               }
+                       }
+                       if (ret)
+                       {
+                               g_print("failed to set display, surface_type(%d)\n", surface_type);
+                               return;
+                       }
+                       g_current_surface_type = surface_type;
+               }
+               else
+               {
+                       g_print("could not change surface type, current_state(%d)\n", player_state);
+               }
+       }
+       return;
+}
+
 static void set_display_mode(int mode)
 {
-       if ( player_set_display_mode(g_player, mode) != PLAYER_ERROR_NONE )
+       if ( player_set_display_mode(g_player[0], mode) != PLAYER_ERROR_NONE )
        {
                g_print("failed to player_set_display_mode\n");
        }
@@ -473,13 +907,13 @@ static void set_display_mode(int mode)
 static void get_display_mode()
 {
        player_display_mode_e mode;
-       player_get_display_mode(g_player, &mode);
+       player_get_display_mode(g_player[0], &mode);
        g_print("                                                            ==> [Player_Test] Display mode: [%d ] \n",mode);
 }
 
 static void set_display_rotation(int rotation)
 {
-       if ( player_set_x11_display_rotation(g_player, rotation) != PLAYER_ERROR_NONE )
+       if ( player_set_display_rotation(g_player[0], rotation) != PLAYER_ERROR_NONE )
        {
                g_print("failed to set_display_rotation\n");
        }
@@ -488,14 +922,14 @@ static void set_display_rotation(int rotation)
 static void get_display_rotation()
 {
        player_display_rotation_e rotation = 0;
-       player_get_x11_display_rotation(g_player, &rotation);
+       player_get_display_rotation(g_player[0], &rotation);
        g_print("                                                            ==> [Player_Test] X11 Display rotation: [%d ] \n",rotation);
 }
 
 
 static void set_display_visible(bool visible)
 {
-       if ( player_set_x11_display_visible(g_player, visible) != PLAYER_ERROR_NONE )
+       if ( player_set_display_visible(g_player[0], visible) != PLAYER_ERROR_NONE )
        {
                g_print("failed to player_set_x11_display_visible\n");
        }
@@ -503,32 +937,91 @@ static void set_display_visible(bool visible)
 
 static void get_display_visible(bool *visible)
 {
-       player_is_x11_display_visible(g_player, visible);
+       player_is_display_visible(g_player[0], visible);
        g_print("                                                            ==> [Player_Test] X11 Display Visible = %d\n", *visible);
 }
 
-static void set_display_roi(int x, int y, int w, int h)
+static void set_display_dst_roi(int x, int y, int w, int h)
+{
+#if 0
+       if ( player_set_x11_display_dst_roi(g_player[0], x, y, w, h) != PLAYER_ERROR_NONE )
+       {
+               g_print("failed to player_set_x11_display_dst_roi\n");
+       } else {
+               g_print("                                                            ==> [Player_Test] set X11 Display DST ROI (x:%d, y:%d, w:%d, h:%d)\n", x, y, w, h);
+       }
+#endif
+}
+
+static void get_display_dst_roi()
+{
+#if 0
+       int x = 0;
+       int y = 0;
+       int w = 0;
+       int h = 0;
+
+       if ( player_get_x11_display_dst_roi(g_player[0], &x, &y, &w, &h) != PLAYER_ERROR_NONE )
+       {
+               g_print("failed to player_get_x11_display_dst_roi\n");
+       } else {
+               g_print("                                                            ==> [Player_Test] got X11 Display DST ROI (x:%d, y:%d, w:%d, h:%d)\n", x, y, w, h);
+       }
+#endif
+}
+
+static void set_display_roi_mode(int mode)
+{
+#if 0
+       if ( player_set_x11_display_roi_mode(g_player[0], (player_display_roi_mode_e)mode) != PLAYER_ERROR_NONE )
+       {
+               g_print("failed to player_set_x11_display_roi_mode\n");
+       } else {
+               g_print("                                                            ==> [Player_Test] set X11 Display ROI mode (%d)\n", mode);
+       }
+#endif
+}
+
+static void get_display_roi_mode()
 {
-       if ( player_set_x11_display_roi(g_player, x, y, w, h) != PLAYER_ERROR_NONE )
+#if 0
+       player_display_roi_mode_e mode;
+       if ( player_get_x11_display_roi_mode(g_player[0], &mode) != PLAYER_ERROR_NONE )
        {
-               g_print("failed to player_set_x11_display_roi\n");
+               g_print("failed to player_get_x11_display_roi_mode\n");
        } else {
-               g_print("                                                            ==> [Player_Test] set X11 Display ROI (x:%d, y:%d, w:%d, h:%d)\n", x, y, w, h);
+               g_print("                                                            ==> [Player_Test] got X11 Display ROI mode (%d)\n", mode);
        }
+#endif
 }
 
-static void get_display_roi()
+static void set_display_src_crop(int x, int y, int w, int h)
 {
+#if 0
+       if ( player_set_x11_display_src_crop(g_player[0], x, y, w, h) != PLAYER_ERROR_NONE )
+       {
+               g_print("failed to player_set_x11_display_src_crop\n");
+       } else {
+               g_print("                                                            ==> [Player_Test] set X11 Display SRC CROP (x:%d, y:%d, w:%d, h:%d)\n", x, y, w, h);
+       }
+#endif
+}
+
+static void get_display_src_crop()
+{
+#if 0
        int x = 0;
        int y = 0;
        int w = 0;
        int h = 0;
-       if ( player_get_x11_display_roi(g_player, &x, &y, &w, &h) != PLAYER_ERROR_NONE )
+
+       if ( player_get_x11_display_src_crop(g_player[0], &x, &y, &w, &h) != PLAYER_ERROR_NONE )
        {
-               g_print("failed to player_get_x11_display_roi\n");
+               g_print("failed to player_get_x11_display_src_crop\n");
        } else {
-               g_print("                                                            ==> [Player_Test] got X11 Display ROI (x:%d, y:%d, w:%d, h:%d)\n", x, y, w, h);
+               g_print("                                                            ==> [Player_Test] got X11 Display SRC CROP (x:%d, y:%d, w:%d, h:%d)\n", x, y, w, h);
        }
+#endif
 }
 
 static void input_subtitle_filename(char *subtitle_filename)
@@ -540,11 +1033,12 @@ static void input_subtitle_filename(char *subtitle_filename)
 
        strncpy (g_subtitle_uri, subtitle_filename,len);
        g_print("subtitle uri is set to %s\n", g_subtitle_uri);
+       player_set_subtitle_path (g_player[0], g_subtitle_uri);
 }
 
 static void capture_video()
 {
-       if( player_capture_video(g_player,video_captured_cb,NULL)!=PLAYER_ERROR_NONE)
+       if( player_capture_video(g_player[0],video_captured_cb,NULL)!=PLAYER_ERROR_NONE)
        {
                g_print("failed to player_capture_video\n");
        }
@@ -552,29 +1046,88 @@ static void capture_video()
 
 static void decoding_audio()
 {
+#if 0
        int ret;
-       ret =player_set_audio_frame_decoded_cb(g_player, 0,0,audio_frame_decoded_cb, (void*)g_player);
+        char *suffix, *dump_path;
+        GDateTime *time = g_date_time_new_now_local();
+
+        suffix = g_date_time_format(time, "%Y%m%d_%H%M%S.pcm");
+        dump_path = g_strjoin(NULL, PLAYER_TEST_DUMP_PATH_PREFIX, suffix, NULL);
+        g_pcm_fd = fopen(dump_path, "w+");
+        g_free(dump_path);
+        g_free(suffix);
+        g_date_time_unref(time);
+        if(!g_pcm_fd) {
+            g_print("Can not create debug dump file");
+        }
+
+       ret =player_set_audio_frame_decoded_cb(g_player[0], 0, 0,audio_frame_decoded_cb, (void*)g_player[0]);
        if ( ret != PLAYER_ERROR_NONE )
        {
                g_print("player_set_audio_frame_decoded_cb is failed (errno = %d) \n", ret);
        }
+#endif
 }
-
-static void decoding_video()
+static void set_audio_eq(int value)
 {
-       int ret;
-       ret =player_set_video_frame_decoded_cb(g_player, video_frame_decoded_cb, (void*)g_player);
-       if ( ret != PLAYER_ERROR_NONE )
+       bool available = FALSE;
+       int index, min, max;
+
+       if(value)
        {
-               g_print("player_set_video_frame_decoded_cb is failed (errno = %d) \n", ret);
+               if(player_audio_effect_equalizer_is_available(g_player[0], &available)!=PLAYER_ERROR_NONE)
+                       g_print("failed to player_audio_effect_equalizer_is_available\n");
+
+               if(available)
+               {
+                       if((player_audio_effect_get_equalizer_bands_count(g_player[0], &index)!=PLAYER_ERROR_NONE) ||
+                               (player_audio_effect_get_equalizer_level_range(g_player[0], &min, &max)!=PLAYER_ERROR_NONE) ||
+                               (player_audio_effect_set_equalizer_band_level(g_player[0], index/2, max)!=PLAYER_ERROR_NONE))
+                                       g_print("failed to player_audio_effect_set_equalizer_band_level index %d, level %d\n", index/2, max);
+               }
        }
+
+       else
+       {
+               if(player_audio_effect_equalizer_clear(g_player[0])!=PLAYER_ERROR_NONE)
+                       g_print("failed to player_audio_effect_equalizer_clear\n");
+       }
+
+}
+
+static void get_audio_eq()
+{
+       int index, min, max, value;
+       player_audio_effect_get_equalizer_bands_count (g_player[0], &index);
+       g_print("                                                            ==> [Player_Test] eq bands count: [%d] \n", index);
+       player_audio_effect_get_equalizer_level_range(g_player[0], &min, &max);
+       g_print("                                                            ==> [Player_Test] eq bands range: [%d~%d] \n", min, max);
+       player_audio_effect_get_equalizer_band_level(g_player[0], index/2, &value);
+       g_print("                                                            ==> [Player_Test] eq bands level: [%d] \n", value);
+       player_audio_effect_get_equalizer_band_frequency(g_player[0], 0, &value);
+       g_print("                                                            ==> [Player_Test] eq bands frequency: [%d] \n", value);
+       player_audio_effect_get_equalizer_band_frequency_range(g_player[0], 0, &value);
+       g_print("                                                            ==> [Player_Test] eq bands frequency range: [%d] \n", value);
 }
 
 void quit_program()
 {
-       player_unprepare(g_player);
-       player_destroy(g_player);
-       g_player = 0;
+       int i = 0;
+
+       if(g_pcm_fd)
+       {
+               fclose(g_pcm_fd);
+       }
+
+       for (i = 0; i < g_handle_num; i++)
+       {
+               if(g_player[i]!=NULL)
+               {
+                       player_unprepare(g_player[i]);
+                       player_destroy(g_player[i]);
+                       g_player[i] = 0;
+               }
+       }
        elm_exit();
 }
 
@@ -651,7 +1204,7 @@ void _interpret_main_menu(char *cmd)
                }
                else if (strncmp(cmd, "f", 1) == 0)
                {
-                               g_menu_state = CURRENT_STATUS_VOLUME;
+                       g_menu_state = CURRENT_STATUS_VOLUME;
                }
                else if (strncmp(cmd, "g", 1) == 0)
                {
@@ -659,9 +1212,13 @@ void _interpret_main_menu(char *cmd)
                        float right;
                        get_volume(&left, &right);
                }
+               else if (strncmp(cmd, "z", 1) == 0)
+               {
+                       g_menu_state = CURRENT_STATUS_SOUND_TYPE;
+               }
                else if (strncmp(cmd, "h", 1) == 0 )
                {
-                               g_menu_state = CURRENT_STATUS_MUTE;
+                       g_menu_state = CURRENT_STATUS_MUTE;
                }
                else if (strncmp(cmd, "i", 1) == 0 )
                {
@@ -670,23 +1227,19 @@ void _interpret_main_menu(char *cmd)
                }
                else if (strncmp(cmd, "j", 1) == 0 )
                {
-                               g_menu_state = CURRENT_STATUS_REAL_POSITION_TIME;
-               }
-               else if (strncmp(cmd, "k", 1) == 0 )
-               {
-                               g_menu_state = CURRENT_STATUS_POSITION_PERCENT;
+                       g_menu_state = CURRENT_STATUS_POSITION_TIME;
                }
                else if (strncmp(cmd, "l", 1) == 0 )
                {
-                               get_position();
+                       get_position();
                }
                else if (strncmp(cmd, "m", 1) == 0 )
                {
-                               get_duration();
+                       get_duration();
                }
                else if (strncmp(cmd, "n", 1) == 0 )
                {
-                               get_stream_info();
+                       get_stream_info();
                }
                else if (strncmp(cmd, "o", 1) == 0 )
                {
@@ -694,8 +1247,8 @@ void _interpret_main_menu(char *cmd)
                }
                else if (strncmp(cmd, "p", 1) == 0 )
                {
-                               bool looping;
-                               get_looping(&looping);
+                       bool looping;
+                       get_looping(&looping);
                }
                else if (strncmp(cmd, "r", 1) == 0 )
                {
@@ -724,17 +1277,33 @@ void _interpret_main_menu(char *cmd)
                }
                else if (strncmp(cmd, "x", 1) == 0 )
                {
-                       g_menu_state = CURRENT_STATUS_DISPLAY_ROI;
+                       g_menu_state = CURRENT_STATUS_DISPLAY_DST_ROI;
                }
                else if (strncmp(cmd, "y", 1) == 0 )
                {
-                       get_display_roi();
+                       get_display_dst_roi();
+               }
+               else if (strncmp(cmd, "M", 1) == 0 )
+               {
+                       g_menu_state = CURRENT_STATUS_DISPLAY_ROI_MODE;
+               }
+               else if (strncmp(cmd, "N", 1) == 0 )
+               {
+                       get_display_roi_mode();
+               }
+               else if (strncmp(cmd, "F", 1) == 0 )
+               {
+                       g_menu_state = CURRENT_STATUS_DISPLAY_SRC_CROP;
+               }
+               else if (strncmp(cmd, "G", 1) == 0 )
+               {
+                       get_display_src_crop();
                }
                else if (strncmp(cmd, "A", 1) == 0 )
                {
                        g_menu_state = CURRENT_STATUS_SUBTITLE_FILENAME;
                }
-               else if (strncmp(cmd, "C", 1) == 0 )
+               else if (strncmp(cmd, "C", 1) == 0 )
                {
                        capture_video();
                }
@@ -742,18 +1311,22 @@ void _interpret_main_menu(char *cmd)
                {
                        decoding_audio();
                }
+               else if (strncmp(cmd, "q", 1) == 0)
+               {
+                       quit_pushing = TRUE;
+                       quit_program();
+               }
                else if (strncmp(cmd, "E", 1) == 0 )
                {
-                       decoding_video();
+                       g_menu_state = CURRENT_STATUS_AUDIO_EQUALIZER;
                }
-               else if (strncmp(cmd, "q", 1) == 0)
+               else if (strncmp(cmd, "H", 1) == 0 )
                {
-                               quit_pushing = TRUE;
-                               quit_program();
+                       get_audio_eq();
                }
                else
                {
-                               g_print("unknown menu \n");
+                       g_print("unknown menu \n");
                }
        }
        else if(len == 2)
@@ -762,7 +1335,7 @@ void _interpret_main_menu(char *cmd)
                {
                        _player_prepare(FALSE); // sync
                }
-               else if (strncmp(cmd, "pa", 2) == 0)
+               else if (strncmp(cmd, "pa", 2) == 0)
                {
                        _player_prepare(TRUE); // async
                }
@@ -770,20 +1343,33 @@ void _interpret_main_menu(char *cmd)
                {
                        _player_unprepare();
                }
+               else if (strncmp(cmd, "dt", 2) == 0)
+               {
+                       _player_destroy();
+               }
                else if (strncmp(cmd, "sp", 2) == 0)
                {
                        _player_set_progressive_download();
                }
-               else if (strncmp(cmd, "jj", 2) == 0 )
+               else if (strncmp(cmd, "mp", 2) == 0)
                {
-                               g_menu_state = CURRENT_STATUS_KEY_FRAME_POSITION_TIME;
+                       g_memory_playback = (g_memory_playback ? FALSE : TRUE);
+                       g_print("memory playback = %d\n", g_memory_playback);
                }
-               else
+               else if (strncmp(cmd, "ds", 2) == 0 )
+               {
+                       g_menu_state = CURRENT_STATUS_DISPLAY_SURFACE_CHANGE;
+               }
+               else if (strncmp(cmd, "nb", 2) == 0 )
+               {
+                       g_menu_state = CURRENT_STATUS_HANDLE_NUM;
+               }
+               else
                {
-                               g_print("unknown menu \n");
+                       g_print("unknown menu \n");
                }
        }
-       else
+       else
        {
                g_print("unknown menu \n");
        }
@@ -796,8 +1382,8 @@ void display_sub_basic()
        g_print("=========================================================================================\n");
        g_print("                          Player Test (press q to quit) \n");
        g_print("-----------------------------------------------------------------------------------------\n");
-       g_print("*. Sample List in [%s]\n", MMTS_SAMPLELIST_INI_DEFAULT_PATH);
-
+       g_print("*. Sample List in [%s]      \t", MMTS_SAMPLELIST_INI_DEFAULT_PATH);
+       g_print("nb. num. of handles \n");
        for( idx = 1; idx <= INI_SAMPLE_LIST_MAX ; idx++ )
        {
                if (strlen (g_file_list[idx-1]) > 0)
@@ -811,32 +1397,33 @@ void display_sub_basic()
        g_print("c. Stop  \t");
        g_print("d. Resume\t");
        g_print("e. Pause \t");
-       g_print("un. Unprepare \n");
-       g_print("[State] S. Player State \n");
+       g_print("un. Unprepare \t");
+       g_print("dt. Destroy \n");
+       g_print("[State] S. Player State \n");
        g_print("[ volume ] f. Set Volume\t");
-       g_print("g. Get Volume\n");
+       g_print("g. Get Volume\t");
+       g_print("z. Set Sound type\t");
        g_print("[ mute ] h. Set Mute\t");
        g_print("i. Get Mute\n");
-       g_print("[position] j. Set Position (T, accurate)\t");
-       g_print("[position] jj. Set Position (T, key frame)\t");
-       g_print("k. Set Position (%%)\t");
+       g_print("[audio eq] E. Set Audio EQ\t");
+       g_print("H. Get Audio EQ\n");
+       g_print("[position] j. Set Position \t");
        g_print("l. Get Position\n");
        g_print("[duration] m. Get Duration\n");
        g_print("[Stream Info] n. Get stream info (Video Size, codec, audio stream info, and tag info)\n");
        g_print("[Looping] o. Set Looping\t");
        g_print("p. Get Looping\n");
+       g_print("[display] v. Set display visible\t");
+       g_print("w. Get display visible\n");
+       g_print("[display] ds. Change display surface type\n");
        g_print("[x display] r. Set display mode\t");
-       g_print("s. Get display mode\t");
-       g_print("t. Set display Rotation\t");
-       g_print("u. Get display Rotation\n");
-       g_print("[x display] v. Set display visible\t");
-       g_print("w. Get display visible\t");
-       g_print("x. Set ROI\t");
-       g_print("y. Get ROI\n");
-       g_print("[subtitle] A. Set subtitle path\n");
+       g_print("s. Get display mode\n");
+       g_print("[x display] t. Set display Rotation\t");
+       g_print("[Track] tl. Get Track language info(single only)\n");
+       g_print("[subtitle] A. Set(or change) subtitle path\n");
        g_print("[Video Capture] C. Capture \n");
-       g_print("[Audio Frame Decode] D. Decoding Audio Frame  E. Decoding Video Frame \n");
-       g_print("[etc] sp. Set Progressive Download\n");
+       g_print("[etc] sp. Set Progressive Download\t");
+       g_print("mp. memory playback\n");
        g_print("\n");
        g_print("=========================================================================================\n");
 }
@@ -847,6 +1434,10 @@ static void displaymenu()
        {
                display_sub_basic();
        }
+       else if (g_menu_state == CURRENT_STATUS_HANDLE_NUM)
+       {
+               g_print("*** input number of handles.(recommended only for EVAS surface)\n");
+       }
        else if (g_menu_state == CURRENT_STATUS_FILENAME)
        {
                g_print("*** input mediapath.\n");
@@ -855,28 +1446,30 @@ static void displaymenu()
        {
                g_print("*** input volume value.(0~1.0)\n");
        }
+       else if (g_menu_state == CURRENT_STATUS_SOUND_TYPE)
+       {
+               g_print("*** input sound type.(0:SYSTEM 1:NOTIFICATION 2:ALARM 3:RINGTONE 4:MEDIA 5:CALL 6:VOIP 7:FIXED)\n");
+       }
        else if (g_menu_state == CURRENT_STATUS_MUTE)
        {
                g_print("*** input mute value.(0: Not Mute, 1: Mute) \n");
        }
-       else if (g_menu_state == CURRENT_STATUS_REAL_POSITION_TIME
-               || g_menu_state == CURRENT_STATUS_KEY_FRAME_POSITION_TIME)
+       else if (g_menu_state == CURRENT_STATUS_POSITION_TIME)
        {
                g_print("*** input position value(msec)\n");
        }
-       else if (g_menu_state == CURRENT_STATUS_POSITION_PERCENT)
-       {
-               g_print("*** input position percent(%%)\n");
-       }
        else if (g_menu_state == CURRENT_STATUS_LOOPING)
        {
                g_print("*** input looping value.(0: Not Looping, 1: Looping) \n");
        }
+       else if (g_menu_state == CURRENT_STATUS_DISPLAY_SURFACE_CHANGE) {
+               g_print("*** input display surface type.(0: X surface, 1: EVAS surface) \n");
+       }
        else if (g_menu_state == CURRENT_STATUS_DISPLAY_MODE)
        {
-               g_print("*** input display mode value.(0: LETTER BOX, 1: ORIGIN SIZE, 2: FULL_SCREEN, 3: CROPPED_FULL) \n");
+               g_print("*** input display mode value.(0: LETTER BOX, 1: ORIGIN SIZE, 2: FULL_SCREEN, 3: CROPPED_FULL, 4: ORIGIN_OR_LETTER, 5: ROI) \n");
        }
-       else if (g_menu_state == CURRENT_STATUS_DISPLAY_ROTATION)
+       else if (g_menu_state == CURRENT_STATUS_DISPLAY_ROTATION)
        {
                g_print("*** input display rotation value.(0: NONE, 1: 90, 2: 180, 3: 270, 4:F LIP_HORZ, 5: FLIP_VERT ) \n");
        }
@@ -884,15 +1477,27 @@ static void displaymenu()
        {
                g_print("*** input display visible value.(0: HIDE, 1: SHOW) \n");
        }
-       else if (g_menu_state == CURRENT_STATUS_DISPLAY_ROI)
+       else if (g_menu_state == CURRENT_STATUS_DISPLAY_ROI_MODE)
+       {
+               g_print("*** input display roi mode.(0: FULL_SCREEN, 1: LETTER BOX)\n");
+       }
+       else if (g_menu_state == CURRENT_STATUS_DISPLAY_DST_ROI)
        {
-               g_print("*** input display roi value sequencially.(x, y, w, h)\n");
+               g_print("*** input display roi value sequentially.(x, y, w, h)\n");
        }
-       else if (g_menu_state == CURRENT_STATUS_SUBTITLE_FILENAME)
+       else if (g_menu_state == CURRENT_STATUS_DISPLAY_SRC_CROP)
+       {
+               g_print("*** input display source crop value sequentially.(x, y, w, h)\n");
+       }
+       else if (g_menu_state == CURRENT_STATUS_SUBTITLE_FILENAME)
        {
                g_print(" *** input  subtitle file path.\n");
        }
-       else
+       else if (g_menu_state == CURRENT_STATUS_AUDIO_EQUALIZER)
+       {
+               g_print(" *** input audio eq value.(0: UNSET, 1: SET) \n");
+       }
+       else
        {
                g_print("*** unknown status.\n");
                quit_program();
@@ -926,6 +1531,20 @@ static void interpret (char *cmd)
                        _interpret_main_menu(cmd);
                }
                break;
+               case CURRENT_STATUS_HANDLE_NUM:
+               {
+                       int num_handle = atoi(cmd);
+                       if (0 >= num_handle || num_handle > MAX_HANDLE)
+                       {
+                               g_print("not supported this number for handles(%d)\n", num_handle);
+                       }
+                       else
+                       {
+                               g_handle_num = num_handle;
+                       }
+                       reset_menu_state();
+               }
+               break;
                case CURRENT_STATUS_FILENAME:
                {
                        input_filename(cmd);
@@ -939,38 +1558,38 @@ static void interpret (char *cmd)
                        reset_menu_state();
                }
                break;
-               case CURRENT_STATUS_MUTE:
+               case CURRENT_STATUS_SOUND_TYPE:
                {
-                       int mute = atoi(cmd);
-                       set_mute(mute);
+                       int type = atoi(cmd);
+                       set_sound_type(type);
                        reset_menu_state();
                }
                break;
-               case CURRENT_STATUS_REAL_POSITION_TIME:
+               case CURRENT_STATUS_MUTE:
                {
-                       long position = atol(cmd);
-                       set_position(position, 1);
+                       int mute = atoi(cmd);
+                       set_mute(mute);
                        reset_menu_state();
                }
                break;
-               case CURRENT_STATUS_KEY_FRAME_POSITION_TIME:
+               case CURRENT_STATUS_POSITION_TIME:
                {
                        long position = atol(cmd);
-                       set_position(position, 0);
+                       set_position(position);
                        reset_menu_state();
                }
                break;
-               case CURRENT_STATUS_POSITION_PERCENT:
+               case CURRENT_STATUS_LOOPING:
                {
-                       long percent = atol(cmd);
-                       set_position_ratio(percent);
+                       int looping = atoi(cmd);
+                       set_looping(looping);
                        reset_menu_state();
                }
                break;
-               case CURRENT_STATUS_LOOPING:
+               case CURRENT_STATUS_DISPLAY_SURFACE_CHANGE:
                {
-                       int looping = atoi(cmd);
-                       set_looping(looping);
+                       int type = atoi(cmd);
+                       change_surface(type);
                        reset_menu_state();
                }
                break;
@@ -981,7 +1600,7 @@ static void interpret (char *cmd)
                        reset_menu_state();
                }
                break;
-               case CURRENT_STATUS_DISPLAY_ROTATION:
+               case CURRENT_STATUS_DISPLAY_ROTATION:
                {
                        int rotation = atoi(cmd);
                        set_display_rotation(rotation);
@@ -995,7 +1614,7 @@ static void interpret (char *cmd)
                        reset_menu_state();
                }
                break;
-               case CURRENT_STATUS_DISPLAY_ROI:
+               case CURRENT_STATUS_DISPLAY_DST_ROI:
                {
                        int value = atoi(cmd);
                        static int roi_x = 0;
@@ -1019,7 +1638,7 @@ static void interpret (char *cmd)
                        case 3:
                                cnt = 0;
                                roi_h = value;
-                               set_display_roi(roi_x, roi_y, roi_w, roi_h);
+                               set_display_dst_roi(roi_x, roi_y, roi_w, roi_h);
                                roi_x = roi_y = roi_w = roi_h = 0;
                                reset_menu_state();
                                break;
@@ -1028,13 +1647,60 @@ static void interpret (char *cmd)
                        }
                }
                break;
-               case CURRENT_STATUS_SUBTITLE_FILENAME:
+               case CURRENT_STATUS_DISPLAY_SRC_CROP:
+               {
+                       int value = atoi(cmd);
+                       static int crop_x = 0;
+                       static int crop_y = 0;
+                       static int crop_w = 0;
+                       static int crop_h = 0;
+                       static int crop_cnt = 0;
+                       switch (crop_cnt) {
+                       case 0:
+                               crop_x = value;
+                               crop_cnt++;
+                               break;
+                       case 1:
+                               crop_y = value;
+                               crop_cnt++;
+                               break;
+                       case 2:
+                               crop_w = value;
+                               crop_cnt++;
+                               break;
+                       case 3:
+                               crop_cnt = 0;
+                               crop_h = value;
+                               set_display_src_crop(crop_x, crop_y, crop_w, crop_h);
+                               crop_x = crop_y = crop_w = crop_h = 0;
+                               reset_menu_state();
+                               break;
+                       default:
+                               break;
+                       }
+               }
+               break;
+               case CURRENT_STATUS_DISPLAY_ROI_MODE:
+               {
+                       int value = atoi(cmd);
+                       set_display_roi_mode(value);
+                       reset_menu_state();
+               }
+               break;
+               case CURRENT_STATUS_SUBTITLE_FILENAME:
                {
                        input_subtitle_filename(cmd);
                        reset_menu_state();
                }
                break;
-       }
+               case CURRENT_STATUS_AUDIO_EQUALIZER:
+               {
+                       int value = atoi(cmd);
+                       set_audio_eq(value);
+                       reset_menu_state();
+               }
+               break;
+       }
        g_timeout_add(100, timeout_menu_display, 0);
 }
 
@@ -1065,4 +1731,3 @@ int main(int argc, char *argv[])
 
        return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
 }
-