MloIndivChnPool.h

00001 /*****************************************************************
00002 |
00003 |    Copyright 2004-2006 Axiomatic Systems LLC
00004 |
00005 |    This file is part of Melo (Melo AAC Decoder).
00006 |
00007 |    Unless you have obtained Melo under a difference license,
00008 |    this version of Melo is Melo|GPL.
00009 |    Melo|GPL is free software; you can redistribute it and/or modify
00010 |    it under the terms of the GNU General Public License as published by
00011 |    the Free Software Foundation; either version 2, or (at your option)
00012 |    any later version.
00013 |
00014 |    Melo|GPL is distributed in the hope that it will be useful,
00015 |    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 |    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 |    GNU General Public License for more details.
00018 |
00019 |    You should have received a copy of the GNU General Public License
00020 |    along with Melo|GPL; see the file COPYING.  If not, write to the
00021 |    Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
00022 |    02111-1307, USA.
00023 |
00024  ****************************************************************/
00025 
00026 /*
00027 Pool of Individual Channel Stream
00028 */
00029 
00030 #ifndef _MLO_INDIV_CHN_POOL_H_
00031 #define _MLO_INDIV_CHN_POOL_H_
00032 
00033 
00034 
00035 /*----------------------------------------------------------------------
00036 |       Includes
00037 +---------------------------------------------------------------------*/
00038 
00039 
00040 
00041 #include "MloDefs.h"
00042 #include "MloIndivChnStream.h"
00043 #include "MloTypes.h"
00044 
00045 
00046 
00047 /*----------------------------------------------------------------------
00048 |       Constants
00049 +---------------------------------------------------------------------*/
00050 
00051 
00052 
00053 #define MLO_ERROR_NO_CHN_AVAILABLE  (MLO_ERROR_BASE_INDIV_CHN_POOL-0)
00054 
00055 
00056 
00057 /*----------------------------------------------------------------------
00058 |       Types
00059 +---------------------------------------------------------------------*/
00060 
00061 
00062 
00063 typedef struct MLO_IndivChnPool
00064 {
00065    int            nbr_alloc_chn;
00066    int            nbr_chn;
00067    MLO_IndivChnStream *
00068                   chn_ptr_arr [MLO_DEFS_MAX_CHN];
00069 }  MLO_IndivChnPool;
00070 
00071 
00072 
00073 /*----------------------------------------------------------------------
00074 |       Function prototypes
00075 +---------------------------------------------------------------------*/
00076 
00077 
00078 
00079 #ifdef __cplusplus
00080 extern "C" {
00081 #endif /* __cplusplus */
00082 
00083 
00084 
00085 MLO_Result  MLO_IndivChnPool_Create (MLO_IndivChnPool *pool_ptr, int nbr_chn);
00086 void  MLO_IndivChnPool_Destroy (MLO_IndivChnPool *pool_ptr);
00087 
00088 MLO_Result  MLO_IndivChnPool_Allocate (MLO_IndivChnPool *pool_ptr, int nbr_chn);
00089 
00090 void  MLO_IndivChnPool_Clear (MLO_IndivChnPool *pool_ptr);
00091 MLO_Result  MLO_IndivChnPool_AddChn (MLO_IndivChnPool *pool_ptr, int *index_ptr);
00092 int   MLO_IndivChnPool_GetNbrChnFree (const MLO_IndivChnPool *pool_ptr);
00093 
00094 
00095 
00096 #ifdef __cplusplus
00097 }
00098 #endif /* __cplusplus */
00099 
00100 
00101 
00102 #endif /* _MLO_INDIV_CHN_POOL_H_ */