1 /* 2 * portaudio.h, port class for audio 3 * 4 * Copyright (c) 2009-2010 Wind River Systems, Inc. 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 #ifndef __PORTAUDIO_H 20 #define __PORTAUDIO_H 21 22 #include <OMX_Core.h> 23 #include <OMX_Component.h> 24 25 #include <portbase.h> 26 27 class PortAudio : public PortBase 28 { 29 public: 30 PortAudio(); 31 32 OMX_ERRORTYPE SetPortAudioParam( 33 const OMX_AUDIO_PARAM_PORTFORMATTYPE *audioparam, 34 bool overwrite_readonly); 35 const OMX_AUDIO_PARAM_PORTFORMATTYPE *GetPortAudioParam(void); 36 37 private: 38 OMX_AUDIO_PARAM_PORTFORMATTYPE audioparam; 39 }; 40 41 /* end of PortAudio */ 42 43 class PortMp3 : public PortAudio 44 { 45 public: 46 PortMp3(); 47 48 OMX_ERRORTYPE SetPortMp3Param(const OMX_AUDIO_PARAM_MP3TYPE *p, 49 bool overwrite_readonly); 50 const OMX_AUDIO_PARAM_MP3TYPE *GetPortMp3Param(void); 51 52 private: 53 OMX_AUDIO_PARAM_MP3TYPE mp3param; 54 }; 55 56 /* end of PortMp3 */ 57 58 class PortAac : public PortAudio 59 { 60 public: 61 PortAac(); 62 63 OMX_ERRORTYPE SetPortAacParam(const OMX_AUDIO_PARAM_AACPROFILETYPE *p, 64 bool overwrite_readonly); 65 const OMX_AUDIO_PARAM_AACPROFILETYPE *GetPortAacParam(void); 66 67 private: 68 OMX_AUDIO_PARAM_AACPROFILETYPE aacparam; 69 }; 70 71 /* end of PortAac */ 72 73 class PortWma : public PortAudio 74 { 75 public: 76 PortWma(); 77 78 OMX_ERRORTYPE SetPortWmaParam(const OMX_AUDIO_PARAM_WMATYPE *p, 79 bool overwrite_readonly); 80 const OMX_AUDIO_PARAM_WMATYPE *GetPortWmaParam(void); 81 82 private: 83 OMX_AUDIO_PARAM_WMATYPE wmaparam; 84 }; 85 86 /* end of PortWma */ 87 88 class PortPcm : public PortAudio 89 { 90 public: 91 PortPcm(); 92 93 OMX_ERRORTYPE SetPortPcmParam(const OMX_AUDIO_PARAM_PCMMODETYPE *p, 94 bool overwrite_readonly); 95 const OMX_AUDIO_PARAM_PCMMODETYPE*GetPortPcmParam(void); 96 97 private: 98 OMX_AUDIO_PARAM_PCMMODETYPE pcmparam; 99 }; 100 101 /* end of PortPcm */ 102 103 class PortAmr : public PortAudio 104 { 105 public: 106 PortAmr(); 107 108 OMX_ERRORTYPE SetPortAmrParam(const OMX_AUDIO_PARAM_AMRTYPE *p, 109 bool overwrite_readonly); 110 const OMX_AUDIO_PARAM_AMRTYPE*GetPortAmrParam(void); 111 112 private: 113 OMX_AUDIO_PARAM_AMRTYPE amrparam; 114 }; 115 116 /* end of PortAmr */ 117 118 119 #endif /* __PORTAUDIO_H */ 120