media_packet: Clarify static functions 39/250739/1
authorSangchul Lee <sc11.lee@samsung.com>
Mon, 4 Jan 2021 07:18:05 +0000 (16:18 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Mon, 4 Jan 2021 07:18:52 +0000 (16:18 +0900)
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 <sc11.lee@samsung.com>
include/media_packet_private.h
packaging/capi-media-tool.spec
src/media_packet.c
src/media_packet_pool.c
src/media_packet_private.c [deleted file]

index 23882ff00b56cf52e903d7140bb5d30b0c06020e..0c3e2ae53bbcec01eff65568559a8ca120da87c3 100644 (file)
@@ -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
index b28f080ab85f3f1b242b017dbda23f4251097931..4f589999b166bb4e8602e33bed7b22dffa6e363e 100755 (executable)
@@ -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
index 9e1b5840644806c1867f9bbc770a3873727e52ed..c3a2592ce5bf66a533ce411aaac6b6a634ba003f 100644 (file)
@@ -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)
index 049d6150e5d9c697c41b5aaa2ba3acdf06f7b50c..805443d0318ecab1fb7c7acd3e2adc127525cafd 100644 (file)
@@ -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 (file)
index ba025f2..0000000
+++ /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 <glib.h>
-#include <media_packet_private.h>