diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-28 17:52:45 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-02 22:56:03 +0200 |
commit | 5082fcc0e2c899484534637544463effbf50d9d1 (patch) | |
tree | 43babc8647191221210ba46f0bb902560fea3bee /libavformat/avformat.h | |
parent | f4aec348056cf9602fc853d2606835c49443d6df (diff) | |
download | ffmpeg-5082fcc0e2c899484534637544463effbf50d9d1.tar.gz |
avformat: add support to force specific AVCodecs
previously only codec_ids could be forced, which did not allow
forcing a specific implementation like libopenjpeg vs jpeg2000.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index b18eb3f545..4e5683c66a 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1315,9 +1315,39 @@ typedef struct AVFormatContext { * Demuxers can use the flag to detect such changes. */ int io_repositioned; + + /** + * Forced video codec. + * This allows forcing a specific decoder, even when there are multiple with + * the same codec_id. + * Demuxing: Set by user via av_format_set_video_codec (NO direct access). + */ + AVCodec *video_codec; + + /** + * Forced audio codec. + * This allows forcing a specific decoder, even when there are multiple with + * the same codec_id. + * Demuxing: Set by user via av_format_set_audio_codec (NO direct access). + */ + AVCodec *audio_codec; + + /** + * Forced subtitle codec. + * This allows forcing a specific decoder, even when there are multiple with + * the same codec_id. + * Demuxing: Set by user via av_format_set_subtitle_codec (NO direct access). + */ + AVCodec *subtitle_codec; } AVFormatContext; int av_format_get_probe_score(const AVFormatContext *s); +AVCodec * av_format_get_video_codec(const AVFormatContext *s); +void av_format_set_video_codec(AVFormatContext *s, AVCodec *c); +AVCodec * av_format_get_audio_codec(const AVFormatContext *s); +void av_format_set_audio_codec(AVFormatContext *s, AVCodec *c); +AVCodec * av_format_get_subtitle_codec(const AVFormatContext *s); +void av_format_set_subtitle_codec(AVFormatContext *s, AVCodec *c); /** * Returns the method used to set ctx->duration. |