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 (Deprecated since [3.0]).*/
+ PLAYER_DISPLAY_MODE_DST_ROI, /**< Dst ROI mode */
PLAYER_DISPLAY_MODE_NUM
} player_display_mode_e;
*
* @remarks This function is issued in the context of gstreamer so the UI update code should not be directly invoked.\n
* the packet should be released by media_packet_destroy() after use. \n
- * Otherwises, decoder can't work more because it can't have enough buffer to fill decoded frame.
+ * Otherwise, decoder can't work more because it can't have enough buffer to fill decoded frame.
*
* @param[in] pkt Reference pointer to the media packet
* @param[in] user_data The user data passed from the callback registration function
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_OUT_OF_MEMORY Out of memory
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @retval #PLAYER_ERROR_RESOURCE_LIMIT Cannot create more instace due to resource(socket, thread, etc) limitation on system.
+ * @retval #PLAYER_ERROR_RESOURCE_LIMIT Cannot create more instance due to resource(socket, thread, etc) limitation on system.
* @post The player state will be #PLAYER_STATE_IDLE.
* @see player_destroy()
*/
* A registered callback is called on the internal thread of the player. \n
* A video frame can be retrieved using a registered callback as a media packet.\n
* The callback function holds the same buffer that will be drawn on the display device.\n
- * So if you change the media packet in a registerd callback, it will be displayed on the device\n
+ * So if you change the media packet in a registered callback, it will be displayed on the device\n
* and the media packet is available until it's destroyed by media_packet_destroy().\n
* The packet have to be destroyed as quickly as possible after rendering the packet\n
- * and all the packets have to be destoryed before player_unprepare() is called.\n
+ * and all the packets have to be destroyed before player_unprepare() is called.\n
* @param[in] player The handle to the media player
* @param[in] callback The callback function to be registered
* @param[in] user_data The user data to be passed to the callback function
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 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
+ * @param[in] x X coordinate of area
+ * @param[in] y Y coordinate of area
+ * @param[in] width Width of area
+ * @param[in] height Height of area
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #PLAYER_ERROR_NONE Successful
+ * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ */
+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
* @param[in] player The handle to the media player
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 (Deprecated since [3.0]).*/
+ PLAYER_DISPLAY_MODE_DST_ROI, /**< Dst ROI mode */
PLAYER_DISPLAY_MODE_NUM
} player_display_mode_e;
*
* @remarks This function is issued in the context of gstreamer so the UI update code should not be directly invoked.\n
* the packet should be released by media_packet_destroy() after use. \n
- * Otherwises, decoder can't work more because it can't have enough buffer to fill decoded frame.
+ * Otherwise, decoder can't work more because it can't have enough buffer to fill decoded frame.
*
* @param[in] pkt Reference pointer to the media packet
* @param[in] user_data The user data passed from the callback registration function
* @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #PLAYER_ERROR_OUT_OF_MEMORY Out of memory
* @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @retval #PLAYER_ERROR_RESOURCE_LIMIT Cannot create more instace due to resource(socket, thread, etc) limitation on system.
+ * @retval #PLAYER_ERROR_RESOURCE_LIMIT Cannot create more instance due to resource(socket, thread, etc) limitation on system.
* @post The player state will be #PLAYER_STATE_IDLE.
* @see player_destroy()
*/
* A registered callback is called on the internal thread of the player. \n
* A video frame can be retrieved using a registered callback as a media packet.\n
* The callback function holds the same buffer that will be drawn on the display device.\n
- * So if you change the media packet in a registerd callback, it will be displayed on the device\n
+ * So if you change the media packet in a registered callback, it will be displayed on the device\n
* and the media packet is available until it's destroyed by media_packet_destroy().\n
* The packet have to be destroyed as quickly as possible after rendering the packet\n
- * and all the packets have to be destoryed before player_unprepare() is called.\n
+ * and all the packets have to be destroyed before player_unprepare() is called.\n
* @param[in] player The handle to the media player
* @param[in] callback The callback function to be registered
* @param[in] user_data The user data to be passed to the callback function
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 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
+ * @param[in] x X coordinate of area
+ * @param[in] y Y coordinate of area
+ * @param[in] width Width of area
+ * @param[in] height Height of area
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #PLAYER_ERROR_NONE Successful
+ * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ */
+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
* @param[in] player The handle to the media player
static void set_display_roi_area(int x, int y, int width, int height)
{
- //player_set_display_roi_area(g_player[0], x, y, width, height);
+ player_set_display_roi_area(g_player[0], x, y, width, height);
g_print(" ==> [Player_Test] Display roi area: [x(%d) y(%d) width(%d) height(%d)] \n", x, y, width, height);
}