DSMCC  17.9.0
 All Data Structures Files Functions Typedefs
Macros | Typedefs | Functions
sbm.c File Reference

Section Buffer Manager (for use by Section Filter Manager and client) Provides mechanism to allocate and release buffers for section data without cost of using standard malloc and free. More...

#include <string.h>
#include "stb_debug.h"
#include "sbm.h"

Go to the source code of this file.

Macros

#define INVALID_OFFSET   0xFFFFFFFF
 

Typedefs

typedef struct s_SbmInstance S_SbmInstance
 

Functions

U8BIT * SBM_AllocateBuffer (H_SbmInstance sbm, U8BIT size1)
 Allocate buffer for a DVB section. More...
 
void SBM_ReleaseBuffer (H_SbmInstance sbm, U8BIT *buffer)
 Release DVB section buffer allocated with SBM_AllocateBuffer. More...
 
H_SbmInstance SBM_CreateInstance (S_SbmSetup *pSetup)
 Create Section Buffer Manager instance, using setup structure. More...
 
void SBM_DestroyInstance (H_SbmInstance sbm, void **pBufMtx)
 Destroy Section Filter Manager instance, and return mutexes so that they may be destroyed by client. More...
 

Detailed Description

Section Buffer Manager (for use by Section Filter Manager and client) Provides mechanism to allocate and release buffers for section data without cost of using standard malloc and free.

Date
30th October 2013
Author
Adam Sturtridge

Definition in file sbm.c.

Function Documentation

U8BIT* SBM_AllocateBuffer ( H_SbmInstance  sbm,
U8BIT  size1 
)

Allocate buffer for a DVB section.

Parameters
H_SbmInstancesbm SBM instance handle.
U8BITsize1 First 'size' byte in DVB section data That is 'section_data_ptr[1]' or section size (less 3) in 256 byte units.
Returns
U8BIT* pointer to section buffer, NULL is failure.

Definition at line 369 of file sbm.c.

H_SbmInstance SBM_CreateInstance ( S_SbmSetup pSetup)

Create Section Buffer Manager instance, using setup structure.

Parameters
S_SbmSetupsetup setup parameters
Returns
SBM instance. NULL is failure.

Definition at line 457 of file sbm.c.

void SBM_DestroyInstance ( H_SbmInstance  sbm,
void **  pBufMtx 
)

Destroy Section Filter Manager instance, and return mutexes so that they may be destroyed by client.

Parameters
H_SbmInstancesbm SBM instance handle.
void**pBufMtx Pointer to mtx_sem provided in setup
Returns
void

Definition at line 517 of file sbm.c.

void SBM_ReleaseBuffer ( H_SbmInstance  sbm,
U8BIT *  buffer 
)

Release DVB section buffer allocated with SBM_AllocateBuffer.

Parameters
H_SbmInstancesbm SBM instance handle.
U8BIT*buffer Pointer to DVB section data buffer
Returns
void

Definition at line 432 of file sbm.c.