User Tools

Site Tools


ffmpeg:avformatcontext

AVFormatContext

Defined in avformat.h

/* format I/O context */
typedef struct AVFormatContext {
    const AVClass *av_class; /**< set by av_alloc_format_context */
    /* can only be iformat or oformat, not both at the same time */
    struct AVInputFormat *iformat;
    struct AVOutputFormat *oformat;
    void *priv_data;
    ByteIOContext pb;
    unsigned int nb_streams;
    AVStream *streams[MAX_STREAMS];
    char filename[1024]; /**< input or output filename */
    /* stream info */
    int64_t timestamp;
    char title[512];
    char author[512];
    char copyright[512];
    char comment[512];
    char album[512];
    int year;  /**< ID3 year, 0 if none */
    int track; /**< track number, 0 if none */
    char genre[32]; /**< ID3 genre */
 
    int ctx_flags; /**< format specific flags, see AVFMTCTX_xx */
    /* private data for pts handling (do not modify directly) */
    /** This buffer is only needed when packets were already buffered but
       not decoded, for example to get the codec parameters in mpeg
       streams */
    struct AVPacketList *packet_buffer;
 
    /** decoding: position of the first frame of the component, in
       AV_TIME_BASE fractional seconds. NEVER set this value directly:
       it is deduced from the AVStream values.  */
    int64_t start_time;
    /** decoding: duration of the stream, in AV_TIME_BASE fractional
       seconds. NEVER set this value directly: it is deduced from the
       AVStream values.  */
    int64_t duration;
    /** decoding: total file size. 0 if unknown */
    int64_t file_size;
    /** 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 ffmpeg can compute it automatically. */
    int bit_rate;
 
    /* av_read_frame() support */
    AVStream *cur_st;
    const uint8_t *cur_ptr;
    int cur_len;
    AVPacket cur_pkt;
 
    /* av_seek_frame() support */
    int64_t data_offset; /** offset of the first packet */
    int index_built;
 
    int mux_rate;
    int packet_size;
    int preload;
    int max_delay;
 
#define AVFMT_NOOUTPUTLOOP -1
#define AVFMT_INFINITEOUTPUTLOOP 0
    /** number of times to loop output in formats that support it */
    int loop_output;
 
    int flags;
#define AVFMT_FLAG_GENPTS       0x0001 ///< generate pts if missing even if it requires parsing future frames
#define AVFMT_FLAG_IGNIDX       0x0002 ///< ignore index
 
    int loop_input;
    /** decoding: size of data to probe; encoding unused */
    unsigned int probesize;
 
    /**
     * maximum duration in AV_TIME_BASE units over which the input should be analyzed in av_find_stream_info()
     */
    int max_analyze_duration;
 
    const uint8_t *key;
    int keylen;
} AVFormatContext;

Back to ffmpeg

ffmpeg/avformatcontext.txt · Last modified: 2007/11/22 17:08 by deva