M4MCS_ErrorCodes.h revision 1dd524b567ef1bb0591eb8adce10d43841376f5d
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/* The input video frame size parameter is undefined */ 63#define M4MCS_ERR_INVALID_INPUT_VIDEO_FRAME_SIZE M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x03) 64/* The input video frame size is non multiple of 16 */ 65#define M4MCS_ERR_INPUT_VIDEO_SIZE_NON_X16 M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x04) 66 67 68/* ----- SET OUTPUT PARAMS ERRORS ----- */ 69 70/* The output video format parameter is undefined */ 71#define M4MCS_ERR_UNDEFINED_OUTPUT_VIDEO_FORMAT M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x10) 72/* The output video frame size parameter is undefined */ 73#define M4MCS_ERR_UNDEFINED_OUTPUT_VIDEO_FRAME_SIZE M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x11) 74/* The output video frame rate parameter is undefined */ 75#define M4MCS_ERR_UNDEFINED_OUTPUT_VIDEO_FRAME_RATE M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x12) 76/* The output audio format parameter is undefined */ 77#define M4MCS_ERR_UNDEFINED_OUTPUT_AUDIO_FORMAT M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x13) 78/* The output video frame size parameter is incompatible with H263 encoding */ 79#define M4MCS_ERR_INVALID_VIDEO_FRAME_SIZE_FOR_H263 M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x14) 80/* The output video frame rate parameter is incompatible with H263 encoding 81 (It can't happen in current version of MCS!) */ 82#define M4MCS_ERR_INVALID_VIDEO_FRAME_RATE_FOR_H263 M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x15) 83/* A null clip duration as been computed, which is unvalid (should never happen!) */ 84#define M4MCS_ERR_DURATION_IS_NULL M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x16) 85/* The .mp4 container cannot handle h263 codec */ 86#define M4MCS_ERR_H263_FORBIDDEN_IN_MP4_FILE M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x17) 87 88 89/* ----- PREPARE DECODERS ERRORS ----- */ 90 91/* H263 Profile (other than 0) is not supported */ 92#define M4MCS_ERR_H263_PROFILE_NOT_SUPPORTED M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x20) 93/* The input file contains an AAC audio track with an invalid sampling frequency 94 (should never happen) */ 95#define M4MCS_ERR_INVALID_AAC_SAMPLING_FREQUENCY M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x21) 96/* The audio conversion (AAC to AMR-NB, or MP3) failed */ 97#define M4MCS_ERR_AUDIO_CONVERSION_FAILED M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x22) 98 99 100/* ----- SET ENCODING PARAMS ERRORS ----- */ 101 102/* Begin cut time is larger than the input clip duration */ 103#define M4MCS_ERR_BEGIN_CUT_LARGER_THAN_DURATION M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x30) 104/* Begin cut and End cut are equals */ 105#define M4MCS_ERR_BEGIN_CUT_EQUALS_END_CUT M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x31) 106/* End cut time is smaller than begin cut time */ 107#define M4MCS_ERR_END_CUT_SMALLER_THAN_BEGIN_CUT M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x32) 108/* Not enough space to store whole output file at given bitrates */ 109#define M4MCS_ERR_MAXFILESIZE_TOO_SMALL M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x33) 110/* Video bitrate is too low (avoid ugly video) */ 111#define M4MCS_ERR_VIDEOBITRATE_TOO_LOW M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x34) 112/* Audio bitrate is too low (16 kbps min for aac, 12.2 for amr, 8 for mp3) */ 113#define M4MCS_ERR_AUDIOBITRATE_TOO_LOW M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x35) 114/* Video bitrate too high (we limit to 800 kbps) */ 115#define M4MCS_ERR_VIDEOBITRATE_TOO_HIGH M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x36) 116/* Audio bitrate too high (we limit to 96 kbps) */ 117#define M4MCS_ERR_AUDIOBITRATE_TOO_HIGH M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x37) 118 119/* ----- OTHERS ERRORS ----- */ 120#define M4MCS_ERR_OUTPUT_FILE_SIZE_TOO_SMALL M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x50) 121#define M4MCS_ERR_NOMORE_SPACE M4OSA_ERR_CREATE(M4_ERR, M4MCS, 0x51) 122#define M4MCS_ERR_FILE_DRM_PROTECTED M4OSA_ERR_CREATE(M4_ERR, M4MCS, 0x52) 123#endif /* __M4MCS_ErrorCodes_H__ */ 124 125