summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-04-20 04:48:23 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-04-20 04:48:23 +0200
commitefb5fa79f5ca34140db357a00c999286097ab53e (patch)
tree16cc9f34b25abc571f7a9915ff98ff2bb787203c /libavcodec/avcodec.h
parentf92b0084c0e02b3c816a9eb234c548487acadae8 (diff)
parent31d76ec2883c04d29d1f173ea99e605a6936613a (diff)
Merge remote branch 'qatar/master'
* qatar/master: (37 commits) In avcodec_open(), set return code to an error value only when an error occurs instead of unconditionally at the start of the function. lavc: remove reference to opt.h from Makefile. prefer avio_check() over url_exist() avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols lavu: remove misc disabled cruft lavu: remove FF_API_OLD_IMAGE_NAMES cruft NOT PULLED lavu: remove FF_API_OLD_EVAL_NAMES cruft lavc: remove misc disabled cruft. lavc: remove the FF_API_INOFFICIAL cruft. lavc: remove the FF_API_SET_STRING_OLD cruft. lavc: remove the FF_API_USE_LPC cruft. lavc: remove the FF_API_SUBTITLE_OLD cruft. lavc: remove the FF_API_VIDEO_OLD cruft. lavc: remove the FF_API_AUDIO_OLD cruft. lavc: remove the FF_API_OPT_SHOW cruft. lavc: remove the FF_API_MM_FLAGS cruft. lavf: remove misc disabled cruft. lavf: remove FF_API_INDEX_BUILT cruft lavf: remove FF_API_URL_CLASS cruft. lavf: remove FF_API_SYMVER cruft ... Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h201
1 files changed, 2 insertions, 199 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 33ae03121b..dd1dd6bf3b 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -33,12 +33,6 @@
#include "libavcodec/version.h"
-#if LIBAVCODEC_VERSION_MAJOR < 53
-# define FF_INTERNALC_MEM_TYPE unsigned int
-#else
-# define FF_INTERNALC_MEM_TYPE size_t
-#endif
-
/**
* Identify the syntax and semantics of the bitstream.
* The principle is roughly:
@@ -117,9 +111,6 @@ enum CodecID {
CODEC_ID_QDRAW,
CODEC_ID_VIXL,
CODEC_ID_QPEG,
-#if LIBAVCODEC_VERSION_MAJOR < 53
- CODEC_ID_XVID,
-#endif
CODEC_ID_PNG,
CODEC_ID_PPM,
CODEC_ID_PBM,
@@ -366,18 +357,6 @@ enum CodecID {
CODEC_ID_FFMETADATA=0x21000, ///< Dummy codec for streams containing only metadata information.
};
-#if LIBAVCODEC_VERSION_MAJOR < 53
-#define CodecType AVMediaType
-
-#define CODEC_TYPE_UNKNOWN AVMEDIA_TYPE_UNKNOWN
-#define CODEC_TYPE_VIDEO AVMEDIA_TYPE_VIDEO
-#define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO
-#define CODEC_TYPE_DATA AVMEDIA_TYPE_DATA
-#define CODEC_TYPE_SUBTITLE AVMEDIA_TYPE_SUBTITLE
-#define CODEC_TYPE_ATTACHMENT AVMEDIA_TYPE_ATTACHMENT
-#define CODEC_TYPE_NB AVMEDIA_TYPE_NB
-#endif
-
#if FF_API_OLD_SAMPLE_FMT
#define SampleFormat AVSampleFormat
@@ -1112,9 +1091,6 @@ typedef struct AVPacket {
int64_t convergence_duration;
} AVPacket;
#define AV_PKT_FLAG_KEY 0x0001
-#if LIBAVCODEC_VERSION_MAJOR < 53
-#define PKT_FLAG_KEY AV_PKT_FLAG_KEY
-#endif
/**
* Audio Video Frame.
@@ -1289,9 +1265,6 @@ typedef struct AVCodecContext {
*/
int frame_size;
int frame_number; ///< audio or video frame number
-#if LIBAVCODEC_VERSION_MAJOR < 53
- int real_pict_num; ///< Returns the real picture number of previous encoded frame.
-#endif
/**
* Number of frames the decoded output will be delayed relative to
@@ -1476,9 +1449,6 @@ typedef struct AVCodecContext {
#define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the spec or reference software.
#define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter what consequences.
#define FF_COMPLIANCE_NORMAL 0
-#if FF_API_INOFFICIAL
-#define FF_COMPLIANCE_INOFFICIAL -1 ///< Allow inofficial extensions (deprecated - use FF_COMPLIANCE_UNOFFICIAL instead).
-#endif
#define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions
#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.
@@ -1752,25 +1722,6 @@ typedef struct AVCodecContext {
*/
unsigned dsp_mask;
-#if FF_API_MM_FLAGS
-#define FF_MM_FORCE AV_CPU_FLAG_FORCE
-#define FF_MM_MMX AV_CPU_FLAG_MMX
-#define FF_MM_3DNOW AV_CPU_FLAG_3DNOW
-#define FF_MM_MMXEXT AV_CPU_FLAG_MMX2
-#define FF_MM_MMX2 AV_CPU_FLAG_MMX2
-#define FF_MM_SSE AV_CPU_FLAG_SSE
-#define FF_MM_SSE2 AV_CPU_FLAG_SSE2
-#define FF_MM_SSE2SLOW AV_CPU_FLAG_SSE2SLOW
-#define FF_MM_3DNOWEXT AV_CPU_FLAG_3DNOWEXT
-#define FF_MM_SSE3 AV_CPU_FLAG_SSE3
-#define FF_MM_SSE3SLOW AV_CPU_FLAG_SSE3SLOW
-#define FF_MM_SSSE3 AV_CPU_FLAG_SSSE3
-#define FF_MM_SSE4 AV_CPU_FLAG_SSE4
-#define FF_MM_SSE42 AV_CPU_FLAG_SSE42
-#define FF_MM_IWMMXT AV_CPU_FLAG_IWMMXT
-#define FF_MM_ALTIVEC AV_CPU_FLAG_ALTIVEC
-#endif
-
/**
* bits per sample/pixel from the demuxer (needed for huffyuv).
* - encoding: Set by libavcodec.
@@ -2562,16 +2513,6 @@ typedef struct AVCodecContext {
int compression_level;
#define FF_COMPRESSION_DEFAULT -1
-#if FF_API_USE_LPC
- /**
- * Sets whether to use LPC mode - used by FLAC encoder.
- * - encoding: Set by user.
- * - decoding: unused
- * @deprecated Deprecated in favor of lpc_type and lpc_passes.
- */
- int use_lpc;
-#endif
-
/**
* LPC coefficient precision - used by FLAC encoder
* - encoding: Set by user.
@@ -3269,14 +3210,6 @@ struct AVResampleContext;
typedef struct ReSampleContext ReSampleContext;
-#if FF_API_AUDIO_OLD
-/**
- * @deprecated Use av_audio_resample_init() instead.
- */
-attribute_deprecated ReSampleContext *audio_resample_init(int output_channels, int input_channels,
- int output_rate, int input_rate);
-#endif
-
/**
* Initialize audio resampling context.
*
@@ -3436,23 +3369,6 @@ const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt);
void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
-#if LIBAVCODEC_VERSION_MAJOR < 53
-/**
- * Return the pixel format corresponding to the name name.
- *
- * If there is no pixel format with name name, then look for a
- * pixel format with the name corresponding to the native endian
- * format of name.
- * For example in a little-endian system, first look for "gray16",
- * then for "gray16le".
- *
- * Finally if no pixel format has been found, return PIX_FMT_NONE.
- *
- * @deprecated Deprecated in favor of av_get_pix_fmt().
- */
-attribute_deprecated enum PixelFormat avcodec_get_pix_fmt(const char* name);
-#endif
-
/**
* Return a value representing the fourCC code associated to the
* pixel format pix_fmt, or 0 if no associated fourCC code can be
@@ -3521,14 +3437,6 @@ int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_
enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelFormat src_pix_fmt,
int has_alpha, int *loss_ptr);
-#if LIBAVCODEC_VERSION_MAJOR < 53
-/**
- * @deprecated Use av_get_pix_fmt_string() instead.
- */
-attribute_deprecated
-void avcodec_pix_fmt_string (char *buf, int buf_size, enum PixelFormat pix_fmt);
-#endif
-
#define FF_ALPHA_TRANSP 0x0001 /* image has some totally transparent pixels */
#define FF_ALPHA_SEMI_TRANSP 0x0002 /* image has some transparent pixels */
@@ -3579,13 +3487,6 @@ const char *avcodec_license(void);
*/
void avcodec_init(void);
-#if LIBAVCODEC_VERSION_MAJOR < 53
-/**
- * @deprecated Deprecated in favor of avcodec_register().
- */
-attribute_deprecated void register_avcodec(AVCodec *codec);
-#endif
-
/**
* Register the codec codec and initialize libavcodec.
*
@@ -3730,24 +3631,8 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
int linesize_align[4]);
-#if LIBAVCODEC_VERSION_MAJOR < 53
-/**
- * @deprecated Deprecated in favor of av_check_image_size().
- */
-attribute_deprecated
-int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h);
-#endif
-
enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt);
-#if LIBAVCODEC_VERSION_MAJOR < 53
-/**
- * @deprecated Set s->thread_count before calling avcodec_open() instead of calling this.
- */
-attribute_deprecated
-int avcodec_thread_init(AVCodecContext *s, int thread_count);
-void avcodec_thread_free(AVCodecContext *s);
-#endif
int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
//FIXME func typedef
@@ -3781,25 +3666,6 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2,
*/
int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
-#if FF_API_AUDIO_OLD
-/**
- * Decode an audio frame from buf into samples.
- * Wrapper function which calls avcodec_decode_audio3.
- *
- * @deprecated Use avcodec_decode_audio3 instead.
- * @param avctx the codec context
- * @param[out] samples the output buffer
- * @param[in,out] frame_size_ptr the output buffer size in bytes
- * @param[in] buf the input buffer
- * @param[in] buf_size the input buffer size in bytes
- * @return On error a negative value is returned, otherwise the number of bytes
- * used or zero if no frame could be decompressed.
- */
-attribute_deprecated int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
- int *frame_size_ptr,
- const uint8_t *buf, int buf_size);
-#endif
-
/**
* Decode the audio frame of size avpkt->size from avpkt->data into samples.
* Some decoders may support multiple frames in a single AVPacket, such
@@ -3843,25 +3709,6 @@ int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples,
int *frame_size_ptr,
AVPacket *avpkt);
-#if FF_API_VIDEO_OLD
-/**
- * Decode a video frame from buf into picture.
- * Wrapper function which calls avcodec_decode_video2.
- *
- * @deprecated Use avcodec_decode_video2 instead.
- * @param avctx the codec context
- * @param[out] picture The AVFrame in which the decoded video frame will be stored.
- * @param[in] buf the input buffer
- * @param[in] buf_size the size of the input buffer in bytes
- * @param[in,out] got_picture_ptr Zero if no frame could be decompressed, otherwise, it is nonzero.
- * @return On error a negative value is returned, otherwise the number of bytes
- * used or zero if no frame could be decompressed.
- */
-attribute_deprecated int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,
- int *got_picture_ptr,
- const uint8_t *buf, int buf_size);
-#endif
-
/**
* Decode the video frame of size avpkt->size from avpkt->data into picture.
* Some decoders may support multiple frames in a single AVPacket, such
@@ -3906,15 +3753,6 @@ int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
int *got_picture_ptr,
AVPacket *avpkt);
-#if FF_API_SUBTITLE_OLD
-/* Decode a subtitle message. Return -1 if error, otherwise return the
- * number of bytes used. If no subtitle could be decompressed,
- * got_sub_ptr is zero. Otherwise, the subtitle is stored in *sub. */
-attribute_deprecated int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub,
- int *got_sub_ptr,
- const uint8_t *buf, int buf_size);
-#endif
-
/**
* Decode a subtitle message.
* Return a negative value on error, otherwise return the number of bytes used.
@@ -4179,15 +4017,6 @@ AVCodecParser *av_parser_next(AVCodecParser *c);
void av_register_codec_parser(AVCodecParser *parser);
AVCodecParserContext *av_parser_init(int codec_id);
-#if LIBAVCODEC_VERSION_MAJOR < 53
-attribute_deprecated
-int av_parser_parse(AVCodecParserContext *s,
- AVCodecContext *avctx,
- uint8_t **poutbuf, int *poutbuf_size,
- const uint8_t *buf, int buf_size,
- int64_t pts, int64_t dts);
-#endif
-
/**
* Parse a packet.
*
@@ -4266,7 +4095,7 @@ AVBitStreamFilter *av_bitstream_filter_next(AVBitStreamFilter *f);
*
* @see av_realloc
*/
-void *av_fast_realloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_size);
+void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size);
/**
* Allocate a buffer, reusing the given one if large enough.
@@ -4280,17 +4109,7 @@ void *av_fast_realloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_s
* @param min_size minimum size of *ptr buffer after returning, *ptr will be NULL and
* *size 0 if an error occurred.
*/
-void av_fast_malloc(void *ptr, unsigned int *size, FF_INTERNALC_MEM_TYPE min_size);
-
-#if LIBAVCODEC_VERSION_MAJOR < 53
-/**
- * @deprecated Deprecated in favor of av_image_copy().
- */
-attribute_deprecated
-void av_picture_data_copy(uint8_t *dst_data[4], int dst_linesize[4],
- uint8_t *src_data[4], int src_linesize[4],
- enum PixelFormat pix_fmt, int width, int height);
-#endif
+void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size);
/**
* Copy image src to dst. Wraps av_picture_data_copy() above.
@@ -4319,22 +4138,6 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width,
*/
unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
-#if LIBAVCODEC_VERSION_MAJOR < 53
-/**
- * Parse str and put in width_ptr and height_ptr the detected values.
- *
- * @deprecated Deprecated in favor of av_parse_video_size().
- */
-attribute_deprecated int av_parse_video_frame_size(int *width_ptr, int *height_ptr, const char *str);
-
-/**
- * Parse str and store the detected values in *frame_rate.
- *
- * @deprecated Deprecated in favor of av_parse_video_rate().
- */
-attribute_deprecated int av_parse_video_frame_rate(AVRational *frame_rate, const char *str);
-#endif
-
/**
* Logs a generic warning message about a missing feature. This function is
* intended to be used internally by FFmpeg (libavcodec, libavformat, etc.)