From 22110e427514ddedbc9daee7cdcef54918d04f88 Mon Sep 17 00:00:00 2001 From: Norbert Schlia Date: Wed, 7 Aug 2024 22:00:08 +0200 Subject: [PATCH] Refactoring: preloading static variables --- src/ffmpegfs.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ffmpegfs.cc b/src/ffmpegfs.cc index 68d0a57f..0a0441c6 100644 --- a/src/ffmpegfs.cc +++ b/src/ffmpegfs.cc @@ -452,7 +452,7 @@ typedef std::map VIDEOCODEC_MAP; /** * @brief List of audio codecs */ -static const AUDIOCODEC_MAP audiocodec_map = +static const AUDIOCODEC_MAP audiocodec_map { { "AAC", AV_CODEC_ID_AAC }, // TS, MP4, MOV, MKV { "AC3", AV_CODEC_ID_AC3 }, // MP4, MOV, MKV @@ -469,7 +469,7 @@ static const AUDIOCODEC_MAP audiocodec_map = /** * @brief List of video codecs */ -static const VIDEOCODEC_MAP videocodec_map = +const static VIDEOCODEC_MAP videocodec_map { { "MPEG1", AV_CODEC_ID_MPEG1VIDEO }, // TS, MP4, MKV { "MPEG2", AV_CODEC_ID_MPEG2VIDEO }, // TS, MP4, MKV @@ -484,7 +484,7 @@ static const VIDEOCODEC_MAP videocodec_map = /** * List of AUTOCOPY options */ -static const AUTOCOPY_MAP autocopy_map = +static const AUTOCOPY_MAP autocopy_map { { "OFF", AUTOCOPY_OFF }, { "MATCH", AUTOCOPY_MATCH }, @@ -496,7 +496,7 @@ static const AUTOCOPY_MAP autocopy_map = /** * List if MP4 profiles */ -static const PROFILE_MAP profile_map = +static const PROFILE_MAP profile_map { { "NONE", PROFILE_DEFAULT }, @@ -516,7 +516,7 @@ static const PROFILE_MAP profile_map = /** * List if ProRes levels. */ -static const LEVEL_MAP prores_level_map = +static const LEVEL_MAP prores_level_map { // ProRes { "PROXY", PRORESLEVEL_PRORES_PROXY }, @@ -528,7 +528,7 @@ static const LEVEL_MAP prores_level_map = /** * List if recode options. */ -static const RECODESAME_MAP recode_map = +static const RECODESAME_MAP recode_map { // Recode to same format { "NO", RECODESAME_NO }, @@ -543,7 +543,7 @@ static const RECODESAME_MAP recode_map = * in build_device_type_list() by asking the FFmpeg API for the proper * type. */ -static HWACCEL_MAP hwaccel_map = +static HWACCEL_MAP hwaccel_map { { "NONE", { true, HWACCELAPI_NONE, AV_HWDEVICE_TYPE_NONE } }, @@ -590,7 +590,7 @@ static HWACCEL_MAP hwaccel_map = /** * List of AUTOCOPY options */ -static const CODEC_MAP hwaccel_codec_map = +static const CODEC_MAP hwaccel_codec_map { { "H263", AV_CODEC_ID_H263 }, { "H264", AV_CODEC_ID_H264 }, @@ -606,7 +606,7 @@ static const CODEC_MAP hwaccel_codec_map = /** * List of sample formats. */ -static const SAMPLE_FMT_MAP sample_fmt_map = +static const SAMPLE_FMT_MAP sample_fmt_map { { "0", SAMPLE_FMT_DONTCARE }, { "8", SAMPLE_FMT_8 },