#include "common_video/include/video_frame_buffer_pool.h"
#include <limits>
#include "api/make_ref_counted.h"
#include "rtc_base/checks.h"
namespace webrtc {
namespace {
bool HasOneRef(const rtc::scoped_refptr<VideoFrameBuffer>& buffer) { … }
}
VideoFrameBufferPool::VideoFrameBufferPool() : … { … }
VideoFrameBufferPool::VideoFrameBufferPool(bool zero_initialize)
: … { … }
VideoFrameBufferPool::VideoFrameBufferPool(bool zero_initialize,
size_t max_number_of_buffers)
: … { … }
VideoFrameBufferPool::~VideoFrameBufferPool() = default;
void VideoFrameBufferPool::Release() { … }
bool VideoFrameBufferPool::Resize(size_t max_number_of_buffers) { … }
rtc::scoped_refptr<I420Buffer> VideoFrameBufferPool::CreateI420Buffer(
int width,
int height) { … }
rtc::scoped_refptr<I444Buffer> VideoFrameBufferPool::CreateI444Buffer(
int width,
int height) { … }
rtc::scoped_refptr<I422Buffer> VideoFrameBufferPool::CreateI422Buffer(
int width,
int height) { … }
rtc::scoped_refptr<NV12Buffer> VideoFrameBufferPool::CreateNV12Buffer(
int width,
int height) { … }
rtc::scoped_refptr<I010Buffer> VideoFrameBufferPool::CreateI010Buffer(
int width,
int height) { … }
rtc::scoped_refptr<I210Buffer> VideoFrameBufferPool::CreateI210Buffer(
int width,
int height) { … }
rtc::scoped_refptr<I410Buffer> VideoFrameBufferPool::CreateI410Buffer(
int width,
int height) { … }
rtc::scoped_refptr<VideoFrameBuffer> VideoFrameBufferPool::GetExistingBuffer(
int width,
int height,
VideoFrameBuffer::Type type) { … }
}