#include "components/viz/service/frame_sinks/video_capture/shared_memory_video_frame_pool.h"
#include <algorithm>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/logging.h"
VideoFrame;
VideoPixelFormat;
namespace viz {
constexpr base::TimeDelta SharedMemoryVideoFramePool::kMinLoggingPeriod;
SharedMemoryVideoFramePool::SharedMemoryVideoFramePool(int capacity)
: … { … }
SharedMemoryVideoFramePool::~SharedMemoryVideoFramePool() = default;
scoped_refptr<VideoFrame> SharedMemoryVideoFramePool::ReserveVideoFrame(
VideoPixelFormat format,
const gfx::Size& size) { … }
media::mojom::VideoBufferHandlePtr
SharedMemoryVideoFramePool::CloneHandleForDelivery(const VideoFrame& frame) { … }
size_t SharedMemoryVideoFramePool::GetNumberOfReservedFrames() const { … }
scoped_refptr<VideoFrame> SharedMemoryVideoFramePool::WrapBuffer(
PooledBuffer pooled_buffer,
VideoPixelFormat format,
const gfx::Size& size) { … }
void SharedMemoryVideoFramePool::OnFrameWrapperDestroyed(
const VideoFrame* frame,
base::WritableSharedMemoryMapping mapping) { … }
bool SharedMemoryVideoFramePool::CanLogSharedMemoryFailure() { … }
}