Show / Hide Table of Contents

Class AVBufferPool

Represents a pool of AVBuffer objects for efficient memory management.

Inheritance
object
AVBufferPool
Implements
IDisposable
IAVPointer<_AVBufferPool>
Inherited Members
object.GetType()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: FFmpeg.Collections
Assembly: FFmpeg.dll
Syntax
public sealed class AVBufferPool : IDisposable, IAVPointer<_AVBufferPool>
Remarks

This class is a wrapper around the FFmpeg AVBufferPool structure, providing a mechanism to allocate and manage a pool of buffers. It implements IDisposable to ensure that resources are properly released when the pool is no longer needed.

Constructors

View Source

AVBufferPool(int)

Represents a pool of AVBuffer objects for efficient memory management.

Declaration
public AVBufferPool(int size)
Parameters
Type Name Description
int size

The size of each buffer in the pool, in bytes.

Remarks

This class is a wrapper around the FFmpeg AVBufferPool structure, providing a mechanism to allocate and manage a pool of buffers. It implements IDisposable to ensure that resources are properly released when the pool is no longer needed.

Methods

View Source

Dispose()

Releases all resources used by the AVBufferPool.

Declaration
public void Dispose()
Remarks

This method is called when the pool is no longer needed, either explicitly through a call to Dispose() or implicitly via the finalizer. It calls FFmpeg's av_buffer_pool_uninit function to free the memory associated with the buffer pool.

View Source

~AVBufferPool()

Finalizes an instance of the AVBufferPool class.

Declaration
protected ~AVBufferPool()
Remarks

The finalizer ensures that resources are released if Dispose() is not called.

View Source

Rent()

Rents a buffer from the pool.

Declaration
public AVBuffer Rent()
Returns
Type Description
AVBuffer

An AVBuffer instance representing the rented buffer.

Remarks

This method retrieves a buffer from the pool using FFmpeg's av_buffer_pool_get function. The caller is responsible for managing the lifecycle of the returned buffer.

Implements

IDisposable
IAVPointer<T>
  • View Source
In this article
Back to top Generated by DocFX