Add ability to resize buffers pool in decoder and use it in IVF generator
Bug: webrtc:10138
Change-Id: I452f08f1d9af57de789bd947a1fcb95536845f80
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/162183
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30098}
diff --git a/api/video_codecs/video_codec.h b/api/video_codecs/video_codec.h
index a248d19..330bbbc 100644
--- a/api/video_codecs/video_codec.h
+++ b/api/video_codecs/video_codec.h
@@ -16,6 +16,7 @@
#include <string>
+#include "absl/types/optional.h"
#include "api/video/video_bitrate_allocation.h"
#include "api/video/video_codec_type.h"
#include "common_types.h" // NOLINT(build/include)
@@ -126,6 +127,12 @@
VideoCodecMode mode;
bool expect_encode_from_texture;
+ // The size of pool which is used to store video frame buffers inside decoder.
+ // If value isn't present some codec-default value will be used.
+ // If value is present and decoder doesn't have buffer pool the
+ // value will be ignored.
+ absl::optional<int> buffer_pool_size;
+
// Timing frames configuration. There is delay of delay_ms between two
// consequent timing frames, excluding outliers. Frame is always made a
// timing frame if it's at least outlier_ratio in percent of "ideal" average