|
1 /* |
|
2 * Copyright (c) 2004 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: Provides an abstraction of the MMF Controller |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __MCC_INTERFACE_H__ |
|
22 #define __MCC_INTERFACE_H__ |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <mmf/common/mmffourcc.h> |
|
27 #include <mmf/common/mmfstandardcustomcommands.h> |
|
28 #include <MmccNetworkSettings.h> |
|
29 #include <MmccInterfaceDef.h> |
|
30 |
|
31 // CONSTANTS |
|
32 #define K_Mcc_VERSION TVersion( 2, 0, 0 ) |
|
33 |
|
34 // FORWARD DECLARATIONS |
|
35 class CMccCodecInformation; |
|
36 class CMccEvent; |
|
37 class CMccCodecInformation; |
|
38 class CMccCodecAMR; |
|
39 class CMccCodecG711; |
|
40 class CMccCodecILBC; |
|
41 class TCameraInfo; |
|
42 class CMccControllerStub; |
|
43 |
|
44 // CONSTANTS |
|
45 |
|
46 const TUid KUidMccFileSink = { 0x102747D7 }; |
|
47 const TUid KUidMccFileSource = { 0x102747D5 }; |
|
48 const TUid KUidMccRtpSource = { 0x1020740B }; |
|
49 const TUid KUidMccRtpSink = { 0x1020740C }; |
|
50 const TUid KUidMccVideoSource = { 0x102747D6 }; |
|
51 const TUid KUidMccVideoSink = { 0x102747D8 }; |
|
52 |
|
53 // MACROS |
|
54 |
|
55 // DATA TYPES |
|
56 |
|
57 // FUNCTION PROTOTYPES |
|
58 |
|
59 // CLASS DECLARATION |
|
60 |
|
61 /** |
|
62 * Mcc subsystem client interface. |
|
63 * |
|
64 * @lib MccInterface.lib |
|
65 */ |
|
66 class CMccInterface : public CBase |
|
67 { |
|
68 public: // Constructors and destructor |
|
69 /** |
|
70 * Two-phased constructor. |
|
71 * @param aObserver A callback object to receive and handle |
|
72 * event notifications from Mcc subsystem. |
|
73 * @return CMccInterface* Pointer to the interface object created |
|
74 */ |
|
75 IMPORT_C static CMccInterface* NewL( MMccCtrlObserver& aObserver ); |
|
76 |
|
77 /** |
|
78 * Destructor. |
|
79 */ |
|
80 virtual ~CMccInterface(); |
|
81 |
|
82 public: // New functions |
|
83 |
|
84 /** |
|
85 * Creates a new MCC session. The session is needed to create |
|
86 * links and streams into MCC. A single session may have any |
|
87 * number of links. |
|
88 * @param aSessionID ID of the new session if successful |
|
89 * @return KErrNone if success; otherwise system wide error code. |
|
90 */ |
|
91 IMPORT_C TInt CreateSession( TUint32& aSessionId ); |
|
92 |
|
93 /** |
|
94 * Closes MCC session. All links and streams of the session are also |
|
95 * closed. |
|
96 * @param aSessionId session ID |
|
97 * @return One of the standard system-wide error codes. |
|
98 */ |
|
99 IMPORT_C TInt CloseSession( TUint32 aSessionId ); |
|
100 |
|
101 /** |
|
102 * Creates a new MCC link with a remote participant. Link creates |
|
103 * new RTP session with given network settings. |
|
104 * @param aSessionId session ID |
|
105 * @param aLinkType Defines is stream Up- or Downlink |
|
106 * @param aLinkId ID of new link |
|
107 * @param aNetSettings network settings for the link |
|
108 * @return KErrNone if success; otherwise system wide error code. |
|
109 */ |
|
110 IMPORT_C TInt CreateLink( TUint32 aSessionId, |
|
111 TInt aLinkType, |
|
112 TUint32& aLinkId, |
|
113 TMccNetSettings& aNetSettings ); |
|
114 |
|
115 /** |
|
116 * Closes MCC link. All streams of the link are also closed. |
|
117 * @param aSessionId session ID |
|
118 * @param aLinkId link ID |
|
119 * @return One of the standard system-wide error codes. |
|
120 */ |
|
121 IMPORT_C TInt CloseLink( TUint32 aSessionId, TUint32 aLinkId ); |
|
122 |
|
123 /** |
|
124 * Creates a stream into a MCC link. Constructs the datapath |
|
125 * for stream, but no media resources reserved yet. |
|
126 * @param aSessionId session where stream is created to |
|
127 * @param aLinkId link ID where stream is created to |
|
128 * @param aStreamId Stream ID for the stream created. |
|
129 * @param aStreamType type of the stream |
|
130 * @param aCodecInformation Codec information for the stream. |
|
131 * @return KErrNone if success; otherwise system wide error code. |
|
132 */ |
|
133 IMPORT_C TInt CreateStream( TUint32 aSessionId, TUint32 aLinkId, |
|
134 TUint32& aStreamId, TInt aStreamType, |
|
135 CMccCodecInformation& aCodecInformation ); |
|
136 |
|
137 /** |
|
138 * Prepares a stream so that it is ready to be started. Media resources |
|
139 * are reserved and RTP stream is created. |
|
140 * @param aSessionId session where stream belongs to |
|
141 * @param aLinkId link ID where stream belongs to |
|
142 * @param aStreamId ID identifying stream to be prepared |
|
143 * @param aEndpointId ID identifying endpoint of the stream to be prepared. |
|
144 * If value 0, both endpoints prepared. |
|
145 * @return One of the standard system-wide error codes. |
|
146 */ |
|
147 IMPORT_C TInt PrepareStream( TUint32 aSessionId, TUint32 aLinkId, |
|
148 TUint32 aStreamId, TUint32 aEndpointId = 0 ); |
|
149 |
|
150 /** |
|
151 * Starts to send/receive media stream in a given session. |
|
152 * @param aSessionId session where stream belongs to |
|
153 * @param aLinkId link ID |
|
154 * @param aStreamId ID identifying stream to be started |
|
155 * @param aPaused ETrue, if stream paused after start |
|
156 * @param aEndpointId ID identifying endpoint of the stream to be started. |
|
157 * If value 0, both endpoints started. |
|
158 * @param aEnableRTCP ETrue, if RTCP sent. |
|
159 * @return One of the standard system-wide error codes. |
|
160 */ |
|
161 IMPORT_C TInt StartStream( TUint32 aSessionId, TUint32 aLinkId, |
|
162 TUint32 aStreamId, TUint32 aEndpointId = 0, |
|
163 TBool aPaused = EFalse, TBool aEnableRTCP = ETrue ); |
|
164 |
|
165 /** |
|
166 * Pauses media stream in a given session. No RTP packets are |
|
167 * sent/received anymore. However, RTCP packets may still be sent and |
|
168 * received. |
|
169 * @param aSessionId session where stream belongs to |
|
170 * @param aLinkId link ID |
|
171 * @param aStreamId ID identifying stream to be paused |
|
172 * @param aEndpointId ID identifying endpoint of the stream to be paused. |
|
173 * If value 0, both endpoints paused. |
|
174 * @param aEnableRTCP ETrue, if RTCP sent while paused. |
|
175 * @return One of the standard system-wide error codes. |
|
176 */ |
|
177 IMPORT_C TInt PauseStream( TUint32 aSessionId, TUint32 aLinkId, |
|
178 TUint32 aStreamId, TUint32 aEndpointId = 0, |
|
179 TBool aEnableRTCP = ETrue ); |
|
180 |
|
181 /** |
|
182 * Resumes paused media stream in a given session. |
|
183 * @param aSessionId session where stream belongs to |
|
184 * @param aLinkId link ID |
|
185 * @param aStreamId Stream ID identifying stream to be resumed |
|
186 * @param aEndpointId ID identifying endpoint of the stream to be resumed. |
|
187 * If value 0, both endpoints resumed. |
|
188 * @param aEnableRTCP ETrue, if RTCP sent while playing. |
|
189 * @return One of the standard system-wide error codes. |
|
190 */ |
|
191 IMPORT_C TInt ResumeStream( TUint32 aSessionId, TUint32 aLinkId, |
|
192 TUint32 aStreamId, TUint32 aEndpointId = 0, |
|
193 TBool aEnableRTCP = ETrue ); |
|
194 |
|
195 /** |
|
196 * Stops sending/receiving media stream in a given session. |
|
197 * @param aSessionId session where stream belongs to |
|
198 * @param aLinkId link ID |
|
199 * @param aStreamId Stream ID identifying stream to be stopped |
|
200 * @param aEndpointId ID identifying endpoint of the stream to be stopped. |
|
201 * If value 0, both endpoints stopped. |
|
202 * @return One of the standard system-wide error codes. |
|
203 */ |
|
204 IMPORT_C TInt StopStream( TUint32 aSessionId, TUint32 aLinkId, |
|
205 TUint32 aStreamId, TUint32 aEndpointId = 0 ); |
|
206 |
|
207 /** |
|
208 * Deletes media stream in a given session. |
|
209 * @param aSessionId session where stream belongs to |
|
210 * @param aLinkId link ID |
|
211 * @param aStreamId Stream ID identifying stream to be deleted |
|
212 * @return One of the standard system-wide error codes. |
|
213 */ |
|
214 IMPORT_C TInt DeleteStream( TUint32 aSessionId, TUint32 aLinkId, |
|
215 TUint32 aStreamId ); |
|
216 |
|
217 /** |
|
218 * Starts inactivity timer for a stream in a given session. |
|
219 * If RTP data is not received in given tive, inactivy |
|
220 * event is sent to client. In case of timeout, inactivity |
|
221 * timer is stopped. Client may restart the timer is needed. |
|
222 * @param aSessionId session where stream belongs to |
|
223 * @param aLinkId link ID |
|
224 * @param aStreamId Stream ID identifying stream |
|
225 * @param aTimeoutTime timeout value in microseconds |
|
226 * @param aEndpointId ID identifying endpoint of the stream to be monitored. |
|
227 * @return One of the standard system-wide error codes. |
|
228 */ |
|
229 IMPORT_C TInt StartInactivityTimer( TUint32 aSessionId, |
|
230 TUint32 aLinkId, TUint32 aStreamId, |
|
231 TUint32 aTimeoutTime, TUint32 aEndpointId = 0 ); |
|
232 |
|
233 /** |
|
234 * Stops inactivity timer for a stream in a given session. |
|
235 * @param aSessionId session where stream belongs to |
|
236 * @param aLinkId link ID |
|
237 * @param aStreamId Stream ID identifying stream |
|
238 * @param aEndpointId ID identifying endpoint of the stream where monitoring stopped. |
|
239 * @return One of the standard system-wide error codes. |
|
240 */ |
|
241 IMPORT_C TInt StopInactivityTimer( TUint32 aSessionId, TUint32 aLinkId, |
|
242 TUint32 aStreamId, TUint32 aEndpointId = 0 ); |
|
243 |
|
244 /** |
|
245 * Set remote IP address and port number for a given session. |
|
246 * @param aSessionId session ID |
|
247 * @param aLinkId link ID |
|
248 * @param aRemoteAddr Remote address to set |
|
249 * @param aRemoteRtcpPort Remote RTCP port to set, if not RTP port +1 |
|
250 * @return One of the standard system-wide error codes. |
|
251 */ |
|
252 IMPORT_C TInt SetRemoteAddress( TUint32 aSessionId, TUint32 aLinkId, |
|
253 const TInetAddr& aRemoteAddr, TUint aRemoteRtcpPort = 0 ); |
|
254 |
|
255 |
|
256 /** |
|
257 * Gets current codec used in a given stream. |
|
258 * @param aSessionId session ID |
|
259 * @param aLinkId Link ID |
|
260 * @param aStreamId Stream ID |
|
261 * @return Current codec used with the specified stream, ownership is transferred. |
|
262 */ |
|
263 IMPORT_C CMccCodecInformation* CodecL( TUint32 aSessionId, |
|
264 TUint32 aLinkId, |
|
265 TUint32 aStreamId ); |
|
266 |
|
267 /** |
|
268 * Sets codec to be used in a given stream. |
|
269 * @param aSessionId session ID |
|
270 * @param aLinkId Link ID |
|
271 * @param aStreamId Stream ID |
|
272 * @param aCodec Codec to be used |
|
273 * @return One of the standard system-wide error codes. |
|
274 */ |
|
275 IMPORT_C TInt SetCodec( TUint32 aSessionId, TUint32 aLinkId, |
|
276 TUint32 aStreamId, |
|
277 CMccCodecInformation& aCodecInformation ); |
|
278 |
|
279 |
|
280 /** |
|
281 * Get supported codecs by the system. Certain sinks and sources |
|
282 * however may have limitations on which codecs they support, hence |
|
283 * all these codecs may not allowed in all streams. |
|
284 * @param aCodecs An array to be filled with FourCC codes |
|
285 * @return One of the standard system-wide error codes. |
|
286 */ |
|
287 TInt GetSupportedCodecs( RArray<TFourCC>& aCodecs ); |
|
288 |
|
289 /** |
|
290 * Returns array of supported codecs in the system with their default values. |
|
291 * Note that data that the aCapabilities contains before calling this function |
|
292 * will be lost during the excecution of this function. Note also that the client |
|
293 * is responsible for the destruction of the objects contained in the |
|
294 * parameter array. |
|
295 * @param aCapabilities Codec capabilities |
|
296 * @return KErrNone if successful |
|
297 */ |
|
298 IMPORT_C TInt GetCapabilities( |
|
299 RPointerArray<CMccCodecInformation>& aCapabilities ) const; |
|
300 |
|
301 /** |
|
302 * Returns array of supported codecs of specific sink or source. Note that data that |
|
303 * the aCapabilities contains before calling this function will be |
|
304 * lost during the excecution of this function. Note also that the client |
|
305 * is responsible for the destruction of the objects contained in the |
|
306 * parameter array. |
|
307 * @param aType, type identifier of source or sink |
|
308 * @param aStreamType type of the stream |
|
309 * @param aParam, source or sink specific param |
|
310 * @param aCapabilities Codec capabilities |
|
311 * @return KErrNone if successful |
|
312 */ |
|
313 IMPORT_C TInt GetCapabilities( const TUid aType, TInt aStreamType, const TDesC8& aParam, |
|
314 RPointerArray<CMccCodecInformation>& aCapabilities ); |
|
315 |
|
316 /** |
|
317 * Get Synchronization source identifier. |
|
318 * @param aSessionId session ID |
|
319 * @param aLinkId Link ID |
|
320 * @param aStreamId Stream ID |
|
321 * @param aEndpointId ID identifying endpoint of the stream. |
|
322 * @param aSSRC SSRC value |
|
323 * @return One of the standard system-wide error codes. |
|
324 */ |
|
325 IMPORT_C TInt GetSSRC ( TUint32 aSessionId, |
|
326 TUint32 aLinkId, |
|
327 TUint32 aStreamId, |
|
328 TUint32 aEndpointId, |
|
329 TUint32& aSSRC ); |
|
330 |
|
331 /** |
|
332 * Sends media signal (e.g. DTMF,RTCP) to uplink if possible. |
|
333 * @param aEvent Event to be sent |
|
334 * @return void |
|
335 */ |
|
336 IMPORT_C void SendMediaSignalL( const TMccEvent& aEvent ); |
|
337 |
|
338 /** |
|
339 * Adds new sink to the session. User must later |
|
340 * call CreateStream to connect this sink to some stream. |
|
341 * @param aSinkType type identifier of the sink. |
|
342 * @param aParam initialization parameters of the sink. |
|
343 * @param aEndpointId idenfier of the created sink on return. |
|
344 * @return KErrNotFound, if sink type not found |
|
345 */ |
|
346 IMPORT_C TInt AddDataSink( const TUid aSinkType, const TDesC8& aParam, |
|
347 TUint32& aEndpointId ); |
|
348 |
|
349 /** |
|
350 * Adds new source to the session. User must later |
|
351 * call CreateStream to connect this source to some stream. |
|
352 * @param aSourceType type identifier of the source. |
|
353 * @param aParam initialization parameters of the source. |
|
354 * @param aEndpointId idenfier of the created source on return. |
|
355 * @return KErrNotFound, if source type not found |
|
356 */ |
|
357 IMPORT_C TInt AddDataSource( const TUid aSourceType, const TDesC8& aParam, |
|
358 TUint32& aEndpointId ); |
|
359 |
|
360 /** |
|
361 * Checks if link already exists based on local port |
|
362 * @param aSessionId session ID |
|
363 * @param aLinkId ID of the link |
|
364 * @param aNetSettings network settings for the link |
|
365 * @return ETrue if found; otherwise EFalse. |
|
366 */ |
|
367 IMPORT_C TBool LinkExists( TUint32 aSessionId, |
|
368 TUint32& aLinkId, |
|
369 const TMccNetSettings& aNetSettings ); |
|
370 |
|
371 /** |
|
372 * Checks if link contains streams |
|
373 * @param aSessionId session ID |
|
374 * @param aLinkId ID of the link |
|
375 * @return ETrue if found; otherwise EFalse. |
|
376 */ |
|
377 IMPORT_C TBool StreamsExists( TUint32 aSessionId, |
|
378 TUint32 aLinkId ); |
|
379 |
|
380 /** |
|
381 * Gets sink or source parameter |
|
382 * @param aSessionId session where sink or source belongs to |
|
383 * @param aLinkId link ID where sink or source belongs to |
|
384 * @param aStreamId stream ID where sink or source belongs to |
|
385 * @param aEndpointId endpoint ID identifying sink or source. |
|
386 * @param aParam a parameter to get |
|
387 * @param aVal on return will contain parameter value in TPkgBuf structure |
|
388 * @return KErrNotFound if parameter was not found, KErrNone otherwise |
|
389 */ |
|
390 IMPORT_C TInt GetParameter( TUint32 aSessionId, TUint32 aLinkId, |
|
391 TUint32 aStreamId, TUint32 aEndpointId, |
|
392 TUint32 aParam, TDes8& aVal ); |
|
393 |
|
394 /** |
|
395 * Sets sink or source parameter |
|
396 * @param aSessionId session where sink or source belongs to |
|
397 * @param aLinkId link ID where sink or source belongs to |
|
398 * @param aStreamId stream ID where sink or source belongs to |
|
399 * @param aEndpointId endpoint ID identifying sink or source. |
|
400 * @param aParam a parameter to get |
|
401 * @param aVal on return will contain parameter value in TPkgBuf structure |
|
402 * @return KErrNotFound if parameter was not found, KErrNone otherwise |
|
403 */ |
|
404 IMPORT_C TInt SetParameter( TUint32 aSessionId, TUint32 aLinkId, |
|
405 TUint32 aStreamId, TUint32 aEndpointId, |
|
406 TUint32 aParam, const TDesC8& aVal ); |
|
407 |
|
408 /** |
|
409 * Updates sink of the stream. |
|
410 * @param aSessionId session where stream belongs to |
|
411 * @param aLinkId link ID |
|
412 * @param aStreamId ID identifying stream to be updated |
|
413 * @param aEndpointId ID identifying endpoint of the stream to be updated. |
|
414 * @param aParam initialization parameters of the sink. |
|
415 * @return KErrNotFound, if sink type not found |
|
416 */ |
|
417 IMPORT_C TInt UpdateDataSink( TUint32 aSessionId, TUint32 aLinkId, |
|
418 TUint32 aStreamId, TUint32 aEndpointId, |
|
419 const TDesC8& aParam ); |
|
420 |
|
421 /** |
|
422 * Updates source of the stream. |
|
423 * @param aSessionId session where stream belongs to |
|
424 * @param aLinkId link ID |
|
425 * @param aStreamId ID identifying stream to be updated |
|
426 * @param aEndpointId ID identifying endpoint of the stream to be updated. |
|
427 * @param aParam initialization parameters of the source. |
|
428 * @return KErrNotFound, if source type not found |
|
429 */ |
|
430 IMPORT_C TInt UpdateDataSource( TUint32 aSessionId, TUint32 aLinkId, |
|
431 TUint32 aStreamId, TUint32 aEndpointId, |
|
432 const TDesC8& aParam ); |
|
433 |
|
434 /** |
|
435 * Removes sink from MCC. |
|
436 * @param aSessionId session where stream belongs to |
|
437 * @param aLinkId link ID |
|
438 * @param aStreamId ID identifying stream to be updated |
|
439 * @param aEndpointId ID identifying endpoint of the stream to be updated. |
|
440 * @return KErrNotFound, if sink type not found |
|
441 */ |
|
442 IMPORT_C TInt RemoveDataSink( TUint32 aSessionId, TUint32 aLinkId, |
|
443 TUint32 aStreamId, TUint32 aEndpointId ); |
|
444 |
|
445 /** |
|
446 * Removes source from MCC. |
|
447 * @param aSessionId session where stream belongs to |
|
448 * @param aLinkId link ID |
|
449 * @param aStreamId ID identifying stream to be updated |
|
450 * @param aEndpointId ID identifying endpoint of the stream to be updated. |
|
451 * @return KErrNotFound, if source type not found |
|
452 */ |
|
453 IMPORT_C TInt RemoveDataSource( TUint32 aSessionId, TUint32 aLinkId, |
|
454 TUint32 aStreamId, TUint32 aEndpointId ); |
|
455 |
|
456 /** |
|
457 * Reuses sink or source of the stream. Reused sink or source may be |
|
458 * simultaneously shared by two or more stream. It is also possible,that only one stream |
|
459 * can use it at a time. User must later call CreateStream to connect this sink or source |
|
460 * to some stream. |
|
461 * @param aSessionId session where stream belongs to |
|
462 * @param aLinkId link ID |
|
463 * @param aStreamId ID identifying stream to be updated |
|
464 * @param aEndpointId ID identifying endpoint of the stream to be reused. |
|
465 * @return KErrNotFound, if endpoint not found |
|
466 */ |
|
467 IMPORT_C TInt Reuse( TUint32 aSessionId, TUint32 aLinkId, |
|
468 TUint32 aStreamId, TUint32 aEndpointId ); |
|
469 |
|
470 /** |
|
471 * Get the reference count of given sink or source. |
|
472 * @param aSessionId session where stream belongs to |
|
473 * @param aLinkId link ID |
|
474 * @param aStreamId ID identifying stream to be updated |
|
475 * @param aEndpointId ID identifying endpoint of the stream to be updated. |
|
476 * @param aCount number of references using this sink or source. |
|
477 * @return KErrNotFound, if endpoint not found |
|
478 */ |
|
479 IMPORT_C TInt ReferenceCount( TUint32 aSessionId, TUint32 aLinkId, |
|
480 TUint32 aStreamId, TUint32 aEndpointId, |
|
481 TUint& aCount ); |
|
482 |
|
483 /** |
|
484 * Get the reference count of given sink or source. |
|
485 * @param aSessionId session where stream belongs to |
|
486 * @param aBundle new bundle to be added in the session. |
|
487 * @param aBundleId identifier of the added bundle on return. |
|
488 * @return KErrNone if successful |
|
489 */ |
|
490 IMPORT_C TInt AddBundle( TUint32 aSessionId, TMccStreamBundle& aBundle, TUint32& aBundleId ); |
|
491 |
|
492 /** |
|
493 * Get the reference count of given sink or source. |
|
494 * @param aSessionId session where stream belongs to |
|
495 * @param aBundleId identifier of the removed bundle. |
|
496 * @return KErrNotFound, if bundle not found |
|
497 */ |
|
498 IMPORT_C TInt RemoveBundle( TUint32 aSessionId, TUint32 aBundleId ); |
|
499 |
|
500 /** |
|
501 * Get the reference count of given sink or source. |
|
502 * @param aSessionId session where stream belongs to |
|
503 * @param aBundles an array of bundles in given session. |
|
504 * @return KErrNone if successful |
|
505 */ |
|
506 IMPORT_C TInt GetBundles( TUint32 aSessionId, RArray<TMccStreamBundle>& aBundles); |
|
507 |
|
508 /** |
|
509 * Transcodes media file in non-realtime. Progress of transcoding |
|
510 * can be monitored through MMccCtrlObserver::MccEventReceived. |
|
511 * @param aSourceFile source file for transcoding |
|
512 * @param aDestFile destination file for transcoding |
|
513 * @param aQuality requested quality for transcoding |
|
514 * @param aSessionId session identifier for transcoding |
|
515 * @param aVideoCodec requested video parameters for transcoding, overrides aQuality parameter. |
|
516 * Ownership is not transferred. |
|
517 * @param aAudioCodec requested audio parameters for transcoding, overrides aQuality parameter. |
|
518 * Ownership is not transferred. |
|
519 * @return ETrue if succesfull; otherwise EFalse. |
|
520 */ |
|
521 IMPORT_C TInt TranscodeFile( const TDesC8& aSourceFile, const TDesC8& aDestFile, |
|
522 TUint32 aQuality, TUint32& aSessionId, |
|
523 const CMccCodecInformation* aVideoCodec = 0, |
|
524 const CMccCodecInformation* aAudioCodec = 0 ); |
|
525 |
|
526 /** |
|
527 * Cancels transcoding of media file. |
|
528 * @param aSessionId session identifier for transcoding |
|
529 * @return ETrue if succesfull; otherwise EFalse. |
|
530 */ |
|
531 IMPORT_C TInt CancelTranscodeFile( TUint32 aSessionId ); |
|
532 |
|
533 |
|
534 private: |
|
535 |
|
536 /** |
|
537 * C++ default constructor. |
|
538 */ |
|
539 CMccInterface(); |
|
540 |
|
541 /** |
|
542 * By default Symbian 2nd phase constructor is private. |
|
543 */ |
|
544 void ConstructL( MMccCtrlObserver& aObserver ); |
|
545 |
|
546 private: |
|
547 |
|
548 /** |
|
549 * Open controller. |
|
550 * @since Series 60 3.0 |
|
551 * @param aControllerUid Controller uid to open. |
|
552 * @return One of the standard system-wide error codes. |
|
553 */ |
|
554 TInt OpenController( const TUid& aControllerUid ); |
|
555 |
|
556 /** |
|
557 * Gets supported codecs from controller. |
|
558 * @since Series 60 3.0 |
|
559 * @return One of the standard system-wide error codes. |
|
560 */ |
|
561 void CapabilitiesL(); |
|
562 |
|
563 /** |
|
564 * Gets supported bit rates from the codec of the specified stream |
|
565 * @since Series 60 3.0 |
|
566 * @return One of the standard system-wide error codes. |
|
567 */ |
|
568 TInt GetSupportedBitrates( TUint32 aSessionId, |
|
569 TUint32 aLinkId, |
|
570 TUint32 aStreamId, |
|
571 RArray<TUint>& aBitrates ); |
|
572 |
|
573 private: // Data |
|
574 // Reserved for future extensions |
|
575 TAny* iReserved1; |
|
576 TInt iReserved2; |
|
577 |
|
578 private: // Data |
|
579 |
|
580 // Notifies about events happened in Mcc plugin |
|
581 //CMccEvent* iMccEvent; |
|
582 |
|
583 // Handle to the controller plugin for sending custom commands |
|
584 CMccControllerStub* iController; |
|
585 |
|
586 // Contains unique ID of controller interface |
|
587 //TMMFMessageDestinationPckg iMessageDest; |
|
588 |
|
589 // For easier access to Audio Play Device functionality |
|
590 //RMMFAudioPlayDeviceCustomCommands iAudioPlayDeviceCustomCommands; |
|
591 |
|
592 // For easier access to Audio Record Device functionality |
|
593 //RMMFAudioRecordDeviceCustomCommands iAudioRecordDeviceCustomCommands; |
|
594 |
|
595 // Array for codec capabilities |
|
596 RPointerArray<CMccCodecInformation> iCodecInformation; |
|
597 |
|
598 private: |
|
599 #ifdef TEST_EUNIT |
|
600 friend class UT_CMccInterface; |
|
601 #endif |
|
602 }; |
|
603 |
|
604 #endif /* __Mcc_INTERFACE_H__ */ |
|
605 |
|
606 // End of File |