[SCM] libav/experimental: Introduce max_picture_buffer variable in AVFormatContext, set by rtbufsize option.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:16:40 UTC 2013


The following commit has been merged in the experimental branch:
commit ab8ab30c3d075065b68552cd8e59556b863115e0
Author: Ramiro Polla <ramiro.polla at gmail.com>
Date:   Sat Mar 8 21:59:11 2008 +0000

    Introduce max_picture_buffer variable in AVFormatContext,
    set by rtbufsize option.
    
    Originally committed as revision 12383 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 9a9125a..54dfdbf 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -22,7 +22,7 @@
 #define FFMPEG_AVFORMAT_H
 
 #define LIBAVFORMAT_VERSION_MAJOR 52
-#define LIBAVFORMAT_VERSION_MINOR  8
+#define LIBAVFORMAT_VERSION_MINOR  9
 #define LIBAVFORMAT_VERSION_MICRO  0
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
@@ -508,6 +508,12 @@ typedef struct AVFormatContext {
      * demuxing: set by user
      */
     unsigned int max_index_size;
+
+    /**
+     * Maximum ammount of memory in bytes to use for buffering frames that are
+     * obtained from real-time capture devices.
+     */
+    unsigned int max_picture_buffer;
 } AVFormatContext;
 
 typedef struct AVPacketList {
diff --git a/libavformat/utils.c b/libavformat/utils.c
index d032baa..b37db35 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -324,6 +324,7 @@ static const AVOption options[]={
 {"analyzeduration", "how many microseconds are analyzed to estimate duration", OFFSET(max_analyze_duration), FF_OPT_TYPE_INT, 3*AV_TIME_BASE, 0, INT_MAX, D},
 {"cryptokey", "decryption key", OFFSET(key), FF_OPT_TYPE_BINARY, 0, 0, 0, D},
 {"indexmem", "max memory used for timestamp index (per stream)", OFFSET(max_index_size), FF_OPT_TYPE_INT, 1<<20, 0, INT_MAX, D},
+{"rtbufsize", "max memory used for buffering real-time frames", OFFSET(max_picture_buffer), FF_OPT_TYPE_INT, 3041280, 0, INT_MAX, D}, /* defaults to 1s of 15fps 352x288 YUYV422 video */
 {NULL},
 };
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list