1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - Initial contribution |
|
11 * |
|
12 * Contributors: |
|
13 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 #ifndef __VEDCOMMON_H__ |
|
23 #define __VEDCOMMON_H__ |
|
24 |
|
25 #include <e32std.h> |
|
26 |
|
27 |
|
28 /** |
|
29 * Constants for video clip speed settings. The speed is given by % x10, i.e. 1000 means 100 %. |
|
30 */ |
|
31 const TInt KVedNormalSpeed(1000); |
|
32 const TInt KVedMaxSpeed(1000); |
|
33 const TInt KVedMinSpeed(1); |
|
34 |
|
35 |
|
36 /** |
|
37 * Enumeration for video clip classes. |
|
38 */ |
|
39 enum TVedVideoClipClass |
|
40 { |
|
41 EVedVideoClipClassFile = 15001, |
|
42 EVedVideoClipClassGenerated |
|
43 }; |
|
44 |
|
45 |
|
46 /** |
|
47 * Enumeration for bitrate modes. |
|
48 */ |
|
49 enum TVedBitrateMode |
|
50 { |
|
51 EVedBitrateModeUnrecognized = 18001, |
|
52 EVedBitrateModeConstant, |
|
53 EVedBitrateModeVariable, |
|
54 EVedBitrateModeLast // should always be the last one |
|
55 }; |
|
56 |
|
57 /** |
|
58 * Enumeration for video bitstream modes. |
|
59 */ |
|
60 enum TVedVideoBitstreamMode |
|
61 { |
|
62 EVedVideoBitstreamModeUnknown = 0, /* unrecognized mode; outside of H.263 Profile 0 Level 10, or MPEG-4 Visual Simple Profile */ |
|
63 EVedVideoBitstreamModeH263, /* H.263 Simple Profile (Profile 0, Level 10) */ |
|
64 EVedVideoBitstreamModeMPEG4ShortHeader, /* MPEG-4 Visual Simple Profile - Short Header */ |
|
65 EVedVideoBitstreamModeMPEG4Regular, /* MPEG-4 Visual Simple Profile - Regular */ |
|
66 EVedVideoBitstreamModeMPEG4Resyn, /* MPEG-4 Visual Simple Profile - Regular with Resynchronization Markers */ |
|
67 EVedVideoBitstreamModeMPEG4DP, /* MPEG-4 Visual Simple Profile - Data Partitioned */ |
|
68 EVedVideoBitstreamModeMPEG4DP_RVLC, /* MPEG-4 Visual Simple Profile - Data Partitioned with Reversible VLCs */ |
|
69 EVedVideoBitstreamModeMPEG4Resyn_DP, /* MPEG-4 Visual Simple Profile - Data Partitioned with Resynchronization Markers */ |
|
70 EVedVideoBitstreamModeMPEG4Resyn_DP_RVLC, /* MPEG-4 Visual Simple Profile - Data Partitioned with Reversible VLCs & Resynchronization Markers */ |
|
71 EVedVideoBitstreamModeAVC |
|
72 }; |
|
73 |
|
74 |
|
75 |
|
76 /* Video format of bitstream - used everywhere */ |
|
77 enum TVedVideoType |
|
78 { |
|
79 EVedVideoTypeUnrecognized = 13001, /* should always be the first one */ |
|
80 EVedVideoTypeNoVideo, /* video is not present */ |
|
81 EVedVideoTypeH263Profile0Level10, /* H.263 Simple Profile (Profile 0, Level 10) */ |
|
82 EVedVideoTypeH263Profile0Level45, /* H.263 Simple Profile (Profile 0, Level 45) */ |
|
83 EVedVideoTypeMPEG4SimpleProfile, /* MPEG-4 Visual Simple Profile (any mode) */ |
|
84 EVedVideoTypeAVCBaselineProfile, /* AVC Baseline Profile */ |
|
85 EVedVideoTypeLast /* should always be the last one */ |
|
86 }; |
|
87 |
|
88 /** |
|
89 * Enumeration for video formats. |
|
90 */ |
|
91 enum TVedVideoFormat |
|
92 { |
|
93 EVedVideoFormatUnrecognized = 11001, // should always be the first one |
|
94 EVedVideoFormat3GPP, |
|
95 EVedVideoFormatMP4, |
|
96 EVedVideoFormatLast // should always be the last one |
|
97 }; |
|
98 |
|
99 /** |
|
100 * Enumeration for audio formats. |
|
101 */ |
|
102 enum TVedAudioFormat |
|
103 { |
|
104 EVedAudioFormatUnrecognized = 16001, // should always be the first one |
|
105 EVedAudioFormat3GPP, |
|
106 EVedAudioFormatMP4, |
|
107 EVedAudioFormatAMR, |
|
108 EVedAudioFormatAMRWB, |
|
109 EVedAudioFormatMP3, |
|
110 EVedAudioFormatAAC_ADIF, |
|
111 EVedAudioFormatAAC_ADTS, |
|
112 EVedAudioFormatWAV, |
|
113 EVedAudioFormatLast // should always be the last one |
|
114 }; |
|
115 |
|
116 |
|
117 /** |
|
118 * Enumeration for audio types (that is, codecs). |
|
119 */ |
|
120 enum TVedAudioType |
|
121 { |
|
122 EVedAudioTypeUnrecognized = 14001, // should always be the first one |
|
123 EVedAudioTypeNoAudio, |
|
124 EVedAudioTypeAMR, |
|
125 EVedAudioTypeAMRWB, |
|
126 EVedAudioTypeMP3, |
|
127 EVedAudioTypeAAC_LC, |
|
128 EVedAudioTypeAAC_LTP, |
|
129 EVedAudioTypeWAV, |
|
130 EVedAudioTypeLast // should always be the last one |
|
131 }; |
|
132 |
|
133 /** |
|
134 * Enumeration for audio channel modes. |
|
135 */ |
|
136 enum TVedAudioChannelMode |
|
137 { |
|
138 EVedAudioChannelModeUnrecognized = 17001, |
|
139 EVedAudioChannelModeStereo, |
|
140 EVedAudioChannelModeDualChannel, |
|
141 EVedAudioChannelModeSingleChannel |
|
142 }; |
|
143 |
|
144 /** |
|
145 * Output parameter class |
|
146 */ |
|
147 |
|
148 class TVedOutputParameters |
|
149 { |
|
150 public: |
|
151 // default constructor; initializes optional parameters to values which mean that editor can decide the value |
|
152 inline TVedOutputParameters() |
|
153 : iVideoType(EVedVideoTypeH263Profile0Level10), iVideoResolution(TSize(0,0)), iVideoBitrate(0), iVideoFrameRate(0), |
|
154 iAudioType(EVedAudioTypeAMR), iAudioBitrate(0), iAudioChannelMode(EVedAudioChannelModeSingleChannel), iAudioSamplingRate(0), |
|
155 iSyncIntervalInPicture(0), iSegmentSizeInBytes(0) |
|
156 {} |
|
157 |
|
158 public: |
|
159 |
|
160 // video codec |
|
161 TVedVideoType iVideoType; |
|
162 // target resolution, 0 = no preference (use from input) |
|
163 TSize iVideoResolution; |
|
164 // target video bitrate, 0 = no preference |
|
165 TInt iVideoBitrate; |
|
166 // target video framerate, 0 = no preference |
|
167 TReal iVideoFrameRate; |
|
168 |
|
169 // audio codec |
|
170 TVedAudioType iAudioType; |
|
171 // target audio bitrate, 0 = no preference |
|
172 TInt iAudioBitrate; |
|
173 // audio channel mode |
|
174 TVedAudioChannelMode iAudioChannelMode; |
|
175 // audio sampling rate, 0 = no preference |
|
176 TInt iAudioSamplingRate; |
|
177 |
|
178 // Segment interval in picture. In H.263 baseline this means number of non-empty GOB headers (1=every GOB has a header), |
|
179 // Default is 0 == no segments inside picture |
|
180 // Coding standard & used profile etc. limit the value. |
|
181 TInt iSyncIntervalInPicture; |
|
182 |
|
183 // Target size of each coded video segment. Valid for H.264 and MPEG-4 |
|
184 // Default is 0 == no segments inside picture |
|
185 TInt iSegmentSizeInBytes; |
|
186 |
|
187 }; |
|
188 |
|
189 |
|
190 /** |
|
191 * Enumeration for start transition effects. |
|
192 */ |
|
193 enum TVedStartTransitionEffect |
|
194 { |
|
195 EVedStartTransitionEffectNone = 21001, // should always be the first one |
|
196 EVedStartTransitionEffectFadeFromBlack, |
|
197 EVedStartTransitionEffectFadeFromWhite, |
|
198 EVedStartTransitionEffectLast // should always be the last one |
|
199 }; |
|
200 |
|
201 |
|
202 /** |
|
203 * Enumeration for middle transition effects. |
|
204 */ |
|
205 enum TVedMiddleTransitionEffect |
|
206 { |
|
207 EVedMiddleTransitionEffectNone = 22001, // should always be the first one |
|
208 EVedMiddleTransitionEffectDipToBlack, |
|
209 EVedMiddleTransitionEffectDipToWhite, |
|
210 EVedMiddleTransitionEffectCrossfade, |
|
211 EVedMiddleTransitionEffectWipeLeftToRight, |
|
212 EVedMiddleTransitionEffectWipeRightToLeft, |
|
213 EVedMiddleTransitionEffectWipeTopToBottom, |
|
214 EVedMiddleTransitionEffectWipeBottomToTop, |
|
215 EVedMiddleTransitionEffectLast // should always be the last one |
|
216 }; |
|
217 |
|
218 |
|
219 /** |
|
220 * Enumeration for end transition effects. |
|
221 */ |
|
222 enum TVedEndTransitionEffect |
|
223 { |
|
224 EVedEndTransitionEffectNone = 23001, // should always be the first one |
|
225 EVedEndTransitionEffectFadeToBlack, |
|
226 EVedEndTransitionEffectFadeToWhite, |
|
227 EVedEndTransitionEffectLast // should always be the last one |
|
228 }; |
|
229 |
|
230 |
|
231 /** |
|
232 * Enumeration for color effects. |
|
233 */ |
|
234 enum TVedColorEffect |
|
235 { |
|
236 EVedColorEffectNone = 31001, // should always be the first one |
|
237 EVedColorEffectBlackAndWhite, |
|
238 EVedColorEffectToning, |
|
239 EVedColorEffectLast // should always be the last one |
|
240 }; |
|
241 |
|
242 |
|
243 /** |
|
244 * Class for storing dynamic level marks. |
|
245 */ |
|
246 class TVedDynamicLevelMark |
|
247 { |
|
248 public: |
|
249 /** Mark time. */ |
|
250 TTimeIntervalMicroSeconds iTime; |
|
251 |
|
252 /** |
|
253 * Dynamic level (-63.5 - +12.7) in dB:s; one step represents +0.1 or -0.5 dB => values are -127...+127 |
|
254 */ |
|
255 TInt8 iLevel; |
|
256 |
|
257 /** |
|
258 * Constructs a new dynamic level mark. |
|
259 * |
|
260 * @param aTime time for the mark |
|
261 * @param aLevel dynamic level (-63.5 ... +12.7) in dB:s one step = +0.1 or -0.5 dB => values can be -127...+127 |
|
262 */ |
|
263 inline TVedDynamicLevelMark(TTimeIntervalMicroSeconds aTime, TInt aLevel); |
|
264 |
|
265 /** |
|
266 * Constructs a new dynamic level mark from existing instance. |
|
267 * |
|
268 * @param aMark dynamic level mark to copy |
|
269 */ |
|
270 inline TVedDynamicLevelMark(const TVedDynamicLevelMark& aMark); |
|
271 }; |
|
272 |
|
273 |
|
274 /** |
|
275 * Transcode factor. |
|
276 */ |
|
277 struct TVedTranscodeFactor |
|
278 { |
|
279 TInt iTRes; |
|
280 TVedVideoBitstreamMode iStreamType; |
|
281 }; |
|
282 |
|
283 |
|
284 /** |
|
285 * Enumerates video editor engine panic codes and |
|
286 * provides a static Panic() function. |
|
287 * |
|
288 */ |
|
289 class TVedPanic |
|
290 { |
|
291 public: |
|
292 enum TVedPanicCodes |
|
293 { |
|
294 EInternal = 1, // internal error (that is, a in the video editor engine) |
|
295 EDeprecated, // deprecated class or method |
|
296 EVideoClipInfoNotReady, |
|
297 EVideoClipInfoIllegalVideoFrameIndex, |
|
298 EVideoClipInfoIllegalVideoFrameTime, |
|
299 EVideoClipInfoFrameOperationAlreadyRunning, |
|
300 EVideoClipInfoIllegalFrameResolution, |
|
301 EVideoClipInfoNoFileAssociated, |
|
302 EVideoClipInfoNoGeneratorAssociated, |
|
303 EAudioClipInfoNotReady, //10 |
|
304 EMovieEmpty, |
|
305 EMovieAddOperationAlreadyRunning, |
|
306 EMovieIllegalStartTransitionEffect, |
|
307 EMovieIllegalMiddleTransitionEffect, |
|
308 EMovieIllegalEndTransitionEffect, |
|
309 EMovieProcessingOperationAlreadyRunning, |
|
310 EMovieObserverAlreadyRegistered, |
|
311 EMovieObserverNotRegistered, |
|
312 EMovieIllegalQuality, |
|
313 EVideoClipIllegalIndex, //20 |
|
314 EVideoClipIllegalSpeed, |
|
315 EVideoClipIllegalColorEffect, |
|
316 EVideoClipIllegalCutInTime, |
|
317 EVideoClipIllegalCutOutTime, |
|
318 EVideoClipNoFileAssociated, |
|
319 EAudioClipIllegalStartTime, |
|
320 EAudioClipIllegalCutInTime, |
|
321 EAudioClipIllegalCutOutTime, |
|
322 EVideoClipGeneratorNotInserted, |
|
323 EVideoClipGeneratorNotReady,//30 |
|
324 EVideoClipGeneratorAlreadyInserted, |
|
325 EVideoClipGeneratorIllegalVideoFrameIndex, |
|
326 EVideoClipGeneratorIllegalDuration, |
|
327 EVideoClipGeneratorIllegalFrameResolution, |
|
328 EVideoClipGeneratorIllegalVideoFrameTime, |
|
329 EImageClipGeneratorIllegalMaxResolution, |
|
330 EImageClipGeneratorNotReady, |
|
331 EImageClipGeneratorFrameOperationAlreadyRunning, |
|
332 ETitleClipGeneratorIllegalMaxResolution, |
|
333 ETitleClipGeneratorIllegalMaxFramerate,//40 |
|
334 ETitleClipGeneratorFrameOperationAlreadyRunning, |
|
335 EIllegalDynamicLevelMark, |
|
336 EIllegalDynamicLevelMarkIndex, |
|
337 EVideoClipGeneratorNotOveray, |
|
338 EAnimationClipGeneratorNotReady |
|
339 }; |
|
340 |
|
341 public: |
|
342 inline static void Panic(TInt aPanic); |
|
343 }; |
|
344 |
|
345 |
|
346 #include "VedCommon.inl" |
|
347 |
|
348 #endif // __VEDCOMMON_H__ |
|
349 |
|