iaudenc.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2009, Texas Instruments Incorporated
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  *
00009  * *  Redistributions of source code must retain the above copyright
00010  *    notice, this list of conditions and the following disclaimer.
00011  *
00012  * *  Redistributions in binary form must reproduce the above copyright
00013  *    notice, this list of conditions and the following disclaimer in the
00014  *    documentation and/or other materials provided with the distribution.
00015  *
00016  * *  Neither the name of Texas Instruments Incorporated nor the names of
00017  *    its contributors may be used to endorse or promote products derived
00018  *    from this software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00021  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00022  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00023  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00024  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00025  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00026  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00027  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00028  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00029  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00030  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031  * 
00032  */
00033 
00050 #ifndef ti_xdais_dm_IAUDENC_
00051 #define ti_xdais_dm_IAUDENC_
00052 
00053 #include <ti/xdais/ialg.h>
00054 #include <ti/xdais/xdas.h>
00055 
00056 /*
00057  * By definition, this interface is 0.9 XDM.  Before including xdm.h,
00058  * define XDM_INCLUDE_DOT9_SUPPORT
00059  */
00060 #ifndef XDM_INCLUDE_DOT9_SUPPORT
00061 #define XDM_INCLUDE_DOT9_SUPPORT
00062 #endif
00063 #include "xdm.h"
00064 #include "iaudio.h"
00065 
00066 #ifdef __cplusplus
00067 extern "C" {
00068 #endif
00069 
00072 
00073 #define IAUDENC_CID      "ti.xdais.dm.IAUDENC"  
00075 #define IAUDENC_ERUNTIME  XDM_ERUNTIME          
00076 #define IAUDENC_EOK       XDM_EOK               
00077 #define IAUDENC_EFAIL     XDM_EFAIL             
00083 typedef struct IAUDENC_Obj {
00084     struct IAUDENC_Fxns *fxns;
00085 } IAUDENC_Obj;
00086 
00087 
00091 typedef struct IAUDENC_Obj  *IAUDENC_Handle;
00092 
00093 
00103 typedef struct IAUDENC_Params {
00104     XDAS_Int32 size;            
00105     XDAS_Int32 encodingPreset;  
00108     XDAS_Int32 maxSampleRate;   
00113     XDAS_Int32 maxBitrate;      
00118     XDAS_Int32 maxNoOfCh;       
00121     XDAS_Int32 dataEndianness;  
00124 } IAUDENC_Params;
00125 
00126 
00141 typedef struct IAUDENC_DynamicParams {
00142     XDAS_Int32 size;            
00143     XDAS_Int32 inputFormat;     
00146     XDAS_Int32 bitRate;         
00147     XDAS_Int32 sampleRate;      
00152     XDAS_Int32 numChannels;     
00155     XDAS_Int32 numLFEChannels;  
00158     XDAS_Int32 inputBitsPerSample;
00162 } IAUDENC_DynamicParams;
00163 
00164 
00173 typedef struct IAUDENC_InArgs {
00174     XDAS_Int32 size;            
00175 } IAUDENC_InArgs;
00176 
00177 
00185 typedef struct IAUDENC_Status {
00186     XDAS_Int32 size;            
00187     XDAS_Int32 extendedError;   
00188     XDAS_Int32 frameLen;        
00191     XDM_AlgBufInfo bufInfo;     
00195 } IAUDENC_Status;
00196 
00197 
00206 typedef struct IAUDENC_OutArgs {
00207     XDAS_Int32 size;            
00208     XDAS_Int32 extendedError;   
00209     XDAS_Int32 bytesGenerated;  
00212 } IAUDENC_OutArgs;
00213 
00214 
00225 typedef  IALG_Cmd IAUDENC_Cmd;
00226 
00227 
00231 typedef struct IAUDENC_Fxns{
00232     IALG_Fxns   ialg;             
00277     XDAS_Int32  (*process)(IAUDENC_Handle handle, XDM_BufDesc *inBufs,
00278         XDM_BufDesc *outBufs, IAUDENC_InArgs *inArgs,
00279         IAUDENC_OutArgs *outArgs);
00280 
00281 
00303     XDAS_Int32  (*control)(IAUDENC_Handle handle, IAUDENC_Cmd id,
00304         IAUDENC_DynamicParams *params, IAUDENC_Status *status);
00305 
00306 } IAUDENC_Fxns;
00307 
00308 
00311 #ifdef __cplusplus
00312 }
00313 #endif
00314 
00315 #endif
00316 /*
00317  *  @(#) ti.xdais.dm; 1, 0, 5,194; 3-13-2009 12:27:48; /db/wtree/library/trees/dais/dais-o05x/src/
00318  */
00319 

Copyright 2009, Texas Instruments Incorporated