DSMCC  15.3.1
source/dsfm/src/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"

Data Structures

struct  s_SbmInstance

Defines

#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.
void SBM_ReleaseBuffer (H_SbmInstance sbm, U8BIT *buffer)
 Release DVB section buffer allocated with SBM_AllocateBuffer.
H_SbmInstance SBM_CreateInstance (S_SbmSetup *pSetup)
 Create Section Buffer Manager instance, using setup structure.
void SBM_DestroyInstance (H_SbmInstance sbm, void **pBufMtx)
 Destroy Section Filter Manager instance, and return mutexes so that they may be destroyed by client.

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

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.

Create Section Buffer Manager instance, using setup structure.

Parameters:
S_SbmSetupsetup setup parameters
Returns:
SBM instance. NULL is failure.
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
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
 All Data Structures Files Functions Typedefs