[0.6.231] Fix typo error
[platform/core/multimedia/libmm-player.git] / src / mm_player_priv.c
index 10a1c23..f4773fd 100644 (file)
@@ -83,7 +83,7 @@
 #define MM_VOLUME_FACTOR_MAX                   1.0
 
 /* Don't need to sleep for sound fadeout
- * fadeout related fucntion will be deleted(Deprecated)
+ * fadeout related function will be deleted(Deprecated)
  */
 #define MM_PLAYER_FADEOUT_TIME_DEFAULT 0
 
@@ -310,7 +310,7 @@ _mmplayer_get_stream_service_type(mmplayer_t *player)
 }
 
 /* this function sets the player state and also report
- * it to applicaton by calling callback function
+ * it to application by calling callback function
  */
 void
 _mmplayer_set_state(mmplayer_t *player, int state)
@@ -390,7 +390,7 @@ _mmplayer_check_state(mmplayer_t *player, mmplayer_command_state_e command)
 
        MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
 #ifdef __DEBUG__
-       LOGD("incomming command : %d ", command);
+       LOGD("incoming command : %d ", command);
 #endif
        current_state = MMPLAYER_CURRENT_STATE(player);
        pending_state = MMPLAYER_PENDING_STATE(player);
@@ -491,7 +491,7 @@ _mmplayer_check_state(mmplayer_t *player, mmplayer_command_state_e command)
                if (pending_state == MM_PLAYER_STATE_NONE) {
                        if (current_state == MM_PLAYER_STATE_PAUSED)
                                goto NO_OP;
-                       else if (current_state != MM_PLAYER_STATE_PLAYING && current_state != MM_PLAYER_STATE_READY) // support loading state of broswer
+                       else if (current_state != MM_PLAYER_STATE_PLAYING && current_state != MM_PLAYER_STATE_READY) // support loading state of browser
                                goto INVALID_STATE;
                } else if (pending_state == MM_PLAYER_STATE_PAUSED) {
                        goto ALREADY_GOING;
@@ -842,7 +842,7 @@ _mmplayer_gst_remove_fakesink(mmplayer_t *player, mmplayer_gst_element_t *fakesi
        gst_element_set_locked_state(fakesink->gst, TRUE);
 
        /* setting the state to NULL never returns async
-        * so no need to wait for completion of state transiton
+        * so no need to wait for completion of state transition
         */
        if (GST_STATE_CHANGE_FAILURE == gst_element_set_state(fakesink->gst, GST_STATE_NULL))
                LOGE("fakesink state change failure!");
@@ -1090,7 +1090,7 @@ ERROR:
        return ret;
 }
 
-/* create fakesink for audio or video path witout audiobin or videobin */
+/* create fakesink for audio or video path without audiobin or videobin */
 static void
 __mmplayer_gst_make_fakesink(mmplayer_t *player, GstPad *pad, const gchar *name)
 {
@@ -1496,7 +1496,7 @@ __mmplayer_create_text_sink_path(mmplayer_t *player, GstElement *text_selector)
        MMPLAYER_RETURN_VAL_IF_FAIL(player && text_selector, FALSE);
 
        if (MMPLAYER_IS_MS_BUFF_SRC(player)) {
-               LOGD("text path is not supproted");
+               LOGD("text path is not supported");
                return TRUE;
        }
 
@@ -1766,7 +1766,7 @@ __mmplayer_gst_create_sink_bin(GstElement *elem, GstPad *pad, GstCaps *ref_caps,
                                player->textsink_linked  = 1;
                        } else {
                                /* linked textbin exist which means that the external subtitle path exist already */
-                               LOGW("ignoring internal subtutle since external subtitle is available");
+                               LOGW("ignoring internal subtitle since external subtitle is available");
                        }
                }
                sink_pad_name = "text_sink";
@@ -1832,7 +1832,7 @@ __mmplayer_get_property_value_for_rotation(mmplayer_t *player, int display_angle
        if (rotation_angle >= 360)
                rotation_angle -= 360;
 
-       /* chech if supported or not */
+       /* check if supported or not */
        if (rotation_angle % 90) {
                LOGD("not supported rotation angle = %d", rotation_angle);
                return FALSE;
@@ -1871,7 +1871,7 @@ _mmplayer_get_video_angle(mmplayer_t *player, int *display_angle, int *orientati
        }
 
        if (display_angle) {
-               /* update user roation */
+               /* update user rotation */
                mm_attrs_get_int_by_name(attrs, "display_rotation", &display_rotation);
 
                /* Counter clockwise */
@@ -3151,7 +3151,7 @@ ERROR:
                }
        }
 
-       /* release audiobin with it's childs */
+       /* release audiobin with it's children */
        if (audiobin[MMPLAYER_A_BIN].gst)
                gst_object_unref(GST_OBJECT(audiobin[MMPLAYER_A_BIN].gst));
 
@@ -3359,7 +3359,7 @@ __mmplayer_video_stream_decoded_render_cb(GstElement *object, GstBuffer *buffer,
        /* set size and timestamp */
        mem = gst_buffer_peek_memory(buffer, 0);
        stream->length_total = gst_memory_get_sizes(mem, NULL, NULL);
-       stream->timestamp = (unsigned int)(GST_TIME_AS_MSECONDS(GST_BUFFER_PTS(buffer))); /* nano sec -> mili sec */
+       stream->timestamp = (unsigned int)(GST_TIME_AS_MSECONDS(GST_BUFFER_PTS(buffer))); /* nano sec -> milli sec */
 
        /* check zero-copy */
        if (player->set_mode.video_zc &&
@@ -3701,7 +3701,7 @@ ERROR:
        if (pad)
                gst_object_unref(GST_OBJECT(pad));
 
-       /* release videobin with it's childs */
+       /* release videobin with it's children */
        if (videobin[MMPLAYER_V_BIN].gst)
                gst_object_unref(GST_OBJECT(videobin[MMPLAYER_V_BIN].gst));
 
@@ -3875,7 +3875,7 @@ ERROR:
                }
        }
 
-       /* release textbin with it's childs */
+       /* release textbin with it's children */
        if (textbin[MMPLAYER_T_BIN].gst)
                gst_object_unref(GST_OBJECT(textbin[MMPLAYER_T_BIN].gst));
 
@@ -3997,7 +3997,7 @@ __mmplayer_gst_create_text_pipeline(mmplayer_t *player)
                        /* release signal */
                        __mmplayer_release_signal_connection(player, MM_PLAYER_SIGNAL_TYPE_TEXTBIN);
 
-                       /* release textbin with it's childs */
+                       /* release textbin with it's children */
                        gst_object_unref(GST_OBJECT(textbin[MMPLAYER_T_BIN].gst));
                        MMPLAYER_FREEIF(player->pipeline->textbin);
                        player->pipeline->textbin = textbin = NULL;
@@ -4048,7 +4048,7 @@ ERROR:
        if (player->pipeline->textbin) {
                LOGE("remove textbin");
 
-               /* release textbin with it's childs */
+               /* release textbin with it's children */
                MMPLAYER_RELEASE_ELEMENT(player, player->pipeline->textbin, MMPLAYER_T_BIN);
                MMPLAYER_FREEIF(player->pipeline->textbin);
                player->pipeline->textbin = NULL;
@@ -4173,7 +4173,7 @@ __mmplayer_gst_adjust_subtitle_position(mmplayer_t *player, int position)
                return MM_ERROR_NONE;
        }
 
-       /* check current postion */
+       /* check current position */
        player->adjust_subtitle_pos = position;
 
        LOGD("save adjust_subtitle_pos in player");
@@ -4248,7 +4248,7 @@ __mmplayer_gst_create_pipeline(mmplayer_t *player)
                goto INIT_ERROR;
        }
 
-       /* Note : check whether subtitle atrribute uri is set. If uri is set, then try to play subtitle file */
+       /* Note : check whether subtitle attribute uri is set. If uri is set, then try to play subtitle file */
        if (__mmplayer_check_subtitle(player)
                && (__mmplayer_gst_create_text_pipeline(player) != MM_ERROR_NONE))
                LOGE("failed to create text pipeline");
@@ -4573,7 +4573,7 @@ __resource_release_cb(mm_resource_manager_h rm, mm_resource_manager_res_h res,
 
        if (MMPLAYER_CURRENT_STATE(player) == MM_PLAYER_STATE_NULL
                || MMPLAYER_CURRENT_STATE(player) == MM_PLAYER_STATE_NONE) {
-               LOGW("player alreay destoryed");
+               LOGW("player already destroyed");
                MMPLAYER_CMD_UNLOCK(player);
                return TRUE;
        }
@@ -4955,7 +4955,7 @@ _mmplayer_destroy(MMHandleType handle)
                MMPLAYER_GAPLESS_PLAY_THREAD_SIGNAL(player);
                MMPLAYER_GAPLESS_PLAY_THREAD_UNLOCK(player);
 
-               LOGD("waitting for gapless play thread exit");
+               LOGD("waiting for gapless play thread exit");
                g_thread_join(player->gapless_play_thread);
                g_mutex_clear(&player->gapless_play_thread_mutex);
                g_cond_clear(&player->gapless_play_thread_cond);
@@ -5560,14 +5560,14 @@ _mmplayer_pause(MMHandleType hplayer)
        /* check current state */
        MMPLAYER_CHECK_STATE(player, MMPLAYER_COMMAND_PAUSE);
 
-       /* check pipline reconfigure state */
+       /* check pipeline reconfigure state */
        __mmplayer_check_pipeline_reconfigure_state(player);
 
        switch (MMPLAYER_CURRENT_STATE(player)) {
        case MM_PLAYER_STATE_READY:
                {
                        /* check prepare async or not.
-                        * In the case of streaming playback, it's recommned to avoid blocking wait.
+                        * In the case of streaming playback, it's recommended to avoid blocking wait.
                         */
                        mm_attrs_get_int_by_name(player->attrs, "profile_prepare_async", &async);
                        LOGD("prepare working mode : %s", (async ? "async" : "sync"));
@@ -5769,7 +5769,7 @@ _mmplayer_set_position(MMHandleType hplayer, gint64 position)
 
        MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
 
-       /* check pipline reconfigure state */
+       /* check pipeline reconfigure state */
        __mmplayer_check_pipeline_reconfigure_state(player);
 
        ret = _mmplayer_gst_set_position(player, position, FALSE);
@@ -5809,7 +5809,7 @@ _mmplayer_get_buffer_position(MMHandleType hplayer, int *start_pos, int *end_pos
 }
 
 int
-_mmplayer_adjust_subtitle_postion(MMHandleType hplayer, int position)
+_mmplayer_adjust_subtitle_position(MMHandleType hplayer, int position)
 {
        mmplayer_t *player = (mmplayer_t *)hplayer;
        int ret = MM_ERROR_NONE;
@@ -7334,7 +7334,7 @@ _mmplayer_gst_decode_autoplug_select(GstElement *bin,  GstPad *pad,
        /* filtering exclude keyword */
        for (idx = 0; player->ini.exclude_element_keyword[idx][0] != '\0'; idx++) {
                if (strstr(factory_name, player->ini.exclude_element_keyword[idx])) {
-                       LOGW("skipping [%s] by exculde keyword [%s]",
+                       LOGW("skipping [%s] by exclude keyword [%s]",
                                        factory_name, player->ini.exclude_element_keyword[idx]);
 
                        result = GST_AUTOPLUG_SELECT_SKIP;
@@ -8118,7 +8118,7 @@ ERROR:
        /* release signal */
        __mmplayer_release_signal_connection(player, MM_PLAYER_SIGNAL_TYPE_TEXTBIN);
 
-       /* release textbin with it's childs */
+       /* release textbin with it's children */
        MMPLAYER_RELEASE_ELEMENT(player, player->pipeline->textbin, MMPLAYER_T_BIN);
        MMPLAYER_FREEIF(player->pipeline->textbin);
        player->pipeline->textbin = NULL;
@@ -8476,7 +8476,7 @@ _mmplayer_change_track_language(MMHandleType hplayer, mmplayer_track_type_e type
        current_state = GST_STATE(mainbin[MMPLAYER_M_PIPE].gst);
        if (current_state < GST_STATE_PAUSED) {
                result = MM_ERROR_PLAYER_INVALID_STATE;
-               LOGW("Pipeline not in porper state");
+               LOGW("Pipeline not in proper state");
                goto EXIT;
        }
 
@@ -8709,7 +8709,7 @@ _mmplayer_manage_external_storage_state(MMHandleType hplayer, int id, int state)
        if (state != STORAGE_STATE_UNMOUNTABLE && state != STORAGE_STATE_REMOVED)
                return MM_ERROR_NONE;
 
-       /* FIXME: text path should be handled seperately. */
+       /* FIXME: text path should be handled separately. */
        if (((player->storage_info[MMPLAYER_PATH_VOD].type == STORAGE_TYPE_EXTERNAL)
                && (player->storage_info[MMPLAYER_PATH_VOD].id == id)) ||
                ((player->storage_info[MMPLAYER_PATH_TEXT].type == STORAGE_TYPE_EXTERNAL)
@@ -9255,7 +9255,7 @@ __mmplayer_update_video_attrs(mmplayer_t *player, MMHandleType attrs)
        }
 
        if (!caps_v) {
-               LOGD("no negitiated caps from videosink");
+               LOGD("no negotiated caps from videosink");
                gst_object_unref(pad);
                return FALSE;
        }
@@ -9291,7 +9291,7 @@ __mmplayer_update_bitrate_attrs(mmplayer_t *player, MMHandleType attrs)
        gchar *path = NULL;
        struct stat sb;
 
-       /* FIXIT : please make it clear the dependancy with duration/codec/uritype */
+       /* FIXIT : please make it clear the dependency with duration/codec/uritype */
        if (!player->duration)
                return FALSE;
 
@@ -9685,7 +9685,7 @@ __mmplayer_set_playing_state(mmplayer_t *player)
        /* try to get content metadata */
 
        /* NOTE : giving ATTR_MISSING_ONLY may have dependency with
-        * c-api since c-api doesn't use _start() anymore. It may not work propery with
+        * c-api since c-api doesn't use _start() anymore. It may not work properly with
         * legacy mmfw-player api
         */
        _mmplayer_update_content_attrs(player, ATTR_MISSING_ONLY);