support video texture(MM_DISPLAY_SURFACE_X_EXT), remove codes related to non-standard...
authorSangchul Lee <sc11.lee@samsung.com>
Tue, 30 Oct 2012 09:10:25 +0000 (18:10 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Tue, 30 Oct 2012 09:10:25 +0000 (18:10 +0900)
Change-Id: I5571023b96d3ae196879a9c3308378a83a00a257

packaging/libmm-player.spec
src/mm_player_attrs.c
src/mm_player_priv.c
src/mm_player_sndeffect.c

index 9d0bdf9..97bf739 100644 (file)
@@ -1,7 +1,7 @@
 
 Name:       libmm-player
 Summary:    Multimedia Framework Player Library
-Version:    0.2.5
+Version:    0.2.6
 Release:    0
 Group:      System/Libraries
 License:    TBD
index c1b691e..f8e15ab 100755 (executable)
@@ -673,6 +673,15 @@ _mmplayer_construct_attribute(MMHandleType handle)
                        0
                },
                {
+                       "display_overlay_user_data",
+                       MM_ATTRS_TYPE_DATA,
+                       MM_ATTRS_FLAG_RW,
+                       (void *) NULL,
+                       MM_ATTRS_VALID_TYPE_NONE,
+                       0,
+                       0
+               },
+               {
                        "display_zoom",
                        MM_ATTRS_TYPE_INT,
                        MM_ATTRS_FLAG_RW,
@@ -688,7 +697,7 @@ _mmplayer_construct_attribute(MMHandleType handle)
                        (void *) MM_DISPLAY_SURFACE_NULL,
                        MM_ATTRS_VALID_TYPE_INT_RANGE,
                        MM_DISPLAY_SURFACE_X,
-                       MM_DISPLAY_SURFACE_NULL
+                       MM_DISPLAY_SURFACE_X_EXT
                },
                {
                        "display_evas_surface_sink",
index ba3b8d7..e29ab3f 100755 (executable)
@@ -2382,89 +2382,33 @@ _mmplayer_update_video_param(mm_player_t* player) // @
        /* check video stream callback is used */
        if( player->use_video_stream )
        {
-               if (player->is_nv12_tiled)
-               {
-                       gchar *ename = NULL;
-                       int degree, width, height;
-                       degree = width = height = 0;
-                       
-                       mm_attrs_get_int_by_name(attrs, "display_width", &width);
-                       mm_attrs_get_int_by_name(attrs, "display_height", &height);
-                       mm_attrs_get_int_by_name(attrs, "display_rotation", &degree);
+               int rotate, width, height, orientation;
 
-                       /* resize video frame with requested values for fimcconvert */
-                       ename = GST_PLUGIN_FEATURE_NAME(gst_element_get_factory(player->pipeline->videobin[MMPLAYER_V_CONV].gst));
-
-                       if (g_strrstr(ename, "fimcconvert"))
-                       {
-                               if (width)
-                                       g_object_set(player->pipeline->videobin[MMPLAYER_V_CONV].gst, "src-width", width, NULL);
+               rotate = width = height = orientation = 0;
 
-                               if (height)
-                                       g_object_set(player->pipeline->videobin[MMPLAYER_V_CONV].gst, "src-height", height, NULL);
-
-                               switch (degree)
-                               {
-                                       case MM_DISPLAY_ROTATION_NONE:
-                                               degree = 0;
-                                               break;
-                                               
-                                       case MM_DISPLAY_ROTATION_90:
-                                               degree = 90;
-                                               break;
-                                               
-                                       case MM_DISPLAY_ROTATION_180:
-                                               degree = 180;
-                                               break;
-                                               
-                                       case MM_DISPLAY_ROTATION_270:
-                                               degree = 270;
-                                               break;
-                                               
-                                       default:
-                                               degree = 0;
-                                               break;
-                               }
+               debug_log("using video stream callback with memsink. player handle : [%p]", player);
 
-                               g_object_set(player->pipeline->videobin[MMPLAYER_V_CONV].gst, "rotate", degree, NULL);
+               mm_attrs_get_int_by_name(attrs, "display_width", &width);
+               mm_attrs_get_int_by_name(attrs, "display_height", &height);
+               mm_attrs_get_int_by_name(attrs, "display_rotation", &rotate);
+               mm_attrs_get_int_by_name(attrs, "display_orientation", &orientation);
 
-                               debug_log("updating fimcconvert - r[%d], w[%d], h[%d]", degree, width, height);
-                       }
-                       else
-                       {
-                               debug_error("no available video converter");
-                       }
-               }
+               if (rotate < MM_DISPLAY_ROTATION_NONE || rotate > MM_DISPLAY_ROTATION_270)
+                       rotate = 0;
                else
-               {
-                       int rotate, width, height, orientation, rotation;
-
-                       rotate = width = height = orientation = rotation = 0;
-
-                       debug_log("using video stream callback with memsink. player handle : [%p]", player);
-
-                       mm_attrs_get_int_by_name(attrs, "display_width", &width);
-                       mm_attrs_get_int_by_name(attrs, "display_height", &height);
-                       mm_attrs_get_int_by_name(attrs, "display_rotation", &rotation);
-                       mm_attrs_get_int_by_name(attrs, "display_orientation", &orientation);
+                       rotate *= 90;
 
-                       if(rotation == MM_DISPLAY_ROTATION_NONE)    rotate = 0;
-                       else if(rotation ==MM_DISPLAY_ROTATION_90)   rotate = 90;
-                       else if(rotation ==MM_DISPLAY_ROTATION_180)  rotate = 180;
-                       else if(rotation ==MM_DISPLAY_ROTATION_270)  rotate = 270;
+               if(orientation == 1)        rotate = 90;
+               else if(orientation == 2)   rotate = 180;
+               else if(orientation == 3)   rotate = 270;
 
-                       if(orientation == 1)        rotate = 90;
-                       else if(orientation == 2)   rotate = 180;
-                       else if(orientation == 3)   rotate = 270;
-                       
-                       if (width)
-                               g_object_set(player->pipeline->videobin[MMPLAYER_V_SINK].gst, "width", width, NULL);
+               if (width)
+                       g_object_set(player->pipeline->videobin[MMPLAYER_V_SINK].gst, "width", width, NULL);
 
-                       if (height)
-                               g_object_set(player->pipeline->videobin[MMPLAYER_V_SINK].gst, "height", height, NULL);
+               if (height)
+                       g_object_set(player->pipeline->videobin[MMPLAYER_V_SINK].gst, "height", height, NULL);
 
-                       g_object_set(player->pipeline->videobin[MMPLAYER_V_SINK].gst, "rotate", rotate,NULL);
-               }
+               g_object_set(player->pipeline->videobin[MMPLAYER_V_SINK].gst, "rotate", rotate,NULL);
                
                return MM_ERROR_NONE;
        }
@@ -2562,40 +2506,6 @@ _mmplayer_update_video_param(mm_player_t* player) // @
                                return MM_ERROR_PLAYER_INTERNAL;
                        }
 
-                       /* if evasimagesink */
-                       if (!strcmp(PLAYER_INI()->videosink_element_evas,"evasimagesink") && player->is_nv12_tiled)
-                       {
-                               int width = 0;
-                               int height = 0;
-                               int no_scaling = !scaling;
-
-                               mm_attrs_get_int_by_name(attrs, "display_width", &width);
-                               mm_attrs_get_int_by_name(attrs, "display_height", &height);
-
-                               if (no_scaling)
-                               {
-                                       /* no-scaling order to fimcconvert, original width, height size of media src will be passed to sink plugin */
-                                       g_object_set(player->pipeline->videobin[MMPLAYER_V_CONV].gst,
-                                                       "src-width", 0, /* setting 0, output video width will be media src's width */
-                                                       "src-height", 0, /* setting 0, output video height will be media src's height */
-                                                       NULL);
-                               }
-                               else
-                               {
-                                       /* scaling order to fimcconvert */
-                                       if (width)
-                                       {
-                                               g_object_set(player->pipeline->videobin[MMPLAYER_V_CONV].gst, "src-width", width, NULL);
-                                       }
-                                       if (height)
-                                       {
-                                               g_object_set(player->pipeline->videobin[MMPLAYER_V_CONV].gst, "src-height", height, NULL);
-                                       }
-                                       debug_log("set video param : video frame scaling down to width(%d) height(%d)", width, height);
-                               }
-                               debug_log("set video param : display_evas_do_scaling %d", scaling);
-                       }
-
                        /* if evaspixmapsink */
                        if (!strcmp(PLAYER_INI()->videosink_element_evas,"evaspixmapsink"))
                        {
@@ -2632,6 +2542,58 @@ _mmplayer_update_video_param(mm_player_t* player) // @
                        }
                }
                break;
+               case MM_DISPLAY_SURFACE_X_EXT:  /* NOTE : this surface type is for the video texture(canvas texture) */
+               {
+                       void *pixmap_id_cb = NULL;
+                       void *pixmap_id_cb_user_data = NULL;
+                       int zoom = 0;
+                       int degree = 0;
+                       int display_method = 0;
+                       int roi_x = 0;
+                       int roi_y = 0;
+                       int roi_w = 0;
+                       int roi_h = 0;
+                       int force_aspect_ratio = 0;
+                       gboolean visible = TRUE;
+
+                       /* if xvimagesink */
+                       if (strcmp(PLAYER_INI()->videosink_element_x,"xvimagesink"))
+                       {
+                               debug_error("videosink is not xvimagesink");
+                               return MM_ERROR_PLAYER_INTERNAL;
+                       }
+
+                       /* get information from attributes */
+                       mm_attrs_get_data_by_name(attrs, "display_overlay", &pixmap_id_cb);
+                       mm_attrs_get_data_by_name(attrs, "display_overlay_user_data", &pixmap_id_cb_user_data);
+                       mm_attrs_get_int_by_name(attrs, "display_method", &display_method);
+
+                       if ( pixmap_id_cb )
+                       {
+                               debug_log("set video param : display_overlay(0x%x)", pixmap_id_cb);
+                               if (pixmap_id_cb_user_data)
+                               {
+                                       debug_log("set video param : display_overlay_user_data(0x%x)", pixmap_id_cb_user_data);
+                               }
+                       }
+                       else
+                       {
+                               debug_error("failed to set pixmap-id-callback");
+                               return MM_ERROR_PLAYER_INTERNAL;
+                       }
+                       debug_log("set video param : method %d", display_method);
+                       debug_log("set video param : visible %d", visible);
+
+                       /* set properties of videosink plugin */
+                       g_object_set(player->pipeline->videobin[MMPLAYER_V_SINK].gst,
+                               "display-geometry-method", display_method,
+                               "draw-borders", FALSE,
+                               "visible", visible,
+                               "pixmap-id-callback", pixmap_id_cb,
+                               "pixmap-id-callback-userdata", pixmap_id_cb_user_data,
+                               NULL );
+               }
+               break;
                case MM_DISPLAY_SURFACE_NULL:
                {
                        /* do nothing */
@@ -3120,8 +3082,7 @@ __mmplayer_ahs_appsrc_probe (GstPad *pad, GstBuffer *buffer, gpointer u_data)
 /**
   * VIDEO PIPELINE
   * - x surface (arm/x86) : xvimagesink
-  * - evas surface  (arm) : evaspixmapsink
-  *                         fimcconvert ! evasimagesink
+  * - evas surface  (arm) : ffmpegcolorspace ! evasimagesink
   * - evas surface  (x86) : videoconvertor ! evasimagesink
   */
 static int
@@ -3166,16 +3127,9 @@ __mmplayer_gst_create_video_pipeline(mm_player_t* player, GstCaps* caps, MMDispl
                debug_log("using memsink\n");
 
                /* first, create colorspace convert */
-               if (player->is_nv12_tiled)
-               {
-                       vconv_factory = "fimcconvert";
-               }
-               else // get video converter from player ini file
+               if (strlen(PLAYER_INI()->name_of_video_converter) > 0)
                {
-                       if (strlen(PLAYER_INI()->name_of_video_converter) > 0)
-                       {
                                vconv_factory = PLAYER_INI()->name_of_video_converter;
-                       }
                }
 
                if (vconv_factory)
@@ -3279,19 +3233,6 @@ __mmplayer_gst_create_video_pipeline(mm_player_t* player, GstCaps* caps, MMDispl
                if (strlen(PLAYER_INI()->name_of_video_converter) > 0)
                {
                        vconv_factory = PLAYER_INI()->name_of_video_converter;
-                       
-                       if (player->is_nv12_tiled)
-                       {
-                               if ( ((surface_type == MM_DISPLAY_SURFACE_EVAS) && !strcmp(PLAYER_INI()->videosink_element_evas, "evasimagesink")) )
-                               {
-                                       vconv_factory = "fimcconvert";
-                               }
-                               else
-                               {
-                                       vconv_factory = NULL;
-                               }
-                       }
-
                        if (vconv_factory)
                        {
                                MMPLAYER_CREATE_ELEMENT(videobin, MMPLAYER_V_CONV, vconv_factory, "video converter", TRUE);
@@ -3307,27 +3248,43 @@ __mmplayer_gst_create_video_pipeline(mm_player_t* player, GstCaps* caps, MMDispl
                /* set video sink */
                switch (surface_type)
                {
-                       case MM_DISPLAY_SURFACE_X:
-                               if (strlen(PLAYER_INI()->videosink_element_x) > 0)
-                                       videosink_element = PLAYER_INI()->videosink_element_x;
-                               else
-                                       goto ERROR;
-                               break;
-                       case MM_DISPLAY_SURFACE_EVAS:
-                               if (strlen(PLAYER_INI()->videosink_element_evas) > 0)
-                                       videosink_element = PLAYER_INI()->videosink_element_evas;
-                               else
-                                       goto ERROR;
-                               break;
-                       case MM_DISPLAY_SURFACE_NULL:
-                               if (strlen(PLAYER_INI()->videosink_element_fake) > 0)
-                                       videosink_element = PLAYER_INI()->videosink_element_fake;
-                               else
-                                       goto ERROR;
-                               break;
-                       default:
-                               debug_error("unidentified surface type");
+               case MM_DISPLAY_SURFACE_X:
+                       if (strlen(PLAYER_INI()->videosink_element_x) > 0)
+                               videosink_element = PLAYER_INI()->videosink_element_x;
+                       else
                                goto ERROR;
+                       break;
+               case MM_DISPLAY_SURFACE_EVAS:
+                       if (strlen(PLAYER_INI()->videosink_element_evas) > 0)
+                               videosink_element = PLAYER_INI()->videosink_element_evas;
+                       else
+                               goto ERROR;
+                       break;
+               case MM_DISPLAY_SURFACE_X_EXT:
+               {
+                       void *pixmap_id_cb = NULL;
+                       mm_attrs_get_data_by_name(attrs, "display_overlay", &pixmap_id_cb);
+                       if (pixmap_id_cb) /* this is for the video textue(canvas texture) */
+                       {
+                               videosink_element = PLAYER_INI()->videosink_element_x;
+                               debug_warning("video texture usage");
+                       }
+                       else
+                       {
+                               debug_error("something wrong.. callback function for getting pixmap id is null");
+                               goto ERROR;
+                       }
+                       break;
+               }
+               case MM_DISPLAY_SURFACE_NULL:
+                       if (strlen(PLAYER_INI()->videosink_element_fake) > 0)
+                               videosink_element = PLAYER_INI()->videosink_element_fake;
+                       else
+                               goto ERROR;
+                       break;
+               default:
+                       debug_error("unidentified surface type");
+                       goto ERROR;
                }
 
                MMPLAYER_CREATE_ELEMENT(videobin, MMPLAYER_V_SINK, videosink_element, videosink_element, TRUE);
index 1a7b5ea..1cefe23 100755 (executable)
@@ -40,7 +40,7 @@ mm_player_get_foreach_present_supported_filter_type(MMHandleType player, MMAudio
        /* get status if speaker is activated */
        result = mm_sound_get_active_device(&device_in, &device_out);
        if ( result ) {
-               debug_error("mm_sound_get_active_device() failed [%x]!!\n", result);
+               debug_error("mm_sound_get_active_device() failed [%x]!!", result);
                return result;
        }
 
@@ -84,14 +84,14 @@ mm_player_get_foreach_present_supported_filter_type(MMHandleType player, MMAudio
        }
        else
        {
-               debug_error("invalid filter type(%d)\n", filter_type);
+               debug_error("invalid filter type(%d)", filter_type);
                result = MM_ERROR_INVALID_ARGUMENT;
        }
 
        return result;
 
 CALLBACK_ERROR:
-       debug_error("foreach cb returned error\n");
+       debug_error("foreach cb returned error");
        return MM_ERROR_PLAYER_INTERNAL;
 }
 
@@ -110,25 +110,25 @@ __mmplayer_set_harmony_filter(mm_player_t *player, GstElement *filter_element)
        /* Custom EQ */
        if( PLAYER_INI()->audio_filter_custom_eq_num )
        {
-               debug_log("pass custom EQ level list to sound effect plugin\n");
+               debug_log("pass custom EQ level list to sound effect plugin");
                /* set custom-equalizer level list */
                g_object_set(filter_element, "custom-eq", player->audio_filter_info.custom_eq_level, NULL);
        }
        else
        {
-               debug_warning("no custom EQ\n");
+               debug_warning("no custom EQ");
        }
 
        /* Custom Extension filters */
        if( PLAYER_INI()->audio_filter_custom_ext_num )
        {
-               debug_log("pass custom extension level list to sound effect plugin\n");
+               debug_log("pass custom extension level list to sound effect plugin");
                ext_filter_level_list = player->audio_filter_info.custom_ext_level_for_plugin;
                if (!ext_filter_level_list) {
                        ext_filter_level_list = (gint*) malloc (sizeof(gint)*PLAYER_INI()->audio_filter_custom_ext_num);
                        if (!ext_filter_level_list)
                        {
-                               debug_error("memory allocation for extension filter list failed\n");
+                               debug_error("memory allocation for extension filter list failed");
                                return MM_ERROR_OUT_OF_MEMORY;
                        }
                        else
@@ -156,12 +156,12 @@ __mmplayer_set_harmony_filter(mm_player_t *player, GstElement *filter_element)
        }
        else
        {
-               debug_warning("no custom extension fliter\n");
+               debug_warning("no custom extension fliter");
        }
 
        /* order action to sound effect plugin */
        g_object_set(filter_element, "filter-action", MM_AUDIO_FILTER_TYPE_CUSTOM, NULL);
-       debug_log("filter-action = %d\n", MM_AUDIO_FILTER_TYPE_CUSTOM);
+       debug_log("filter-action = %d", MM_AUDIO_FILTER_TYPE_CUSTOM);
 
        debug_fleave();
 
@@ -183,7 +183,7 @@ __mmplayer_is_earphone_only_filter_type(mm_player_t *player, MMAudioFilterType f
        {
                if (PLAYER_INI()->audio_filter_preset_earphone_only_list[filter])
                {
-                       debug_msg("this preset filter(%d) is only available with earphone\n", filter);
+                       debug_msg("this preset filter(%d) is only available with earphone", filter);
                        result = TRUE;
                }
        }
@@ -197,7 +197,7 @@ __mmplayer_is_earphone_only_filter_type(mm_player_t *player, MMAudioFilterType f
                                /* check if the earphone only custom filter was set */
                                if (player->audio_filter_info.custom_ext_level[i-1])
                                {
-                                       debug_msg("this custom filter(%d) is only available with earphone\n", i);
+                                       debug_msg("this custom filter(%d) is only available with earphone", i);
                                        result = TRUE;
                                }
                        }
@@ -205,7 +205,7 @@ __mmplayer_is_earphone_only_filter_type(mm_player_t *player, MMAudioFilterType f
        }
        else
        {
-               debug_error("invalid filter type(%d)\n", filter_type);
+               debug_error("invalid filter type(%d)", filter_type);
        }
 
        return result;
@@ -224,12 +224,12 @@ _mmplayer_is_supported_filter_type(MMAudioFilterType filter_type, int filter)
        {
                if ( filter < MM_AUDIO_FILTER_PRESET_AUTO || filter >= MM_AUDIO_FILTER_PRESET_NUM )
                {
-                       debug_error("out of range, preset filter(%d)\n", filter);
+                       debug_error("out of range, preset filter(%d)", filter);
                        result = FALSE;
                }
                if (!PLAYER_INI()->audio_filter_preset_list[filter])
                {
-                       debug_error("this filter(%d) is not supported\n", filter);
+                       debug_error("this filter(%d) is not supported", filter);
                        result = FALSE;
                }
        }
@@ -238,18 +238,18 @@ _mmplayer_is_supported_filter_type(MMAudioFilterType filter_type, int filter)
        {
                if ( filter < MM_AUDIO_FILTER_CUSTOM_EQ || filter >= MM_AUDIO_FILTER_CUSTOM_NUM )
                {
-                       debug_error("out of range, custom filter(%d)\n", filter);
+                       debug_error("out of range, custom filter(%d)", filter);
                        result = FALSE;
                }
                if (!PLAYER_INI()->audio_filter_custom_list[filter])
                {
-                       debug_error("this custom filter(%d) is not supported\n", filter);
+                       debug_error("this custom filter(%d) is not supported", filter);
                        result = FALSE;
                }
        }
        else
        {
-               debug_error("invalid filter type(%d)\n", filter_type);
+               debug_error("invalid filter type(%d)", filter_type);
                result = FALSE;
        }
 
@@ -273,7 +273,7 @@ _mmplayer_sound_filter_preset_apply(mm_player_t *player, MMAudioFilterPresetType
        /* Music Player can set sound effect value before Audiobin is created. */
        if ( !player->pipeline || !player->pipeline->audiobin )
        {
-               debug_warning("filter element is not created yet.\n");
+               debug_warning("filter element is not created yet.");
 
                player->bypass_sound_effect = FALSE;
 
@@ -290,7 +290,7 @@ _mmplayer_sound_filter_preset_apply(mm_player_t *player, MMAudioFilterPresetType
                /* get status if speaker is activated */
                result = mm_sound_get_active_device(&device_in, &device_out);
                if ( result ) {
-                       debug_error("mm_sound_get_active_device() failed [%x]!!\n", result);
+                       debug_error("mm_sound_get_active_device() failed [%x]!!", result);
                        return result;
                }
 
@@ -300,7 +300,7 @@ _mmplayer_sound_filter_preset_apply(mm_player_t *player, MMAudioFilterPresetType
                        output_type = MM_AUDIO_FILTER_OUTPUT_SPK;
                        if (__mmplayer_is_earphone_only_filter_type(player, MM_AUDIO_FILTER_TYPE_PRESET, filter_type))
                        {
-                               debug_error("earphone is not equipped, this filter will not be applied\n");
+                               debug_error("earphone is not equipped, this filter will not be applied");
                                return MM_ERROR_PLAYER_SOUND_EFFECT_INVALID_STATUS;
                        }
                }
@@ -312,23 +312,23 @@ _mmplayer_sound_filter_preset_apply(mm_player_t *player, MMAudioFilterPresetType
 
                /* set filter output mode as SPEAKER or EARPHONE */
                g_object_set(filter_element, "filter-output-mode", output_type, NULL);
-               debug_log("filter-output-mode = %d (0:spk,1:ear)\n", output_type);
+               debug_log("filter-output-mode = %d (0:spk,1:ear)", output_type);
 
                if (filter_type == MM_AUDIO_FILTER_PRESET_AUTO) {
                        /* TODO: Add codes about auto selecting preset mode according to ID3 tag */
                        /* set filter preset mode */
                        g_object_set(filter_element, "preset-mode", 0, NULL); /* forced set to 0(normal) temporarily */
-                       debug_log("preset-mode = %d\n", filter_type);
+                       debug_log("preset-mode = %d", filter_type);
 
                } else {
                        /* set filter preset mode */
                        g_object_set(filter_element, "preset-mode", filter_type-1, NULL); /* filter_type-1, because of _PRESET_AUTO in MSL/CAPI which does not exist in soundAlive plugin */
-                       debug_log("preset-mode = %d\n", filter_type);
+                       debug_log("preset-mode = %d", filter_type);
                }
 
                /* order action to sound effect plugin */
                g_object_set(filter_element, "filter-action", MM_AUDIO_FILTER_TYPE_PRESET, NULL);
-               debug_log("filter-action = %d\n", MM_AUDIO_FILTER_TYPE_PRESET);
+               debug_log("filter-action = %d", MM_AUDIO_FILTER_TYPE_PRESET);
 
        }
        debug_fleave();
@@ -350,7 +350,7 @@ _mmplayer_sound_filter_custom_apply(mm_player_t *player)
        /* Music Player can set sound effect value before Audiobin is created. */
        if ( !player->pipeline || !player->pipeline->audiobin )
        {
-               debug_warning("filter element is not created yet.\n");
+               debug_warning("filter element is not created yet.");
 
                player->bypass_sound_effect = FALSE;
 
@@ -370,7 +370,7 @@ _mmplayer_sound_filter_custom_apply(mm_player_t *player)
                /* get status if speaker is activated */
                result = mm_sound_get_active_device(&device_in, &device_out);
                if ( result ) {
-                       debug_error("mm_sound_get_active_device() failed [%x]!!\n", result);
+                       debug_error("mm_sound_get_active_device() failed [%x]!!", result);
                        return result;
                }
 
@@ -380,7 +380,7 @@ _mmplayer_sound_filter_custom_apply(mm_player_t *player)
                        output_type = MM_AUDIO_FILTER_OUTPUT_SPK;
                        if (__mmplayer_is_earphone_only_filter_type(player, MM_AUDIO_FILTER_TYPE_CUSTOM, NULL))
                        {
-                               debug_error("earphone is not equipped, some custom filter should operate with earphone(%x)\n", result);
+                               debug_error("earphone is not equipped, some custom filter should operate with earphone");
                                return MM_ERROR_PLAYER_SOUND_EFFECT_INVALID_STATUS;
                        }
                }
@@ -392,12 +392,12 @@ _mmplayer_sound_filter_custom_apply(mm_player_t *player)
 
                /* set filter output mode as SPEAKER or EARPHONE */
                g_object_set(filter_element, "filter-output-mode", output_type, NULL);
-               debug_log("filter output mode = %d(0:spk,1:ear)\n", output_type);
+               debug_log("filter output mode = %d(0:spk,1:ear)", output_type);
 
                result = __mmplayer_set_harmony_filter(player, filter_element);
                if ( result )
                {
-                       debug_error("_set_harmony_filter() failed(%x)\n", result);
+                       debug_error("_set_harmony_filter() failed(%x)", result);
                        return result;
                }
        }
@@ -419,7 +419,7 @@ mm_player_sound_filter_custom_clear_eq_all(MMHandleType hplayer)
        /* clear EQ custom filter */
        memset(player->audio_filter_info.custom_eq_level, MM_AUDIO_FILTER_CUSTOM_LEVEL_INIT, sizeof(int)*MM_AUDIO_FILTER_EQ_BAND_MAX);
 
-       debug_msg("All the EQ bands clearing success\n");
+       debug_msg("All the EQ bands clearing success");
 
        return result;
 }
@@ -441,7 +441,7 @@ mm_player_sound_filter_custom_clear_ext_all(MMHandleType hplayer)
                player->audio_filter_info.custom_ext_level[i] = MM_AUDIO_FILTER_CUSTOM_LEVEL_INIT;
        }
 
-       debug_msg("All the extension filters clearing success\n");
+       debug_msg("All the extension filters clearing success");
 
        return result;
 }
@@ -494,13 +494,13 @@ mm_player_sound_filter_preset_apply(MMHandleType hplayer, MMAudioFilterPresetTyp
 
        if (!PLAYER_INI()->use_audio_filter_preset)
        {
-               debug_error("sound filter(preset) is not suppported\n", type);
+               debug_error("sound filter(preset) is not suppported", type);
                return MM_ERROR_NOT_SUPPORT_API;
        }
 
        if (type < MM_AUDIO_FILTER_PRESET_AUTO || type >= MM_AUDIO_FILTER_PRESET_NUM)
        {
-               debug_error("out of range, type(%d)\n", type);
+               debug_error("out of range, type(%d)", type);
                return MM_ERROR_INVALID_ARGUMENT;
        }
 
@@ -527,7 +527,7 @@ mm_player_sound_filter_custom_apply(MMHandleType hplayer)
 
        if (!PLAYER_INI()->use_audio_filter_custom)
        {
-               debug_error("sound filter(custom) is not suppported\n");
+               debug_error("sound filter(custom) is not suppported");
                return MM_ERROR_NOT_SUPPORT_API;
        }
 
@@ -549,12 +549,12 @@ mm_player_sound_filter_bypass (MMHandleType hplayer)
 
        if ( !PLAYER_INI()->use_audio_filter_preset && !PLAYER_INI()->use_audio_filter_custom )
        {
-               debug_error("sound filter(preset/custom) is not suppported\n");
+               debug_error("sound filter(preset/custom) is not suppported");
                return MM_ERROR_NOT_SUPPORT_API;
        }
        if ( !player->pipeline || !player->pipeline->audiobin )
        {
-               debug_warning("filter element is not created yet.\n");
+               debug_warning("filter element is not created yet.");
        }
        else
        {
@@ -563,7 +563,7 @@ mm_player_sound_filter_bypass (MMHandleType hplayer)
 
                /* order action to sound effect plugin */
                g_object_set(filter_element, "filter-action", MM_AUDIO_FILTER_TYPE_NONE, NULL);
-               debug_log("filter-action = %d\n", MM_AUDIO_FILTER_TYPE_NONE);
+               debug_log("filter-action = %d", MM_AUDIO_FILTER_TYPE_NONE);
        }
 
        debug_fleave();
@@ -598,13 +598,13 @@ _mmplayer_sound_filter_custom_set_level_ext(mm_player_t *player, MMAudioFilterCu
                        {
                                filter_level_min = PLAYER_INI()->audio_filter_custom_min_level_list[ext_level_index];
                                filter_level_max = PLAYER_INI()->audio_filter_custom_max_level_list[ext_level_index];
-                               debug_msg("level min value(%d), level max value(%d)\n", filter_level_min, filter_level_max);
+                               debug_msg("level min value(%d), level max value(%d)", filter_level_min, filter_level_max);
                                break;
                        }
                        ext_level_index++;
                        if (ext_level_index == PLAYER_INI()->audio_filter_custom_ext_num + 1)
                        {
-                               debug_error("could not find min, max value. maybe filter information in ini file is not proper for sound effect plugin\n");
+                               debug_error("could not find min, max value. maybe filter information in ini file is not proper for sound effect plugin");
                                break;
                        }
                }
@@ -613,13 +613,13 @@ _mmplayer_sound_filter_custom_set_level_ext(mm_player_t *player, MMAudioFilterCu
 
        if ( level < filter_level_min || level > filter_level_max )
        {
-               debug_error("out of range, level(%d)\n", level);
+               debug_error("out of range, level(%d)", level);
                result = MM_ERROR_INVALID_ARGUMENT;
        }
        else
        {
                player->audio_filter_info.custom_ext_level[custom_filter_type-1] = level;
-               debug_msg("set ext[%d] = %d\n", custom_filter_type-1, level);
+               debug_msg("set ext[%d] = %d", custom_filter_type-1, level);
        }
 
        debug_fleave();
@@ -645,24 +645,24 @@ _mmplayer_sound_filter_custom_set_level_eq(mm_player_t *player, int index, int l
 
        if ( index < 0 || index > PLAYER_INI()->audio_filter_custom_eq_num - 1 )
        {
-               debug_error("out of range, index(%d)\n", index);
+               debug_error("out of range, index(%d)", index);
                result = MM_ERROR_INVALID_ARGUMENT;
        }
        else
        {
                eq_level_min = PLAYER_INI()->audio_filter_custom_min_level_list[MM_AUDIO_FILTER_CUSTOM_EQ];
                eq_level_max = PLAYER_INI()->audio_filter_custom_max_level_list[MM_AUDIO_FILTER_CUSTOM_EQ];
-               debug_msg("EQ level min value(%d), EQ level max value(%d)\n", eq_level_min, eq_level_max);
+               debug_msg("EQ level min value(%d), EQ level max value(%d)", eq_level_min, eq_level_max);
 
                if ( level < eq_level_min || level > eq_level_max )
                {
-                       debug_error("out of range, EQ level(%d)\n", level);
+                       debug_error("out of range, EQ level(%d)", level);
                        result =  MM_ERROR_INVALID_ARGUMENT;
                }
                else
                {
                        player->audio_filter_info.custom_eq_level[index] = level;
-                       debug_msg("set EQ[%d] = %d\n", index, level);
+                       debug_msg("set EQ[%d] = %d", index, level);
                }
        }
        debug_fleave();
@@ -697,7 +697,7 @@ mm_player_sound_filter_custom_set_level(MMHandleType hplayer, MMAudioFilterCusto
        }
        else
        {
-               debug_error("out of range, filter type(%d)\n", filter_custom_type);
+               debug_error("out of range, filter type(%d)", filter_custom_type);
                result = MM_ERROR_INVALID_ARGUMENT;
        }
        return result;
@@ -720,7 +720,7 @@ mm_player_sound_filter_custom_get_eq_bands_number(MMHandleType hplayer, int *ban
        }
 
        *bands = PLAYER_INI()->audio_filter_custom_eq_num;
-       debug_log("number of custom eq band = %d\n", *bands);
+       debug_log("number of custom eq band = %d", *bands);
 
        debug_fleave();
 
@@ -749,23 +749,23 @@ mm_player_sound_filter_custom_get_level(MMHandleType hplayer, MMAudioFilterCusto
        {
                if ( eq_index < 0 || eq_index > PLAYER_INI()->audio_filter_custom_eq_num - 1 )
                {
-                       debug_error("out of range, eq index(%d)\n", eq_index);
+                       debug_error("out of range, eq index(%d)", eq_index);
                        result = MM_ERROR_INVALID_ARGUMENT;
                }
                else
                {
                        *level = player->audio_filter_info.custom_eq_level[eq_index];
-                       debug_log("EQ index = %d, level = %d\n", eq_index, *level);
+                       debug_log("EQ index = %d, level = %d", eq_index, *level);
                }
        }
        else if ( type > MM_AUDIO_FILTER_CUSTOM_EQ && type < MM_AUDIO_FILTER_CUSTOM_NUM )
        {
                *level = player->audio_filter_info.custom_ext_level[type-1];
-               debug_log("extention filter index = %d, level = %d\n", type, *level);
+               debug_log("extention filter index = %d, level = %d", type, *level);
        }
        else
        {
-               debug_error("out of range, type(%d)\n", type);
+               debug_error("out of range, type(%d)", type);
                result = MM_ERROR_INVALID_ARGUMENT;
        }
 
@@ -799,7 +799,7 @@ mm_player_sound_filter_custom_get_level_range(MMHandleType hplayer, MMAudioFilte
        {
                *min = PLAYER_INI()->audio_filter_custom_min_level_list[MM_AUDIO_FILTER_CUSTOM_EQ];
                *max = PLAYER_INI()->audio_filter_custom_max_level_list[MM_AUDIO_FILTER_CUSTOM_EQ];
-               debug_log("EQ min level = %d, max level = %d\n", *min, *max);
+               debug_log("EQ min level = %d, max level = %d", *min, *max);
        }
        else
        {
@@ -811,13 +811,13 @@ mm_player_sound_filter_custom_get_level_range(MMHandleType hplayer, MMAudioFilte
                                {
                                        *min = PLAYER_INI()->audio_filter_custom_min_level_list[ext_level_index];
                                        *max = PLAYER_INI()->audio_filter_custom_max_level_list[ext_level_index];
-                                       debug_msg("Extension filter(%d) min level = %d, max level = %d\n", count, *min, *max);
+                                       debug_msg("Extension filter(%d) min level = %d, max level = %d", count, *min, *max);
                                        break;
                                }
                                ext_level_index++;
                                if ( ext_level_index == PLAYER_INI()->audio_filter_custom_ext_num + 1 )
                                {
-                                       debug_error("could not find min, max value. maybe filter information in ini file is not proper for sound effect plugin\n");
+                                       debug_error("could not find min, max value. maybe filter information in ini file is not proper for sound effect plugin");
                                        break;
                                }
                        }
@@ -852,7 +852,7 @@ mm_player_sound_filter_custom_set_level_eq_from_list(MMHandleType hplayer, int *
 
        if ( size != PLAYER_INI()->audio_filter_custom_eq_num )
        {
-               debug_error("input size variable(%d) does not match with number of eq band(%d)\n", size, PLAYER_INI()->audio_filter_custom_eq_num);
+               debug_error("input size variable(%d) does not match with number of eq band(%d)", size, PLAYER_INI()->audio_filter_custom_eq_num);
                result = MM_ERROR_INVALID_ARGUMENT;
        }
        else
@@ -864,7 +864,7 @@ mm_player_sound_filter_custom_set_level_eq_from_list(MMHandleType hplayer, int *
                {
                        if ( level_list[i] < eq_level_min || level_list[i] > eq_level_max)
                        {
-                               debug_error("out of range, level[%d]=%d\n", i, level_list[i]);
+                               debug_error("out of range, level[%d]=%d", i, level_list[i]);
                                result = MM_ERROR_INVALID_ARGUMENT;
                                break;
                        }