1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec: move lowres down with the next ABI bump and add accessors

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-05-03 11:32:04 +02:00
parent 88ef7f6d2b
commit 2ee29b5fb9
2 changed files with 18 additions and 0 deletions

View File

@ -2562,6 +2562,8 @@ typedef struct AVCodecContext {
* low resolution decoding, 1-> 1/2 size, 2->1/4 size * low resolution decoding, 1-> 1/2 size, 2->1/4 size
* - encoding: unused * - encoding: unused
* - decoding: Set by user. * - decoding: Set by user.
* Code outside libavcodec should access this field using:
* av_codec_{get,set}_lowres(avctx)
*/ */
int lowres; int lowres;
#endif #endif
@ -2814,6 +2816,17 @@ typedef struct AVCodecContext {
*/ */
const AVCodecDescriptor *codec_descriptor; const AVCodecDescriptor *codec_descriptor;
#if !FF_API_LOWRES
/**
* low resolution decoding, 1-> 1/2 size, 2->1/4 size
* - encoding: unused
* - decoding: Set by user.
* Code outside libavcodec should access this field using:
* av_codec_{get,set}_lowres(avctx)
*/
int lowres;
#endif
/** /**
* Current statistics for PTS correction. * Current statistics for PTS correction.
* - decoding: maintained and used by libavcodec, not intended to be used by user apps * - decoding: maintained and used by libavcodec, not intended to be used by user apps
@ -2841,6 +2854,7 @@ typedef struct AVCodecContext {
#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_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_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 #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; } AVCodecContext;
AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx); AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx);
@ -2849,6 +2863,9 @@ void av_codec_set_pkt_timebase (AVCodecContext *avctx, AVRational
const AVCodecDescriptor *av_codec_get_codec_descriptor(const AVCodecContext *avctx); const AVCodecDescriptor *av_codec_get_codec_descriptor(const AVCodecContext *avctx);
void av_codec_set_codec_descriptor(AVCodecContext *avctx, const AVCodecDescriptor *desc); void av_codec_set_codec_descriptor(AVCodecContext *avctx, const AVCodecDescriptor *desc);
int av_codec_get_lowres(const AVCodecContext *avctx);
void av_codec_set_lowres(AVCodecContext *avctx, int val);
/** /**
* AVProfile. * AVProfile.
*/ */

View File

@ -982,6 +982,7 @@ void avcodec_free_frame(AVFrame **frame)
MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase) MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase)
MAKE_ACCESSORS(AVCodecContext, codec, const AVCodecDescriptor *, codec_descriptor) MAKE_ACCESSORS(AVCodecContext, codec, const AVCodecDescriptor *, codec_descriptor)
MAKE_ACCESSORS(AVCodecContext, codec, int, lowres)
static void avcodec_get_subtitle_defaults(AVSubtitle *sub) static void avcodec_get_subtitle_defaults(AVSubtitle *sub)
{ {