* @brief Sets the video display.
* @since_tizen 2.3
* @remarks To get @a display to set, use #GET_DISPLAY().
- * @remarks We are not supporting changing display between different types. \n
- * If you want to change display handle after calling player_prepare(), you must use the same display type as what you set before.
+ * @remarks We are not supporting changing display.
* @param[in] player The handle to the media player
* @param[in] type The display type
* @param[in] display The handle to display
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
* @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
- * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
+ * @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare().
+ * @see #player_display_type_e
+ * @see player_set_display_mode
+ * @see player_set_display_roi_area
+ * @see player_set_display_visible
* @see player_set_display_rotation
*/
int player_set_display(player_h player, player_display_type_e type, player_display_h display);
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
* @retval #PLAYER_ERROR_INVALID_STATE Invalid state
* @pre The player should support display mode changes.
+ * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
+ * @see #player_display_mode_e
+ * @see player_set_display()
* @see player_get_display_mode()
*/
int player_set_display_mode(player_h player, player_display_mode_e mode);
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @see player_set_display_mode()
+ * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
+ * @see #player_display_mode_e
+ * @see player_set_display_mode()
*/
int player_get_display_mode(player_h player, player_display_mode_e *mode);
/**
* @brief Sets the ROI(Region Of Interest) area of display.
* @since_tizen 3.0
+ * @remarks If no display is set, no operation is performed.
* @remarks Before set display ROI area, #PLAYER_DISPLAY_MODE_DST_ROI should be set with player_set_display_mode().
* The minimum value of width and height are 1.
* @param[in] player The handle to the media player
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @pre display_mode should be set to #PLAYER_DISPLAY_MODE_DST_ROI.
+ * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
+ * @see player_set_display()
+ * @see player_set_display_mode()
*/
int player_set_display_roi_area(player_h player, int x, int y, int width, int height);
/**
* @brief Sets the visibility of the x surface video display
* @since_tizen 2.3
+ * @remarks If no display is set, no operation is performed.
* @param[in] player The handle to the media player
* @param[in] visible The visibility of the display (@c true = visible, @c false = non-visible )
* @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 Invalid operation
* @retval #PLAYER_ERROR_INVALID_STATE Invalid state
+ * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
+ * @see player_set_display()
* @see player_is_display_visible()
*/
int player_set_display_visible(player_h player, bool visible);
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
* @see player_set_display_visible()
*/
int player_is_display_visible(player_h player, bool* visible);
/**
* @brief Sets the rotation settings of the video surface display.
* @since_tizen 2.3
+ * @remarks If no display is set, no operation is performed.
* @details Use this function to change the video orientation to portrait mode.
* @param[in] player The handle to the media player
* @param[in] rotation The rotation of the display
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
* @retval #PLAYER_ERROR_INVALID_STATE Invalid state
* @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature
+ * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
+ * @see #player_display_rotation_e
* @see player_set_display
* @see player_get_display_rotation()
*/
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
+ * @see #player_display_rotation_e
* @see player_set_display_rotation()
*/
int player_get_display_rotation(player_h player, player_display_rotation_e *rotation);
* @brief Sets the video display.
* @since_tizen 2.3.1
* @remarks To get @a display to set, use #GET_DISPLAY().
- * @remarks We are not supporting changing display between different types. \n
- * If you want to change display handle after calling player_prepare(), you must use the same display type as what you set before.
+ * @remarks We are not supporting changing display.
* @param[in] player The handle to the media player
* @param[in] type The display type
* @param[in] display The handle to display
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
* @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
- * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
+ * @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare().
+ * @see #player_display_type_e
+ * @see player_set_display_mode
+ * @see player_set_display_roi_area
+ * @see player_set_display_visible
* @see player_set_display_rotation
*/
int player_set_display(player_h player, player_display_type_e type, player_display_h display);
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
* @retval #PLAYER_ERROR_INVALID_STATE Invalid state
* @pre The player should support display mode changes.
+ * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
+ * @see #player_display_mode_e
+ * @see player_set_display()
* @see player_get_display_mode()
*/
int player_set_display_mode(player_h player, player_display_mode_e mode);
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @see player_set_display_mode()
+ * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
+ * @see #player_display_mode_e
+ * @see player_set_display_mode()
*/
int player_get_display_mode(player_h player, player_display_mode_e *mode);
/**
* @brief Sets the ROI(Region Of Interest) area of display.
* @since_tizen 3.0
+ * @remarks If no display is set, no operation is performed.
* @remarks Before set display ROI area, #PLAYER_DISPLAY_MODE_DST_ROI should be set with player_set_display_mode().
* The minimum value of width and height are 1.
* @param[in] player The handle to the media player
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @pre display_mode should be set to #PLAYER_DISPLAY_MODE_DST_ROI.
+ * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
+ * @see player_set_display()
+ * @see player_set_display_mode()
*/
int player_set_display_roi_area(player_h player, int x, int y, int width, int height);
/**
* @brief Sets the visibility of the x surface video display
* @since_tizen 2.3.1
+ * @remarks If no display is set, no operation is performed.
* @param[in] player The handle to the media player
* @param[in] visible The visibility of the display (@c true = visible, @c false = non-visible )
* @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 Invalid operation
* @retval #PLAYER_ERROR_INVALID_STATE Invalid state
+ * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
+ * @see player_set_display()
* @see player_is_display_visible()
*/
int player_set_display_visible(player_h player, bool visible);
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
* @see player_set_display_visible()
*/
int player_is_display_visible(player_h player, bool* visible);
/**
* @brief Sets the rotation settings of the video surface display.
* @since_tizen 2.3.1
+ * @remarks If no display is set, no operation is performed.
* @details Use this function to change the video orientation to portrait mode.
* @param[in] player The handle to the media player
* @param[in] rotation The rotation of the display
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
* @retval #PLAYER_ERROR_INVALID_STATE Invalid state
* @retval #PLAYER_ERROR_FEATURE_NOT_SUPPORTED_ON_DEVICE Unsupported feature
+ * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
+ * @see #player_display_rotation_e
* @see player_set_display
* @see player_get_display_rotation()
*/
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
+ * @see #player_display_rotation_e
* @see player_set_display_rotation()
*/
int player_get_display_rotation(player_h player, player_display_rotation_e *rotation);
}
if (mm_evas_renderer_create(&EVAS_HANDLE(pc), obj) != MM_ERROR_NONE) {
LOGW("fail to set evas client");
- /* FIXME : need to handle error case */
+ return PLAYER_ERROR_INVALID_OPERATION;
}
if (player_set_media_packet_video_frame_decoded_cb(player, mm_evas_renderer_write, (void *)EVAS_HANDLE(pc)) != PLAYER_ERROR_NONE)
#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (EVAS_HANDLE(pc)) {
ret = mm_evas_renderer_set_geometry(EVAS_HANDLE(pc), mode);
- /* FIXME: need to handle error code from evas */
- return PLAYER_ERROR_NONE;
+ if (ret != MM_ERROR_NONE) {
+ return PLAYER_ERROR_INVALID_OPERATION;
+ } else {
+ return PLAYER_ERROR_NONE;
+ }
}
#endif
player_msg_send1(api, pc, ret_buf, ret, INT, mode);
if (EVAS_HANDLE(pc)) {
ret = mm_evas_renderer_get_geometry(EVAS_HANDLE(pc), &mode);
*pmode = (player_display_mode_e) mode;
- /* FIXME: need to handle error code from evas */
- return PLAYER_ERROR_NONE;
+ if (ret != MM_ERROR_NONE) {
+ return PLAYER_ERROR_INVALID_OPERATION;
+ } else {
+ return PLAYER_ERROR_NONE;
+ }
}
#endif
player_msg_send(api, pc, ret_buf, ret);
#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (EVAS_HANDLE(pc)) {
ret = mm_evas_renderer_set_roi_area(EVAS_HANDLE(pc), x, y, width, height);
- /* FIXME: need to handle error code from evas */
- return PLAYER_ERROR_NONE;
+ if (ret == MM_ERROR_INVALID_ARGUMENT) {
+ return PLAYER_ERROR_INVALID_PARAMETER;
+ } else if (ret != MM_ERROR_NONE) {
+ return PLAYER_ERROR_INVALID_OPERATION;
+ } else {
+ return PLAYER_ERROR_NONE;
+ }
}
#endif
wl_win.wl_window_x = x;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (EVAS_HANDLE(pc)) {
ret = mm_evas_renderer_set_rotation(EVAS_HANDLE(pc), rotation);
- /* FIXME: need to handle error code from evas */
- return PLAYER_ERROR_NONE;
+ if (ret != MM_ERROR_NONE) {
+ return PLAYER_ERROR_INVALID_OPERATION;
+ } else {
+ return PLAYER_ERROR_NONE;
+ }
}
#endif
player_msg_send1(api, pc, ret_buf, ret, INT, rotation);
if (EVAS_HANDLE(pc)) {
ret = mm_evas_renderer_get_rotation(EVAS_HANDLE(pc), &rotation);
*protation = (player_display_rotation_e) rotation;
- /* FIXME: need to handle error code from evas */
- return PLAYER_ERROR_NONE;
+ if (ret != MM_ERROR_NONE) {
+ return PLAYER_ERROR_INVALID_OPERATION;
+ } else {
+ return PLAYER_ERROR_NONE;
+ }
}
#endif
player_msg_send(api, pc, ret_buf, ret);
#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (EVAS_HANDLE(pc)) {
ret = mm_evas_renderer_set_visible(EVAS_HANDLE(pc), visible);
- /* FIXME: need to handle error code from evas */
- return PLAYER_ERROR_NONE;
+ if (ret != MM_ERROR_NONE) {
+ return PLAYER_ERROR_INVALID_OPERATION;
+ } else {
+ return PLAYER_ERROR_NONE;
+ }
}
#endif
player_msg_send1(api, pc, ret_buf, ret, INT, visible);
else
*pvisible = FALSE;
- /* FIXME: need to handle error code from evas */
- return PLAYER_ERROR_NONE;
+ if (ret != MM_ERROR_NONE) {
+ return PLAYER_ERROR_INVALID_OPERATION;
+ } else {
+ return PLAYER_ERROR_NONE;
+ }
}
#endif
player_msg_send(api, pc, ret_buf, ret);