Tizen Native API
Display

The Display API provides functions to control the display.

Required Header

#include <player.h>

Overview

The API allows you to manage the display of the player. This API provides functions to set and get various display properties:

Functions

int player_set_display_mode (player_h player, player_display_mode_e mode)
 Sets the video display mode.
int player_get_display_mode (player_h player, player_display_mode_e *mode)
 Gets the video display mode.
int player_set_display_roi_area (player_h player, int x, int y, int width, int height)
 Sets the ROI(Region Of Interest) area of display.
int player_set_display_visible (player_h player, bool visible)
 Sets the visibility of the video display.
int player_is_display_visible (player_h player, bool *visible)
 Gets the visibility of the video display.
int player_set_display_rotation (player_h player, player_display_rotation_e rotation)
 Sets the rotation settings of the video surface display.
int player_get_display_rotation (player_h player, player_display_rotation_e *rotation)
 Gets the rotation of the video surface display.

Enumeration Type Documentation

Enumeration for display mode.

Since :
2.3
Enumerator:
PLAYER_DISPLAY_MODE_LETTER_BOX 

Letter box

PLAYER_DISPLAY_MODE_ORIGIN_SIZE 

Origin size

PLAYER_DISPLAY_MODE_FULL_SCREEN 

Full-screen

PLAYER_DISPLAY_MODE_CROPPED_FULL 

Cropped full-screen

PLAYER_DISPLAY_MODE_ORIGIN_OR_LETTER 

Origin size (if surface size is larger than video size(width/height)) or Letter box (if video size(width/height) is larger than surface size)

PLAYER_DISPLAY_MODE_DST_ROI 

Dst ROI mode

Enumeration for display rotation type.

Since :
2.3
Enumerator:
PLAYER_DISPLAY_ROTATION_NONE 

Display is not rotated

PLAYER_DISPLAY_ROTATION_90 

Display is rotated 90 degrees

PLAYER_DISPLAY_ROTATION_180 

Display is rotated 180 degrees

PLAYER_DISPLAY_ROTATION_270 

Display is rotated 270 degrees


Function Documentation

Gets the video display mode.

Since :
2.3
Remarks:
If no display is set, no operation is performed.
Parameters:
[in]playerThe handle to the media player
[out]modeThe current display 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
Precondition:
The player state must be one of PLAYER_STATE_IDLE, PLAYER_STATE_READY, PLAYER_STATE_PLAYING, or PLAYER_STATE_PAUSED.
See also:
player_display_mode_e
player_set_display_mode()

Gets the rotation of the video surface display.

Since :
2.3
Parameters:
[in]playerThe handle to the media player
[out]rotationThe current rotation of the display
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
The player state must be one of PLAYER_STATE_IDLE, PLAYER_STATE_READY, PLAYER_STATE_PLAYING, or PLAYER_STATE_PAUSED.
See also:
player_display_rotation_e
player_set_display_rotation()
int player_is_display_visible ( player_h  player,
bool *  visible 
)

Gets the visibility of the video display.

Since :
2.3
Parameters:
[in]playerThe handle to the media player
[out]visibleThe current visibility of the display (true = visible, false = non-visible )
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
The player state must be one of PLAYER_STATE_IDLE, PLAYER_STATE_READY, PLAYER_STATE_PLAYING, or PLAYER_STATE_PAUSED.
See also:
player_set_display_visible()

Sets the video display mode.

Since :
2.3
Remarks:
If no display is set, no operation is performed.
Parameters:
[in]playerThe handle to the media player
[in]modeThe display 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_INVALID_STATEInvalid state
Precondition:
The player state must be one of PLAYER_STATE_IDLE, PLAYER_STATE_READY, PLAYER_STATE_PLAYING, or PLAYER_STATE_PAUSED.
See also:
player_display_mode_e
player_set_display()
player_get_display_mode()
int player_set_display_roi_area ( player_h  player,
int  x,
int  y,
int  width,
int  height 
)

Sets the ROI(Region Of Interest) area of display.

Since :
3.0
Remarks:
If no display is set, no operation is performed.
Before set display ROI area, PLAYER_DISPLAY_MODE_DST_ROI must be set with player_set_display_mode(). The minimum value of width and height are 1.
Parameters:
[in]playerThe handle to the media player
[in]xX coordinate of area
[in]yY coordinate of area
[in]widthWidth of area
[in]heightHeight of area
Returns:
0 on success, otherwise a negative error value
Return values:
PLAYER_ERROR_NONESuccessful
PLAYER_ERROR_INVALID_PARAMETERInvalid parameter
PLAYER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
display_mode must be set to PLAYER_DISPLAY_MODE_DST_ROI.
The player state must be one of PLAYER_STATE_IDLE, PLAYER_STATE_READY, PLAYER_STATE_PLAYING, or PLAYER_STATE_PAUSED.
See also:
player_set_display()
player_set_display_mode()

Sets the rotation settings of the video surface display.

Use this function to change the video orientation to portrait mode.

Since :
2.3
Remarks:
If no display is set, no operation is performed.
Parameters:
[in]playerThe handle to the media player
[in]rotationThe rotation of the display
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_INVALID_STATEInvalid state
Precondition:
The player state must be one of PLAYER_STATE_IDLE, PLAYER_STATE_READY, PLAYER_STATE_PLAYING, or PLAYER_STATE_PAUSED.
See also:
player_display_rotation_e
player_set_display
player_get_display_rotation()
int player_set_display_visible ( player_h  player,
bool  visible 
)

Sets the visibility of the video display.

Since :
2.3
Remarks:
If no display is set, no operation is performed.
If you set visible before calling player_set_display, it will be applied on PLAYER_STATE_READY state.
Parameters:
[in]playerThe handle to the media player
[in]visibleThe visibility of the display (true = visible, false = non-visible )
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_INVALID_STATEInvalid state
Precondition:
The player state must be one of PLAYER_STATE_IDLE, PLAYER_STATE_READY, PLAYER_STATE_PLAYING, or PLAYER_STATE_PAUSED.
See also:
player_set_display()
player_is_display_visible()