|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "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 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __TNECOMMON_H__ |
|
21 #define __TNECOMMON_H__ |
|
22 |
|
23 #include <e32std.h> |
|
24 |
|
25 /** |
|
26 * Enumeration for video clip classes. |
|
27 */ |
|
28 enum TTNEVideoClipClass |
|
29 { |
|
30 ETNEVideoClipClassFile = 15001, |
|
31 ETNEVideoClipClassGenerated |
|
32 }; |
|
33 |
|
34 |
|
35 |
|
36 /** |
|
37 * Enumeration for video bitstream modes. |
|
38 */ |
|
39 enum TTNEVideoBitstreamMode |
|
40 { |
|
41 ETNEVideoBitstreamModeUnknown = 0, /* unrecognized mode; outside of H.263 Profile 0 Level 10, or MPEG-4 Visual Simple Profile */ |
|
42 ETNEVideoBitstreamModeH263, /* H.263 Simple Profile (Profile 0, Level 10) */ |
|
43 ETNEVideoBitstreamModeMPEG4ShortHeader, /* MPEG-4 Visual Simple Profile - Short Header */ |
|
44 ETNEVideoBitstreamModeMPEG4Regular, /* MPEG-4 Visual Simple Profile - Regular */ |
|
45 ETNEVideoBitstreamModeMPEG4Resyn, /* MPEG-4 Visual Simple Profile - Regular with Resynchronization Markers */ |
|
46 ETNEVideoBitstreamModeMPEG4DP, /* MPEG-4 Visual Simple Profile - Data Partitioned */ |
|
47 ETNEVideoBitstreamModeMPEG4DP_RVLC, /* MPEG-4 Visual Simple Profile - Data Partitioned with Reversible VLCs */ |
|
48 ETNEVideoBitstreamModeMPEG4Resyn_DP, /* MPEG-4 Visual Simple Profile - Data Partitioned with Resynchronization Markers */ |
|
49 ETNEVideoBitstreamModeMPEG4Resyn_DP_RVLC /* MPEG-4 Visual Simple Profile - Data Partitioned with Reversible VLCs & Resynchronization Markers */ |
|
50 }; |
|
51 |
|
52 |
|
53 |
|
54 /* Video format of bitstream - used everywhere */ |
|
55 enum TTNEVideoType |
|
56 { |
|
57 ETNEVideoTypeUnrecognized = 13001, /* should always be the first one */ |
|
58 ETNEVideoTypeNoVideo, /* video is not present */ |
|
59 ETNEVideoTypeH263Profile0Level10, /* H.263 Simple Profile (Profile 0, Level 10) */ |
|
60 ETNEVideoTypeH263Profile0Level45, /* H.263 Simple Profile (Profile 0, Level 45) */ |
|
61 ETNEVideoTypeMPEG4SimpleProfile, /* MPEG-4 Visual Simple Profile (any mode) */ |
|
62 ETNEVideoTypeAVCProfileBaseline, |
|
63 ETNEVideoTypeLast /* should always be the last one */ |
|
64 }; |
|
65 |
|
66 /** |
|
67 * Enumeration for video formats. |
|
68 */ |
|
69 enum TTNEVideoFormat |
|
70 { |
|
71 ETNEVideoFormatUnrecognized = 11001, // should always be the first one |
|
72 ETNEVideoFormat3GPP, |
|
73 ETNEVideoFormatMP4, |
|
74 ETNEVideoFormatLast // should always be the last one |
|
75 }; |
|
76 |
|
77 |
|
78 /** |
|
79 * Output parameter class |
|
80 */ |
|
81 |
|
82 class TTNEOutputParameters |
|
83 { |
|
84 public: |
|
85 // default constructor; initializes optional parameters to values which mean that editor can decide the value |
|
86 inline TTNEOutputParameters() |
|
87 : iVideoBitrate(0), iVideoFrameRate(0) |
|
88 {} |
|
89 |
|
90 public: |
|
91 |
|
92 // video codec |
|
93 TTNEVideoType iVideoType; |
|
94 // target resolution |
|
95 TSize iVideoResolution; |
|
96 // target video bitrate, 0 = no preference |
|
97 TInt iVideoBitrate; |
|
98 // target video framerate, 0 = no preference |
|
99 TReal iVideoFrameRate; |
|
100 |
|
101 }; |
|
102 |
|
103 |
|
104 /** |
|
105 * Transcode factor. |
|
106 */ |
|
107 struct TTNETranscodeFactor |
|
108 { |
|
109 TInt iTRes; |
|
110 TTNEVideoBitstreamMode iStreamType; |
|
111 }; |
|
112 |
|
113 |
|
114 /** |
|
115 * Enumerates video editor engine panic codes and |
|
116 * provides a static Panic() function. |
|
117 * |
|
118 */ |
|
119 class TTNEPanic |
|
120 { |
|
121 public: |
|
122 enum TTNEPanicCodes |
|
123 { |
|
124 EInternal = 1, // internal error (that is, a bug in the video editor engine) |
|
125 EDeprecated, // deprecated class or method |
|
126 EVideoClipInfoNotReady, |
|
127 EVideoClipInfoIllegalVideoFrameIndex, |
|
128 EVideoClipInfoIllegalVideoFrameTime, |
|
129 EVideoClipInfoFrameOperationAlreadyRunning, |
|
130 EVideoClipInfoIllegalFrameResolution, |
|
131 EVideoClipInfoNoFileAssociated, |
|
132 EVideoClipInfoNoGeneratorAssociated, |
|
133 EAudioClipInfoNotReady, //10 |
|
134 EMovieAddOperationAlreadyRunning, |
|
135 EMovieIllegalStartTransitionEffect, |
|
136 EMovieIllegalMiddleTransitionEffect, |
|
137 EMovieIllegalEndTransitionEffect, |
|
138 EMovieProcessingOperationAlreadyRunning, |
|
139 EMovieObserverAlreadyRegistered, |
|
140 EMovieObserverNotRegistered, |
|
141 EMovieIllegalQuality, |
|
142 EVideoClipIllegalIndex, //20 |
|
143 EVideoClipIllegalSpeed, |
|
144 EVideoClipIllegalColorEffect, |
|
145 EVideoClipIllegalCutInTime, |
|
146 EVideoClipIllegalCutOutTime, |
|
147 EVideoClipNoFileAssociated, |
|
148 EAudioClipIllegalStartTime, |
|
149 EAudioClipIllegalCutInTime, |
|
150 EAudioClipIllegalCutOutTime, |
|
151 EIllegalDynamicLevelMark, |
|
152 EIllegalDynamicLevelMarkIndex, |
|
153 EVideoClipGeneratorNotOveray, |
|
154 EAnimationClipGeneratorNotReady |
|
155 }; |
|
156 |
|
157 public: |
|
158 inline static void Panic(TInt aPanic); |
|
159 }; |
|
160 |
|
161 |
|
162 #include "TNECommon.inl" |
|
163 |
|
164 #endif // __TNECOMMON_H__ |
|
165 |