X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Finternal.h;h=7d0eab44acf5612deb9a53512f53d2382fa004a3;hb=626535f6a169e2d821b969e0ea77125ba7482113;hp=d85b9a3d9bc0b49221861ff56ebb5979c8127630;hpb=adff25412a2929de67e44da1abaf67f9a267bdf4;p=ffmpeg diff --git a/libavformat/internal.h b/libavformat/internal.h index d85b9a3d9bc..7d0eab44acf 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -98,6 +98,9 @@ struct AVFormatInternal { * for short periods that are guaranteed not to overlap * with calls to av_read_frame() (or ff_read_packet()) * or with each other. + * It may be used by demuxers as a replacement for + * stack packets (unless they call one of the aforementioned + * functions with their own AVFormatContext). * Every user has to ensure that this packet is blank * after using it. */ @@ -576,11 +579,7 @@ void ff_configure_buffers_for_index(AVFormatContext *s, int64_t time_tolerance); * * @return AVChapter or NULL on error */ -#if FF_API_CHAPTER_ID_INT -AVChapter *avpriv_new_chapter(AVFormatContext *s, int id, AVRational time_base, -#else AVChapter *avpriv_new_chapter(AVFormatContext *s, int64_t id, AVRational time_base, -#endif int64_t start, int64_t end, const char *title); /** @@ -666,6 +665,22 @@ int ff_framehash_write_header(AVFormatContext *s); */ int ff_read_packet(AVFormatContext *s, AVPacket *pkt); +/** + * Add an attached pic to an AVStream. + * + * @param st if set, the stream to add the attached pic to; + * if unset, a new stream will be added to s. + * @param pb AVIOContext to read data from if buf is unset. + * @param buf if set, it contains the data and size information to be used + * for the attached pic; if unset, data is read from pb. + * @param size the size of the data to read if buf is unset. + * + * @return 0 on success, < 0 on error. On error, this function removes + * the stream it has added (if any). + */ +int ff_add_attached_pic(AVFormatContext *s, AVStream *st, AVIOContext *pb, + AVBufferRef **buf, int size); + /** * Interleave an AVPacket per dts so it can be muxed. *