Use static for global function pointers 71/255371/3 accepted/tizen/unified/20210319.140939 submit/tizen/20210318.041748
authorSeungbae Shin <seungbae.shin@samsung.com>
Wed, 17 Mar 2021 11:13:47 +0000 (20:13 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Wed, 17 Mar 2021 11:28:22 +0000 (20:28 +0900)
[Version] 0.6.16
[Issue Type] SAM Improvement

Change-Id: I29a2f1b7ef7991d606c7243ff79d15c69789487d

packaging/capi-media-codec.spec
src/media_codec_port_gst.c

index 6f132cd..226d027 100644 (file)
@@ -4,7 +4,7 @@
 
 Name:       capi-media-codec
 Summary:    A Media Codec library in Tizen Native API
-Version:    0.6.15
+Version:    0.6.16
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 5f2078f..6465c59 100644 (file)
@@ -104,77 +104,80 @@ static void mc_gst_core_free(mc_gst_core_t *core);
 static mc_gst_port_t *mc_gst_port_new(mc_gst_core_t *core);
 static void mc_gst_port_free(mc_gst_port_t *port);
 /* video vtable */
-int(*vdec_vtable[])() = {&__mc_fill_input_buffer_with_packet, &__mc_fill_packet_with_output_buffer};
-int(*venc_vtable[])() = {&__mc_fill_input_buffer_with_packet, &__mc_fill_packet_with_output_buffer};
+__attribute__((unused))
+static int(*vdec_vtable[])() = {&__mc_fill_input_buffer_with_packet, &__mc_fill_packet_with_output_buffer};
 
+static int(*venc_vtable[])() = {&__mc_fill_input_buffer_with_packet, &__mc_fill_packet_with_output_buffer};
 
-int(*vdec_h264_sw_vtable[])() = {&__mc_fill_input_buffer_with_packet,                  /* S/W H.264 Decoder Vtable */
+static int(*vdec_h264_sw_vtable[])() = {&__mc_fill_input_buffer_with_packet,                   /* S/W H.264 Decoder Vtable */
                                                                &__mc_fill_vdec_packet_with_output_buffer};
 
-int(*vdec_mpeg4_sw_vtable[])() = {&__mc_fill_input_buffer_with_packet,                 /* S/W MPEG4 Decoder Vtable */
+static int(*vdec_mpeg4_sw_vtable[])() = {&__mc_fill_input_buffer_with_packet,                  /* S/W MPEG4 Decoder Vtable */
                                                                &__mc_fill_vdec_packet_with_output_buffer};
 
-int(*vdec_h263_sw_vtable[])() = {&__mc_fill_input_buffer_with_packet,                  /* S/W MPEG4 Decoder Vtable */
+static int(*vdec_h263_sw_vtable[])() = {&__mc_fill_input_buffer_with_packet,                   /* S/W MPEG4 Decoder Vtable */
                                                                &__mc_fill_vdec_packet_with_output_buffer};
 
-int(*vdec_h264_hw_vtable[])() = {&__mc_fill_input_buffer_with_packet,                  /* H/W H.264 Decoder Vtable */
+static int(*vdec_h264_hw_vtable[])() = {&__mc_fill_input_buffer_with_packet,                   /* H/W H.264 Decoder Vtable */
                                                                &__mc_fill_vdec_packet_with_output_buffer};
 
-int(*vdec_mpeg4_hw_vtable[])() = {&__mc_fill_input_buffer_with_packet,                 /* H/W MPEG4 Decoder Vtable */
+static int(*vdec_mpeg4_hw_vtable[])() = {&__mc_fill_input_buffer_with_packet,                  /* H/W MPEG4 Decoder Vtable */
                                                                &__mc_fill_vdec_packet_with_output_buffer};
 
-int(*vdec_h263_hw_vtable[])() = {&__mc_fill_input_buffer_with_packet,                  /* H/W MPEG4 Decoder Vtable */
+static int(*vdec_h263_hw_vtable[])() = {&__mc_fill_input_buffer_with_packet,                   /* H/W MPEG4 Decoder Vtable */
                                                                &__mc_fill_vdec_packet_with_output_buffer};
 
-int(*venc_mpeg4_sw_vtable[])() = {&__mc_fill_input_buffer_with_venc_packet,            /* S/W MPEG4 Encoder Vtable */
+static int(*venc_mpeg4_sw_vtable[])() = {&__mc_fill_input_buffer_with_venc_packet,             /* S/W MPEG4 Encoder Vtable */
                                                                &__mc_fill_venc_packet_with_output_buffer};
 
-int(*venc_h263_sw_vtable[])() = {&__mc_fill_input_buffer_with_venc_packet,             /* S/W MPEG4 Encoder Vtable */
+static int(*venc_h263_sw_vtable[])() = {&__mc_fill_input_buffer_with_venc_packet,              /* S/W MPEG4 Encoder Vtable */
                                                                &__mc_fill_venc_packet_with_output_buffer};
 
-int(*venc_h264_hw_vtable[])() = {&__mc_fill_input_buffer_with_venc_packet,             /* H/W H.264 Encoder Vtable */
+static int(*venc_h264_hw_vtable[])() = {&__mc_fill_input_buffer_with_venc_packet,              /* H/W H.264 Encoder Vtable */
                                                                &__mc_fill_venc_packet_with_output_buffer};
 
-int(*venc_mpeg4_hw_vtable[])() = {&__mc_fill_input_buffer_with_venc_packet,            /* H/W MPEG4 Encoder Vtable */
+static int(*venc_mpeg4_hw_vtable[])() = {&__mc_fill_input_buffer_with_venc_packet,             /* H/W MPEG4 Encoder Vtable */
                                                                &__mc_fill_venc_packet_with_output_buffer};
 
-int(*venc_h263_hw_vtable[])() = {&__mc_fill_input_buffer_with_venc_packet,             /* H/W MPEG4 Encoder Vtable */
+static int(*venc_h263_hw_vtable[])() = {&__mc_fill_input_buffer_with_venc_packet,              /* H/W MPEG4 Encoder Vtable */
                                                                &__mc_fill_venc_packet_with_output_buffer};
 
-int(*aenc_vtable[])() = {&__mc_fill_input_buffer_with_packet, &__mc_fill_packet_with_output_buffer};
-int(*adec_vtable[])() = {&__mc_fill_input_buffer_with_packet, &__mc_fill_packet_with_output_buffer};
+__attribute__((unused))
+static int(*aenc_vtable[])() = {&__mc_fill_input_buffer_with_packet, &__mc_fill_packet_with_output_buffer};
 
-int(*aenc_aac_vtable[])() = {&__mc_fill_input_buffer_with_packet,                    /* AAC LC Encoder vtable */
+static int(*adec_vtable[])() = {&__mc_fill_input_buffer_with_packet, &__mc_fill_packet_with_output_buffer};
+
+static int(*aenc_aac_vtable[])() = {&__mc_fill_input_buffer_with_packet,                    /* AAC LC Encoder vtable */
                                                        &__mc_fill_aenc_packet_with_output_buffer};
 
-int(*adec_aac_vtable[])() = {&__mc_fill_input_buffer_with_adec_packet,               /* AAC LC Decoder Vtable */
+static int(*adec_aac_vtable[])() = {&__mc_fill_input_buffer_with_adec_packet,               /* AAC LC Decoder Vtable */
                                                        &__mc_fill_packet_with_output_buffer};
 
-int(*adec_aacv12_vtable[])() = {&__mc_fill_input_buffer_with_adec_packet,            /* AAC HE Decoder Vtable */
+static int(*adec_aacv12_vtable[])() = {&__mc_fill_input_buffer_with_adec_packet,            /* AAC HE Decoder Vtable */
                                                        &__mc_fill_packet_with_output_buffer};
 
-int(*adec_mp3_vtable[])() = {&__mc_fill_input_buffer_with_packet,                    /* MP3 Decoder Vtable */
+static int(*adec_mp3_vtable[])() = {&__mc_fill_input_buffer_with_packet,                    /* MP3 Decoder Vtable */
                                                        &__mc_fill_packet_with_output_buffer};
 
-int(*adec_amrnb_vtable[])() = {&__mc_fill_input_buffer_with_packet,                  /* AMR-NB Decoder Vtable */
+static int(*adec_amrnb_vtable[])() = {&__mc_fill_input_buffer_with_packet,                  /* AMR-NB Decoder Vtable */
                                                        &__mc_fill_packet_with_output_buffer};
 
-int(*adec_amrwb_vtable[])() = {&__mc_fill_input_buffer_with_packet,                  /* AMR-WB Decoder Vtable */
+static int(*adec_amrwb_vtable[])() = {&__mc_fill_input_buffer_with_packet,                  /* AMR-WB Decoder Vtable */
                                                        &__mc_fill_packet_with_output_buffer};
 
-int(*aenc_amrnb_vtable[])() = {&__mc_fill_input_buffer_with_packet,                  /* AMR-NB Encoder Vtable */
+static int(*aenc_amrnb_vtable[])() = {&__mc_fill_input_buffer_with_packet,                  /* AMR-NB Encoder Vtable */
                                                        &__mc_fill_packet_with_output_buffer};
 
-int(*adec_vorbis_vtable[])() = {&__mc_fill_input_buffer_with_packet,                 /* VORBIS Decoder Vtable */
+static int(*adec_vorbis_vtable[])() = {&__mc_fill_input_buffer_with_packet,                 /* VORBIS Decoder Vtable */
                                                        &__mc_fill_packet_with_output_buffer};
 
-int(*adec_flac_vtable[])() = {&__mc_fill_input_buffer_with_packet,                   /* FLAC Decoder Vtable */
+static int(*adec_flac_vtable[])() = {&__mc_fill_input_buffer_with_packet,                   /* FLAC Decoder Vtable */
                                                        &__mc_fill_packet_with_output_buffer};
 
-int(*adec_wma_vtable[])() = {&__mc_fill_input_buffer_with_packet,                    /* WMA Decoder Vtable */
+static int(*adec_wma_vtable[])() = {&__mc_fill_input_buffer_with_packet,                    /* WMA Decoder Vtable */
                                                        &__mc_fill_packet_with_output_buffer};
 
-int(*aenc_opus_vtable[])() =  {&__mc_fill_input_buffer_with_packet,                  /* Opus Encoder Vtable */
+static int(*aenc_opus_vtable[])() =  {&__mc_fill_input_buffer_with_packet,                  /* Opus Encoder Vtable */
                                                        &__mc_fill_aenc_packet_with_output_buffer};
 
 #define MEDIACODEC_ELEMENT_SET_STATE(x_element, x_state)                                          \