M4MCS_ErrorCodes.h revision 7c9d8018755adf1857571125ba1b3598c96ea506
1/* 2 * Copyright (C) 2004-2011 NXP Software 3 * Copyright (C) 2011 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18/** 19 ************************************************************************* 20 * @file M4MCS_API.h 21 * @brief MCS error codes definitions (Media Compressor Service) 22 * @note 23 ************************************************************************* 24 **/ 25 26#ifndef __M4MCS_ErrorCodes_H__ 27#define __M4MCS_ErrorCodes_H__ 28 29/** 30 * OSAL basic types and errors */ 31#include "M4OSA_Types.h" 32#include "M4OSA_Error.h" 33 34/** 35 * OSAL core ID definitions */ 36#include "M4OSA_CoreID.h" 37 38 39/************************************************************************/ 40/* Warning codes */ 41/************************************************************************/ 42 43/* End of processing, user should now call M4MCS_close() */ 44#define M4MCS_WAR_TRANSCODING_DONE M4OSA_ERR_CREATE( M4_WAR, M4MCS, 0x1) 45/* Mediatype is not supported by the MCS */ 46#define M4MCS_WAR_MEDIATYPE_NOT_SUPPORTED M4OSA_ERR_CREATE( M4_WAR, M4MCS, 0x2) 47/* Indicate that picture will be automatically resized to fit into the required 48 parameters (file size) */ 49#define M4MCS_WAR_PICTURE_AUTO_RESIZE M4OSA_ERR_CREATE( M4_WAR, M4MCS, 0x3) 50 51/************************************************************************/ 52/* Error codes */ 53/************************************************************************/ 54 55 56/* ----- OPEN ERRORS ----- */ 57 58/* The input file contains no supported stream (may be a corrupted file) */ 59#define M4MCS_ERR_INPUT_FILE_CONTAINS_NO_SUPPORTED_STREAM M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x01) 60/* The input file is invalid/corrupted */ 61#define M4MCS_ERR_INVALID_INPUT_FILE M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x02) 62 63 64/* ----- SET OUTPUT PARAMS ERRORS ----- */ 65 66/* The output video format parameter is undefined */ 67#define M4MCS_ERR_UNDEFINED_OUTPUT_VIDEO_FORMAT M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x10) 68/* The output video frame size parameter is undefined */ 69#define M4MCS_ERR_UNDEFINED_OUTPUT_VIDEO_FRAME_SIZE M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x11) 70/* The output video frame rate parameter is undefined */ 71#define M4MCS_ERR_UNDEFINED_OUTPUT_VIDEO_FRAME_RATE M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x12) 72/* The output audio format parameter is undefined */ 73#define M4MCS_ERR_UNDEFINED_OUTPUT_AUDIO_FORMAT M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x13) 74/* The output video frame size parameter is incompatible with H263 encoding */ 75#define M4MCS_ERR_INVALID_VIDEO_FRAME_SIZE_FOR_H263 M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x14) 76/* The output video frame rate parameter is incompatible with H263 encoding 77 (It can't happen in current version of MCS!) */ 78#define M4MCS_ERR_INVALID_VIDEO_FRAME_RATE_FOR_H263 M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x15) 79/* A null clip duration as been computed, which is unvalid (should never happen!) */ 80#define M4MCS_ERR_DURATION_IS_NULL M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x16) 81/* The .mp4 container cannot handle h263 codec */ 82#define M4MCS_ERR_H263_FORBIDDEN_IN_MP4_FILE M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x17) 83 84 85/* ----- PREPARE DECODERS ERRORS ----- */ 86 87/* H263 Profile (other than 0) is not supported */ 88#define M4MCS_ERR_H263_PROFILE_NOT_SUPPORTED M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x20) 89/* The input file contains an AAC audio track with an invalid sampling frequency 90 (should never happen) */ 91#define M4MCS_ERR_INVALID_AAC_SAMPLING_FREQUENCY M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x21) 92/* The audio conversion (AAC to AMR-NB, or MP3) failed */ 93#define M4MCS_ERR_AUDIO_CONVERSION_FAILED M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x22) 94 95 96/* ----- SET ENCODING PARAMS ERRORS ----- */ 97 98/* Begin cut time is larger than the input clip duration */ 99#define M4MCS_ERR_BEGIN_CUT_LARGER_THAN_DURATION M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x30) 100/* Begin cut and End cut are equals */ 101#define M4MCS_ERR_BEGIN_CUT_EQUALS_END_CUT M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x31) 102/* End cut time is smaller than begin cut time */ 103#define M4MCS_ERR_END_CUT_SMALLER_THAN_BEGIN_CUT M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x32) 104/* Not enough space to store whole output file at given bitrates */ 105#define M4MCS_ERR_MAXFILESIZE_TOO_SMALL M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x33) 106/* Video bitrate is too low (avoid ugly video) */ 107#define M4MCS_ERR_VIDEOBITRATE_TOO_LOW M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x34) 108/* Audio bitrate is too low (16 kbps min for aac, 12.2 for amr, 8 for mp3) */ 109#define M4MCS_ERR_AUDIOBITRATE_TOO_LOW M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x35) 110/* Video bitrate too high (we limit to 800 kbps) */ 111#define M4MCS_ERR_VIDEOBITRATE_TOO_HIGH M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x36) 112/* Audio bitrate too high (we limit to 96 kbps) */ 113#define M4MCS_ERR_AUDIOBITRATE_TOO_HIGH M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x37) 114 115/* ----- OTHERS ERRORS ----- */ 116#define M4MCS_ERR_OUTPUT_FILE_SIZE_TOO_SMALL M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x50) 117#define M4MCS_ERR_NOMORE_SPACE M4OSA_ERR_CREATE(M4_ERR, M4MCS, 0x51) 118 119#endif /* __M4MCS_ErrorCodes_H__ */ 120 121