[FFmpeg-devel] Suggestion for a centralized language-tag facility in libavformat
Michael Niedermayer
michaelni
Wed Apr 15 00:18:02 CEST 2009
On Tue, Apr 14, 2009 at 10:18:42PM +0200, cyril comparon wrote:
> Gee I didn't know I was _such_ a lousy developer!
> However, I was not excepting my patch to be applied as-is, since
> deeper reflection may be needed before adding this new facility.
>
> Please find enclosed :
>
> - avlanguage.patch, contains the two new files. They are not part of
> the public API any more. I rewrote the langage-tags table considering
> the exact standard
> (http://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt) and I kept
> the original item ordering. I renamed the potentially-public functions
> to av_xxx . I don't think it's a good idea to chop 1 byte per string
> in the table since it would prevent from returning string addresses as
> is. If you guys find the two columns "EnglishName" and "FrenchName"
> useless and ridiculously verbose, I don't mind getting rid of them
> (blame the ISO crew :). Changelog included in the patch.
yes please remove both english and french. i prefer none over 80+
char long names, that is not sane nor usefull (it could not even
be printed on a 80x25 terminal in one line)
[...]
> @@ -364,6 +365,32 @@
> end_header(pb, hpos);
> }
>
> + /* language list */
> + hpos = put_header(pb, &ff_asf_language_guid);
> + {
> + unsigned int streamsWithSupportedLang = 0;
> + for(n=0;n<s->nb_streams;n++) {
> + AVMetadataTag *lang_tag = av_metadata_get(s->streams[n]->metadata, "language", NULL, 0);
> + if (lang_tag) {
> + const char *language = av_langISO6392toISO6391(lang_tag->value);
> + if (language)
> + streamsWithSupportedLang++;
> + }
> + }
> + put_le16(pb, streamsWithSupportedLang);
> + }
trailing whitespace
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Avoid a single point of failure, be that a person or equipment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090415/22f0fa6c/attachment.pgp>
More information about the ffmpeg-devel
mailing list