1e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard/* 2e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** Copyright 2003-2010, VisualOn, Inc. 3e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** 4e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** Licensed under the Apache License, Version 2.0 (the "License"); 5e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** you may not use this file except in compliance with the License. 6e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** You may obtain a copy of the License at 7e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** 8e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** http://www.apache.org/licenses/LICENSE-2.0 9e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** 10e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** Unless required by applicable law or agreed to in writing, software 11e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** distributed under the License is distributed on an "AS IS" BASIS, 12e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** See the License for the specific language governing permissions and 14e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** limitations under the License. 15e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard */ 16e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard/******************************************************************************* 17e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard File: voAAC.h 18e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 19e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Content: AAC codec APIs & data types 20e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 21e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard*******************************************************************************/ 22e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 23e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#ifndef __voAAC_H__ 24e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#define __voAAC_H__ 25e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 26e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#ifdef __cplusplus 27e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern "C" { 28e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#endif /* __cplusplus */ 29e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 30e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#include "voAudio.h" 31e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 32e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard/*! 33e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard * the frame type that the decoder supports 34e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard */ 35e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardtypedef enum { 36e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard VOAAC_RAWDATA = 0, /*!<contains only raw aac data in a frame*/ 37e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard VOAAC_ADTS = 1, /*!<contains ADTS header + raw AAC data in a frame*/ 38e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard VOAAC_FT_MAX = VO_MAX_ENUM_VALUE 39e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard} VOAACFRAMETYPE; 40e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 41e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard/*! 42e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard * the structure for AAC encoder input parameter 43e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard */ 44e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardtypedef struct { 45e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard int sampleRate; /*! audio file sample rate */ 46e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard int bitRate; /*! encoder bit rate in bits/sec */ 47e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard short nChannels; /*! number of channels on input (1,2) */ 48e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard short adtsUsed; /*! whether write adts header */ 49e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard} AACENC_PARAM; 50e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 51e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard/* AAC Param ID */ 52e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#define VO_PID_AAC_Mdoule 0x42211000 53e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#define VO_PID_AAC_ENCPARAM VO_PID_AAC_Mdoule | 0x0040 /*!< get/set AAC encoder parameter, the parameter is a pointer to AACENC_PARAM */ 54e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 55e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard/* AAC decoder error ID */ 56e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#define VO_ERR_AAC_Mdoule 0x82210000 57e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#define VO_ERR_AAC_UNSFILEFORMAT (VO_ERR_AAC_Mdoule | 0xF001) 58e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#define VO_ERR_AAC_UNSPROFILE (VO_ERR_AAC_Mdoule | 0xF002) 59e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 60e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard/** 61e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard * Get audio encoder API interface 62e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard * \param pEncHandle [out] Return the AAC Encoder handle. 63e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard * \retval VO_ERR_OK Succeeded. 64e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard */ 65e2e838afcf03e603a41a0455846eaf9614537c16Mans RullgardVO_S32 VO_API voGetAACEncAPI (VO_AUDIO_CODECAPI * pEncHandle); 66e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 67e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#ifdef __cplusplus 68e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard} 69e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#endif /* __cplusplus */ 70e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 71e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#endif // __voAAC_H__ 72e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 73e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 74e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 75