M4VSS3GPP_ErrorCodes.h revision 7dbd2c46824000ce473966637c11b8564682cb55
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 H264 profile for Video Editing */
155#define M4VSS3GPP_ERR_EDITING_UNSUPPORTED_H264_PROFILE M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0027)
156
157/************************************************************************/
158/* Errors returned by M4VSS3GPP_editCheckClipCompatibility()            */
159/************************************************************************/
160
161/**
162 * At least one of the clip analysis has been generated by another version of the VSS 3GPP */
163#define M4VSS3GPP_ERR_INVALID_CLIP_ANALYSIS_VERSION   M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0030)
164/**
165 * Clips don't have the same video format (H263 or MPEG4) */
166#define M4VSS3GPP_ERR_INCOMPATIBLE_VIDEO_FORMAT       M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0031)
167/**
168 *    Clips don't have the same frame size */
169#define M4VSS3GPP_ERR_INCOMPATIBLE_VIDEO_FRAME_SIZE   M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0032)
170/**
171 *    Clips don't have the same MPEG-4 time scale */
172#define M4VSS3GPP_ERR_INCOMPATIBLE_VIDEO_TIME_SCALE   M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0033)
173/**
174 *    Clips don't have the same use of MPEG-4 data partitioning */
175#define M4VSS3GPP_ERR_INCOMPATIBLE_VIDEO_DATA_PARTITIONING    M4OSA_ERR_CREATE( M4_ERR,\
176                                                                              M4VSS3GPP, 0x0034)
177/**
178 *    MP3 clips can't be assembled */
179#define M4VSS3GPP_ERR_UNSUPPORTED_MP3_ASSEMBLY        M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0035)
180/**
181 *  Clips don't have the same audio stream type (ex: AMR != AAC) */
182#define M4VSS3GPP_WAR_INCOMPATIBLE_AUDIO_STREAM_TYPE  M4OSA_ERR_CREATE( M4_WAR, M4VSS3GPP, 0x0036)
183/**
184 *  Clips don't have the same audio number of channels (ex: stereo != mono) */
185#define M4VSS3GPP_WAR_INCOMPATIBLE_AUDIO_NB_OF_CHANNELS        M4OSA_ERR_CREATE( M4_WAR,\
186                                                                            M4VSS3GPP, 0x0037)
187/**
188 *  Clips don't have the same sampling frequency (ex: 44100Hz != 16000Hz) */
189#define M4VSS3GPP_WAR_INCOMPATIBLE_AUDIO_SAMPLING_FREQUENCY    M4OSA_ERR_CREATE( M4_WAR,\
190                                                                              M4VSS3GPP, 0x0038)
191
192/************************************************************************/
193/* Audio mixing error codes                                            */
194/************************************************************************/
195
196/**
197 * The input 3GPP file does not contain any supported audio or video track */
198#define M4VSS3GPP_ERR_NO_SUPPORTED_STREAM_IN_FILE     M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0050)
199/**
200 * The Volume of the added audio track (AddVolume) must be strictly superior than zero */
201#define M4VSS3GPP_ERR_ADDVOLUME_EQUALS_ZERO           M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0051)
202/**
203 * The time at which the audio track is added (AddCts) can't be superior than the
204   input video track duration */
205#define M4VSS3GPP_ERR_ADDCTS_HIGHER_THAN_VIDEO_DURATION        M4OSA_ERR_CREATE( M4_ERR,\
206                                                                            M4VSS3GPP, 0x0052)
207/**
208 * The audio track file format setting is undefined */
209#define M4VSS3GPP_ERR_UNDEFINED_AUDIO_TRACK_FILE_FORMAT        M4OSA_ERR_CREATE( M4_ERR,\
210                                                                            M4VSS3GPP, 0x0053)
211/**
212 * The added audio track stream has an unsupported format */
213#define M4VSS3GPP_ERR_UNSUPPORTED_ADDED_AUDIO_STREAM   M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0054)
214/**
215 * The audio mixing feature doesn't support EVRC, MP3 audio tracks */
216#define M4VSS3GPP_ERR_AUDIO_MIXING_UNSUPPORTED         M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0055)
217/**
218 * An added audio track limit the available features: uiAddCts must be 0
219   and bRemoveOriginal must be M4OSA_TRUE */
220#define M4VSS3GPP_ERR_FEATURE_UNSUPPORTED_WITH_AUDIO_TRACK  M4OSA_ERR_CREATE( M4_ERR,\
221                                                                              M4VSS3GPP, 0x0056)
222/**
223 * Input audio track is not AMR-NB nor AAC so it can't be mixed with output */
224#define M4VSS3GPP_ERR_AUDIO_CANNOT_BE_MIXED                    M4OSA_ERR_CREATE( M4_ERR,\
225                                                                              M4VSS3GPP, 0x0057)
226/**
227 * Input clip must be a 3gpp file */
228#define M4VSS3GPP_ERR_INPUT_CLIP_IS_NOT_A_3GPP              M4OSA_ERR_CREATE( M4_ERR,\
229                                                                              M4VSS3GPP, 0x0058)
230/**
231 * Begin loop time is higher than end loop time or higher than added clip duration */
232#define M4VSS3GPP_ERR_BEGINLOOP_HIGHER_ENDLOOP              M4OSA_ERR_CREATE( M4_ERR,\
233                                                                              M4VSS3GPP, 0x0059)
234
235
236/************************************************************************/
237/* Audio mixing and extract picture error code                          */
238/************************************************************************/
239
240/**
241 * H263 Profile 3 level 10 is not supported */
242#define M4VSS3GPP_ERR_H263_PROFILE_NOT_SUPPORTED            M4OSA_ERR_CREATE( M4_ERR,\
243                                                                            M4VSS3GPP, 0x0060)
244/**
245 * File contains no video stream or an unsupported video stream */
246#define M4VSS3GPP_ERR_NO_SUPPORTED_VIDEO_STREAM_IN_FILE        M4OSA_ERR_CREATE( M4_ERR,\
247                                                                            M4VSS3GPP, 0x0061)
248
249
250/************************************************************************/
251/* Internal error and warning codes                                     */
252/************************************************************************/
253
254/**
255 * Internal state error */
256#define M4VSS3GPP_ERR_INTERNAL_STATE                 M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0100)
257/**
258 * Luminance filter effect error */
259#define M4VSS3GPP_ERR_LUMA_FILTER_ERROR              M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0104)
260/**
261 * Transition filter effect error */
262#define M4VSS3GPP_ERR_TRANSITION_FILTER_ERROR        M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0106)
263/**
264 * The audio decoder initialization failed */
265#define M4VSS3GPP_ERR_AUDIO_DECODER_INIT_FAILED      M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0110)
266/**
267 * The decoder produced an unattended amount of PCM */
268#define M4VSS3GPP_ERR_AUDIO_DECODED_PCM_SIZE_ISSUE   M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0115)
269/**
270 * Output file must be 3GPP or MP3 */
271#define M4VSS3GPP_ERR_OUTPUT_FILE_TYPE_ERROR         M4OSA_ERR_CREATE( M4_ERR, M4VSS3GPP, 0x0117)
272
273#endif /* __M4VSS3GPP_ErrorCodes_H__ */
274
275