X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Favformat.h;h=5e73f8dc06dcd722d113177fae93f73328d7d768;hb=ff96098084542c3ef98b360f70583999433d13a7;hp=7c041f6e80f8c9ae07326582991294d6cb1df1bf;hpb=f93f6963babf08a7bcf85b9a57f37266dc0a4ae0;p=ffmpeg diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 7c041f6e80f..5e73f8dc06d 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -324,6 +324,14 @@ typedef struct AVOutputFormat { const AVClass *priv_class; ///< AVClass for the private context + /** + * Test if the given codec can be stored in this container. + * + * @return 1 if the codec is supported, 0 if it is not. + * A negative number if unknown. + */ + int (*query_codec)(enum CodecID id, int std_compliance); + void (*get_output_timestamp)(struct AVFormatContext *s, int stream, int64_t *dts, int64_t *wall); @@ -774,6 +782,7 @@ typedef struct AVFormatContext { #define AVFMT_FLAG_RTP_HINT 0x0040 ///< Deprecated, use the -movflags rtphint muxer specific AVOption instead #endif #define AVFMT_FLAG_CUSTOM_IO 0x0080 ///< The caller has supplied a custom AVIOContext, don't avio_close() it. +#define AVFMT_FLAG_DISCARD_CORRUPT 0x0100 ///< Discard frames marked corrupted #define AVFMT_FLAG_MP4A_LATM 0x8000 ///< Enable RTP MP4A-LATM payload #define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down) #define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (this could be made default once all code is converted) @@ -882,6 +891,14 @@ typedef struct AVFormatContext { */ int fps_probe_size; + /** + * Error recognition; higher values will detect more errors but may + * misdetect some more or less valid parts as errors. + * - encoding: unused + * - decoding: Set by user. + */ + int error_recognition; + /** * Transport stream id. * This will be moved into demuxer private options. Thus no API/ABI compatibility @@ -1188,6 +1205,7 @@ int avformat_alloc_output_context2(AVFormatContext **ctx, AVOutputFormat *oforma * * @deprecated use avformat_find_stream_info. */ +attribute_deprecated int av_find_stream_info(AVFormatContext *ic); #endif @@ -1680,4 +1698,14 @@ attribute_deprecated int avf_sdp_create(AVFormatContext *ac[], int n_files, char */ int av_match_ext(const char *filename, const char *extensions); +/** + * Test if the given container can store a codec. + * + * @param std_compliance standards compliance level, one of FF_COMPLIANCE_* + * + * @return 1 if codec with ID codec_id can be stored in ofmt, 0 if it cannot. + * A negative number if this information is not available. + */ +int avformat_query_codec(AVOutputFormat *ofmt, enum CodecID codec_id, int std_compliance); + #endif /* AVFORMAT_AVFORMAT_H */