} player_stream_type_e;
/**
- * @brief Enumeration of media stream buffer status
+ * @brief Enumeration of media stream buffer status.
* @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
+ * @see player_set_media_stream_buffer_max_size()
+ * @see player_set_media_stream_buffer_min_threshold()
*/
typedef enum {
- PLAYER_MEDIA_STREAM_BUFFER_UNDERRUN,
- PLAYER_MEDIA_STREAM_BUFFER_OVERFLOW,
+ PLAYER_MEDIA_STREAM_BUFFER_UNDERRUN, /**< The buffer level is lower than the threshold */
+ PLAYER_MEDIA_STREAM_BUFFER_OVERFLOW, /**< The buffer level is over than the threshold */
} player_media_stream_buffer_status_e;
/**
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
* @param[in] type The message type for progressive download
* @param[in] user_data The user data passed from the callback registration function
- * @see player_set_progressive_download_path()
*/
typedef void (*player_pd_message_cb)(player_pd_message_type_e type, void *user_data);
* @pre The player state must be set to #PLAYER_STATE_READY by calling player_prepare() or set to #PLAYER_STATE_PAUSED by calling player_pause().
* @post The player state will be #PLAYER_STATE_PLAYING.
* @post It invokes player_completed_cb() when playback completes, if you set a callback with player_set_completed_cb().
- * @post It invokes player_pd_message_cb() when progressive download starts or completes, if you set a download path with player_set_progressive_download_path() and a callback with player_set_progressive_download_message_cb().
* @see player_prepare()
* @see player_prepare_async()
* @see player_stop()
* @see player_pause()
* @see player_set_completed_cb()
* @see player_completed_cb()
- * @see player_set_progressive_download_path()
- * @see player_set_progressive_download_message_cb()
- * @see player_pd_message_cb()
* @see player_set_display_visible()
*/
int player_start(player_h player);
int player_unset_media_packet_video_frame_decoded_cb(player_h player);
/**
- * @brief Pushes elementary stream to decode audio or video
+ * @brief Pushes elementary stream to decode audio or video.
* @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
* @remarks player_set_media_stream_info() must be called before using this API.
* @remarks The available buffer size can be set by calling player_set_media_stream_buffer_max_size() API.
int player_push_media_stream(player_h player, media_packet_h packet);
/**
- * @brief Sets contents information for media stream
+ * @brief Sets contents information for media stream.
* @since_tizen @if WEARABLE 3.0 @else 2.4 @endif
* @remarks AV format must be set before pushing elementary stream with player_push_media_stream().
* @remarks This API must be called before calling the player_prepare() or player_prepare_async()
int player_set_display_roi_area(player_h player, int x, int y, int width, int height);
/**
- * @brief Sets the visibility of the video display
+ * @brief Sets the visibility of the video display.
* @since_tizen @if WEARABLE 2.3.1 @else 2.3 @endif
* @remarks If no display is set, no operation is performed.
* @remarks If you set visible before calling player_set_display, it will be applied on #PLAYER_STATE_READY state.
* @if WEARABLE @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature @endif
* @retval #PLAYER_ERROR_PERMISSION_DENIED Permission denied
* @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare().
- * @see player_set_progressive_download_message_cb()
- * @see player_unset_progressive_download_message_cb()
*/
int player_set_progressive_download_path(player_h player, const char *path) TIZEN_DEPRECATED_API;
* @if WEARABLE @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature @endif
* @pre The path to download must be set by calling player_set_progressive_download_path().
* @post player_pd_message_cb() will be invoked.
- * @see player_unset_progressive_download_message_cb()
- * @see player_set_progressive_download_path()
*/
int player_set_progressive_download_message_cb(player_h player, player_pd_message_cb callback, void *user_data) TIZEN_DEPRECATED_API;
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @see player_set_progressive_download_message_cb()
*/
int player_unset_progressive_download_message_cb(player_h player) TIZEN_DEPRECATED_API;
*/
int player_get_streaming_buffering_time(player_h player, int *prebuffer_ms, int *rebuffer_ms);
+/**
+ * @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
+ * @param[in] player The handle to the media player
+ * @param[in] enable 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.
+ * @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_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED.
+ * @see player_360_is_enabled()
+ */
+int player_360_set_enable(player_h player, bool enable);
+
+/**
+ * @brief Gets the 360 video display mode.
+ * @since_tizen 5.0
+ * @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,
+ @c false = display with full panorama mode)
+ * @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_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED.
+ * @see player_360_set_enable()
+ */
+int player_360_is_enabled(player_h player, bool *enabled);
+
+/**
+ * @brief Sets the 360 video direction of view.
+ * @details 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_tizen 5.0
+ * @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].
+ * @param[in] pitch The angle value around lateral axis. Valid values are in
+ * range [-PI/2, PI/2].
+ * @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_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED.
+ * @see player_360_get_direction_of_view()
+ */
+int player_360_set_direction_of_view(player_h player, float yaw, float pitch);
+
+/**
+ * @brief Gets the 360 video direction of view.
+ * @details This function is to get horizontal (yaw) and vertical (pitch) angles
+ * of current direction of view in radians.
+ * @since_tizen 5.0
+ * @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
+ * @param[out] pitch Pointer to store current value of direction of view
+ * angle around lateral axis
+ * @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_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED.
+ * @see player_360_set_direction_of_view()
+ */
+int player_360_get_direction_of_view(player_h player, float *yaw, float *pitch);
+
+/**
+ * @brief Sets the zoom level of 360 video.
+ * @details The zoom means scaling of the flat image cutted 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_tizen 5.0
+ * @param[in] player The handle to the media player
+ * @param[in] level The zoom level
+ * @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_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED.
+ * @see player_360_get_zoom()
+ */
+int player_360_set_zoom(player_h player, float level);
+
+/**
+ * @brief Gets the current zoom level of 360 video.
+ * @details 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_tizen 5.0
+ * @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,
+ * 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_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED.
+ * @see player_360_set_zoom()
+ */
+int player_360_get_zoom(player_h player, float *level);
+
+/**
+ * @brief Sets the field of view information of 360 video.
+ * @details This function is to set the field of view to decide the output frame size.
+ * @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.
+ * @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.
+ * @param[in] vertical_degrees The vertical field of view to display in degrees.
+ * Valid range is 1-180 degrees. Default value is 67 degrees.
+ * @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_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED.
+ * @see player_360_get_field_of_view()
+ */
+int player_360_set_field_of_view(player_h player, int horizontal_degrees, int vertical_degrees);
+
+/**
+ * @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
+ * @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.
+ * @param[out] vertical_degrees Pointer to store current value of vertical
+ * field of view to display in degrees.
+ * @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_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED.
+ * @see player_360_set_field_of_view()
+ */
+int player_360_get_field_of_view(player_h player, int *horizontal_degrees, int *vertical_degrees);
+
/**
* @}
*/
*/
int player_enable_media_packet_video_frame_decoded_cb(player_h player, bool enable);
-/**
- * @brief Enables/disables 360 video mode.
- * @since_tizen 4.0
- * @details If it is @c true, the content will be displayed with 360 video mode.
- * If it is @c false, the content will be displayed with full panorama mode. The default value is @c true.
- * @param[in] player The handle to the media player
- * @param[in] enable The 360 video display status: @c true = display with 360 video mode,
- @c false = display with full panorama mode
- * @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_OPERATION Not a spherical media
- * @retval #PLAYER_ERROR_INVALID_STATE Player isn't prepared
- * @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED.
- * @see player_360_is_enabled()
- */
-int player_360_set_enable(player_h player, bool enable);
-
-/**
- * @brief Gets the 360 video display status.
- * @since_tizen 4.0
- * @param[in] player The handle to the media player
- * @param[out] enabled Pointer to store current 360 video display status:
- * (@c true = display with 360 video mode,
- @c false = display with full panorama mode)
- * @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_OPERATION Not a spherical media
- * @retval #PLAYER_ERROR_INVALID_STATE Player isn't prepared
- * @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED.
- * @see player_360_set_enable()
- */
-int player_360_is_enabled(player_h player, bool *enabled);
-
-/**
- * @brief Sets the 360 video direction of view.
- * @since_tizen 4.0
- * @details 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 that is equal to the centre of the
- * panorama image.
- * @param[in] player The handle to the media player
- * @param[in] yaw The angle value around vertical axis. Valid values are in
- * range +/- PI.
- * @param[in] pitch The angle value around lateral axis. Valid values are in
- * range +/- PI/2.
- * @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_OPERATION Not a spherical media
- * @retval #PLAYER_ERROR_INVALID_STATE Player isn't prepared
- * @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED.
- * @see player_360_get_direction_of_view()
- */
-int player_360_set_direction_of_view(player_h player, float yaw, float pitch);
-
-/**
- * @brief Gets the 360 video direction of view.
- * @since_tizen 4.0
- * @details This function is to get horizontal (yaw) and vertical (pitch) angles
- * of current direction of view in radians.
- * @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
- * @param[out] pitch Pointer to store current value of direction of view
- * angle around lateral axis
- * @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_OPERATION Not a spherical media
- * @retval #PLAYER_ERROR_INVALID_STATE Player isn't prepared
- * @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED.
- * @see player_360_set_direction_of_view()
- */
-int player_360_get_direction_of_view(player_h player, float *yaw, float *pitch);
-
-/**
- * @brief Sets the zoom level of 360 video.
- * @since_tizen 4.0
- * @details The zoom means scaling of the flat image cutted 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.
- * @param[in] player The handle to the media player
- * @param[in] level The zoom level
- * @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_OPERATION Not a spherical media
- * @retval #PLAYER_ERROR_INVALID_STATE Player isn't prepared
- * @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED.
- * @see player_360_get_zoom()
- */
-int player_360_set_zoom(player_h player, float level);
-
-/**
- * @brief Gets the current zoom level of 360 video.
- * @since_tizen 4.0
- * @details The zoom means scaling of the flat image cutted 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.
- * @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,
- * otherwise a negative error value
- * @retval #PLAYER_ERROR_NONE Successful
- * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PLAYER_ERROR_INVALID_OPERATION Not a spherical media
- * @retval #PLAYER_ERROR_INVALID_STATE Player isn't prepared
- * @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED.
- * @see player_360_set_zoom()
- */
-int player_360_get_zoom(player_h player, float *level);
-
-/**
- * @brief Sets the field of view information of 360 video.
- * @since_tizen 4.0
- * @details This function is to set the field of view to decide the output frame size.
- * Note: values above the default ones extends field of view to significantly
- * distorted areas and thus don't make real sense.
- * @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.
- * @param[in] vertical_degrees The vertical field of view to display in degrees.
- * Valid range is 1-180 degrees. Default value is 67 degrees.
- * @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_OPERATION Not a spherical media
- * @retval #PLAYER_ERROR_INVALID_STATE Player isn't prepared
- * @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED.
- * @see player_360_get_field_of_view()
- */
-int player_360_set_field_of_view(player_h player, int horizontal_degrees, int vertical_degrees);
-
-/**
- * @brief Gets the field of view information of 360 video.
- * @since_tizen 4.0
- * @details This function is to get the field of view information.
- * @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.
- * @param[out] vertical_degrees Pointer to store current value of vertical
- * field of view to display in degrees.
- * @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_OPERATION Not a spherical media
- * @retval #PLAYER_ERROR_INVALID_STATE Player isn't prepared
- * @pre The player state must be one of #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING or #PLAYER_STATE_PAUSED.
- * @see player_360_set_field_of_view()
- */
-int player_360_get_field_of_view(player_h player, int *horizontal_degrees, int *vertical_degrees);
-
/**
* @brief Set video codec type as h/w codec or s/w codec.
* @since_tizen 4.0