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/**
30* @file OMX_MP3Decoder.h
31*
32* This is an header file for an audio MP3 decoder that is fully
33* compliant with the OMX Audio specification.
34* This the file that the application that uses OMX would include
35* in its code.
36*
37* @path  $(CSLPATH)\OMAPSW_MPU\linux\audio\src\openmax_il\mp3_dec\inc\
38*
39* @rev 1.0
40*/
41/* --------------------------------------------------------------------------- * */
42
43#ifndef OMX_MP3DECODER_H
44#define OMX_MP3DECODER_H
45
46
47#ifdef UNDER_CE
48#include <windows.h>
49#include <oaf_osal.h>
50#include <omx_core.h>
51#include <stdlib.h>
52#else
53#include <pthread.h>
54#endif
55
56#include <OMX_Component.h>
57#include "LCML_DspCodec.h"
58
59#ifndef UNDER_CE
60#define MP3D_RM_MANAGER /* Enable to use Resource Manager functionality */
61#else
62#undef MP3D_RM_MANAGER /* Enable to use Resource Manager functionality */
63#endif
64
65/* #define SWAT_ANALYSIS */   /* Enable to use SWAT functionality */
66/*#define DSP_RENDERING_ON*/ /* Enable to use DASF functionality */
67
68
69/* #define MP3DEC_DEBUG */     /* See all debug statement of the component */
70/*  #define MP3DEC_MEMDETAILS */  /* See memory details of the component */
71/* #define MP3DEC_BUFDETAILS */  /* See buffers details of the component */
72/* #define MP3DEC_STATEDETAILS */ /* See all state transitions of the component
73*/
74/* #define MP3DEC_SWATDETAILS  */ /* See SWAT debug statement of the component */
75
76
77#define MP3_APP_ID  100 /* Defines MP3 Dec App ID, App must use this value */
78#define MP3D_MAX_NUM_OF_BUFS 10 /* Max number of buffers used */
79#define MP3D_NUM_INPUT_BUFFERS 2  /* Default number of input buffers */
80#define MP3D_NUM_OUTPUT_BUFFERS 4 /* Default number of output buffers */
81
82
83//#define MP3D_INPUT_BUFFER_SIZE  100 /* Default size of input buffer */
84//#define MP3D_OUTPUT_BUFFER_SIZE 4608 /* Default size of output buffer */
85
86#define MP3D_MONO_STREAM  1 /* Mono stream index */
87#define MP3D_STEREO_INTERLEAVED_STREAM  2 /* Stereo Interleaved stream index */
88#define MP3D_STEREO_NONINTERLEAVED_STREAM  3 /* Stereo Non-Interleaved stream index */
89
90#define MP3D_STEREO_STREAM  2
91
92#define NUM_OF_PORTS 2 /* Number of ports of component */
93
94/*#define MP3DEC_MEMDEBUG*/
95#undef MP3DEC_MEMDEBUG
96
97
98typedef enum MP3D_COMP_PORT_TYPE {
99    MP3D_INPUT_PORT = 0,
100    MP3D_OUTPUT_PORT
101}MP3D_COMP_PORT_TYPE;
102
103
104typedef enum OMX_INDEXAUDIOTYPE {
105	MP3D_OMX_IndexCustomMode16_24bit = 0xFF000001,
106	MP3D_OMX_IndexCustomModeDasfConfig,
107    OMX_IndexCustomMp3DecHeaderInfoConfig,
108	OMX_IndexCustomMp3DecStreamInfoConfig,
109    OMX_IndexCustomMp3DecDataPath,
110    OMX_IndexCustomDebug
111}OMX_INDEXAUDIOTYPE;
112
113#endif /* OMX_MP3DECODER_H */
114