[FFmpeg-devel] [PATCH 1/2] avformat/isom: update mov_mdhd_language_map
Zhao Zhili
quinkblack at foxmail.com
Sat Jun 27 12:02:26 EEST 2020
> On Jun 27, 2020, at 4:00 PM, Marton Balint <cus at passwd.hu> wrote:
>
>
>
> On Sat, 27 Jun 2020, Zhao Zhili wrote:
>
>> This is a map from 'Macintosh Language Codes' to 'ISO639-2/T'. Some items
>> in the map are ISO639-2/B, some are ISO639-1.
>
> Is this a functional change or a cosmetic change? If both, then seperate commits are preferred.
The patch is meant to be a functional change. Language names are added to make it a little easier
to review, but it's still hard to review a multi-column table. Is it better to first make the table
single-column, then modify the table items? (The multi-column to single-column change is still
hard to review and error-prone).
>
>>
>> German: ger => deu
>> Dutch: dut = nld
>> Swedish: sve => swe
>> Icelandic: ice => isl
>> Croatian: hr => hrv
>> Chinese: chi => zho
>> Faroese: fo => fao
>> Farsi/Persian: "" => fas
>> Flemish: "" => nld
>> Irish: iri => gle
>> Albanian: alb => sqi
>> Serbian: sr => srp
>> Macedonian: mac => mkd
>> Armenian: arm => hye
>> Georgian: geo => kat
>> MongolianCyr: "" => mon
>> Tibetan: tib => bod
>> Punjabi: pa => pan
>> Sinhala: "" => sin
>> Burmese: bur => mya
>> Kinyarwanda: "" => kin
>> Nyanja: "" => nya
>> Welsh: wel => cym
>> Basque: baq => eus
>> ---
>> libavformat/isom.c | 39 ++++++++++++++++++++++++---------------
>> 1 file changed, 24 insertions(+), 15 deletions(-)
>>
>> diff --git a/libavformat/isom.c b/libavformat/isom.c
>> index 44c7b13038..e34d3f2195 100644
>> --- a/libavformat/isom.c
>> +++ b/libavformat/isom.c
>> @@ -395,24 +395,33 @@ const AVCodecTag ff_codec_movdata_tags[] = {
>> /* http://developer.apple.com/documentation/mac/Text/Text-368.html */
>> /* deprecated by putting the code as 3*5 bits ASCII */
>> static const char mov_mdhd_language_map[][4] = {
>> - /* 0-9 */
>> - "eng", "fra", "ger", "ita", "dut", "sve", "spa", "dan", "por", "nor",
>> - "heb", "jpn", "ara", "fin", "gre", "ice", "mlt", "tur", "hr "/*scr*/, "chi"/*ace?*/,
>> - "urd", "hin", "tha", "kor", "lit", "pol", "hun", "est", "lav", "",
>> - "fo ", "", "rus", "chi", "", "iri", "alb", "ron", "ces", "slk",
>> - "slv", "yid", "sr ", "mac", "bul", "ukr", "bel", "uzb", "kaz", "aze",
>> - /*?*/
>> - "aze", "arm", "geo", "mol", "kir", "tgk", "tuk", "mon", "", "pus",
>> - "kur", "kas", "snd", "tib", "nep", "san", "mar", "ben", "asm", "guj",
>> - "pa ", "ori", "mal", "kan", "tam", "tel", "", "bur", "khm", "lao",
>> - /* roman? arabic? */
>> + /* 0: [English] [French] [German] [Italian] [Dutch] [Swedish] [Spanish] [Danish] [Portuguese] [Norwegian] */
>> + "eng", "fra", "deu", "ita", "nld", "swe", "spa", "dan", "por", "nor",
>
> If you want to comment the full name of the languages then I suggest you to use inline comments ( "heb" /* Hebrew */), because this mix of descriptions and languages is defeating the whole point of readability... If the lines become too long then either change the struct to 5 entries per line, or a single entry per line may be even better.
>
> Regards,
> Marton
>
>> + /* 10: [Hebrew] [Japanese] [Arabic] [Finnish] [Greek] [Icelandic] [Maltese] [Turkish] [Croatian] [Traditional Chinese] */
>> + "heb", "jpn", "ara", "fin", "gre", "isl", "mlt", "tur", "hrv", "zho",
>> + /* 20: [Urdu] [Hindi] [Thai] [Korean] [Lithuanian] [Polish] [Hungarian] [Estonian] [Latvian] [Sami] */
>> + "urd", "hin", "tha", "kor", "lit", "pol", "hun", "est", "lav", "",
>> + /* 30: [Faroese] [Farsi/Persian] [Russian] [Simplified Chinese] [Flemish] [Irish] [Albanian] [Romanian] [Czech] [Slovak] */
>> + "fao", "fas", "rus", "zho", "nld", "gle", "sqi", "ron", "ces", "slk",
>> + /* 40: [Slovenian] [Yiddish] [Serbian] [Macedonian] [Bulgarian] [Ukrainian] [Belarusian] [Uzbek] [Kazakh] [Azerbaijani] */
>> + "slv", "yid", "srp", "mkd", "bul", "ukr", "bel", "uzb", "kaz", "aze",
>> + /* 50: [AzerbaijanAr] [Armenian] [Georgian] [Moldavian] [Kirghiz] [Tajiki] [Turkmen] [Mongolian] [MongolianCyr] [Pashto] */
>> + "aze", "hye", "kat", "mol", "kir", "tgk", "tuk", "mon", "mon", "pus",
>> + /* 60: [Kurdish] [Kashmiri] [Sindhi] [Tibetan] [Nepali] [Sanskrit] [Marathi] [Bengali] [Assamese] [Gujarati] */
>> + "kur", "kas", "snd", "bod", "nep", "san", "mar", "ben", "asm", "guj",
>> + /* 70: [Punjabi] [Oriya] [Malayalam] [Kannada] [Tamil] [Telugu] [Sinhala] [Burmese] [Khmer] [Lao] */
>> + "pan", "ori", "mal", "kan", "tam", "tel", "sin", "mya", "khm", "lao",
>> + /* 80: [Vietnamese] [Indonesian] [Tagalog] [MalayRoman] [MalayArabic] [Amharic] [Galla] [Oromo] [Somali] [Swahili] */
>> "vie", "ind", "tgl", "may", "may", "amh", "tir", "orm", "som", "swa",
>> - /*==rundi?*/
>> - "", "run", "", "mlg", "epo", "", "", "", "", "",
>> - /* 100 */
>> + /* 90: [Kinyarwanda] [Rundi] [nya] [Malagasy] [Esperanto] */
>> + "kin", "run", "nya", "mlg", "epo", "", "", "", "", "",
>> + /* 100: */
>> "", "", "", "", "", "", "", "", "", "",
>> + /* 110: */
>> "", "", "", "", "", "", "", "", "", "",
>> - "", "", "", "", "", "", "", "", "wel", "baq",
>> + /* 120: [Welsh] [Basque] */
>> + "", "", "", "", "", "", "", "", "cym", "eus",
>> + /* 130: [Catalan] [Latin] [Quechua] [Guarani] [Aymara] [Tatar] [Uighur] [Dzongkha] [JavaneseRom] */
>> "cat", "lat", "que", "grn", "aym", "tat", "uig", "dzo", "jav"
>> };
>> --
>> 2.25.1
>>
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list