From 08fbe168b81e594d922e3fc93d631e51a79403e6 Mon Sep 17 00:00:00 2001 From: "jiyong.min" Date: Wed, 18 Sep 2019 09:25:12 +0900 Subject: [PATCH] Update global variable to static Change-Id: Iad7002eb2932136ead5609d767620cc704d8f005 --- codecs/ffmpeg/mm_file_codecs.c | 2 +- formats/ffmpeg/mm_file_format_aac.c | 2 +- formats/ffmpeg/mm_file_format_amr.c | 2 +- mm_file.c | 20 ++++++++++---------- utils/mm_file_util_io.c | 2 +- utils/mm_file_util_mime.c | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) mode change 100755 => 100644 codecs/ffmpeg/mm_file_codecs.c mode change 100755 => 100644 formats/ffmpeg/mm_file_format_aac.c mode change 100755 => 100644 formats/ffmpeg/mm_file_format_amr.c mode change 100755 => 100644 utils/mm_file_util_io.c mode change 100755 => 100644 utils/mm_file_util_mime.c diff --git a/codecs/ffmpeg/mm_file_codecs.c b/codecs/ffmpeg/mm_file_codecs.c old mode 100755 new mode 100644 index 7186aa0..8dbb70a --- a/codecs/ffmpeg/mm_file_codecs.c +++ b/codecs/ffmpeg/mm_file_codecs.c @@ -26,7 +26,7 @@ #include "mm_file_utils.h" #include "mm_file_codec_private.h" -int (*OpenVideoCodecFunc[MM_VIDEO_CODEC_NUM]) (MMFileCodecContext *codecContext, MMFileCodecFrame *input) = { +static int (*OpenVideoCodecFunc[MM_VIDEO_CODEC_NUM]) (MMFileCodecContext *codecContext, MMFileCodecFrame *input) = { mmfile_codec_open_dummy, /* NONE */ mmfile_codec_open_dummy, /* WMV */ mmfile_codec_open_dummy, /* H261 */ diff --git a/formats/ffmpeg/mm_file_format_aac.c b/formats/ffmpeg/mm_file_format_aac.c old mode 100755 new mode 100644 index f4ca077..a9bcab8 --- a/formats/ffmpeg/mm_file_format_aac.c +++ b/formats/ffmpeg/mm_file_format_aac.c @@ -86,7 +86,7 @@ typedef struct _mmfile_aac_handle { /*Index table for Sampling frequency */ -const int Sampling_freq_table[16] = { 96000, 88200, 64000, 48000, +static const int Sampling_freq_table[16] = { 96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 0, 0, 0, 0 diff --git a/formats/ffmpeg/mm_file_format_amr.c b/formats/ffmpeg/mm_file_format_amr.c old mode 100755 new mode 100644 index 9c98fbd..04d3234 --- a/formats/ffmpeg/mm_file_format_amr.c +++ b/formats/ffmpeg/mm_file_format_amr.c @@ -91,7 +91,7 @@ typedef struct _mmfile_amr_mode_config { /*RTP format only supported*/ /*mode vs bitRate-frameSize lookup table; [0]->AMR-NB [1]->AMR-WB */ -const tAmrModeConfig AmrModeConfigTable[2][16] = { +static const tAmrModeConfig AmrModeConfigTable[2][16] = { { {4750, 13}, {5150, 14}, {5900, 16}, {6700, 18}, {7400, 20}, {7950, 21}, {10200, 27}, {12200, 32}, diff --git a/mm_file.c b/mm_file.c index 532c314..13212e6 100644 --- a/mm_file.c +++ b/mm_file.c @@ -180,16 +180,16 @@ static MMAttrsConstructInfo g_content_attrs[] = { #define MMFILE_FORMAT_SO_FILE_NAME LIBDIR"/libmmfile_formats.so" #define MMFILE_CODEC_SO_FILE_NAME LIBDIR"/libmmfile_codecs.so" -int (*mmfile_format_open)(MMFileFormatContext **formatContext, MMFileSourceType *fileSrc); -int (*mmfile_format_read_stream)(MMFileFormatContext *formatContext); -int (*mmfile_format_read_frame)(MMFileFormatContext *formatContext, unsigned int timestamp, MMFileFormatFrame *frame); -int (*mmfile_format_read_tag)(MMFileFormatContext *formatContext); -int (*mmfile_format_close)(MMFileFormatContext *formatContext); -int (*mmfile_codec_open)(MMFileCodecContext **codecContext, int codecType, int codecId, MMFileCodecFrame *input); -int (*mmfile_codec_decode)(MMFileCodecContext *codecContext, MMFileCodecFrame *output); -int (*mmfile_codec_close)(MMFileCodecContext *codecContext); -int (*mmfile_format_get_frame)(const char *path, double timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height); -int (*mmfile_format_get_frame_from_memory)(const void *data, unsigned int datasize, double timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height); +static int (*mmfile_format_open)(MMFileFormatContext **formatContext, MMFileSourceType *fileSrc); +static int (*mmfile_format_read_stream)(MMFileFormatContext *formatContext); +static int (*mmfile_format_read_frame)(MMFileFormatContext *formatContext, unsigned int timestamp, MMFileFormatFrame *frame); +static int (*mmfile_format_read_tag)(MMFileFormatContext *formatContext); +static int (*mmfile_format_close)(MMFileFormatContext *formatContext); +static int (*mmfile_codec_open)(MMFileCodecContext **codecContext, int codecType, int codecId, MMFileCodecFrame *input); +static int (*mmfile_codec_decode)(MMFileCodecContext *codecContext, MMFileCodecFrame *output); +static int (*mmfile_codec_close)(MMFileCodecContext *codecContext); +static int (*mmfile_format_get_frame)(const char *path, double timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height); +static int (*mmfile_format_get_frame_from_memory)(const void *data, unsigned int datasize, double timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height); #endif #ifdef __MMFILE_DYN_LOADING__ diff --git a/utils/mm_file_util_io.c b/utils/mm_file_util_io.c old mode 100755 new mode 100644 index dbc59be..98ae703 --- a/utils/mm_file_util_io.c +++ b/utils/mm_file_util_io.c @@ -92,7 +92,7 @@ inline float mmfile_io_be_float32(float value) return (is_little_endian == 0) ? value : *result; } -MMFileIOFunc *first_io_func = NULL; +static MMFileIOFunc *first_io_func = NULL; static int _mmfile_open(MMFileIOHandle **handle, struct MMFileIOFunc *Func, const char *filename, int flags) { diff --git a/utils/mm_file_util_mime.c b/utils/mm_file_util_mime.c old mode 100755 new mode 100644 index e868df2..85d8199 --- a/utils/mm_file_util_mime.c +++ b/utils/mm_file_util_mime.c @@ -30,7 +30,7 @@ typedef struct _mmfileavmimetype { char extension[MMFILE_FILE_EXT_MAX_LEN]; } MMFileAVMimeType; -const MMFileAVMimeType MMFILE_FFMPEG_MIME_TABLE[] = { +static const MMFileAVMimeType MMFILE_FFMPEG_MIME_TABLE[] = { {"audio/mpeg", "mp3", "mp3"}, {"audio/mp3", "mp3", "mp3"}, {"audio/mpg3", "mp3", "mp3"}, -- 2.7.4