/* ** Copyright 2003-2010, VisualOn, Inc. ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ /******************************************************************************* File: voAudio.h Content: Audio types and functions *******************************************************************************/ #ifndef __voAudio_H__ #define __voAudio_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "voIndex.h" #include "voMem.h" #define VO_PID_AUDIO_BASE 0x42000000 /*!< The base param ID for AUDIO codec */ #define VO_PID_AUDIO_FORMAT (VO_PID_AUDIO_BASE | 0X0001) /*!< The format data of audio in track */ #define VO_PID_AUDIO_SAMPLEREATE (VO_PID_AUDIO_BASE | 0X0002) /*!< The sample rate of audio */ #define VO_PID_AUDIO_CHANNELS (VO_PID_AUDIO_BASE | 0X0003) /*!< The channel of audio */ #define VO_PID_AUDIO_BITRATE (VO_PID_AUDIO_BASE | 0X0004) /*!< The bit rate of audio */ #define VO_PID_AUDIO_CHANNELMODE (VO_PID_AUDIO_BASE | 0X0005) /*!< The channel mode of audio */ #define VO_ERR_AUDIO_BASE 0x82000000 #define VO_ERR_AUDIO_UNSCHANNEL VO_ERR_AUDIO_BASE | 0x0001 #define VO_ERR_AUDIO_UNSSAMPLERATE VO_ERR_AUDIO_BASE | 0x0002 #define VO_ERR_AUDIO_UNSFEATURE VO_ERR_AUDIO_BASE | 0x0003 /** *Enumeration used to define the possible audio coding formats. */ typedef enum VO_AUDIO_CODINGTYPE { VO_AUDIO_CodingUnused = 0, /**< Placeholder value when coding is N/A */ VO_AUDIO_CodingPCM, /**< Any variant of PCM coding */ VO_AUDIO_CodingADPCM, /**< Any variant of ADPCM encoded data */ VO_AUDIO_CodingAMRNB, /**< Any variant of AMR encoded data */ VO_AUDIO_CodingAMRWB, /**< Any variant of AMR encoded data */ VO_AUDIO_CodingAMRWBP, /**< Any variant of AMR encoded data */ VO_AUDIO_CodingQCELP13, /**< Any variant of QCELP 13kbps encoded data */ VO_AUDIO_CodingEVRC, /**< Any variant of EVRC encoded data */ VO_AUDIO_CodingAAC, /**< Any variant of AAC encoded data, 0xA106 - ISO/MPEG-4 AAC, 0xFF - AAC */ VO_AUDIO_CodingAC3, /**< Any variant of AC3 encoded data */ VO_AUDIO_CodingFLAC, /**< Any variant of FLAC encoded data */ VO_AUDIO_CodingMP1, /**< Any variant of MP1 encoded data */ VO_AUDIO_CodingMP3, /**< Any variant of MP3 encoded data */ VO_AUDIO_CodingOGG, /**< Any variant of OGG encoded data */ VO_AUDIO_CodingWMA, /**< Any variant of WMA encoded data */ VO_AUDIO_CodingRA, /**< Any variant of RA encoded data */ VO_AUDIO_CodingMIDI, /**< Any variant of MIDI encoded data */ VO_AUDIO_CodingDRA, /**< Any variant of dra encoded data */ VO_AUDIO_CodingG729, /**< Any variant of dra encoded data */ VO_AUDIO_Coding_MAX = VO_MAX_ENUM_VALUE } VO_AUDIO_CODINGTYPE; /*! * the channel type value */ typedef enum { VO_CHANNEL_CENTER = 1, /*!
InputUsed is total used input data size in byte. * \retval VO_ERR_NONE Succeeded. * VO_ERR_INPUT_BUFFER_SMALL. The input was finished or the input data was not enought. Continue to input * data before next call. */ VO_U32 (VO_API * GetOutputData) (VO_HANDLE hCodec, VO_CODECBUFFER * pOutBuffer, VO_AUDIO_OUTPUTINFO * pOutInfo); /** * Set the parameter for the specified param ID. * \param hCodec [IN]] The codec handle which was created by Init function. * \param uParamID [IN] The param ID. * \param pData [IN] The param value. * \retval VO_ERR_NONE Succeeded. */ VO_U32 (VO_API * SetParam) (VO_HANDLE hCodec, VO_S32 uParamID, VO_PTR pData); /** * Get the parameter for the specified param ID. * \param hCodec [IN]] The codec handle which was created by Init function. * \param uParamID [IN] The param ID. * \param pData [IN] The param value. * \retval VO_ERR_NONE Succeeded. */ VO_U32 (VO_API * GetParam) (VO_HANDLE hCodec, VO_S32 uParamID, VO_PTR pData); /** * Uninit the Codec. * \param hCodec [IN]] The codec handle which was created by Init function. * \retval VO_ERR_NONE Succeeded. */ VO_U32 (VO_API * Uninit) (VO_HANDLE hCodec); } VO_AUDIO_CODECAPI; #ifdef __cplusplus } #endif /* __cplusplus */ #endif // __voAudio_H__