⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 avformat.h

📁 ts流的解复用
💻 H
📖 第 1 页 / 共 2 页
字号:
#define MAX_REORDER_DELAY 4    int64_t pts_buffer[MAX_REORDER_DELAY+1];    char *filename; /**< source filename of the stream */    int disposition; /**< AV_DISPOSITION_* bitfield */} AVStream;typedef struct AVChapter {    int id;                 ///< Unique id to identify the chapter    AVRational time_base;   ///< Timebase in which the start/end timestamps are specified    int64_t start, end;     ///< chapter start/end time in time_base units    char *title;            ///< chapter title} AVChapter;#define MAX_STREAMS		20typedef struct AVFormatParameters {    AVRational time_base;    int sample_rate;    int channels;    int width;    int height;    enum PixelFormat pix_fmt;    int channel; /**< used to select dv channel */    const char *standard; /**< tv standard, NTSC, PAL, SECAM */    int mpeg2ts_raw:1;  /**< force raw MPEG2 transport stream output, if possible */    int mpeg2ts_compute_pcr:1; /**< compute exact PCR for each transport                                  stream packet (only meaningful if                                  mpeg2ts_raw is TRUE) */    int initial_pause:1;       /**< do not begin to play the stream                                  immediately (RTSP only) */    int prealloced_context:1;#if LIBAVFORMAT_VERSION_INT < (53<<16)    enum CodecID video_codec_id;    enum CodecID audio_codec_id;#endif} AVFormatParameters;typedef struct AVInputFormat {    const char *name;    const char *long_name;    /** size of private data so that it can be allocated in the wrapper */    int priv_data_size;    /**     * Tell if a given file has a chance of being parsed by this format.     * The buffer provided is guaranteed to be AVPROBE_PADDING_SIZE bytes     * big so you do not have to check for that unless you need more.     */ //   int (*read_probe)(AVProbeData *);    /** read the format header and initialize the AVFormatContext       structure. Return 0 if OK. 'ap' if non NULL contains       additional paramters. Only used in raw format right       now. 'av_new_stream' should be called to create new streams.  */    int (*read_header)(struct AVFormatContext *,                       AVFormatParameters *ap);    /** read one packet and put it in 'pkt'. pts and flags are also       set. 'av_new_stream' can be called only if the flag       AVFMTCTX_NOHEADER is used. */    int (*read_packet)(struct AVFormatContext *, AVPacket *pkt);    /** close the stream. The AVFormatContext and AVStreams are not       freed by this function */    int (*read_close)(struct AVFormatContext *);    /**     * seek to a given timestamp relative to the frames in     * stream component stream_index     * @param stream_index must not be -1     * @param flags selects which direction should be preferred if no exact     *              match is available     * @return >= 0 on success (but not necessarily the new offset)     */    int (*read_seek)(struct AVFormatContext *,                     int stream_index, int64_t timestamp, int flags);    /**     * gets the next timestamp in stream[stream_index].time_base units.     * @return the timestamp or AV_NOPTS_VALUE if an error occurred     */    int64_t (*read_timestamp)(struct AVFormatContext *s, int stream_index,                              int64_t *pos, int64_t pos_limit);    /** can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER */    int flags;    /** if extensions are defined, then no probe is done. You should       usually not use extension format guessing because it is not       reliable enough */    const char *extensions;    /** general purpose read only value that the format can use */    int value;    /** start/resume playing - only meaningful if using a network based format       (RTSP) */    int (*read_play)(struct AVFormatContext *);    /** pause playing - only meaningful if using a network based format       (RTSP) */    int (*read_pause)(struct AVFormatContext *);//    const struct AVCodecTag **codec_tag;    /* private fields *///    struct AVInputFormat *next;} AVInputFormat;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;    RingBuffer_s  *rb;  //代替上面的ByteIOContext    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#define AVFMT_FLAG_NONBLOCK     0x0004 ///< do not block when reading packets from input    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;    unsigned int nb_programs;    AVProgram **programs;    /**     * Forced video codec_id.     * demuxing: set by user     */    enum CodecID video_codec_id;    /**     * Forced audio codec_id.     * demuxing: set by user     */    enum CodecID audio_codec_id;    /**     * Forced subtitle codec_id.     * demuxing: set by user     */    enum CodecID subtitle_codec_id;    /**     * Maximum amount of memory in bytes to use per stream for the index.     * If the needed index exceeds this size entries will be discarded as     * needed to maintain a smaller size. This can lead to slower or less     * accurate seeking (depends on demuxer).     * Demuxers for which a full in memory index is mandatory will ignore     * this.     * muxing  : unused     * demuxing: set by user     */    unsigned int max_index_size;    /**     * Maximum amount of memory in bytes to use for buffering frames     * obtained from real-time capture devices.     */    unsigned int max_picture_buffer;    unsigned int nb_chapters;    AVChapter **chapters;} AVFormatContext;#endif //__AVFORMAT_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -