static const OptionDef options[];
#define MAX_FILES 100
- #if !FF_API_MAX_STREAMS
#define MAX_STREAMS 1024 /* arbitrary sanity check value */
- #endif
-#define FFM_PACKET_SIZE 4096 //XXX a duplicate of the line in ffm.h
-
static const char *last_asked_format = NULL;
static AVFormatContext *input_files[MAX_FILES];
static int64_t input_files_ts_offset[MAX_FILES];
*/
int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height);
void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift);
+
+/**
+ * Return the short name for a pixel format.
+ *
+ * \see av_get_pix_fmt(), av_get_pix_fmt_string().
+ */
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
*/
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 Libav (libavcodec, libavformat, etc.)
+ * intended to be used internally by FFmpeg (libavcodec, libavformat, etc.)
* only, and would normally not be used by applications.
* @param[in] avc a pointer to an arbitrary struct of which the first field is
* a pointer to an AVClass struct
return pic;
}
+static void avcodec_get_subtitle_defaults(AVSubtitle *sub)
+{
+ memset(sub, 0, sizeof(*sub));
+ sub->pts = AV_NOPTS_VALUE;
+}
+
int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
{
- int ret= -1;
+ int ret = 0;
/* If there is a user-supplied mutex locking routine, call it. */
if (ff_lockmgr_cb) {
*/
int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer);
- #if FF_API_UDP_GET_FILE
- int udp_get_file_handle(URLContext *h);
- #endif
-
/**
* Iterate through names of available protocols.
+ * @note it is recommanded to use av_protocol_next() instead of this
*
* @param opaque A private pointer representing current protocol.
* It must be a pointer to NULL on first iteration and will
* Those FF_API_* defines are not part of public API.
* They may change, break or disappear at any time.
*/
- #define FF_API_OLD_EVAL_NAMES (LIBAVUTIL_VERSION_MAJOR < 51)
+#ifndef FF_API_OLD_EVAL_NAMES
++#define FF_API_OLD_EVAL_NAMES (LIBAVUTIL_VERSION_MAJOR < 52)
+#endif
/**
* Return the LIBAVUTIL_VERSION_INT constant.
#define AVUNERROR(e) (e)
#endif
- #if LIBAVUTIL_VERSION_MAJOR < 51
- #define AVERROR_INVALIDDATA AVERROR(EINVAL) ///< Invalid data found when processing input
+#define AVERROR_IO AVERROR(EIO) ///< I/O error
+#define AVERROR_NOENT AVERROR(ENOENT) ///< No such file or directory
+#define AVERROR_NOFMT AVERROR(EILSEQ) ///< Unknown format
+#define AVERROR_NOMEM AVERROR(ENOMEM) ///< Not enough memory
+#define AVERROR_NOTSUPP AVERROR(ENOSYS) ///< Operation not supported
- #define AVERROR_NUMEXPECTED AVERROR(EDOM) ///< Number syntax expected in filename
+#define AVERROR_UNKNOWN AVERROR(EINVAL) ///< Unknown error
- #endif
+
#define AVERROR_EOF AVERROR(EPIPE) ///< End of file
-#define AVERROR_PATCHWELCOME (-MKTAG('P','A','W','E')) ///< Not yet implemented in Libav, patches welcome
+#define AVERROR_PATCHWELCOME (-MKTAG('P','A','W','E')) ///< Not yet implemented in FFmpeg, patches welcome
- #if LIBAVUTIL_VERSION_MAJOR > 50
#define AVERROR_INVALIDDATA (-MKTAG('I','N','D','A')) ///< Invalid data found when processing input
#define AVERROR_NUMEXPECTED (-MKTAG('N','U','E','X')) ///< Number syntax expected in filename
- #endif
#define AVERROR_DEMUXER_NOT_FOUND (-MKTAG(0xF8,'D','E','M')) ///< Demuxer not found
#define AVERROR_MUXER_NOT_FOUND (-MKTAG(0xF8,'M','U','X')) ///< Muxer not found