diff options
author | Clément Bœsch <ubitux@gmail.com> | 2013-01-07 18:08:56 +0100 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2013-02-17 12:57:56 +0100 |
commit | f796399344a1bb2ecdf9e273ea62dfa53e33908a (patch) | |
tree | cfc347d5a603e14298a2290ee19943869b239cd8 /libavcodec/avcodec.h | |
parent | 8732271e4025ed4198055686228a62c1d4f1a8c7 (diff) | |
download | ffmpeg-f796399344a1bb2ecdf9e273ea62dfa53e33908a.tar.gz |
lavc: support subtitles character encoding conversion.
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index fc7091c16c..31298ae984 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3208,6 +3208,24 @@ typedef struct AVCodecContext { * - encoding: unused */ AVDictionary *metadata; + + /** + * Character encoding of the input subtitles file. + * - decoding: set by user + * - encoding: unused + */ + char *sub_charenc; + + /** + * Subtitles character encoding mode. Formats or codecs might be adjusting + * this setting (if they are doing the conversion themselves for instance). + * - decoding: set by libavcodec + * - encoding: unused + */ + int sub_charenc_mode; +#define FF_SUB_CHARENC_MODE_DO_NOTHING -1 ///< do nothing (demuxer outputs a stream supposed to be already in UTF-8, or the codec is bitmap for instance) +#define FF_SUB_CHARENC_MODE_AUTOMATIC 0 ///< libavcodec will select the mode itself +#define FF_SUB_CHARENC_MODE_PRE_DECODER 1 ///< the AVPacket data needs to be recoded to UTF-8 before being fed to the decoder, requires iconv } AVCodecContext; AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx); |