LOGD("state %s, spherical info %d",
MMPLAYER_STATE_GET_NAME(MMPLAYER_CURRENT_STATE(player)), player->is_content_spherical);
- player->is_video360_enabled = enabled;
+ player->is_video360_enabled = (gboolean)enabled;
if (player->is_content_spherical && __mmplayer_check_video_360_used(player)) {
/* We will get here if player is pending ready or ready and above */
- LOGD("set enabled %d", enabled);
+ LOGD("set enabled %d", player->is_video360_enabled);
g_object_set(G_OBJECT(player->pipeline->videobin[MMPLAYER_V_360].gst),
- "passthrough", !enabled, NULL);
+ "passthrough", !player->is_video360_enabled, NULL);
}
MMPLAYER_FLEAVE();
int _mmplayer_360_is_enabled(MMHandleType hplayer, bool *enabled)
{
mm_player_t* player = (mm_player_t*) hplayer;
+ gboolean is_enabled;
MMPLAYER_FENTER();
MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
if (player->is_content_spherical && __mmplayer_check_video_360_used(player)) {
g_object_get(G_OBJECT(player->pipeline->videobin[MMPLAYER_V_360].gst),
- "passthrough", enabled, NULL);
- *enabled = !(*enabled);
-
- LOGD("get enabled %d", *enabled);
- return MM_ERROR_NONE;
+ "passthrough", &is_enabled, NULL);
+ *enabled = !((bool)is_enabled);
+ } else {
+ *enabled = (bool)player->is_video360_enabled;
}
- *enabled = player->is_video360_enabled;
+ LOGD("get enabled %d", *enabled);
MMPLAYER_FLEAVE();
return MM_ERROR_NONE;