Tizen(Headless) Native API  6.5
Video360

The Video360 API provides functions for 360 video playback and controlling the attributes.

Required Header

#include <player.h>

Overview

The Player stream information API allows you to get media stream information, including:

  • Content metadata, such as the tile, artist, album title and genre.
  • Audio stream information, such as audio codec type, sample rate, channels, and bit rate.
  • Video stream information, such as video codec type, video width and height.

Functions

int player_360_is_content_spherical (player_h player, bool *is_spherical)
 Gets information whether the current content of the player is spherical.
int player_360_set_enabled (player_h player, bool enabled)
 Sets the 360 video mode.
int player_360_is_enabled (player_h player, bool *enabled)
 Gets the 360 video display mode.
int player_360_set_direction_of_view (player_h player, float yaw, float pitch)
 Sets the 360 video direction of view.
int player_360_get_direction_of_view (player_h player, float *yaw, float *pitch)
 Gets the 360 video direction of view.
int player_360_set_zoom (player_h player, float level)
 Sets the zoom level of 360 video.
int player_360_get_zoom (player_h player, float *level)
 Gets the current zoom level of 360 video.
int player_360_set_field_of_view (player_h player, int horizontal_degrees, int vertical_degrees)
 Sets the field of view information of 360 video.
int player_360_get_field_of_view (player_h player, int *horizontal_degrees, int *vertical_degrees)
 Gets the field of view information of 360 video.
int player_360_set_zoom_with_field_of_view (player_h player, float level, int horizontal_degrees, int vertical_degrees)
 Sets the zoom level with field of view information of 360 video.

Function Documentation

int player_360_get_direction_of_view ( player_h  player,
float *  yaw,
float *  pitch 
)

Gets the 360 video direction of view.

This function is to get horizontal (yaw) and vertical (pitch) angles of current direction of view in radians.

Since :
5.0
Remarks:
This function is related to the following features:
http://tizen.org/feature/multimedia.player.spherical_video
http://tizen.org/feature/opengles.version.2_0
Parameters:
[in]playerThe handle to the media player
[out]yawPointer to store current value of direction of view angle around vertical axis
[out]pitchPointer to store current value of direction of view angle around lateral axis
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_INVALID_OPERATIONInvalid operation
PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICEUnsupported feature
See also:
player_360_set_direction_of_view()
int player_360_get_field_of_view ( player_h  player,
int *  horizontal_degrees,
int *  vertical_degrees 
)

Gets the field of view information of 360 video.

This function is to get the field of view information.

Since :
5.0
Remarks:
This function is related to the following features:
http://tizen.org/feature/multimedia.player.spherical_video
http://tizen.org/feature/opengles.version.2_0
Parameters:
[in]playerThe handle to the media player
[out]horizontal_degreesPointer to store current value of horizontal field of view to display in degrees.
[out]vertical_degreesPointer to store current value of vertical field of view to display in degrees.
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_INVALID_OPERATIONInvalid operation
PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICEUnsupported feature
See also:
player_360_set_field_of_view()
int player_360_get_zoom ( player_h  player,
float *  level 
)

Gets the current zoom level of 360 video.

The zoom means scaling of the flat image cut from the panorama. 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 :
5.0
Remarks:
This function is related to the following features:
http://tizen.org/feature/multimedia.player.spherical_video
http://tizen.org/feature/opengles.version.2_0
Parameters:
[in]playerThe handle to the media player
[out]levelPointer to store current value of zoom level
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_INVALID_OPERATIONInvalid operation
PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICEUnsupported feature
See also:
player_360_set_zoom()
int player_360_is_content_spherical ( player_h  player,
bool *  is_spherical 
)

Gets information whether the current content of the player is spherical.

Since :
5.0
Remarks:
This function is related to the following features:
http://tizen.org/feature/multimedia.player.spherical_video
http://tizen.org/feature/opengles.version.2_0
Parameters:
[in]playerThe handle to the media player
[out]is_sphericalThe value indicating whether the content is spherical
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_INVALID_STATEInvalid player state
PLAYER_ERROR_INVALID_OPERATIONInvalid operation
PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICEUnsupported feature
Precondition:
The player state must be one of PLAYER_STATE_READY, PLAYER_STATE_PLAYING or PLAYER_STATE_PAUSED.
int player_360_is_enabled ( player_h  player,
bool *  enabled 
)

Gets the 360 video display mode.

Since :
5.0
Remarks:
This function is related to the following features:
http://tizen.org/feature/multimedia.player.spherical_video
http://tizen.org/feature/opengles.version.2_0
Parameters:
[in]playerThe handle to the media player
[out]enabledPointer to store current 360 video display mode: (true = display with 360 video mode, false = display with full panorama mode)
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_INVALID_OPERATIONInvalid operation
PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICEUnsupported feature
See also:
player_360_set_enabled()
int player_360_set_direction_of_view ( player_h  player,
float  yaw,
float  pitch 
)

Sets the 360 video direction of view.

This function is to set horizontal (yaw) and vertical (pitch) angles of current direction of view in radians. Default direction of view is taken from meta-data stored in the media. If meta-data omits these values, zeros are assumed to be equal to the centre of the panorama image.

Since :
5.0
Remarks:
This function is related to the following features:
http://tizen.org/feature/multimedia.player.spherical_video
http://tizen.org/feature/opengles.version.2_0
Parameters:
[in]playerThe handle to the media player
[in]yawThe angle value around vertical axis. Valid values are in range [-PI, PI]. Default value is 0.
[in]pitchThe angle value around lateral axis. Valid values are in range [-PI/2, PI/2]. Default value is 0.
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_INVALID_OPERATIONInvalid operation
PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICEUnsupported feature
See also:
player_360_get_direction_of_view()
int player_360_set_enabled ( player_h  player,
bool  enabled 
)

Sets the 360 video mode.

In case the media content is spherical, display mode can be selected by this function.

Since :
5.0
Remarks:
This function is related to the following features:
http://tizen.org/feature/multimedia.player.spherical_video
http://tizen.org/feature/opengles.version.2_0
Parameters:
[in]playerThe handle to the media player
[in]enabledThe 360 video display status: true = display with 360 video mode, false = display with full panorama mode. The default value is true.
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_INVALID_OPERATIONInvalid operation
PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICEUnsupported feature
See also:
player_360_is_enabled()
int player_360_set_field_of_view ( player_h  player,
int  horizontal_degrees,
int  vertical_degrees 
)

Sets the field of view information of 360 video.

This function is to set the field of view to decide the output frame size.

Since :
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.
This function is related to the following features:
http://tizen.org/feature/multimedia.player.spherical_video
http://tizen.org/feature/opengles.version.2_0
Parameters:
[in]playerThe handle to the media player
[in]horizontal_degreesThe horizontal field of view to display in degrees
Valid range is 1~360 degrees. Default value is 120 degrees.
[in]vertical_degreesThe vertical field of view to display in degrees
Valid range is 1~180 degrees. Default value is 67 degrees.
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_INVALID_OPERATIONInvalid operation
PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICEUnsupported feature
See also:
player_360_get_field_of_view()
int player_360_set_zoom ( player_h  player,
float  level 
)

Sets the zoom level of 360 video.

The zoom means scaling of the flat image cut from the panorama. 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 :
5.0
Remarks:
This function is related to the following features:
http://tizen.org/feature/multimedia.player.spherical_video
http://tizen.org/feature/opengles.version.2_0
Parameters:
[in]playerThe handle to the media player
[in]levelThe zoom level
Valid range is 1.0~10.0. Default value is 1.0.
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_INVALID_OPERATIONInvalid operation
PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICEUnsupported feature
See also:
player_360_get_zoom()
int player_360_set_zoom_with_field_of_view ( player_h  player,
float  level,
int  horizontal_degrees,
int  vertical_degrees 
)

Sets the zoom level with field of view information of 360 video.

This function is provided to reduce the distortion of zoom operation. The zoom means scaling of the flat image cut from the panorama which is decided by the field of view data. The zoom level 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 :
5.0
Remarks:
The degree values above the default ones extend the field of view to significantly distorted areas and will not be useful in most cases.
This function is related to the following features:
http://tizen.org/feature/multimedia.player.spherical_video
http://tizen.org/feature/opengles.version.2_0
Parameters:
[in]playerThe handle to the media player
[in]levelThe zoom level
Valid range is 1.0~10.0. Default value is 1.0.
[in]horizontal_degreesThe horizontal field of view to display in degrees
Valid range is 1~360 degrees. Default value is 120 degrees.
[in]vertical_degreesThe vertical field of view to display in degrees
Valid range is 1~180 degrees. Default value is 67 degrees.
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_INVALID_OPERATIONInvalid operation
PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICEUnsupported feature
See also:
player_360_set_zoom()
player_360_get_zoom()
player_360_set_field_of_view()
player_360_get_field_of_view()