Ap4Results.h
Go to the documentation of this file.00001 /***************************************************************** 00002 | 00003 | AP4 - Result Codes 00004 | 00005 | Copyright 2002-2008 Axiomatic Systems, LLC 00006 | 00007 | 00008 | This file is part of Bento4/AP4 (MP4 Atom Processing Library). 00009 | 00010 | Unless you have obtained Bento4 under a difference license, 00011 | this version of Bento4 is Bento4|GPL. 00012 | Bento4|GPL is free software; you can redistribute it and/or modify 00013 | it under the terms of the GNU General Public License as published by 00014 | the Free Software Foundation; either version 2, or (at your option) 00015 | any later version. 00016 | 00017 | Bento4|GPL is distributed in the hope that it will be useful, 00018 | but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 | GNU General Public License for more details. 00021 | 00022 | You should have received a copy of the GNU General Public License 00023 | along with Bento4|GPL; see the file COPYING. If not, write to the 00024 | Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 00025 | 02111-1307, USA. 00026 | 00027 ****************************************************************/ 00028 00029 #ifndef _AP4_RESULTS_H_ 00030 #define _AP4_RESULTS_H_ 00031 00032 /*---------------------------------------------------------------------- 00033 | constants 00034 +---------------------------------------------------------------------*/ 00035 const int AP4_SUCCESS = 0; 00036 const int AP4_FAILURE = -1; 00037 const int AP4_ERROR_OUT_OF_MEMORY = -2; 00038 const int AP4_ERROR_INVALID_PARAMETERS = -3; 00039 const int AP4_ERROR_NO_SUCH_FILE = -4; 00040 const int AP4_ERROR_PERMISSION_DENIED = -5; 00041 const int AP4_ERROR_CANNOT_OPEN_FILE = -6; 00042 const int AP4_ERROR_EOS = -7; 00043 const int AP4_ERROR_WRITE_FAILED = -8; 00044 const int AP4_ERROR_READ_FAILED = -9; 00045 const int AP4_ERROR_INVALID_FORMAT = -10; 00046 const int AP4_ERROR_NO_SUCH_ITEM = -11; 00047 const int AP4_ERROR_OUT_OF_RANGE = -12; 00048 const int AP4_ERROR_INTERNAL = -13; 00049 const int AP4_ERROR_INVALID_STATE = -14; 00050 const int AP4_ERROR_LIST_EMPTY = -15; 00051 const int AP4_ERROR_LIST_OPERATION_ABORTED = -16; 00052 const int AP4_ERROR_INVALID_RTP_CONSTRUCTOR_TYPE = -17; 00053 const int AP4_ERROR_NOT_SUPPORTED = -18; 00054 const int AP4_ERROR_INVALID_TRACK_TYPE = -19; 00055 const int AP4_ERROR_INVALID_RTP_PACKET_EXTRA_DATA = -20; 00056 const int AP4_ERROR_BUFFER_TOO_SMALL = -21; 00057 const int AP4_ERROR_NOT_ENOUGH_DATA = -22; 00058 const int AP4_ERROR_NOT_ENOUGH_SPACE = -23; 00059 00060 /*---------------------------------------------------------------------- 00061 | utility functions 00062 +---------------------------------------------------------------------*/ 00063 const char* AP4_ResultText(int result); 00064 00065 /*---------------------------------------------------------------------- 00066 | macros 00067 +---------------------------------------------------------------------*/ 00068 #define AP4_FAILED(result) ((result) != AP4_SUCCESS) 00069 #define AP4_SUCCEEDED(result) ((result) == AP4_SUCCESS) 00070 00071 #define AP4_CHECK(_x) do { \ 00072 AP4_Result _result = (_x); \ 00073 if (AP4_FAILED(_result)) return _result; \ 00074 } while(0) 00075 00076 #endif // _AP4_RESULTS_H_
Generated on Thu May 13 16:36:33 2010 for Bento4 MP4 SDK by
