MMPLAYER_GENERATE_DOT_IF_ENABLED(player, "pipeline-status-complete");
}
-static int
-__mmplayer_check_profile(void)
+static bool
+__mmplayer_is_tv_profile(void)
{
- char *profileName;
+ char *profileName = NULL;
static int profile_tv = -1;
if (__builtin_expect(profile_tv != -1, 1))
- return profile_tv;
+ return (profile_tv == 1);
+
+ if (system_info_get_platform_string("http://tizen.org/feature/profile", &profileName)
+ != SYSTEM_INFO_ERROR_NONE) {
+ LOGE("fail to get profile name");
+ return false;
+ }
+
+ if (!profileName) {
+ LOGE("profileName is NULL");
+ return false;
+ }
- system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
switch (*profileName) {
case 't':
case 'T':
profile_tv = 0;
break;
}
+
free(profileName);
- return profile_tv;
+ return (profile_tv == 1);
}
static gboolean
gint count = 0;
gint gapless = 0;
guint num_of_uri = 0;
- int profile_tv = -1;
+ bool profile_tv = false;
MMPLAYER_FENTER();
MM_PLAYER_GAPLESS_MODE, &gapless, NULL);
/* gapless playback is not supported in case of video at TV profile. */
- profile_tv = __mmplayer_check_profile();
+ profile_tv = __mmplayer_is_tv_profile();
if (profile_tv && video) {
LOGW("not support video gapless playback");
goto ERROR;