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 "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.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};
86 Interface UID and messages for the Audio Play Device API.
88 const TUid KUidInterfaceMMFAudioPlayDevice = {0x101F76D6};
94 Interface UID and messages for the Audio Record Device API.
96 const TUid KUidInterfaceMMFAudioRecordDevice = {0x101F76D7};
102 Interface UID and messages for the Audio Play Controller API.
104 const TUid KUidInterfaceMMFAudioPlayController = {0x101F76D8};
110 Interface UID and messages for the Audio Record Controller API.
112 const TUid KUidInterfaceMMFAudioRecordController = {0x101F76D9};
118 Interface UID and messages for the Audio Controller API.
120 const TUid KUidInterfaceMMFAudioController = {0x101F76DA};
126 const TUid KUidInterfaceMMFVideoController = {0x101F76DB};
132 const TUid KUidInterfaceMMFVideoPlayController = {0x101F7B73};
138 const TUid KUidInterfaceMMFVideoRecordController = {0x101F7B74};
144 const TUid KUidInterfaceMMFVideoDRMExt = {0x101F7C23};
150 Interface UID for the custom command that supports setting the initial screen for video on the controller.
152 const TUid KUidInterfaceMMFVideoSetInitScreen = {0x102825F7};
158 const TUid KUidInterfaceMMFVideoPixelAspectRatio = {0x102831EF};
165 const TUid KUidInterfaceMMFVideoAudioSamplingRateAndChannelConfig = {0x102831F0};
171 Client class to access Audio Play Device functionality.
173 The class uses the custom command function of the controller plugin, and removes the necessity
174 for the client to formulate the custom commands.
177 class RMMFAudioPlayDeviceCustomCommands : public RMMFCustomCommandsBase
185 The client side controller object to be used by this custom command interface.
189 IMPORT_C RMMFAudioPlayDeviceCustomCommands(RMMFController& aController);
192 Sets the volume of the sound device.
197 @return One of the system-wide error codes.
201 IMPORT_C TInt SetVolume(TInt aVolume) const;
204 Gets the maximum volume supported by the sound device.
207 The maximum volume, filled in by the controller.
209 @return One of the system-wide error codes.
213 IMPORT_C TInt GetMaxVolume(TInt& aMaxVolume) const;
216 Gets the current playback volume.
219 On return contains the current playback volume.
221 @return One of the system-wide error codes.
225 IMPORT_C TInt GetVolume(TInt& aVolume) const;
230 This will cause the sound device to start playing with zero volume,
231 increasing the volume over aRampDuration microseconds.
233 The volume ramp can be removed by setting the ramp duration to zero.
236 The duration over which the volume is to be increased, in microseconds.
238 @return One of the system-wide error codes.
242 IMPORT_C TInt SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration) const;
245 Sets the balance between the left and right stereo audio channels.
248 Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
249 restored by using KMMFBalanceCenter.
251 @return One of the system-wide error codes.
255 IMPORT_C TInt SetBalance(TInt aBalance) const;
258 Gets the balance between the left and right stereo audio channels.
261 The current balance, filled in by the controller.
263 @return One of the system-wide error codes.
267 IMPORT_C TInt GetBalance(TInt& aBalance) const;
274 Mixin class to be derived from controller plugins that could support the audio play device
277 class MMMFAudioPlayDeviceCustomCommandImplementor
282 Sets the volume of the sound device.
284 This function can leave with one of the system-wide error codes. The request will be
285 completed with the leave code.
292 virtual void MapdSetVolumeL(TInt aVolume) = 0;
295 Gets the maximum volume supported by the sound device.
297 This function can leave with one of the system-wide error codes. The request will be
298 completed with the leave code.
301 The maximum volume, to be filled in by the controller plugin.
305 virtual void MapdGetMaxVolumeL(TInt& aMaxVolume) = 0;
308 Gets the current playback volume.
310 This function can leave with one of the system-wide error codes. The request will be
311 completed with the leave code.
314 The volume, to be filled in by the controller.
318 virtual void MapdGetVolumeL(TInt& aVolume) = 0;
323 This will cause the sound device to start playing with zero volume,
324 increasing the volume over aRampDuration microseconds.
326 The volume ramp can be removed by setting the ramp duration to zero.
328 This function can leave with one of the system-wide error codes. The request will be
329 completed with the leave code.
332 The duration over which the volume is to be increased, in microseconds.
336 virtual void MapdSetVolumeRampL(const TTimeIntervalMicroSeconds& aRampDuration) = 0;
339 Sets the balance between the left and right stereo audio channels.
341 This function can leave with one of the system-wide error codes. The request will be
342 completed with the leave code.
345 Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
346 restored by using KMMFBalanceCenter.
350 virtual void MapdSetBalanceL(TInt aBalance) = 0;
353 Gets the balance between the left and right stereo audio channels.
355 This function can leave with one of the system-wide error codes. The request will be
356 completed with the leave code.
359 The current balance, filled in by the controller.
363 virtual void MapdGetBalanceL(TInt& aBalance) = 0;
370 Custom command parser class to be used by controller plugins wishing to support
371 audio play device commands.
373 The controller plugin must be derived from MMMFAudioPlayDeviceCustomCommandImplementor
376 The controller plugin should create an object of this type and add it to the list of custom
377 command parsers in the controller framework. See the following example code for details.
380 void CMMFAudioController::ConstructL()
382 // Construct custom command parsers
383 CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
384 CleanupStack::PushL(audPlayDevParser);
385 AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
386 CleanupStack::Pop();//audPlayDevParser
388 CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
389 CleanupStack::PushL(audRecDevParser);
390 AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
391 CleanupStack::Pop();//audRecDevParser
399 class CMMFAudioPlayDeviceCustomCommandParser : public CMMFCustomCommandParserBase
404 Creates a new custom command parser capable of handling audio play device commands.
406 This function may leave with one of the system-wide error codes.
409 A reference to the controller plugin that owns this new object.
411 @return A pointer to the object created.
415 IMPORT_C static CMMFAudioPlayDeviceCustomCommandParser* NewL(MMMFAudioPlayDeviceCustomCommandImplementor& aImplementor);
422 IMPORT_C ~CMMFAudioPlayDeviceCustomCommandParser();
425 Handles a request from the client. Called by the controller framework.
428 The message to be handled.
432 void HandleRequest(TMMFMessage& aMessage);
439 A reference to the controller plugin that owns this new object.
443 CMMFAudioPlayDeviceCustomCommandParser(MMMFAudioPlayDeviceCustomCommandImplementor& aImplementor);
444 // Internal request handling methods.
445 void DoHandleRequestL(TMMFMessage& aMessage);
446 TBool DoSetVolumeL(TMMFMessage& aMessage);
447 TBool DoGetMaxVolumeL(TMMFMessage& aMessage);
448 TBool DoGetVolumeL(TMMFMessage& aMessage);
449 TBool DoSetVolumeRampL(TMMFMessage& aMessage);
450 TBool DoSetBalanceL(TMMFMessage& aMessage);
451 TBool DoGetBalanceL(TMMFMessage& aMessage);
453 /** The object that implements the audio play device interface */
454 MMMFAudioPlayDeviceCustomCommandImplementor& iImplementor;
461 Client class to access Audio Record Device functionality.
463 The class uses the custom command function of the controller plugin, and removes the necessity
464 for the client to formulate the custom commands.
468 class RMMFAudioRecordDeviceCustomCommands : public RMMFCustomCommandsBase
476 The client side controller object to be used by this custom command interface.
480 IMPORT_C RMMFAudioRecordDeviceCustomCommands(RMMFController& aController);
483 Sets the gain of the sound device.
488 @return One of the system-wide error codes.
492 IMPORT_C TInt SetGain(TInt aGain) const;
495 Gets the maximum gain supported by the sound device.
498 The maximum gain, filled in by the controller.
500 @return One of the system-wide error codes.
504 IMPORT_C TInt GetMaxGain(TInt& aMaxGain) const;
507 Gets the current recording gain.
510 The gain, filled in by the controller.
512 @return One of the system-wide error codes.
516 IMPORT_C TInt GetGain(TInt& aGain) const;
519 Sets the balance between the left and right stereo microphone channels.
522 Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
523 restored by using KMMFBalanceCenter.
525 @return One of the system-wide error codes.
529 IMPORT_C TInt SetBalance(TInt aBalance) const;
532 Gets the balance between the left and right stereo microphone channels.
535 The current balance, filled in by the controller.
537 @return One of the system-wide error codes.
541 IMPORT_C TInt GetBalance(TInt& aBalance) const;
548 Mixin class to be derived from controller plugins that could support the audio record device
551 class MMMFAudioRecordDeviceCustomCommandImplementor
556 Sets the gain of the sound device.
558 This function can leave with one of the system-wide error codes. The request will be
559 completed with the leave code.
566 virtual void MardSetGainL(TInt aGain) = 0;
569 Gets the maximum gain supported by the sound device.
571 This function can leave with one of the system-wide error codes. The request will be
572 completed with the leave code.
575 The maximum gain, to be filled in by the controller plugin.
579 virtual void MardGetMaxGainL(TInt& aMaxGain) = 0;
582 Gets the current recording gain.
584 This function can leave with one of the system-wide error codes. The request will be
585 completed with the leave code.
588 The gain, to be filled in by the controller.
592 virtual void MardGetGainL(TInt& aGain) = 0;
595 Sets the balance between the left and right stereo microphone channels.
597 This function can leave with one of the system-wide error codes. The request will be
598 completed with the leave code.
601 Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
602 restored by using KMMFBalanceCenter.
606 virtual void MardSetBalanceL(TInt aBalance) = 0;
609 Gets the balance between the left and right stereo microphone channels.
611 This function can leave with one of the system-wide error codes. The request will be
612 completed with the leave code.
615 The current balance, filled in by the controller.
619 virtual void MardGetBalanceL(TInt& aBalance) = 0;
626 Custom command parser class to be used by controller plugins wishing to support
627 audio record device commands.
629 The controller plugin must be derived from MMMFAudioRecordDeviceCustomCommandImplementor
632 The controller plugin should create an object of this type and add it to the list of custom
633 command parsers in the controller framework. See the following example code for details.
636 void CMMFAudioController::ConstructL()
638 // Construct custom command parsers
639 CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
640 CleanupStack::PushL(audPlayDevParser);
641 AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
642 CleanupStack::Pop();//audPlayDevParser
644 CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
645 CleanupStack::PushL(audRecDevParser);
646 AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
647 CleanupStack::Pop();//audRecDevParser
655 class CMMFAudioRecordDeviceCustomCommandParser : public CMMFCustomCommandParserBase
660 Creates a new custom command parser capable of handling audio record device commands.
662 This function may leave with one of the system-wide error codes.
665 A reference to the controller plugin that owns this new object.
667 @return A pointer to the object created.
671 IMPORT_C static CMMFAudioRecordDeviceCustomCommandParser* NewL(MMMFAudioRecordDeviceCustomCommandImplementor& aImplementor);
678 IMPORT_C ~CMMFAudioRecordDeviceCustomCommandParser();
681 Handles a request from the client. Called by the controller framework.
684 The message to be handled.
688 void HandleRequest(TMMFMessage& aMessage);
695 A reference to the controller plugin that owns this new object.
699 CMMFAudioRecordDeviceCustomCommandParser(MMMFAudioRecordDeviceCustomCommandImplementor& aImplementor);
700 // Internal request handling methods.
701 void DoHandleRequestL(TMMFMessage& aMessage);
702 TBool DoSetGainL(TMMFMessage& aMessage);
703 TBool DoGetMaxGainL(TMMFMessage& aMessage);
704 TBool DoGetGainL(TMMFMessage& aMessage);
705 TBool DoSetBalanceL(TMMFMessage& aMessage);
706 TBool DoGetBalanceL(TMMFMessage& aMessage);
708 /** The object that implements the audio record device interface */
709 MMMFAudioRecordDeviceCustomCommandImplementor& iImplementor;
717 Client class to access functionality specific to an audio play controller.
719 The class uses the custom command function of the controller plugin, and removes the necessity
720 for the client to formulate the custom commands.
724 class RMMFAudioPlayControllerCustomCommands : public RMMFCustomCommandsBase
732 The client side controller object to be used by this custom command interface.
736 IMPORT_C RMMFAudioPlayControllerCustomCommands(RMMFController& aController);
739 Sets a playback window. The controller will start playing from the start of the window,
740 and finish playing at the end of the window.
743 The start of the window, in microseconds.
745 The end of the window, in microseconds.
747 @return One of the system-wide error codes.
751 IMPORT_C TInt SetPlaybackWindow(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) const;
754 Removes a previously defined playback window.
756 @return One of the system-wide error codes.
759 IMPORT_C TInt DeletePlaybackWindow();
762 Gets the audio loading progress as a percentage.
764 @param aPercentageProgress
765 The progress loading the clip, as a percentage.
767 @return One of the system-wide error codes.
771 IMPORT_C TInt GetLoadingProgress(TInt& aPercentageProgress) const;
779 Mixin class to be derived from controller plugins that could support the audio play controller
782 class MMMFAudioPlayControllerCustomCommandImplementor
787 Sets a playback window. The controller will start playing from the start of the window,
788 and finish playing at the end of the window.
790 This function can leave with one of the system-wide error codes. The request will be
791 completed with the leave code.
794 The start of the window, in microseconds.
796 The end of the window, in microseconds.
800 virtual void MapcSetPlaybackWindowL(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) = 0;
803 Removes a previously defined playback window.
805 This function can leave with one of the system-wide error codes. The request will be
806 completed with the leave code.
810 virtual void MapcDeletePlaybackWindowL() = 0;
813 Gets the completion status of loading/rebuffering the current audio clip.
815 This function can leave with one of the system-wide error codes. The request will be
816 completed with the leave code.
818 @param aPercentageComplete
819 The status of loading as a percentage completed.
823 virtual void MapcGetLoadingProgressL(TInt& aPercentageComplete) = 0;
830 Custom command parser class to be used by controller plugins wishing to support
831 audio play controller commands.
833 The controller plugin must be derived from MMMFAudioPlayControllerCustomCommandImplementor to use
836 The controller plugin should create an object of this type and add it to the list of custom
837 command parsers in the controller framework. See the following example code for details.
840 void CMMFAudioController::ConstructL()
842 // Construct custom command parsers
843 CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
844 CleanupStack::PushL(audPlayDevParser);
845 AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
846 CleanupStack::Pop();//audPlayDevParser
848 CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
849 CleanupStack::PushL(audRecDevParser);
850 AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
851 CleanupStack::Pop();//audRecDevParser
859 class CMMFAudioPlayControllerCustomCommandParser : public CMMFCustomCommandParserBase
864 Creates a new custom command parser capable of handling audio play controller commands.
867 A reference to the controller plugin that owns this new object.
869 @return A pointer to the object created.
873 IMPORT_C static CMMFAudioPlayControllerCustomCommandParser* NewL(MMMFAudioPlayControllerCustomCommandImplementor& aImplementor);
880 IMPORT_C ~CMMFAudioPlayControllerCustomCommandParser();
883 Handles a request from the client. Called by the controller framework.
886 The message to be handled.
890 void HandleRequest(TMMFMessage& aMessage);
897 A reference to the controller plugin that owns this new object.
901 CMMFAudioPlayControllerCustomCommandParser(MMMFAudioPlayControllerCustomCommandImplementor& aImplementor);
902 // Internal request handling methods.
903 void DoHandleRequestL(TMMFMessage& aMessage);
904 TBool DoSetPlaybackWindowL(TMMFMessage& aMessage);
905 TBool DoDeletePlaybackWindowL(TMMFMessage& aMessage);
906 TBool DoGetLoadingProgressL(TMMFMessage& aMessage);
909 The object that implements the audio play controller interface
911 MMMFAudioPlayControllerCustomCommandImplementor& iImplementor;
921 Client class to access functionality specific to an audio record controller.
923 The class uses the custom command function of the controller plugin, and removes the necessity
924 for the client to formulate the custom commands.
928 class RMMFAudioRecordControllerCustomCommands : public RMMFCustomCommandsBase
936 The client side controller object to be used by this custom command interface.
940 IMPORT_C RMMFAudioRecordControllerCustomCommands(RMMFController& aController);
943 Gets the (possibly estimated) record time left in the clip.
946 The record time available, in microseconds.
948 @return One of the system-wide error codes.
952 IMPORT_C TInt GetRecordTimeAvailable(TTimeIntervalMicroSeconds& aTime) const;
955 Sets the maximum duration of the recorded clip, in microseconds.
958 The maximum duration of the recorded clip, in microseconds.
960 @return One of the system-wide error codes.
964 IMPORT_C TInt SetMaxDuration(const TTimeIntervalMicroSeconds& aMaxDuration) const;
967 Sets the maximum size of the recorded clip, in bytes.
970 The maximum size of the recorded clip, in bytes.
972 @return One of the system-wide error codes.
976 IMPORT_C TInt SetMaxFileSize(TInt aMaxSize) const;
979 Removes a portion from the clip, either from the current position to the beginning or the
980 current position to the end.
983 A boolean indicating whether to crop to the end. Crops to the end if set to ETrue, to
984 the beginning set to EFalse.
986 @return One of the system-wide error codes.
990 IMPORT_C TInt Crop(TBool aToEnd);
993 Adds meta data to the clip.
996 The details of the new entry to be added.
1000 IMPORT_C void AddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry);
1003 Removes a meta data entry from the clip.
1006 The ID of the meta data entry to delete.
1008 @return One of the system-wide error codes.
1012 IMPORT_C TInt RemoveMetaDataEntry(TInt aIndex);
1015 Replaces a meta data in the clip.
1018 The ID of the meta data entry to replace.
1020 The details of the new entry to be added.
1024 IMPORT_C void ReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry);
1031 Mixin class to be derived from controller plugins that could support the audio record controller
1034 class MMMFAudioRecordControllerCustomCommandImplementor
1039 Gets the (possibly estimated) record time left in the clip.
1041 This function can leave with one of the system-wide error codes. The request will be
1042 completed with the leave code.
1045 The record time available, in microseconds.
1049 virtual void MarcGetRecordTimeAvailableL(TTimeIntervalMicroSeconds& aTime) = 0;
1052 Sets the maximum duration of the recorded clip, in microseconds.
1054 This function can leave with one of the system-wide error codes. The request will be
1055 completed with the leave code.
1058 The maximum duration of the recorded clip, in microseconds.
1062 virtual void MarcSetMaxDurationL(const TTimeIntervalMicroSeconds& aMaxDuration) = 0;
1065 Sets the maximum size of the recorded clip, in bytes.
1067 This function can leave with one of the system-wide error codes. The request will be
1068 completed with the leave code.
1071 The maximum size of the recorded clip, in bytes.
1075 virtual void MarcSetMaxFileSizeL(TInt aMaxSize) = 0;
1078 Removes a portion from the clip, either from the current position to the beginning
1079 or the current position to the end.
1081 This function can leave with one of the system-wide error codes. The request will be
1082 completed with the leave code.
1085 A boolean indicating whether to crop to the end or the beginning. ETrue to crop to the
1086 end, EFalse to the beginning.
1090 virtual void MarcCropL(TBool aToEnd) = 0;
1093 Adds meta data to the clip.
1096 The details of the new entry to be added.
1100 virtual void MarcAddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry) = 0;
1103 Removes a meta data entry from the clip.
1106 The ID of the meta data entry to delete.
1110 virtual void MarcRemoveMetaDataEntryL(TInt aIndex) = 0;
1113 Replaces a meta data entry in the clip.
1116 The ID of the meta data entry to replace.
1118 The details of the new entry to be added.
1122 virtual void MarcReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry) = 0;
1129 Custom command parser class to be used by controller plugins wishing to support
1130 audio record controller commands.
1132 The controller plugin must be derived from MMMFAudioRecordControllerCustomCommandImplementor
1135 The controller plugin should create an object of this type and add it to the list of custom
1136 command parsers in the controller framework. See the following example code for details.
1139 void CMMFAudioController::ConstructL()
1141 // Construct custom command parsers
1142 CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
1143 CleanupStack::PushL(audPlayDevParser);
1144 AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
1145 CleanupStack::Pop();//audPlayDevParser
1147 CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
1148 CleanupStack::PushL(audRecDevParser);
1149 AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
1150 CleanupStack::Pop();//audRecDevParser
1158 class CMMFAudioRecordControllerCustomCommandParser : public CMMFCustomCommandParserBase
1163 Creates a new custom command parser capable of handling audio record controller commands.
1166 A reference to the controller plugin that owns this new object.
1168 @return A pointer to the object created.
1172 IMPORT_C static CMMFAudioRecordControllerCustomCommandParser* NewL(MMMFAudioRecordControllerCustomCommandImplementor& aImplementor);
1179 IMPORT_C ~CMMFAudioRecordControllerCustomCommandParser();
1182 Handles a request from the client. Called by the controller framework.
1185 The message to be handled.
1189 void HandleRequest(TMMFMessage& aMessage);
1196 A reference to the controller plugin that owns this new object.
1200 CMMFAudioRecordControllerCustomCommandParser(MMMFAudioRecordControllerCustomCommandImplementor& aImplementor);
1201 // Internal request handling methods.
1202 void DoHandleRequestL(TMMFMessage& aMessage);
1203 TBool DoGetRecordTimeAvailableL(TMMFMessage& aMessage);
1204 TBool DoSetMaxDurationL(TMMFMessage& aMessage);
1205 TBool DoSetMaxFileSizeL(TMMFMessage& aMessage);
1206 TBool DoCropL(TMMFMessage& aMessage);
1207 TBool DoAddMetaDataEntryL(TMMFMessage& aMessage);
1208 TBool DoRemoveMetaDataEntryL(TMMFMessage& aMessage);
1209 TBool DoReplaceMetaDataEntryL(TMMFMessage& aMessage);
1212 The object that implements the audio record controller interface.
1214 MMMFAudioRecordControllerCustomCommandImplementor& iImplementor;
1217 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
1218 #include <mmf/common/mmfstandardcustomcommandsenums.h>
1219 #include <mmf/common/mmfstandardcustomcommandsimpl.h>
1227 enum TMMFAudioControllerMessages
1229 EMMFAudioControllerSetSourceSampleRate,
1230 EMMFAudioControllerSetSourceNumChannels,
1231 EMMFAudioControllerSetSourceFormat,
1232 EMMFAudioControllerSetSourceBitRate,
1233 EMMFAudioControllerSetSourceDataType,
1234 EMMFAudioControllerSetSinkSampleRate,
1235 EMMFAudioControllerSetSinkNumChannels,
1236 EMMFAudioControllerSetSinkFormat,
1237 EMMFAudioControllerSetSinkBitRate,
1238 EMMFAudioControllerSetSinkDataType,
1239 EMMFAudioControllerGetSourceSampleRate,
1240 EMMFAudioControllerGetSourceBitRate,
1241 EMMFAudioControllerGetSourceNumChannels,
1242 EMMFAudioControllerGetSourceFormat,
1243 EMMFAudioControllerGetSourceDataType,
1244 EMMFAudioControllerGetSinkSampleRate,
1245 EMMFAudioControllerGetSinkBitRate,
1246 EMMFAudioControllerGetSinkNumChannels,
1247 EMMFAudioControllerGetSinkFormat,
1248 EMMFAudioControllerGetSinkDataType,
1249 EMMFAudioControllerGetSupportedSourceSampleRates,
1250 EMMFAudioControllerGetSupportedSourceBitRates,
1251 EMMFAudioControllerGetSupportedSourceNumChannels,
1252 EMMFAudioControllerGetSupportedSourceDataTypes,
1253 EMMFAudioControllerGetSupportedSinkSampleRates,
1254 EMMFAudioControllerGetSupportedSinkBitRates,
1255 EMMFAudioControllerGetSupportedSinkNumChannels,
1256 EMMFAudioControllerGetSupportedSinkDataTypes,
1257 EMMFAudioControllerCopyArrayData,
1258 EMMFAudioControllerSetCodec
1266 Client class to access functionality specific to an audio controller.
1268 The class uses the custom command function of the controller plugin, and removes the necessity
1269 for the client to formulate the custom commands.
1273 class RMMFAudioControllerCustomCommands : public RMMFCustomCommandsBase
1281 The client side controller object to be used by this custom command
1286 IMPORT_C RMMFAudioControllerCustomCommands(RMMFController& aController);
1289 Sets the sample rate of the data source in samples per second.
1292 The sample rate, in samples per second.
1294 @return One of the system-wide error codes.
1298 IMPORT_C TInt SetSourceSampleRate(TUint aSampleRate) const;
1301 Sets the bit rate of the data source in bits per second.
1304 The bit rate, in bits per second.
1306 @return One of the system-wide error codes.
1310 IMPORT_C TInt SetSourceBitRate(TUint aRate) const;
1313 Sets the number of channels in the data source. For example, one channel for mono, two channels
1317 The number of channels.
1319 @return One of the system-wide error codes.
1323 IMPORT_C TInt SetSourceNumChannels(TUint aNumChannels) const;
1326 Sets the format of the data source.
1328 The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin to be used.
1331 The format plugin to be used.
1333 @return One of the system-wide error codes.
1337 IMPORT_C TInt SetSourceFormat(TUid aFormatUid) const;
1340 Sets the fourCC code of the source.
1345 @return One of the system-wide error codes.
1349 IMPORT_C TInt SetSourceDataType(TFourCC aDataType) const;
1352 Sets the sample rate of the data sink in samples per second.
1355 The sample rate, in samples per second.
1357 @return One of the system-wide error codes.
1361 IMPORT_C TInt SetSinkSampleRate(TUint aSampleRate) const;
1364 Set the bit rate of the data sink in bits per second.
1367 The bit rate, in bits per second.
1369 @return One of the system-wide error codes.
1373 IMPORT_C TInt SetSinkBitRate(TUint aRate) const;
1376 Sets the number of channels in the data sink. For example, one channel for mono, two channels
1380 The number of channels.
1382 @return One of the system-wide error codes.
1386 IMPORT_C TInt SetSinkNumChannels(TUint aNumChannels) const;
1389 Sets the format of the data sink.
1391 The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin to be used.
1394 The format plugin to be used.
1396 @return One of the system-wide error codes.
1400 IMPORT_C TInt SetSinkFormat(TUid aFormatUid) const;
1403 Set the fourCC code of the sink.
1408 @return One of the system-wide error codes.
1412 IMPORT_C TInt SetSinkDataType(TFourCC aDataType) const;
1415 Sets the codec to be used. Useful when recording data.
1417 @param aSourceDataType
1418 The data type of the source of the codec.
1419 @param aSinkDataType
1420 The data type of the sink of the codec.
1422 @return One of the system-wide error codes.
1426 IMPORT_C TInt SetCodec(TFourCC aSourceDataType, TFourCC aSinkDataType) const;
1429 Gets the sample rate of the data source in samples per second.
1432 The sample rate, in samples per second.
1434 @return One of the system-wide error codes.
1438 IMPORT_C TInt GetSourceSampleRate(TUint& aRate) const;
1441 Gets the bit rate of the data source in bits per second.
1444 The bit rate, in bits per second.
1446 @return One of the system-wide error codes.
1450 IMPORT_C TInt GetSourceBitRate(TUint& aRate) const;
1453 Gets the number of channels in the data source. For example, one channel for mono, two channels
1457 The number of channels.
1459 @return One of the system-wide error codes.
1463 IMPORT_C TInt GetSourceNumChannels(TUint& aNumChannels) const;
1466 Gets the format of the data source.
1468 The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin being used.
1471 The format plugin being used.
1473 @return One of the system-wide error codes.
1477 IMPORT_C TInt GetSourceFormat(TUid& aFormat) const;
1480 Get the fourCC code of the source.
1485 @return One of the system-wide error codes.
1489 IMPORT_C TInt GetSourceDataType(TFourCC& aDataType) const;
1492 Gets the sample rate of the data sink in samples per second.
1495 The sample rate, in samples per second.
1497 @return One of the system-wide error codes.
1501 IMPORT_C TInt GetSinkSampleRate(TUint& aRate) const;
1504 Gets the bit rate of the data sink in bits per second.
1507 The bit rate, in bits per second.
1509 @return One of the system-wide error codes.
1513 IMPORT_C TInt GetSinkBitRate(TUint& aRate) const;
1516 Gets the number of channels in the data sink. For example, one channel for mono, two channels
1520 The number of channels.
1522 @return One of the system-wide error codes.
1526 IMPORT_C TInt GetSinkNumChannels(TUint& aNumChannels) const;
1529 Gets the format of the data sink.
1531 The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin being used.
1534 The format plugin being used.
1536 @return One of the system-wide error codes.
1540 IMPORT_C TInt GetSinkFormat(TUid& aFormat) const;
1543 Gets the fourCC code of the sink.
1548 @return One of the system-wide error codes.
1552 IMPORT_C TInt GetSinkDataType(TFourCC& aDataType) const;
1555 Gets the list of sample rates supported by the data source.
1557 Warning: Existing objects in this array will be removed by this function.
1559 @param aSupportedRates
1560 The supported rates.
1562 @return One of the system-wide error codes.
1566 IMPORT_C void GetSupportedSourceSampleRatesL(RArray<TUint>& aSupportedRates) const;
1569 Gets the list of bit rates supported by the data source.
1571 Warning: Existing objects in this array will be removed by this function.
1573 @param aSupportedRates
1574 The supported rates.
1576 @return One of the system-wide error codes.
1580 IMPORT_C void GetSupportedSourceBitRatesL(RArray<TUint>& aSupportedRates) const;
1583 Gets the list of channels supported by the data source (ie mono, stereo etc).
1585 Warning: Existing objects in this array will be removed by this method.
1587 @param aSupportedChannels
1588 The supported channels.
1590 @return One of the system-wide error codes.
1594 IMPORT_C void GetSupportedSourceNumChannelsL(RArray<TUint>& aSupportedChannels) const;
1597 Gets the list of fourCC codes supported by the data source.
1599 Warning: Existing objects in this array will be removed by this method.
1601 @param aSupportedDataTypes
1602 The supported data types.
1604 @return One of the system-wide error codes.
1608 IMPORT_C void GetSupportedSourceDataTypesL(RArray<TFourCC>& aSupportedDataTypes) const;
1611 Gets the list of sample rates supported by the data sink.
1613 Warning: Existing objects in this array will be removed by this method.
1615 @param aSupportedRates
1616 The supported rates.
1618 @return One of the system-wide error codes.
1622 IMPORT_C void GetSupportedSinkSampleRatesL(RArray<TUint>& aSupportedRates) const;
1625 Gets the list of bit rates supported by the data sink.
1627 Warning: Existing objects in this array will be removed by this method.
1629 @param aSupportedRates
1630 The supported rates.
1632 @return One of the system-wide error codes.
1636 IMPORT_C void GetSupportedSinkBitRatesL(RArray<TUint>& aSupportedRates) const;
1639 Gets the list of channels supported by the data sink (ie mono, stereo etc).
1641 Warning: Existing objects in this array will be removed by this method.
1643 @param aSupportedChannels
1644 The supported channels.
1646 @return One of the system-wide error codes.
1650 IMPORT_C void GetSupportedSinkNumChannelsL(RArray<TUint>& aSupportedChannels) const;
1653 Gets the list of fourCC codes supported by the data sink.
1655 Warning: Existing objects in this array will be removed by this method.
1657 @param aSupportedDataTypes
1658 The supported data types.
1660 @return One of the system-wide error codes.
1664 IMPORT_C void GetSupportedSinkDataTypesL(RArray<TFourCC>& aSupportedDataTypes) const;
1667 void DoGetUintArrayL(RArray<TUint>& aArray, TMMFAudioControllerMessages aIpc) const;
1668 void DoGetFourCCArrayL(RArray<TFourCC>& aArray, TMMFAudioControllerMessages aIpc) const;
1676 Mixin class to be derived from controller plugins that could support the audio record controller
1679 class MMMFAudioControllerCustomCommandImplementor
1684 Sets the sample rate of the data source in samples per second.
1687 The sample rate, in samples per second.
1691 virtual void MacSetSourceSampleRateL(TUint aSampleRate) = 0;
1694 Sets the bit rate of the data source in bits per second.
1697 The bit rate, in bits per second.
1701 virtual void MacSetSourceBitRateL(TUint aBitRate) = 0;
1704 Sets the number of channels in the data source. For example, one channel for mono, two channels
1708 The number of channels.
1712 virtual void MacSetSourceNumChannelsL(TUint aNumChannels) = 0;
1715 Sets the format of the data source. The UID corresponds to the UID of the CMMFFormat-derived
1716 ECOM plugin to be used.
1719 The format plugin to be used.
1723 virtual void MacSetSourceFormatL(TUid aFormatUid) = 0;
1726 Sets the fourCC code of the source.
1733 virtual void MacSetSourceDataTypeL(TFourCC aDataType) = 0;
1736 Sets the sample rate of the data sink in samples per second.
1739 The sample rate, in samples per second.
1743 virtual void MacSetSinkSampleRateL(TUint aSampleRate) = 0;
1746 Sets the bit rate of the data sink in bits per second.
1749 The bit rate, in bits per second.
1753 virtual void MacSetSinkBitRateL(TUint aRate) = 0;
1756 Sets the number of channels in the data sink. For example, one channel for mono, two channels
1760 The number of channels.
1764 virtual void MacSetSinkNumChannelsL(TUint aNumChannels) = 0;
1767 Sets the format of the data sink. The UID corresponds to the uid of the CMMFFormat-derived ECOM
1771 The format plugin to be used.
1775 virtual void MacSetSinkFormatL(TUid aFormatUid) = 0;
1778 Sets the fourCC code of the sink.
1785 virtual void MacSetSinkDataTypeL(TFourCC aDataType) = 0;
1788 Sets the codec to be used. Useful when recording data.
1790 @param aSourceDataType
1791 The data type of the source of the codec.
1792 @param aSinkDataType
1793 The data type of the sink of the codec.
1797 virtual void MacSetCodecL(TFourCC aSourceDataType, TFourCC aSinkDataType) = 0;
1801 Gets the sample rate of the data source in samples per second.
1804 The sample rate, in samples per second.
1808 virtual void MacGetSourceSampleRateL(TUint& aRate) = 0;
1811 Gets the bit rate of the data source in bits per second.
1814 The bit rate, in bits per second.
1818 virtual void MacGetSourceBitRateL(TUint& aRate) = 0;
1821 Gets the number of channels in the data source. For example, one channel for mono, two channels
1825 The number of channels.
1829 virtual void MacGetSourceNumChannelsL(TUint& aNumChannels) = 0;
1832 Gets the format of the data source. The UID corresponds to the uid of the CMMFFormat-derived
1833 ECOM plugin being used.
1836 The format plugin being used.
1840 virtual void MacGetSourceFormatL(TUid& aFormat) = 0;
1843 Gets the fourCC code of the source.
1850 virtual void MacGetSourceDataTypeL(TFourCC& aDataType) = 0;
1853 Gets the sample rate of the data sink in samples per second.
1856 The sample rate, in samples per second.
1860 virtual void MacGetSinkSampleRateL(TUint& aRate) = 0;
1863 Gets the bit rate of the data sink in bits per second.
1866 The bit rate, in bits per second.
1870 virtual void MacGetSinkBitRateL(TUint& aRate) = 0;
1873 Gets the number of channels in the data sink. For example, one channel for mono, two channels
1877 The number of channels.
1881 virtual void MacGetSinkNumChannelsL(TUint& aNumChannels) = 0;
1884 Gets the format of the data sink. The UID corresponds to the uid of the CMMFFormat-derived ECOM
1888 The format plugin being used.
1892 virtual void MacGetSinkFormatL(TUid& aFormat) = 0;
1895 Gets the fourCC code of the sink.
1902 virtual void MacGetSinkDataTypeL(TFourCC& aDataType) = 0;
1905 Gets the list of sample rates supported by the data source.
1907 @param aSupportedRates
1908 The supported rates. Warning: Existing objects in this array will be removed by this method.
1912 virtual void MacGetSupportedSourceSampleRatesL(RArray<TUint>& aSupportedRates) = 0;
1915 Gets the list of bit rates supported by the data source.
1917 Warning: Existing objects in this array will be removed by this method.
1919 @param aSupportedRates
1920 The supported rates.
1924 virtual void MacGetSupportedSourceBitRatesL(RArray<TUint>& aSupportedRates) = 0;
1927 Gets the list of channels supported by the data source (ie mono, stereo etc).
1929 Warning: Existing objects in this array will be removed by this method.
1931 @param aSupportedChannels
1932 The supported channels.
1936 virtual void MacGetSupportedSourceNumChannelsL(RArray<TUint>& aSupportedChannels) = 0;
1939 Gets the list of fourCC codes supported by the data source.
1941 Warning: Existing objects in this array will be removed by this method.
1943 @param aSupportedDataTypes
1944 The supported data types.
1948 virtual void MacGetSupportedSourceDataTypesL(RArray<TFourCC>& aSupportedDataTypes) = 0;
1951 Gets the list of sample rates supported by the data sink.
1953 Warning: Existing objects in this array will be removed by this method.
1955 @param aSupportedRates
1956 The supported rates.
1960 virtual void MacGetSupportedSinkSampleRatesL(RArray<TUint>& aSupportedRates) = 0;
1963 Gets the list of bit rates supported by the data sink.
1965 Warning: Existing objects in this array will be removed by this method.
1967 @param aSupportedRates
1968 The supported rates.
1972 virtual void MacGetSupportedSinkBitRatesL(RArray<TUint>& aSupportedRates) = 0;
1975 Gets the list of channels supported by the data sink (ie mono, stereo etc).
1977 Warning: Existing objects in this array will be removed by this method.
1979 @param aSupportedChannels
1980 The supported channels.
1984 virtual void MacGetSupportedSinkNumChannelsL(RArray<TUint>& aSupportedChannels) = 0;
1987 Gets the list of fourCC codes supported by the data sink.
1989 Warning: Existing objects in this array will be removed by this method.
1991 @param aSupportedDataTypes
1992 The supported data types.
1996 virtual void MacGetSupportedSinkDataTypesL(RArray<TFourCC>& aSupportedDataTypes) = 0;
2003 Custom command parser class to be used by controller plugins wishing to support
2004 audio controller commands.
2006 The controller plugin must be derived from MMMFAudioControllerCustomCommandImplementor
2009 The controller plugin should create an object of this type and add it to the list of custom
2010 command parsers in the controller framework. See the following example code for details.
2013 void CMMFAudioController::ConstructL()
2015 // Construct custom command parsers
2016 CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
2017 CleanupStack::PushL(audPlayDevParser);
2018 AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
2019 CleanupStack::Pop();//audPlayDevParser
2021 CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
2022 CleanupStack::PushL(audRecDevParser);
2023 AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
2024 CleanupStack::Pop();//audRecDevParser
2032 class CMMFAudioControllerCustomCommandParser : public CMMFCustomCommandParserBase
2037 Creates a new custom command parser capable of handling audio controller commands.
2040 A reference to the controller plugin that owns this new object.
2042 @return A pointer to the object created.
2046 IMPORT_C static CMMFAudioControllerCustomCommandParser* NewL(MMMFAudioControllerCustomCommandImplementor& aImplementor);
2053 IMPORT_C ~CMMFAudioControllerCustomCommandParser();
2056 Handles a request from the client. Called by the controller framework.
2059 The message to be handled.
2063 void HandleRequest(TMMFMessage& aMessage);
2069 A reference to the controller plugin that owns this new object.
2073 CMMFAudioControllerCustomCommandParser(MMMFAudioControllerCustomCommandImplementor& aImplementor);
2074 // Internal request handling methods.
2075 void DoHandleRequestL(TMMFMessage& aMessage);
2077 TBool DoSetSourceSampleRateL(TMMFMessage& aMessage);
2078 TBool DoSetSourceNumChannelsL(TMMFMessage& aMessage);
2079 TBool DoSetSourceFormatL(TMMFMessage& aMessage);
2080 TBool DoSetSinkSampleRateL(TMMFMessage& aMessage);
2081 TBool DoSetSinkNumChannelsL(TMMFMessage& aMessage);
2082 TBool DoSetSinkFormatL(TMMFMessage& aMessage);
2083 TBool DoSetCodecL(TMMFMessage& aMessage);
2084 TBool DoSetSourceBitRateL(TMMFMessage& aMessage);
2085 TBool DoSetSourceDataTypeL(TMMFMessage& aMessage);
2086 TBool DoSetSinkBitRateL(TMMFMessage& aMessage);
2087 TBool DoSetSinkDataTypeL(TMMFMessage& aMessage);
2088 TBool DoGetSourceSampleRateL(TMMFMessage& aMessage);
2089 TBool DoGetSourceBitRateL(TMMFMessage& aMessage);
2090 TBool DoGetSourceNumChannelsL(TMMFMessage& aMessage);
2091 TBool DoGetSourceFormatL(TMMFMessage& aMessage);
2092 TBool DoGetSourceDataTypeL(TMMFMessage& aMessage);
2093 TBool DoGetSinkSampleRateL(TMMFMessage& aMessage);
2094 TBool DoGetSinkBitRateL(TMMFMessage& aMessage);
2095 TBool DoGetSinkNumChannelsL(TMMFMessage& aMessage);
2096 TBool DoGetSinkFormatL(TMMFMessage& aMessage);
2097 TBool DoGetSinkDataTypeL(TMMFMessage& aMessage);
2098 TBool DoGetSupportedSourceSampleRatesL(TMMFMessage& aMessage);
2099 TBool DoGetSupportedSourceBitRatesL(TMMFMessage& aMessage);
2100 TBool DoGetSupportedSourceNumChannelsL(TMMFMessage& aMessage);
2101 TBool DoGetSupportedSourceDataTypesL(TMMFMessage& aMessage);
2102 TBool DoGetSupportedSinkSampleRatesL(TMMFMessage& aMessage);
2103 TBool DoGetSupportedSinkBitRatesL(TMMFMessage& aMessage);
2104 TBool DoGetSupportedSinkNumChannelsL(TMMFMessage& aMessage);
2105 TBool DoGetSupportedSinkDataTypesL(TMMFMessage& aMessage);
2106 TBool DoCopyArrayDataL(TMMFMessage& aMessage);
2108 void DoCreateBufFromUintArrayL(RArray<TUint>& aArray);
2109 void DoCreateBufFromFourCCArrayL(RArray<TFourCC>& aArray);
2112 The object that implements the audio record controller interface
2114 MMMFAudioControllerCustomCommandImplementor& iImplementor;
2116 CBufFlat* iDataCopyBuffer;
2126 Client class to access functionality specific to a video controller.
2128 The class uses the custom command function of the controller plugin, and removes the necessity
2129 for the client to formulate the custom commands.
2133 class RMMFVideoControllerCustomCommands : public RMMFCustomCommandsBase
2141 The client side controller object to be used by this custom command interface.
2145 IMPORT_C RMMFVideoControllerCustomCommands(RMMFController& aController);
2148 Gets the frame size of the clip.
2150 @param aVideoFrameSize
2151 The frame size, in pixels.
2153 @return One of the system-wide error codes.
2157 IMPORT_C TInt GetVideoFrameSize(TSize& aVideoFrameSize) const;
2160 Gets the audio type.
2163 The FourCC of the audio codec.
2165 @return One of the system-wide error codes.
2169 IMPORT_C TInt GetAudioCodec(TFourCC& aCodec) const;
2172 Gets the video bit rate.
2175 The bit rate of the video stream. If this value is KMMFVariableVideoBitRate it signifies
2176 a variable bit rate.
2178 @return One of the system-wide error codes.
2182 IMPORT_C TInt GetVideoBitRate(TInt& aBitRate) const;
2185 Gets the audio bit rate.
2188 The bit rate of the audio stream.
2190 @return One of the system-wide error codes.
2194 IMPORT_C TInt GetAudioBitRate(TInt& aBitRate) const;
2197 Sets the frame rate of the clip.
2199 @param aFramesPerSecond
2200 The number of frames per second.
2202 @return One of the system-wide error codes.
2206 IMPORT_C TInt SetFrameRate(TReal32 aFramesPerSecond) const;
2209 Gets the frame rate of the clip.
2211 @param aFramesPerSecond
2212 The number of frames per second, filled in by the controller plugin.
2214 @return One of the system-wide error codes.
2218 IMPORT_C TInt GetFrameRate(TReal32& aFramesPerSecond) const;
2221 Gets the video clip MIME type.
2224 The Mime type of the current clip.
2228 IMPORT_C TInt GetVideoMimeType(TDes8& aMimeType) const;
2235 Client class to access functionality specific to a video playback controller.
2237 The class uses the custom command function of the controller plugin, and removes the necessity
2238 for the client to formulate the custom commands.
2242 class RMMFVideoPlayControllerCustomCommands : public RMMFCustomCommandsBase
2250 The client side controller object to be used by this custom command interface.
2254 IMPORT_C RMMFVideoPlayControllerCustomCommands(RMMFController& aController);
2257 Prepares the video clip to be accessed.
2259 A call to this function tells the loaded controller plugin to finalise its configuration
2260 and to prepare to start reading the video clip. It is not possible to play the video clip
2261 or query any of its properties (e.g. duration, meta data etc.) until the controller plugin
2262 has signified the completion of this method by generating a KMMFEventCategoryVideoPrepareComplete
2267 IMPORT_C TInt Prepare();
2270 Asks the controller to store the current frame to a bitmap.
2272 The video play controller will send an event to the client on completion of the task.
2275 The handle of the CFbsBitmap object to retrieve the frame to.
2277 The active object to call back on.
2279 @return One of the system-wide error codes.
2283 IMPORT_C void GetFrame(CFbsBitmap& aBitmap, TRequestStatus& aStatus);
2286 Sets the screen region to be used to display the video.
2289 The window rectangle.
2293 @return One of the system-wide error codes.
2297 IMPORT_C TInt SetDisplayWindow(const TRect& aWindowRect, const TRect& aClipRect) const;
2300 Updates the display region.
2303 The valid region to display to.
2305 @return One of the system-wide error codes.
2309 IMPORT_C TInt UpdateDisplayRegion(const TRegion& aRegion) const;
2312 Queries whether audio is enabled.
2315 A boolean indicating whether audio is enabled.
2317 @return One of the system-wide error codes.
2321 IMPORT_C TInt GetAudioEnabled(TBool& aEnabled) const;
2324 Sends a direct screen access event to controller.
2327 The direct screen access event.
2329 @return One of the system-wide error codes.
2333 IMPORT_C TInt DirectScreenAccessEvent(const TMMFDSAEvent aDSAEvent) const;
2336 Sets a time window for video playback.
2339 The start time in milliseconds relative to the start of the video clip.
2341 The end time in milliseconds relative to the start of the video clip.
2343 @return One of the system-wide error codes.
2347 IMPORT_C TInt Play(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) const;
2350 Requests the controller to redraw the current frame.
2352 @return One of the system-wide error codes.
2356 IMPORT_C TInt RefreshFrame() const;
2359 Gets the video loading progress as a percentage.
2361 @param aPercentageProgress
2362 The progress loading the clip, as a percentage.
2364 @return One of the system-wide error codes.
2368 IMPORT_C TInt GetLoadingProgress(TInt& aPercentageProgress) const;
2371 Rotates the video image on the screen.
2374 The desired rotation to apply.
2376 @return One of the system-wide error codes.
2380 IMPORT_C TInt SetRotation(TVideoRotation aRotation) const;
2383 Queries the rotation that is currently applied to the video image.
2386 The applied rotation.
2388 @return One of the system wide error codes.
2392 IMPORT_C TInt GetRotation(TVideoRotation& aRotation) const;
2395 Scales the video image to a specified percentage of its original size.
2397 @param aWidthPercentage
2398 The percentage (100 = original size) to be used to scale the width of the video image.
2399 @param aHeightPercentage
2400 The percentage (100 = original size) to be used to scale the height of the video image.
2401 If this is not equal to aWidthPercentage then the image may be distorted.
2402 @param aAntiAliasFiltering
2403 True if anti-aliasing filtering should be used. If the plugin does not
2404 support this kind of processing, this value will be ignored.
2406 @return One of the system wide error codes.
2410 IMPORT_C TInt SetScaleFactor(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering) const;
2413 Gets the scale factor currently applied to the video image.
2415 @param aWidthPercentage
2416 On return, will contain the percentage (100 = original size) used to scale the width
2418 @param aHeightPercentage
2419 On return. will contain the percentage (100 = original size) used to scale the height
2421 @param aAntiAliasFiltering
2422 True if anti-aliasing filtering is being used
2424 @return One of the system wide error codes.
2428 IMPORT_C TInt GetScaleFactor(TReal32& aWidthPercentage, TReal32& aHeightPercentage, TBool& aAntiAliasFiltering) const;
2431 Selects a region of the video image to be displayed.
2434 The dimensions of the crop region, relative to the video image.
2436 @return One of the system wide error codes.
2440 IMPORT_C TInt SetCropRegion(const TRect& aCropRegion) const;
2443 Gets the crop region currently applied to the image.
2446 The dimensions of the crop region, relative to the video image. If no crop region has
2447 been applied, the full dimensions of the video image will be returned.
2449 @return One of the system-wide error codes.
2453 IMPORT_C TInt GetCropRegion(TRect& aCropRegion) const;
2457 TPckgBuf<TMMFVideoConfig> iConfigPackage;
2465 enum TMMFVideoRecordControllerMessages
2467 EMMFVideoRecordControllerSetVideoFormat,
2468 EMMFVideoRecordControllerSetVideoCodec,
2469 EMMFVideoRecordControllerSetAudioCodec,
2470 EMMFVideoRecordControllerSetVideoBitRate,
2471 EMMFVideoRecordControllerSetAudioBitRate,
2472 EMMFVideoRecordControllerSetVideoFrameSize,
2473 EMMFVideoRecordControllerSetMaxFileSize,
2474 EMMFVideoRecordControllerAddMetaDataEntry,
2475 EMMFVideoRecordControllerRemoveMetaDataEntry,
2476 EMMFVideoRecordControllerReplaceMetaDataEntry,
2477 EMMFVideoRecordControllerSetAudioEnabled,
2478 EMMFVideoRecordControllerPrepare,
2479 EMMFVideoRecordControllerSetCameraHandle,
2480 EMMFVideoRecordControllerGetRecordTimeAvailable,
2481 EMMFVideoRecordControllerGetSupportedSinkAudioTypes,
2482 EMMFVideoRecordControllerGetSupportedSinkVideoTypes,
2483 EMMFVideoRecordControllerCopyDescriptorArrayData,
2484 EMMFVideoRecordControllerCopyFourCCArrayData,
2485 EMMFVideoRecordControllerGetAudioEnabled // INC23777
2493 Client class to access functionality specific to a video recorder controller.
2495 The class uses the custom command function of the controller plugin, and removes the necessity
2496 for the client to formulate the custom commands.
2500 class RMMFVideoRecordControllerCustomCommands : public RMMFCustomCommandsBase
2508 The client side controller object to be used by this custom command interface.
2512 IMPORT_C RMMFVideoRecordControllerCustomCommands(RMMFController& aController);
2515 Sets the format for the video to record.
2517 @param aVideoFormatUid
2518 The UID of the video format.
2520 @return This method will return with one of the system-wide error codes.
2524 IMPORT_C TInt SetVideoFormat(TUid aVideoFormatUid) const;
2527 Sets the video codec for recording.
2530 The MIME type of the video codec.
2532 @return One of the system-wide error codes.
2536 IMPORT_C TInt SetVideoCodec(const TDesC8& aVideoCodec) const;
2539 Sets the video bit rate.
2542 The bit rate of the video stream.
2544 @return One of the system-wide error codes.
2548 IMPORT_C TInt SetVideoBitRate(TInt aBitRate) const;
2551 Sets the audio bit rate.
2554 The bit rate of the audio stream.
2556 @return One of the system-wide error codes.
2560 IMPORT_C TInt SetAudioBitRate(TInt aBitRate) const;
2563 Sets the audio codec for recording.
2566 The FourCC code of the audio codec.
2568 @return One of the system-wide error codes.
2572 IMPORT_C TInt SetAudioCodec(TFourCC aAudioCodec) const;
2575 Sets the frame size of the clip.
2577 @param aVideoFrameSize
2578 The frame size, in pixels.
2580 @return One of the system-wide error codes.
2584 IMPORT_C TInt SetVideoFrameSize(TSize aVideoFrameSize) const;
2587 Sets the maximum size of the recorded clip, in bytes.
2590 The maximum size of the recorded clip, in bytes. This can be called with the parameter
2591 KMMFNoMaxClipSize which signifies no maximum file size.
2593 @return One of the system-wide error codes.
2597 IMPORT_C TInt SetMaxFileSize(TInt aMaxSize) const;
2600 Adds meta data to the clip.
2603 The details of the new entry to be added.
2605 @return One of the system-wide error codes.
2609 IMPORT_C void AddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry)const;
2612 Removes a meta data entry from the clip.
2615 The ID of the meta data entry to delete.
2617 @return One of the system-wide error codes.
2621 IMPORT_C TInt RemoveMetaDataEntry(TInt aIndex)const;
2624 Replaces a meta data in the clip.
2627 The ID of the meta data entry to replace.
2629 The details of the new entry to be added.
2633 IMPORT_C void ReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry)const;
2636 Sets whether audio is enabled.
2639 A boolean indicating if audio should be enabled.
2641 @return One of the system-wide error codes.
2645 IMPORT_C TInt SetAudioEnabled(TBool aEnable) const;
2648 Prepares the controller for recording. This should be called before the first attempt to record
2649 with the controller.
2651 @return One of the system-wide error codes.
2655 IMPORT_C TInt Prepare() const;
2658 Sets the handle of the camera to use.
2660 @param aCameraHandle
2661 The handle of the camera to use.
2663 @return One of the system-wide error codes.
2667 IMPORT_C TInt SetCameraHandle(TInt aCameraHandle) const;
2670 Gets the (possibly estimated) record time left in the clip.
2673 The record time available, in microseconds.
2675 @return One of the system-wide error codes.
2679 IMPORT_C TInt GetRecordTimeAvailable(TTimeIntervalMicroSeconds& aTime) const;
2682 Gets the supported sink audio types.
2684 @param aSupportedDataTypes
2685 The supported data types.
2689 IMPORT_C TInt GetSupportedSinkAudioTypes(RArray<TFourCC>& aSupportedDataTypes) const;
2692 Gets the supported sink video types.
2695 The supported data types.
2699 IMPORT_C TInt GetSupportedSinkVideoTypes(CDesC8Array& aDataTypes) const;
2703 Retrieves whether audio is enabled.
2706 A boolean indicating whether audio is enabled.
2708 @return One of the system-wide error codes.
2712 IMPORT_C TInt GetAudioEnabled(TBool& aEnabled) const;
2715 void DoGetCDesC8ArrayL(CDesC8Array& aArray, TMMFVideoRecordControllerMessages aIpc) const;
2716 void DoGetFourCCArrayL(RArray<TFourCC>& aArray) const;
2724 Mixin class to be derived from controller plugins that could support the video record controller
2727 class MMMFVideoRecordControllerCustomCommandImplementor
2732 Sets the format for the video to record.
2734 @param aVideoFormatUid
2735 The UID of the video format.
2737 @return One of the system-wide error codes.
2741 virtual void MvrcSetVideoFormatL(TUid aVideoFormatUid)=0;
2744 Sets the video codec for recording.
2747 The MIME type of the video codec.
2749 @return One of the system-wide error codes.
2753 virtual void MvrcSetVideoCodecL(const TDesC8& aVideoCodec)=0;
2756 Sets the audio codec for recording.
2759 The FourCC code of the audio codec.
2761 @return One of the system-wide error codes.
2765 virtual void MvrcSetAudioCodecL(TFourCC aAudioCodec)=0;
2768 Sets the video bit rate.
2771 The bit rate of the video stream. This can be called with the parameter
2772 KMMFVariableVideoBitRate which specifies a variable bit rate.
2774 @return One of the system-wide error codes.
2778 virtual void MvrcSetVideoBitRateL(TInt& aBitRate)=0;
2781 Sets the audio bit rate.
2784 The bit rate of the audio stream.
2786 @return One of the system-wide error codes.
2790 virtual void MvrcSetAudioBitRateL(TInt& aBitRate)=0;
2793 Adds meta data to the clip.
2796 The details of the new entry to be added.
2800 virtual void MvrcAddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry)=0;
2803 Removes a meta data entry from the clip.
2806 The ID of the meta data entry to delete.
2810 virtual void MvrcRemoveMetaDataEntryL(TInt aIndex)=0;
2813 Replaces a meta data in the clip.
2816 The ID of the meta data entry to replace.
2818 The details of the new entry to be added.
2822 virtual void MvrcReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry)=0;
2825 Sets the maximum file size.
2828 The maximum file size allowed for recording. This can be called with the parameter
2829 KMMFNoMaxClipSize which signifies no maximum file size.
2833 virtual void MvrcSetMaxFileSizeL(TInt aMaxFileSize)=0;
2836 Sets whether audio is enabled.
2839 A boolean indicating if audio is enabled.
2843 virtual void MvrcSetAudioEnabledL(TBool aEnable)=0;
2846 Sets the frame size for the video recording.
2849 The frame size for recording.
2853 virtual void MvrcSetVideoFrameSizeL(TSize aFrameSize)=0;
2856 Prepares the controller for recording. This needs to be called before
2857 the first call to Record().
2861 virtual void MvrcPrepareL()=0;
2864 Sets the handle of the camera to use for recording.
2868 virtual void MvrcSetCameraHandleL(TInt aCameraHandle)=0;
2871 Gets the (possibly estimated) record time left in the clip.
2874 The record time available, in microseconds.
2878 virtual void MvrcGetRecordTimeAvailableL(TTimeIntervalMicroSeconds& aTime) = 0;
2881 Gets the supported sink audio types.
2884 The supported data types.
2886 @return One of the system-wide error codes.
2890 virtual void MvrcGetSupportedSinkAudioTypesL(RArray<TFourCC>& aDataTypes)=0;
2893 Gets the supported sink video types.
2896 The supported data types.
2898 @return One of the system-wide error codes.
2902 virtual void MvrcGetSupportedSinkVideoTypesL(CDesC8Array& aDataTypes)=0;
2906 Indicates if the audio is enabled.
2909 A boolean indicating if the audio is enabled.
2913 virtual void MvrcGetAudioEnabledL(TBool& aEnabled)=0;
2921 Client class to access functionality specific to a video playback controller.
2923 The class uses the custom command function of the controller plugin, and removes the necessity
2924 for the client to formulate the custom commands.
2928 class MMMFVideoPlayControllerCustomCommandImplementor
2933 Prepares the video clip to be accessed.
2935 A call to this method tells the controller plugin to finalise its configuration
2936 and to prepare to start reading the video clip. It is not possible to play the video clip
2937 or query any of its properties (e.g. duration, meta data etc.) until the controller plugin
2938 has signified the completion of this method by generating a
2939 KMMFEventCategoryVideoPrepareComplete event.
2943 virtual void MvpcPrepare()=0;
2946 Gets a frame previously requested from the controller.
2949 The handle of bitmap to retrieve frame to.
2953 virtual void MvpcGetFrameL(MMMFVideoFrameMessage& aVideoFrame)=0;
2956 Indicates whether audio is enabled.
2959 On return, contains a boolean indicating whether audio is enabled.
2963 virtual void MvpcGetAudioEnabledL(TBool& aEnabled)=0;
2966 Sets the screen region to be used to display the video.
2969 The clip rect used to display the video.
2973 virtual void MvpcSetDisplayWindowL(const TRect& aWindowRect, const TRect& aClipRect) = 0;
2976 Updates the region to display.
2979 A TRegion containing the current display regions, ownership of the TRegion is not
2984 virtual void MvpcUpdateDisplayRegionL(const TRegion& aRegion) = 0;
2987 Pauses/Resumes video playback. This is to be used with direct screen access
2988 to indicate that the display has changed and should not be written to. This
2989 does not affect audio playback.
2992 Whether the video display should be active.
2996 virtual void MvpcDirectScreenAccessEventL(const TMMFDSAEvent aDSAEvent) = 0;
2999 Sets a time window for video playback.
3002 Start time in milliseconds relative to the start of the video clip.
3004 End time in milliseconds relative to the start of the video clip.
3008 virtual void MvpcPlayL(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) = 0;
3011 Requests the controller to redraw the current frame.
3015 virtual void MvpcRefreshFrameL() = 0;
3018 Gets the progress of loading a video clip.
3020 @param aPercentageComplete
3021 The progress loading the clip, as a percentage.
3025 virtual void MvpcGetLoadingProgressL(TInt& aPercentageComplete) = 0;
3028 Rotates the video image on the screen.
3031 The desired rotation to apply.
3035 virtual void MvpcSetRotationL(TVideoRotation aRotation) = 0;
3038 Queries the rotation that is currently applied to the video image.
3041 The applied rotation.
3045 virtual void MvpcGetRotationL(TVideoRotation& aRotation) = 0;
3048 Scales the video image to a specified percentage of its original size.
3050 @param aWidthPercentage
3051 The percentage (100 = original size) to be used to scale the width of the video image.
3052 @param aHeightPercentage
3053 The percentage (100 = original size) to be used to scale the height of the video image.
3054 If this is not equal to aWidthPercentage then the image may be distorted.
3055 @param aAntiAliasFiltering
3056 A boolean indicating if anit-aliasing filtering should be used. ETrue if anti-aliasing
3057 should be used. If the plugin does not support this kind of processing, this value will
3062 virtual void MvpcSetScaleFactorL(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering) = 0;
3065 Gets the scale factor currently applied to the video image.
3067 @param aWidthPercentage
3068 The percentage (100 = original size) used to scale the width of the video image will be
3070 @param aHeightPercentage
3071 The percentage (100 = original size) used to scale the height of the video image will be
3073 @param aAntiAliasFiltering
3074 A boolean indicating if anti-aliasing filtering should be used. ETrue if anti-aliasing
3075 filtering is being used, EFalse if not.
3079 virtual void MvpcGetScaleFactorL(TReal32& aWidthPercentage, TReal32& aHeightPercentage, TBool& aAntiAliasFiltering) = 0;
3082 Selects a region of the video image to be displayed.
3085 The dimensions of the crop region, relative to the video image.
3089 virtual void MvpcSetCropRegionL(const TRect& aCropRegion) = 0;
3092 Gets the crop region currently applied to the image
3095 The dimensions of the crop region, relative to the video image. If no crop region has
3096 been applied, the full dimensions of the video image will be returned.
3100 virtual void MvpcGetCropRegionL(TRect& aCropRegion) = 0;
3107 Mixin class to be derived from controller plugins that could support the video record controller
3110 class MMMFVideoControllerCustomCommandImplementor
3115 Gets the frame size of the clip.
3117 @param aVideoFrameSize
3118 The frame size, in pixels.
3122 virtual void MvcGetVideoFrameSizeL(TSize& aVideoFrameSize)=0;
3125 Gets the audio type.
3128 The FourCC of the audio codec.
3132 virtual void MvcGetAudioCodecL(TFourCC& aCodec)=0;
3135 Gets the video bit rate.
3138 The bit rate of the video stream. If this value is KMMFVariableVideoBitRate it signifies
3139 a variable bit rate.
3143 virtual void MvcGetVideoBitRateL(TInt& aBitRate)=0;
3146 Gets the audio bit rate.
3149 The bit rate of the audio stream.
3153 virtual void MvcGetAudioBitRateL(TInt& aBitRate)=0;
3156 Sets the frame rate of the clip.
3158 @param aFramesPerSecond
3159 The number of frames per second.
3163 virtual void MvcSetFrameRateL(TReal32 aFramesPerSecond)=0;
3166 Gets the frame rate of the clip.
3168 @param aFramesPerSecond
3169 The number of frames per second, filled in by the controller plugin.
3173 virtual void MvcGetFrameRateL(TReal32& aFramesPerSecond)=0;
3176 Gets the supported sink video types.
3179 The supported data types.
3183 virtual void MvcGetVideoMimeTypeL(TDes8& aMimeType)=0;
3191 Custom command parser class to be used by controller plugins wishing to support
3192 video controller commands.
3194 The controller plugin must be derived from MMMFVideoControllerCustomCommandImplementor
3197 The controller plugin should create an object of this type and add it to the list of custom
3198 command parsers in the controller framework. See the following example code for details.
3201 void CMMFAudioController::ConstructL()
3203 // Construct custom command parsers
3204 CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
3205 CleanupStack::PushL(audPlayDevParser);
3206 AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
3207 CleanupStack::Pop();//audPlayDevParser
3209 CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
3210 CleanupStack::PushL(audRecDevParser);
3211 AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
3212 CleanupStack::Pop();//audRecDevParser
3221 class CMMFVideoControllerCustomCommandParser : public CMMFCustomCommandParserBase
3226 Creates a new custom command parser capable of handling video controller commands.
3229 A reference to the controller plugin that owns this new object.
3231 @return A pointer to the object created.
3235 IMPORT_C static CMMFVideoControllerCustomCommandParser* NewL(MMMFVideoControllerCustomCommandImplementor& aImplementor);
3242 IMPORT_C ~CMMFVideoControllerCustomCommandParser();
3245 Handles a request from the client. Called by the controller framework.
3248 The message to be handled.
3252 void HandleRequest(TMMFMessage& aMessage);
3259 A reference to the controller plugin that owns this new object.
3263 CMMFVideoControllerCustomCommandParser(MMMFVideoControllerCustomCommandImplementor& aImplementor);
3264 // Internal request handling methods.
3265 void DoHandleRequestL(TMMFMessage& aMessage);
3266 TBool DoGetAudioCodecL(TMMFMessage& aMessage);
3268 TBool DoGetAudioBitRateL(TMMFMessage& aMessage);
3269 TBool DoGetVideoBitRateL(TMMFMessage& aMessage);
3270 TBool DoGetVideoFrameSizeL(TMMFMessage& aMessage);
3271 TBool DoSetFrameRateL(TMMFMessage& aMessage);
3272 TBool DoGetFrameRateL(TMMFMessage& aMessage);
3273 TBool DoGetVideoMimeTypeL(TMMFMessage& aMessage);
3276 The object that implements the video record controller interface
3278 MMMFVideoControllerCustomCommandImplementor& iImplementor;
3285 Custom command parser class to be used by controller plugins wishing to support video play
3286 controller commands.
3288 The controller plugin must be derived from MMMFVideoPlayControllerCustomCommandImplementor to use
3289 this class. The controller plugin should create an object of this type and add it to the list of
3290 custom command parsers in the controller framework.
3292 class CMMFVideoPlayControllerCustomCommandParser : public CMMFCustomCommandParserBase
3297 Creates a new custom command parser capable of handling video controller commands.
3300 A reference to the controller plugin that owns this new object.
3302 @return A pointer to the object created.
3306 IMPORT_C static CMMFVideoPlayControllerCustomCommandParser* NewL(MMMFVideoPlayControllerCustomCommandImplementor& aImplementor);
3313 IMPORT_C ~CMMFVideoPlayControllerCustomCommandParser();
3316 Handles a request from the client. Called by the controller framework.
3319 The message to be handled.
3323 void HandleRequest(TMMFMessage& aMessage);
3329 A reference to the controller plugin that owns this new object.
3333 CMMFVideoPlayControllerCustomCommandParser(MMMFVideoPlayControllerCustomCommandImplementor& aImplementor);
3334 // Internal request handling methods.
3335 void DoHandleRequestL(TMMFMessage& aMessage);
3336 TBool DoRequestFrameL(TMMFMessage& aMessage);
3337 TBool DoGetFrameL(TMMFMessage& aMessage);
3338 TBool DoSetDisplayWindowL(TMMFMessage& aMessage);
3339 TBool DoUpdateDisplayRegionL(TMMFMessage& aMessage);
3340 TBool DoGetAudioEnabledL(TMMFMessage& aMessage);
3341 TBool DoDirectScreenAccessEventL(TMMFMessage& aMessage);
3342 TBool DoPlayL(TMMFMessage& aMessage);
3343 TBool DoRefreshFrameL(TMMFMessage& aMessage);
3344 TBool DoGetLoadingProgressL(TMMFMessage& aMessage);
3345 TBool DoPrepareL(TMMFMessage& aMessage);
3346 TBool DoSetRotationL(TMMFMessage& aMessage);
3347 TBool DoGetRotationL(TMMFMessage& aMessage);
3348 TBool DoSetScaleFactorL(TMMFMessage& aMessage);
3349 TBool DoGetScaleFactorL(TMMFMessage& aMessage);
3350 TBool DoSetCropRegionL(TMMFMessage& aMessage);
3351 TBool DoGetCropRegionL(TMMFMessage& aMessage);
3356 The object that implements the video record controller interface
3358 MMMFVideoPlayControllerCustomCommandImplementor& iImplementor;
3359 CMMFVideoFrameMessage* iVideoFrameMessage;
3366 Custom command parser class to be used by controller plugins wishing to support video record
3367 controller commands.
3369 The controller plugin must be derived from MMMFVideoRecordControllerCustomCommandImplementor to use
3370 this class. The controller plugin should create an object of this type and add it to the list of
3371 custom command parsers in the controller framework.
3373 class CMMFVideoRecordControllerCustomCommandParser : public CMMFCustomCommandParserBase
3378 Creates a new custom command parser capable of handling video controller commands.
3381 A reference to the controller plugin that owns this new object.
3383 @return A pointer to the object created.
3387 IMPORT_C static CMMFVideoRecordControllerCustomCommandParser* NewL(MMMFVideoRecordControllerCustomCommandImplementor& aImplementor);
3394 IMPORT_C ~CMMFVideoRecordControllerCustomCommandParser();
3397 Handles a request from the client. Called by the controller framework.
3400 The message to be handled.
3404 void HandleRequest(TMMFMessage& aMessage);
3410 A reference to the controller plugin that owns this new object.
3414 CMMFVideoRecordControllerCustomCommandParser(MMMFVideoRecordControllerCustomCommandImplementor& aImplementor);
3415 // Internal request handling methods.
3416 void DoHandleRequestL(TMMFMessage& aMessage);
3417 TBool DoSetVideoFormatL(TMMFMessage& aMessage);
3418 TBool DoSetAudioBitRateL(TMMFMessage& aMessage);
3419 TBool DoSetVideoBitRateL(TMMFMessage& aMessage);
3420 TBool DoSetVideoCodecL(TMMFMessage& aMessage);
3421 TBool DoSetAudioCodecL(TMMFMessage& aMessage);
3422 TBool DoAddMetaDataEntryL(TMMFMessage& aMessage);
3423 TBool DoRemoveMetaDataEntryL(TMMFMessage& aMessage);
3424 TBool DoReplaceMetaDataEntryL(TMMFMessage& aMessage);
3425 TBool DoSetMaxFileSizeL(TMMFMessage& aMessage);
3426 TBool DoSetAudioEnabledL(TMMFMessage& aMessage);
3427 TBool DoSetVideoFrameSizeL(TMMFMessage& aMessage);
3428 TBool DoPrepareL(TMMFMessage& aMessage);
3429 TBool DoSetCameraHandleL(TMMFMessage& aMessage);
3430 TBool DoGetRecordTimeAvailableL(TMMFMessage& aMessage);
3432 TBool DoGetSupportedSinkAudioTypesL(TMMFMessage& aMessage);
3433 TBool DoGetSupportedSinkVideoTypesL(TMMFMessage& aMessage);
3435 TInt32 DoCreateBufFromCDesC8ArrayL(CDesC8Array& aArray);
3436 TBool DoCopyCDesC8ArrayDataL(TMMFMessage& aMessage);
3438 TBool DoCopyFourCCArrayDataL(TMMFMessage& aMessage);
3439 void DoCreateBufFromFourCCArrayL(RArray<TFourCC>& aArray);
3440 TBool DoGetAudioEnabledL(TMMFMessage& aMessage); // (INC23777)
3444 The object that implements the video record controller interface
3446 MMMFVideoRecordControllerCustomCommandImplementor& iImplementor;
3447 CBufFlat* iDataCopyBuffer;
3456 Client class to allow the client to specify DRM Intent.
3458 The class uses the custom command function of the controller plugin, and removes the necessity
3459 for the client to formulate the custom commands.
3463 class RMMFVideoDRMExtCustomCommands : public RMMFCustomCommandsBase
3471 The client side controller object to be used by this custom command interface.
3475 IMPORT_C RMMFVideoDRMExtCustomCommands(RMMFController& aController);
3478 Gets a frame previously requested from the controller.
3481 The handle of bitmap to retrieve frame to.
3483 The DRM Intent to pass in.
3485 The active object to call back on.
3487 IMPORT_C void GetFrame(CFbsBitmap& aBitmap, ContentAccess::TIntent aIntent, TRequestStatus& aStatus);
3490 TPckgBuf<TMMFVideoConfig> iConfigPackage;
3491 TPckgBuf<ContentAccess::TIntent> iIntentPackage;
3500 Mixin class to be derived from controller plugins that could support the DRM Intent
3503 class MMMFVideoDRMExtCustomCommandImplementor
3508 Gets a frame previously requested from the controller.
3511 The callback interface to allow the caller to retrieve a bitmap.
3513 The DRM Intent to supply.
3515 virtual void MvdeGetFrameL(MMMFVideoFrameMessage& aVideoFrame, ContentAccess::TIntent aIntent)=0;
3523 Client class to provide DRM extensions to video controllers.
3525 The class uses the custom command function of the controller plugin, and removes the necessity
3526 for the client to formulate the custom commands.
3528 class CMMFVideoDRMExtCustomCommandParser : public CMMFCustomCommandParserBase
3533 Creates a new custom command parser capable of DRM Intent controller commands.
3536 A reference to the controller plugin that owns this new object.
3538 @return A pointer to the object created.
3542 IMPORT_C static CMMFVideoDRMExtCustomCommandParser* NewL(MMMFVideoDRMExtCustomCommandImplementor& aImplementor);
3549 IMPORT_C ~CMMFVideoDRMExtCustomCommandParser();
3552 Handles a request from the client. Called by the controller framework.
3555 The message to be handled.
3559 void HandleRequest(TMMFMessage& aMessage);
3566 A reference to the controller plugin that owns this new object.
3569 CMMFVideoDRMExtCustomCommandParser(MMMFVideoDRMExtCustomCommandImplementor& aImplementor);
3570 // Internal request handling methods.
3572 void DoGetFrameL(TMMFMessage& aMessage);
3575 MMMFVideoDRMExtCustomCommandImplementor& iImplementor;
3576 CMMFVideoFrameMessage* iVideoFrameMessage;
3583 Client class to allow the client to register notification .
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 RMMFResourceNotificationCustomCommands : public RMMFCustomCommandsBase
3597 The client side controller object to be used by this custom command interface.
3601 IMPORT_C RMMFResourceNotificationCustomCommands(RMMFController& aController);
3604 Registers the Event for Notification when resource is avaliable.
3607 The Event to notify the client.
3609 @param aNotificationRegistrationData
3610 Notification registration specific data.
3612 @return An error code indicating if the registration was successful. KErrNone on success,
3613 otherwise another of the system-wide error codes.
3615 IMPORT_C TInt RegisterAsClient(TUid aEventType,const TDesC8& aNotificationRegistrationData);
3618 Cancels the registered notification event.
3621 The Event to notify the client.
3623 @return An error code indicating if the cancel registration was successful. KErrNone on success,
3624 otherwise another of the system-wide error codes.
3626 IMPORT_C TInt CancelRegisterAsClient(TUid aEventType);
3629 Gets the notification data for the event.
3632 The Event to notify the client.
3634 @param aNotificationData
3635 The Notification data for the client to resume the play.
3637 @return An error code indicating if the get notification data was successful. KErrNone on success,
3638 otherwise another of the system-wide error codes.
3640 IMPORT_C TInt GetResourceNotificationData(TUid aEventType,TDes8& aNotificationData);
3643 Waits for the client to resume the play even after the default timer expires.
3645 @return An error code indicating if the registration was successful. KErrNone on success,
3646 otherwise any of the system-wide error codes.
3648 IMPORT_C TInt WillResumePlay();
3655 Mixin class to be derived from controller plugins that could support the audio resource notification
3658 class MMMFResourceNotificationCustomCommandImplementor
3662 Registers the Event for Notification when resource is available.
3665 The event which the client is notified of.
3667 @param aNotificationRegistrationData
3668 Notification registration specific data, which has been reserved for future use.
3670 @leave This method may leave with one of the system-wide error codes. KErrNotReady if there is no
3673 virtual void MarnRegisterAsClientL(TUid aEventType,const TDesC8& aNotificationRegistrationData) = 0;
3676 Cancels the registered notification event.
3679 The event to cancel.
3681 @leave This method may leave with one of the system-wide error codes. KErrNotReady if there is no
3684 virtual void MarnCancelRegisterAsClientL(TUid aEventType) = 0;
3687 Gets the notification data for the event.
3690 The event which the client is notified of.
3692 @param aNotificationData
3693 The Notification data for the client to resume playing.
3695 @leave This method may leave with one of the system-wide error codes. KErrNotReady if there is no
3696 data sink, KErrArgument if unable to provide the notification data.
3698 virtual void MarnGetResourceNotificationDataL(TUid aEventType,TDes8& aNotificationData) = 0;
3701 Waits for the client to resume the play even after the default timer expires.
3703 @leave This method may leave with one of the system-wide error codes. KErrNotReady if there is no
3706 virtual void MarnWillResumePlayL() = 0;
3713 Client class to provide Audio resource notification controllers.
3715 The class uses the custom command function of the controller plugin, and removes the necessity
3716 for the client to formulate the custom commands.
3718 class CMMFResourceNotificationCustomCommandParser: public CMMFCustomCommandParserBase
3722 Creates a new custom command parser capable of handling resource notification controller commands.
3725 A reference to the controller plugin that owns this new object.
3727 @return A pointer to the object created.
3731 IMPORT_C static CMMFResourceNotificationCustomCommandParser* NewL(MMMFResourceNotificationCustomCommandImplementor& aImplementor);
3738 IMPORT_C ~CMMFResourceNotificationCustomCommandParser();
3741 Handles a request from the client. Called by the controller framework.
3744 The message to be handled.
3748 void HandleRequest(TMMFMessage& aMessage);
3755 A reference to the controller plugin that owns this new object.
3759 CMMFResourceNotificationCustomCommandParser(MMMFResourceNotificationCustomCommandImplementor& aImplementor);
3760 void DoHandleRequestL(TMMFMessage& aMessage);
3761 // Internal request handling methods.
3762 TBool DoRegisterAsClientL(TMMFMessage& aMessage);
3763 TBool DoCancelRegisterAsClientL(TMMFMessage& aMessage);
3764 TBool DoGetResourceNotificationDataL(TMMFMessage& aMessage);
3765 TBool DoWillResumePlayL(TMMFMessage& aMessage);
3767 MMMFResourceNotificationCustomCommandImplementor& iImplementor;