williamr@2: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // 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 williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #ifndef __MMFSTANDARDCUSTOMCOMMANDS_H williamr@2: #define __MMFSTANDARDCUSTOMCOMMANDS_H williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: class CMMFVideoFrameMessage; williamr@2: class CFbsBitmap; williamr@2: class CDesC8Array; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: const TInt KPlaybackRateNormal = 1; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Balance value for centre williamr@2: */ williamr@2: const TInt KMMFBalanceCenter = 0; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Balance value for max left williamr@2: */ williamr@2: const TInt KMMFBalanceMaxLeft = -100; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Balance value for max right williamr@2: */ williamr@2: const TInt KMMFBalanceMaxRight = 100; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: const TInt KMMFVideoCurrentFrame = -1; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: enum TMMFDSAEvent williamr@2: { williamr@2: EAbortDSA, williamr@2: EResumeDSA williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Interface UID and messages for the Audio Resource Notification API. williamr@2: */ williamr@2: const TUid KMMFEventCategoryAudioResourceAvailable = {0x101FD9F2}; williamr@2: williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: enum TMMFAudioResourceNotificationMessages williamr@2: { williamr@2: EMMFAudioResourceRegisterNotification, williamr@2: EMMFAudioResourceCancelRegisterNotification, williamr@2: EMMFAudioResourceGetNotificationData, williamr@2: EMMFAudioResourceWillResumePlay williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Interface UID and messages for the Audio Play Device API. williamr@2: */ williamr@2: const TUid KUidInterfaceMMFAudioPlayDevice = {0x101F76D6}; williamr@2: williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: enum TMMFAudioPlayDeviceMessages williamr@2: { williamr@2: EMMFAudioPlayDeviceSetVolume, williamr@2: EMMFAudioPlayDeviceGetMaxVolume, williamr@2: EMMFAudioPlayDeviceGetVolume, williamr@2: EMMFAudioPlayDeviceSetVolumeRamp, williamr@2: EMMFAudioPlayDeviceSetBalance, williamr@2: EMMFAudioPlayDeviceGetBalance williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Interface UID and messages for the Audio Record Device API. williamr@2: */ williamr@2: const TUid KUidInterfaceMMFAudioRecordDevice = {0x101F76D7}; williamr@2: williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: enum TMMFAudioRecordDeviceMessage williamr@2: { williamr@2: EMMFAudioRecordDeviceSetGain, williamr@2: EMMFAudioRecordDeviceGetMaxGain, williamr@2: EMMFAudioRecordDeviceGetGain, williamr@2: EMMFAudioRecordDeviceSetBalance, williamr@2: EMMFAudioRecordDeviceGetBalance williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Interface UID and messages for the Audio Play Controller API. williamr@2: */ williamr@2: const TUid KUidInterfaceMMFAudioPlayController = {0x101F76D8}; williamr@2: williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: enum TMMFAudioPlayControllerMessages williamr@2: { williamr@2: EMMFAudioPlayControllerSetPlaybackWindow, williamr@2: EMMFAudioPlayControllerDeletePlaybackWindow, williamr@2: EMMFAudioPlayControllerGetLoadingProgress williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Interface UID and messages for the Audio Record Controller API. williamr@2: */ williamr@2: const TUid KUidInterfaceMMFAudioRecordController = {0x101F76D9}; williamr@2: williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: enum TMMFAudioRecordControllerMessages williamr@2: { williamr@2: EMMFAudioRecordControllerGetRecordTimeAvailable, williamr@2: EMMFAudioRecordControllerSetMaxDuration, williamr@2: EMMFAudioRecordControllerSetMaxFileSize, williamr@2: EMMFAudioRecordControllerCrop, williamr@2: EMMFAudioRecordControllerAddMetaDataEntry, williamr@2: EMMFAudioRecordControllerRemoveMetaDataEntry, williamr@2: EMMFAudioRecordControllerReplaceMetaDataEntry williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Interface UID and messages for the Audio Controller API. williamr@2: */ williamr@2: const TUid KUidInterfaceMMFAudioController = {0x101F76DA}; williamr@2: williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: enum TMMFAudioControllerMessages williamr@2: { williamr@2: EMMFAudioControllerSetSourceSampleRate, williamr@2: EMMFAudioControllerSetSourceNumChannels, williamr@2: EMMFAudioControllerSetSourceFormat, williamr@2: EMMFAudioControllerSetSourceBitRate, williamr@2: EMMFAudioControllerSetSourceDataType, williamr@2: EMMFAudioControllerSetSinkSampleRate, williamr@2: EMMFAudioControllerSetSinkNumChannels, williamr@2: EMMFAudioControllerSetSinkFormat, williamr@2: EMMFAudioControllerSetSinkBitRate, williamr@2: EMMFAudioControllerSetSinkDataType, williamr@2: EMMFAudioControllerGetSourceSampleRate, williamr@2: EMMFAudioControllerGetSourceBitRate, williamr@2: EMMFAudioControllerGetSourceNumChannels, williamr@2: EMMFAudioControllerGetSourceFormat, williamr@2: EMMFAudioControllerGetSourceDataType, williamr@2: EMMFAudioControllerGetSinkSampleRate, williamr@2: EMMFAudioControllerGetSinkBitRate, williamr@2: EMMFAudioControllerGetSinkNumChannels, williamr@2: EMMFAudioControllerGetSinkFormat, williamr@2: EMMFAudioControllerGetSinkDataType, williamr@2: EMMFAudioControllerGetSupportedSourceSampleRates, williamr@2: EMMFAudioControllerGetSupportedSourceBitRates, williamr@2: EMMFAudioControllerGetSupportedSourceNumChannels, williamr@2: EMMFAudioControllerGetSupportedSourceDataTypes, williamr@2: EMMFAudioControllerGetSupportedSinkSampleRates, williamr@2: EMMFAudioControllerGetSupportedSinkBitRates, williamr@2: EMMFAudioControllerGetSupportedSinkNumChannels, williamr@2: EMMFAudioControllerGetSupportedSinkDataTypes, williamr@2: EMMFAudioControllerCopyArrayData, williamr@2: EMMFAudioControllerSetCodec williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: const TUid KUidInterfaceMMFVideoController = {0x101F76DB}; williamr@2: williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: enum TMMFVideoControllerMessages williamr@2: { williamr@2: EMMFVideoControllerGetAudioCodec, williamr@2: EMMFVideoControllerGetVideoBitRate, williamr@2: EMMFVideoControllerGetAudioBitRate, williamr@2: EMMFVideoControllerGetVideoFrameSize, williamr@2: EMMFVideoControllerSetFrameRate, williamr@2: EMMFVideoControllerGetFrameRate, williamr@2: EMMFVideoControllerGetVideoMimeType williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: const TUid KUidInterfaceMMFVideoPlayController = {0x101F7B73}; williamr@2: williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: enum TMMFVideoPlayControllerMessages williamr@2: { williamr@2: EMMFVideoPlayControllerPrepare, williamr@2: EMMFVideoPlayControllerGetFrame, williamr@2: EMMFVideoPlayControllerSetDisplayWindow, williamr@2: EMMFVideoPlayControllerGetAudioEnabled, williamr@2: EMMFVideoPlayControllerUpdateDisplayRegion, williamr@2: EMMFVideoPlayControllerDSAEvent, williamr@2: EMMFVideoPlayControllerPlay, williamr@2: EMMFVideoPlayControllerRefreshFrame, williamr@2: EMMFVideoPlayControllerGetLoadingProgress, williamr@2: EMMFVideoPlayControllerSetRotation, williamr@2: EMMFVideoPlayControllerGetRotation, williamr@2: EMMFVideoPlayControllerSetScaleFactor, williamr@2: EMMFVideoPlayControllerGetScaleFactor, williamr@2: EMMFVideoPlayControllerSetCropRegion, williamr@2: EMMFVideoPlayControllerGetCropRegion williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: const TUid KUidInterfaceMMFVideoRecordController = {0x101F7B74}; williamr@2: williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: enum TMMFVideoRecordControllerMessages williamr@2: { williamr@2: EMMFVideoRecordControllerSetVideoFormat, williamr@2: EMMFVideoRecordControllerSetVideoCodec, williamr@2: EMMFVideoRecordControllerSetAudioCodec, williamr@2: EMMFVideoRecordControllerSetVideoBitRate, williamr@2: EMMFVideoRecordControllerSetAudioBitRate, williamr@2: EMMFVideoRecordControllerSetVideoFrameSize, williamr@2: EMMFVideoRecordControllerSetMaxFileSize, williamr@2: EMMFVideoRecordControllerAddMetaDataEntry, williamr@2: EMMFVideoRecordControllerRemoveMetaDataEntry, williamr@2: EMMFVideoRecordControllerReplaceMetaDataEntry, williamr@2: EMMFVideoRecordControllerSetAudioEnabled, williamr@2: EMMFVideoRecordControllerPrepare, williamr@2: EMMFVideoRecordControllerSetCameraHandle, williamr@2: EMMFVideoRecordControllerGetRecordTimeAvailable, williamr@2: EMMFVideoRecordControllerGetSupportedSinkAudioTypes, williamr@2: EMMFVideoRecordControllerGetSupportedSinkVideoTypes, williamr@2: EMMFVideoRecordControllerCopyDescriptorArrayData, williamr@2: EMMFVideoRecordControllerCopyFourCCArrayData, williamr@2: EMMFVideoRecordControllerGetAudioEnabled // INC23777 williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: const TUid KUidInterfaceMMFVideoDRMExt = {0x101F7C23}; williamr@2: williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: enum TMMFDRMIntentMessages williamr@2: { williamr@2: EMMFVideoDRMExtGetFrame williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Interface UID for the custom command that supports setting the initial screen for video on the controller. williamr@2: */ williamr@2: const TUid KUidInterfaceMMFVideoSetInitScreen = {0x102825F7}; williamr@2: williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: enum TMMFVideoScreenDeviceMessages williamr@2: { williamr@2: EMMFVideoSetInitScreenNumber williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @prototype williamr@2: */ williamr@2: const TUid KUidInterfaceMMFVideoPixelAspectRatio = {0x102831EF}; williamr@2: williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: enum TMMFVideoPixelAspectRatioMessages williamr@2: { williamr@2: EMMFVideoGetPixelAspectRatio, williamr@2: EMMFVideoSetPixelAspectRatio, williamr@2: EMMFVideoGetSupportedPixelAspectRatios, williamr@2: EMMFVideoPixelAspectRatioCopyArrayData williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @prototype williamr@2: */ williamr@2: const TUid KUidInterfaceMMFVideoAudioSamplingRateAndChannelConfig = {0x102831F0}; williamr@2: williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: enum TMMFVideoAudioSamplingRateAndChannelConfigMessages williamr@2: { williamr@2: EMMFVideoGetAudioChannels, williamr@2: EMMFVideoSetAudioChannels, williamr@2: EMMFVideoGetSupportedAudioChannels, williamr@2: EMMFVideoGetAudioSampleRate, williamr@2: EMMFVideoSetAudioSampleRate, williamr@2: EMMFVideoGetSupportedAudioSampleRates, williamr@2: EMMFVideoAudioSamplingRateAndChannelConfigCopyArrayData williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Client class to access Audio Play Device functionality. williamr@2: williamr@2: The class uses the custom command function of the controller plugin, and removes the necessity williamr@2: for the client to formulate the custom commands. williamr@2: @since 7.0s williamr@2: */ williamr@2: class RMMFAudioPlayDeviceCustomCommands : public RMMFCustomCommandsBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aController williamr@2: The client side controller object to be used by this custom command interface. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C RMMFAudioPlayDeviceCustomCommands(RMMFController& aController); williamr@2: williamr@2: /** williamr@2: Sets the volume of the sound device. williamr@2: williamr@2: @param aVolume williamr@2: The new volume. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetVolume(TInt aVolume) const; williamr@2: williamr@2: /** williamr@2: Gets the maximum volume supported by the sound device. williamr@2: williamr@2: @param aMaxVolume williamr@2: The maximum volume, filled in by the controller. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetMaxVolume(TInt& aMaxVolume) const; williamr@2: williamr@2: /** williamr@2: Gets the current playback volume. williamr@2: williamr@2: @param aVolume williamr@2: On return contains the current playback volume. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetVolume(TInt& aVolume) const; williamr@2: williamr@2: /** williamr@2: Sets a volume ramp. williamr@2: williamr@2: This will cause the sound device to start playing with zero volume, williamr@2: increasing the volume over aRampDuration microseconds. williamr@2: williamr@2: The volume ramp can be removed by setting the ramp duration to zero. williamr@2: williamr@2: @param aRampDuration williamr@2: The duration over which the volume is to be increased, in microseconds. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration) const; williamr@2: williamr@2: /** williamr@2: Sets the balance between the left and right stereo audio channels. williamr@2: williamr@2: @param aBalance williamr@2: Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be williamr@2: restored by using KMMFBalanceCenter. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetBalance(TInt aBalance) const; williamr@2: williamr@2: /** williamr@2: Gets the balance between the left and right stereo audio channels. williamr@2: williamr@2: @param aBalance williamr@2: The current balance, filled in by the controller. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetBalance(TInt& aBalance) const; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Mixin class to be derived from controller plugins that could support the audio play device williamr@2: custom commands. williamr@2: */ williamr@2: class MMMFAudioPlayDeviceCustomCommandImplementor williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Sets the volume of the sound device. williamr@2: williamr@2: This function can leave with one of the system-wide error codes. The request will be williamr@2: completed with the leave code. williamr@2: williamr@2: @param aVolume williamr@2: The new volume. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MapdSetVolumeL(TInt aVolume) = 0; williamr@2: williamr@2: /** williamr@2: Gets the maximum volume supported by the sound device. williamr@2: williamr@2: This function can leave with one of the system-wide error codes. The request will be williamr@2: completed with the leave code. williamr@2: williamr@2: @param aMaxVolume williamr@2: The maximum volume, to be filled in by the controller plugin. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MapdGetMaxVolumeL(TInt& aMaxVolume) = 0; williamr@2: williamr@2: /** williamr@2: Gets the current playback volume. williamr@2: williamr@2: This function can leave with one of the system-wide error codes. The request will be williamr@2: completed with the leave code. williamr@2: williamr@2: @param aVolume williamr@2: The volume, to be filled in by the controller. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MapdGetVolumeL(TInt& aVolume) = 0; williamr@2: williamr@2: /** williamr@2: Sets a volume ramp. williamr@2: williamr@2: This will cause the sound device to start playing with zero volume, williamr@2: increasing the volume over aRampDuration microseconds. williamr@2: williamr@2: The volume ramp can be removed by setting the ramp duration to zero. williamr@2: williamr@2: This function can leave with one of the system-wide error codes. The request will be williamr@2: completed with the leave code. williamr@2: williamr@2: @param aRampDuration williamr@2: The duration over which the volume is to be increased, in microseconds. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MapdSetVolumeRampL(const TTimeIntervalMicroSeconds& aRampDuration) = 0; williamr@2: williamr@2: /** williamr@2: Sets the balance between the left and right stereo audio channels. williamr@2: williamr@2: This function can leave with one of the system-wide error codes. The request will be williamr@2: completed with the leave code. williamr@2: williamr@2: @param aBalance williamr@2: Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be williamr@2: restored by using KMMFBalanceCenter. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MapdSetBalanceL(TInt aBalance) = 0; williamr@2: williamr@2: /** williamr@2: Gets the balance between the left and right stereo audio channels. williamr@2: williamr@2: This function can leave with one of the system-wide error codes. The request will be williamr@2: completed with the leave code. williamr@2: williamr@2: @param aBalance williamr@2: The current balance, filled in by the controller. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MapdGetBalanceL(TInt& aBalance) = 0; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Custom command parser class to be used by controller plugins wishing to support williamr@2: audio play device commands. williamr@2: williamr@2: The controller plugin must be derived from MMMFAudioPlayDeviceCustomCommandImplementor williamr@2: to use this class. williamr@2: williamr@2: The controller plugin should create an object of this type and add it to the list of custom williamr@2: command parsers in the controller framework. See the following example code for details. williamr@2: williamr@2: @code williamr@2: void CMMFAudioController::ConstructL() williamr@2: { williamr@2: // Construct custom command parsers williamr@2: CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this); williamr@2: CleanupStack::PushL(audPlayDevParser); williamr@2: AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework williamr@2: CleanupStack::Pop();//audPlayDevParser williamr@2: williamr@2: CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this); williamr@2: CleanupStack::PushL(audRecDevParser); williamr@2: AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework williamr@2: CleanupStack::Pop();//audRecDevParser williamr@2: williamr@2: etc. williamr@2: } williamr@2: @endcode williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: class CMMFAudioPlayDeviceCustomCommandParser : public CMMFCustomCommandParserBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Creates a new custom command parser capable of handling audio play device commands. williamr@2: williamr@2: This function may leave with one of the system-wide error codes. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @return A pointer to the object created. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C static CMMFAudioPlayDeviceCustomCommandParser* NewL(MMMFAudioPlayDeviceCustomCommandImplementor& aImplementor); williamr@2: williamr@2: /** williamr@2: Destructor. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C ~CMMFAudioPlayDeviceCustomCommandParser(); williamr@2: williamr@2: /** williamr@2: Handles a request from the client. Called by the controller framework. williamr@2: williamr@2: @param aMessage williamr@2: The message to be handled. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: void HandleRequest(TMMFMessage& aMessage); williamr@2: private: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: CMMFAudioPlayDeviceCustomCommandParser(MMMFAudioPlayDeviceCustomCommandImplementor& aImplementor); williamr@2: // Internal request handling methods. williamr@2: void DoHandleRequestL(TMMFMessage& aMessage); williamr@2: TBool DoSetVolumeL(TMMFMessage& aMessage); williamr@2: TBool DoGetMaxVolumeL(TMMFMessage& aMessage); williamr@2: TBool DoGetVolumeL(TMMFMessage& aMessage); williamr@2: TBool DoSetVolumeRampL(TMMFMessage& aMessage); williamr@2: TBool DoSetBalanceL(TMMFMessage& aMessage); williamr@2: TBool DoGetBalanceL(TMMFMessage& aMessage); williamr@2: private: williamr@2: /** The object that implements the audio play device interface */ williamr@2: MMMFAudioPlayDeviceCustomCommandImplementor& iImplementor; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Client class to access Audio Record Device functionality. williamr@2: williamr@2: The class uses the custom command function of the controller plugin, and removes the necessity williamr@2: for the client to formulate the custom commands. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: class RMMFAudioRecordDeviceCustomCommands : public RMMFCustomCommandsBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aController williamr@2: The client side controller object to be used by this custom command interface. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C RMMFAudioRecordDeviceCustomCommands(RMMFController& aController); williamr@2: williamr@2: /** williamr@2: Sets the gain of the sound device. williamr@2: williamr@2: @param aGain williamr@2: The new gain. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetGain(TInt aGain) const; williamr@2: williamr@2: /** williamr@2: Gets the maximum gain supported by the sound device. williamr@2: williamr@2: @param aMaxGain williamr@2: The maximum gain, filled in by the controller. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetMaxGain(TInt& aMaxGain) const; williamr@2: williamr@2: /** williamr@2: Gets the current recording gain. williamr@2: williamr@2: @param aGain williamr@2: The gain, filled in by the controller. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetGain(TInt& aGain) const; williamr@2: williamr@2: /** williamr@2: Sets the balance between the left and right stereo microphone channels. williamr@2: williamr@2: @param aBalance williamr@2: Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be williamr@2: restored by using KMMFBalanceCenter. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetBalance(TInt aBalance) const; williamr@2: williamr@2: /** williamr@2: Gets the balance between the left and right stereo microphone channels. williamr@2: williamr@2: @param aBalance williamr@2: The current balance, filled in by the controller. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetBalance(TInt& aBalance) const; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Mixin class to be derived from controller plugins that could support the audio record device williamr@2: custom commands. williamr@2: */ williamr@2: class MMMFAudioRecordDeviceCustomCommandImplementor williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Sets the gain of the sound device. williamr@2: williamr@2: This function can leave with one of the system-wide error codes. The request will be williamr@2: completed with the leave code. williamr@2: williamr@2: @param aGain williamr@2: The new gain. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MardSetGainL(TInt aGain) = 0; williamr@2: williamr@2: /** williamr@2: Gets the maximum gain supported by the sound device. williamr@2: williamr@2: This function can leave with one of the system-wide error codes. The request will be williamr@2: completed with the leave code. williamr@2: williamr@2: @param aMaxGain williamr@2: The maximum gain, to be filled in by the controller plugin. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MardGetMaxGainL(TInt& aMaxGain) = 0; williamr@2: williamr@2: /** williamr@2: Gets the current recording gain. williamr@2: williamr@2: This function can leave with one of the system-wide error codes. The request will be williamr@2: completed with the leave code. williamr@2: williamr@2: @param aGain williamr@2: The gain, to be filled in by the controller. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MardGetGainL(TInt& aGain) = 0; williamr@2: williamr@2: /** williamr@2: Sets the balance between the left and right stereo microphone channels. williamr@2: williamr@2: This function can leave with one of the system-wide error codes. The request will be williamr@2: completed with the leave code. williamr@2: williamr@2: @param aBalance williamr@2: Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be williamr@2: restored by using KMMFBalanceCenter. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MardSetBalanceL(TInt aBalance) = 0; williamr@2: williamr@2: /** williamr@2: Gets the balance between the left and right stereo microphone channels. williamr@2: williamr@2: This function can leave with one of the system-wide error codes. The request will be williamr@2: completed with the leave code. williamr@2: williamr@2: @param aBalance williamr@2: The current balance, filled in by the controller. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MardGetBalanceL(TInt& aBalance) = 0; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Custom command parser class to be used by controller plugins wishing to support williamr@2: audio record device commands. williamr@2: williamr@2: The controller plugin must be derived from MMMFAudioRecordDeviceCustomCommandImplementor williamr@2: to use this class. williamr@2: williamr@2: The controller plugin should create an object of this type and add it to the list of custom williamr@2: command parsers in the controller framework. See the following example code for details. williamr@2: williamr@2: @code williamr@2: void CMMFAudioController::ConstructL() williamr@2: { williamr@2: // Construct custom command parsers williamr@2: CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this); williamr@2: CleanupStack::PushL(audPlayDevParser); williamr@2: AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework williamr@2: CleanupStack::Pop();//audPlayDevParser williamr@2: williamr@2: CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this); williamr@2: CleanupStack::PushL(audRecDevParser); williamr@2: AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework williamr@2: CleanupStack::Pop();//audRecDevParser williamr@2: williamr@2: etc. williamr@2: } williamr@2: @endcode williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: class CMMFAudioRecordDeviceCustomCommandParser : public CMMFCustomCommandParserBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Creates a new custom command parser capable of handling audio record device commands. williamr@2: williamr@2: This function may leave with one of the system-wide error codes. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @return A pointer to the object created. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C static CMMFAudioRecordDeviceCustomCommandParser* NewL(MMMFAudioRecordDeviceCustomCommandImplementor& aImplementor); williamr@2: williamr@2: /** williamr@2: Destructor. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C ~CMMFAudioRecordDeviceCustomCommandParser(); williamr@2: williamr@2: /** williamr@2: Handles a request from the client. Called by the controller framework. williamr@2: williamr@2: @param aMessage williamr@2: The message to be handled. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: void HandleRequest(TMMFMessage& aMessage); williamr@2: private: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: CMMFAudioRecordDeviceCustomCommandParser(MMMFAudioRecordDeviceCustomCommandImplementor& aImplementor); williamr@2: // Internal request handling methods. williamr@2: void DoHandleRequestL(TMMFMessage& aMessage); williamr@2: TBool DoSetGainL(TMMFMessage& aMessage); williamr@2: TBool DoGetMaxGainL(TMMFMessage& aMessage); williamr@2: TBool DoGetGainL(TMMFMessage& aMessage); williamr@2: TBool DoSetBalanceL(TMMFMessage& aMessage); williamr@2: TBool DoGetBalanceL(TMMFMessage& aMessage); williamr@2: private: williamr@2: /** The object that implements the audio record device interface */ williamr@2: MMMFAudioRecordDeviceCustomCommandImplementor& iImplementor; williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Client class to access functionality specific to an audio play controller. williamr@2: williamr@2: The class uses the custom command function of the controller plugin, and removes the necessity williamr@2: for the client to formulate the custom commands. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: class RMMFAudioPlayControllerCustomCommands : public RMMFCustomCommandsBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aController williamr@2: The client side controller object to be used by this custom command interface. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C RMMFAudioPlayControllerCustomCommands(RMMFController& aController); williamr@2: williamr@2: /** williamr@2: Sets a playback window. The controller will start playing from the start of the window, williamr@2: and finish playing at the end of the window. williamr@2: williamr@2: @param aStart williamr@2: The start of the window, in microseconds. williamr@2: @param aEnd williamr@2: The end of the window, in microseconds. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetPlaybackWindow(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) const; williamr@2: williamr@2: /** williamr@2: Removes a previously defined playback window. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt DeletePlaybackWindow(); williamr@2: williamr@2: /** williamr@2: Gets the audio loading progress as a percentage. williamr@2: williamr@2: @param aPercentageProgress williamr@2: The progress loading the clip, as a percentage. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetLoadingProgress(TInt& aPercentageProgress) const; williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Mixin class to be derived from controller plugins that could support the audio play controller williamr@2: custom commands. williamr@2: */ williamr@2: class MMMFAudioPlayControllerCustomCommandImplementor williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Sets a playback window. The controller will start playing from the start of the window, williamr@2: and finish playing at the end of the window. williamr@2: williamr@2: This function can leave with one of the system-wide error codes. The request will be williamr@2: completed with the leave code. williamr@2: williamr@2: @param aStart williamr@2: The start of the window, in microseconds. williamr@2: @param aEnd williamr@2: The end of the window, in microseconds. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MapcSetPlaybackWindowL(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) = 0; williamr@2: williamr@2: /** williamr@2: Removes a previously defined playback window. williamr@2: williamr@2: This function can leave with one of the system-wide error codes. The request will be williamr@2: completed with the leave code. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MapcDeletePlaybackWindowL() = 0; williamr@2: williamr@2: /** williamr@2: Gets the completion status of loading/rebuffering the current audio clip. williamr@2: williamr@2: This function can leave with one of the system-wide error codes. The request will be williamr@2: completed with the leave code. williamr@2: williamr@2: @param aPercentageComplete williamr@2: The status of loading as a percentage completed. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MapcGetLoadingProgressL(TInt& aPercentageComplete) = 0; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Custom command parser class to be used by controller plugins wishing to support williamr@2: audio play controller commands. williamr@2: williamr@2: The controller plugin must be derived from MMMFAudioPlayControllerCustomCommandImplementor to use williamr@2: this class. williamr@2: williamr@2: The controller plugin should create an object of this type and add it to the list of custom williamr@2: command parsers in the controller framework. See the following example code for details. williamr@2: williamr@2: @code williamr@2: void CMMFAudioController::ConstructL() williamr@2: { williamr@2: // Construct custom command parsers williamr@2: CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this); williamr@2: CleanupStack::PushL(audPlayDevParser); williamr@2: AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework williamr@2: CleanupStack::Pop();//audPlayDevParser williamr@2: williamr@2: CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this); williamr@2: CleanupStack::PushL(audRecDevParser); williamr@2: AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework williamr@2: CleanupStack::Pop();//audRecDevParser williamr@2: williamr@2: etc. williamr@2: } williamr@2: @endcode williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: class CMMFAudioPlayControllerCustomCommandParser : public CMMFCustomCommandParserBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Creates a new custom command parser capable of handling audio play controller commands. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @return A pointer to the object created. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C static CMMFAudioPlayControllerCustomCommandParser* NewL(MMMFAudioPlayControllerCustomCommandImplementor& aImplementor); williamr@2: williamr@2: /** williamr@2: Destructor. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C ~CMMFAudioPlayControllerCustomCommandParser(); williamr@2: williamr@2: /** williamr@2: Handles a request from the client. Called by the controller framework. williamr@2: williamr@2: @param aMessage williamr@2: The message to be handled. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: void HandleRequest(TMMFMessage& aMessage); williamr@2: private: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: CMMFAudioPlayControllerCustomCommandParser(MMMFAudioPlayControllerCustomCommandImplementor& aImplementor); williamr@2: // Internal request handling methods. williamr@2: void DoHandleRequestL(TMMFMessage& aMessage); williamr@2: TBool DoSetPlaybackWindowL(TMMFMessage& aMessage); williamr@2: TBool DoDeletePlaybackWindowL(TMMFMessage& aMessage); williamr@2: TBool DoGetLoadingProgressL(TMMFMessage& aMessage); williamr@2: private: williamr@2: /** williamr@2: The object that implements the audio play controller interface williamr@2: */ williamr@2: MMMFAudioPlayControllerCustomCommandImplementor& iImplementor; williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Client class to access functionality specific to an audio record controller. williamr@2: williamr@2: The class uses the custom command function of the controller plugin, and removes the necessity williamr@2: for the client to formulate the custom commands. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: class RMMFAudioRecordControllerCustomCommands : public RMMFCustomCommandsBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aController williamr@2: The client side controller object to be used by this custom command interface. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C RMMFAudioRecordControllerCustomCommands(RMMFController& aController); williamr@2: williamr@2: /** williamr@2: Gets the (possibly estimated) record time left in the clip. williamr@2: williamr@2: @param aTime williamr@2: The record time available, in microseconds. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetRecordTimeAvailable(TTimeIntervalMicroSeconds& aTime) const; williamr@2: williamr@2: /** williamr@2: Sets the maximum duration of the recorded clip, in microseconds. williamr@2: williamr@2: @param aMaxDuration williamr@2: The maximum duration of the recorded clip, in microseconds. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetMaxDuration(const TTimeIntervalMicroSeconds& aMaxDuration) const; williamr@2: williamr@2: /** williamr@2: Sets the maximum size of the recorded clip, in bytes. williamr@2: williamr@2: @param aMaxSize williamr@2: The maximum size of the recorded clip, in bytes. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetMaxFileSize(TInt aMaxSize) const; williamr@2: williamr@2: /** williamr@2: Removes a portion from the clip, either from the current position to the beginning or the williamr@2: current position to the end. williamr@2: williamr@2: @param aToEnd williamr@2: A boolean indicating whether to crop to the end. Crops to the end if set to ETrue, to williamr@2: the beginning set to EFalse. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt Crop(TBool aToEnd); williamr@2: williamr@2: /** williamr@2: Adds meta data to the clip. williamr@2: williamr@2: @param aNewEntry williamr@2: The details of the new entry to be added. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C void AddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry); williamr@2: williamr@2: /** williamr@2: Removes a meta data entry from the clip. williamr@2: williamr@2: @param aIndex williamr@2: The ID of the meta data entry to delete. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt RemoveMetaDataEntry(TInt aIndex); williamr@2: williamr@2: /** williamr@2: Replaces a meta data in the clip. williamr@2: williamr@2: @param aIndex williamr@2: The ID of the meta data entry to replace. williamr@2: @param aNewEntry williamr@2: The details of the new entry to be added. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C void ReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry); williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Mixin class to be derived from controller plugins that could support the audio record controller williamr@2: custom commands. williamr@2: */ williamr@2: class MMMFAudioRecordControllerCustomCommandImplementor williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Gets the (possibly estimated) record time left in the clip. williamr@2: williamr@2: This function can leave with one of the system-wide error codes. The request will be williamr@2: completed with the leave code. williamr@2: williamr@2: @param aTime williamr@2: The record time available, in microseconds. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MarcGetRecordTimeAvailableL(TTimeIntervalMicroSeconds& aTime) = 0; williamr@2: williamr@2: /** williamr@2: Sets the maximum duration of the recorded clip, in microseconds. williamr@2: williamr@2: This function can leave with one of the system-wide error codes. The request will be williamr@2: completed with the leave code. williamr@2: williamr@2: @param aMaxDuration williamr@2: The maximum duration of the recorded clip, in microseconds. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MarcSetMaxDurationL(const TTimeIntervalMicroSeconds& aMaxDuration) = 0; williamr@2: williamr@2: /** williamr@2: Sets the maximum size of the recorded clip, in bytes. williamr@2: williamr@2: This function can leave with one of the system-wide error codes. The request will be williamr@2: completed with the leave code. williamr@2: williamr@2: @param aMaxSize williamr@2: The maximum size of the recorded clip, in bytes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MarcSetMaxFileSizeL(TInt aMaxSize) = 0; williamr@2: williamr@2: /** williamr@2: Removes a portion from the clip, either from the current position to the beginning williamr@2: or the current position to the end. williamr@2: williamr@2: This function can leave with one of the system-wide error codes. The request will be williamr@2: completed with the leave code. williamr@2: williamr@2: @param aToEnd williamr@2: A boolean indicating whether to crop to the end or the beginning. ETrue to crop to the williamr@2: end, EFalse to the beginning. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MarcCropL(TBool aToEnd) = 0; williamr@2: williamr@2: /** williamr@2: Adds meta data to the clip. williamr@2: williamr@2: @param aNewEntry williamr@2: The details of the new entry to be added. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MarcAddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry) = 0; williamr@2: williamr@2: /** williamr@2: Removes a meta data entry from the clip. williamr@2: williamr@2: @param aIndex williamr@2: The ID of the meta data entry to delete. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MarcRemoveMetaDataEntryL(TInt aIndex) = 0; williamr@2: williamr@2: /** williamr@2: Replaces a meta data entry in the clip. williamr@2: williamr@2: @param aIndex williamr@2: The ID of the meta data entry to replace. williamr@2: @param aNewEntry williamr@2: The details of the new entry to be added. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MarcReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry) = 0; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Custom command parser class to be used by controller plugins wishing to support williamr@2: audio record controller commands. williamr@2: williamr@2: The controller plugin must be derived from MMMFAudioRecordControllerCustomCommandImplementor williamr@2: to use this class. williamr@2: williamr@2: The controller plugin should create an object of this type and add it to the list of custom williamr@2: command parsers in the controller framework. See the following example code for details. williamr@2: williamr@2: @code williamr@2: void CMMFAudioController::ConstructL() williamr@2: { williamr@2: // Construct custom command parsers williamr@2: CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this); williamr@2: CleanupStack::PushL(audPlayDevParser); williamr@2: AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework williamr@2: CleanupStack::Pop();//audPlayDevParser williamr@2: williamr@2: CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this); williamr@2: CleanupStack::PushL(audRecDevParser); williamr@2: AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework williamr@2: CleanupStack::Pop();//audRecDevParser williamr@2: williamr@2: etc. williamr@2: } williamr@2: @endcode williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: class CMMFAudioRecordControllerCustomCommandParser : public CMMFCustomCommandParserBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Creates a new custom command parser capable of handling audio record controller commands. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @return A pointer to the object created. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C static CMMFAudioRecordControllerCustomCommandParser* NewL(MMMFAudioRecordControllerCustomCommandImplementor& aImplementor); williamr@2: williamr@2: /** williamr@2: Destructor. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C ~CMMFAudioRecordControllerCustomCommandParser(); williamr@2: williamr@2: /** williamr@2: Handles a request from the client. Called by the controller framework. williamr@2: williamr@2: @param aMessage williamr@2: The message to be handled. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: void HandleRequest(TMMFMessage& aMessage); williamr@2: private: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: CMMFAudioRecordControllerCustomCommandParser(MMMFAudioRecordControllerCustomCommandImplementor& aImplementor); williamr@2: // Internal request handling methods. williamr@2: void DoHandleRequestL(TMMFMessage& aMessage); williamr@2: TBool DoGetRecordTimeAvailableL(TMMFMessage& aMessage); williamr@2: TBool DoSetMaxDurationL(TMMFMessage& aMessage); williamr@2: TBool DoSetMaxFileSizeL(TMMFMessage& aMessage); williamr@2: TBool DoCropL(TMMFMessage& aMessage); williamr@2: TBool DoAddMetaDataEntryL(TMMFMessage& aMessage); williamr@2: TBool DoRemoveMetaDataEntryL(TMMFMessage& aMessage); williamr@2: TBool DoReplaceMetaDataEntryL(TMMFMessage& aMessage); williamr@2: private: williamr@2: /** williamr@2: The object that implements the audio record controller interface. williamr@2: */ williamr@2: MMMFAudioRecordControllerCustomCommandImplementor& iImplementor; williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Client class to access functionality specific to an audio controller. williamr@2: williamr@2: The class uses the custom command function of the controller plugin, and removes the necessity williamr@2: for the client to formulate the custom commands. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: class RMMFAudioControllerCustomCommands : public RMMFCustomCommandsBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aController williamr@2: The client side controller object to be used by this custom command williamr@2: interface. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C RMMFAudioControllerCustomCommands(RMMFController& aController); williamr@2: williamr@2: /** williamr@2: Sets the sample rate of the data source in samples per second. williamr@2: williamr@2: @param aSampleRate williamr@2: The sample rate, in samples per second. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetSourceSampleRate(TUint aSampleRate) const; williamr@2: williamr@2: /** williamr@2: Sets the bit rate of the data source in bits per second. williamr@2: williamr@2: @param aRate williamr@2: The bit rate, in bits per second. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetSourceBitRate(TUint aRate) const; williamr@2: williamr@2: /** williamr@2: Sets the number of channels in the data source. For example, one channel for mono, two channels williamr@2: for stereo etc. williamr@2: williamr@2: @param aNumChannels williamr@2: The number of channels. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetSourceNumChannels(TUint aNumChannels) const; williamr@2: williamr@2: /** williamr@2: Sets the format of the data source. williamr@2: williamr@2: The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin to be used. williamr@2: williamr@2: @param aFormatUid williamr@2: The format plugin to be used. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetSourceFormat(TUid aFormatUid) const; williamr@2: williamr@2: /** williamr@2: Sets the fourCC code of the source. williamr@2: williamr@2: @param aDataType williamr@2: The fourCC code. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetSourceDataType(TFourCC aDataType) const; williamr@2: williamr@2: /** williamr@2: Sets the sample rate of the data sink in samples per second. williamr@2: williamr@2: @param aSampleRate williamr@2: The sample rate, in samples per second. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetSinkSampleRate(TUint aSampleRate) const; williamr@2: williamr@2: /** williamr@2: Set the bit rate of the data sink in bits per second. williamr@2: williamr@2: @param aRate williamr@2: The bit rate, in bits per second. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetSinkBitRate(TUint aRate) const; williamr@2: williamr@2: /** williamr@2: Sets the number of channels in the data sink. For example, one channel for mono, two channels williamr@2: for stereo etc. williamr@2: williamr@2: @param aNumChannels williamr@2: The number of channels. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetSinkNumChannels(TUint aNumChannels) const; williamr@2: williamr@2: /** williamr@2: Sets the format of the data sink. williamr@2: williamr@2: The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin to be used. williamr@2: williamr@2: @param aFormatUid williamr@2: The format plugin to be used. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetSinkFormat(TUid aFormatUid) const; williamr@2: williamr@2: /** williamr@2: Set the fourCC code of the sink. williamr@2: williamr@2: @param aDataType williamr@2: The fourCC code. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetSinkDataType(TFourCC aDataType) const; williamr@2: williamr@2: /** williamr@2: Sets the codec to be used. Useful when recording data. williamr@2: williamr@2: @param aSourceDataType williamr@2: The data type of the source of the codec. williamr@2: @param aSinkDataType williamr@2: The data type of the sink of the codec. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetCodec(TFourCC aSourceDataType, TFourCC aSinkDataType) const; williamr@2: williamr@2: /** williamr@2: Gets the sample rate of the data source in samples per second. williamr@2: williamr@2: @param aRate williamr@2: The sample rate, in samples per second. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetSourceSampleRate(TUint& aRate) const; williamr@2: williamr@2: /** williamr@2: Gets the bit rate of the data source in bits per second. williamr@2: williamr@2: @param aRate williamr@2: The bit rate, in bits per second. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetSourceBitRate(TUint& aRate) const; williamr@2: williamr@2: /** williamr@2: Gets the number of channels in the data source. For example, one channel for mono, two channels williamr@2: for stereo etc. williamr@2: williamr@2: @param aNumChannels williamr@2: The number of channels. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetSourceNumChannels(TUint& aNumChannels) const; williamr@2: williamr@2: /** williamr@2: Gets the format of the data source. williamr@2: williamr@2: The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin being used. williamr@2: williamr@2: @param aFormat williamr@2: The format plugin being used. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetSourceFormat(TUid& aFormat) const; williamr@2: williamr@2: /** williamr@2: Get the fourCC code of the source. williamr@2: williamr@2: @param aDataType williamr@2: The fourCC code. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetSourceDataType(TFourCC& aDataType) const; williamr@2: williamr@2: /** williamr@2: Gets the sample rate of the data sink in samples per second. williamr@2: williamr@2: @param aRate williamr@2: The sample rate, in samples per second. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetSinkSampleRate(TUint& aRate) const; williamr@2: williamr@2: /** williamr@2: Gets the bit rate of the data sink in bits per second. williamr@2: williamr@2: @param aRate williamr@2: The bit rate, in bits per second. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetSinkBitRate(TUint& aRate) const; williamr@2: williamr@2: /** williamr@2: Gets the number of channels in the data sink. For example, one channel for mono, two channels williamr@2: for stereo etc. williamr@2: williamr@2: @param aNumChannels williamr@2: The number of channels. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetSinkNumChannels(TUint& aNumChannels) const; williamr@2: williamr@2: /** williamr@2: Gets the format of the data sink. williamr@2: williamr@2: The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin being used. williamr@2: williamr@2: @param aFormat williamr@2: The format plugin being used. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetSinkFormat(TUid& aFormat) const; williamr@2: williamr@2: /** williamr@2: Gets the fourCC code of the sink. williamr@2: williamr@2: @param aDataType williamr@2: The fourCC code. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetSinkDataType(TFourCC& aDataType) const; williamr@2: williamr@2: /** williamr@2: Gets the list of sample rates supported by the data source. williamr@2: williamr@2: Warning: Existing objects in this array will be removed by this function. williamr@2: williamr@2: @param aSupportedRates williamr@2: The supported rates. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C void GetSupportedSourceSampleRatesL(RArray& aSupportedRates) const; williamr@2: williamr@2: /** williamr@2: Gets the list of bit rates supported by the data source. williamr@2: williamr@2: Warning: Existing objects in this array will be removed by this function. williamr@2: williamr@2: @param aSupportedRates williamr@2: The supported rates. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C void GetSupportedSourceBitRatesL(RArray& aSupportedRates) const; williamr@2: williamr@2: /** williamr@2: Gets the list of channels supported by the data source (ie mono, stereo etc). williamr@2: williamr@2: Warning: Existing objects in this array will be removed by this method. williamr@2: williamr@2: @param aSupportedChannels williamr@2: The supported channels. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C void GetSupportedSourceNumChannelsL(RArray& aSupportedChannels) const; williamr@2: williamr@2: /** williamr@2: Gets the list of fourCC codes supported by the data source. williamr@2: williamr@2: Warning: Existing objects in this array will be removed by this method. williamr@2: williamr@2: @param aSupportedDataTypes williamr@2: The supported data types. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C void GetSupportedSourceDataTypesL(RArray& aSupportedDataTypes) const; williamr@2: williamr@2: /** williamr@2: Gets the list of sample rates supported by the data sink. williamr@2: williamr@2: Warning: Existing objects in this array will be removed by this method. williamr@2: williamr@2: @param aSupportedRates williamr@2: The supported rates. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C void GetSupportedSinkSampleRatesL(RArray& aSupportedRates) const; williamr@2: williamr@2: /** williamr@2: Gets the list of bit rates supported by the data sink. williamr@2: williamr@2: Warning: Existing objects in this array will be removed by this method. williamr@2: williamr@2: @param aSupportedRates williamr@2: The supported rates. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C void GetSupportedSinkBitRatesL(RArray& aSupportedRates) const; williamr@2: williamr@2: /** williamr@2: Gets the list of channels supported by the data sink (ie mono, stereo etc). williamr@2: williamr@2: Warning: Existing objects in this array will be removed by this method. williamr@2: williamr@2: @param aSupportedChannels williamr@2: The supported channels. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C void GetSupportedSinkNumChannelsL(RArray& aSupportedChannels) const; williamr@2: williamr@2: /** williamr@2: Gets the list of fourCC codes supported by the data sink. williamr@2: williamr@2: Warning: Existing objects in this array will be removed by this method. williamr@2: williamr@2: @param aSupportedDataTypes williamr@2: The supported data types. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C void GetSupportedSinkDataTypesL(RArray& aSupportedDataTypes) const; williamr@2: williamr@2: private: williamr@2: void DoGetUintArrayL(RArray& aArray, TMMFAudioControllerMessages aIpc) const; williamr@2: void DoGetFourCCArrayL(RArray& aArray, TMMFAudioControllerMessages aIpc) const; williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Mixin class to be derived from controller plugins that could support the audio record controller williamr@2: custom commands. williamr@2: */ williamr@2: class MMMFAudioControllerCustomCommandImplementor williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Sets the sample rate of the data source in samples per second. williamr@2: williamr@2: @param aSampleRate williamr@2: The sample rate, in samples per second. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacSetSourceSampleRateL(TUint aSampleRate) = 0; williamr@2: williamr@2: /** williamr@2: Sets the bit rate of the data source in bits per second. williamr@2: williamr@2: @param aBitRate williamr@2: The bit rate, in bits per second. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacSetSourceBitRateL(TUint aBitRate) = 0; williamr@2: williamr@2: /** williamr@2: Sets the number of channels in the data source. For example, one channel for mono, two channels williamr@2: for stereo etc. williamr@2: williamr@2: @param aNumChannels williamr@2: The number of channels. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacSetSourceNumChannelsL(TUint aNumChannels) = 0; williamr@2: williamr@2: /** williamr@2: Sets the format of the data source. The UID corresponds to the UID of the CMMFFormat-derived williamr@2: ECOM plugin to be used. williamr@2: williamr@2: @param aFormatUid williamr@2: The format plugin to be used. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacSetSourceFormatL(TUid aFormatUid) = 0; williamr@2: williamr@2: /** williamr@2: Sets the fourCC code of the source. williamr@2: williamr@2: @param aDataType williamr@2: The fourCC code. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacSetSourceDataTypeL(TFourCC aDataType) = 0; williamr@2: williamr@2: /** williamr@2: Sets the sample rate of the data sink in samples per second. williamr@2: williamr@2: @param aSampleRate williamr@2: The sample rate, in samples per second. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacSetSinkSampleRateL(TUint aSampleRate) = 0; williamr@2: williamr@2: /** williamr@2: Sets the bit rate of the data sink in bits per second. williamr@2: williamr@2: @param aRate williamr@2: The bit rate, in bits per second. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacSetSinkBitRateL(TUint aRate) = 0; williamr@2: williamr@2: /** williamr@2: Sets the number of channels in the data sink. For example, one channel for mono, two channels williamr@2: for stereo etc. williamr@2: williamr@2: @param aNumChannels williamr@2: The number of channels. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacSetSinkNumChannelsL(TUint aNumChannels) = 0; williamr@2: williamr@2: /** williamr@2: Sets the format of the data sink. The UID corresponds to the uid of the CMMFFormat-derived ECOM williamr@2: plugin to be used. williamr@2: williamr@2: @param aFormatUid williamr@2: The format plugin to be used. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacSetSinkFormatL(TUid aFormatUid) = 0; williamr@2: williamr@2: /** williamr@2: Sets the fourCC code of the sink. williamr@2: williamr@2: @param aDataType williamr@2: The fourCC code. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacSetSinkDataTypeL(TFourCC aDataType) = 0; williamr@2: williamr@2: /** williamr@2: Sets the codec to be used. Useful when recording data. williamr@2: williamr@2: @param aSourceDataType williamr@2: The data type of the source of the codec. williamr@2: @param aSinkDataType williamr@2: The data type of the sink of the codec. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacSetCodecL(TFourCC aSourceDataType, TFourCC aSinkDataType) = 0; williamr@2: williamr@2: williamr@2: /** williamr@2: Gets the sample rate of the data source in samples per second. williamr@2: williamr@2: @param aRate williamr@2: The sample rate, in samples per second. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacGetSourceSampleRateL(TUint& aRate) = 0; williamr@2: williamr@2: /** williamr@2: Gets the bit rate of the data source in bits per second. williamr@2: williamr@2: @param aRate williamr@2: The bit rate, in bits per second. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacGetSourceBitRateL(TUint& aRate) = 0; williamr@2: williamr@2: /** williamr@2: Gets the number of channels in the data source. For example, one channel for mono, two channels williamr@2: for stereo etc. williamr@2: williamr@2: @param aNumChannels williamr@2: The number of channels. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacGetSourceNumChannelsL(TUint& aNumChannels) = 0; williamr@2: williamr@2: /** williamr@2: Gets the format of the data source. The UID corresponds to the uid of the CMMFFormat-derived williamr@2: ECOM plugin being used. williamr@2: williamr@2: @param aFormat williamr@2: The format plugin being used. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacGetSourceFormatL(TUid& aFormat) = 0; williamr@2: williamr@2: /** williamr@2: Gets the fourCC code of the source. williamr@2: williamr@2: @param aDataType williamr@2: The fourCC code. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacGetSourceDataTypeL(TFourCC& aDataType) = 0; williamr@2: williamr@2: /** williamr@2: Gets the sample rate of the data sink in samples per second. williamr@2: williamr@2: @param aRate williamr@2: The sample rate, in samples per second. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacGetSinkSampleRateL(TUint& aRate) = 0; williamr@2: williamr@2: /** williamr@2: Gets the bit rate of the data sink in bits per second. williamr@2: williamr@2: @param aRate williamr@2: The bit rate, in bits per second. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacGetSinkBitRateL(TUint& aRate) = 0; williamr@2: williamr@2: /** williamr@2: Gets the number of channels in the data sink. For example, one channel for mono, two channels williamr@2: for stereo etc. williamr@2: williamr@2: @param aNumChannels williamr@2: The number of channels. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacGetSinkNumChannelsL(TUint& aNumChannels) = 0; williamr@2: williamr@2: /** williamr@2: Gets the format of the data sink. The UID corresponds to the uid of the CMMFFormat-derived ECOM williamr@2: plugin being used. williamr@2: williamr@2: @param aFormat williamr@2: The format plugin being used. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacGetSinkFormatL(TUid& aFormat) = 0; williamr@2: williamr@2: /** williamr@2: Gets the fourCC code of the sink. williamr@2: williamr@2: @param aDataType williamr@2: The fourCC code. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacGetSinkDataTypeL(TFourCC& aDataType) = 0; williamr@2: williamr@2: /** williamr@2: Gets the list of sample rates supported by the data source. williamr@2: williamr@2: @param aSupportedRates williamr@2: The supported rates. Warning: Existing objects in this array will be removed by this method. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacGetSupportedSourceSampleRatesL(RArray& aSupportedRates) = 0; williamr@2: williamr@2: /** williamr@2: Gets the list of bit rates supported by the data source. williamr@2: williamr@2: Warning: Existing objects in this array will be removed by this method. williamr@2: williamr@2: @param aSupportedRates williamr@2: The supported rates. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacGetSupportedSourceBitRatesL(RArray& aSupportedRates) = 0; williamr@2: williamr@2: /** williamr@2: Gets the list of channels supported by the data source (ie mono, stereo etc). williamr@2: williamr@2: Warning: Existing objects in this array will be removed by this method. williamr@2: williamr@2: @param aSupportedChannels williamr@2: The supported channels. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacGetSupportedSourceNumChannelsL(RArray& aSupportedChannels) = 0; williamr@2: williamr@2: /** williamr@2: Gets the list of fourCC codes supported by the data source. williamr@2: williamr@2: Warning: Existing objects in this array will be removed by this method. williamr@2: williamr@2: @param aSupportedDataTypes williamr@2: The supported data types. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacGetSupportedSourceDataTypesL(RArray& aSupportedDataTypes) = 0; williamr@2: williamr@2: /** williamr@2: Gets the list of sample rates supported by the data sink. williamr@2: williamr@2: Warning: Existing objects in this array will be removed by this method. williamr@2: williamr@2: @param aSupportedRates williamr@2: The supported rates. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacGetSupportedSinkSampleRatesL(RArray& aSupportedRates) = 0; williamr@2: williamr@2: /** williamr@2: Gets the list of bit rates supported by the data sink. williamr@2: williamr@2: Warning: Existing objects in this array will be removed by this method. williamr@2: williamr@2: @param aSupportedRates williamr@2: The supported rates. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacGetSupportedSinkBitRatesL(RArray& aSupportedRates) = 0; williamr@2: williamr@2: /** williamr@2: Gets the list of channels supported by the data sink (ie mono, stereo etc). williamr@2: williamr@2: Warning: Existing objects in this array will be removed by this method. williamr@2: williamr@2: @param aSupportedChannels williamr@2: The supported channels. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacGetSupportedSinkNumChannelsL(RArray& aSupportedChannels) = 0; williamr@2: williamr@2: /** williamr@2: Gets the list of fourCC codes supported by the data sink. williamr@2: williamr@2: Warning: Existing objects in this array will be removed by this method. williamr@2: williamr@2: @param aSupportedDataTypes williamr@2: The supported data types. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MacGetSupportedSinkDataTypesL(RArray& aSupportedDataTypes) = 0; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Custom command parser class to be used by controller plugins wishing to support williamr@2: audio controller commands. williamr@2: williamr@2: The controller plugin must be derived from MMMFAudioControllerCustomCommandImplementor williamr@2: to use this class. williamr@2: williamr@2: The controller plugin should create an object of this type and add it to the list of custom williamr@2: command parsers in the controller framework. See the following example code for details. williamr@2: williamr@2: @code williamr@2: void CMMFAudioController::ConstructL() williamr@2: { williamr@2: // Construct custom command parsers williamr@2: CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this); williamr@2: CleanupStack::PushL(audPlayDevParser); williamr@2: AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework williamr@2: CleanupStack::Pop();//audPlayDevParser williamr@2: williamr@2: CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this); williamr@2: CleanupStack::PushL(audRecDevParser); williamr@2: AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework williamr@2: CleanupStack::Pop();//audRecDevParser williamr@2: williamr@2: etc. williamr@2: } williamr@2: @endcode williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: class CMMFAudioControllerCustomCommandParser : public CMMFCustomCommandParserBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Creates a new custom command parser capable of handling audio controller commands. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @return A pointer to the object created. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C static CMMFAudioControllerCustomCommandParser* NewL(MMMFAudioControllerCustomCommandImplementor& aImplementor); williamr@2: williamr@2: /** williamr@2: Destructor. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C ~CMMFAudioControllerCustomCommandParser(); williamr@2: williamr@2: /** williamr@2: Handles a request from the client. Called by the controller framework. williamr@2: williamr@2: @param aMessage williamr@2: The message to be handled. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: void HandleRequest(TMMFMessage& aMessage); williamr@2: private: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: CMMFAudioControllerCustomCommandParser(MMMFAudioControllerCustomCommandImplementor& aImplementor); williamr@2: // Internal request handling methods. williamr@2: void DoHandleRequestL(TMMFMessage& aMessage); williamr@2: williamr@2: TBool DoSetSourceSampleRateL(TMMFMessage& aMessage); williamr@2: TBool DoSetSourceNumChannelsL(TMMFMessage& aMessage); williamr@2: TBool DoSetSourceFormatL(TMMFMessage& aMessage); williamr@2: TBool DoSetSinkSampleRateL(TMMFMessage& aMessage); williamr@2: TBool DoSetSinkNumChannelsL(TMMFMessage& aMessage); williamr@2: TBool DoSetSinkFormatL(TMMFMessage& aMessage); williamr@2: TBool DoSetCodecL(TMMFMessage& aMessage); williamr@2: TBool DoSetSourceBitRateL(TMMFMessage& aMessage); williamr@2: TBool DoSetSourceDataTypeL(TMMFMessage& aMessage); williamr@2: TBool DoSetSinkBitRateL(TMMFMessage& aMessage); williamr@2: TBool DoSetSinkDataTypeL(TMMFMessage& aMessage); williamr@2: TBool DoGetSourceSampleRateL(TMMFMessage& aMessage); williamr@2: TBool DoGetSourceBitRateL(TMMFMessage& aMessage); williamr@2: TBool DoGetSourceNumChannelsL(TMMFMessage& aMessage); williamr@2: TBool DoGetSourceFormatL(TMMFMessage& aMessage); williamr@2: TBool DoGetSourceDataTypeL(TMMFMessage& aMessage); williamr@2: TBool DoGetSinkSampleRateL(TMMFMessage& aMessage); williamr@2: TBool DoGetSinkBitRateL(TMMFMessage& aMessage); williamr@2: TBool DoGetSinkNumChannelsL(TMMFMessage& aMessage); williamr@2: TBool DoGetSinkFormatL(TMMFMessage& aMessage); williamr@2: TBool DoGetSinkDataTypeL(TMMFMessage& aMessage); williamr@2: TBool DoGetSupportedSourceSampleRatesL(TMMFMessage& aMessage); williamr@2: TBool DoGetSupportedSourceBitRatesL(TMMFMessage& aMessage); williamr@2: TBool DoGetSupportedSourceNumChannelsL(TMMFMessage& aMessage); williamr@2: TBool DoGetSupportedSourceDataTypesL(TMMFMessage& aMessage); williamr@2: TBool DoGetSupportedSinkSampleRatesL(TMMFMessage& aMessage); williamr@2: TBool DoGetSupportedSinkBitRatesL(TMMFMessage& aMessage); williamr@2: TBool DoGetSupportedSinkNumChannelsL(TMMFMessage& aMessage); williamr@2: TBool DoGetSupportedSinkDataTypesL(TMMFMessage& aMessage); williamr@2: TBool DoCopyArrayDataL(TMMFMessage& aMessage); williamr@2: williamr@2: void DoCreateBufFromUintArrayL(RArray& aArray); williamr@2: void DoCreateBufFromFourCCArrayL(RArray& aArray); williamr@2: private: williamr@2: /** williamr@2: The object that implements the audio record controller interface williamr@2: */ williamr@2: MMMFAudioControllerCustomCommandImplementor& iImplementor; williamr@2: williamr@2: CBufFlat* iDataCopyBuffer; williamr@2: }; williamr@2: williamr@2: williamr@2: class RWindow; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Client class to access functionality specific to a video controller. williamr@2: williamr@2: The class uses the custom command function of the controller plugin, and removes the necessity williamr@2: for the client to formulate the custom commands. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: class RMMFVideoControllerCustomCommands : public RMMFCustomCommandsBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aController williamr@2: The client side controller object to be used by this custom command interface. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C RMMFVideoControllerCustomCommands(RMMFController& aController); williamr@2: williamr@2: /** williamr@2: Gets the frame size of the clip. williamr@2: williamr@2: @param aVideoFrameSize williamr@2: The frame size, in pixels. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetVideoFrameSize(TSize& aVideoFrameSize) const; williamr@2: williamr@2: /** williamr@2: Gets the audio type. williamr@2: williamr@2: @param aCodec williamr@2: The FourCC of the audio codec. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetAudioCodec(TFourCC& aCodec) const; williamr@2: williamr@2: /** williamr@2: Gets the video bit rate. williamr@2: williamr@2: @param aBitRate williamr@2: The bit rate of the video stream. If this value is KMMFVariableVideoBitRate it signifies williamr@2: a variable bit rate. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetVideoBitRate(TInt& aBitRate) const; williamr@2: williamr@2: /** williamr@2: Gets the audio bit rate. williamr@2: williamr@2: @param aBitRate williamr@2: The bit rate of the audio stream. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetAudioBitRate(TInt& aBitRate) const; williamr@2: williamr@2: /** williamr@2: Sets the frame rate of the clip. williamr@2: williamr@2: @param aFramesPerSecond williamr@2: The number of frames per second. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetFrameRate(TReal32 aFramesPerSecond) const; williamr@2: williamr@2: /** williamr@2: Gets the frame rate of the clip. williamr@2: williamr@2: @param aFramesPerSecond williamr@2: The number of frames per second, filled in by the controller plugin. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetFrameRate(TReal32& aFramesPerSecond) const; williamr@2: williamr@2: /** williamr@2: Gets the video clip MIME type. williamr@2: williamr@2: @param aMimeType williamr@2: The Mime type of the current clip. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetVideoMimeType(TDes8& aMimeType) const; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Client class to access functionality specific to a video playback controller. williamr@2: williamr@2: The class uses the custom command function of the controller plugin, and removes the necessity williamr@2: for the client to formulate the custom commands. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: class RMMFVideoPlayControllerCustomCommands : public RMMFCustomCommandsBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aController williamr@2: The client side controller object to be used by this custom command interface. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C RMMFVideoPlayControllerCustomCommands(RMMFController& aController); williamr@2: williamr@2: /** williamr@2: Prepares the video clip to be accessed. williamr@2: williamr@2: A call to this function tells the loaded controller plugin to finalise its configuration williamr@2: and to prepare to start reading the video clip. It is not possible to play the video clip williamr@2: or query any of its properties (e.g. duration, meta data etc.) until the controller plugin williamr@2: has signified the completion of this method by generating a KMMFEventCategoryVideoPrepareComplete williamr@2: event. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt Prepare(); williamr@2: williamr@2: /** williamr@2: Asks the controller to store the current frame to a bitmap. williamr@2: williamr@2: The video play controller will send an event to the client on completion of the task. williamr@2: williamr@2: @param aBitmap williamr@2: The handle of the CFbsBitmap object to retrieve the frame to. williamr@2: @param aStatus williamr@2: The active object to call back on. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C void GetFrame(CFbsBitmap& aBitmap, TRequestStatus& aStatus); williamr@2: williamr@2: /** williamr@2: Sets the screen region to be used to display the video. williamr@2: williamr@2: @param aWindowRect williamr@2: The window rectangle. williamr@2: @param aClipRect williamr@2: The clip rectangle. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetDisplayWindow(const TRect& aWindowRect, const TRect& aClipRect) const; williamr@2: williamr@2: /** williamr@2: Updates the display region. williamr@2: williamr@2: @param aRegion williamr@2: The valid region to display to. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt UpdateDisplayRegion(const TRegion& aRegion) const; williamr@2: williamr@2: /** williamr@2: Queries whether audio is enabled. williamr@2: williamr@2: @param aEnabled williamr@2: A boolean indicating whether audio is enabled. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetAudioEnabled(TBool& aEnabled) const; williamr@2: williamr@2: /** williamr@2: Sends a direct screen access event to controller. williamr@2: williamr@2: @param aDSAEvent williamr@2: The direct screen access event. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt DirectScreenAccessEvent(const TMMFDSAEvent aDSAEvent) const; williamr@2: williamr@2: /** williamr@2: Sets a time window for video playback. williamr@2: williamr@2: @param aStart williamr@2: The start time in milliseconds relative to the start of the video clip. williamr@2: @param aEnd williamr@2: The end time in milliseconds relative to the start of the video clip. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt Play(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) const; williamr@2: williamr@2: /** williamr@2: Requests the controller to redraw the current frame. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt RefreshFrame() const; williamr@2: williamr@2: /** williamr@2: Gets the video loading progress as a percentage. williamr@2: williamr@2: @param aPercentageProgress williamr@2: The progress loading the clip, as a percentage. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetLoadingProgress(TInt& aPercentageProgress) const; williamr@2: williamr@2: /** williamr@2: Rotates the video image on the screen. williamr@2: williamr@2: @param aRotation williamr@2: The desired rotation to apply. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetRotation(TVideoRotation aRotation) const; williamr@2: williamr@2: /** williamr@2: Queries the rotation that is currently applied to the video image. williamr@2: williamr@2: @param aRotation williamr@2: The applied rotation. williamr@2: williamr@2: @return One of the system wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetRotation(TVideoRotation& aRotation) const; williamr@2: williamr@2: /** williamr@2: Scales the video image to a specified percentage of its original size. williamr@2: williamr@2: @param aWidthPercentage williamr@2: The percentage (100 = original size) to be used to scale the width of the video image. williamr@2: @param aHeightPercentage williamr@2: The percentage (100 = original size) to be used to scale the height of the video image. williamr@2: If this is not equal to aWidthPercentage then the image may be distorted. williamr@2: @param aAntiAliasFiltering williamr@2: True if anti-aliasing filtering should be used. If the plugin does not williamr@2: support this kind of processing, this value will be ignored. williamr@2: williamr@2: @return One of the system wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetScaleFactor(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering) const; williamr@2: williamr@2: /** williamr@2: Gets the scale factor currently applied to the video image. williamr@2: williamr@2: @param aWidthPercentage williamr@2: On return, will contain the percentage (100 = original size) used to scale the width williamr@2: of the video image. williamr@2: @param aHeightPercentage williamr@2: On return. will contain the percentage (100 = original size) used to scale the height williamr@2: of the video image. williamr@2: @param aAntiAliasFiltering williamr@2: True if anti-aliasing filtering is being used williamr@2: williamr@2: @return One of the system wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetScaleFactor(TReal32& aWidthPercentage, TReal32& aHeightPercentage, TBool& aAntiAliasFiltering) const; williamr@2: williamr@2: /** williamr@2: Selects a region of the video image to be displayed. williamr@2: williamr@2: @param aCropRegion williamr@2: The dimensions of the crop region, relative to the video image. williamr@2: williamr@2: @return One of the system wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetCropRegion(const TRect& aCropRegion) const; williamr@2: williamr@2: /** williamr@2: Gets the crop region currently applied to the image. williamr@2: williamr@2: @param aCropRegion williamr@2: The dimensions of the crop region, relative to the video image. If no crop region has williamr@2: been applied, the full dimensions of the video image will be returned. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetCropRegion(TRect& aCropRegion) const; williamr@2: williamr@2: williamr@2: private: williamr@2: TPckgBuf iConfigPackage; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Client class to access functionality specific to a video recorder controller. williamr@2: williamr@2: The class uses the custom command function of the controller plugin, and removes the necessity williamr@2: for the client to formulate the custom commands. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: class RMMFVideoRecordControllerCustomCommands : public RMMFCustomCommandsBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aController williamr@2: The client side controller object to be used by this custom command interface. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C RMMFVideoRecordControllerCustomCommands(RMMFController& aController); williamr@2: williamr@2: /** williamr@2: Sets the format for the video to record. williamr@2: williamr@2: @param aVideoFormatUid williamr@2: The UID of the video format. williamr@2: williamr@2: @return This method will return with one of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetVideoFormat(TUid aVideoFormatUid) const; williamr@2: williamr@2: /** williamr@2: Sets the video codec for recording. williamr@2: williamr@2: @param aVideoCodec williamr@2: The MIME type of the video codec. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetVideoCodec(const TDesC8& aVideoCodec) const; williamr@2: williamr@2: /** williamr@2: Sets the video bit rate. williamr@2: williamr@2: @param aBitRate williamr@2: The bit rate of the video stream. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetVideoBitRate(TInt aBitRate) const; williamr@2: williamr@2: /** williamr@2: Sets the audio bit rate. williamr@2: williamr@2: @param aBitRate williamr@2: The bit rate of the audio stream. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetAudioBitRate(TInt aBitRate) const; williamr@2: williamr@2: /** williamr@2: Sets the audio codec for recording. williamr@2: williamr@2: @param aAudioCodec williamr@2: The FourCC code of the audio codec. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetAudioCodec(TFourCC aAudioCodec) const; williamr@2: williamr@2: /** williamr@2: Sets the frame size of the clip. williamr@2: williamr@2: @param aVideoFrameSize williamr@2: The frame size, in pixels. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetVideoFrameSize(TSize aVideoFrameSize) const; williamr@2: williamr@2: /** williamr@2: Sets the maximum size of the recorded clip, in bytes. williamr@2: williamr@2: @param aMaxSize williamr@2: The maximum size of the recorded clip, in bytes. This can be called with the parameter williamr@2: KMMFNoMaxClipSize which signifies no maximum file size. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetMaxFileSize(TInt aMaxSize) const; williamr@2: williamr@2: /** williamr@2: Adds meta data to the clip. williamr@2: williamr@2: @param aNewEntry williamr@2: The details of the new entry to be added. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C void AddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry)const; williamr@2: williamr@2: /** williamr@2: Removes a meta data entry from the clip. williamr@2: williamr@2: @param aIndex williamr@2: The ID of the meta data entry to delete. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt RemoveMetaDataEntry(TInt aIndex)const; williamr@2: williamr@2: /** williamr@2: Replaces a meta data in the clip. williamr@2: williamr@2: @param aIndex williamr@2: The ID of the meta data entry to replace. williamr@2: @param aNewEntry williamr@2: The details of the new entry to be added. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C void ReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry)const; williamr@2: williamr@2: /** williamr@2: Sets whether audio is enabled. williamr@2: williamr@2: @param aEnable williamr@2: A boolean indicating if audio should be enabled. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetAudioEnabled(TBool aEnable) const; williamr@2: williamr@2: /** williamr@2: Prepares the controller for recording. This should be called before the first attempt to record williamr@2: with the controller. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt Prepare() const; williamr@2: williamr@2: /** williamr@2: Sets the handle of the camera to use. williamr@2: williamr@2: @param aCameraHandle williamr@2: The handle of the camera to use. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt SetCameraHandle(TInt aCameraHandle) const; williamr@2: williamr@2: /** williamr@2: Gets the (possibly estimated) record time left in the clip. williamr@2: williamr@2: @param aTime williamr@2: The record time available, in microseconds. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetRecordTimeAvailable(TTimeIntervalMicroSeconds& aTime) const; williamr@2: williamr@2: /** williamr@2: Gets the supported sink audio types. williamr@2: williamr@2: @param aSupportedDataTypes williamr@2: The supported data types. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetSupportedSinkAudioTypes(RArray& aSupportedDataTypes) const; williamr@2: williamr@2: /** williamr@2: Gets the supported sink video types. williamr@2: williamr@2: @param aDataTypes williamr@2: The supported data types. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetSupportedSinkVideoTypes(CDesC8Array& aDataTypes) const; williamr@2: williamr@2: // INC23777 williamr@2: /** williamr@2: Retrieves whether audio is enabled. williamr@2: williamr@2: @param aEnabled williamr@2: A boolean indicating whether audio is enabled. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C TInt GetAudioEnabled(TBool& aEnabled) const; williamr@2: williamr@2: private: williamr@2: void DoGetCDesC8ArrayL(CDesC8Array& aArray, TMMFVideoRecordControllerMessages aIpc) const; williamr@2: void DoGetFourCCArrayL(RArray& aArray) const; williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Mixin class to be derived from controller plugins that could support the video record controller williamr@2: custom commands. williamr@2: */ williamr@2: class MMMFVideoRecordControllerCustomCommandImplementor williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Sets the format for the video to record. williamr@2: williamr@2: @param aVideoFormatUid williamr@2: The UID of the video format. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvrcSetVideoFormatL(TUid aVideoFormatUid)=0; williamr@2: williamr@2: /** williamr@2: Sets the video codec for recording. williamr@2: williamr@2: @param aVideoCodec williamr@2: The MIME type of the video codec. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvrcSetVideoCodecL(const TDesC8& aVideoCodec)=0; williamr@2: williamr@2: /** williamr@2: Sets the audio codec for recording. williamr@2: williamr@2: @param aAudioCodec williamr@2: The FourCC code of the audio codec. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvrcSetAudioCodecL(TFourCC aAudioCodec)=0; williamr@2: williamr@2: /** williamr@2: Sets the video bit rate. williamr@2: williamr@2: @param aBitRate williamr@2: The bit rate of the video stream. This can be called with the parameter williamr@2: KMMFVariableVideoBitRate which specifies a variable bit rate. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvrcSetVideoBitRateL(TInt& aBitRate)=0; williamr@2: williamr@2: /** williamr@2: Sets the audio bit rate. williamr@2: williamr@2: @param aBitRate williamr@2: The bit rate of the audio stream. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvrcSetAudioBitRateL(TInt& aBitRate)=0; williamr@2: williamr@2: /** williamr@2: Adds meta data to the clip. williamr@2: williamr@2: @param aNewEntry williamr@2: The details of the new entry to be added. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvrcAddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry)=0; williamr@2: williamr@2: /** williamr@2: Removes a meta data entry from the clip. williamr@2: williamr@2: @param aIndex williamr@2: The ID of the meta data entry to delete. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvrcRemoveMetaDataEntryL(TInt aIndex)=0; williamr@2: williamr@2: /** williamr@2: Replaces a meta data in the clip. williamr@2: williamr@2: @param aIndex williamr@2: The ID of the meta data entry to replace. williamr@2: @param aNewEntry williamr@2: The details of the new entry to be added. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvrcReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry)=0; williamr@2: williamr@2: /** williamr@2: Sets the maximum file size. williamr@2: williamr@2: @param aMaxFileSize williamr@2: The maximum file size allowed for recording. This can be called with the parameter williamr@2: KMMFNoMaxClipSize which signifies no maximum file size. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvrcSetMaxFileSizeL(TInt aMaxFileSize)=0; williamr@2: williamr@2: /** williamr@2: Sets whether audio is enabled. williamr@2: williamr@2: @param aEnable williamr@2: A boolean indicating if audio is enabled. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvrcSetAudioEnabledL(TBool aEnable)=0; williamr@2: williamr@2: /** williamr@2: Sets the frame size for the video recording. williamr@2: williamr@2: @param aFrameSize williamr@2: The frame size for recording. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvrcSetVideoFrameSizeL(TSize aFrameSize)=0; williamr@2: williamr@2: /** williamr@2: Prepares the controller for recording. This needs to be called before williamr@2: the first call to Record(). williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvrcPrepareL()=0; williamr@2: williamr@2: /** williamr@2: Sets the handle of the camera to use for recording. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvrcSetCameraHandleL(TInt aCameraHandle)=0; williamr@2: williamr@2: /** williamr@2: Gets the (possibly estimated) record time left in the clip. williamr@2: williamr@2: @param aTime williamr@2: The record time available, in microseconds. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvrcGetRecordTimeAvailableL(TTimeIntervalMicroSeconds& aTime) = 0; williamr@2: williamr@2: /** williamr@2: Gets the supported sink audio types. williamr@2: williamr@2: @param aDataTypes williamr@2: The supported data types. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvrcGetSupportedSinkAudioTypesL(RArray& aDataTypes)=0; williamr@2: williamr@2: /** williamr@2: Gets the supported sink video types. williamr@2: williamr@2: @param aDataTypes williamr@2: The supported data types. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvrcGetSupportedSinkVideoTypesL(CDesC8Array& aDataTypes)=0; williamr@2: williamr@2: //INC23777 williamr@2: /** williamr@2: Indicates if the audio is enabled. williamr@2: williamr@2: @param aEnabled williamr@2: A boolean indicating if the audio is enabled. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvrcGetAudioEnabledL(TBool& aEnabled)=0; williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Client class to access functionality specific to a video playback controller. williamr@2: williamr@2: The class uses the custom command function of the controller plugin, and removes the necessity williamr@2: for the client to formulate the custom commands. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: class MMMFVideoPlayControllerCustomCommandImplementor williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Prepares the video clip to be accessed. williamr@2: williamr@2: A call to this method tells the controller plugin to finalise its configuration williamr@2: and to prepare to start reading the video clip. It is not possible to play the video clip williamr@2: or query any of its properties (e.g. duration, meta data etc.) until the controller plugin williamr@2: has signified the completion of this method by generating a williamr@2: KMMFEventCategoryVideoPrepareComplete event. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvpcPrepare()=0; williamr@2: williamr@2: /** williamr@2: Gets a frame previously requested from the controller. williamr@2: williamr@2: @param aVideoFrame williamr@2: The handle of bitmap to retrieve frame to. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvpcGetFrameL(MMMFVideoFrameMessage& aVideoFrame)=0; williamr@2: williamr@2: /** williamr@2: Indicates whether audio is enabled. williamr@2: williamr@2: @param aEnabled williamr@2: On return, contains a boolean indicating whether audio is enabled. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvpcGetAudioEnabledL(TBool& aEnabled)=0; williamr@2: williamr@2: /** williamr@2: Sets the screen region to be used to display the video. williamr@2: williamr@2: @param aClipRect williamr@2: The clip rect used to display the video. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvpcSetDisplayWindowL(const TRect& aWindowRect, const TRect& aClipRect) = 0; williamr@2: williamr@2: /** williamr@2: Updates the region to display. williamr@2: williamr@2: @param aRegion williamr@2: A TRegion containing the current display regions, ownership of the TRegion is not williamr@2: transferred. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvpcUpdateDisplayRegionL(const TRegion& aRegion) = 0; williamr@2: williamr@2: /** williamr@2: Pauses/Resumes video playback. This is to be used with direct screen access williamr@2: to indicate that the display has changed and should not be written to. This williamr@2: does not affect audio playback. williamr@2: williamr@2: @param aDSAEvent williamr@2: Whether the video display should be active. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvpcDirectScreenAccessEventL(const TMMFDSAEvent aDSAEvent) = 0; williamr@2: williamr@2: /** williamr@2: Sets a time window for video playback. williamr@2: williamr@2: @param aStart williamr@2: Start time in milliseconds relative to the start of the video clip. williamr@2: @param aEnd williamr@2: End time in milliseconds relative to the start of the video clip. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvpcPlayL(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) = 0; williamr@2: williamr@2: /** williamr@2: Requests the controller to redraw the current frame. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvpcRefreshFrameL() = 0; williamr@2: williamr@2: /** williamr@2: Gets the progress of loading a video clip. williamr@2: williamr@2: @param aPercentageComplete williamr@2: The progress loading the clip, as a percentage. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvpcGetLoadingProgressL(TInt& aPercentageComplete) = 0; williamr@2: williamr@2: /** williamr@2: Rotates the video image on the screen. williamr@2: williamr@2: @param aRotation williamr@2: The desired rotation to apply. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvpcSetRotationL(TVideoRotation aRotation) = 0; williamr@2: williamr@2: /** williamr@2: Queries the rotation that is currently applied to the video image. williamr@2: williamr@2: @param aRotation williamr@2: The applied rotation. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvpcGetRotationL(TVideoRotation& aRotation) = 0; williamr@2: williamr@2: /** williamr@2: Scales the video image to a specified percentage of its original size. williamr@2: williamr@2: @param aWidthPercentage williamr@2: The percentage (100 = original size) to be used to scale the width of the video image. williamr@2: @param aHeightPercentage williamr@2: The percentage (100 = original size) to be used to scale the height of the video image. williamr@2: If this is not equal to aWidthPercentage then the image may be distorted. williamr@2: @param aAntiAliasFiltering williamr@2: A boolean indicating if anit-aliasing filtering should be used. ETrue if anti-aliasing williamr@2: should be used. If the plugin does not support this kind of processing, this value will williamr@2: be ignored. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvpcSetScaleFactorL(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering) = 0; williamr@2: williamr@2: /** williamr@2: Gets the scale factor currently applied to the video image. williamr@2: williamr@2: @param aWidthPercentage williamr@2: The percentage (100 = original size) used to scale the width of the video image will be williamr@2: copied into here. williamr@2: @param aHeightPercentage williamr@2: The percentage (100 = original size) used to scale the height of the video image will be williamr@2: copied into here. williamr@2: @param aAntiAliasFiltering williamr@2: A boolean indicating if anti-aliasing filtering should be used. ETrue if anti-aliasing williamr@2: filtering is being used, EFalse if not. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvpcGetScaleFactorL(TReal32& aWidthPercentage, TReal32& aHeightPercentage, TBool& aAntiAliasFiltering) = 0; williamr@2: williamr@2: /** williamr@2: Selects a region of the video image to be displayed. williamr@2: williamr@2: @param aCropRegion williamr@2: The dimensions of the crop region, relative to the video image. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvpcSetCropRegionL(const TRect& aCropRegion) = 0; williamr@2: williamr@2: /** williamr@2: Gets the crop region currently applied to the image williamr@2: williamr@2: @param aCropRegion williamr@2: The dimensions of the crop region, relative to the video image. If no crop region has williamr@2: been applied, the full dimensions of the video image will be returned. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvpcGetCropRegionL(TRect& aCropRegion) = 0; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Mixin class to be derived from controller plugins that could support the video record controller williamr@2: custom commands. williamr@2: */ williamr@2: class MMMFVideoControllerCustomCommandImplementor williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Gets the frame size of the clip. williamr@2: williamr@2: @param aVideoFrameSize williamr@2: The frame size, in pixels. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvcGetVideoFrameSizeL(TSize& aVideoFrameSize)=0; williamr@2: williamr@2: /** williamr@2: Gets the audio type. williamr@2: williamr@2: @param aCodec williamr@2: The FourCC of the audio codec. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvcGetAudioCodecL(TFourCC& aCodec)=0; williamr@2: williamr@2: /** williamr@2: Gets the video bit rate. williamr@2: williamr@2: @param aBitRate williamr@2: The bit rate of the video stream. If this value is KMMFVariableVideoBitRate it signifies williamr@2: a variable bit rate. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvcGetVideoBitRateL(TInt& aBitRate)=0; williamr@2: williamr@2: /** williamr@2: Gets the audio bit rate. williamr@2: williamr@2: @param aBitRate williamr@2: The bit rate of the audio stream. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvcGetAudioBitRateL(TInt& aBitRate)=0; williamr@2: williamr@2: /** williamr@2: Sets the frame rate of the clip. williamr@2: williamr@2: @param aFramesPerSecond williamr@2: The number of frames per second. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvcSetFrameRateL(TReal32 aFramesPerSecond)=0; williamr@2: williamr@2: /** williamr@2: Gets the frame rate of the clip. williamr@2: williamr@2: @param aFramesPerSecond williamr@2: The number of frames per second, filled in by the controller plugin. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvcGetFrameRateL(TReal32& aFramesPerSecond)=0; williamr@2: williamr@2: /** williamr@2: Gets the supported sink video types. williamr@2: williamr@2: @param aMimeType williamr@2: The supported data types. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: virtual void MvcGetVideoMimeTypeL(TDes8& aMimeType)=0; williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Custom command parser class to be used by controller plugins wishing to support williamr@2: video controller commands. williamr@2: williamr@2: The controller plugin must be derived from MMMFVideoControllerCustomCommandImplementor williamr@2: to use this class. williamr@2: williamr@2: The controller plugin should create an object of this type and add it to the list of custom williamr@2: command parsers in the controller framework. See the following example code for details. williamr@2: williamr@2: @code williamr@2: void CMMFAudioController::ConstructL() williamr@2: { williamr@2: // Construct custom command parsers williamr@2: CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this); williamr@2: CleanupStack::PushL(audPlayDevParser); williamr@2: AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework williamr@2: CleanupStack::Pop();//audPlayDevParser williamr@2: williamr@2: CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this); williamr@2: CleanupStack::PushL(audRecDevParser); williamr@2: AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework williamr@2: CleanupStack::Pop();//audRecDevParser williamr@2: williamr@2: etc. williamr@2: } williamr@2: @endcode williamr@2: williamr@2: @since 7.0s williamr@2: williamr@2: */ williamr@2: class CMMFVideoControllerCustomCommandParser : public CMMFCustomCommandParserBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Creates a new custom command parser capable of handling video controller commands. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @return A pointer to the object created. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C static CMMFVideoControllerCustomCommandParser* NewL(MMMFVideoControllerCustomCommandImplementor& aImplementor); williamr@2: williamr@2: /** williamr@2: Destructor. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C ~CMMFVideoControllerCustomCommandParser(); williamr@2: williamr@2: /** williamr@2: Handles a request from the client. Called by the controller framework. williamr@2: williamr@2: @param aMessage williamr@2: The message to be handled. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: void HandleRequest(TMMFMessage& aMessage); williamr@2: private: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: CMMFVideoControllerCustomCommandParser(MMMFVideoControllerCustomCommandImplementor& aImplementor); williamr@2: // Internal request handling methods. williamr@2: void DoHandleRequestL(TMMFMessage& aMessage); williamr@2: TBool DoGetAudioCodecL(TMMFMessage& aMessage); williamr@2: williamr@2: TBool DoGetAudioBitRateL(TMMFMessage& aMessage); williamr@2: TBool DoGetVideoBitRateL(TMMFMessage& aMessage); williamr@2: TBool DoGetVideoFrameSizeL(TMMFMessage& aMessage); williamr@2: TBool DoSetFrameRateL(TMMFMessage& aMessage); williamr@2: TBool DoGetFrameRateL(TMMFMessage& aMessage); williamr@2: TBool DoGetVideoMimeTypeL(TMMFMessage& aMessage); williamr@2: private: williamr@2: /** williamr@2: The object that implements the video record controller interface williamr@2: */ williamr@2: MMMFVideoControllerCustomCommandImplementor& iImplementor; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Custom command parser class to be used by controller plugins wishing to support video play williamr@2: controller commands. williamr@2: williamr@2: The controller plugin must be derived from MMMFVideoPlayControllerCustomCommandImplementor to use williamr@2: this class. The controller plugin should create an object of this type and add it to the list of williamr@2: custom command parsers in the controller framework. williamr@2: */ williamr@2: class CMMFVideoPlayControllerCustomCommandParser : public CMMFCustomCommandParserBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Creates a new custom command parser capable of handling video controller commands. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @return A pointer to the object created. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C static CMMFVideoPlayControllerCustomCommandParser* NewL(MMMFVideoPlayControllerCustomCommandImplementor& aImplementor); williamr@2: williamr@2: /** williamr@2: Destructor. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C ~CMMFVideoPlayControllerCustomCommandParser(); williamr@2: williamr@2: /** williamr@2: Handles a request from the client. Called by the controller framework. williamr@2: williamr@2: @param aMessage williamr@2: The message to be handled. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: void HandleRequest(TMMFMessage& aMessage); williamr@2: private: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: CMMFVideoPlayControllerCustomCommandParser(MMMFVideoPlayControllerCustomCommandImplementor& aImplementor); williamr@2: // Internal request handling methods. williamr@2: void DoHandleRequestL(TMMFMessage& aMessage); williamr@2: TBool DoRequestFrameL(TMMFMessage& aMessage); williamr@2: TBool DoGetFrameL(TMMFMessage& aMessage); williamr@2: TBool DoSetDisplayWindowL(TMMFMessage& aMessage); williamr@2: TBool DoUpdateDisplayRegionL(TMMFMessage& aMessage); williamr@2: TBool DoGetAudioEnabledL(TMMFMessage& aMessage); williamr@2: TBool DoDirectScreenAccessEventL(TMMFMessage& aMessage); williamr@2: TBool DoPlayL(TMMFMessage& aMessage); williamr@2: TBool DoRefreshFrameL(TMMFMessage& aMessage); williamr@2: TBool DoGetLoadingProgressL(TMMFMessage& aMessage); williamr@2: TBool DoPrepareL(TMMFMessage& aMessage); williamr@2: TBool DoSetRotationL(TMMFMessage& aMessage); williamr@2: TBool DoGetRotationL(TMMFMessage& aMessage); williamr@2: TBool DoSetScaleFactorL(TMMFMessage& aMessage); williamr@2: TBool DoGetScaleFactorL(TMMFMessage& aMessage); williamr@2: TBool DoSetCropRegionL(TMMFMessage& aMessage); williamr@2: TBool DoGetCropRegionL(TMMFMessage& aMessage); williamr@2: williamr@2: williamr@2: private: williamr@2: /** williamr@2: The object that implements the video record controller interface williamr@2: */ williamr@2: MMMFVideoPlayControllerCustomCommandImplementor& iImplementor; williamr@2: CMMFVideoFrameMessage* iVideoFrameMessage; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Custom command parser class to be used by controller plugins wishing to support video record williamr@2: controller commands. williamr@2: williamr@2: The controller plugin must be derived from MMMFVideoRecordControllerCustomCommandImplementor to use williamr@2: this class. The controller plugin should create an object of this type and add it to the list of williamr@2: custom command parsers in the controller framework. williamr@2: */ williamr@2: class CMMFVideoRecordControllerCustomCommandParser : public CMMFCustomCommandParserBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Creates a new custom command parser capable of handling video controller commands. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @return A pointer to the object created. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C static CMMFVideoRecordControllerCustomCommandParser* NewL(MMMFVideoRecordControllerCustomCommandImplementor& aImplementor); williamr@2: williamr@2: /** williamr@2: Destructor. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C ~CMMFVideoRecordControllerCustomCommandParser(); williamr@2: williamr@2: /** williamr@2: Handles a request from the client. Called by the controller framework. williamr@2: williamr@2: @param aMessage williamr@2: The message to be handled. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: void HandleRequest(TMMFMessage& aMessage); williamr@2: private: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: CMMFVideoRecordControllerCustomCommandParser(MMMFVideoRecordControllerCustomCommandImplementor& aImplementor); williamr@2: // Internal request handling methods. williamr@2: void DoHandleRequestL(TMMFMessage& aMessage); williamr@2: TBool DoSetVideoFormatL(TMMFMessage& aMessage); williamr@2: TBool DoSetAudioBitRateL(TMMFMessage& aMessage); williamr@2: TBool DoSetVideoBitRateL(TMMFMessage& aMessage); williamr@2: TBool DoSetVideoCodecL(TMMFMessage& aMessage); williamr@2: TBool DoSetAudioCodecL(TMMFMessage& aMessage); williamr@2: TBool DoAddMetaDataEntryL(TMMFMessage& aMessage); williamr@2: TBool DoRemoveMetaDataEntryL(TMMFMessage& aMessage); williamr@2: TBool DoReplaceMetaDataEntryL(TMMFMessage& aMessage); williamr@2: TBool DoSetMaxFileSizeL(TMMFMessage& aMessage); williamr@2: TBool DoSetAudioEnabledL(TMMFMessage& aMessage); williamr@2: TBool DoSetVideoFrameSizeL(TMMFMessage& aMessage); williamr@2: TBool DoPrepareL(TMMFMessage& aMessage); williamr@2: TBool DoSetCameraHandleL(TMMFMessage& aMessage); williamr@2: TBool DoGetRecordTimeAvailableL(TMMFMessage& aMessage); williamr@2: williamr@2: TBool DoGetSupportedSinkAudioTypesL(TMMFMessage& aMessage); williamr@2: TBool DoGetSupportedSinkVideoTypesL(TMMFMessage& aMessage); williamr@2: williamr@2: TInt32 DoCreateBufFromCDesC8ArrayL(CDesC8Array& aArray); williamr@2: TBool DoCopyCDesC8ArrayDataL(TMMFMessage& aMessage); williamr@2: williamr@2: TBool DoCopyFourCCArrayDataL(TMMFMessage& aMessage); williamr@2: void DoCreateBufFromFourCCArrayL(RArray& aArray); williamr@2: TBool DoGetAudioEnabledL(TMMFMessage& aMessage); // (INC23777) williamr@2: williamr@2: private: williamr@2: /** williamr@2: The object that implements the video record controller interface williamr@2: */ williamr@2: MMMFVideoRecordControllerCustomCommandImplementor& iImplementor; williamr@2: CBufFlat* iDataCopyBuffer; williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Client class to allow the client to specify DRM Intent. williamr@2: williamr@2: The class uses the custom command function of the controller plugin, and removes the necessity williamr@2: for the client to formulate the custom commands. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: class RMMFVideoDRMExtCustomCommands : public RMMFCustomCommandsBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aController williamr@2: The client side controller object to be used by this custom command interface. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C RMMFVideoDRMExtCustomCommands(RMMFController& aController); williamr@2: williamr@2: /** williamr@2: Gets a frame previously requested from the controller. williamr@2: williamr@2: @param aBitmap williamr@2: The handle of bitmap to retrieve frame to. williamr@2: @param aIntent williamr@2: The DRM Intent to pass in. williamr@2: @param aStatus williamr@2: The active object to call back on. williamr@2: */ williamr@2: IMPORT_C void GetFrame(CFbsBitmap& aBitmap, ContentAccess::TIntent aIntent, TRequestStatus& aStatus); williamr@2: williamr@2: private: williamr@2: TPckgBuf iConfigPackage; williamr@2: TPckgBuf iIntentPackage; williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Mixin class to be derived from controller plugins that could support the DRM Intent williamr@2: custom commands. williamr@2: */ williamr@2: class MMMFVideoDRMExtCustomCommandImplementor williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Gets a frame previously requested from the controller. williamr@2: williamr@2: @param aVideoFrame williamr@2: The callback interface to allow the caller to retrieve a bitmap. williamr@2: @param aIntent williamr@2: The DRM Intent to supply. williamr@2: */ williamr@2: virtual void MvdeGetFrameL(MMMFVideoFrameMessage& aVideoFrame, ContentAccess::TIntent aIntent)=0; williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Client class to provide DRM extensions to video controllers. williamr@2: williamr@2: The class uses the custom command function of the controller plugin, and removes the necessity williamr@2: for the client to formulate the custom commands. williamr@2: */ williamr@2: class CMMFVideoDRMExtCustomCommandParser : public CMMFCustomCommandParserBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Creates a new custom command parser capable of DRM Intent controller commands. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @return A pointer to the object created. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C static CMMFVideoDRMExtCustomCommandParser* NewL(MMMFVideoDRMExtCustomCommandImplementor& aImplementor); williamr@2: williamr@2: /** williamr@2: Destructor. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C ~CMMFVideoDRMExtCustomCommandParser(); williamr@2: williamr@2: /** williamr@2: Handles a request from the client. Called by the controller framework. williamr@2: williamr@2: @param aMessage williamr@2: The message to be handled. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: void HandleRequest(TMMFMessage& aMessage); williamr@2: williamr@2: private: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: @since 7.0s williamr@2: */ williamr@2: CMMFVideoDRMExtCustomCommandParser(MMMFVideoDRMExtCustomCommandImplementor& aImplementor); williamr@2: // Internal request handling methods. williamr@2: williamr@2: void DoGetFrameL(TMMFMessage& aMessage); williamr@2: williamr@2: private: williamr@2: MMMFVideoDRMExtCustomCommandImplementor& iImplementor; williamr@2: CMMFVideoFrameMessage* iVideoFrameMessage; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Client class to allow the client to register notification . williamr@2: williamr@2: The class uses the custom command function of the controller plugin, and removes the necessity williamr@2: for the client to formulate the custom commands. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: class RMMFResourceNotificationCustomCommands : public RMMFCustomCommandsBase williamr@2: { williamr@2: public: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aController williamr@2: The client side controller object to be used by this custom command interface. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C RMMFResourceNotificationCustomCommands(RMMFController& aController); williamr@2: williamr@2: /** williamr@2: Registers the Event for Notification when resource is avaliable. williamr@2: williamr@2: @param aEventType williamr@2: The Event to notify the client. williamr@2: williamr@2: @param aNotificationRegistrationData williamr@2: Notification registration specific data. williamr@2: williamr@2: @return An error code indicating if the registration was successful. KErrNone on success, williamr@2: otherwise another of the system-wide error codes. williamr@2: */ williamr@2: IMPORT_C TInt RegisterAsClient(TUid aEventType,const TDesC8& aNotificationRegistrationData); williamr@2: williamr@2: /** williamr@2: Cancels the registered notification event. williamr@2: williamr@2: @param aEventType williamr@2: The Event to notify the client. williamr@2: williamr@2: @return An error code indicating if the cancel registration was successful. KErrNone on success, williamr@2: otherwise another of the system-wide error codes. williamr@2: */ williamr@2: IMPORT_C TInt CancelRegisterAsClient(TUid aEventType); williamr@2: williamr@2: /** williamr@2: Gets the notification data for the event. williamr@2: williamr@2: @param aEventType williamr@2: The Event to notify the client. williamr@2: williamr@2: @param aNotificationData williamr@2: The Notification data for the client to resume the play. williamr@2: williamr@2: @return An error code indicating if the get notification data was successful. KErrNone on success, williamr@2: otherwise another of the system-wide error codes. williamr@2: */ williamr@2: IMPORT_C TInt GetResourceNotificationData(TUid aEventType,TDes8& aNotificationData); williamr@2: williamr@2: /** williamr@2: Waits for the client to resume the play even after the default timer expires. williamr@2: williamr@2: @return An error code indicating if the registration was successful. KErrNone on success, williamr@2: otherwise any of the system-wide error codes. williamr@2: */ williamr@2: IMPORT_C TInt WillResumePlay(); williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Mixin class to be derived from controller plugins that could support the audio resource notification williamr@2: custom commands. williamr@2: */ williamr@2: class MMMFResourceNotificationCustomCommandImplementor williamr@2: { williamr@2: public: williamr@2: /** williamr@2: Registers the Event for Notification when resource is available. williamr@2: williamr@2: @param aEventType williamr@2: The event which the client is notified of. williamr@2: williamr@2: @param aNotificationRegistrationData williamr@2: Notification registration specific data, which has been reserved for future use. williamr@2: williamr@2: @leave This method may leave with one of the system-wide error codes. KErrNotReady if there is no williamr@2: data sink. williamr@2: */ williamr@2: virtual void MarnRegisterAsClientL(TUid aEventType,const TDesC8& aNotificationRegistrationData) = 0; williamr@2: williamr@2: /** williamr@2: Cancels the registered notification event. williamr@2: williamr@2: @param aEventType williamr@2: The event to cancel. williamr@2: williamr@2: @leave This method may leave with one of the system-wide error codes. KErrNotReady if there is no williamr@2: data sink. williamr@2: */ williamr@2: virtual void MarnCancelRegisterAsClientL(TUid aEventType) = 0; williamr@2: williamr@2: /** williamr@2: Gets the notification data for the event. williamr@2: williamr@2: @param aEventType williamr@2: The event which the client is notified of. williamr@2: williamr@2: @param aNotificationData williamr@2: The Notification data for the client to resume playing. williamr@2: williamr@2: @leave This method may leave with one of the system-wide error codes. KErrNotReady if there is no williamr@2: data sink, KErrArgument if unable to provide the notification data. williamr@2: */ williamr@2: virtual void MarnGetResourceNotificationDataL(TUid aEventType,TDes8& aNotificationData) = 0; williamr@2: williamr@2: /** williamr@2: Waits for the client to resume the play even after the default timer expires. williamr@2: williamr@2: @leave This method may leave with one of the system-wide error codes. KErrNotReady if there is no williamr@2: data sink. williamr@2: */ williamr@2: virtual void MarnWillResumePlayL() = 0; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedAll williamr@2: @released williamr@2: williamr@2: Client class to provide Audio resource notification controllers. williamr@2: williamr@2: The class uses the custom command function of the controller plugin, and removes the necessity williamr@2: for the client to formulate the custom commands. williamr@2: */ williamr@2: class CMMFResourceNotificationCustomCommandParser: public CMMFCustomCommandParserBase williamr@2: { williamr@2: public: williamr@2: /** williamr@2: Creates a new custom command parser capable of handling resource notification controller commands. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @return A pointer to the object created. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C static CMMFResourceNotificationCustomCommandParser* NewL(MMMFResourceNotificationCustomCommandImplementor& aImplementor); williamr@2: williamr@2: /** williamr@2: Destructor. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: IMPORT_C ~CMMFResourceNotificationCustomCommandParser(); williamr@2: williamr@2: /** williamr@2: Handles a request from the client. Called by the controller framework. williamr@2: williamr@2: @param aMessage williamr@2: The message to be handled. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: void HandleRequest(TMMFMessage& aMessage); williamr@2: williamr@2: private: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @since 7.0s williamr@2: */ williamr@2: CMMFResourceNotificationCustomCommandParser(MMMFResourceNotificationCustomCommandImplementor& aImplementor); williamr@2: void DoHandleRequestL(TMMFMessage& aMessage); williamr@2: // Internal request handling methods. williamr@2: TBool DoRegisterAsClientL(TMMFMessage& aMessage); williamr@2: TBool DoCancelRegisterAsClientL(TMMFMessage& aMessage); williamr@2: TBool DoGetResourceNotificationDataL(TMMFMessage& aMessage); williamr@2: TBool DoWillResumePlayL(TMMFMessage& aMessage); williamr@2: private: williamr@2: MMMFResourceNotificationCustomCommandImplementor& iImplementor; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @prototype williamr@2: williamr@2: Client class to allow setting the initial screen for video display. williamr@2: williamr@2: */ williamr@2: class RMMFVideoSetInitScreenCustomCommands : public RMMFCustomCommandsBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aController williamr@2: The client side controller object to be used by this custom command interface. williamr@2: williamr@2: */ williamr@2: IMPORT_C RMMFVideoSetInitScreenCustomCommands(RMMFController& aController); williamr@2: williamr@2: /** williamr@2: Sets the initial screen number for the video display on the controller. williamr@2: williamr@2: @param aScreenNumber williamr@2: The screen number williamr@2: williamr@2: */ williamr@2: IMPORT_C TInt SetInitScreenNumber(TInt aScreenNumber); williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @prototype williamr@2: williamr@2: Mixin class to be derived from controller plugins that could support setting the initial screen for displaying video. williamr@2: */ williamr@2: class MMMFVideoSetInitScreenCustomCommandImplementor williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Sets the initial screen number. williamr@2: williamr@2: @param aScreenNumber williamr@2: The screen number williamr@2: */ williamr@2: virtual void MvsdSetInitScreenNumber(TInt aScreenNumber)=0; williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @prototype williamr@2: williamr@2: Custom command parser class to be used by controller plugins wishing to support setting the initial screen williamr@2: number for the video display. williamr@2: williamr@2: The controller plugin should create an object of this type and add it to the list of custom command parsers williamr@2: in the controller framework. The controller plugin must be derived from MMMFVideoSetInitScreenCustomCommandImplementor williamr@2: to use this class. williamr@2: */ williamr@2: class CMMFVideoSetInitScreenCustomCommandParser : public CMMFCustomCommandParserBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Creates a new custom command parser that supports setting screen device for video dusplay. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @return A pointer to the object created. williamr@2: williamr@2: */ williamr@2: IMPORT_C static CMMFVideoSetInitScreenCustomCommandParser* NewL(MMMFVideoSetInitScreenCustomCommandImplementor& aImplementor); williamr@2: williamr@2: /** williamr@2: Destructor. williamr@2: williamr@2: */ williamr@2: IMPORT_C ~CMMFVideoSetInitScreenCustomCommandParser(); williamr@2: williamr@2: /** williamr@2: Handles a request from the client. Called by the controller framework. williamr@2: williamr@2: @param aMessage williamr@2: The message to be handled. williamr@2: williamr@2: */ williamr@2: void HandleRequest(TMMFMessage& aMessage); williamr@2: williamr@2: private: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: */ williamr@2: CMMFVideoSetInitScreenCustomCommandParser(MMMFVideoSetInitScreenCustomCommandImplementor& aImplementor); williamr@2: void DoHandleRequestL(TMMFMessage& aMessage); williamr@2: TBool DoSetInitScreenNumberL(TMMFMessage& aMessage); williamr@2: williamr@2: private: williamr@2: MMMFVideoSetInitScreenCustomCommandImplementor& iImplementor; williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @prototype williamr@2: williamr@2: Client class to allow setting and getting the pixel aspect ratio for video recording. williamr@2: williamr@2: */ williamr@2: class RMMFVideoPixelAspectRatioCustomCommands : public RMMFCustomCommandsBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aController williamr@2: The client side controller object to be used by this custom command interface. williamr@2: williamr@2: */ williamr@2: IMPORT_C RMMFVideoPixelAspectRatioCustomCommands(RMMFController& aController); williamr@2: williamr@2: /** williamr@2: Sets the pixel aspect ratio for the video recording on the controller. williamr@2: williamr@2: @param aAspectRatio williamr@2: The new pixel aspect ratio. The default pixel aspect ratio is 1:1. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: */ williamr@2: IMPORT_C TInt SetPixelAspectRatio(const TVideoAspectRatio& aAspectRatio); williamr@2: williamr@2: /** williamr@2: Gets the current pixel aspect ratio for the video recording on the controller. williamr@2: williamr@2: @param aAspectRatio williamr@2: The current video pixel aspect ratio. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: */ williamr@2: IMPORT_C TInt GetPixelAspectRatio(TVideoAspectRatio& aAspectRatio) const; williamr@2: williamr@2: /** williamr@2: Gets the list of supported pixel aspect ratios for the video recording on the controller. williamr@2: williamr@2: @param aAspectRatios williamr@2: The supported pixel aspect ratios. williamr@2: williamr@2: @leave This method may leave with one of the system-wide error codes. williamr@2: */ williamr@2: IMPORT_C void GetSupportedPixelAspectRatiosL(RArray& aAspectRatios) const; williamr@2: williamr@2: private: williamr@2: void DoGetVideoPixelAspectRatioArrayL(RArray& aArray, TMMFVideoPixelAspectRatioMessages aIpc) const; williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @prototype williamr@2: williamr@2: Mixin class to be derived from controller plug-ins that could support setting and getting the pixel aspect ratio for video recording. williamr@2: */ williamr@2: class MMMFVideoPixelAspectRatioCustomCommandImplementor williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Sets the pixel aspect ratio. williamr@2: williamr@2: @param aAspectRatio williamr@2: The pixel aspect ratio to use. williamr@2: */ williamr@2: virtual void MvparSetPixelAspectRatioL(const TVideoAspectRatio& aAspectRatio) = 0; williamr@2: williamr@2: /** williamr@2: Gets the current pixel aspect ratio. williamr@2: williamr@2: @param aAspectRatio williamr@2: The current pixel aspect ratio. williamr@2: */ williamr@2: virtual void MvparGetPixelAspectRatioL(TVideoAspectRatio& aAspectRatio) = 0; williamr@2: williamr@2: /** williamr@2: Gets the list of supported pixel aspect ratios. williamr@2: williamr@2: @param aAspectRatios williamr@2: The list of supported pixel aspect ratios. williamr@2: */ williamr@2: virtual void MvparGetSupportedPixelAspectRatiosL(RArray& aAspectRatios) = 0; williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @prototype williamr@2: williamr@2: Custom command parser class to be used by controller plug-ins wishing to support setting and getting the pixel aspect williamr@2: ratio for the video recording. williamr@2: williamr@2: The controller plug-in should create an object of this type and add it to the list of custom command parsers williamr@2: in the controller framework. The controller plug-in must be derived from MMMFVideoPixelAspectRatioCustomCommandImplementor williamr@2: to use this class. williamr@2: */ williamr@2: class CMMFVideoPixelAspectRatioCustomCommandParser : public CMMFCustomCommandParserBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Creates a new custom command parser that supports setting and getting pixel aspect ratio for video recording. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plug-in that owns this new object. williamr@2: williamr@2: @return A pointer to the object created. williamr@2: williamr@2: */ williamr@2: IMPORT_C static CMMFVideoPixelAspectRatioCustomCommandParser* NewL(MMMFVideoPixelAspectRatioCustomCommandImplementor& aImplementor); williamr@2: williamr@2: /** williamr@2: Destructor. williamr@2: williamr@2: */ williamr@2: IMPORT_C ~CMMFVideoPixelAspectRatioCustomCommandParser(); williamr@2: williamr@2: /** williamr@2: Handles a request from the client. Called by the controller framework. williamr@2: williamr@2: @param aMessage williamr@2: The message to be handled. williamr@2: williamr@2: */ williamr@2: void HandleRequest(TMMFMessage& aMessage); williamr@2: williamr@2: private: williamr@2: CMMFVideoPixelAspectRatioCustomCommandParser(MMMFVideoPixelAspectRatioCustomCommandImplementor& aImplementor); williamr@2: void DoHandleRequestL(TMMFMessage& aMessage); williamr@2: TBool DoSetPixelAspectRatioL(TMMFMessage& aMessage); williamr@2: TBool DoGetPixelAspectRatioL(TMMFMessage& aMessage); williamr@2: TBool DoGetSupportedPixelAspectRatiosL(TMMFMessage& aMessage); williamr@2: TBool DoCopyArrayDataL(TMMFMessage& aMessage); williamr@2: void DoCreateBufFromVideoAspectRatioArrayL(RArray& aArray); williamr@2: williamr@2: private: williamr@2: MMMFVideoPixelAspectRatioCustomCommandImplementor& iImplementor; williamr@2: williamr@2: CBufFlat* iDataCopyBuffer; williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @prototype williamr@2: williamr@2: Client class to allow the audio sampling rate and channels configuration for video recording. williamr@2: williamr@2: */ williamr@2: class RMMFVideoAudioSamplingRateAndChannelConfigCustomCommands : public RMMFCustomCommandsBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aController williamr@2: The client side controller object to be used by this custom command interface. williamr@2: williamr@2: */ williamr@2: IMPORT_C RMMFVideoAudioSamplingRateAndChannelConfigCustomCommands(RMMFController& aController); williamr@2: williamr@2: /** williamr@2: Sets the number of audio channels to record (1 for mono, 2 for stereo). williamr@2: williamr@2: @param aChannels williamr@2: The number of audio channels to record. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: */ williamr@2: IMPORT_C TInt SetAudioChannels(const TUint aChannels); williamr@2: williamr@2: /** williamr@2: Gets the current number of audio channels to record (1 for mono, 2 for stereo). williamr@2: williamr@2: @param aChannels williamr@2: The current number of audio channels to record. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: */ williamr@2: IMPORT_C TInt GetAudioChannels(TUint& aChannels) const; williamr@2: williamr@2: /** williamr@2: Gets the list of supported number of audio channels for video recording. williamr@2: williamr@2: @param aChannels williamr@2: The supported numbers of audio channels. williamr@2: williamr@2: @leave This method may leave with one of the system-wide error codes. williamr@2: */ williamr@2: IMPORT_C void GetSupportedAudioChannelsL(RArray& aChannels) const; williamr@2: williamr@2: /** williamr@2: Sets the audio sample rate for video recording. williamr@2: williamr@2: @param aSampleRate williamr@2: The sample rate for audio recording. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: */ williamr@2: IMPORT_C TInt SetAudioSampleRate(const TUint aSampleRate); williamr@2: williamr@2: /** williamr@2: Gets the current audio sample rate for recording. williamr@2: williamr@2: @param aSampleRate williamr@2: The current audio sample rate for recording. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: */ williamr@2: IMPORT_C TInt GetAudioSampleRate(TUint& aSampleRate) const; williamr@2: williamr@2: /** williamr@2: Gets the list of supported audio sample rates for video recording. williamr@2: williamr@2: @param aSampleRates williamr@2: The supported audio sample rates. williamr@2: williamr@2: @leave This method may leave with one of the system-wide error codes. williamr@2: */ williamr@2: IMPORT_C void GetSupportedAudioSampleRatesL(RArray& aSampleRates) const; williamr@2: williamr@2: private: williamr@2: void DoGetUintArrayL(RArray& aArray, TMMFVideoAudioSamplingRateAndChannelConfigMessages aIpc) const; williamr@2: }; williamr@2: williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @prototype williamr@2: williamr@2: Mixin class to be derived from controller plug-ins that could support the audio sampling rate and channels configuration. williamr@2: */ williamr@2: class MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Sets the number of audio channels. williamr@2: williamr@2: @param aChannels williamr@2: The number of audio channels to use. williamr@2: */ williamr@2: virtual void MvasrccSetAudioChannelsL(const TUint aChannels) = 0; williamr@2: williamr@2: /** williamr@2: Gets the current number of audio channels. williamr@2: williamr@2: @param aChannels williamr@2: The current number of audio channels. williamr@2: */ williamr@2: virtual void MvasrccGetAudioChannelsL(TUint& aChannels) = 0; williamr@2: williamr@2: /** williamr@2: Gets the list of supported number of audio channels. williamr@2: williamr@2: @param aChannels williamr@2: The list of supported number of audio channels. williamr@2: */ williamr@2: virtual void MvasrccGetSupportedAudioChannelsL(RArray& aChannels) = 0; williamr@2: williamr@2: /** williamr@2: Sets the audio sample rate. williamr@2: williamr@2: @param aSampleRate williamr@2: The audio sample rate to use. williamr@2: */ williamr@2: virtual void MvasrccSetAudioSampleRateL(const TUint aSampleRate) = 0; williamr@2: williamr@2: /** williamr@2: Gets the current audio sample rate. williamr@2: williamr@2: @param aSampleRate williamr@2: The current audio sample rate. williamr@2: */ williamr@2: virtual void MvasrccGetAudioSampleRateL(TUint& aSampleRate) = 0; williamr@2: williamr@2: /** williamr@2: Gets the list of supported audio sample rates. williamr@2: williamr@2: @param aSampleRates williamr@2: The list of supported audio sample rates. williamr@2: */ williamr@2: virtual void MvasrccGetSupportedAudioSampleRatesL(RArray& aSampleRates) = 0; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @prototype williamr@2: williamr@2: Custom command parser class to be used by controller plug-ins wishing to support the audio sampling rate and channels williamr@2: configuration for the video recording. williamr@2: williamr@2: The controller plug-in should create an object of this type and add it to the list of custom command parsers williamr@2: in the controller framework. The controller plug-in must be derived from MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor williamr@2: to use this class. williamr@2: */ williamr@2: class CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser : public CMMFCustomCommandParserBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Creates a new custom command parser that supports the audio sampling rate and channels configuration for video recording. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plug-in that owns this new object. williamr@2: williamr@2: @return A pointer to the object created. williamr@2: williamr@2: */ williamr@2: IMPORT_C static CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser* NewL(MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& aImplementor); williamr@2: williamr@2: /** williamr@2: Destructor. williamr@2: williamr@2: */ williamr@2: IMPORT_C ~CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser(); williamr@2: williamr@2: /** williamr@2: Handles a request from the client. Called by the controller framework. williamr@2: williamr@2: @param aMessage williamr@2: The message to be handled. williamr@2: williamr@2: */ williamr@2: void HandleRequest(TMMFMessage& aMessage); williamr@2: williamr@2: private: williamr@2: CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser(MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& aImplementor); williamr@2: void DoHandleRequestL(TMMFMessage& aMessage); williamr@2: TBool DoSetAudioChannelsL(TMMFMessage& aMessage); williamr@2: TBool DoGetAudioChannelsL(TMMFMessage& aMessage); williamr@2: TBool DoGetSupportedAudioChannelsL(TMMFMessage& aMessage); williamr@2: williamr@2: TBool DoSetAudioSampleRateL(TMMFMessage& aMessage); williamr@2: TBool DoGetAudioSampleRateL(TMMFMessage& aMessage); williamr@2: TBool DoGetSupportedAudioSampleRatesL(TMMFMessage& aMessage); williamr@2: williamr@2: TBool DoCopyArrayDataL(TMMFMessage& aMessage); williamr@2: williamr@2: void DoCreateBufFromUintArrayL(RArray& aArray); williamr@2: williamr@2: private: williamr@2: MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& iImplementor; williamr@2: williamr@2: CBufFlat* iDataCopyBuffer; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @prototype williamr@2: */ williamr@2: const TUid KUidInterfaceMMFVideoPlayExt = {0x10283437}; williamr@2: williamr@2: /** williamr@2: Mixin class to be derived from controller plug-ins that could support williamr@2: play velocity, enabling/disabling audio/video, and auto scaling. williamr@2: williamr@2: @publishedPartner williamr@2: @prototype williamr@2: */ williamr@2: class MMMFVideoPlayControllerExtCustomCommandImplementor williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Sets play velocity. williamr@2: Behaviour is same as CVideoPlayerUtility::SetPlayVelocityL williamr@2: williamr@2: @see CVideoPlayerUtility::SetPlayVelocityL williamr@2: */ williamr@2: virtual void MvpecSetPlayVelocityL(TInt aVelocity)=0; williamr@2: williamr@2: /** williamr@2: Gets play velocity. williamr@2: Behaviour is same as CVideoPlayerUtility::PlayVelocityL williamr@2: williamr@2: @see CVideoPlayerUtility::PlayVelocityL williamr@2: */ williamr@2: virtual TInt MvpecPlayVelocityL()=0; williamr@2: williamr@2: /** williamr@2: Steps through frames in pause mode. williamr@2: Behaviour is same as CVideoPlayerUtility::StepFrameL williamr@2: williamr@2: @see CVideoPlayerUtility::StepFrameL williamr@2: */ williamr@2: virtual void MvpecStepFrameL(TInt aStep)=0; williamr@2: williamr@2: /** williamr@2: Gets play rate capabilities. williamr@2: Behaviour is same as CVideoPlayerUtility::GetPlayRateCapabilitiesL williamr@2: williamr@2: @see CVideoPlayerUtility::GetPlayRateCapabilitiesL williamr@2: */ williamr@2: virtual void MvpecGetPlayRateCapabilitiesL(TVideoPlayRateCapabilities& aCapabilities)=0; williamr@2: williamr@2: /** williamr@2: Enables/Disables video playback. williamr@2: Behaviour is same as CVideoPlayerUtility::SetVideoEnabledL williamr@2: williamr@2: @see CVideoPlayerUtility::SetVideoEnabledL williamr@2: */ williamr@2: virtual void MvpecSetVideoEnabledL(TBool aVideoEnabled)=0; williamr@2: williamr@2: /** williamr@2: Queries whether video playback is currently enabled or not. williamr@2: Behaviour is same as CVideoPlayerUtility::VideoEnabledL williamr@2: williamr@2: @see CVideoPlayerUtility::VideoEnabledL williamr@2: */ williamr@2: virtual TBool MvpecVideoEnabledL()=0; williamr@2: williamr@2: /** williamr@2: Enables or disables audio playback. williamr@2: Behaviour is same as CVideoPlayerUtility::SetAudioEnabled williamr@2: williamr@2: @see CVideoPlayerUtility::SetAudioEnabled williamr@2: */ williamr@2: virtual void MvpecSetAudioEnabledL(TBool aAudioEnabled)=0; williamr@2: williamr@2: /** williamr@2: Sets Auto scale mode. williamr@2: Behaviour is same as CVideoPlayerUtility::SetAutoScaleL williamr@2: williamr@2: @see CVideoPlayerUtility::SetAutoScaleL williamr@2: */ williamr@2: virtual void MvpecSetAutoScaleL(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos)=0; williamr@2: }; williamr@2: williamr@2: /** williamr@2: Used for commands between RMMFVideoPlayControllerExtCustomCommands and williamr@2: CMMFVideoPlayControllerExtCustomCommandParser classes. williamr@2: williamr@2: @internalComponent williamr@2: */ williamr@2: enum TMMFVideoPlayControllerExtCustomCommandConfigMessages williamr@2: { williamr@2: EMMFVideoPlayControllerSetPlayVelocity = 0, williamr@2: EMMFVideoPlayControllerPlayVelocity, williamr@2: EMMFVideoPlayControllerStepFrame, williamr@2: EMMFVideoPlayControllerGetPlayRateCapabilities, williamr@2: EMMFVideoPlayControllerSetVideoEnabled, williamr@2: EMMFVideoPlayControllerVideoEnabled, williamr@2: EMMFVideoPlayControllerSetAudioEnabled, williamr@2: EMMFVideoPlayControllerSetAutoScale williamr@2: }; williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: class TMMFVideoPlayAutoScaleParams williamr@2: { williamr@2: public: williamr@2: TAutoScaleType iScaleType; williamr@2: TInt iHorizPos; williamr@2: TInt iVertPos; williamr@2: }; williamr@2: williamr@2: /** williamr@2: Custom command parser class to be used by controller plug-ins wishing to support play velocity, williamr@2: enabling/disabling audio/video, and auto scaling. williamr@2: williamr@2: The controller plug-in should create an object of this type and add it to the list of custom command parsers williamr@2: in the controller framework. The controller plug-in must be derived from MMMFVideoPlayControllerExtCustomCommandImplementor williamr@2: to use this class. williamr@2: williamr@2: @publishedPartner williamr@2: @prototype williamr@2: */ williamr@2: class CMMFVideoPlayControllerExtCustomCommandParser : public CMMFCustomCommandParserBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Creates a new custom command parser that supports the video rate control and auto scaling. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plug-in that owns this new object. williamr@2: williamr@2: @return A pointer to the object created. williamr@2: williamr@2: */ williamr@2: IMPORT_C static CMMFVideoPlayControllerExtCustomCommandParser* NewL(MMMFVideoPlayControllerExtCustomCommandImplementor& aImplementor); williamr@2: williamr@2: /** williamr@2: Destructor. williamr@2: williamr@2: */ williamr@2: IMPORT_C ~CMMFVideoPlayControllerExtCustomCommandParser(); williamr@2: williamr@2: /** williamr@2: Handles a request from the client. Called by the controller framework. williamr@2: williamr@2: @param aMessage williamr@2: The message to be handled. williamr@2: williamr@2: */ williamr@2: void HandleRequest(TMMFMessage& aMessage); williamr@2: williamr@2: private: williamr@2: CMMFVideoPlayControllerExtCustomCommandParser(MMMFVideoPlayControllerExtCustomCommandImplementor& aImplementor); williamr@2: void DoHandleRequestL(TMMFMessage& aMessage); williamr@2: TBool DoSetPlayVelocityL(TMMFMessage& aMessage); williamr@2: TBool DoPlayVelocityL(TMMFMessage& aMessage); williamr@2: TBool DoStepFrameL(TMMFMessage& aMessage); williamr@2: TBool DoGetPlayRateCapabilitiesL(TMMFMessage& aMessage); williamr@2: TBool DoSetVideoEnabledL(TMMFMessage& aMessage); williamr@2: TBool DoVideoEnabledL(TMMFMessage& aMessage); williamr@2: TBool DoSetAudioEnabledL(TMMFMessage& aMessage); williamr@2: TBool DoSetAutoScaleL(TMMFMessage& aMessage); williamr@2: private: williamr@2: MMMFVideoPlayControllerExtCustomCommandImplementor& iImplementor; williamr@2: }; williamr@2: williamr@2: /** williamr@2: Resource class to be used by player utility for sending custom commands. williamr@2: williamr@2: @publishedPartner williamr@2: @prototype williamr@2: */ williamr@2: class RMMFVideoPlayControllerExtCustomCommands: public RMMFCustomCommandsBase williamr@2: { williamr@2: public: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aController williamr@2: The client side controller object to be used by this custom command interface. williamr@2: */ williamr@2: IMPORT_C RMMFVideoPlayControllerExtCustomCommands(RMMFController& aController); williamr@2: williamr@2: /** williamr@2: Sets play velocity. williamr@2: Behaviour is same as CVideoPlayerUtility::SetPlayVelocityL williamr@2: williamr@2: @param aVelocity williamr@2: Velocity of the playback. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @see CVideoPlayerUtility::SetPlayVelocityL williamr@2: */ williamr@2: IMPORT_C TInt SetPlayVelocity(TInt aVelocity); williamr@2: williamr@2: /** williamr@2: Gets play velocity. williamr@2: Behaviour is same as CVideoPlayerUtility::PlayVelocityL williamr@2: williamr@2: @param aVelocity williamr@2: Velocity of the playback. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @see CVideoPlayerUtility::PlayVelocityL williamr@2: */ williamr@2: IMPORT_C TInt PlayVelocity(TInt &aVelocity)const; williamr@2: williamr@2: /** williamr@2: Steps through frames in pause mode. williamr@2: Behaviour is same as CVideoPlayerUtility::StepFrameL williamr@2: williamr@2: @param aStep williamr@2: Count indicating number of frames to step playback position. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @see CVideoPlayerUtility::StepFrameL williamr@2: */ williamr@2: IMPORT_C TInt StepFrame(TInt aStep); williamr@2: williamr@2: /** williamr@2: Gets play rate capabilities. williamr@2: Behaviour is same as CVideoPlayerUtility::GetPlayRateCapabilitiesL williamr@2: williamr@2: @param aCapabilities Playback rate capabilities williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @see CVideoPlayerUtility::GetPlayRateCapabilitiesL williamr@2: */ williamr@2: IMPORT_C TInt GetPlayRateCapabilities(TVideoPlayRateCapabilities& aCapabilities)const; williamr@2: williamr@2: /** williamr@2: Enables/Disables video playback. williamr@2: Behaviour is same as CVideoPlayerUtility::SetVideoEnabledL williamr@2: williamr@2: @param aVideoEnabled ETrue to enable video playback, EFalse to disable williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @see CVideoPlayerUtility::SetVideoEnabledL williamr@2: */ williamr@2: IMPORT_C TInt SetVideoEnabled(TBool aVideoEnabled); williamr@2: williamr@2: /** williamr@2: Queries whether video playback is currently enabled or not. williamr@2: Behaviour is same as CVideoPlayerUtility::VideoEnabledL williamr@2: williamr@2: @param aVideoEnabled williamr@2: Out parameter returns ETrue if video playback is enabled, EFalse if not. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @see CVideoPlayerUtility::VideoEnabledL williamr@2: */ williamr@2: IMPORT_C TInt VideoEnabled(TBool &aVideoEnabled)const; williamr@2: williamr@2: /** williamr@2: Enables or disables audio playback. williamr@2: Behaviour is same as CVideoPlayerUtility::SetAudioEnabledL williamr@2: williamr@2: @param aVideoEnabled ETrue to enable audio playback, EFalse to disable williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @see CVideoPlayerUtility::SetAudioEnabledL williamr@2: */ williamr@2: IMPORT_C TInt SetAudioEnabled(TBool aAudioEnabled); williamr@2: williamr@2: /** williamr@2: Sets Auto scale mode. williamr@2: Behaviour is same as CVideoPlayerUtility::SetAutoScaleL williamr@2: williamr@2: @param aScaleType Automatic scaling type williamr@2: @param aHorizPos Video picture horizontal position, relative to the williamr@2: video window. williamr@2: @param aVertPos Video picture vertical position, relative to the williamr@2: video window. williamr@2: @return One of the system-wide error codes. williamr@2: williamr@2: @see CVideoPlayerUtility::SetAutoScaleL williamr@2: */ williamr@2: IMPORT_C TInt SetAutoScale(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos); williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @prototype williamr@2: */ williamr@2: const TUid KUidInterfaceMMFVideoRecorderExt = {0x10283438}; williamr@2: williamr@2: /** williamr@2: Mixin class to be derived from controller plug-ins that could support quality and enabling video. williamr@2: williamr@2: @publishedPartner williamr@2: @prototype williamr@2: */ williamr@2: class MMMFVideoRecordControllerExtCustomCommandImplementor williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Enabled or disables video in recorder. williamr@2: Behaviour is same as CVideoRecorderUtility::SetVideoEnabledL williamr@2: williamr@2: @see CVideoRecorderUtility::SetVideoEnabledL williamr@2: */ williamr@2: virtual void MvrecSetVideoEnabledL(TBool aEnabled)=0; williamr@2: /** williamr@2: Gets the flag that indicates video enabled or not. williamr@2: Behaviour is same as CVideoRecorderUtility::VideoEnabledL williamr@2: williamr@2: @see CVideoRecorderUtility::VideoEnabledL williamr@2: */ williamr@2: virtual TBool MvrecVideoEnabledL() const=0; williamr@2: /** williamr@2: Sets the quality of video being recorded. williamr@2: Behaviour is same as CVideoRecorderUtility::SetVideoQualityL williamr@2: williamr@2: @see CVideoRecorderUtility::SetVideoQualityL williamr@2: */ williamr@2: virtual void MvrecSetVideoQualityL(TInt aQuality)=0; williamr@2: /** williamr@2: Gets video quality level set using SetVideoQualityL. williamr@2: Behaviour is same as CVideoRecorderUtility::VideoQualityL williamr@2: williamr@2: @see CVideoRecorderUtility::VideoQualityL williamr@2: */ williamr@2: virtual TInt MvrecVideoQualityL() const=0; williamr@2: /** williamr@2: Sets the video framerate to fixed. williamr@2: Behaviour is same as CVideoRecorderUtility::SetVideoFrameRateFixedL williamr@2: williamr@2: @see CVideoRecorderUtility::SetVideoFrameRateFixedL williamr@2: */ williamr@2: virtual void MvrecSetVideoFrameRateFixedL(TBool aFixedFrameRate)=0; williamr@2: /** williamr@2: Gets FrameRateFixed flag set using SetVideoFrameRateFixedL. williamr@2: Behaviour is same as CVideoRecorderUtility::VideoFrameRateFixedL williamr@2: williamr@2: @see CVideoRecorderUtility::VideoFrameRateFixedL williamr@2: */ williamr@2: virtual TBool MvrecVideoFrameRateFixedL() const=0; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: enum TMMFVideoRecorderExtCustomCommandConfigMessages williamr@2: { williamr@2: EMMFVideoRecordControllerSetVideoEnabled = 0, williamr@2: EMMFVideoRecordControllerVideoEnabled, williamr@2: EMMFVideoRecordControllerSetVideoQuality, williamr@2: EMMFVideoRecordControllerVideoQuality, williamr@2: EMMFVideoRecordControllerSetVideoFrameRateFixed, williamr@2: EMMFVideoRecordControllerVideoFrameRateFixed williamr@2: }; williamr@2: williamr@2: /** williamr@2: Custom command parser class to be used by controller plug-ins wishing to implement VideoRecorderExt custom commands. williamr@2: williamr@2: The controller plug-in should create an object of this type and add it to the list of custom command parsers williamr@2: in the controller framework. The controller plug-in must be derived from MMMFVideoRecordControllerExtCustomCommandImplementor williamr@2: to use this class. williamr@2: williamr@2: @publishedPartner williamr@2: @prototype williamr@2: */ williamr@2: class CMMFVideoRecordControllerExtCustomCommandParser : public CMMFCustomCommandParserBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Creates a new custom command parser that supports the video rate control and auto scaling. williamr@2: williamr@2: @param aImplementor A reference to the controller plug-in that owns this new object. williamr@2: @return A pointer to the object created. williamr@2: */ williamr@2: IMPORT_C static CMMFVideoRecordControllerExtCustomCommandParser* NewL(MMMFVideoRecordControllerExtCustomCommandImplementor& aImplementor); williamr@2: williamr@2: /** williamr@2: Destructor. williamr@2: */ williamr@2: IMPORT_C ~CMMFVideoRecordControllerExtCustomCommandParser(); williamr@2: williamr@2: /** williamr@2: Handles a request from the client. Called by the controller framework. williamr@2: williamr@2: @param aMessage The message to be handled. williamr@2: */ williamr@2: void HandleRequest(TMMFMessage& aMessage); williamr@2: williamr@2: private: williamr@2: CMMFVideoRecordControllerExtCustomCommandParser(MMMFVideoRecordControllerExtCustomCommandImplementor& aImplementor); williamr@2: void DoHandleRequestL(TMMFMessage& aMessage); williamr@2: TBool DoSetVideoEnabledL(TMMFMessage& aMessage); williamr@2: TBool DoVideoEnabledL(TMMFMessage& aMessage); williamr@2: TBool DoSetVideoQualityL(TMMFMessage& aMessage); williamr@2: TBool DoVideoQualityL(TMMFMessage& aMessage); williamr@2: TBool DoSetVideoFrameRateFixedL(TMMFMessage& aMessage); williamr@2: TBool DoVideoFrameRateFixedL(TMMFMessage& aMessage); williamr@2: private: williamr@2: MMMFVideoRecordControllerExtCustomCommandImplementor& iImplementor; williamr@2: }; williamr@2: williamr@2: /** williamr@2: Resource class to be used by Recorder utility for sending custom commands. williamr@2: williamr@2: @publishedPartner williamr@2: @prototype williamr@2: */ williamr@2: class RMMFVideoRecordControllerExtCustomCommands: public RMMFCustomCommandsBase williamr@2: { williamr@2: public: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aController williamr@2: The client side controller object to be used by this custom command interface. williamr@2: @return One of the system-wide error codes. williamr@2: */ williamr@2: IMPORT_C RMMFVideoRecordControllerExtCustomCommands(RMMFController& aController); williamr@2: williamr@2: /** williamr@2: Enabled or disables video in recorder. williamr@2: Behaviour is same as CVideoRecorderUtility::SetVideoEnabledL williamr@2: williamr@2: @param aEnabled ETrue to enable video recording, EFalse to enable it williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: @see CVideoRecorderUtility::SetVideoEnabledL williamr@2: */ williamr@2: IMPORT_C TInt SetVideoEnabled(TBool aEnabled); williamr@2: williamr@2: /** williamr@2: Gets the flag that indicates video enabled or not. williamr@2: Behaviour is same as CVideoRecorderUtility::VideoEnabledL williamr@2: williamr@2: @param aEnabled williamr@2: Out parameter returns ETrue if video recording is enabled , EFalse otherwise. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: @see CVideoRecorderUtility::VideoEnabledL williamr@2: */ williamr@2: IMPORT_C TInt VideoEnabled(TBool &aEnabled) const; williamr@2: williamr@2: /** williamr@2: Sets the quality of video being recorded. williamr@2: Behaviour is same as CVideoRecorderUtility::SetVideoQualityL williamr@2: williamr@2: @param aQuality Video quality, in the range of 0 to 100, inclusive. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: @see CVideoRecorderUtility::SetVideoQualityL williamr@2: */ williamr@2: IMPORT_C TInt SetVideoQuality(TInt aQuality); williamr@2: williamr@2: /** williamr@2: Gets video quality level set using SetVideoQualityL. williamr@2: Behaviour is same as CVideoRecorderUtility::VideoQualityL williamr@2: williamr@2: @param aQuality Out parameter returning Video quality in the range 0-100. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: @see CVideoRecorderUtility::VideoQualityL williamr@2: */ williamr@2: IMPORT_C TInt VideoQuality(TInt &aQuality) const; williamr@2: williamr@2: /** williamr@2: Sets the video framerate to fixed. williamr@2: Behaviour is same as CVideoRecorderUtility::SetVideoFrameRateFixedL williamr@2: williamr@2: @param aFixedFrameRate ETrue to request a fixed framerate, EFalse to williamr@2: request a variable framerate. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: @see CVideoRecorderUtility::SetVideoFrameRateFixedL williamr@2: */ williamr@2: IMPORT_C TInt SetVideoFrameRateFixed(TBool aFixedFrameRate); williamr@2: williamr@2: /** williamr@2: Gets FrameRateFixed flag set using SetVideoFrameRateFixedL. williamr@2: Behaviour is same as CVideoRecorderUtility::VideoFrameRateFixedL williamr@2: williamr@2: @param aFixedFrameRate Out parameter returns ETrue if fixed framerate williamr@2: is enabled, EFalse otherwise. williamr@2: williamr@2: @return One of the system-wide error codes. williamr@2: @see CVideoRecorderUtility::VideoFrameRateFixedL williamr@2: */ williamr@2: IMPORT_C TInt VideoFrameRateFixed(TBool &aFixedFrameRate) const; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: williamr@2: Interface UID and messages for the Audio Play Controller Set Repeats API. williamr@2: */ williamr@2: const TUid KUidInterfaceMMFAudioPlaySetRepeatsController = {0x102834D5}; williamr@2: williamr@2: /** williamr@2: @internalComponent williamr@2: */ williamr@2: enum TMMFAudioPlayControllerSetRepeatsMessages williamr@2: { williamr@2: EMMFAudioPlayControllerSetRepeats williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: williamr@2: Client class to access loop play functionality of audio play controller. williamr@2: williamr@2: The class uses the custom command function of the controller plugin, and removes the necessity williamr@2: for the client to formulate the custom commands. williamr@2: */ williamr@2: class RMMFAudioPlayControllerSetRepeatsCustomCommands : public RMMFCustomCommandsBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aController williamr@2: The client side controller object to be used by this custom command interface. williamr@2: */ williamr@2: IMPORT_C RMMFAudioPlayControllerSetRepeatsCustomCommands(RMMFController& aController); williamr@2: williamr@2: /** williamr@2: Sets the number of times the audio sample to be repeated and the trailing silence period williamr@2: williamr@2: @param aRepeatNumberOfTimes williamr@2: The number of times the audio sample needs to be repeated williamr@2: williamr@2: @param aTrailingSilence williamr@2: The time interval of the trailing silence in microseconds. williamr@2: williamr@2: @return KErrNotSupported if the controller plugin does not support the loop play functionality. williamr@2: */ williamr@2: IMPORT_C TInt SetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence); williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: williamr@2: Mixin class to be derived from by controller plugins that could support the set repeats custom command. williamr@2: */ williamr@2: class MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Sets the number of times the audio sample is to be repeated during the playback operation. williamr@2: A period of silence can follow each playing of the sample. The audio sample can be repeated indefinitely. williamr@2: williamr@2: @param aRepeatNumberOfTimes williamr@2: The number of times the audio sample, together with the trailing silence, is to be repeated. williamr@2: If this is set to KMdaRepeatForever, then the audio sample, together with the trailing silence, williamr@2: is repeated indefinitely or until Stop() is called. williamr@2: If this is set to zero, then the audio sample is not repeated. williamr@2: williamr@2: @param aTrailingSilence williamr@2: The time interval of the trailing silence in microseconds. williamr@2: williamr@2: @return KErrNone if the controller plugin supports the loop play functionality williamr@2: KErrNotSupported if the controller plugin does not support the loop play functionality williamr@2: KErrNotReady if the controller plugin is not yet added the audio sink williamr@2: */ williamr@2: virtual TInt MapcSetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence) = 0; williamr@2: }; williamr@2: williamr@2: /** williamr@2: @publishedPartner williamr@2: @released williamr@2: williamr@2: Custom command parser class to be used by controller plugins wishing to support set repeats functionality williamr@2: williamr@2: The controller plugin should create an object of this type and add it to the list of custom command parsers williamr@2: in the controller framework. The controller plugin must be derived from williamr@2: MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor to use this class. williamr@2: */ williamr@2: williamr@2: class CMMFAudioPlayControllerSetRepeatsCustomCommandParser : public CMMFCustomCommandParserBase williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: Creates a new custom command parser capable of handling set repeats controller commands. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: @return A pointer to the object created. williamr@2: williamr@2: */ williamr@2: IMPORT_C static CMMFAudioPlayControllerSetRepeatsCustomCommandParser* NewL(MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& aImplementor); williamr@2: williamr@2: /** williamr@2: Destructor. williamr@2: williamr@2: */ williamr@2: IMPORT_C ~CMMFAudioPlayControllerSetRepeatsCustomCommandParser(); williamr@2: williamr@2: /** williamr@2: Handles a request from the client. Called by the controller framework. williamr@2: williamr@2: @param aMessage williamr@2: The message to be handled. williamr@2: williamr@2: */ williamr@2: void HandleRequest(TMMFMessage& aMessage); williamr@2: private: williamr@2: williamr@2: /** williamr@2: Constructor. williamr@2: williamr@2: @param aImplementor williamr@2: A reference to the controller plugin that owns this new object. williamr@2: williamr@2: */ williamr@2: CMMFAudioPlayControllerSetRepeatsCustomCommandParser(MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& aImplementor); williamr@2: // Internal request handling methods. williamr@2: void DoHandleRequestL(TMMFMessage& aMessage); williamr@2: TBool DoSetRepeatsL(TMMFMessage& aMessage); williamr@2: private: williamr@2: /** williamr@2: The object that implements the set repeats custom command i.e controller plugin williamr@2: */ williamr@2: MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& iImplementor; williamr@2: }; williamr@2: williamr@2: #endif