*/
int player_unset_media_stream_buffer_status_cb_ex(player_h player, player_stream_type_e type);
+/**
+ * @brief Sets DRC(dynamic resolution change) information of media stream data.
+ * @since_tizen 3.0
+ * @remarks This API is used for media stream playback only.
+ * If the hw codec can not support drc, app have to set DRC information before calling player_prepare().
+ * @param[in] player The handle to the media player
+ * @param[in] drc The drc status: (@c true = drc, @c false = non drc)
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #PLAYER_ERROR_NONE Successful
+ * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
+ * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare().
+ */
+int player_set_media_stream_dynamic_resolution(player_h player, bool drc);
+
+#ifdef HAVE_WAYLAND
+/**
+ * @brief Sets the ecore wayland video display.
+ * @since_tizen 3.0
+ * @remarks This API support PLAYER_DISPLAY_TYPE_OVERLAY type only.
+ * @param[in] player The handle to the media player
+ * @param[in] type The display type
+ * @param[in] ecore_wl_window The ecore wayland window handle
+ * @param[in] x the x coordinate of window
+ * @param[in] y the y coordinate of window
+ * @param[in] width the width of window
+ * @param[in] height the height of window
+ * @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 player 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_rotation
+ */
+int player_set_ecore_wl_display(player_h player, player_display_type_e type, Ecore_Wl_Window *ecore_wl_window, int x, int y, int width, int height);
+
+#endif
+
#ifdef TIZEN_TV
/**
* @brief Called when no free space in buffer.
#endif
-#ifdef HAVE_WAYLAND
-/**
- * @brief Sets the ecore wayland video display.
- * @since_tizen 3.0
- * @remarks This API support PLAYER_DISPLAY_TYPE_OVERLAY type only.
- * @param[in] player The handle to the media player
- * @param[in] type The display type
- * @param[in] ecore_wl_window The ecore wayland window handle
- * @param[in] x the x coordinate of window
- * @param[in] y the y coordinate of window
- * @param[in] width the width of window
- * @param[in] height the height of window
- * @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 player 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_rotation
- */
-int player_set_ecore_wl_display(player_h player, player_display_type_e type, Ecore_Wl_Window *ecore_wl_window, int x, int y, int width, int height);
-
-#endif
-
/**
* @}
*/
*/
int player_unset_media_stream_buffer_status_cb_ex(player_h player, player_stream_type_e type);
+/**
+ * @brief Sets DRC(dynamic resolution change) information of media stream data.
+ * @since_tizen 3.0
+ * @remarks This API is used for media stream playback only.
+ * If the hw codec can not support drc, app have to set DRC information before calling player_prepare().
+ * @param[in] player The handle to the media player
+ * @param[in] drc The drc status: (@c true = drc, @c false = non drc)
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #PLAYER_ERROR_NONE Successful
+ * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state
+ * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre The player state must be set to #PLAYER_STATE_IDLE by calling player_create() or player_unprepare().
+ */
+int player_set_media_stream_dynamic_resolution(player_h player, bool drc);
+
#ifdef HAVE_WAYLAND
/**
* @brief Sets the ecore wayland video display.
LOGD("call seek cb");
((player_seek_completed_cb) cb_info->user_cb[ev]) (cb_info->user_data[ev]);
set_null_user_cb(cb_info, ev);
- }
- else {
+ } else {
LOGW("ignored. seek cb %p, block %d", cb_info->user_cb[ev], cb_info->block_seek_cb);
}
g_mutex_unlock(&cb_info->seek_cb_mutex);
}
-static void _player_event_queue_remove (player_event_queue * ev_queue, int ev)
+static void _player_event_queue_remove(player_event_queue * ev_queue, int ev)
{
GList *item;
g_mutex_lock(&ev_queue->qlock);
- item = g_queue_peek_head_link (ev_queue->queue);
+ item = g_queue_peek_head_link(ev_queue->queue);
while (item) {
GList *next = item->next;
_player_cb_data *cb_data = (_player_cb_data *)item->data;
if (cb_data && cb_data->int_data == ev) {
- LOGD ("removing '%p (ev:%d)' from event queue", cb_data, cb_data->int_data);
+ LOGD("removing '%p (ev:%d)' from event queue", cb_data, cb_data->int_data);
g_free(cb_data->buf);
g_free(cb_data);
- g_queue_delete_link (ev_queue->queue, item);
+ g_queue_delete_link(ev_queue->queue, item);
}
item = next;
}
return MM_ERROR_NONE;
}
+int player_set_media_stream_dynamic_resolution(player_h player, bool drc)
+{
+ PLAYER_INSTANCE_CHECK(player);
+ int ret = PLAYER_ERROR_NONE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_MEDIA_STREAM_DYNAMIC_RESOLUTION;
+ player_cli_s *pc = (player_cli_s *) player;
+ char *ret_buf = NULL;
+
+ LOGD("ENTER");
+
+ player_msg_send1(api, pc, ret_buf, ret, INT, drc);
+ g_free(ret_buf);
+ return ret;
+}
+
#ifdef HAVE_WAYLAND
int player_set_ecore_wl_display(player_h player, player_display_type_e type, Ecore_Wl_Window *ecore_wl_window, int x, int y, int width, int height)
{
Ecore_Wl_Window *wl_window = NULL;
LOGD("ENTER");
- if (type !=PLAYER_DISPLAY_TYPE_OVERLAY) {
+ if (type != PLAYER_DISPLAY_TYPE_OVERLAY) {
LOGE("Display type(%d) is not overlay", type);
return PLAYER_ERROR_INVALID_PARAMETER;
}