From: Seungbae Shin Date: Fri, 18 Aug 2023 11:44:32 +0000 (+0900) Subject: Fix GlobalVariable violations X-Git-Tag: accepted/tizen/unified/20230822.043330^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d1a143e2845f2bf059937ab6697ddbafddceef89;p=platform%2Fcore%2Fapi%2Fmediacodec.git Fix GlobalVariable violations SAM Score: 4.38 -> 4.53 GV: 3.44 -> 4.29 + remove cmake minimum version warning [Version] 0.6.35 [Issue Type] SAM Change-Id: I6ca6e3df4861bf6fb60ecb88d3f5171b8f2b66cd --- diff --git a/CMakeLists.txt b/CMakeLists.txt index d39a089..3734ece 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12) SET(fw_name "capi-media-codec") PROJECT(${fw_name}) diff --git a/packaging/capi-media-codec.spec b/packaging/capi-media-codec.spec index ea359b4..057f8b3 100644 --- a/packaging/capi-media-codec.spec +++ b/packaging/capi-media-codec.spec @@ -4,7 +4,7 @@ Name: capi-media-codec Summary: A Media Codec library in Tizen Native API -Version: 0.6.34 +Version: 0.6.35 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5d65e75..c6fd0b7 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12) SET(fw_test "${fw_name}-test") INCLUDE_DIRECTORIES(../include) diff --git a/test/media_codec_test.c b/test/media_codec_test.c index 502cc19..105f7e4 100644 --- a/test/media_codec_test.c +++ b/test/media_codec_test.c @@ -194,10 +194,10 @@ struct _App { gint fbd; }; -App s_app; +static App s_app; -media_format_h fmt = NULL; -media_packet_pool_h pkt_pool = NULL; +static media_format_h fmt = NULL; +static media_packet_pool_h pkt_pool = NULL; /* Internal Functions */ void displaymenu(void); @@ -214,9 +214,9 @@ void output_dump(App *app, media_packet_h pkt); /* */ const char* codec_type_to_string(mediacodec_codec_type_e media_codec_id); -void (*extractor)(App *app, guint8** data, gint *size, gboolean *have_frame, gboolean *codec_data); +static void (*extractor)(App *app, guint8** data, gint *size, gboolean *have_frame, gboolean *codec_data); -gint g_menu_state = CURRENT_STATUS_MAINMENU; +static gint g_menu_state = CURRENT_STATUS_MAINMENU; static const guint mp3types_bitrates[2][3][16] = { { @@ -440,7 +440,7 @@ void mpeg4_extractor(App * app, guint8 **data, gint *size, gboolean * have_frame * - AMR-NB : mime type ("audio/AMR") / 8Khz / 1 ch / 16 bits * - AMR-WB : mime type ("audio/AMR-WB") / 16Khz / 1 ch / 16 bits **/ -gint write_amr_header = 1; /* write magic number for AMR Header at one time */ +static gint write_amr_header = 1; /* write magic number for AMR Header at one time */ static const gchar AMR_header[] = "#!AMR\n"; static const gchar AMRWB_header[] = "#!AMR-WB\n"; #define AMR_NB_MIME_HDR_SIZE 6 @@ -448,7 +448,7 @@ static const gchar AMRWB_header[] = "#!AMR-WB\n"; static const gint block_size_nb[16] = { 12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0 }; static const gint block_size_wb[16] = { 17, 23, 32, 36, 40, 46, 50, 58, 60, 5, -1, -1, -1, -1, 0, 0 }; -gint *blocksize_tbl; +static gint *blocksize_tbl; void amrdec_extractor(App * app, guint8 **data, gint *size, gboolean * have_frame, gboolean *codec_data) { gint readsize = 0, mode_temp;