diff options
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 51 |
1 files changed, 40 insertions, 11 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index aca246d95a..ec51a57ca8 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1,20 +1,20 @@ /* * copyright (c) 2001 Fabrice Bellard * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -51,7 +51,7 @@ struct AVFormatContext; /* * Public Metadata API. * The metadata API allows libavformat to export metadata tags to a client - * application using a sequence of key/value pairs. Like all strings in Libav, + * application using a sequence of key/value pairs. Like all strings in FFmpeg, * metadata must be stored as UTF-8 encoded Unicode. Note that metadata * exported by demuxers isn't checked to be valid UTF-8 in most cases. * Important concepts to keep in mind: @@ -287,10 +287,9 @@ typedef struct AVOutputFormat { * AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS */ int flags; - /** - * Currently only used to set pixel format if not YUV420P. - */ - int (*set_parameters)(struct AVFormatContext *, AVFormatParameters *); + + void *dummy; + int (*interleave_packet)(struct AVFormatContext *, AVPacket *out, AVPacket *in, int flush); @@ -426,6 +425,8 @@ typedef struct AVInputFormat { const AVMetadataConv *metadata_conv; #endif + const AVClass *priv_class; ///< AVClass for the private context + /* private fields */ struct AVInputFormat *next; } AVInputFormat; @@ -519,6 +520,8 @@ typedef struct AVStream { * Only set this if you are absolutely 100% sure that the value you set * it to really is the pts of the first frame. * This may be undefined (AV_NOPTS_VALUE). + * @note The ASF header does NOT contain a correct start_time the ASF + * demuxer must NOT set this. */ int64_t start_time; @@ -609,6 +612,12 @@ typedef struct AVStream { double duration_error[MAX_STD_TIMEBASES]; int64_t codec_info_duration; } *info; + + /** + * flag to indicate that probing is requested + * NOT PART OF PUBLIC API + */ + int request_probe; } AVStream; #define AV_PROGRAM_RUNNING 1 @@ -690,7 +699,7 @@ typedef struct AVFormatContext { /** * Decoding: total stream bitrate in bit/s, 0 if not * available. Never set it directly if the file_size and the - * duration are known as Libav can compute it automatically. + * duration are known as FFmpeg can compute it automatically. */ int bit_rate; @@ -720,6 +729,8 @@ typedef struct AVFormatContext { #define AVFMT_FLAG_NOFILLIN 0x0010 ///< Do not infer any values from other values, just return what is stored in the container #define AVFMT_FLAG_NOPARSE 0x0020 ///< Do not use AVParsers, you also must set AVFMT_FLAG_NOFILLIN as the fillin code works on frames and no parsing -> no frames. Also seeking to frames can not work if parsing to find frame boundaries has been disabled #define AVFMT_FLAG_RTP_HINT 0x0040 ///< Add RTP hinting to the output file +#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) int loop_input; @@ -982,6 +993,15 @@ AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened); AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int *score_max); /** + * Guess the file format. + * + * @param is_opened Whether the file is already opened; determines whether + * demuxers with or without AVFMT_NOFILE are probed. + * @param score_ret The score of the best detection. + */ +AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened, int *score_ret); + +/** * Probe a bytestream to determine the input format. Each time a probe returns * with a score that is too low, the probe buffer size is increased and another * attempt is made. When the maximum probe size is reached, the input format @@ -1025,6 +1045,8 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, int buf_size, AVFormatParameters *ap); +int av_demuxer_open(AVFormatContext *ic, AVFormatParameters *ap); + /** * Allocate an AVFormatContext. * avformat_free_context() can be used to free the context and everything @@ -1033,6 +1055,13 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, AVFormatContext *avformat_alloc_context(void); /** + * Allocate an AVFormatContext. + * avformat_free_context() can be used to free the context and everything + * allocated by the framework within it. + */ +AVFormatContext *avformat_alloc_output_context(const char *format, AVOutputFormat *oformat, const char *filename); + +/** * Read packets of a media file to get stream information. This * is useful for file formats with no headers such as MPEG. This * function also computes the real framerate in case of MPEG-2 repeat @@ -1280,7 +1309,7 @@ int64_t av_gen_search(AVFormatContext *s, int stream_index, /** * media file output */ -int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap); +attribute_deprecated int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap); /** * Split a URL string into components. |