www.pudn.com > henclib263.rar > Exceptions.h
/*
* Exceptions.h
*
* Interface of exception funtions.
*
* Copyright (c) 2002-2004 Li Chun-lin(li_chunlin@263.net)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//This header file defines all the exceptions which may happen during encoding.
#ifndef _Exceptionsh
#define _Exceptionsh
#include "HEnc.h"
#ifdef __cplusplus
extern "C" {
#endif
#define E_OPENENC_FORMAT "Exception Happened when open encoder!\n \
This encoder can only encode _SUBQCIP(0),_QCIF(1), _CIF(2), \
_4CIF(3) and _16CIF(4).\nThe encoder is not open.\n"
#define E_OPENENC_NO_MEMORY "Exception Happened when open encoder!\n \
There is not enough memory to run the encoder.\n"
#define E_INITENC_NO_PICTURE "Exception Happened when initiating encoder!\n \
The input picture pointer is NULL.\n \
The encoder has been closed.\n"
#define E_INITENC_NO_OUT_BUFFER "Exception Happened when initiating encoder!\n \
The output buffer pointer is NULL.\n \
The encoder has been closed.\n"
#define E_INITENC_LITTLE_OUT_BUFFER "Exception Happened when initiating encoder!\n \
The output buffer is not enough.Please ENLARGE the buffer.\n \
The encoder has been closed.\n"
#define E_INITENC_WRONG_SEARCH_RANGE "Exception Happened when initiating encoder!\n \
The search range should be [1,15].\n \
The encoder has been closed.\n"
#define E_INITENC_WRONG_QP "Exception Happened when initiating encoder!\n \
The QP should be [1,31].\n \
The encoder has been closed.\n"
#define E_INITENC_WRONG_QI "Exception Happened when initiating encoder!\n \
The QI should be [1,31].\n \
The encoder has been closed.\n"
#define E_INITENC_WRONG_SEARCH_METHOD "Exception Happened when initiating encoder!\n \
The search method should be [1,4].\n \
The encoder has been closed.\n"
#define E_INITENC_WRONG_P_RATE "Exception Happened when initiating encoder!\n \
The P_rate shoule >=0. \n \
The encoder has been closed.\n"
#define E_INITENC_WRONG_FRAMERATE "Exception Happened when initiating encoder!\n \
The framerate shoule >=0. \n \
The encoder has been closed.\n"
//This function is called to free the memories malloced when exception happened during malloc memory.
//errnr : indicates the memories have been malloced.
void deal_exceptions(int errnr, H263VencStatus *encoder, MCParam *mc);
#ifdef __cplusplus
}
#endif
#endif