DVBCore  22.3.0
Open Source DVB Engine
buffer.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2013 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  *******************************************************************************/
25 #ifndef DBA_BUFFER_H
26 #define DBA_BUFFER_H
27 
28 #include "techtype.h"
29 
30 typedef struct
31 {
32  U32BIT size;
33  U32BIT refcount;
34 } S_BUFFER;
35 
42 void * Buffer_New(U32BIT size, const void *data);
43 
48 void Buffer_Ref(void *buffer_data);
49 
54 void Buffer_Unref(void *buffer_data);
55 
56 #endif
57 
void Buffer_Unref(void *buffer_data)
Decrement the count by one. The buffer is automatically deleted once the count becomes zero...
Definition: buffer.c:87
Definition: buffer.h:30
void * Buffer_New(U32BIT size, const void *data)
Create buffer of given 'size' initialised to 'data'. The count is initialised to one.
Definition: buffer.c:39
System Wide Global Technical Data Type Definitions.
void Buffer_Ref(void *buffer_data)
Increment the count by one.
Definition: buffer.c:66