comparison avformat.h @ 2932:f5de41d943e2 libavformat

user specifyable maximum amount of memory to use for the index. patch by Paul Kelly paul stjohnspoint co uk with some changes by me
author michael
date Sun, 13 Jan 2008 13:33:37 +0000
parents 067baa2b8f38
children b2d1cd7ab383
comparison
equal deleted inserted replaced
2931:83790e20f993 2932:f5de41d943e2
19 */ 19 */
20 20
21 #ifndef FFMPEG_AVFORMAT_H 21 #ifndef FFMPEG_AVFORMAT_H
22 #define FFMPEG_AVFORMAT_H 22 #define FFMPEG_AVFORMAT_H
23 23
24 #define LIBAVFORMAT_VERSION_INT ((52<<16)+(3<<8)+0) 24 #define LIBAVFORMAT_VERSION_INT ((52<<16)+(4<<8)+0)
25 #define LIBAVFORMAT_VERSION 52.3.0 25 #define LIBAVFORMAT_VERSION 52.4.0
26 #define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT 26 #define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT
27 27
28 #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION) 28 #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION)
29 29
30 #include <time.h> 30 #include <time.h>
475 /** 475 /**
476 * Forced subtitle codec_id. 476 * Forced subtitle codec_id.
477 * demuxing: set by user 477 * demuxing: set by user
478 */ 478 */
479 enum CodecID subtitle_codec_id; 479 enum CodecID subtitle_codec_id;
480
481 /**
482 * Maximum amount of memory in bytes to use per stream for the index.
483 * If the needed index exceeds this size entries will be discarded as
484 * needed to maintain a smaller size. This can lead to slower or less
485 * accurate seeking (depends on demuxer).
486 * Demuxers for which a full in memory index is mandatory will ignore
487 * this.
488 * muxing : unused
489 * demuxing: set by user
490 */
491 unsigned int max_index_size;
480 } AVFormatContext; 492 } AVFormatContext;
481 493
482 typedef struct AVPacketList { 494 typedef struct AVPacketList {
483 AVPacket pkt; 495 AVPacket pkt;
484 struct AVPacketList *next; 496 struct AVPacketList *next;
732 * then it will be >= 744 * then it will be >=
733 * if AVSEEK_FLAG_ANY seek to any frame, only keyframes otherwise 745 * if AVSEEK_FLAG_ANY seek to any frame, only keyframes otherwise
734 * @return < 0 if no such timestamp could be found 746 * @return < 0 if no such timestamp could be found
735 */ 747 */
736 int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags); 748 int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags);
749
750 /**
751 * Ensures the index uses less memory than the maximum specified in
752 * AVFormatContext.max_index_size, by discarding entries if it grows
753 * too large.
754 * This function is not part of the public API and should only be called
755 * by demuxers.
756 */
757 void ff_reduce_index(AVFormatContext *s, int stream_index);
737 758
738 /** 759 /**
739 * Add a index entry into a sorted list updateing if it is already there. 760 * Add a index entry into a sorted list updateing if it is already there.
740 * 761 *
741 * @param timestamp timestamp in the timebase of the given stream 762 * @param timestamp timestamp in the timebase of the given stream