FFmpeg
Data Structures | Functions
objpool.c File Reference
#include <stdint.h>
#include "libavcodec/packet.h"
#include "libavutil/common.h"
#include "libavutil/error.h"
#include "libavutil/frame.h"
#include "libavutil/mem.h"
#include "objpool.h"

Go to the source code of this file.

Data Structures

struct  ObjPool
 

Functions

ObjPoolobjpool_alloc (ObjPoolCBAlloc cb_alloc, ObjPoolCBReset cb_reset, ObjPoolCBFree cb_free)
 
void objpool_free (ObjPool **pop)
 
int objpool_get (ObjPool *op, void **obj)
 
void objpool_release (ObjPool *op, void **obj)
 
static void * alloc_packet (void)
 
static void * alloc_frame (void)
 
static void reset_packet (void *obj)
 
static void reset_frame (void *obj)
 
static void free_packet (void **obj)
 
static void free_frame (void **obj)
 
ObjPoolobjpool_alloc_packets (void)
 
ObjPoolobjpool_alloc_frames (void)
 

Function Documentation

◆ objpool_alloc()

ObjPool* objpool_alloc ( ObjPoolCBAlloc  cb_alloc,
ObjPoolCBReset  cb_reset,
ObjPoolCBFree  cb_free 
)

Definition at line 39 of file objpool.c.

Referenced by objpool_alloc_frames(), and objpool_alloc_packets().

◆ objpool_free()

void objpool_free ( ObjPool **  pop)

Definition at line 54 of file objpool.c.

Referenced by queue_alloc(), sq_free(), and tq_free().

◆ objpool_get()

int objpool_get ( ObjPool op,
void **  obj 
)

Definition at line 67 of file objpool.c.

Referenced by sq_send(), and tq_send().

◆ objpool_release()

void objpool_release ( ObjPool op,
void **  obj 
)

Definition at line 78 of file objpool.c.

Referenced by receive_for_stream(), receive_locked(), receive_samples(), sq_free(), sq_send(), and tq_free().

◆ alloc_packet()

static void* alloc_packet ( void  )
static

Definition at line 93 of file objpool.c.

Referenced by objpool_alloc_packets().

◆ alloc_frame()

static void* alloc_frame ( void  )
static

Definition at line 97 of file objpool.c.

Referenced by objpool_alloc_frames().

◆ reset_packet()

static void reset_packet ( void *  obj)
static

Definition at line 102 of file objpool.c.

Referenced by objpool_alloc_packets().

◆ reset_frame()

static void reset_frame ( void *  obj)
static

Definition at line 106 of file objpool.c.

Referenced by objpool_alloc_frames().

◆ free_packet()

static void free_packet ( void **  obj)
static

Definition at line 111 of file objpool.c.

Referenced by objpool_alloc_packets().

◆ free_frame()

static void free_frame ( void **  obj)
static

Definition at line 117 of file objpool.c.

Referenced by objpool_alloc_frames().

◆ objpool_alloc_packets()

ObjPool* objpool_alloc_packets ( void  )

Definition at line 124 of file objpool.c.

Referenced by queue_alloc(), and sq_alloc().

◆ objpool_alloc_frames()

ObjPool* objpool_alloc_frames ( void  )

Definition at line 128 of file objpool.c.

Referenced by queue_alloc(), and sq_alloc().