[FFmpeg-devel] Suggestion for a centralized language-tag facility in libavformat

cyril comparon cyril.comparon
Fri Apr 10 19:33:16 CEST 2009


Hi ffmpeg crew,

I recently hacked a little on libavformat to implement :
- some (documented) helper functions grouped into a brand new
libavformat/avlanguages.h / .c, namely :
    - const char *avlanguage_ISO6392toISO6391(const char *lang)
    - const char *avlanguage_ISO6392toHumanReadable(const char *lang)
    - const char *avlanguage_ISO6391toISO6392(const char *lang)
    (please note these helpers are centered on the ISO639-2 code
space, which is libavformat frontend's language representation)
- extraction of per-stream language tag from ASF files (in asfdec.c)
using the above helpers
- storage of per-stream language tag in ASF files (in asfenc.c) using
the above helpers

Everyone supporting or writing muxers/demuxers would be welcome to use
these helpers (and maybe enrich it with new language code spaces if
needed by a specific container format).

In case ffmpeg developers would be ready to accept this patch, there
would be a bit of work in the frontend (e.g. regarding localized
metadata management) to migrate to this new facility, and in
container-specific backends (to get rid of private code-space
converters and add language management where it is lacking).

Anyone interested can have a look at the enclosed patch file.
Happy hacking,
Cyril Comparon
Resonate-MP4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avlanguages.patch
Type: application/octet-stream
Size: 31978 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090410/b480a5a1/attachment.obj>



More information about the ffmpeg-devel mailing list