From: NAMJEONGYOON Date: Fri, 26 Aug 2016 07:06:59 +0000 (+0900) Subject: add internal api to enable media packet callback X-Git-Tag: accepted/tizen/common/20160831.162100~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=28801a233d372ffd0f49a95f435ea09cf4628c0f;p=platform%2Fcore%2Fapi%2Fplayer.git add internal api to enable media packet callback Change-Id: I77d35c7d65b392e0689bbdbb9e9239c223e2e687 --- diff --git a/include/common/player_internal.h b/include/common/player_internal.h index 2b84021..95560f0 100644 --- a/include/common/player_internal.h +++ b/include/common/player_internal.h @@ -550,6 +550,25 @@ int player_is_enabled_tsurf_pool(player_h player, bool *enabled); */ int player_get_media_packet_video_frame_pool_size(player_h player, int *size); + /** + * @brief Enables media_packet callback + * @since_tizen 3.0 + * @details If it is @c true, media_packet callback will be activated. + * If it is @c false, it will be deactivated. The default value is @c false. + * @param[in] player The handle to the media player + * @param[in] enable The active status : (@c true = send media_packet, @c false = render through overlay surface) + * @return @c 0 on success, + * otherwise a negative error value + * @retval #PLAYER_ERROR_NONE Successful + * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter + * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. + * @pre display_type must be set to PLAYER_DISPLAY_TYPE_OVERLAY by player_set_display. + * @pre player_media_packet_video_decoded_cb must be set. + * @see player_set_display() + * @see player_set_media_packet_video_frame_decoded_cb() + */ +int player_enable_media_packet_video_frame_decoded_cb(player_h player, bool enable); + #endif /* TIZEN_TV */ /** diff --git a/packaging/capi-media-player.spec b/packaging/capi-media-player.spec index 0ede44e..faea983 100644 --- a/packaging/capi-media-player.spec +++ b/packaging/capi-media-player.spec @@ -1,6 +1,6 @@ Name: capi-media-player Summary: A Media Player API -Version: 0.3.16 +Version: 0.3.17 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/player_internal.c b/src/player_internal.c index 2bee55d..9ed4a5a 100644 --- a/src/player_internal.c +++ b/src/player_internal.c @@ -388,4 +388,19 @@ int player_get_media_packet_video_frame_pool_size(player_h player, int *size) g_free(ret_buf); return ret; } + +int player_enable_media_packet_video_frame_decoded_cb(player_h player, bool enable) +{ + PLAYER_INSTANCE_CHECK(player); + int ret = PLAYER_ERROR_NONE; + muse_player_api_e api = MUSE_PLAYER_API_ENABLE_MEDIA_PACKET_VIDEO_FRAME_DECODED_CB; + player_cli_s *pc = (player_cli_s *) player; + char *ret_buf = NULL; + + LOGD("ENTER"); + + player_msg_send1(api, pc, ret_buf, ret, INT, enable); + g_free(ret_buf); + return ret; +} #endif