- if (((mm_player_t*) player)->is_content_spherical &&
- ((mm_player_t*) player)->is_video360_plugin_used) {
- /* We will get here if player is pending ready or ready and above */
- g_object_set(G_OBJECT(((mm_player_t*) player)->pipeline->videobin[MMPLAYER_V_360].gst),
- "passthrough", !enable, NULL);
- return MM_ERROR_NONE;
+ return true;
+}
+
+static bool
+__mmplayer_check_audio_sink(mmplayer_t *player)
+{
+ /* check audio sink is created */
+ MMPLAYER_RETURN_VAL_IF_FAIL(player &&
+ player->pipeline &&
+ player->pipeline->videobin &&
+ player->pipeline->videobin[MMPLAYER_A_BIN].gst &&
+ player->pipeline->videobin[MMPLAYER_A_SINK].gst,
+ false);
+
+ return true;
+}
+
+int
+_mmplayer_360_is_content_spherical(MMHandleType hplayer, bool *is_spherical)
+{
+ mmplayer_t *player = (mmplayer_t *)hplayer;
+
+ MMPLAYER_FENTER();
+ MMPLAYER_RETURN_VAL_IF_FAIL(player && player->pipeline, MM_ERROR_PLAYER_NOT_INITIALIZED);
+ MMPLAYER_RETURN_VAL_IF_FAIL(is_spherical, MM_ERROR_INVALID_ARGUMENT);
+
+ LOGD("state %s, spherical info %d",
+ MMPLAYER_STATE_GET_NAME(MMPLAYER_CURRENT_STATE(player)), player->is_content_spherical);
+
+ if (player->state < MM_PLAYER_STATE_READY) {
+ *is_spherical = false;
+ return MM_ERROR_PLAYER_INVALID_STATE;