• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1  
2  /*
3   * Copyright (C) Texas Instruments - http://www.ti.com/
4   *
5   * This library is free software; you can redistribute it and/or
6   * modify it under the terms of the GNU Lesser General Public
7   * License as published by the Free Software Foundation; either
8   * version 2.1 of the License, or (at your option) any later version.
9   *
10   *
11   * This library is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14   * Lesser General Public License for more details.
15   *
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this library; if not, write to the Free Software
19   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
20   */
21  /* =============================================================================
22   *             Texas Instruments OMAP (TM) Platform Software
23   *  (c) Copyright Texas Instruments, Incorporated.  All Rights Reserved.
24   *
25   *  Use of this software is controlled by the terms and conditions found
26   *  in the license agreement under which this software has been supplied.
27   * =========================================================================== */
28  /**
29   * @file OMX_G729Dec_Utils.h
30   *
31   * This header file contains data and function prototypes for G729 DECODER OMX
32   *
33   * @path  $(OMAPSW_MPU)\linux\audio\src\openmax_il\g729_dec\inc
34   *
35   * @rev  0.1
36   */
37  /* -----------------------------------------------------------------------------
38   *!
39   *! Revision History
40   *! ===================================
41   *! Date         Author(s)            Version  Description
42   *! ---------    -------------------  -------  ---------------------------------
43   *! 03-Jan-2007  A.Donjon             0.1      Code update for G729 DECODER
44   *!
45   *!
46   * ================================================================================= */
47  /* ------compilation control switches -------------------------*/
48  
49  #ifndef OMX_G729DEC_UTILS__H
50  #define OMX_G729DEC_UTILS__H
51  
52  /* ======================================================================= */
53  /**
54   * @def    G729DEC_MAJOR_VER              Define value for "major" version
55   */
56  /* ======================================================================= */
57  #define  G729DEC_MAJOR_VER 0x1
58  
59  /* ======================================================================= */
60  /**
61   * @def    G729DEC_MINOR_VER              Define value for "minor" version
62   */
63  /* ======================================================================= */
64  #define  G729DEC_MINOR_VER 0x1
65  
66  /* ======================================================================= */
67  /**
68   * @def    NOT_USED                            Define a not used value
69   */
70  /* ======================================================================= */
71  #define NOT_USED 10
72  
73  /* ======================================================================= */
74  /**
75   * @def    NORMAL_BUFFER                       Define a normal buffer value
76   */
77  /* ======================================================================= */
78  #define NORMAL_BUFFER 0
79  
80  /* ======================================================================= */
81  /**
82   * @def    OMX_G729DEC_DEFAULT_SEGMENT        Define the default segment
83   */
84  /* ======================================================================= */
85  #define OMX_G729DEC_DEFAULT_SEGMENT (0)
86  
87  /* ======================================================================= */
88  /**
89   * @def    OMX_G729DEC_SN_TIMEOUT            Define a value for SN Timeout
90   */
91  /* ======================================================================= */
92  #define OMX_G729DEC_SN_TIMEOUT (-1)
93  
94  /* ======================================================================= */
95  /**
96   * @def    OMX_G729DEC_SN_PRIORITY           Define a value for SN Priority
97   */
98  /* ======================================================================= */
99  #define OMX_G729DEC_SN_PRIORITY (10)
100  
101  /* ======================================================================= */
102  /**
103   * @def    OMX_G729DEC_NUM_DLLS              Define a num of DLLS to be used
104   */
105  /* ======================================================================= */
106  #define OMX_G729DEC_NUM_DLLS (2)
107  
108  /* ======================================================================= */
109  /**
110   * @def    G729DEC_USN_DLL_NAME             Path & Name of USN DLL to be used
111   *                                           at initialization
112   */
113  /* ======================================================================= */
114  #ifdef UNDER_CE
115  #define G729DEC_USN_DLL_NAME "\\windows\\usn.dll64P"
116  #else
117  #define G729DEC_USN_DLL_NAME "usn.dll64P"
118  #endif
119  
120  /* ======================================================================= */
121  /**
122   * @def    G729DEC_USN_DLL_NAME             Path & Name of DLL to be useda
123   *                                           at initialization
124   */
125  /* ======================================================================= */
126  #ifdef UNDER_CE
127  #define G729DEC_DLL_NAME "\\windows\\g729dec_sn.dll64P"
128  #else
129  #define G729DEC_DLL_NAME "g729dec_sn.dll64P"
130  #endif
131  
132  /****************************************************************
133   *  INCLUDE FILES
134   ****************************************************************/
135  /* ----- system and platform files ----------------------------*/
136  
137  /*-------program files ----------------------------------------*/
138  #include <OMX_Component.h>
139  #include "OMX_G729Decoder.h"
140  /****************************************************************
141   * EXTERNAL REFERENCES NOTE : only use if not found in header file
142   ****************************************************************/
143  /*--------data declarations -----------------------------------*/
144  /*--------function prototypes ---------------------------------*/
145  
146  /****************************************************************
147   * PUBLIC DECLARATIONS Defined here, used elsewhere
148   ****************************************************************/
149  /*--------data declarations -----------------------------------*/
150  
151  /*--------function prototypes ---------------------------------*/
152  
153  /****************************************************************
154   * PRIVATE DECLARATIONS Defined here, used only here
155   ****************************************************************/
156  /*--------data declarations -----------------------------------*/
157  /*--------function prototypes ---------------------------------*/
158  
159  
160  OMX_ERRORTYPE G729DECGetCorresponding_LCMLHeader(G729DEC_COMPONENT_PRIVATE* pComponentPrivate,
161                                                   OMX_U8 *pBuffer,
162                                                   OMX_DIRTYPE eDir,
163                                                   LCML_G729DEC_BUFHEADERTYPE **ppLcmlHdr);
164  
165  OMX_ERRORTYPE G729DECLCML_Callback (TUsnCodecEvent event,void * args [10]);
166  
167  OMX_ERRORTYPE G729DECFill_LCMLInitParams(OMX_HANDLETYPE pHandle,
168                                           LCML_DSP *plcml_Init,OMX_U16 arr[]);
169  
170  
171  OMX_ERRORTYPE G729DECGetBufferDirection(OMX_BUFFERHEADERTYPE *pBufHeader, OMX_DIRTYPE *eDir);
172  OMX_U32 G729DECHandleCommand (G729DEC_COMPONENT_PRIVATE *pComponentPrivate);
173  
174  OMX_ERRORTYPE G729DECHandleDataBuf_FromApp(OMX_BUFFERHEADERTYPE *pBufHeader,
175                                             G729DEC_COMPONENT_PRIVATE *pComponentPrivate);
176  
177  
178  OMX_ERRORTYPE G729DECHandleDataBuf_FromLCML(G729DEC_COMPONENT_PRIVATE* pComponentPrivate);
179  
180  
181  void  AddHeader(BYTE **pFileBuf);
182  void  ResetPtr(BYTE **pFileBuf);
183  OMX_HANDLETYPE G729DECGetLCMLHandle(G729DEC_COMPONENT_PRIVATE* pComponentPrivate);
184  OMX_ERRORTYPE G729DECFreeLCMLHandle(G729DEC_COMPONENT_PRIVATE* pComponentPrivate);
185  OMX_ERRORTYPE G729DEC_CleanupInitParams(OMX_HANDLETYPE pComponent);
186  void G729DEC_SetPending(G729DEC_COMPONENT_PRIVATE *pComponentPrivate, OMX_BUFFERHEADERTYPE *pBufHdr, OMX_DIRTYPE eDir);
187  void G729DEC_ClearPending(G729DEC_COMPONENT_PRIVATE *pComponentPrivate, OMX_BUFFERHEADERTYPE *pBufHdr, OMX_DIRTYPE eDir) ;
188  OMX_U32 G729DEC_IsPending(G729DEC_COMPONENT_PRIVATE *pComponentPrivate, OMX_BUFFERHEADERTYPE *pBufHdr, OMX_DIRTYPE eDir);
189  OMX_ERRORTYPE G729DECFill_LCMLInitParamsEx(OMX_HANDLETYPE pComponent);
190  OMX_U32 G729DEC_IsValid(G729DEC_COMPONENT_PRIVATE *pComponentPrivate, OMX_U8 *pBuffer, OMX_DIRTYPE eDir) ;
191  OMX_ERRORTYPE G729DEC_TransitionToIdle(G729DEC_COMPONENT_PRIVATE *pComponentPrivate);
192  
193  /*--------macros ----------------------------------------------*/
194  
195  #endif
196