|
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: General MCC definitions. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef MMCCINTERFACEDEF_H |
|
22 #define MMCCINTERFACEDEF_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32def.h> |
|
26 #include <ecam.h> |
|
27 #include <mmf/common/mmfbase.h> |
|
28 #include <mmf/common/mmffourcc.h> |
|
29 #include <mmccctrlobserver.h> |
|
30 #include <mmccevents.h> |
|
31 #include <mmcccodecinformation.h> |
|
32 |
|
33 |
|
34 const TUid KMccInterfaceUid = { 0x102073F7 }; |
|
35 const TUid KMccFileSinkUid = { 0x102747D7 }; |
|
36 const TUid KMccFileSourceUid = { 0x102747D5 }; |
|
37 const TUid KMccRtpSourceUid = { 0x1020740B }; |
|
38 const TUid KMccRtpSinkUid = { 0x1020740C }; |
|
39 const TUid KMccVideoSourceUid = { 0x102747D6 }; |
|
40 const TUid KMccVideoSinkUid = { 0x102747D8 }; |
|
41 const TUid KMccAnySourceUid = { 0x10283394 }; |
|
42 const TUid KMccAnySinkUid = { 0x10283395 }; |
|
43 |
|
44 |
|
45 const TUint32 KMccAudioToPrivate = 3; |
|
46 const TUint32 KMccAudioToPublic = 4; |
|
47 class TMMFPrioritySettings; |
|
48 |
|
49 const TUint32 KMccNullId = 0xffffffff; |
|
50 |
|
51 // Mcc link types |
|
52 |
|
53 const TInt KMccLinkGeneral = 100; |
|
54 const TInt KMccLinkLocal = 101; |
|
55 const TInt KMccLinkGeneralVideo = 102; |
|
56 |
|
57 // Mcc stream types |
|
58 const TInt KMccAudioUplinkStream = 200; |
|
59 const TInt KMccAudioDownlinkStream = 201; |
|
60 const TInt KMccAudioLocalStream = 202; |
|
61 const TInt KMccVideoUplinkStream = 203; |
|
62 const TInt KMccVideoDownlinkStream = 204; |
|
63 const TInt KMccVideoLocalStream = 205; |
|
64 const TInt KMccAudioDownlinkStandbyStream = 206; |
|
65 const TInt KMccDtmfStream = 207; |
|
66 |
|
67 const TInt KMccMaxBundleSize = 40; |
|
68 |
|
69 // ENUMERATIONS |
|
70 |
|
71 enum TMccDevice |
|
72 { |
|
73 EMccAudioPlay = 300, |
|
74 EMccAudioRecord |
|
75 }; |
|
76 |
|
77 enum TMccVideoRotation |
|
78 { |
|
79 EMccNone, |
|
80 EMccClockwise90Degree, |
|
81 EMccClockwise180Degree, |
|
82 EMccClockwise270Degree |
|
83 }; |
|
84 |
|
85 /** |
|
86 * Specifies the media quality report |
|
87 */ |
|
88 enum TMediaQualityReport |
|
89 { |
|
90 EMccJitterReport = 0, |
|
91 EMccPacketLossReport, |
|
92 EMccQualityReportAll |
|
93 }; |
|
94 |
|
95 /** |
|
96 * Specifies the media quality report interval type |
|
97 */ |
|
98 enum TMediaReportInterval |
|
99 { |
|
100 EMccQualityTimeBased = 0, |
|
101 EMccQualityPacketBased |
|
102 }; |
|
103 |
|
104 class TMccVideoSinkSetting |
|
105 { |
|
106 public: |
|
107 TPoint iLocation; |
|
108 TSize iSize; |
|
109 TUint iVideoPayloadType; |
|
110 TUint iAudioPayloadType; |
|
111 TUint iIAPId; |
|
112 TUint iDeviceIndex; |
|
113 TMMFPrioritySettings iPriority; |
|
114 TInt iWindowOrdinalPosition; |
|
115 TInt iWindowOrdinalPriority; |
|
116 TMccVideoRotation iRotation; |
|
117 TReal iVideoFrameRate; |
|
118 }; |
|
119 |
|
120 typedef TPckgBuf<TMccVideoSinkSetting> TMccVideoSinkSettingBuf; |
|
121 |
|
122 class TMccVideoSourceSetting |
|
123 { |
|
124 public: |
|
125 TBuf8<KMaxConfigKeyLen> iConfigKey; |
|
126 TSize iSize; |
|
127 TUint iVideoPayloadType; |
|
128 TUint iAudioPayloadType; |
|
129 TUint iDeviceIndex; |
|
130 TMMFPrioritySettings iPriority; |
|
131 }; |
|
132 |
|
133 typedef TPckgBuf<TMccVideoSourceSetting> TMccVideoSourceSettingBuf; |
|
134 |
|
135 class TMccVideoInfo |
|
136 { |
|
137 public: |
|
138 TInt iNumOfCameras; |
|
139 TCameraInfo iInfo; |
|
140 }; |
|
141 |
|
142 typedef TPckgBuf<TMccVideoInfo> TMccVideoInfoBuf; |
|
143 |
|
144 class TMccVideoInfo2 : public TMccVideoInfo |
|
145 { |
|
146 public: |
|
147 TInt iCameraIndex; |
|
148 }; |
|
149 |
|
150 typedef TPckgBuf<TMccVideoInfo2> TMccVideoInfoBuf2; |
|
151 |
|
152 |
|
153 class TMccFileSourceSetting |
|
154 { |
|
155 public: |
|
156 |
|
157 TFileName iFileName; |
|
158 TTimeIntervalMicroSeconds iDuration; |
|
159 TTimeIntervalMicroSeconds iPosition; |
|
160 TReal iVideoFrameRate; |
|
161 TUint32 iVideoBitRate; |
|
162 TSize iVideoFrameSize; |
|
163 TUint32 iAudioBitRate; |
|
164 |
|
165 // Audio fourCC value; KMMFFourCCCodeNULL if audio not present |
|
166 TFourCC iAudioFourCC; |
|
167 |
|
168 // Video fourCC value; KMMFFourCCCodeNULL if video not present |
|
169 TFourCC iVideoFourCC; |
|
170 |
|
171 }; |
|
172 |
|
173 typedef TPckgBuf<TMccFileSourceSetting> TMccFileSourceSettingBuf; |
|
174 |
|
175 class TMccRtpSourceSetting |
|
176 { |
|
177 public: |
|
178 TUint32 iStandByTimerValue; |
|
179 }; |
|
180 |
|
181 typedef TPckgBuf<TMccRtpSourceSetting> TMccRtpSourceSettingBuf; |
|
182 |
|
183 /** |
|
184 * Class for configuring the media quality reports |
|
185 * |
|
186 * @lib N/A |
|
187 * @since Series 60 3.0 |
|
188 */ |
|
189 class TMccMediaQualityConfig |
|
190 { |
|
191 public: // Constructor |
|
192 /** |
|
193 * Default constructor |
|
194 */ |
|
195 inline TMccMediaQualityConfig() : iJitterLevel( 0 ), iPacketLoss( 0 ), |
|
196 iReportType( EMccQualityReportAll ), |
|
197 iReportIntervalType( EMccQualityTimeBased ), iReportInterval( 0 ), |
|
198 iSessionId( KMccNullId ), iEndpointId( 0 ) |
|
199 { }; |
|
200 |
|
201 /** |
|
202 * Copy constructor |
|
203 */ |
|
204 inline TMccMediaQualityConfig( const TMccMediaQualityConfig& aConfig ) : |
|
205 iJitterLevel( aConfig.iJitterLevel ), iPacketLoss( aConfig.iPacketLoss ), |
|
206 iReportType( aConfig.iReportType ), |
|
207 iReportIntervalType( aConfig.iReportIntervalType ), |
|
208 iReportInterval( aConfig.iReportInterval ), |
|
209 iSessionId( aConfig.iSessionId ), |
|
210 iEndpointId( aConfig.iEndpointId ) |
|
211 { }; |
|
212 |
|
213 public: // New functions |
|
214 /** |
|
215 * Checks the current configuration |
|
216 * @since Series 60 3.0 |
|
217 * @param None |
|
218 * @return TInt System-wide error code |
|
219 */ |
|
220 inline TInt CheckConfig() const |
|
221 { |
|
222 if( ( !iJitterLevel || !iPacketLoss ) && !iReportInterval ) |
|
223 { |
|
224 return KErrArgument; |
|
225 } |
|
226 else if( KMccNullId == iSessionId ) |
|
227 { |
|
228 return KErrArgument; |
|
229 } |
|
230 else |
|
231 { |
|
232 return KErrNone; |
|
233 } |
|
234 }; |
|
235 |
|
236 public: // Data |
|
237 // Jitterlevel to activate media quality report |
|
238 TInt iJitterLevel; |
|
239 |
|
240 // Packetloss percentage to activate media quality report |
|
241 TInt iPacketLoss; |
|
242 |
|
243 // Determines whether to report jitterlevel, packetloss or both |
|
244 TMediaQualityReport iReportType; |
|
245 |
|
246 // Determines wheter to report on a timebased interval or packet based |
|
247 // interval |
|
248 TMediaReportInterval iReportIntervalType; |
|
249 |
|
250 // Determines the reporting interval, milliseconds or packet count |
|
251 TInt iReportInterval; |
|
252 |
|
253 // Determines the session from where to report media quality |
|
254 TUint32 iSessionId; |
|
255 |
|
256 // Endpoint |
|
257 TUint32 iEndpointId; |
|
258 }; |
|
259 |
|
260 typedef TPckgBuf<TMccMediaQualityConfig> TMccMediaQualConfBuf; |
|
261 |
|
262 class TMccStreamBundle |
|
263 { |
|
264 public: |
|
265 TUint iType; |
|
266 TUint32 iStreams[ KMccMaxBundleSize ]; |
|
267 }; |
|
268 |
|
269 const TUint32 KMccCamZoomFactor = 1; |
|
270 const TUint32 KMccCamDigitZoomFactor = 2; |
|
271 const TUint32 KMccCamContrast = 3; |
|
272 const TUint32 KMccCamBrightness = 4; |
|
273 const TUint32 KMccCamWhiteBalance = 5; |
|
274 const TUint32 KMccCamLocalVideo = 6; |
|
275 const TUint32 KMccCamInfo = 7; |
|
276 const TUint32 KMccCamCount = 8; |
|
277 const TUint32 KMccCamExposure = 9; |
|
278 |
|
279 const TUint32 KMccMicGain = 10; |
|
280 const TUint32 KMccMicMaxGain = 11; |
|
281 const TUint32 KMccMicBalance = 12; |
|
282 const TUint32 KMccSpeakerVolume = 13; |
|
283 const TUint32 KMccSpeakerMaxVolume = 14; |
|
284 const TUint32 KMccSpeakerBalance = 15; |
|
285 const TUint32 KMccSpeakerRouting = 16; |
|
286 |
|
287 const TUint32 KMccDisplayLocalVideo = 17; |
|
288 |
|
289 // File info retrieval, all possible info or specific values. |
|
290 // Use TMccFileSourceSettingBuf as a parameter value. |
|
291 // |
|
292 const TUint32 KMccFileInfo = 18; |
|
293 const TUint32 KMccFileName = 19; |
|
294 const TUint32 KMccFileDuration = 20; |
|
295 const TUint32 KMccFilePosition = 21; |
|
296 const TUint32 KMccFileVideoFrameRate = 22; |
|
297 const TUint32 KMccFileVideoBitRate = 23; |
|
298 const TUint32 KMccFileVideoFrameSize = 24; |
|
299 const TUint32 KMccFileAudioBitRate = 25; |
|
300 const TUint32 KMccFileAudioFourCC = 26; |
|
301 const TUint32 KMccFileVideoFourCC = 27; |
|
302 |
|
303 // File playing fastforward/rewind. |
|
304 // Use TPckgBuf<TInt> as a parameter value. Integer value defines |
|
305 // forwarding/rewinding speed. E.g. value 4 causes four times |
|
306 // faster playback and -2 causes two times faster rewinding. |
|
307 // Returning to normal mode is achieved with 0 value. |
|
308 const TUint32 KMccFileFastForward = 28; |
|
309 |
|
310 const TUint32 KMccRtpCName = 29; |
|
311 |
|
312 // Use TReal as a parameter value |
|
313 const TUint32 KMccVideoFrameRate = 30; |
|
314 |
|
315 // Use TBuf8<KMaxConfigKeyLen> as a parameter value |
|
316 const TUint32 KMccConfigKey = 31; |
|
317 |
|
318 #endif // MMCCINTERFACEDEF_H |