#include "mm_player_tracks.h"
#define INVALID_TRACK_INDEX -1
-#define LANGUAGE_CODE_SIZE (3+1) /* Size of ISO-639-1, and considering the nul-terminator */
+#define LANGUAGE_CODE_SIZE (3 + 1) /* Size of ISO-639-1, and considering the nul-terminator */
/*---------------------------------------------------------------------------------------
| LOCAL FUNCTION PROTOTYPES: |
/*=======================================================================================
| FUNCTION DEFINITIONS |
=======================================================================================*/
-int _mmplayer_get_track_count(MMHandleType hplayer, MMPlayerTrackType type, int *count)
+int
+_mmplayer_get_track_count(MMHandleType hplayer, MMPlayerTrackType type, int *count)
{
int ret = MM_ERROR_NONE;
- mm_player_t *player = (mm_player_t*) hplayer;
+ mm_player_t *player = (mm_player_t *)hplayer;
MMHandleType attrs = 0;
MMPLAYER_FENTER();
return ret;
}
-int _mmplayer_select_track(MMHandleType hplayer, MMPlayerTrackType type, int index)
+int
+_mmplayer_select_track(MMHandleType hplayer, MMPlayerTrackType type, int index)
{
int ret = MM_ERROR_NONE;
- mm_player_t *player = (mm_player_t*) hplayer;
+ mm_player_t *player = (mm_player_t *)hplayer;
MMPLAYER_FENTER();
MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
return ret;
}
-int _mmplayer_get_current_track(MMHandleType hplayer, MMPlayerTrackType type, int *index)
+int
+_mmplayer_get_current_track(MMHandleType hplayer, MMPlayerTrackType type, int *index)
{
int ret = MM_ERROR_NONE;
- mm_player_t *player = (mm_player_t*) hplayer;
+ mm_player_t *player = (mm_player_t *)hplayer;
MMHandleType attrs = 0;
gint count = 0;
return ret;
}
-int _mmplayer_get_track_language_code(MMHandleType hplayer, MMPlayerTrackType type, int index, char **code)
+int
+_mmplayer_get_track_language_code(MMHandleType hplayer, MMPlayerTrackType type, int index, char **code)
{
int ret = MM_ERROR_NONE;
- mm_player_t *player = (mm_player_t*) hplayer;
+ mm_player_t *player = (mm_player_t *)hplayer;
gchar *lang_code = NULL;
MMPLAYER_FENTER();
if (type == MM_PLAYER_TRACK_TYPE_TEXT && player->subtitle_language_list) { /* external subtitle */
MMPlayerLangStruct *language_list = NULL;
- lang_code = (gchar*)g_malloc0(LANGUAGE_CODE_SIZE * sizeof(char));
+ lang_code = (gchar *)g_malloc0(LANGUAGE_CODE_SIZE * sizeof(char));
language_list = g_list_nth_data(player->subtitle_language_list, index);
if (language_list == NULL) {
else
*code = strndup("und", 3);
}
- g_free(lang_code);
+ MMPLAYER_FREEIF(lang_code);
MMPLAYER_FLEAVE();
return ret;
}
-void __mmplayer_track_initialize(mm_player_t *player)
+void
+__mmplayer_track_initialize(mm_player_t *player)
{
MMPlayerTrackType type = MM_PLAYER_TRACK_TYPE_AUDIO;
}
}
-void __mmplayer_track_destroy(mm_player_t *player)
+void
+__mmplayer_track_destroy(mm_player_t *player)
{
MMPlayerTrackType type = MM_PLAYER_TRACK_TYPE_AUDIO;
MMHandleType attrs = 0;
}
}
-void __mmplayer_track_update_selector_info(mm_player_t *player, MMPlayerTrackType type, GstPad *sinkpad)
+void
+__mmplayer_track_update_selector_info(mm_player_t *player, MMPlayerTrackType type, GstPad *sinkpad)
{
MMPLAYER_FENTER();
LOGD("type: %d, track cnt: %d", type, player->selector[type].total_track_num);
}
-void __mmplayer_track_update_text_attr_info(mm_player_t *player, GstMessage *msg)
+void
+__mmplayer_track_update_text_attr_info(mm_player_t *player, GstMessage *msg)
{
MMHandleType attrs = 0;
const GValue *lang_list = NULL;
MMPLAYER_FLEAVE();
}
-static int __mmplayer_track_get_language(mm_player_t *player, MMPlayerTrackType type, gint stream_index, gchar **code)
+static int
+__mmplayer_track_get_language(mm_player_t *player, MMPlayerTrackType type, gint stream_index, gchar **code)
{
GstTagList *tag_list = NULL;
gchar *tag = NULL;
if (tag) {
LOGD("language code: %s, len: %zu", tag, strlen(tag));
g_strlcpy(*code, tag, LANGUAGE_CODE_SIZE);
- g_free(tag);
+ MMPLAYER_FREEIF(tag);
} else {
LOGD("no language code info - und");
g_strlcpy(*code, "und", LANGUAGE_CODE_SIZE);