From: Sangchul Lee Date: Mon, 4 Jan 2021 07:18:05 +0000 (+0900) Subject: media_packet: Clarify static functions X-Git-Tag: submit/tizen/20210108.020109~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=37c87fe0f85b72ac34f8925cb9127efdac4322a8;p=platform%2Fcore%2Fapi%2Fmediatool.git media_packet: Clarify static functions Add static keyword to these functions to be changed. media_packet_private.c which has empty implementation is removed. [Version] 0.1.23 [Issue Type] Refactoring Change-Id: I41f2fdbb8296540ea6542d5a6abf06d1d366457b Signed-off-by: Sangchul Lee --- diff --git a/include/media_packet_private.h b/include/media_packet_private.h index 23882ff..0c3e2ae 100644 --- a/include/media_packet_private.h +++ b/include/media_packet_private.h @@ -138,10 +138,6 @@ typedef struct _media_packet_s { } media_packet_s; -int _pkt_alloc_buffer(media_packet_s *pkt); -int _pkt_dealloc_buffer(media_packet_s *pkt); -void _aligned_free_normal_buffer_type(void *buffer_ptr); - #ifdef __cplusplus } #endif diff --git a/packaging/capi-media-tool.spec b/packaging/capi-media-tool.spec index b28f080..4f58999 100755 --- a/packaging/capi-media-tool.spec +++ b/packaging/capi-media-tool.spec @@ -1,6 +1,6 @@ Name: capi-media-tool Summary: A Core API media tool library in Tizen Native API -Version: 0.1.22 +Version: 0.1.23 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/media_packet.c b/src/media_packet.c index 9e1b584..c3a2592 100644 --- a/src/media_packet.c +++ b/src/media_packet.c @@ -32,6 +32,9 @@ static size_t _pkt_calculate_audio_buffer_size(media_packet_s *pkt); static size_t _pkt_calculate_text_buffer_size(media_packet_s *pkt); static uint32_t _convert_to_tbm_surface_format(media_format_mimetype_e format_type); static void *_aligned_malloc_normal_buffer_type(size_t size, int alignment); +static void _aligned_free_normal_buffer_type(void *buffer_ptr); +static int _pkt_alloc_buffer(media_packet_s *pkt); +static int _pkt_dealloc_buffer(media_packet_s *handle); int media_packet_create_alloc(media_format_h fmt, media_packet_finalize_cb fcb, void *fcb_data, media_packet_h *packet) { @@ -239,7 +242,7 @@ fail: } -int _pkt_alloc_buffer(media_packet_s *pkt) +static int _pkt_alloc_buffer(media_packet_s *pkt) { /* skip validating pkt */ size_t buffersize = 0; @@ -325,7 +328,7 @@ int _pkt_alloc_buffer(media_packet_s *pkt) return MEDIA_PACKET_ERROR_NONE; } -int _pkt_dealloc_buffer(media_packet_s *handle) +static int _pkt_dealloc_buffer(media_packet_s *handle) { if (handle->type == MEDIA_BUFFER_TYPE_TBM_SURFACE) { if (handle->surface_data) @@ -1406,7 +1409,7 @@ static void *_aligned_malloc_normal_buffer_type(size_t size, int alignment) return NULL; } -void _aligned_free_normal_buffer_type(void *buffer_ptr) +static void _aligned_free_normal_buffer_type(void *buffer_ptr) { unsigned char *ptr; if (buffer_ptr == NULL) diff --git a/src/media_packet_pool.c b/src/media_packet_pool.c index 049d615..805443d 100644 --- a/src/media_packet_pool.c +++ b/src/media_packet_pool.c @@ -114,7 +114,7 @@ int media_packet_pool_get_size(media_packet_pool_h pool, int *min_size, int *max return MEDIA_PACKET_ERROR_NONE; } -int _packet_finalize_cb(media_packet_h packet, int error_code, void *user_data) +static int _packet_finalize_cb(media_packet_h packet, int error_code, void *user_data) { int ret = MEDIA_PACKET_ERROR_NONE; media_packet_pool_h pool = NULL; @@ -243,7 +243,7 @@ int media_packet_pool_acquire_packet(media_packet_pool_h pool, media_packet_h *p return ret; } -gboolean _is_packet_in_queue(media_packet_pool_s *pool_handle, media_packet_h packet) +static gboolean _is_packet_in_queue(media_packet_pool_s *pool_handle, media_packet_h packet) { int i; for (i = 0; i < pool_handle->pool_size; i++) { diff --git a/src/media_packet_private.c b/src/media_packet_private.c deleted file mode 100644 index ba025f2..0000000 --- a/src/media_packet_private.c +++ /dev/null @@ -1,18 +0,0 @@ -/* -* Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -#include -#include