1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __MMFSTANDARDCUSTOMCOMMANDS_H
17 #define __MMFSTANDARDCUSTOMCOMMANDS_H
19 #include <mmf/common/mmfcontroller.h>
20 #include <mmf/common/mmfvideo.h>
21 #include <mmf/common/mmcaf.h>
23 class CMMFVideoFrameMessage;
31 const TInt KPlaybackRateNormal = 1;
37 Balance value for centre
39 const TInt KMMFBalanceCenter = 0;
45 Balance value for max left
47 const TInt KMMFBalanceMaxLeft = -100;
53 Balance value for max right
55 const TInt KMMFBalanceMaxRight = 100;
61 const TInt KMMFVideoCurrentFrame = -1;
77 Interface UID and messages for the Audio Resource Notification API.
79 const TUid KMMFEventCategoryAudioResourceAvailable = {0x101FD9F2};
84 enum TMMFAudioResourceNotificationMessages
86 EMMFAudioResourceRegisterNotification,
87 EMMFAudioResourceCancelRegisterNotification,
88 EMMFAudioResourceGetNotificationData,
89 EMMFAudioResourceWillResumePlay
96 Interface UID and messages for the Audio Play Device API.
98 const TUid KUidInterfaceMMFAudioPlayDevice = {0x101F76D6};
103 enum TMMFAudioPlayDeviceMessages
105 EMMFAudioPlayDeviceSetVolume,
106 EMMFAudioPlayDeviceGetMaxVolume,
107 EMMFAudioPlayDeviceGetVolume,
108 EMMFAudioPlayDeviceSetVolumeRamp,
109 EMMFAudioPlayDeviceSetBalance,
110 EMMFAudioPlayDeviceGetBalance
117 Interface UID and messages for the Audio Record Device API.
119 const TUid KUidInterfaceMMFAudioRecordDevice = {0x101F76D7};
124 enum TMMFAudioRecordDeviceMessage
126 EMMFAudioRecordDeviceSetGain,
127 EMMFAudioRecordDeviceGetMaxGain,
128 EMMFAudioRecordDeviceGetGain,
129 EMMFAudioRecordDeviceSetBalance,
130 EMMFAudioRecordDeviceGetBalance
137 Interface UID and messages for the Audio Play Controller API.
139 const TUid KUidInterfaceMMFAudioPlayController = {0x101F76D8};
144 enum TMMFAudioPlayControllerMessages
146 EMMFAudioPlayControllerSetPlaybackWindow,
147 EMMFAudioPlayControllerDeletePlaybackWindow,
148 EMMFAudioPlayControllerGetLoadingProgress
155 Interface UID and messages for the Audio Record Controller API.
157 const TUid KUidInterfaceMMFAudioRecordController = {0x101F76D9};
162 enum TMMFAudioRecordControllerMessages
164 EMMFAudioRecordControllerGetRecordTimeAvailable,
165 EMMFAudioRecordControllerSetMaxDuration,
166 EMMFAudioRecordControllerSetMaxFileSize,
167 EMMFAudioRecordControllerCrop,
168 EMMFAudioRecordControllerAddMetaDataEntry,
169 EMMFAudioRecordControllerRemoveMetaDataEntry,
170 EMMFAudioRecordControllerReplaceMetaDataEntry
177 Interface UID and messages for the Audio Controller API.
179 const TUid KUidInterfaceMMFAudioController = {0x101F76DA};
184 enum TMMFAudioControllerMessages
186 EMMFAudioControllerSetSourceSampleRate,
187 EMMFAudioControllerSetSourceNumChannels,
188 EMMFAudioControllerSetSourceFormat,
189 EMMFAudioControllerSetSourceBitRate,
190 EMMFAudioControllerSetSourceDataType,
191 EMMFAudioControllerSetSinkSampleRate,
192 EMMFAudioControllerSetSinkNumChannels,
193 EMMFAudioControllerSetSinkFormat,
194 EMMFAudioControllerSetSinkBitRate,
195 EMMFAudioControllerSetSinkDataType,
196 EMMFAudioControllerGetSourceSampleRate,
197 EMMFAudioControllerGetSourceBitRate,
198 EMMFAudioControllerGetSourceNumChannels,
199 EMMFAudioControllerGetSourceFormat,
200 EMMFAudioControllerGetSourceDataType,
201 EMMFAudioControllerGetSinkSampleRate,
202 EMMFAudioControllerGetSinkBitRate,
203 EMMFAudioControllerGetSinkNumChannels,
204 EMMFAudioControllerGetSinkFormat,
205 EMMFAudioControllerGetSinkDataType,
206 EMMFAudioControllerGetSupportedSourceSampleRates,
207 EMMFAudioControllerGetSupportedSourceBitRates,
208 EMMFAudioControllerGetSupportedSourceNumChannels,
209 EMMFAudioControllerGetSupportedSourceDataTypes,
210 EMMFAudioControllerGetSupportedSinkSampleRates,
211 EMMFAudioControllerGetSupportedSinkBitRates,
212 EMMFAudioControllerGetSupportedSinkNumChannels,
213 EMMFAudioControllerGetSupportedSinkDataTypes,
214 EMMFAudioControllerCopyArrayData,
215 EMMFAudioControllerSetCodec
223 const TUid KUidInterfaceMMFVideoController = {0x101F76DB};
228 enum TMMFVideoControllerMessages
230 EMMFVideoControllerGetAudioCodec,
231 EMMFVideoControllerGetVideoBitRate,
232 EMMFVideoControllerGetAudioBitRate,
233 EMMFVideoControllerGetVideoFrameSize,
234 EMMFVideoControllerSetFrameRate,
235 EMMFVideoControllerGetFrameRate,
236 EMMFVideoControllerGetVideoMimeType
243 const TUid KUidInterfaceMMFVideoPlayController = {0x101F7B73};
248 enum TMMFVideoPlayControllerMessages
250 EMMFVideoPlayControllerPrepare,
251 EMMFVideoPlayControllerGetFrame,
252 EMMFVideoPlayControllerSetDisplayWindow,
253 EMMFVideoPlayControllerGetAudioEnabled,
254 EMMFVideoPlayControllerUpdateDisplayRegion,
255 EMMFVideoPlayControllerDSAEvent,
256 EMMFVideoPlayControllerPlay,
257 EMMFVideoPlayControllerRefreshFrame,
258 EMMFVideoPlayControllerGetLoadingProgress,
259 EMMFVideoPlayControllerSetRotation,
260 EMMFVideoPlayControllerGetRotation,
261 EMMFVideoPlayControllerSetScaleFactor,
262 EMMFVideoPlayControllerGetScaleFactor,
263 EMMFVideoPlayControllerSetCropRegion,
264 EMMFVideoPlayControllerGetCropRegion
271 const TUid KUidInterfaceMMFVideoRecordController = {0x101F7B74};
276 enum TMMFVideoRecordControllerMessages
278 EMMFVideoRecordControllerSetVideoFormat,
279 EMMFVideoRecordControllerSetVideoCodec,
280 EMMFVideoRecordControllerSetAudioCodec,
281 EMMFVideoRecordControllerSetVideoBitRate,
282 EMMFVideoRecordControllerSetAudioBitRate,
283 EMMFVideoRecordControllerSetVideoFrameSize,
284 EMMFVideoRecordControllerSetMaxFileSize,
285 EMMFVideoRecordControllerAddMetaDataEntry,
286 EMMFVideoRecordControllerRemoveMetaDataEntry,
287 EMMFVideoRecordControllerReplaceMetaDataEntry,
288 EMMFVideoRecordControllerSetAudioEnabled,
289 EMMFVideoRecordControllerPrepare,
290 EMMFVideoRecordControllerSetCameraHandle,
291 EMMFVideoRecordControllerGetRecordTimeAvailable,
292 EMMFVideoRecordControllerGetSupportedSinkAudioTypes,
293 EMMFVideoRecordControllerGetSupportedSinkVideoTypes,
294 EMMFVideoRecordControllerCopyDescriptorArrayData,
295 EMMFVideoRecordControllerCopyFourCCArrayData,
296 EMMFVideoRecordControllerGetAudioEnabled // INC23777
303 const TUid KUidInterfaceMMFVideoDRMExt = {0x101F7C23};
308 enum TMMFDRMIntentMessages
310 EMMFVideoDRMExtGetFrame
317 Interface UID for the custom command that supports setting the initial screen for video on the controller.
319 const TUid KUidInterfaceMMFVideoSetInitScreen = {0x102825F7};
324 enum TMMFVideoScreenDeviceMessages
326 EMMFVideoSetInitScreenNumber
334 const TUid KUidInterfaceMMFVideoPixelAspectRatio = {0x102831EF};
339 enum TMMFVideoPixelAspectRatioMessages
341 EMMFVideoGetPixelAspectRatio,
342 EMMFVideoSetPixelAspectRatio,
343 EMMFVideoGetSupportedPixelAspectRatios,
344 EMMFVideoPixelAspectRatioCopyArrayData
351 const TUid KUidInterfaceMMFVideoAudioSamplingRateAndChannelConfig = {0x102831F0};
356 enum TMMFVideoAudioSamplingRateAndChannelConfigMessages
358 EMMFVideoGetAudioChannels,
359 EMMFVideoSetAudioChannels,
360 EMMFVideoGetSupportedAudioChannels,
361 EMMFVideoGetAudioSampleRate,
362 EMMFVideoSetAudioSampleRate,
363 EMMFVideoGetSupportedAudioSampleRates,
364 EMMFVideoAudioSamplingRateAndChannelConfigCopyArrayData
371 Client class to access Audio Play Device functionality.
373 The class uses the custom command function of the controller plugin, and removes the necessity
374 for the client to formulate the custom commands.
377 class RMMFAudioPlayDeviceCustomCommands : public RMMFCustomCommandsBase
385 The client side controller object to be used by this custom command interface.
389 IMPORT_C RMMFAudioPlayDeviceCustomCommands(RMMFController& aController);
392 Sets the volume of the sound device.
397 @return One of the system-wide error codes.
401 IMPORT_C TInt SetVolume(TInt aVolume) const;
404 Gets the maximum volume supported by the sound device.
407 The maximum volume, filled in by the controller.
409 @return One of the system-wide error codes.
413 IMPORT_C TInt GetMaxVolume(TInt& aMaxVolume) const;
416 Gets the current playback volume.
419 On return contains the current playback volume.
421 @return One of the system-wide error codes.
425 IMPORT_C TInt GetVolume(TInt& aVolume) const;
430 This will cause the sound device to start playing with zero volume,
431 increasing the volume over aRampDuration microseconds.
433 The volume ramp can be removed by setting the ramp duration to zero.
436 The duration over which the volume is to be increased, in microseconds.
438 @return One of the system-wide error codes.
442 IMPORT_C TInt SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration) const;
445 Sets the balance between the left and right stereo audio channels.
448 Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
449 restored by using KMMFBalanceCenter.
451 @return One of the system-wide error codes.
455 IMPORT_C TInt SetBalance(TInt aBalance) const;
458 Gets the balance between the left and right stereo audio channels.
461 The current balance, filled in by the controller.
463 @return One of the system-wide error codes.
467 IMPORT_C TInt GetBalance(TInt& aBalance) const;
474 Mixin class to be derived from controller plugins that could support the audio play device
477 class MMMFAudioPlayDeviceCustomCommandImplementor
482 Sets the volume of the sound device.
484 This function can leave with one of the system-wide error codes. The request will be
485 completed with the leave code.
492 virtual void MapdSetVolumeL(TInt aVolume) = 0;
495 Gets the maximum volume supported by the sound device.
497 This function can leave with one of the system-wide error codes. The request will be
498 completed with the leave code.
501 The maximum volume, to be filled in by the controller plugin.
505 virtual void MapdGetMaxVolumeL(TInt& aMaxVolume) = 0;
508 Gets the current playback volume.
510 This function can leave with one of the system-wide error codes. The request will be
511 completed with the leave code.
514 The volume, to be filled in by the controller.
518 virtual void MapdGetVolumeL(TInt& aVolume) = 0;
523 This will cause the sound device to start playing with zero volume,
524 increasing the volume over aRampDuration microseconds.
526 The volume ramp can be removed by setting the ramp duration to zero.
528 This function can leave with one of the system-wide error codes. The request will be
529 completed with the leave code.
532 The duration over which the volume is to be increased, in microseconds.
536 virtual void MapdSetVolumeRampL(const TTimeIntervalMicroSeconds& aRampDuration) = 0;
539 Sets the balance between the left and right stereo audio channels.
541 This function can leave with one of the system-wide error codes. The request will be
542 completed with the leave code.
545 Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
546 restored by using KMMFBalanceCenter.
550 virtual void MapdSetBalanceL(TInt aBalance) = 0;
553 Gets the balance between the left and right stereo audio channels.
555 This function can leave with one of the system-wide error codes. The request will be
556 completed with the leave code.
559 The current balance, filled in by the controller.
563 virtual void MapdGetBalanceL(TInt& aBalance) = 0;
570 Custom command parser class to be used by controller plugins wishing to support
571 audio play device commands.
573 The controller plugin must be derived from MMMFAudioPlayDeviceCustomCommandImplementor
576 The controller plugin should create an object of this type and add it to the list of custom
577 command parsers in the controller framework. See the following example code for details.
580 void CMMFAudioController::ConstructL()
582 // Construct custom command parsers
583 CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
584 CleanupStack::PushL(audPlayDevParser);
585 AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
586 CleanupStack::Pop();//audPlayDevParser
588 CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
589 CleanupStack::PushL(audRecDevParser);
590 AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
591 CleanupStack::Pop();//audRecDevParser
599 class CMMFAudioPlayDeviceCustomCommandParser : public CMMFCustomCommandParserBase
604 Creates a new custom command parser capable of handling audio play device commands.
606 This function may leave with one of the system-wide error codes.
609 A reference to the controller plugin that owns this new object.
611 @return A pointer to the object created.
615 IMPORT_C static CMMFAudioPlayDeviceCustomCommandParser* NewL(MMMFAudioPlayDeviceCustomCommandImplementor& aImplementor);
622 IMPORT_C ~CMMFAudioPlayDeviceCustomCommandParser();
625 Handles a request from the client. Called by the controller framework.
628 The message to be handled.
632 void HandleRequest(TMMFMessage& aMessage);
639 A reference to the controller plugin that owns this new object.
643 CMMFAudioPlayDeviceCustomCommandParser(MMMFAudioPlayDeviceCustomCommandImplementor& aImplementor);
644 // Internal request handling methods.
645 void DoHandleRequestL(TMMFMessage& aMessage);
646 TBool DoSetVolumeL(TMMFMessage& aMessage);
647 TBool DoGetMaxVolumeL(TMMFMessage& aMessage);
648 TBool DoGetVolumeL(TMMFMessage& aMessage);
649 TBool DoSetVolumeRampL(TMMFMessage& aMessage);
650 TBool DoSetBalanceL(TMMFMessage& aMessage);
651 TBool DoGetBalanceL(TMMFMessage& aMessage);
653 /** The object that implements the audio play device interface */
654 MMMFAudioPlayDeviceCustomCommandImplementor& iImplementor;
661 Client class to access Audio Record Device functionality.
663 The class uses the custom command function of the controller plugin, and removes the necessity
664 for the client to formulate the custom commands.
668 class RMMFAudioRecordDeviceCustomCommands : public RMMFCustomCommandsBase
676 The client side controller object to be used by this custom command interface.
680 IMPORT_C RMMFAudioRecordDeviceCustomCommands(RMMFController& aController);
683 Sets the gain of the sound device.
688 @return One of the system-wide error codes.
692 IMPORT_C TInt SetGain(TInt aGain) const;
695 Gets the maximum gain supported by the sound device.
698 The maximum gain, filled in by the controller.
700 @return One of the system-wide error codes.
704 IMPORT_C TInt GetMaxGain(TInt& aMaxGain) const;
707 Gets the current recording gain.
710 The gain, filled in by the controller.
712 @return One of the system-wide error codes.
716 IMPORT_C TInt GetGain(TInt& aGain) const;
719 Sets the balance between the left and right stereo microphone channels.
722 Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
723 restored by using KMMFBalanceCenter.
725 @return One of the system-wide error codes.
729 IMPORT_C TInt SetBalance(TInt aBalance) const;
732 Gets the balance between the left and right stereo microphone channels.
735 The current balance, filled in by the controller.
737 @return One of the system-wide error codes.
741 IMPORT_C TInt GetBalance(TInt& aBalance) const;
748 Mixin class to be derived from controller plugins that could support the audio record device
751 class MMMFAudioRecordDeviceCustomCommandImplementor
756 Sets the gain of the sound device.
758 This function can leave with one of the system-wide error codes. The request will be
759 completed with the leave code.
766 virtual void MardSetGainL(TInt aGain) = 0;
769 Gets the maximum gain supported by the sound device.
771 This function can leave with one of the system-wide error codes. The request will be
772 completed with the leave code.
775 The maximum gain, to be filled in by the controller plugin.
779 virtual void MardGetMaxGainL(TInt& aMaxGain) = 0;
782 Gets the current recording gain.
784 This function can leave with one of the system-wide error codes. The request will be
785 completed with the leave code.
788 The gain, to be filled in by the controller.
792 virtual void MardGetGainL(TInt& aGain) = 0;
795 Sets the balance between the left and right stereo microphone channels.
797 This function can leave with one of the system-wide error codes. The request will be
798 completed with the leave code.
801 Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
802 restored by using KMMFBalanceCenter.
806 virtual void MardSetBalanceL(TInt aBalance) = 0;
809 Gets the balance between the left and right stereo microphone channels.
811 This function can leave with one of the system-wide error codes. The request will be
812 completed with the leave code.
815 The current balance, filled in by the controller.
819 virtual void MardGetBalanceL(TInt& aBalance) = 0;
826 Custom command parser class to be used by controller plugins wishing to support
827 audio record device commands.
829 The controller plugin must be derived from MMMFAudioRecordDeviceCustomCommandImplementor
832 The controller plugin should create an object of this type and add it to the list of custom
833 command parsers in the controller framework. See the following example code for details.
836 void CMMFAudioController::ConstructL()
838 // Construct custom command parsers
839 CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
840 CleanupStack::PushL(audPlayDevParser);
841 AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
842 CleanupStack::Pop();//audPlayDevParser
844 CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
845 CleanupStack::PushL(audRecDevParser);
846 AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
847 CleanupStack::Pop();//audRecDevParser
855 class CMMFAudioRecordDeviceCustomCommandParser : public CMMFCustomCommandParserBase
860 Creates a new custom command parser capable of handling audio record device commands.
862 This function may leave with one of the system-wide error codes.
865 A reference to the controller plugin that owns this new object.
867 @return A pointer to the object created.
871 IMPORT_C static CMMFAudioRecordDeviceCustomCommandParser* NewL(MMMFAudioRecordDeviceCustomCommandImplementor& aImplementor);
878 IMPORT_C ~CMMFAudioRecordDeviceCustomCommandParser();
881 Handles a request from the client. Called by the controller framework.
884 The message to be handled.
888 void HandleRequest(TMMFMessage& aMessage);
895 A reference to the controller plugin that owns this new object.
899 CMMFAudioRecordDeviceCustomCommandParser(MMMFAudioRecordDeviceCustomCommandImplementor& aImplementor);
900 // Internal request handling methods.
901 void DoHandleRequestL(TMMFMessage& aMessage);
902 TBool DoSetGainL(TMMFMessage& aMessage);
903 TBool DoGetMaxGainL(TMMFMessage& aMessage);
904 TBool DoGetGainL(TMMFMessage& aMessage);
905 TBool DoSetBalanceL(TMMFMessage& aMessage);
906 TBool DoGetBalanceL(TMMFMessage& aMessage);
908 /** The object that implements the audio record device interface */
909 MMMFAudioRecordDeviceCustomCommandImplementor& iImplementor;
917 Client class to access functionality specific to an audio play controller.
919 The class uses the custom command function of the controller plugin, and removes the necessity
920 for the client to formulate the custom commands.
924 class RMMFAudioPlayControllerCustomCommands : public RMMFCustomCommandsBase
932 The client side controller object to be used by this custom command interface.
936 IMPORT_C RMMFAudioPlayControllerCustomCommands(RMMFController& aController);
939 Sets a playback window. The controller will start playing from the start of the window,
940 and finish playing at the end of the window.
943 The start of the window, in microseconds.
945 The end of the window, in microseconds.
947 @return One of the system-wide error codes.
951 IMPORT_C TInt SetPlaybackWindow(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) const;
954 Removes a previously defined playback window.
956 @return One of the system-wide error codes.
959 IMPORT_C TInt DeletePlaybackWindow();
962 Gets the audio loading progress as a percentage.
964 @param aPercentageProgress
965 The progress loading the clip, as a percentage.
967 @return One of the system-wide error codes.
971 IMPORT_C TInt GetLoadingProgress(TInt& aPercentageProgress) const;
979 Mixin class to be derived from controller plugins that could support the audio play controller
982 class MMMFAudioPlayControllerCustomCommandImplementor
987 Sets a playback window. The controller will start playing from the start of the window,
988 and finish playing at the end of the window.
990 This function can leave with one of the system-wide error codes. The request will be
991 completed with the leave code.
994 The start of the window, in microseconds.
996 The end of the window, in microseconds.
1000 virtual void MapcSetPlaybackWindowL(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) = 0;
1003 Removes a previously defined playback window.
1005 This function can leave with one of the system-wide error codes. The request will be
1006 completed with the leave code.
1010 virtual void MapcDeletePlaybackWindowL() = 0;
1013 Gets the completion status of loading/rebuffering the current audio clip.
1015 This function can leave with one of the system-wide error codes. The request will be
1016 completed with the leave code.
1018 @param aPercentageComplete
1019 The status of loading as a percentage completed.
1023 virtual void MapcGetLoadingProgressL(TInt& aPercentageComplete) = 0;
1030 Custom command parser class to be used by controller plugins wishing to support
1031 audio play controller commands.
1033 The controller plugin must be derived from MMMFAudioPlayControllerCustomCommandImplementor to use
1036 The controller plugin should create an object of this type and add it to the list of custom
1037 command parsers in the controller framework. See the following example code for details.
1040 void CMMFAudioController::ConstructL()
1042 // Construct custom command parsers
1043 CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
1044 CleanupStack::PushL(audPlayDevParser);
1045 AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
1046 CleanupStack::Pop();//audPlayDevParser
1048 CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
1049 CleanupStack::PushL(audRecDevParser);
1050 AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
1051 CleanupStack::Pop();//audRecDevParser
1059 class CMMFAudioPlayControllerCustomCommandParser : public CMMFCustomCommandParserBase
1064 Creates a new custom command parser capable of handling audio play controller commands.
1067 A reference to the controller plugin that owns this new object.
1069 @return A pointer to the object created.
1073 IMPORT_C static CMMFAudioPlayControllerCustomCommandParser* NewL(MMMFAudioPlayControllerCustomCommandImplementor& aImplementor);
1080 IMPORT_C ~CMMFAudioPlayControllerCustomCommandParser();
1083 Handles a request from the client. Called by the controller framework.
1086 The message to be handled.
1090 void HandleRequest(TMMFMessage& aMessage);
1097 A reference to the controller plugin that owns this new object.
1101 CMMFAudioPlayControllerCustomCommandParser(MMMFAudioPlayControllerCustomCommandImplementor& aImplementor);
1102 // Internal request handling methods.
1103 void DoHandleRequestL(TMMFMessage& aMessage);
1104 TBool DoSetPlaybackWindowL(TMMFMessage& aMessage);
1105 TBool DoDeletePlaybackWindowL(TMMFMessage& aMessage);
1106 TBool DoGetLoadingProgressL(TMMFMessage& aMessage);
1109 The object that implements the audio play controller interface
1111 MMMFAudioPlayControllerCustomCommandImplementor& iImplementor;
1121 Client class to access functionality specific to an audio record controller.
1123 The class uses the custom command function of the controller plugin, and removes the necessity
1124 for the client to formulate the custom commands.
1128 class RMMFAudioRecordControllerCustomCommands : public RMMFCustomCommandsBase
1136 The client side controller object to be used by this custom command interface.
1140 IMPORT_C RMMFAudioRecordControllerCustomCommands(RMMFController& aController);
1143 Gets the (possibly estimated) record time left in the clip.
1146 The record time available, in microseconds.
1148 @return One of the system-wide error codes.
1152 IMPORT_C TInt GetRecordTimeAvailable(TTimeIntervalMicroSeconds& aTime) const;
1155 Sets the maximum duration of the recorded clip, in microseconds.
1158 The maximum duration of the recorded clip, in microseconds.
1160 @return One of the system-wide error codes.
1164 IMPORT_C TInt SetMaxDuration(const TTimeIntervalMicroSeconds& aMaxDuration) const;
1167 Sets the maximum size of the recorded clip, in bytes.
1170 The maximum size of the recorded clip, in bytes.
1172 @return One of the system-wide error codes.
1176 IMPORT_C TInt SetMaxFileSize(TInt aMaxSize) const;
1179 Removes a portion from the clip, either from the current position to the beginning or the
1180 current position to the end.
1183 A boolean indicating whether to crop to the end. Crops to the end if set to ETrue, to
1184 the beginning set to EFalse.
1186 @return One of the system-wide error codes.
1190 IMPORT_C TInt Crop(TBool aToEnd);
1193 Adds meta data to the clip.
1196 The details of the new entry to be added.
1200 IMPORT_C void AddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry);
1203 Removes a meta data entry from the clip.
1206 The ID of the meta data entry to delete.
1208 @return One of the system-wide error codes.
1212 IMPORT_C TInt RemoveMetaDataEntry(TInt aIndex);
1215 Replaces a meta data in the clip.
1218 The ID of the meta data entry to replace.
1220 The details of the new entry to be added.
1224 IMPORT_C void ReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry);
1231 Mixin class to be derived from controller plugins that could support the audio record controller
1234 class MMMFAudioRecordControllerCustomCommandImplementor
1239 Gets the (possibly estimated) record time left in the clip.
1241 This function can leave with one of the system-wide error codes. The request will be
1242 completed with the leave code.
1245 The record time available, in microseconds.
1249 virtual void MarcGetRecordTimeAvailableL(TTimeIntervalMicroSeconds& aTime) = 0;
1252 Sets the maximum duration of the recorded clip, in microseconds.
1254 This function can leave with one of the system-wide error codes. The request will be
1255 completed with the leave code.
1258 The maximum duration of the recorded clip, in microseconds.
1262 virtual void MarcSetMaxDurationL(const TTimeIntervalMicroSeconds& aMaxDuration) = 0;
1265 Sets the maximum size of the recorded clip, in bytes.
1267 This function can leave with one of the system-wide error codes. The request will be
1268 completed with the leave code.
1271 The maximum size of the recorded clip, in bytes.
1275 virtual void MarcSetMaxFileSizeL(TInt aMaxSize) = 0;
1278 Removes a portion from the clip, either from the current position to the beginning
1279 or the current position to the end.
1281 This function can leave with one of the system-wide error codes. The request will be
1282 completed with the leave code.
1285 A boolean indicating whether to crop to the end or the beginning. ETrue to crop to the
1286 end, EFalse to the beginning.
1290 virtual void MarcCropL(TBool aToEnd) = 0;
1293 Adds meta data to the clip.
1296 The details of the new entry to be added.
1300 virtual void MarcAddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry) = 0;
1303 Removes a meta data entry from the clip.
1306 The ID of the meta data entry to delete.
1310 virtual void MarcRemoveMetaDataEntryL(TInt aIndex) = 0;
1313 Replaces a meta data entry in the clip.
1316 The ID of the meta data entry to replace.
1318 The details of the new entry to be added.
1322 virtual void MarcReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry) = 0;
1329 Custom command parser class to be used by controller plugins wishing to support
1330 audio record controller commands.
1332 The controller plugin must be derived from MMMFAudioRecordControllerCustomCommandImplementor
1335 The controller plugin should create an object of this type and add it to the list of custom
1336 command parsers in the controller framework. See the following example code for details.
1339 void CMMFAudioController::ConstructL()
1341 // Construct custom command parsers
1342 CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
1343 CleanupStack::PushL(audPlayDevParser);
1344 AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
1345 CleanupStack::Pop();//audPlayDevParser
1347 CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
1348 CleanupStack::PushL(audRecDevParser);
1349 AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
1350 CleanupStack::Pop();//audRecDevParser
1358 class CMMFAudioRecordControllerCustomCommandParser : public CMMFCustomCommandParserBase
1363 Creates a new custom command parser capable of handling audio record controller commands.
1366 A reference to the controller plugin that owns this new object.
1368 @return A pointer to the object created.
1372 IMPORT_C static CMMFAudioRecordControllerCustomCommandParser* NewL(MMMFAudioRecordControllerCustomCommandImplementor& aImplementor);
1379 IMPORT_C ~CMMFAudioRecordControllerCustomCommandParser();
1382 Handles a request from the client. Called by the controller framework.
1385 The message to be handled.
1389 void HandleRequest(TMMFMessage& aMessage);
1396 A reference to the controller plugin that owns this new object.
1400 CMMFAudioRecordControllerCustomCommandParser(MMMFAudioRecordControllerCustomCommandImplementor& aImplementor);
1401 // Internal request handling methods.
1402 void DoHandleRequestL(TMMFMessage& aMessage);
1403 TBool DoGetRecordTimeAvailableL(TMMFMessage& aMessage);
1404 TBool DoSetMaxDurationL(TMMFMessage& aMessage);
1405 TBool DoSetMaxFileSizeL(TMMFMessage& aMessage);
1406 TBool DoCropL(TMMFMessage& aMessage);
1407 TBool DoAddMetaDataEntryL(TMMFMessage& aMessage);
1408 TBool DoRemoveMetaDataEntryL(TMMFMessage& aMessage);
1409 TBool DoReplaceMetaDataEntryL(TMMFMessage& aMessage);
1412 The object that implements the audio record controller interface.
1414 MMMFAudioRecordControllerCustomCommandImplementor& iImplementor;
1422 Client class to access functionality specific to an audio controller.
1424 The class uses the custom command function of the controller plugin, and removes the necessity
1425 for the client to formulate the custom commands.
1429 class RMMFAudioControllerCustomCommands : public RMMFCustomCommandsBase
1437 The client side controller object to be used by this custom command
1442 IMPORT_C RMMFAudioControllerCustomCommands(RMMFController& aController);
1445 Sets the sample rate of the data source in samples per second.
1448 The sample rate, in samples per second.
1450 @return One of the system-wide error codes.
1454 IMPORT_C TInt SetSourceSampleRate(TUint aSampleRate) const;
1457 Sets the bit rate of the data source in bits per second.
1460 The bit rate, in bits per second.
1462 @return One of the system-wide error codes.
1466 IMPORT_C TInt SetSourceBitRate(TUint aRate) const;
1469 Sets the number of channels in the data source. For example, one channel for mono, two channels
1473 The number of channels.
1475 @return One of the system-wide error codes.
1479 IMPORT_C TInt SetSourceNumChannels(TUint aNumChannels) const;
1482 Sets the format of the data source.
1484 The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin to be used.
1487 The format plugin to be used.
1489 @return One of the system-wide error codes.
1493 IMPORT_C TInt SetSourceFormat(TUid aFormatUid) const;
1496 Sets the fourCC code of the source.
1501 @return One of the system-wide error codes.
1505 IMPORT_C TInt SetSourceDataType(TFourCC aDataType) const;
1508 Sets the sample rate of the data sink in samples per second.
1511 The sample rate, in samples per second.
1513 @return One of the system-wide error codes.
1517 IMPORT_C TInt SetSinkSampleRate(TUint aSampleRate) const;
1520 Set the bit rate of the data sink in bits per second.
1523 The bit rate, in bits per second.
1525 @return One of the system-wide error codes.
1529 IMPORT_C TInt SetSinkBitRate(TUint aRate) const;
1532 Sets the number of channels in the data sink. For example, one channel for mono, two channels
1536 The number of channels.
1538 @return One of the system-wide error codes.
1542 IMPORT_C TInt SetSinkNumChannels(TUint aNumChannels) const;
1545 Sets the format of the data sink.
1547 The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin to be used.
1550 The format plugin to be used.
1552 @return One of the system-wide error codes.
1556 IMPORT_C TInt SetSinkFormat(TUid aFormatUid) const;
1559 Set the fourCC code of the sink.
1564 @return One of the system-wide error codes.
1568 IMPORT_C TInt SetSinkDataType(TFourCC aDataType) const;
1571 Sets the codec to be used. Useful when recording data.
1573 @param aSourceDataType
1574 The data type of the source of the codec.
1575 @param aSinkDataType
1576 The data type of the sink of the codec.
1578 @return One of the system-wide error codes.
1582 IMPORT_C TInt SetCodec(TFourCC aSourceDataType, TFourCC aSinkDataType) const;
1585 Gets the sample rate of the data source in samples per second.
1588 The sample rate, in samples per second.
1590 @return One of the system-wide error codes.
1594 IMPORT_C TInt GetSourceSampleRate(TUint& aRate) const;
1597 Gets the bit rate of the data source in bits per second.
1600 The bit rate, in bits per second.
1602 @return One of the system-wide error codes.
1606 IMPORT_C TInt GetSourceBitRate(TUint& aRate) const;
1609 Gets the number of channels in the data source. For example, one channel for mono, two channels
1613 The number of channels.
1615 @return One of the system-wide error codes.
1619 IMPORT_C TInt GetSourceNumChannels(TUint& aNumChannels) const;
1622 Gets the format of the data source.
1624 The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin being used.
1627 The format plugin being used.
1629 @return One of the system-wide error codes.
1633 IMPORT_C TInt GetSourceFormat(TUid& aFormat) const;
1636 Get the fourCC code of the source.
1641 @return One of the system-wide error codes.
1645 IMPORT_C TInt GetSourceDataType(TFourCC& aDataType) const;
1648 Gets the sample rate of the data sink in samples per second.
1651 The sample rate, in samples per second.
1653 @return One of the system-wide error codes.
1657 IMPORT_C TInt GetSinkSampleRate(TUint& aRate) const;
1660 Gets the bit rate of the data sink in bits per second.
1663 The bit rate, in bits per second.
1665 @return One of the system-wide error codes.
1669 IMPORT_C TInt GetSinkBitRate(TUint& aRate) const;
1672 Gets the number of channels in the data sink. For example, one channel for mono, two channels
1676 The number of channels.
1678 @return One of the system-wide error codes.
1682 IMPORT_C TInt GetSinkNumChannels(TUint& aNumChannels) const;
1685 Gets the format of the data sink.
1687 The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin being used.
1690 The format plugin being used.
1692 @return One of the system-wide error codes.
1696 IMPORT_C TInt GetSinkFormat(TUid& aFormat) const;
1699 Gets the fourCC code of the sink.
1704 @return One of the system-wide error codes.
1708 IMPORT_C TInt GetSinkDataType(TFourCC& aDataType) const;
1711 Gets the list of sample rates supported by the data source.
1713 Warning: Existing objects in this array will be removed by this function.
1715 @param aSupportedRates
1716 The supported rates.
1718 @return One of the system-wide error codes.
1722 IMPORT_C void GetSupportedSourceSampleRatesL(RArray<TUint>& aSupportedRates) const;
1725 Gets the list of bit rates supported by the data source.
1727 Warning: Existing objects in this array will be removed by this function.
1729 @param aSupportedRates
1730 The supported rates.
1732 @return One of the system-wide error codes.
1736 IMPORT_C void GetSupportedSourceBitRatesL(RArray<TUint>& aSupportedRates) const;
1739 Gets the list of channels supported by the data source (ie mono, stereo etc).
1741 Warning: Existing objects in this array will be removed by this method.
1743 @param aSupportedChannels
1744 The supported channels.
1746 @return One of the system-wide error codes.
1750 IMPORT_C void GetSupportedSourceNumChannelsL(RArray<TUint>& aSupportedChannels) const;
1753 Gets the list of fourCC codes supported by the data source.
1755 Warning: Existing objects in this array will be removed by this method.
1757 @param aSupportedDataTypes
1758 The supported data types.
1760 @return One of the system-wide error codes.
1764 IMPORT_C void GetSupportedSourceDataTypesL(RArray<TFourCC>& aSupportedDataTypes) const;
1767 Gets the list of sample rates supported by the data sink.
1769 Warning: Existing objects in this array will be removed by this method.
1771 @param aSupportedRates
1772 The supported rates.
1774 @return One of the system-wide error codes.
1778 IMPORT_C void GetSupportedSinkSampleRatesL(RArray<TUint>& aSupportedRates) const;
1781 Gets the list of bit rates supported by the data sink.
1783 Warning: Existing objects in this array will be removed by this method.
1785 @param aSupportedRates
1786 The supported rates.
1788 @return One of the system-wide error codes.
1792 IMPORT_C void GetSupportedSinkBitRatesL(RArray<TUint>& aSupportedRates) const;
1795 Gets the list of channels supported by the data sink (ie mono, stereo etc).
1797 Warning: Existing objects in this array will be removed by this method.
1799 @param aSupportedChannels
1800 The supported channels.
1802 @return One of the system-wide error codes.
1806 IMPORT_C void GetSupportedSinkNumChannelsL(RArray<TUint>& aSupportedChannels) const;
1809 Gets the list of fourCC codes supported by the data sink.
1811 Warning: Existing objects in this array will be removed by this method.
1813 @param aSupportedDataTypes
1814 The supported data types.
1816 @return One of the system-wide error codes.
1820 IMPORT_C void GetSupportedSinkDataTypesL(RArray<TFourCC>& aSupportedDataTypes) const;
1823 void DoGetUintArrayL(RArray<TUint>& aArray, TMMFAudioControllerMessages aIpc) const;
1824 void DoGetFourCCArrayL(RArray<TFourCC>& aArray, TMMFAudioControllerMessages aIpc) const;
1832 Mixin class to be derived from controller plugins that could support the audio record controller
1835 class MMMFAudioControllerCustomCommandImplementor
1840 Sets the sample rate of the data source in samples per second.
1843 The sample rate, in samples per second.
1847 virtual void MacSetSourceSampleRateL(TUint aSampleRate) = 0;
1850 Sets the bit rate of the data source in bits per second.
1853 The bit rate, in bits per second.
1857 virtual void MacSetSourceBitRateL(TUint aBitRate) = 0;
1860 Sets the number of channels in the data source. For example, one channel for mono, two channels
1864 The number of channels.
1868 virtual void MacSetSourceNumChannelsL(TUint aNumChannels) = 0;
1871 Sets the format of the data source. The UID corresponds to the UID of the CMMFFormat-derived
1872 ECOM plugin to be used.
1875 The format plugin to be used.
1879 virtual void MacSetSourceFormatL(TUid aFormatUid) = 0;
1882 Sets the fourCC code of the source.
1889 virtual void MacSetSourceDataTypeL(TFourCC aDataType) = 0;
1892 Sets the sample rate of the data sink in samples per second.
1895 The sample rate, in samples per second.
1899 virtual void MacSetSinkSampleRateL(TUint aSampleRate) = 0;
1902 Sets the bit rate of the data sink in bits per second.
1905 The bit rate, in bits per second.
1909 virtual void MacSetSinkBitRateL(TUint aRate) = 0;
1912 Sets the number of channels in the data sink. For example, one channel for mono, two channels
1916 The number of channels.
1920 virtual void MacSetSinkNumChannelsL(TUint aNumChannels) = 0;
1923 Sets the format of the data sink. The UID corresponds to the uid of the CMMFFormat-derived ECOM
1927 The format plugin to be used.
1931 virtual void MacSetSinkFormatL(TUid aFormatUid) = 0;
1934 Sets the fourCC code of the sink.
1941 virtual void MacSetSinkDataTypeL(TFourCC aDataType) = 0;
1944 Sets the codec to be used. Useful when recording data.
1946 @param aSourceDataType
1947 The data type of the source of the codec.
1948 @param aSinkDataType
1949 The data type of the sink of the codec.
1953 virtual void MacSetCodecL(TFourCC aSourceDataType, TFourCC aSinkDataType) = 0;
1957 Gets the sample rate of the data source in samples per second.
1960 The sample rate, in samples per second.
1964 virtual void MacGetSourceSampleRateL(TUint& aRate) = 0;
1967 Gets the bit rate of the data source in bits per second.
1970 The bit rate, in bits per second.
1974 virtual void MacGetSourceBitRateL(TUint& aRate) = 0;
1977 Gets the number of channels in the data source. For example, one channel for mono, two channels
1981 The number of channels.
1985 virtual void MacGetSourceNumChannelsL(TUint& aNumChannels) = 0;
1988 Gets the format of the data source. The UID corresponds to the uid of the CMMFFormat-derived
1989 ECOM plugin being used.
1992 The format plugin being used.
1996 virtual void MacGetSourceFormatL(TUid& aFormat) = 0;
1999 Gets the fourCC code of the source.
2006 virtual void MacGetSourceDataTypeL(TFourCC& aDataType) = 0;
2009 Gets the sample rate of the data sink in samples per second.
2012 The sample rate, in samples per second.
2016 virtual void MacGetSinkSampleRateL(TUint& aRate) = 0;
2019 Gets the bit rate of the data sink in bits per second.
2022 The bit rate, in bits per second.
2026 virtual void MacGetSinkBitRateL(TUint& aRate) = 0;
2029 Gets the number of channels in the data sink. For example, one channel for mono, two channels
2033 The number of channels.
2037 virtual void MacGetSinkNumChannelsL(TUint& aNumChannels) = 0;
2040 Gets the format of the data sink. The UID corresponds to the uid of the CMMFFormat-derived ECOM
2044 The format plugin being used.
2048 virtual void MacGetSinkFormatL(TUid& aFormat) = 0;
2051 Gets the fourCC code of the sink.
2058 virtual void MacGetSinkDataTypeL(TFourCC& aDataType) = 0;
2061 Gets the list of sample rates supported by the data source.
2063 @param aSupportedRates
2064 The supported rates. Warning: Existing objects in this array will be removed by this method.
2068 virtual void MacGetSupportedSourceSampleRatesL(RArray<TUint>& aSupportedRates) = 0;
2071 Gets the list of bit rates supported by the data source.
2073 Warning: Existing objects in this array will be removed by this method.
2075 @param aSupportedRates
2076 The supported rates.
2080 virtual void MacGetSupportedSourceBitRatesL(RArray<TUint>& aSupportedRates) = 0;
2083 Gets the list of channels supported by the data source (ie mono, stereo etc).
2085 Warning: Existing objects in this array will be removed by this method.
2087 @param aSupportedChannels
2088 The supported channels.
2092 virtual void MacGetSupportedSourceNumChannelsL(RArray<TUint>& aSupportedChannels) = 0;
2095 Gets the list of fourCC codes supported by the data source.
2097 Warning: Existing objects in this array will be removed by this method.
2099 @param aSupportedDataTypes
2100 The supported data types.
2104 virtual void MacGetSupportedSourceDataTypesL(RArray<TFourCC>& aSupportedDataTypes) = 0;
2107 Gets the list of sample rates supported by the data sink.
2109 Warning: Existing objects in this array will be removed by this method.
2111 @param aSupportedRates
2112 The supported rates.
2116 virtual void MacGetSupportedSinkSampleRatesL(RArray<TUint>& aSupportedRates) = 0;
2119 Gets the list of bit rates supported by the data sink.
2121 Warning: Existing objects in this array will be removed by this method.
2123 @param aSupportedRates
2124 The supported rates.
2128 virtual void MacGetSupportedSinkBitRatesL(RArray<TUint>& aSupportedRates) = 0;
2131 Gets the list of channels supported by the data sink (ie mono, stereo etc).
2133 Warning: Existing objects in this array will be removed by this method.
2135 @param aSupportedChannels
2136 The supported channels.
2140 virtual void MacGetSupportedSinkNumChannelsL(RArray<TUint>& aSupportedChannels) = 0;
2143 Gets the list of fourCC codes supported by the data sink.
2145 Warning: Existing objects in this array will be removed by this method.
2147 @param aSupportedDataTypes
2148 The supported data types.
2152 virtual void MacGetSupportedSinkDataTypesL(RArray<TFourCC>& aSupportedDataTypes) = 0;
2159 Custom command parser class to be used by controller plugins wishing to support
2160 audio controller commands.
2162 The controller plugin must be derived from MMMFAudioControllerCustomCommandImplementor
2165 The controller plugin should create an object of this type and add it to the list of custom
2166 command parsers in the controller framework. See the following example code for details.
2169 void CMMFAudioController::ConstructL()
2171 // Construct custom command parsers
2172 CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
2173 CleanupStack::PushL(audPlayDevParser);
2174 AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
2175 CleanupStack::Pop();//audPlayDevParser
2177 CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
2178 CleanupStack::PushL(audRecDevParser);
2179 AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
2180 CleanupStack::Pop();//audRecDevParser
2188 class CMMFAudioControllerCustomCommandParser : public CMMFCustomCommandParserBase
2193 Creates a new custom command parser capable of handling audio controller commands.
2196 A reference to the controller plugin that owns this new object.
2198 @return A pointer to the object created.
2202 IMPORT_C static CMMFAudioControllerCustomCommandParser* NewL(MMMFAudioControllerCustomCommandImplementor& aImplementor);
2209 IMPORT_C ~CMMFAudioControllerCustomCommandParser();
2212 Handles a request from the client. Called by the controller framework.
2215 The message to be handled.
2219 void HandleRequest(TMMFMessage& aMessage);
2225 A reference to the controller plugin that owns this new object.
2229 CMMFAudioControllerCustomCommandParser(MMMFAudioControllerCustomCommandImplementor& aImplementor);
2230 // Internal request handling methods.
2231 void DoHandleRequestL(TMMFMessage& aMessage);
2233 TBool DoSetSourceSampleRateL(TMMFMessage& aMessage);
2234 TBool DoSetSourceNumChannelsL(TMMFMessage& aMessage);
2235 TBool DoSetSourceFormatL(TMMFMessage& aMessage);
2236 TBool DoSetSinkSampleRateL(TMMFMessage& aMessage);
2237 TBool DoSetSinkNumChannelsL(TMMFMessage& aMessage);
2238 TBool DoSetSinkFormatL(TMMFMessage& aMessage);
2239 TBool DoSetCodecL(TMMFMessage& aMessage);
2240 TBool DoSetSourceBitRateL(TMMFMessage& aMessage);
2241 TBool DoSetSourceDataTypeL(TMMFMessage& aMessage);
2242 TBool DoSetSinkBitRateL(TMMFMessage& aMessage);
2243 TBool DoSetSinkDataTypeL(TMMFMessage& aMessage);
2244 TBool DoGetSourceSampleRateL(TMMFMessage& aMessage);
2245 TBool DoGetSourceBitRateL(TMMFMessage& aMessage);
2246 TBool DoGetSourceNumChannelsL(TMMFMessage& aMessage);
2247 TBool DoGetSourceFormatL(TMMFMessage& aMessage);
2248 TBool DoGetSourceDataTypeL(TMMFMessage& aMessage);
2249 TBool DoGetSinkSampleRateL(TMMFMessage& aMessage);
2250 TBool DoGetSinkBitRateL(TMMFMessage& aMessage);
2251 TBool DoGetSinkNumChannelsL(TMMFMessage& aMessage);
2252 TBool DoGetSinkFormatL(TMMFMessage& aMessage);
2253 TBool DoGetSinkDataTypeL(TMMFMessage& aMessage);
2254 TBool DoGetSupportedSourceSampleRatesL(TMMFMessage& aMessage);
2255 TBool DoGetSupportedSourceBitRatesL(TMMFMessage& aMessage);
2256 TBool DoGetSupportedSourceNumChannelsL(TMMFMessage& aMessage);
2257 TBool DoGetSupportedSourceDataTypesL(TMMFMessage& aMessage);
2258 TBool DoGetSupportedSinkSampleRatesL(TMMFMessage& aMessage);
2259 TBool DoGetSupportedSinkBitRatesL(TMMFMessage& aMessage);
2260 TBool DoGetSupportedSinkNumChannelsL(TMMFMessage& aMessage);
2261 TBool DoGetSupportedSinkDataTypesL(TMMFMessage& aMessage);
2262 TBool DoCopyArrayDataL(TMMFMessage& aMessage);
2264 void DoCreateBufFromUintArrayL(RArray<TUint>& aArray);
2265 void DoCreateBufFromFourCCArrayL(RArray<TFourCC>& aArray);
2268 The object that implements the audio record controller interface
2270 MMMFAudioControllerCustomCommandImplementor& iImplementor;
2272 CBufFlat* iDataCopyBuffer;
2282 Client class to access functionality specific to a video controller.
2284 The class uses the custom command function of the controller plugin, and removes the necessity
2285 for the client to formulate the custom commands.
2289 class RMMFVideoControllerCustomCommands : public RMMFCustomCommandsBase
2297 The client side controller object to be used by this custom command interface.
2301 IMPORT_C RMMFVideoControllerCustomCommands(RMMFController& aController);
2304 Gets the frame size of the clip.
2306 @param aVideoFrameSize
2307 The frame size, in pixels.
2309 @return One of the system-wide error codes.
2313 IMPORT_C TInt GetVideoFrameSize(TSize& aVideoFrameSize) const;
2316 Gets the audio type.
2319 The FourCC of the audio codec.
2321 @return One of the system-wide error codes.
2325 IMPORT_C TInt GetAudioCodec(TFourCC& aCodec) const;
2328 Gets the video bit rate.
2331 The bit rate of the video stream. If this value is KMMFVariableVideoBitRate it signifies
2332 a variable bit rate.
2334 @return One of the system-wide error codes.
2338 IMPORT_C TInt GetVideoBitRate(TInt& aBitRate) const;
2341 Gets the audio bit rate.
2344 The bit rate of the audio stream.
2346 @return One of the system-wide error codes.
2350 IMPORT_C TInt GetAudioBitRate(TInt& aBitRate) const;
2353 Sets the frame rate of the clip.
2355 @param aFramesPerSecond
2356 The number of frames per second.
2358 @return One of the system-wide error codes.
2362 IMPORT_C TInt SetFrameRate(TReal32 aFramesPerSecond) const;
2365 Gets the frame rate of the clip.
2367 @param aFramesPerSecond
2368 The number of frames per second, filled in by the controller plugin.
2370 @return One of the system-wide error codes.
2374 IMPORT_C TInt GetFrameRate(TReal32& aFramesPerSecond) const;
2377 Gets the video clip MIME type.
2380 The Mime type of the current clip.
2384 IMPORT_C TInt GetVideoMimeType(TDes8& aMimeType) const;
2391 Client class to access functionality specific to a video playback controller.
2393 The class uses the custom command function of the controller plugin, and removes the necessity
2394 for the client to formulate the custom commands.
2398 class RMMFVideoPlayControllerCustomCommands : public RMMFCustomCommandsBase
2406 The client side controller object to be used by this custom command interface.
2410 IMPORT_C RMMFVideoPlayControllerCustomCommands(RMMFController& aController);
2413 Prepares the video clip to be accessed.
2415 A call to this function tells the loaded controller plugin to finalise its configuration
2416 and to prepare to start reading the video clip. It is not possible to play the video clip
2417 or query any of its properties (e.g. duration, meta data etc.) until the controller plugin
2418 has signified the completion of this method by generating a KMMFEventCategoryVideoPrepareComplete
2423 IMPORT_C TInt Prepare();
2426 Asks the controller to store the current frame to a bitmap.
2428 The video play controller will send an event to the client on completion of the task.
2431 The handle of the CFbsBitmap object to retrieve the frame to.
2433 The active object to call back on.
2435 @return One of the system-wide error codes.
2439 IMPORT_C void GetFrame(CFbsBitmap& aBitmap, TRequestStatus& aStatus);
2442 Sets the screen region to be used to display the video.
2445 The window rectangle.
2449 @return One of the system-wide error codes.
2453 IMPORT_C TInt SetDisplayWindow(const TRect& aWindowRect, const TRect& aClipRect) const;
2456 Updates the display region.
2459 The valid region to display to.
2461 @return One of the system-wide error codes.
2465 IMPORT_C TInt UpdateDisplayRegion(const TRegion& aRegion) const;
2468 Queries whether audio is enabled.
2471 A boolean indicating whether audio is enabled.
2473 @return One of the system-wide error codes.
2477 IMPORT_C TInt GetAudioEnabled(TBool& aEnabled) const;
2480 Sends a direct screen access event to controller.
2483 The direct screen access event.
2485 @return One of the system-wide error codes.
2489 IMPORT_C TInt DirectScreenAccessEvent(const TMMFDSAEvent aDSAEvent) const;
2492 Sets a time window for video playback.
2495 The start time in milliseconds relative to the start of the video clip.
2497 The end time in milliseconds relative to the start of the video clip.
2499 @return One of the system-wide error codes.
2503 IMPORT_C TInt Play(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) const;
2506 Requests the controller to redraw the current frame.
2508 @return One of the system-wide error codes.
2512 IMPORT_C TInt RefreshFrame() const;
2515 Gets the video loading progress as a percentage.
2517 @param aPercentageProgress
2518 The progress loading the clip, as a percentage.
2520 @return One of the system-wide error codes.
2524 IMPORT_C TInt GetLoadingProgress(TInt& aPercentageProgress) const;
2527 Rotates the video image on the screen.
2530 The desired rotation to apply.
2532 @return One of the system-wide error codes.
2536 IMPORT_C TInt SetRotation(TVideoRotation aRotation) const;
2539 Queries the rotation that is currently applied to the video image.
2542 The applied rotation.
2544 @return One of the system wide error codes.
2548 IMPORT_C TInt GetRotation(TVideoRotation& aRotation) const;
2551 Scales the video image to a specified percentage of its original size.
2553 @param aWidthPercentage
2554 The percentage (100 = original size) to be used to scale the width of the video image.
2555 @param aHeightPercentage
2556 The percentage (100 = original size) to be used to scale the height of the video image.
2557 If this is not equal to aWidthPercentage then the image may be distorted.
2558 @param aAntiAliasFiltering
2559 True if anti-aliasing filtering should be used. If the plugin does not
2560 support this kind of processing, this value will be ignored.
2562 @return One of the system wide error codes.
2566 IMPORT_C TInt SetScaleFactor(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering) const;
2569 Gets the scale factor currently applied to the video image.
2571 @param aWidthPercentage
2572 On return, will contain the percentage (100 = original size) used to scale the width
2574 @param aHeightPercentage
2575 On return. will contain the percentage (100 = original size) used to scale the height
2577 @param aAntiAliasFiltering
2578 True if anti-aliasing filtering is being used
2580 @return One of the system wide error codes.
2584 IMPORT_C TInt GetScaleFactor(TReal32& aWidthPercentage, TReal32& aHeightPercentage, TBool& aAntiAliasFiltering) const;
2587 Selects a region of the video image to be displayed.
2590 The dimensions of the crop region, relative to the video image.
2592 @return One of the system wide error codes.
2596 IMPORT_C TInt SetCropRegion(const TRect& aCropRegion) const;
2599 Gets the crop region currently applied to the image.
2602 The dimensions of the crop region, relative to the video image. If no crop region has
2603 been applied, the full dimensions of the video image will be returned.
2605 @return One of the system-wide error codes.
2609 IMPORT_C TInt GetCropRegion(TRect& aCropRegion) const;
2613 TPckgBuf<TMMFVideoConfig> iConfigPackage;
2620 Client class to access functionality specific to a video recorder controller.
2622 The class uses the custom command function of the controller plugin, and removes the necessity
2623 for the client to formulate the custom commands.
2627 class RMMFVideoRecordControllerCustomCommands : public RMMFCustomCommandsBase
2635 The client side controller object to be used by this custom command interface.
2639 IMPORT_C RMMFVideoRecordControllerCustomCommands(RMMFController& aController);
2642 Sets the format for the video to record.
2644 @param aVideoFormatUid
2645 The UID of the video format.
2647 @return This method will return with one of the system-wide error codes.
2651 IMPORT_C TInt SetVideoFormat(TUid aVideoFormatUid) const;
2654 Sets the video codec for recording.
2657 The MIME type of the video codec.
2659 @return One of the system-wide error codes.
2663 IMPORT_C TInt SetVideoCodec(const TDesC8& aVideoCodec) const;
2666 Sets the video bit rate.
2669 The bit rate of the video stream.
2671 @return One of the system-wide error codes.
2675 IMPORT_C TInt SetVideoBitRate(TInt aBitRate) const;
2678 Sets the audio bit rate.
2681 The bit rate of the audio stream.
2683 @return One of the system-wide error codes.
2687 IMPORT_C TInt SetAudioBitRate(TInt aBitRate) const;
2690 Sets the audio codec for recording.
2693 The FourCC code of the audio codec.
2695 @return One of the system-wide error codes.
2699 IMPORT_C TInt SetAudioCodec(TFourCC aAudioCodec) const;
2702 Sets the frame size of the clip.
2704 @param aVideoFrameSize
2705 The frame size, in pixels.
2707 @return One of the system-wide error codes.
2711 IMPORT_C TInt SetVideoFrameSize(TSize aVideoFrameSize) const;
2714 Sets the maximum size of the recorded clip, in bytes.
2717 The maximum size of the recorded clip, in bytes. This can be called with the parameter
2718 KMMFNoMaxClipSize which signifies no maximum file size.
2720 @return One of the system-wide error codes.
2724 IMPORT_C TInt SetMaxFileSize(TInt aMaxSize) const;
2727 Adds meta data to the clip.
2730 The details of the new entry to be added.
2732 @return One of the system-wide error codes.
2736 IMPORT_C void AddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry)const;
2739 Removes a meta data entry from the clip.
2742 The ID of the meta data entry to delete.
2744 @return One of the system-wide error codes.
2748 IMPORT_C TInt RemoveMetaDataEntry(TInt aIndex)const;
2751 Replaces a meta data in the clip.
2754 The ID of the meta data entry to replace.
2756 The details of the new entry to be added.
2760 IMPORT_C void ReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry)const;
2763 Sets whether audio is enabled.
2766 A boolean indicating if audio should be enabled.
2768 @return One of the system-wide error codes.
2772 IMPORT_C TInt SetAudioEnabled(TBool aEnable) const;
2775 Prepares the controller for recording. This should be called before the first attempt to record
2776 with the controller.
2778 @return One of the system-wide error codes.
2782 IMPORT_C TInt Prepare() const;
2785 Sets the handle of the camera to use.
2787 @param aCameraHandle
2788 The handle of the camera to use.
2790 @return One of the system-wide error codes.
2794 IMPORT_C TInt SetCameraHandle(TInt aCameraHandle) const;
2797 Gets the (possibly estimated) record time left in the clip.
2800 The record time available, in microseconds.
2802 @return One of the system-wide error codes.
2806 IMPORT_C TInt GetRecordTimeAvailable(TTimeIntervalMicroSeconds& aTime) const;
2809 Gets the supported sink audio types.
2811 @param aSupportedDataTypes
2812 The supported data types.
2816 IMPORT_C TInt GetSupportedSinkAudioTypes(RArray<TFourCC>& aSupportedDataTypes) const;
2819 Gets the supported sink video types.
2822 The supported data types.
2826 IMPORT_C TInt GetSupportedSinkVideoTypes(CDesC8Array& aDataTypes) const;
2830 Retrieves whether audio is enabled.
2833 A boolean indicating whether audio is enabled.
2835 @return One of the system-wide error codes.
2839 IMPORT_C TInt GetAudioEnabled(TBool& aEnabled) const;
2842 void DoGetCDesC8ArrayL(CDesC8Array& aArray, TMMFVideoRecordControllerMessages aIpc) const;
2843 void DoGetFourCCArrayL(RArray<TFourCC>& aArray) const;
2851 Mixin class to be derived from controller plugins that could support the video record controller
2854 class MMMFVideoRecordControllerCustomCommandImplementor
2859 Sets the format for the video to record.
2861 @param aVideoFormatUid
2862 The UID of the video format.
2864 @return One of the system-wide error codes.
2868 virtual void MvrcSetVideoFormatL(TUid aVideoFormatUid)=0;
2871 Sets the video codec for recording.
2874 The MIME type of the video codec.
2876 @return One of the system-wide error codes.
2880 virtual void MvrcSetVideoCodecL(const TDesC8& aVideoCodec)=0;
2883 Sets the audio codec for recording.
2886 The FourCC code of the audio codec.
2888 @return One of the system-wide error codes.
2892 virtual void MvrcSetAudioCodecL(TFourCC aAudioCodec)=0;
2895 Sets the video bit rate.
2898 The bit rate of the video stream. This can be called with the parameter
2899 KMMFVariableVideoBitRate which specifies a variable bit rate.
2901 @return One of the system-wide error codes.
2905 virtual void MvrcSetVideoBitRateL(TInt& aBitRate)=0;
2908 Sets the audio bit rate.
2911 The bit rate of the audio stream.
2913 @return One of the system-wide error codes.
2917 virtual void MvrcSetAudioBitRateL(TInt& aBitRate)=0;
2920 Adds meta data to the clip.
2923 The details of the new entry to be added.
2927 virtual void MvrcAddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry)=0;
2930 Removes a meta data entry from the clip.
2933 The ID of the meta data entry to delete.
2937 virtual void MvrcRemoveMetaDataEntryL(TInt aIndex)=0;
2940 Replaces a meta data in the clip.
2943 The ID of the meta data entry to replace.
2945 The details of the new entry to be added.
2949 virtual void MvrcReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry)=0;
2952 Sets the maximum file size.
2955 The maximum file size allowed for recording. This can be called with the parameter
2956 KMMFNoMaxClipSize which signifies no maximum file size.
2960 virtual void MvrcSetMaxFileSizeL(TInt aMaxFileSize)=0;
2963 Sets whether audio is enabled.
2966 A boolean indicating if audio is enabled.
2970 virtual void MvrcSetAudioEnabledL(TBool aEnable)=0;
2973 Sets the frame size for the video recording.
2976 The frame size for recording.
2980 virtual void MvrcSetVideoFrameSizeL(TSize aFrameSize)=0;
2983 Prepares the controller for recording. This needs to be called before
2984 the first call to Record().
2988 virtual void MvrcPrepareL()=0;
2991 Sets the handle of the camera to use for recording.
2995 virtual void MvrcSetCameraHandleL(TInt aCameraHandle)=0;
2998 Gets the (possibly estimated) record time left in the clip.
3001 The record time available, in microseconds.
3005 virtual void MvrcGetRecordTimeAvailableL(TTimeIntervalMicroSeconds& aTime) = 0;
3008 Gets the supported sink audio types.
3011 The supported data types.
3013 @return One of the system-wide error codes.
3017 virtual void MvrcGetSupportedSinkAudioTypesL(RArray<TFourCC>& aDataTypes)=0;
3020 Gets the supported sink video types.
3023 The supported data types.
3025 @return One of the system-wide error codes.
3029 virtual void MvrcGetSupportedSinkVideoTypesL(CDesC8Array& aDataTypes)=0;
3033 Indicates if the audio is enabled.
3036 A boolean indicating if the audio is enabled.
3040 virtual void MvrcGetAudioEnabledL(TBool& aEnabled)=0;
3048 Client class to access functionality specific to a video playback controller.
3050 The class uses the custom command function of the controller plugin, and removes the necessity
3051 for the client to formulate the custom commands.
3055 class MMMFVideoPlayControllerCustomCommandImplementor
3060 Prepares the video clip to be accessed.
3062 A call to this method tells the controller plugin to finalise its configuration
3063 and to prepare to start reading the video clip. It is not possible to play the video clip
3064 or query any of its properties (e.g. duration, meta data etc.) until the controller plugin
3065 has signified the completion of this method by generating a
3066 KMMFEventCategoryVideoPrepareComplete event.
3070 virtual void MvpcPrepare()=0;
3073 Gets a frame previously requested from the controller.
3076 The handle of bitmap to retrieve frame to.
3080 virtual void MvpcGetFrameL(MMMFVideoFrameMessage& aVideoFrame)=0;
3083 Indicates whether audio is enabled.
3086 On return, contains a boolean indicating whether audio is enabled.
3090 virtual void MvpcGetAudioEnabledL(TBool& aEnabled)=0;
3093 Sets the screen region to be used to display the video.
3096 The clip rect used to display the video.
3100 virtual void MvpcSetDisplayWindowL(const TRect& aWindowRect, const TRect& aClipRect) = 0;
3103 Updates the region to display.
3106 A TRegion containing the current display regions, ownership of the TRegion is not
3111 virtual void MvpcUpdateDisplayRegionL(const TRegion& aRegion) = 0;
3114 Pauses/Resumes video playback. This is to be used with direct screen access
3115 to indicate that the display has changed and should not be written to. This
3116 does not affect audio playback.
3119 Whether the video display should be active.
3123 virtual void MvpcDirectScreenAccessEventL(const TMMFDSAEvent aDSAEvent) = 0;
3126 Sets a time window for video playback.
3129 Start time in milliseconds relative to the start of the video clip.
3131 End time in milliseconds relative to the start of the video clip.
3135 virtual void MvpcPlayL(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) = 0;
3138 Requests the controller to redraw the current frame.
3142 virtual void MvpcRefreshFrameL() = 0;
3145 Gets the progress of loading a video clip.
3147 @param aPercentageComplete
3148 The progress loading the clip, as a percentage.
3152 virtual void MvpcGetLoadingProgressL(TInt& aPercentageComplete) = 0;
3155 Rotates the video image on the screen.
3158 The desired rotation to apply.
3162 virtual void MvpcSetRotationL(TVideoRotation aRotation) = 0;
3165 Queries the rotation that is currently applied to the video image.
3168 The applied rotation.
3172 virtual void MvpcGetRotationL(TVideoRotation& aRotation) = 0;
3175 Scales the video image to a specified percentage of its original size.
3177 @param aWidthPercentage
3178 The percentage (100 = original size) to be used to scale the width of the video image.
3179 @param aHeightPercentage
3180 The percentage (100 = original size) to be used to scale the height of the video image.
3181 If this is not equal to aWidthPercentage then the image may be distorted.
3182 @param aAntiAliasFiltering
3183 A boolean indicating if anit-aliasing filtering should be used. ETrue if anti-aliasing
3184 should be used. If the plugin does not support this kind of processing, this value will
3189 virtual void MvpcSetScaleFactorL(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering) = 0;
3192 Gets the scale factor currently applied to the video image.
3194 @param aWidthPercentage
3195 The percentage (100 = original size) used to scale the width of the video image will be
3197 @param aHeightPercentage
3198 The percentage (100 = original size) used to scale the height of the video image will be
3200 @param aAntiAliasFiltering
3201 A boolean indicating if anti-aliasing filtering should be used. ETrue if anti-aliasing
3202 filtering is being used, EFalse if not.
3206 virtual void MvpcGetScaleFactorL(TReal32& aWidthPercentage, TReal32& aHeightPercentage, TBool& aAntiAliasFiltering) = 0;
3209 Selects a region of the video image to be displayed.
3212 The dimensions of the crop region, relative to the video image.
3216 virtual void MvpcSetCropRegionL(const TRect& aCropRegion) = 0;
3219 Gets the crop region currently applied to the image
3222 The dimensions of the crop region, relative to the video image. If no crop region has
3223 been applied, the full dimensions of the video image will be returned.
3227 virtual void MvpcGetCropRegionL(TRect& aCropRegion) = 0;
3234 Mixin class to be derived from controller plugins that could support the video record controller
3237 class MMMFVideoControllerCustomCommandImplementor
3242 Gets the frame size of the clip.
3244 @param aVideoFrameSize
3245 The frame size, in pixels.
3249 virtual void MvcGetVideoFrameSizeL(TSize& aVideoFrameSize)=0;
3252 Gets the audio type.
3255 The FourCC of the audio codec.
3259 virtual void MvcGetAudioCodecL(TFourCC& aCodec)=0;
3262 Gets the video bit rate.
3265 The bit rate of the video stream. If this value is KMMFVariableVideoBitRate it signifies
3266 a variable bit rate.
3270 virtual void MvcGetVideoBitRateL(TInt& aBitRate)=0;
3273 Gets the audio bit rate.
3276 The bit rate of the audio stream.
3280 virtual void MvcGetAudioBitRateL(TInt& aBitRate)=0;
3283 Sets the frame rate of the clip.
3285 @param aFramesPerSecond
3286 The number of frames per second.
3290 virtual void MvcSetFrameRateL(TReal32 aFramesPerSecond)=0;
3293 Gets the frame rate of the clip.
3295 @param aFramesPerSecond
3296 The number of frames per second, filled in by the controller plugin.
3300 virtual void MvcGetFrameRateL(TReal32& aFramesPerSecond)=0;
3303 Gets the supported sink video types.
3306 The supported data types.
3310 virtual void MvcGetVideoMimeTypeL(TDes8& aMimeType)=0;
3318 Custom command parser class to be used by controller plugins wishing to support
3319 video controller commands.
3321 The controller plugin must be derived from MMMFVideoControllerCustomCommandImplementor
3324 The controller plugin should create an object of this type and add it to the list of custom
3325 command parsers in the controller framework. See the following example code for details.
3328 void CMMFAudioController::ConstructL()
3330 // Construct custom command parsers
3331 CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
3332 CleanupStack::PushL(audPlayDevParser);
3333 AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
3334 CleanupStack::Pop();//audPlayDevParser
3336 CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
3337 CleanupStack::PushL(audRecDevParser);
3338 AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
3339 CleanupStack::Pop();//audRecDevParser
3348 class CMMFVideoControllerCustomCommandParser : public CMMFCustomCommandParserBase
3353 Creates a new custom command parser capable of handling video controller commands.
3356 A reference to the controller plugin that owns this new object.
3358 @return A pointer to the object created.
3362 IMPORT_C static CMMFVideoControllerCustomCommandParser* NewL(MMMFVideoControllerCustomCommandImplementor& aImplementor);
3369 IMPORT_C ~CMMFVideoControllerCustomCommandParser();
3372 Handles a request from the client. Called by the controller framework.
3375 The message to be handled.
3379 void HandleRequest(TMMFMessage& aMessage);
3386 A reference to the controller plugin that owns this new object.
3390 CMMFVideoControllerCustomCommandParser(MMMFVideoControllerCustomCommandImplementor& aImplementor);
3391 // Internal request handling methods.
3392 void DoHandleRequestL(TMMFMessage& aMessage);
3393 TBool DoGetAudioCodecL(TMMFMessage& aMessage);
3395 TBool DoGetAudioBitRateL(TMMFMessage& aMessage);
3396 TBool DoGetVideoBitRateL(TMMFMessage& aMessage);
3397 TBool DoGetVideoFrameSizeL(TMMFMessage& aMessage);
3398 TBool DoSetFrameRateL(TMMFMessage& aMessage);
3399 TBool DoGetFrameRateL(TMMFMessage& aMessage);
3400 TBool DoGetVideoMimeTypeL(TMMFMessage& aMessage);
3403 The object that implements the video record controller interface
3405 MMMFVideoControllerCustomCommandImplementor& iImplementor;
3412 Custom command parser class to be used by controller plugins wishing to support video play
3413 controller commands.
3415 The controller plugin must be derived from MMMFVideoPlayControllerCustomCommandImplementor to use
3416 this class. The controller plugin should create an object of this type and add it to the list of
3417 custom command parsers in the controller framework.
3419 class CMMFVideoPlayControllerCustomCommandParser : public CMMFCustomCommandParserBase
3424 Creates a new custom command parser capable of handling video controller commands.
3427 A reference to the controller plugin that owns this new object.
3429 @return A pointer to the object created.
3433 IMPORT_C static CMMFVideoPlayControllerCustomCommandParser* NewL(MMMFVideoPlayControllerCustomCommandImplementor& aImplementor);
3440 IMPORT_C ~CMMFVideoPlayControllerCustomCommandParser();
3443 Handles a request from the client. Called by the controller framework.
3446 The message to be handled.
3450 void HandleRequest(TMMFMessage& aMessage);
3456 A reference to the controller plugin that owns this new object.
3460 CMMFVideoPlayControllerCustomCommandParser(MMMFVideoPlayControllerCustomCommandImplementor& aImplementor);
3461 // Internal request handling methods.
3462 void DoHandleRequestL(TMMFMessage& aMessage);
3463 TBool DoRequestFrameL(TMMFMessage& aMessage);
3464 TBool DoGetFrameL(TMMFMessage& aMessage);
3465 TBool DoSetDisplayWindowL(TMMFMessage& aMessage);
3466 TBool DoUpdateDisplayRegionL(TMMFMessage& aMessage);
3467 TBool DoGetAudioEnabledL(TMMFMessage& aMessage);
3468 TBool DoDirectScreenAccessEventL(TMMFMessage& aMessage);
3469 TBool DoPlayL(TMMFMessage& aMessage);
3470 TBool DoRefreshFrameL(TMMFMessage& aMessage);
3471 TBool DoGetLoadingProgressL(TMMFMessage& aMessage);
3472 TBool DoPrepareL(TMMFMessage& aMessage);
3473 TBool DoSetRotationL(TMMFMessage& aMessage);
3474 TBool DoGetRotationL(TMMFMessage& aMessage);
3475 TBool DoSetScaleFactorL(TMMFMessage& aMessage);
3476 TBool DoGetScaleFactorL(TMMFMessage& aMessage);
3477 TBool DoSetCropRegionL(TMMFMessage& aMessage);
3478 TBool DoGetCropRegionL(TMMFMessage& aMessage);
3483 The object that implements the video record controller interface
3485 MMMFVideoPlayControllerCustomCommandImplementor& iImplementor;
3486 CMMFVideoFrameMessage* iVideoFrameMessage;
3493 Custom command parser class to be used by controller plugins wishing to support video record
3494 controller commands.
3496 The controller plugin must be derived from MMMFVideoRecordControllerCustomCommandImplementor to use
3497 this class. The controller plugin should create an object of this type and add it to the list of
3498 custom command parsers in the controller framework.
3500 class CMMFVideoRecordControllerCustomCommandParser : public CMMFCustomCommandParserBase
3505 Creates a new custom command parser capable of handling video controller commands.
3508 A reference to the controller plugin that owns this new object.
3510 @return A pointer to the object created.
3514 IMPORT_C static CMMFVideoRecordControllerCustomCommandParser* NewL(MMMFVideoRecordControllerCustomCommandImplementor& aImplementor);
3521 IMPORT_C ~CMMFVideoRecordControllerCustomCommandParser();
3524 Handles a request from the client. Called by the controller framework.
3527 The message to be handled.
3531 void HandleRequest(TMMFMessage& aMessage);
3537 A reference to the controller plugin that owns this new object.
3541 CMMFVideoRecordControllerCustomCommandParser(MMMFVideoRecordControllerCustomCommandImplementor& aImplementor);
3542 // Internal request handling methods.
3543 void DoHandleRequestL(TMMFMessage& aMessage);
3544 TBool DoSetVideoFormatL(TMMFMessage& aMessage);
3545 TBool DoSetAudioBitRateL(TMMFMessage& aMessage);
3546 TBool DoSetVideoBitRateL(TMMFMessage& aMessage);
3547 TBool DoSetVideoCodecL(TMMFMessage& aMessage);
3548 TBool DoSetAudioCodecL(TMMFMessage& aMessage);
3549 TBool DoAddMetaDataEntryL(TMMFMessage& aMessage);
3550 TBool DoRemoveMetaDataEntryL(TMMFMessage& aMessage);
3551 TBool DoReplaceMetaDataEntryL(TMMFMessage& aMessage);
3552 TBool DoSetMaxFileSizeL(TMMFMessage& aMessage);
3553 TBool DoSetAudioEnabledL(TMMFMessage& aMessage);
3554 TBool DoSetVideoFrameSizeL(TMMFMessage& aMessage);
3555 TBool DoPrepareL(TMMFMessage& aMessage);
3556 TBool DoSetCameraHandleL(TMMFMessage& aMessage);
3557 TBool DoGetRecordTimeAvailableL(TMMFMessage& aMessage);
3559 TBool DoGetSupportedSinkAudioTypesL(TMMFMessage& aMessage);
3560 TBool DoGetSupportedSinkVideoTypesL(TMMFMessage& aMessage);
3562 TInt32 DoCreateBufFromCDesC8ArrayL(CDesC8Array& aArray);
3563 TBool DoCopyCDesC8ArrayDataL(TMMFMessage& aMessage);
3565 TBool DoCopyFourCCArrayDataL(TMMFMessage& aMessage);
3566 void DoCreateBufFromFourCCArrayL(RArray<TFourCC>& aArray);
3567 TBool DoGetAudioEnabledL(TMMFMessage& aMessage); // (INC23777)
3571 The object that implements the video record controller interface
3573 MMMFVideoRecordControllerCustomCommandImplementor& iImplementor;
3574 CBufFlat* iDataCopyBuffer;
3583 Client class to allow the client to specify DRM Intent.
3585 The class uses the custom command function of the controller plugin, and removes the necessity
3586 for the client to formulate the custom commands.
3590 class RMMFVideoDRMExtCustomCommands : public RMMFCustomCommandsBase
3598 The client side controller object to be used by this custom command interface.
3602 IMPORT_C RMMFVideoDRMExtCustomCommands(RMMFController& aController);
3605 Gets a frame previously requested from the controller.
3608 The handle of bitmap to retrieve frame to.
3610 The DRM Intent to pass in.
3612 The active object to call back on.
3614 IMPORT_C void GetFrame(CFbsBitmap& aBitmap, ContentAccess::TIntent aIntent, TRequestStatus& aStatus);
3617 TPckgBuf<TMMFVideoConfig> iConfigPackage;
3618 TPckgBuf<ContentAccess::TIntent> iIntentPackage;
3627 Mixin class to be derived from controller plugins that could support the DRM Intent
3630 class MMMFVideoDRMExtCustomCommandImplementor
3635 Gets a frame previously requested from the controller.
3638 The callback interface to allow the caller to retrieve a bitmap.
3640 The DRM Intent to supply.
3642 virtual void MvdeGetFrameL(MMMFVideoFrameMessage& aVideoFrame, ContentAccess::TIntent aIntent)=0;
3650 Client class to provide DRM extensions to video controllers.
3652 The class uses the custom command function of the controller plugin, and removes the necessity
3653 for the client to formulate the custom commands.
3655 class CMMFVideoDRMExtCustomCommandParser : public CMMFCustomCommandParserBase
3660 Creates a new custom command parser capable of DRM Intent controller commands.
3663 A reference to the controller plugin that owns this new object.
3665 @return A pointer to the object created.
3669 IMPORT_C static CMMFVideoDRMExtCustomCommandParser* NewL(MMMFVideoDRMExtCustomCommandImplementor& aImplementor);
3676 IMPORT_C ~CMMFVideoDRMExtCustomCommandParser();
3679 Handles a request from the client. Called by the controller framework.
3682 The message to be handled.
3686 void HandleRequest(TMMFMessage& aMessage);
3693 A reference to the controller plugin that owns this new object.
3696 CMMFVideoDRMExtCustomCommandParser(MMMFVideoDRMExtCustomCommandImplementor& aImplementor);
3697 // Internal request handling methods.
3699 void DoGetFrameL(TMMFMessage& aMessage);
3702 MMMFVideoDRMExtCustomCommandImplementor& iImplementor;
3703 CMMFVideoFrameMessage* iVideoFrameMessage;
3710 Client class to allow the client to register notification .
3712 The class uses the custom command function of the controller plugin, and removes the necessity
3713 for the client to formulate the custom commands.
3717 class RMMFResourceNotificationCustomCommands : public RMMFCustomCommandsBase
3724 The client side controller object to be used by this custom command interface.
3728 IMPORT_C RMMFResourceNotificationCustomCommands(RMMFController& aController);
3731 Registers the Event for Notification when resource is avaliable.
3734 The Event to notify the client.
3736 @param aNotificationRegistrationData
3737 Notification registration specific data.
3739 @return An error code indicating if the registration was successful. KErrNone on success,
3740 otherwise another of the system-wide error codes.
3742 IMPORT_C TInt RegisterAsClient(TUid aEventType,const TDesC8& aNotificationRegistrationData);
3745 Cancels the registered notification event.
3748 The Event to notify the client.
3750 @return An error code indicating if the cancel registration was successful. KErrNone on success,
3751 otherwise another of the system-wide error codes.
3753 IMPORT_C TInt CancelRegisterAsClient(TUid aEventType);
3756 Gets the notification data for the event.
3759 The Event to notify the client.
3761 @param aNotificationData
3762 The Notification data for the client to resume the play.
3764 @return An error code indicating if the get notification data was successful. KErrNone on success,
3765 otherwise another of the system-wide error codes.
3767 IMPORT_C TInt GetResourceNotificationData(TUid aEventType,TDes8& aNotificationData);
3770 Waits for the client to resume the play even after the default timer expires.
3772 @return An error code indicating if the registration was successful. KErrNone on success,
3773 otherwise any of the system-wide error codes.
3775 IMPORT_C TInt WillResumePlay();
3782 Mixin class to be derived from controller plugins that could support the audio resource notification
3785 class MMMFResourceNotificationCustomCommandImplementor
3789 Registers the Event for Notification when resource is available.
3792 The event which the client is notified of.
3794 @param aNotificationRegistrationData
3795 Notification registration specific data, which has been reserved for future use.
3797 @leave This method may leave with one of the system-wide error codes. KErrNotReady if there is no
3800 virtual void MarnRegisterAsClientL(TUid aEventType,const TDesC8& aNotificationRegistrationData) = 0;
3803 Cancels the registered notification event.
3806 The event to cancel.
3808 @leave This method may leave with one of the system-wide error codes. KErrNotReady if there is no
3811 virtual void MarnCancelRegisterAsClientL(TUid aEventType) = 0;
3814 Gets the notification data for the event.
3817 The event which the client is notified of.
3819 @param aNotificationData
3820 The Notification data for the client to resume playing.
3822 @leave This method may leave with one of the system-wide error codes. KErrNotReady if there is no
3823 data sink, KErrArgument if unable to provide the notification data.
3825 virtual void MarnGetResourceNotificationDataL(TUid aEventType,TDes8& aNotificationData) = 0;
3828 Waits for the client to resume the play even after the default timer expires.
3830 @leave This method may leave with one of the system-wide error codes. KErrNotReady if there is no
3833 virtual void MarnWillResumePlayL() = 0;
3840 Client class to provide Audio resource notification controllers.
3842 The class uses the custom command function of the controller plugin, and removes the necessity
3843 for the client to formulate the custom commands.
3845 class CMMFResourceNotificationCustomCommandParser: public CMMFCustomCommandParserBase
3849 Creates a new custom command parser capable of handling resource notification controller commands.
3852 A reference to the controller plugin that owns this new object.
3854 @return A pointer to the object created.
3858 IMPORT_C static CMMFResourceNotificationCustomCommandParser* NewL(MMMFResourceNotificationCustomCommandImplementor& aImplementor);
3865 IMPORT_C ~CMMFResourceNotificationCustomCommandParser();
3868 Handles a request from the client. Called by the controller framework.
3871 The message to be handled.
3875 void HandleRequest(TMMFMessage& aMessage);
3882 A reference to the controller plugin that owns this new object.
3886 CMMFResourceNotificationCustomCommandParser(MMMFResourceNotificationCustomCommandImplementor& aImplementor);
3887 void DoHandleRequestL(TMMFMessage& aMessage);
3888 // Internal request handling methods.
3889 TBool DoRegisterAsClientL(TMMFMessage& aMessage);
3890 TBool DoCancelRegisterAsClientL(TMMFMessage& aMessage);
3891 TBool DoGetResourceNotificationDataL(TMMFMessage& aMessage);
3892 TBool DoWillResumePlayL(TMMFMessage& aMessage);
3894 MMMFResourceNotificationCustomCommandImplementor& iImplementor;
3901 Client class to allow setting the initial screen for video display.
3904 class RMMFVideoSetInitScreenCustomCommands : public RMMFCustomCommandsBase
3912 The client side controller object to be used by this custom command interface.
3915 IMPORT_C RMMFVideoSetInitScreenCustomCommands(RMMFController& aController);
3918 Sets the initial screen number for the video display on the controller.
3920 @param aScreenNumber
3924 IMPORT_C TInt SetInitScreenNumber(TInt aScreenNumber);
3933 Mixin class to be derived from controller plugins that could support setting the initial screen for displaying video.
3935 class MMMFVideoSetInitScreenCustomCommandImplementor
3940 Sets the initial screen number.
3942 @param aScreenNumber
3945 virtual void MvsdSetInitScreenNumber(TInt aScreenNumber)=0;
3953 Custom command parser class to be used by controller plugins wishing to support setting the initial screen
3954 number for the video display.
3956 The controller plugin should create an object of this type and add it to the list of custom command parsers
3957 in the controller framework. The controller plugin must be derived from MMMFVideoSetInitScreenCustomCommandImplementor
3960 class CMMFVideoSetInitScreenCustomCommandParser : public CMMFCustomCommandParserBase
3965 Creates a new custom command parser that supports setting screen device for video dusplay.
3968 A reference to the controller plugin that owns this new object.
3970 @return A pointer to the object created.
3973 IMPORT_C static CMMFVideoSetInitScreenCustomCommandParser* NewL(MMMFVideoSetInitScreenCustomCommandImplementor& aImplementor);
3979 IMPORT_C ~CMMFVideoSetInitScreenCustomCommandParser();
3982 Handles a request from the client. Called by the controller framework.
3985 The message to be handled.
3988 void HandleRequest(TMMFMessage& aMessage);
3995 A reference to the controller plugin that owns this new object.
3997 CMMFVideoSetInitScreenCustomCommandParser(MMMFVideoSetInitScreenCustomCommandImplementor& aImplementor);
3998 void DoHandleRequestL(TMMFMessage& aMessage);
3999 TBool DoSetInitScreenNumberL(TMMFMessage& aMessage);
4002 MMMFVideoSetInitScreenCustomCommandImplementor& iImplementor;
4010 Client class to allow setting and getting the pixel aspect ratio for video recording.
4013 class RMMFVideoPixelAspectRatioCustomCommands : public RMMFCustomCommandsBase
4021 The client side controller object to be used by this custom command interface.
4024 IMPORT_C RMMFVideoPixelAspectRatioCustomCommands(RMMFController& aController);
4027 Sets the pixel aspect ratio for the video recording on the controller.
4030 The new pixel aspect ratio. The default pixel aspect ratio is 1:1.
4032 @return One of the system-wide error codes.
4035 IMPORT_C TInt SetPixelAspectRatio(const TVideoAspectRatio& aAspectRatio);
4038 Gets the current pixel aspect ratio for the video recording on the controller.
4041 The current video pixel aspect ratio.
4043 @return One of the system-wide error codes.
4045 IMPORT_C TInt GetPixelAspectRatio(TVideoAspectRatio& aAspectRatio) const;
4048 Gets the list of supported pixel aspect ratios for the video recording on the controller.
4050 @param aAspectRatios
4051 The supported pixel aspect ratios.
4053 @leave This method may leave with one of the system-wide error codes.
4055 IMPORT_C void GetSupportedPixelAspectRatiosL(RArray<TVideoAspectRatio>& aAspectRatios) const;
4058 void DoGetVideoPixelAspectRatioArrayL(RArray<TVideoAspectRatio>& aArray, TMMFVideoPixelAspectRatioMessages aIpc) const;
4066 Mixin class to be derived from controller plug-ins that could support setting and getting the pixel aspect ratio for video recording.
4068 class MMMFVideoPixelAspectRatioCustomCommandImplementor
4073 Sets the pixel aspect ratio.
4076 The pixel aspect ratio to use.
4078 virtual void MvparSetPixelAspectRatioL(const TVideoAspectRatio& aAspectRatio) = 0;
4081 Gets the current pixel aspect ratio.
4084 The current pixel aspect ratio.
4086 virtual void MvparGetPixelAspectRatioL(TVideoAspectRatio& aAspectRatio) = 0;
4089 Gets the list of supported pixel aspect ratios.
4091 @param aAspectRatios
4092 The list of supported pixel aspect ratios.
4094 virtual void MvparGetSupportedPixelAspectRatiosL(RArray<TVideoAspectRatio>& aAspectRatios) = 0;
4102 Custom command parser class to be used by controller plug-ins wishing to support setting and getting the pixel aspect
4103 ratio for the video recording.
4105 The controller plug-in should create an object of this type and add it to the list of custom command parsers
4106 in the controller framework. The controller plug-in must be derived from MMMFVideoPixelAspectRatioCustomCommandImplementor
4109 class CMMFVideoPixelAspectRatioCustomCommandParser : public CMMFCustomCommandParserBase
4114 Creates a new custom command parser that supports setting and getting pixel aspect ratio for video recording.
4117 A reference to the controller plug-in that owns this new object.
4119 @return A pointer to the object created.
4122 IMPORT_C static CMMFVideoPixelAspectRatioCustomCommandParser* NewL(MMMFVideoPixelAspectRatioCustomCommandImplementor& aImplementor);
4128 IMPORT_C ~CMMFVideoPixelAspectRatioCustomCommandParser();
4131 Handles a request from the client. Called by the controller framework.
4134 The message to be handled.
4137 void HandleRequest(TMMFMessage& aMessage);
4140 CMMFVideoPixelAspectRatioCustomCommandParser(MMMFVideoPixelAspectRatioCustomCommandImplementor& aImplementor);
4141 void DoHandleRequestL(TMMFMessage& aMessage);
4142 TBool DoSetPixelAspectRatioL(TMMFMessage& aMessage);
4143 TBool DoGetPixelAspectRatioL(TMMFMessage& aMessage);
4144 TBool DoGetSupportedPixelAspectRatiosL(TMMFMessage& aMessage);
4145 TBool DoCopyArrayDataL(TMMFMessage& aMessage);
4146 void DoCreateBufFromVideoAspectRatioArrayL(RArray<TVideoAspectRatio>& aArray);
4149 MMMFVideoPixelAspectRatioCustomCommandImplementor& iImplementor;
4151 CBufFlat* iDataCopyBuffer;
4159 Client class to allow the audio sampling rate and channels configuration for video recording.
4162 class RMMFVideoAudioSamplingRateAndChannelConfigCustomCommands : public RMMFCustomCommandsBase
4170 The client side controller object to be used by this custom command interface.
4173 IMPORT_C RMMFVideoAudioSamplingRateAndChannelConfigCustomCommands(RMMFController& aController);
4176 Sets the number of audio channels to record (1 for mono, 2 for stereo).
4179 The number of audio channels to record.
4181 @return One of the system-wide error codes.
4184 IMPORT_C TInt SetAudioChannels(const TUint aChannels);
4187 Gets the current number of audio channels to record (1 for mono, 2 for stereo).
4190 The current number of audio channels to record.
4192 @return One of the system-wide error codes.
4195 IMPORT_C TInt GetAudioChannels(TUint& aChannels) const;
4198 Gets the list of supported number of audio channels for video recording.
4201 The supported numbers of audio channels.
4203 @leave This method may leave with one of the system-wide error codes.
4205 IMPORT_C void GetSupportedAudioChannelsL(RArray<TUint>& aChannels) const;
4208 Sets the audio sample rate for video recording.
4211 The sample rate for audio recording.
4213 @return One of the system-wide error codes.
4216 IMPORT_C TInt SetAudioSampleRate(const TUint aSampleRate);
4219 Gets the current audio sample rate for recording.
4222 The current audio sample rate for recording.
4224 @return One of the system-wide error codes.
4227 IMPORT_C TInt GetAudioSampleRate(TUint& aSampleRate) const;
4230 Gets the list of supported audio sample rates for video recording.
4233 The supported audio sample rates.
4235 @leave This method may leave with one of the system-wide error codes.
4237 IMPORT_C void GetSupportedAudioSampleRatesL(RArray<TUint>& aSampleRates) const;
4240 void DoGetUintArrayL(RArray<TUint>& aArray, TMMFVideoAudioSamplingRateAndChannelConfigMessages aIpc) const;
4248 Mixin class to be derived from controller plug-ins that could support the audio sampling rate and channels configuration.
4250 class MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor
4255 Sets the number of audio channels.
4258 The number of audio channels to use.
4260 virtual void MvasrccSetAudioChannelsL(const TUint aChannels) = 0;
4263 Gets the current number of audio channels.
4266 The current number of audio channels.
4268 virtual void MvasrccGetAudioChannelsL(TUint& aChannels) = 0;
4271 Gets the list of supported number of audio channels.
4274 The list of supported number of audio channels.
4276 virtual void MvasrccGetSupportedAudioChannelsL(RArray<TUint>& aChannels) = 0;
4279 Sets the audio sample rate.
4282 The audio sample rate to use.
4284 virtual void MvasrccSetAudioSampleRateL(const TUint aSampleRate) = 0;
4287 Gets the current audio sample rate.
4290 The current audio sample rate.
4292 virtual void MvasrccGetAudioSampleRateL(TUint& aSampleRate) = 0;
4295 Gets the list of supported audio sample rates.
4298 The list of supported audio sample rates.
4300 virtual void MvasrccGetSupportedAudioSampleRatesL(RArray<TUint>& aSampleRates) = 0;
4307 Custom command parser class to be used by controller plug-ins wishing to support the audio sampling rate and channels
4308 configuration for the video recording.
4310 The controller plug-in should create an object of this type and add it to the list of custom command parsers
4311 in the controller framework. The controller plug-in must be derived from MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor
4314 class CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser : public CMMFCustomCommandParserBase
4319 Creates a new custom command parser that supports the audio sampling rate and channels configuration for video recording.
4322 A reference to the controller plug-in that owns this new object.
4324 @return A pointer to the object created.
4327 IMPORT_C static CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser* NewL(MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& aImplementor);
4333 IMPORT_C ~CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser();
4336 Handles a request from the client. Called by the controller framework.
4339 The message to be handled.
4342 void HandleRequest(TMMFMessage& aMessage);
4345 CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser(MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& aImplementor);
4346 void DoHandleRequestL(TMMFMessage& aMessage);
4347 TBool DoSetAudioChannelsL(TMMFMessage& aMessage);
4348 TBool DoGetAudioChannelsL(TMMFMessage& aMessage);
4349 TBool DoGetSupportedAudioChannelsL(TMMFMessage& aMessage);
4351 TBool DoSetAudioSampleRateL(TMMFMessage& aMessage);
4352 TBool DoGetAudioSampleRateL(TMMFMessage& aMessage);
4353 TBool DoGetSupportedAudioSampleRatesL(TMMFMessage& aMessage);
4355 TBool DoCopyArrayDataL(TMMFMessage& aMessage);
4357 void DoCreateBufFromUintArrayL(RArray<TUint>& aArray);
4360 MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& iImplementor;
4362 CBufFlat* iDataCopyBuffer;
4369 const TUid KUidInterfaceMMFVideoPlayExt = {0x10283437};
4372 Mixin class to be derived from controller plug-ins that could support
4373 play velocity, enabling/disabling audio/video, and auto scaling.
4378 class MMMFVideoPlayControllerExtCustomCommandImplementor
4384 Behaviour is same as CVideoPlayerUtility::SetPlayVelocityL
4386 @see CVideoPlayerUtility::SetPlayVelocityL
4388 virtual void MvpecSetPlayVelocityL(TInt aVelocity)=0;
4392 Behaviour is same as CVideoPlayerUtility::PlayVelocityL
4394 @see CVideoPlayerUtility::PlayVelocityL
4396 virtual TInt MvpecPlayVelocityL()=0;
4399 Steps through frames in pause mode.
4400 Behaviour is same as CVideoPlayerUtility::StepFrameL
4402 @see CVideoPlayerUtility::StepFrameL
4404 virtual void MvpecStepFrameL(TInt aStep)=0;
4407 Gets play rate capabilities.
4408 Behaviour is same as CVideoPlayerUtility::GetPlayRateCapabilitiesL
4410 @see CVideoPlayerUtility::GetPlayRateCapabilitiesL
4412 virtual void MvpecGetPlayRateCapabilitiesL(TVideoPlayRateCapabilities& aCapabilities)=0;
4415 Enables/Disables video playback.
4416 Behaviour is same as CVideoPlayerUtility::SetVideoEnabledL
4418 @see CVideoPlayerUtility::SetVideoEnabledL
4420 virtual void MvpecSetVideoEnabledL(TBool aVideoEnabled)=0;
4423 Queries whether video playback is currently enabled or not.
4424 Behaviour is same as CVideoPlayerUtility::VideoEnabledL
4426 @see CVideoPlayerUtility::VideoEnabledL
4428 virtual TBool MvpecVideoEnabledL()=0;
4431 Enables or disables audio playback.
4432 Behaviour is same as CVideoPlayerUtility::SetAudioEnabled
4434 @see CVideoPlayerUtility::SetAudioEnabled
4436 virtual void MvpecSetAudioEnabledL(TBool aAudioEnabled)=0;
4439 Sets Auto scale mode.
4440 Behaviour is same as CVideoPlayerUtility::SetAutoScaleL
4442 @see CVideoPlayerUtility::SetAutoScaleL
4444 virtual void MvpecSetAutoScaleL(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos)=0;
4448 Used for commands between RMMFVideoPlayControllerExtCustomCommands and
4449 CMMFVideoPlayControllerExtCustomCommandParser classes.
4453 enum TMMFVideoPlayControllerExtCustomCommandConfigMessages
4455 EMMFVideoPlayControllerSetPlayVelocity = 0,
4456 EMMFVideoPlayControllerPlayVelocity,
4457 EMMFVideoPlayControllerStepFrame,
4458 EMMFVideoPlayControllerGetPlayRateCapabilities,
4459 EMMFVideoPlayControllerSetVideoEnabled,
4460 EMMFVideoPlayControllerVideoEnabled,
4461 EMMFVideoPlayControllerSetAudioEnabled,
4462 EMMFVideoPlayControllerSetAutoScale
4467 class TMMFVideoPlayAutoScaleParams
4470 TAutoScaleType iScaleType;
4476 Custom command parser class to be used by controller plug-ins wishing to support play velocity,
4477 enabling/disabling audio/video, and auto scaling.
4479 The controller plug-in should create an object of this type and add it to the list of custom command parsers
4480 in the controller framework. The controller plug-in must be derived from MMMFVideoPlayControllerExtCustomCommandImplementor
4486 class CMMFVideoPlayControllerExtCustomCommandParser : public CMMFCustomCommandParserBase
4491 Creates a new custom command parser that supports the video rate control and auto scaling.
4494 A reference to the controller plug-in that owns this new object.
4496 @return A pointer to the object created.
4499 IMPORT_C static CMMFVideoPlayControllerExtCustomCommandParser* NewL(MMMFVideoPlayControllerExtCustomCommandImplementor& aImplementor);
4505 IMPORT_C ~CMMFVideoPlayControllerExtCustomCommandParser();
4508 Handles a request from the client. Called by the controller framework.
4511 The message to be handled.
4514 void HandleRequest(TMMFMessage& aMessage);
4517 CMMFVideoPlayControllerExtCustomCommandParser(MMMFVideoPlayControllerExtCustomCommandImplementor& aImplementor);
4518 void DoHandleRequestL(TMMFMessage& aMessage);
4519 TBool DoSetPlayVelocityL(TMMFMessage& aMessage);
4520 TBool DoPlayVelocityL(TMMFMessage& aMessage);
4521 TBool DoStepFrameL(TMMFMessage& aMessage);
4522 TBool DoGetPlayRateCapabilitiesL(TMMFMessage& aMessage);
4523 TBool DoSetVideoEnabledL(TMMFMessage& aMessage);
4524 TBool DoVideoEnabledL(TMMFMessage& aMessage);
4525 TBool DoSetAudioEnabledL(TMMFMessage& aMessage);
4526 TBool DoSetAutoScaleL(TMMFMessage& aMessage);
4528 MMMFVideoPlayControllerExtCustomCommandImplementor& iImplementor;
4532 Resource class to be used by player utility for sending custom commands.
4537 class RMMFVideoPlayControllerExtCustomCommands: public RMMFCustomCommandsBase
4544 The client side controller object to be used by this custom command interface.
4546 IMPORT_C RMMFVideoPlayControllerExtCustomCommands(RMMFController& aController);
4550 Behaviour is same as CVideoPlayerUtility::SetPlayVelocityL
4553 Velocity of the playback.
4555 @return One of the system-wide error codes.
4557 @see CVideoPlayerUtility::SetPlayVelocityL
4559 IMPORT_C TInt SetPlayVelocity(TInt aVelocity);
4563 Behaviour is same as CVideoPlayerUtility::PlayVelocityL
4566 Velocity of the playback.
4568 @return One of the system-wide error codes.
4570 @see CVideoPlayerUtility::PlayVelocityL
4572 IMPORT_C TInt PlayVelocity(TInt &aVelocity)const;
4575 Steps through frames in pause mode.
4576 Behaviour is same as CVideoPlayerUtility::StepFrameL
4579 Count indicating number of frames to step playback position.
4581 @return One of the system-wide error codes.
4583 @see CVideoPlayerUtility::StepFrameL
4585 IMPORT_C TInt StepFrame(TInt aStep);
4588 Gets play rate capabilities.
4589 Behaviour is same as CVideoPlayerUtility::GetPlayRateCapabilitiesL
4591 @param aCapabilities Playback rate capabilities
4593 @return One of the system-wide error codes.
4595 @see CVideoPlayerUtility::GetPlayRateCapabilitiesL
4597 IMPORT_C TInt GetPlayRateCapabilities(TVideoPlayRateCapabilities& aCapabilities)const;
4600 Enables/Disables video playback.
4601 Behaviour is same as CVideoPlayerUtility::SetVideoEnabledL
4603 @param aVideoEnabled ETrue to enable video playback, EFalse to disable
4605 @return One of the system-wide error codes.
4607 @see CVideoPlayerUtility::SetVideoEnabledL
4609 IMPORT_C TInt SetVideoEnabled(TBool aVideoEnabled);
4612 Queries whether video playback is currently enabled or not.
4613 Behaviour is same as CVideoPlayerUtility::VideoEnabledL
4615 @param aVideoEnabled
4616 Out parameter returns ETrue if video playback is enabled, EFalse if not.
4618 @return One of the system-wide error codes.
4620 @see CVideoPlayerUtility::VideoEnabledL
4622 IMPORT_C TInt VideoEnabled(TBool &aVideoEnabled)const;
4625 Enables or disables audio playback.
4626 Behaviour is same as CVideoPlayerUtility::SetAudioEnabledL
4628 @param aVideoEnabled ETrue to enable audio playback, EFalse to disable
4630 @return One of the system-wide error codes.
4632 @see CVideoPlayerUtility::SetAudioEnabledL
4634 IMPORT_C TInt SetAudioEnabled(TBool aAudioEnabled);
4637 Sets Auto scale mode.
4638 Behaviour is same as CVideoPlayerUtility::SetAutoScaleL
4640 @param aScaleType Automatic scaling type
4641 @param aHorizPos Video picture horizontal position, relative to the
4643 @param aVertPos Video picture vertical position, relative to the
4645 @return One of the system-wide error codes.
4647 @see CVideoPlayerUtility::SetAutoScaleL
4649 IMPORT_C TInt SetAutoScale(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos);
4656 const TUid KUidInterfaceMMFVideoRecorderExt = {0x10283438};
4659 Mixin class to be derived from controller plug-ins that could support quality and enabling video.
4664 class MMMFVideoRecordControllerExtCustomCommandImplementor
4669 Enabled or disables video in recorder.
4670 Behaviour is same as CVideoRecorderUtility::SetVideoEnabledL
4672 @see CVideoRecorderUtility::SetVideoEnabledL
4674 virtual void MvrecSetVideoEnabledL(TBool aEnabled)=0;
4676 Gets the flag that indicates video enabled or not.
4677 Behaviour is same as CVideoRecorderUtility::VideoEnabledL
4679 @see CVideoRecorderUtility::VideoEnabledL
4681 virtual TBool MvrecVideoEnabledL() const=0;
4683 Sets the quality of video being recorded.
4684 Behaviour is same as CVideoRecorderUtility::SetVideoQualityL
4686 @see CVideoRecorderUtility::SetVideoQualityL
4688 virtual void MvrecSetVideoQualityL(TInt aQuality)=0;
4690 Gets video quality level set using SetVideoQualityL.
4691 Behaviour is same as CVideoRecorderUtility::VideoQualityL
4693 @see CVideoRecorderUtility::VideoQualityL
4695 virtual TInt MvrecVideoQualityL() const=0;
4697 Sets the video framerate to fixed.
4698 Behaviour is same as CVideoRecorderUtility::SetVideoFrameRateFixedL
4700 @see CVideoRecorderUtility::SetVideoFrameRateFixedL
4702 virtual void MvrecSetVideoFrameRateFixedL(TBool aFixedFrameRate)=0;
4704 Gets FrameRateFixed flag set using SetVideoFrameRateFixedL.
4705 Behaviour is same as CVideoRecorderUtility::VideoFrameRateFixedL
4707 @see CVideoRecorderUtility::VideoFrameRateFixedL
4709 virtual TBool MvrecVideoFrameRateFixedL() const=0;
4715 enum TMMFVideoRecorderExtCustomCommandConfigMessages
4717 EMMFVideoRecordControllerSetVideoEnabled = 0,
4718 EMMFVideoRecordControllerVideoEnabled,
4719 EMMFVideoRecordControllerSetVideoQuality,
4720 EMMFVideoRecordControllerVideoQuality,
4721 EMMFVideoRecordControllerSetVideoFrameRateFixed,
4722 EMMFVideoRecordControllerVideoFrameRateFixed
4726 Custom command parser class to be used by controller plug-ins wishing to implement VideoRecorderExt custom commands.
4728 The controller plug-in should create an object of this type and add it to the list of custom command parsers
4729 in the controller framework. The controller plug-in must be derived from MMMFVideoRecordControllerExtCustomCommandImplementor
4735 class CMMFVideoRecordControllerExtCustomCommandParser : public CMMFCustomCommandParserBase
4740 Creates a new custom command parser that supports the video rate control and auto scaling.
4742 @param aImplementor A reference to the controller plug-in that owns this new object.
4743 @return A pointer to the object created.
4745 IMPORT_C static CMMFVideoRecordControllerExtCustomCommandParser* NewL(MMMFVideoRecordControllerExtCustomCommandImplementor& aImplementor);
4750 IMPORT_C ~CMMFVideoRecordControllerExtCustomCommandParser();
4753 Handles a request from the client. Called by the controller framework.
4755 @param aMessage The message to be handled.
4757 void HandleRequest(TMMFMessage& aMessage);
4760 CMMFVideoRecordControllerExtCustomCommandParser(MMMFVideoRecordControllerExtCustomCommandImplementor& aImplementor);
4761 void DoHandleRequestL(TMMFMessage& aMessage);
4762 TBool DoSetVideoEnabledL(TMMFMessage& aMessage);
4763 TBool DoVideoEnabledL(TMMFMessage& aMessage);
4764 TBool DoSetVideoQualityL(TMMFMessage& aMessage);
4765 TBool DoVideoQualityL(TMMFMessage& aMessage);
4766 TBool DoSetVideoFrameRateFixedL(TMMFMessage& aMessage);
4767 TBool DoVideoFrameRateFixedL(TMMFMessage& aMessage);
4769 MMMFVideoRecordControllerExtCustomCommandImplementor& iImplementor;
4773 Resource class to be used by Recorder utility for sending custom commands.
4778 class RMMFVideoRecordControllerExtCustomCommands: public RMMFCustomCommandsBase
4785 The client side controller object to be used by this custom command interface.
4786 @return One of the system-wide error codes.
4788 IMPORT_C RMMFVideoRecordControllerExtCustomCommands(RMMFController& aController);
4791 Enabled or disables video in recorder.
4792 Behaviour is same as CVideoRecorderUtility::SetVideoEnabledL
4794 @param aEnabled ETrue to enable video recording, EFalse to enable it
4796 @return One of the system-wide error codes.
4797 @see CVideoRecorderUtility::SetVideoEnabledL
4799 IMPORT_C TInt SetVideoEnabled(TBool aEnabled);
4802 Gets the flag that indicates video enabled or not.
4803 Behaviour is same as CVideoRecorderUtility::VideoEnabledL
4806 Out parameter returns ETrue if video recording is enabled , EFalse otherwise.
4808 @return One of the system-wide error codes.
4809 @see CVideoRecorderUtility::VideoEnabledL
4811 IMPORT_C TInt VideoEnabled(TBool &aEnabled) const;
4814 Sets the quality of video being recorded.
4815 Behaviour is same as CVideoRecorderUtility::SetVideoQualityL
4817 @param aQuality Video quality, in the range of 0 to 100, inclusive.
4819 @return One of the system-wide error codes.
4820 @see CVideoRecorderUtility::SetVideoQualityL
4822 IMPORT_C TInt SetVideoQuality(TInt aQuality);
4825 Gets video quality level set using SetVideoQualityL.
4826 Behaviour is same as CVideoRecorderUtility::VideoQualityL
4828 @param aQuality Out parameter returning Video quality in the range 0-100.
4830 @return One of the system-wide error codes.
4831 @see CVideoRecorderUtility::VideoQualityL
4833 IMPORT_C TInt VideoQuality(TInt &aQuality) const;
4836 Sets the video framerate to fixed.
4837 Behaviour is same as CVideoRecorderUtility::SetVideoFrameRateFixedL
4839 @param aFixedFrameRate ETrue to request a fixed framerate, EFalse to
4840 request a variable framerate.
4842 @return One of the system-wide error codes.
4843 @see CVideoRecorderUtility::SetVideoFrameRateFixedL
4845 IMPORT_C TInt SetVideoFrameRateFixed(TBool aFixedFrameRate);
4848 Gets FrameRateFixed flag set using SetVideoFrameRateFixedL.
4849 Behaviour is same as CVideoRecorderUtility::VideoFrameRateFixedL
4851 @param aFixedFrameRate Out parameter returns ETrue if fixed framerate
4852 is enabled, EFalse otherwise.
4854 @return One of the system-wide error codes.
4855 @see CVideoRecorderUtility::VideoFrameRateFixedL
4857 IMPORT_C TInt VideoFrameRateFixed(TBool &aFixedFrameRate) const;
4864 Interface UID and messages for the Audio Play Controller Set Repeats API.
4866 const TUid KUidInterfaceMMFAudioPlaySetRepeatsController = {0x102834D5};
4871 enum TMMFAudioPlayControllerSetRepeatsMessages
4873 EMMFAudioPlayControllerSetRepeats
4880 Client class to access loop play functionality of audio play controller.
4882 The class uses the custom command function of the controller plugin, and removes the necessity
4883 for the client to formulate the custom commands.
4885 class RMMFAudioPlayControllerSetRepeatsCustomCommands : public RMMFCustomCommandsBase
4893 The client side controller object to be used by this custom command interface.
4895 IMPORT_C RMMFAudioPlayControllerSetRepeatsCustomCommands(RMMFController& aController);
4898 Sets the number of times the audio sample to be repeated and the trailing silence period
4900 @param aRepeatNumberOfTimes
4901 The number of times the audio sample needs to be repeated
4903 @param aTrailingSilence
4904 The time interval of the trailing silence in microseconds.
4906 @return KErrNotSupported if the controller plugin does not support the loop play functionality.
4908 IMPORT_C TInt SetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence);
4915 Mixin class to be derived from by controller plugins that could support the set repeats custom command.
4917 class MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor
4922 Sets the number of times the audio sample is to be repeated during the playback operation.
4923 A period of silence can follow each playing of the sample. The audio sample can be repeated indefinitely.
4925 @param aRepeatNumberOfTimes
4926 The number of times the audio sample, together with the trailing silence, is to be repeated.
4927 If this is set to KMdaRepeatForever, then the audio sample, together with the trailing silence,
4928 is repeated indefinitely or until Stop() is called.
4929 If this is set to zero, then the audio sample is not repeated.
4931 @param aTrailingSilence
4932 The time interval of the trailing silence in microseconds.
4934 @return KErrNone if the controller plugin supports the loop play functionality
4935 KErrNotSupported if the controller plugin does not support the loop play functionality
4936 KErrNotReady if the controller plugin is not yet added the audio sink
4938 virtual TInt MapcSetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence) = 0;
4945 Custom command parser class to be used by controller plugins wishing to support set repeats functionality
4947 The controller plugin should create an object of this type and add it to the list of custom command parsers
4948 in the controller framework. The controller plugin must be derived from
4949 MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor to use this class.
4952 class CMMFAudioPlayControllerSetRepeatsCustomCommandParser : public CMMFCustomCommandParserBase
4957 Creates a new custom command parser capable of handling set repeats controller commands.
4960 A reference to the controller plugin that owns this new object.
4962 @return A pointer to the object created.
4965 IMPORT_C static CMMFAudioPlayControllerSetRepeatsCustomCommandParser* NewL(MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& aImplementor);
4971 IMPORT_C ~CMMFAudioPlayControllerSetRepeatsCustomCommandParser();
4974 Handles a request from the client. Called by the controller framework.
4977 The message to be handled.
4980 void HandleRequest(TMMFMessage& aMessage);
4987 A reference to the controller plugin that owns this new object.
4990 CMMFAudioPlayControllerSetRepeatsCustomCommandParser(MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& aImplementor);
4991 // Internal request handling methods.
4992 void DoHandleRequestL(TMMFMessage& aMessage);
4993 TBool DoSetRepeatsL(TMMFMessage& aMessage);
4996 The object that implements the set repeats custom command i.e controller plugin
4998 MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& iImplementor;