1/* ------------------------------------------------------------------ 2 * Copyright (C) 1998-2009 PacketVideo 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 13 * express or implied. 14 * See the License for the specific language governing permissions 15 * and limitations under the License. 16 * ------------------------------------------------------------------- 17 */ 18/** 19 * This PVA_FF_ISucceedFail Class is the base class for all other classes here (or will 20 * be SOON) - this provides teh ability to check for failure when reading in an mp4 file 21 */ 22 23#ifndef A_ISUCCEEDFAIL_H_INCLUDED 24#define A_ISUCCEEDFAIL_H_INCLUDED 25 26#include "oscl_types.h" 27 28typedef enum { DEFAULT_ERROR = -1, 29 EVERYTHING_FINE, 30 READ_FAILED, 31 READ_USER_DATA_ATOM_FAILED, 32 READ_PV_USER_DATA_ATOM_FAILED, 33 READ_MEDIA_DATA_ATOM_FAILED, 34 READ_MOVIE_ATOM_FAILED, 35 READ_TRACK_ATOM_FAILED, 36 READ_OBJECT_DESCRIPTOR_ATOM_FAILED, 37 DUPLICATE_MOVIE_ATOMS, 38 DUPLICATE_OBJECT_DESCRIPTORS, 39 DUPLICATE_MOVIE_HEADERS, 40 READ_UNKNOWN_ATOM, 41 MEMORY_ALLOCATION_FAILED 42 } MP4_ERROR_CODE; 43 44class PVA_FF_ISucceedFail 45{ 46 47 public: 48 bool Mp4Success() 49 { 50 return _success; 51 } 52 bool MP4Success() 53 { 54 return _success; 55 } 56 int GetMP4Error() 57 { 58 return _mp4ErrorCode; 59 } 60 61 protected: 62 bool _success; 63 int _mp4ErrorCode; 64}; 65 66#endif 67