Fix GlobalVariable violations 62/297462/2 accepted/tizen/unified/20230822.043330
authorSeungbae Shin <seungbae.shin@samsung.com>
Fri, 18 Aug 2023 11:44:32 +0000 (20:44 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Fri, 18 Aug 2023 11:55:46 +0000 (20:55 +0900)
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

CMakeLists.txt
packaging/capi-media-codec.spec
test/CMakeLists.txt
test/media_codec_test.c

index d39a089..3734ece 100644 (file)
@@ -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})
index ea359b4..057f8b3 100644 (file)
@@ -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
index 5d65e75..c6fd0b7 100644 (file)
@@ -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)
index 502cc19..105f7e4 100644 (file)
@@ -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;