DSMCC  17.9.0
 All Data Structures Files Functions Typedefs
sbm.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2004 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
26 #ifndef _DSBM_H_
27 #define _DSBM_H_
28 
29 #include "techtype.h"
30 #include "stdfuncs.h"
31 
32 /*------------------- Functions supplied to SBM at setup ---------------------*/
33 
34 
35 /*---------------- Setup structure for SBM initialisation -------------------*/
36 
37 typedef struct
38 {
39  // Manditory functions - used in creation, destruction of instance
40 
41  F_MemAlloc memAlloc;
42  F_MemFree memFree;
43 
44  F_Locking lock;
45  F_Locking unlock;
46 
47  // mutex or binary semaphore
48  void *mtx_sem;
49 
50  // Size of memory in 64K byte blocks to be managed by SBM.
51  // Minimum value: 0
52  // Suggested value: 16
53  U16BIT bufferSize;
54 } S_SbmSetup;
55 
56 // SBM instance handle definition
57 typedef struct s_SbmInstance *H_SbmInstance;
58 
59 
60 /*---------------------- Functions that configure SBM ------------------------*/
61 
67 H_SbmInstance SBM_CreateInstance( S_SbmSetup *pSetup );
68 
76 void SBM_DestroyInstance( H_SbmInstance sbm, void **pBufMtx );
77 
78 /*--------------- Allocate / release section buffer functions ----------------*/
79 
88 U8BIT* SBM_AllocateBuffer( H_SbmInstance sbm, U8BIT size1 );
89 
90 
97 void SBM_ReleaseBuffer( H_SbmInstance sbm, U8BIT *buffer );
98 
99 #endif /*_DSBM_H_*/
U8BIT * SBM_AllocateBuffer(H_SbmInstance sbm, U8BIT size1)
Allocate buffer for a DVB section.
Definition: sbm.c:369
H_SbmInstance SBM_CreateInstance(S_SbmSetup *pSetup)
Create Section Buffer Manager instance, using setup structure.
Definition: sbm.c:457
void SBM_DestroyInstance(H_SbmInstance sbm, void **pBufMtx)
Destroy Section Filter Manager instance, and return mutexes so that they may be destroyed by client...
Definition: sbm.c:517
void SBM_ReleaseBuffer(H_SbmInstance sbm, U8BIT *buffer)
Release DVB section buffer allocated with SBM_AllocateBuffer.
Definition: sbm.c:432
Definition: sbm.h:37
System Wide Global Technical Data Type Definitions.
Define standard function types.