[ACR-1219] Add new feature for 360 api 17/178317/3 accepted/tizen/unified/20180514.144924 submit/tizen/20180511.062936 submit/tizen/20180514.042048
authorEunhae Choi <eunhae1.choi@samsung.com>
Wed, 9 May 2018 08:50:39 +0000 (17:50 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Wed, 9 May 2018 09:02:42 +0000 (18:02 +0900)
Change-Id: I6910e001d9ac01eada8973d4e464cb7c6afc30e5

doc/player_doc.h
include/player.h
src/player.c

index 3d2d9d037e85bc0e17a00d4f691e6f154dec0c66..9bb38374db587a5dffee716b7b8fa87e140d926a 100644 (file)
  * @section CAPI_MEDIA_PLAYER_MODULE_FEATURE Related Features
  * This API is related with the following features:
  *  - http://tizen.org/feature/opengles.version.2_0
- *    This feature is required for 360 video playback.
+ *  - http://tizen.org/feature/multimedia.player.spherical_video
+ *    These features are required for 360 video playback.
  * @if WEARABLE
  *  - http://tizen.org/feature/network.internet
  *    This feature is required for network streaming.
index c47eafac538b4b4cae83d88e58532d59a020cc81..b90975f8778018ee1efa05fc0172cea3f5cd903f 100644 (file)
@@ -2388,6 +2388,9 @@ int player_get_streaming_buffering_time(player_h player, int *prebuffer_ms, int
 /**
  * @brief Gets information whether the current content of the player is spherical.
  * @since_tizen 5.0
+ * @remarks This function is related to the following features:\n
+ *          %http://tizen.org/feature/multimedia.player.spherical_video\n
+ *          %http://tizen.org/feature/opengles.version.2_0\n
  * @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,
@@ -2405,6 +2408,9 @@ 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.
  * @since_tizen 5.0
+ * @remarks This function is related to the following features:\n
+ *          %http://tizen.org/feature/multimedia.player.spherical_video\n
+ *          %http://tizen.org/feature/opengles.version.2_0\n
  * @param[in] player   The handle to the media player
  * @param[in] enabled  The 360 video display status: @c true = display with 360 video mode,
                        @c false = display with full panorama mode. The default value is @c true.
@@ -2423,6 +2429,9 @@ int player_360_set_enabled(player_h player, bool enabled);
 /**
  * @brief Gets the 360 video display mode.
  * @since_tizen 5.0
+ * @remarks This function is related to the following features:\n
+ *          %http://tizen.org/feature/multimedia.player.spherical_video\n
+ *          %http://tizen.org/feature/opengles.version.2_0\n
  * @param[in]   player    The handle to the media player
  * @param[out]  enabled   Pointer to store current 360 video display mode:
  *                        (@c true = display with 360 video mode,
@@ -2447,6 +2456,9 @@ int player_360_is_enabled(player_h player, bool *enabled);
  *          these values, zeros are assumed to be equal to the centre of the
  *          panorama image.
  * @since_tizen 5.0
+ * @remarks This function is related to the following features:\n
+ *          %http://tizen.org/feature/multimedia.player.spherical_video\n
+ *          %http://tizen.org/feature/opengles.version.2_0\n
  * @param[in] player   The handle to the media player
  * @param[in] yaw      The angle value around vertical axis. Valid values are in
  *                     range [-PI, PI].
@@ -2469,6 +2481,9 @@ int player_360_set_direction_of_view(player_h player, float yaw, float pitch);
  * @details This function is to get horizontal (yaw) and vertical (pitch) angles
  *          of current direction of view in radians.
  * @since_tizen 5.0
+ * @remarks This function is related to the following features:\n
+ *          %http://tizen.org/feature/multimedia.player.spherical_video\n
+ *          %http://tizen.org/feature/opengles.version.2_0\n
  * @param[in]  player   The handle to the media player
  * @param[out] yaw      Pointer to store current value of direction of view
  *                      angle around vertical axis
@@ -2492,6 +2507,9 @@ int player_360_get_direction_of_view(player_h player, float *yaw, float *pitch);
  *           The valid range is from 1.0 to 10.0, where 1.0 is the actual image and
  *           values above are zoom-in factor. Default value is 1.0 - no zoom.
  * @since_tizen 5.0
+ * @remarks This function is related to the following features:\n
+ *          %http://tizen.org/feature/multimedia.player.spherical_video\n
+ *          %http://tizen.org/feature/opengles.version.2_0\n
  * @param[in] player    The handle to the media player
  * @param[in] level     The zoom level
  * @return @c 0 on success,
@@ -2512,6 +2530,9 @@ int player_360_set_zoom(player_h player, float level);
  *           The valid range is from 1.0 to 10.0. Where 1.0 is actual image and
  *           values above are zoom-in factor. Default value is 1.0 - no zoom.
  * @since_tizen 5.0
+ * @remarks This function is related to the following features:\n
+ *          %http://tizen.org/feature/multimedia.player.spherical_video\n
+ *          %http://tizen.org/feature/opengles.version.2_0\n
  * @param[in]  player    The handle to the media player
  * @param[out] level     Pointer to store current value of zoom level
  * @return @c 0 on success,
@@ -2532,6 +2553,9 @@ int player_360_get_zoom(player_h player, float *level);
  * @since_tizen 5.0
  * @remarks values above the default ones extend the field of view to significantly
  *          distorted areas and will not be useful in most cases.
+ * @remarks This function is related to the following features:\n
+ *          %http://tizen.org/feature/multimedia.player.spherical_video\n
+ *          %http://tizen.org/feature/opengles.version.2_0\n
  * @param[in] player              The handle to the media player
  * @param[in] horizontal_degrees  The horizontal field of view to display in degrees.
  *                                Valid range is 1-360 degrees. Default value is 120 degrees.
@@ -2553,6 +2577,9 @@ int player_360_set_field_of_view(player_h player, int horizontal_degrees, int ve
  * @brief Gets the field of view information of 360 video.
  * @details This function is to get the field of view information.
  * @since_tizen 5.0
+ * @remarks This function is related to the following features:\n
+ *          %http://tizen.org/feature/multimedia.player.spherical_video\n
+ *          %http://tizen.org/feature/opengles.version.2_0\n
  * @param[in]  player              The handle to the media player
  * @param[out] horizontal_degrees  Pointer to store current value of horizontal
  *                                 field of view to display in degrees.
index 7e0f040944b4b308bacd2461403fe56c93e468ed..f667b313cd794c2c41a60b8086537c6370d0b9ff 100644 (file)
@@ -38,8 +38,9 @@
 
 #define INVALID_DEFAULT_VALUE -1
 #define MAX_S_PATH_LEN 32
-#define PLAYER_FEATURE_SOUND_STREAM "http://tizen.org/feature/multimedia.player.stream_info"
-#define PLAYER_FEATURE_OPENGL       "http://tizen.org/feature/opengles.version.2_0"
+#define PLAYER_FEATURE_SOUND_STREAM      "http://tizen.org/feature/multimedia.player.stream_info"
+#define PLAYER_FEATURE_OPENGL            "http://tizen.org/feature/opengles.version.2_0"
+#define PLAYER_FEATURE_SPHERICAL_VIDEO   "http://tizen.org/feature/multimedia.player.spherical_video"
 
 typedef enum {
        TIZEN_PROFILE_UNKNOWN = 0,
@@ -4428,6 +4429,8 @@ int player_get_streaming_buffering_time(player_h player, int *buffer_ms, int *re
 int player_360_is_content_spherical(player_h player, bool *is_spherical)
 {
        PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+       PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+
        PLAYER_INSTANCE_CHECK(player);
        PLAYER_NULL_ARG_CHECK(is_spherical);
 
@@ -4453,6 +4456,8 @@ int player_360_is_content_spherical(player_h player, bool *is_spherical)
 int player_360_set_enabled(player_h player, bool enabled)
 {
        PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+       PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+
        PLAYER_INSTANCE_CHECK(player);
        int ret = PLAYER_ERROR_NONE;
        muse_player_api_e api = MUSE_PLAYER_API_360_SET_ENABLED;
@@ -4472,6 +4477,8 @@ int player_360_set_enabled(player_h player, bool enabled)
 int player_360_is_enabled(player_h player, bool *enabled)
 {
        PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+       PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+
        PLAYER_INSTANCE_CHECK(player);
        PLAYER_NULL_ARG_CHECK(enabled);
        int ret = PLAYER_ERROR_NONE;
@@ -4496,6 +4503,8 @@ int player_360_is_enabled(player_h player, bool *enabled)
 int player_360_set_direction_of_view(player_h player, float yaw, float pitch)
 {
        PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+       PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+
        PLAYER_INSTANCE_CHECK(player);
        int ret = PLAYER_ERROR_NONE;
        muse_player_api_e api = MUSE_PLAYER_API_360_SET_DIRECTION_OF_VIEW;
@@ -4514,6 +4523,8 @@ int player_360_set_direction_of_view(player_h player, float yaw, float pitch)
 int player_360_get_direction_of_view(player_h player, float *yaw, float *pitch)
 {
        PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+       PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+
        PLAYER_INSTANCE_CHECK(player);
        PLAYER_NULL_ARG_CHECK(yaw && pitch);
        int ret = PLAYER_ERROR_NONE;
@@ -4548,6 +4559,8 @@ int player_360_get_direction_of_view(player_h player, float *yaw, float *pitch)
 int player_360_set_zoom(player_h player, float level)
 {
        PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+       PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+
        PLAYER_INSTANCE_CHECK(player);
        int ret = PLAYER_ERROR_NONE;
        muse_player_api_e api = MUSE_PLAYER_API_360_SET_ZOOM;
@@ -4566,6 +4579,8 @@ int player_360_set_zoom(player_h player, float level)
 int player_360_get_zoom(player_h player, float *level)
 {
        PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+       PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+
        PLAYER_INSTANCE_CHECK(player);
        PLAYER_NULL_ARG_CHECK(level);
        int ret = PLAYER_ERROR_NONE;
@@ -4597,6 +4612,8 @@ int player_360_get_zoom(player_h player, float *level)
 int player_360_set_field_of_view(player_h player, int horizontal_degrees, int vertical_degrees)
 {
        PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+       PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+
        PLAYER_INSTANCE_CHECK(player);
        int ret = PLAYER_ERROR_NONE;
        muse_player_api_e api = MUSE_PLAYER_API_360_SET_FIELD_OF_VIEW;
@@ -4615,6 +4632,8 @@ int player_360_set_field_of_view(player_h player, int horizontal_degrees, int ve
 int player_360_get_field_of_view(player_h player, int *horizontal_degrees, int *vertical_degrees)
 {
        PLAYER_FEATURE_CHECK(PLAYER_FEATURE_OPENGL);
+       PLAYER_FEATURE_CHECK(PLAYER_FEATURE_SPHERICAL_VIDEO);
+
        PLAYER_INSTANCE_CHECK(player);
        PLAYER_NULL_ARG_CHECK(horizontal_degrees && vertical_degrees);
        int ret = PLAYER_ERROR_NONE;