int mm_player_get_streaming_buffering_time(MMHandleType player, int *buffer_ms, int *rebuffer_ms);
/**
+ * These functions are to display the 360 video content
+ */
+int mm_player_360_set_enable(MMHandleType player, bool enable);
+int mm_player_360_is_enabled(MMHandleType player, bool *enabled);
+
+int mm_player_360_set_direction_of_view(MMHandleType player, float yaw, float pitch);
+int mm_player_360_get_direction_of_view(MMHandleType player, float *yaw, float *pitch);
+
+int mm_player_360_set_zoom(MMHandleType player, float level);
+int mm_player_360_get_zoom(MMHandleType player, float *level);
+
+int mm_player_360_set_field_of_view(MMHandleType player, int horizontal_degrees, int vertical_degrees);
+int mm_player_360_get_field_of_view(MMHandleType player, int *horizontal_degrees, int *vertical_degrees);
+
+/**
@}
*/
--- /dev/null
+/*
+ * libmm-player
+ *
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __MM_PLAYER_360_H__
+#define __MM_PLAYER_360_H__
+
+/*=======================================================================================
+| INCLUDE FILES |
+========================================================================================*/
+#include <mm_types.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*=======================================================================================
+| GLOBAL FUNCTION PROTOTYPES |
+========================================================================================*/
+
+int _mmplayer_360_set_enable(MMHandleType player, bool enable);
+int _mmplayer_360_is_enabled(MMHandleType player, bool *enabled);
+int _mmplayer_360_set_direction_of_view(MMHandleType player, float yaw, float pitch);
+int _mmplayer_360_get_direction_of_view(MMHandleType player, float *yaw, float *pitch);
+int _mmplayer_360_set_zoom(MMHandleType player, float level);
+int _mmplayer_360_get_zoom(MMHandleType player, float *level);
+int _mmplayer_360_set_field_of_view(MMHandleType player, int horizontal_degrees, int vertical_degrees);
+int _mmplayer_360_get_field_of_view(MMHandleType player, int *horizontal_degrees, int *vertical_degrees);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __MM_PLAYER_360_H__ */
#include "mm_player_tracks.h"
#include "mm_player_es.h"
#include "mm_player_sound_focus.h"
+#include "mm_player_360.h"
int mm_player_create(MMHandleType *player)
{
return result;
}
+
+int mm_player_360_set_enable(MMHandleType player, bool enable)
+{
+ int result = MM_ERROR_NONE;
+ MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
+
+ MMPLAYER_CMD_LOCK( player );
+
+ result = _mmplayer_360_set_enable(player, enable);
+
+ MMPLAYER_CMD_UNLOCK( player );
+
+ return result;
+}
+
+int mm_player_360_is_enabled(MMHandleType player, bool *enabled)
+{
+ int result = MM_ERROR_NONE;
+
+ MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
+ MMPLAYER_RETURN_VAL_IF_FAIL(enabled, MM_ERROR_INVALID_ARGUMENT);
+
+ MMPLAYER_CMD_LOCK( player );
+
+ result = _mmplayer_360_is_enabled(player, enabled);
+
+ MMPLAYER_CMD_UNLOCK( player );
+
+ return result;
+}
+
+int mm_player_360_set_direction_of_view(MMHandleType player, float yaw, float pitch)
+{
+ int result = MM_ERROR_NONE;
+ MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
+
+ MMPLAYER_CMD_LOCK( player );
+
+ result = _mmplayer_360_set_direction_of_view(player, yaw, pitch);
+
+ MMPLAYER_CMD_UNLOCK( player );
+
+ return result;
+}
+
+int mm_player_360_get_direction_of_view(MMHandleType player, float *yaw, float *pitch)
+{
+ int result = MM_ERROR_NONE;
+
+ MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
+ MMPLAYER_RETURN_VAL_IF_FAIL(yaw && pitch, MM_ERROR_INVALID_ARGUMENT);
+
+ MMPLAYER_CMD_LOCK( player );
+
+ result = _mmplayer_360_get_direction_of_view(player, yaw, pitch);
+
+ MMPLAYER_CMD_UNLOCK( player );
+
+ return result;
+}
+
+int mm_player_360_set_zoom(MMHandleType player, float level)
+{
+ int result = MM_ERROR_NONE;
+ MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
+
+ MMPLAYER_CMD_LOCK( player );
+
+ result = _mmplayer_360_set_zoom(player, level);
+
+ MMPLAYER_CMD_UNLOCK( player );
+
+ return result;
+}
+
+int mm_player_360_get_zoom(MMHandleType player, float *level)
+{
+ int result = MM_ERROR_NONE;
+
+ MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
+ MMPLAYER_RETURN_VAL_IF_FAIL(level, MM_ERROR_INVALID_ARGUMENT);
+
+ MMPLAYER_CMD_LOCK( player );
+
+ result = _mmplayer_360_get_zoom(player, level);
+
+ MMPLAYER_CMD_UNLOCK( player );
+
+ return result;
+}
+
+int mm_player_360_set_field_of_view(MMHandleType player, int horizontal_degrees, int vertical_degrees)
+{
+ int result = MM_ERROR_NONE;
+ MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
+
+ MMPLAYER_CMD_LOCK( player );
+
+ result = _mmplayer_360_set_field_of_view(player, horizontal_degrees, vertical_degrees);
+
+ MMPLAYER_CMD_UNLOCK( player );
+
+ return result;
+}
+
+int mm_player_360_get_field_of_view(MMHandleType player, int *horizontal_degrees, int *vertical_degrees)
+{
+ int result = MM_ERROR_NONE;
+
+ MMPLAYER_RETURN_VAL_IF_FAIL(player, MM_ERROR_PLAYER_NOT_INITIALIZED);
+ MMPLAYER_RETURN_VAL_IF_FAIL(horizontal_degrees && vertical_degrees, MM_ERROR_INVALID_ARGUMENT);
+
+ MMPLAYER_CMD_LOCK( player );
+
+ result = _mmplayer_360_get_field_of_view(player, horizontal_degrees, vertical_degrees);
+
+ MMPLAYER_CMD_UNLOCK( player );
+
+ return result;
+}