Home | History | Annotate | Download | only in inc
      1 /*
      2  * Copyright (C) 2011 The Android Open Source Project
      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 express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 /**
     17  ******************************************************************************
     18  * @file    M4VSS3GPP_ErrorCodes.h
     19  * @brief    Video Studio Service 3GPP error definitions.
     20  * @note
     21  ******************************************************************************
     22  */
     23 
     24 #ifndef __M4VSS3GPP_ErrorCodes_H__
     25 #define __M4VSS3GPP_ErrorCodes_H__
     26 
     27 /**
     28  *    OSAL basic types and errors */
     29 #include "M4OSA_Types.h"
     30 #include "M4OSA_Error.h"
     31 
     32 /**
     33  *    OSAL core ID definitions */
     34 #include "M4OSA_CoreID.h"
     35 
     36 
     37 /************************************************************************/
     38 /* Warning codes                                                        */
     39 /************************************************************************/
     40 
     41 /**
     42  *    End of edition, user should now call M4VSS3GPP_editClose() */
     43 #define M4VSS3GPP_WAR_EDITING_DONE             M4OSA_ERR_CREATE( M4_WAR, M4VSS3GPP, 0x0001)
     44 
     45 /**
     46  *    End of audio mixing, user should now call M4VSS3GPP_audioMixingCleanUp() */
     47 #define M4VSS3GPP_WAR_END_OF_AUDIO_MIXING      M4OSA_ERR_CREATE( M4_WAR, M4VSS3GPP, 0x0010)
     48 
     49 /**
     50  *    End of extract picture, user should now call M4VSS3GPP_extractPictureCleanUp() */
     51 #define M4VSS3GPP_WAR_END_OF_EXTRACT_PICTURE   M4OSA_ERR_CREATE( M4_WAR, M4VSS3GPP, 0x0020)
     52 /* RC: to know when a file has been processed */
     53 #define M4VSS3GPP_WAR_SWITCH_CLIP              M4OSA_ERR_CREATE( M4_WAR, M4VSS3GPP, 0x0030)
     54 
     55 /************************************************************************/
     56 /* Error codes                                                          */
     57 /************************************************************************/
     58 
     59 /**
     60  * Invalid file type */
     61 #define M4VSS3GPP_ERR_INVALID_FILE_TYPE               M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0001)
     62 /**
     63  * Invalid effect kind */
     64 #define M4VSS3GPP_ERR_INVALID_EFFECT_KIND             M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0002)
     65 /**
     66  * Invalid effect type for video */
     67 #define M4VSS3GPP_ERR_INVALID_VIDEO_EFFECT_TYPE       M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0003)
     68 /**
     69  * Invalid effect type for audio */
     70 #define M4VSS3GPP_ERR_INVALID_AUDIO_EFFECT_TYPE       M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0004)
     71 /**
     72  * Invalid transition type for video */
     73 #define M4VSS3GPP_ERR_INVALID_VIDEO_TRANSITION_TYPE   M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0005)
     74 /**
     75  * Invalid transition type for audio */
     76 #define M4VSS3GPP_ERR_INVALID_AUDIO_TRANSITION_TYPE   M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0006)
     77 /**
     78  * Invalid video encoding frame rate */
     79 #define M4VSS3GPP_ERR_INVALID_VIDEO_ENCODING_FRAME_RATE        \
     80                                       M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0007)
     81  /**
     82  * External effect function is used without being set */
     83 #define M4VSS3GPP_ERR_EXTERNAL_EFFECT_NULL            M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0008)
     84 /**
     85  * External transition function is used without being set */
     86 #define M4VSS3GPP_ERR_EXTERNAL_TRANSITION_NULL        M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0009)
     87 
     88 /**
     89  * Begin cut time is larger than the clip duration */
     90 #define M4VSS3GPP_ERR_BEGIN_CUT_LARGER_THAN_DURATION  M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0010)
     91 /**
     92  * Begin cut time is larger or equal than end cut */
     93 #define M4VSS3GPP_ERR_BEGIN_CUT_LARGER_THAN_END_CUT   M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0011)
     94 /**
     95  * Two consecutive transitions are overlapping on one clip */
     96 #define M4VSS3GPP_ERR_OVERLAPPING_TRANSITIONS         M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0012)
     97 
     98 /**
     99  * An input 3GPP file is invalid/corrupted */
    100 #define M4VSS3GPP_ERR_INVALID_3GPP_FILE               M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0016)
    101 /**
    102  * A file contains an unsupported video format */
    103 #define M4VSS3GPP_ERR_UNSUPPORTED_INPUT_VIDEO_FORMAT  M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0017)
    104 /**
    105  * A file contains an unsupported audio format */
    106 #define M4VSS3GPP_ERR_UNSUPPORTED_INPUT_AUDIO_FORMAT  M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0018)
    107 
    108 /**
    109  * A file format is not supported by the VSS */
    110 #define M4VSS3GPP_ERR_AMR_EDITING_UNSUPPORTED         M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0019)
    111  /**
    112  *    An input clip has an unexpectedly large Video AU */
    113 #define M4VSS3GPP_ERR_INPUT_VIDEO_AU_TOO_LARGE        M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x001A)
    114 /**
    115  *    An input clip has an unexpectedly large Audio AU */
    116 #define M4VSS3GPP_ERR_INPUT_AUDIO_AU_TOO_LARGE        M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x001B)
    117 /**
    118  *    An input clip has a corrupted Audio AMR AU */
    119 #define M4VSS3GPP_ERR_INPUT_AUDIO_CORRUPTED_AU       M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x001C)
    120 /**
    121  * The video encoder encountered an Acces Unit error: very probably a file write error */
    122 #define M4VSS3GPP_ERR_ENCODER_ACCES_UNIT_ERROR       M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x001D)
    123 
    124 
    125 /************************************************************************/
    126 /* Errors returned by M4VSS3GPP_editAnalyseClip()                       */
    127 /************************************************************************/
    128 
    129 /**
    130  * Unsupported video format for Video Editing */
    131 #define M4VSS3GPP_ERR_EDITING_UNSUPPORTED_VIDEO_FORMAT M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0020)
    132 /**
    133  * Unsupported H263 profile for Video Editing */
    134 #define M4VSS3GPP_ERR_EDITING_UNSUPPORTED_H263_PROFILE M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0021)
    135 /**
    136  * Unsupported MPEG-4 profile for Video Editing */
    137 #define M4VSS3GPP_ERR_EDITING_UNSUPPORTED_MPEG4_PROFILE    \
    138                                              M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0022)
    139 /**
    140  * Unsupported MPEG-4 RVLC tool for Video Editing */
    141 #define M4VSS3GPP_ERR_EDITING_UNSUPPORTED_MPEG4_RVLC   M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0023)
    142 /**
    143  * Unsupported audio format for Video Editing */
    144 #define M4VSS3GPP_ERR_EDITING_UNSUPPORTED_AUDIO_FORMAT M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0024)
    145  /**
    146  * File contains no supported stream */
    147 #define M4VSS3GPP_ERR_EDITING_NO_SUPPORTED_STREAM_IN_FILE    M4OSA_ERR_CREATE( M4_ERR,\
    148                                                                             M4VSS3GPP, 0x0025)
    149 /**
    150  * File contains no video stream or an unsupported video stream */
    151 #define M4VSS3GPP_ERR_EDITING_NO_SUPPORTED_VIDEO_STREAM_IN_FILE    M4OSA_ERR_CREATE( M4_ERR,\
    152                                                                                 M4VSS3GPP, 0x0026)
    153 /**
    154  * Unsupported video profile for Video Editing */
    155 #define M4VSS3GPP_ERR_EDITING_UNSUPPORTED_VIDEO_PROFILE M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0027)
    156 
    157 /**
    158  * Unsupported video profile for Video Editing */
    159 #define M4VSS3GPP_ERR_EDITING_UNSUPPORTED_VIDEO_LEVEL M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0028)
    160 
    161 /************************************************************************/
    162 /* Errors returned by M4VSS3GPP_editCheckClipCompatibility()            */
    163 /************************************************************************/
    164 
    165 /**
    166  * At least one of the clip analysis has been generated by another version of the VSS 3GPP */
    167 #define M4VSS3GPP_ERR_INVALID_CLIP_ANALYSIS_VERSION   M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0030)
    168 /**
    169  * Clips don't have the same video format (H263 or MPEG4) */
    170 #define M4VSS3GPP_ERR_INCOMPATIBLE_VIDEO_FORMAT       M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0031)
    171 /**
    172  *    Clips don't have the same frame size */
    173 #define M4VSS3GPP_ERR_INCOMPATIBLE_VIDEO_FRAME_SIZE   M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0032)
    174 /**
    175  *    Clips don't have the same MPEG-4 time scale */
    176 #define M4VSS3GPP_ERR_INCOMPATIBLE_VIDEO_TIME_SCALE   M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0033)
    177 /**
    178  *    Clips don't have the same use of MPEG-4 data partitioning */
    179 #define M4VSS3GPP_ERR_INCOMPATIBLE_VIDEO_DATA_PARTITIONING    M4OSA_ERR_CREATE( M4_ERR,\
    180                                                                               M4VSS3GPP, 0x0034)
    181 /**
    182  *    MP3 clips can't be assembled */
    183 #define M4VSS3GPP_ERR_UNSUPPORTED_MP3_ASSEMBLY        M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0035)
    184 /**
    185  *  Clips don't have the same audio stream type (ex: AMR != AAC) */
    186 #define M4VSS3GPP_WAR_INCOMPATIBLE_AUDIO_STREAM_TYPE  M4OSA_ERR_CREATE( M4_WAR, M4VSS3GPP, 0x0036)
    187 /**
    188  *  Clips don't have the same audio number of channels (ex: stereo != mono) */
    189 #define M4VSS3GPP_WAR_INCOMPATIBLE_AUDIO_NB_OF_CHANNELS        M4OSA_ERR_CREATE( M4_WAR,\
    190                                                                             M4VSS3GPP, 0x0037)
    191 /**
    192  *  Clips don't have the same sampling frequency (ex: 44100Hz != 16000Hz) */
    193 #define M4VSS3GPP_WAR_INCOMPATIBLE_AUDIO_SAMPLING_FREQUENCY    M4OSA_ERR_CREATE( M4_WAR,\
    194                                                                               M4VSS3GPP, 0x0038)
    195 
    196 /************************************************************************/
    197 /* Audio mixing error codes                                            */
    198 /************************************************************************/
    199 
    200 /**
    201  * The input 3GPP file does not contain any supported audio or video track */
    202 #define M4VSS3GPP_ERR_NO_SUPPORTED_STREAM_IN_FILE     M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0050)
    203 /**
    204  * The Volume of the added audio track (AddVolume) must be strictly superior than zero */
    205 #define M4VSS3GPP_ERR_ADDVOLUME_EQUALS_ZERO           M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0051)
    206 /**
    207  * The time at which the audio track is added (AddCts) can't be superior than the
    208    input video track duration */
    209 #define M4VSS3GPP_ERR_ADDCTS_HIGHER_THAN_VIDEO_DURATION        M4OSA_ERR_CREATE( M4_ERR,\
    210                                                                             M4VSS3GPP, 0x0052)
    211 /**
    212  * The audio track file format setting is undefined */
    213 #define M4VSS3GPP_ERR_UNDEFINED_AUDIO_TRACK_FILE_FORMAT        M4OSA_ERR_CREATE( M4_ERR,\
    214                                                                             M4VSS3GPP, 0x0053)
    215 /**
    216  * The added audio track stream has an unsupported format */
    217 #define M4VSS3GPP_ERR_UNSUPPORTED_ADDED_AUDIO_STREAM   M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0054)
    218 /**
    219  * The audio mixing feature doesn't support EVRC, MP3 audio tracks */
    220 #define M4VSS3GPP_ERR_AUDIO_MIXING_UNSUPPORTED         M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0055)
    221 /**
    222  * An added audio track limit the available features: uiAddCts must be 0
    223    and bRemoveOriginal must be M4OSA_TRUE */
    224 #define M4VSS3GPP_ERR_FEATURE_UNSUPPORTED_WITH_AUDIO_TRACK  M4OSA_ERR_CREATE( M4_ERR,\
    225                                                                               M4VSS3GPP, 0x0056)
    226 /**
    227  * Input audio track is not AMR-NB nor AAC so it can't be mixed with output */
    228 #define M4VSS3GPP_ERR_AUDIO_CANNOT_BE_MIXED                    M4OSA_ERR_CREATE( M4_ERR,\
    229                                                                               M4VSS3GPP, 0x0057)
    230 /**
    231  * Input clip must be a 3gpp file */
    232 #define M4VSS3GPP_ERR_INPUT_CLIP_IS_NOT_A_3GPP              M4OSA_ERR_CREATE( M4_ERR,\
    233                                                                               M4VSS3GPP, 0x0058)
    234 /**
    235  * Begin loop time is higher than end loop time or higher than added clip duration */
    236 #define M4VSS3GPP_ERR_BEGINLOOP_HIGHER_ENDLOOP              M4OSA_ERR_CREATE( M4_ERR,\
    237                                                                               M4VSS3GPP, 0x0059)
    238 
    239 
    240 /************************************************************************/
    241 /* Audio mixing and extract picture error code                          */
    242 /************************************************************************/
    243 
    244 /**
    245  * H263 Profile 3 level 10 is not supported */
    246 #define M4VSS3GPP_ERR_H263_PROFILE_NOT_SUPPORTED            M4OSA_ERR_CREATE( M4_ERR,\
    247                                                                             M4VSS3GPP, 0x0060)
    248 /**
    249  * File contains no video stream or an unsupported video stream */
    250 #define M4VSS3GPP_ERR_NO_SUPPORTED_VIDEO_STREAM_IN_FILE        M4OSA_ERR_CREATE( M4_ERR,\
    251                                                                             M4VSS3GPP, 0x0061)
    252 
    253 
    254 /************************************************************************/
    255 /* Internal error and warning codes                                     */
    256 /************************************************************************/
    257 
    258 /**
    259  * Internal state error */
    260 #define M4VSS3GPP_ERR_INTERNAL_STATE                 M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0100)
    261 /**
    262  * Luminance filter effect error */
    263 #define M4VSS3GPP_ERR_LUMA_FILTER_ERROR              M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0104)
    264 /**
    265  * Transition filter effect error */
    266 #define M4VSS3GPP_ERR_TRANSITION_FILTER_ERROR        M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0106)
    267 /**
    268  * The audio decoder initialization failed */
    269 #define M4VSS3GPP_ERR_AUDIO_DECODER_INIT_FAILED      M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0110)
    270 /**
    271  * The decoder produced an unattended amount of PCM */
    272 #define M4VSS3GPP_ERR_AUDIO_DECODED_PCM_SIZE_ISSUE   M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0115)
    273 /**
    274  * Output file must be 3GPP or MP3 */
    275 #define M4VSS3GPP_ERR_OUTPUT_FILE_TYPE_ERROR         M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0117)
    276 /**
    277  * Can not find a valid video frame */
    278 #define M4VSS3GPP_ERR_NO_VALID_VID_FRAME         M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0118)
    279 
    280 #endif /* __M4VSS3GPP_ErrorCodes_H__ */
    281 
    282