*/
int player_get_streaming_buffering_time(player_h player, int *prebuffer_ms, int *rebuffer_ms);
+/**
+ * @brief Gets information whether the current content of the player is spherical.
+ * @since_tizen 5.0
+ * @param[in] player The handle to the media player
+ * @param[out] is_spherical The value indicating whether the content is spherical
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #PLAYER_ERROR_NONE Successful
+ * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
+ * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature
+ * @pre The player state must be one of #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED.
+ */
+int player_360_is_content_spherical(player_h player, bool *is_spherical);
+
/**
* @brief Sets the 360 video mode.
* @details In case the media content is spherical, display mode can be selected by this function.
return ret;
}
+int player_360_is_content_spherical(player_h player, bool *is_spherical)
+{
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(is_spherical);
+
+ int ret = PLAYER_ERROR_NONE;
+ muse_player_api_e api = MUSE_PLAYER_API_360_IS_CONTENT_SPHERICAL;
+ player_cli_s *pc = (player_cli_s *) player;
+ char *ret_buf = NULL;
+ int val = 0;
+
+ LOGD("ENTER");
+
+ player_msg_send(api, pc, ret_buf, ret);
+ if (ret == PLAYER_ERROR_NONE) {
+ player_msg_get(val, ret_buf);
+ *is_spherical = val;
+ }
+ g_free(ret_buf);
+
+ LOGD("LEAVE 0x%X", ret);
+ return ret;
+}
+
int player_360_set_enable(player_h player, bool enable)
{
+ PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_SET_ENABLE;
g_print(" ==> [Player_Test] eq bands frequency range: [%d] \n", value);
}
+static void video360_is_spherical(void)
+{
+ bool spherical;
+
+ if (player_360_is_content_spherical(g_player[0], &spherical) != PLAYER_ERROR_NONE)
+ g_print("failed to get content spherical info\n");
+ else
+ g_print(" ==> [Player_Test] Video 360 content = %s\n", spherical ? "spherical" : "---");
+
+}
+
static void video360_set_enable(bool enable)
{
#ifdef USE_EVENT_HANDLER
else
g_print("unknown menu \n");
} else if (len == 4) {
- if (!strncmp(cmd, "v3se", 4))
+ if (!strncmp(cmd, "v3sp", 4))
+ video360_is_spherical();
+ else if (!strncmp(cmd, "v3se", 4))
g_menu_state = CURRENT_STATUS_VIDEO360_SET_ENABLE;
else if (!strncmp(cmd, "v3ge", 4))
video360_get_enable();
g_print("X4. set audio_cb with async \n");
g_print("[video_frame_decoded_cb] ep. enable tbm surface pool\n");
g_print("[buffering] bf. set new buffering size\n");
- g_print("[Video 360] v3se. Set Enable\t\t");
+ g_print("[Video 360] v3sp. check spherical info\t");
+ g_print("v3se. Set Enable\t");
g_print("v3ge. Get Enable\n");
g_print("[Video 360] v3sd. Set Direction Of View\t");
g_print("v3gd. Get Direction Of View\n");