sl@0: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef __MMFSTANDARDCUSTOMCOMMANDS_IMPL_H sl@0: #define __MMFSTANDARDCUSTOMCOMMANDS_IMPL_H sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: class CMMFVideoFrameMessage; sl@0: class CFbsBitmap; sl@0: class CDesC8Array; sl@0: sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Client class to allow setting the initial screen for video display. sl@0: sl@0: */ sl@0: class RMMFVideoSetInitScreenCustomCommands : public RMMFCustomCommandsBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aController sl@0: The client side controller object to be used by this custom command interface. sl@0: sl@0: */ sl@0: IMPORT_C RMMFVideoSetInitScreenCustomCommands(RMMFController& aController); sl@0: sl@0: /** sl@0: Sets the initial screen number for the video display on the controller. sl@0: sl@0: @param aScreenNumber sl@0: The screen number sl@0: sl@0: */ sl@0: IMPORT_C TInt SetInitScreenNumber(TInt aScreenNumber); sl@0: }; sl@0: sl@0: sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Mixin class to be derived from controller plugins that could support setting the initial screen for displaying video. sl@0: */ sl@0: class MMMFVideoSetInitScreenCustomCommandImplementor sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Sets the initial screen number. sl@0: sl@0: @param aScreenNumber sl@0: The screen number sl@0: */ sl@0: virtual void MvsdSetInitScreenNumber(TInt aScreenNumber)=0; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Custom command parser class to be used by controller plugins wishing to support setting the initial screen sl@0: number for the video display. sl@0: sl@0: The controller plugin should create an object of this type and add it to the list of custom command parsers sl@0: in the controller framework. The controller plugin must be derived from MMMFVideoSetInitScreenCustomCommandImplementor sl@0: to use this class. sl@0: */ sl@0: class CMMFVideoSetInitScreenCustomCommandParser : public CMMFCustomCommandParserBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Creates a new custom command parser that supports setting screen device for video dusplay. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @return A pointer to the object created. sl@0: sl@0: */ sl@0: IMPORT_C static CMMFVideoSetInitScreenCustomCommandParser* NewL(MMMFVideoSetInitScreenCustomCommandImplementor& aImplementor); sl@0: sl@0: /** sl@0: Destructor. sl@0: sl@0: */ sl@0: IMPORT_C ~CMMFVideoSetInitScreenCustomCommandParser(); sl@0: sl@0: /** sl@0: Handles a request from the client. Called by the controller framework. sl@0: sl@0: @param aMessage sl@0: The message to be handled. sl@0: sl@0: */ sl@0: void HandleRequest(TMMFMessage& aMessage); sl@0: sl@0: private: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: */ sl@0: CMMFVideoSetInitScreenCustomCommandParser(MMMFVideoSetInitScreenCustomCommandImplementor& aImplementor); sl@0: void DoHandleRequestL(TMMFMessage& aMessage); sl@0: TBool DoSetInitScreenNumberL(TMMFMessage& aMessage); sl@0: sl@0: private: sl@0: MMMFVideoSetInitScreenCustomCommandImplementor& iImplementor; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: WARNING: For internal use ONLY. Compatibility is not guaranteed in future releases. sl@0: @internalComponent sl@0: */ sl@0: enum TMMFVideoPixelAspectRatioMessages sl@0: { sl@0: EMMFVideoGetPixelAspectRatio, sl@0: EMMFVideoSetPixelAspectRatio, sl@0: EMMFVideoGetSupportedPixelAspectRatios, sl@0: EMMFVideoPixelAspectRatioCopyArrayData sl@0: }; sl@0: sl@0: /** sl@0: WARNING: For internal use ONLY. Compatibility is not guaranteed in future releases. sl@0: @internalComponent sl@0: */ sl@0: enum TMMFVideoAudioSamplingRateAndChannelConfigMessages sl@0: { sl@0: EMMFVideoGetAudioChannels, sl@0: EMMFVideoSetAudioChannels, sl@0: EMMFVideoGetSupportedAudioChannels, sl@0: EMMFVideoGetAudioSampleRate, sl@0: EMMFVideoSetAudioSampleRate, sl@0: EMMFVideoGetSupportedAudioSampleRates, sl@0: EMMFVideoAudioSamplingRateAndChannelConfigCopyArrayData sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Client class to allow setting and getting the pixel aspect ratio for video recording. sl@0: sl@0: */ sl@0: class RMMFVideoPixelAspectRatioCustomCommands : public RMMFCustomCommandsBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aController sl@0: The client side controller object to be used by this custom command interface. sl@0: sl@0: */ sl@0: IMPORT_C RMMFVideoPixelAspectRatioCustomCommands(RMMFController& aController); sl@0: sl@0: /** sl@0: Sets the pixel aspect ratio for the video recording on the controller. sl@0: sl@0: @param aAspectRatio sl@0: The new pixel aspect ratio. The default pixel aspect ratio is 1:1. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: */ sl@0: IMPORT_C TInt SetPixelAspectRatio(const TVideoAspectRatio& aAspectRatio); sl@0: sl@0: /** sl@0: Gets the current pixel aspect ratio for the video recording on the controller. sl@0: sl@0: @param aAspectRatio sl@0: The current video pixel aspect ratio. sl@0: sl@0: @return One of the system-wide error codes. sl@0: */ sl@0: IMPORT_C TInt GetPixelAspectRatio(TVideoAspectRatio& aAspectRatio) const; sl@0: sl@0: /** sl@0: Gets the list of supported pixel aspect ratios for the video recording on the controller. sl@0: sl@0: @param aAspectRatios sl@0: The supported pixel aspect ratios. sl@0: sl@0: @leave This method may leave with one of the system-wide error codes. sl@0: */ sl@0: IMPORT_C void GetSupportedPixelAspectRatiosL(RArray& aAspectRatios) const; sl@0: sl@0: private: sl@0: void DoGetVideoPixelAspectRatioArrayL(RArray& aArray, TMMFVideoPixelAspectRatioMessages aIpc) const; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Mixin class to be derived from controller plug-ins that could support setting and getting the pixel aspect ratio for video recording. sl@0: */ sl@0: class MMMFVideoPixelAspectRatioCustomCommandImplementor sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Sets the pixel aspect ratio. sl@0: sl@0: @param aAspectRatio sl@0: The pixel aspect ratio to use. sl@0: */ sl@0: virtual void MvparSetPixelAspectRatioL(const TVideoAspectRatio& aAspectRatio) = 0; sl@0: sl@0: /** sl@0: Gets the current pixel aspect ratio. sl@0: sl@0: @param aAspectRatio sl@0: The current pixel aspect ratio. sl@0: */ sl@0: virtual void MvparGetPixelAspectRatioL(TVideoAspectRatio& aAspectRatio) = 0; sl@0: sl@0: /** sl@0: Gets the list of supported pixel aspect ratios. sl@0: sl@0: @param aAspectRatios sl@0: The list of supported pixel aspect ratios. sl@0: */ sl@0: virtual void MvparGetSupportedPixelAspectRatiosL(RArray& aAspectRatios) = 0; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Custom command parser class to be used by controller plug-ins wishing to support setting and getting the pixel aspect sl@0: ratio for the video recording. sl@0: sl@0: The controller plug-in should create an object of this type and add it to the list of custom command parsers sl@0: in the controller framework. The controller plug-in must be derived from MMMFVideoPixelAspectRatioCustomCommandImplementor sl@0: to use this class. sl@0: */ sl@0: class CMMFVideoPixelAspectRatioCustomCommandParser : public CMMFCustomCommandParserBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Creates a new custom command parser that supports setting and getting pixel aspect ratio for video recording. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plug-in that owns this new object. sl@0: sl@0: @return A pointer to the object created. sl@0: sl@0: */ sl@0: IMPORT_C static CMMFVideoPixelAspectRatioCustomCommandParser* NewL(MMMFVideoPixelAspectRatioCustomCommandImplementor& aImplementor); sl@0: sl@0: /** sl@0: Destructor. sl@0: sl@0: */ sl@0: IMPORT_C ~CMMFVideoPixelAspectRatioCustomCommandParser(); sl@0: sl@0: /** sl@0: Handles a request from the client. Called by the controller framework. sl@0: sl@0: @param aMessage sl@0: The message to be handled. sl@0: sl@0: */ sl@0: void HandleRequest(TMMFMessage& aMessage); sl@0: sl@0: private: sl@0: CMMFVideoPixelAspectRatioCustomCommandParser(MMMFVideoPixelAspectRatioCustomCommandImplementor& aImplementor); sl@0: void DoHandleRequestL(TMMFMessage& aMessage); sl@0: TBool DoSetPixelAspectRatioL(TMMFMessage& aMessage); sl@0: TBool DoGetPixelAspectRatioL(TMMFMessage& aMessage); sl@0: TBool DoGetSupportedPixelAspectRatiosL(TMMFMessage& aMessage); sl@0: TBool DoCopyArrayDataL(TMMFMessage& aMessage); sl@0: void DoCreateBufFromVideoAspectRatioArrayL(RArray& aArray); sl@0: sl@0: private: sl@0: MMMFVideoPixelAspectRatioCustomCommandImplementor& iImplementor; sl@0: sl@0: CBufFlat* iDataCopyBuffer; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Client class to allow the audio sampling rate and channels configuration for video recording. sl@0: sl@0: */ sl@0: class RMMFVideoAudioSamplingRateAndChannelConfigCustomCommands : public RMMFCustomCommandsBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aController sl@0: The client side controller object to be used by this custom command interface. sl@0: sl@0: */ sl@0: IMPORT_C RMMFVideoAudioSamplingRateAndChannelConfigCustomCommands(RMMFController& aController); sl@0: sl@0: /** sl@0: Sets the number of audio channels to record (1 for mono, 2 for stereo). sl@0: sl@0: @param aChannels sl@0: The number of audio channels to record. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: */ sl@0: IMPORT_C TInt SetAudioChannels(const TUint aChannels); sl@0: sl@0: /** sl@0: Gets the current number of audio channels to record (1 for mono, 2 for stereo). sl@0: sl@0: @param aChannels sl@0: The current number of audio channels to record. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: */ sl@0: IMPORT_C TInt GetAudioChannels(TUint& aChannels) const; sl@0: sl@0: /** sl@0: Gets the list of supported number of audio channels for video recording. sl@0: sl@0: @param aChannels sl@0: The supported numbers of audio channels. sl@0: sl@0: @leave This method may leave with one of the system-wide error codes. sl@0: */ sl@0: IMPORT_C void GetSupportedAudioChannelsL(RArray& aChannels) const; sl@0: sl@0: /** sl@0: Sets the audio sample rate for video recording. sl@0: sl@0: @param aSampleRate sl@0: The sample rate for audio recording. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: */ sl@0: IMPORT_C TInt SetAudioSampleRate(const TUint aSampleRate); sl@0: sl@0: /** sl@0: Gets the current audio sample rate for recording. sl@0: sl@0: @param aSampleRate sl@0: The current audio sample rate for recording. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: */ sl@0: IMPORT_C TInt GetAudioSampleRate(TUint& aSampleRate) const; sl@0: sl@0: /** sl@0: Gets the list of supported audio sample rates for video recording. sl@0: sl@0: @param aSampleRates sl@0: The supported audio sample rates. sl@0: sl@0: @leave This method may leave with one of the system-wide error codes. sl@0: */ sl@0: IMPORT_C void GetSupportedAudioSampleRatesL(RArray& aSampleRates) const; sl@0: sl@0: private: sl@0: void DoGetUintArrayL(RArray& aArray, TMMFVideoAudioSamplingRateAndChannelConfigMessages aIpc) const; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Mixin class to be derived from controller plug-ins that could support the audio sampling rate and channels configuration. sl@0: */ sl@0: class MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Sets the number of audio channels. sl@0: sl@0: @param aChannels sl@0: The number of audio channels to use. sl@0: */ sl@0: virtual void MvasrccSetAudioChannelsL(const TUint aChannels) = 0; sl@0: sl@0: /** sl@0: Gets the current number of audio channels. sl@0: sl@0: @param aChannels sl@0: The current number of audio channels. sl@0: */ sl@0: virtual void MvasrccGetAudioChannelsL(TUint& aChannels) = 0; sl@0: sl@0: /** sl@0: Gets the list of supported number of audio channels. sl@0: sl@0: @param aChannels sl@0: The list of supported number of audio channels. sl@0: */ sl@0: virtual void MvasrccGetSupportedAudioChannelsL(RArray& aChannels) = 0; sl@0: sl@0: /** sl@0: Sets the audio sample rate. sl@0: sl@0: @param aSampleRate sl@0: The audio sample rate to use. sl@0: */ sl@0: virtual void MvasrccSetAudioSampleRateL(const TUint aSampleRate) = 0; sl@0: sl@0: /** sl@0: Gets the current audio sample rate. sl@0: sl@0: @param aSampleRate sl@0: The current audio sample rate. sl@0: */ sl@0: virtual void MvasrccGetAudioSampleRateL(TUint& aSampleRate) = 0; sl@0: sl@0: /** sl@0: Gets the list of supported audio sample rates. sl@0: sl@0: @param aSampleRates sl@0: The list of supported audio sample rates. sl@0: */ sl@0: virtual void MvasrccGetSupportedAudioSampleRatesL(RArray& aSampleRates) = 0; sl@0: }; sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Custom command parser class to be used by controller plug-ins wishing to support the audio sampling rate and channels sl@0: configuration for the video recording. sl@0: sl@0: The controller plug-in should create an object of this type and add it to the list of custom command parsers sl@0: in the controller framework. The controller plug-in must be derived from MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor sl@0: to use this class. sl@0: */ sl@0: class CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser : public CMMFCustomCommandParserBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Creates a new custom command parser that supports the audio sampling rate and channels configuration for video recording. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plug-in that owns this new object. sl@0: sl@0: @return A pointer to the object created. sl@0: sl@0: */ sl@0: IMPORT_C static CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser* NewL(MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& aImplementor); sl@0: sl@0: /** sl@0: Destructor. sl@0: sl@0: */ sl@0: IMPORT_C ~CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser(); sl@0: sl@0: /** sl@0: Handles a request from the client. Called by the controller framework. sl@0: sl@0: @param aMessage sl@0: The message to be handled. sl@0: sl@0: */ sl@0: void HandleRequest(TMMFMessage& aMessage); sl@0: sl@0: private: sl@0: CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser(MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& aImplementor); sl@0: void DoHandleRequestL(TMMFMessage& aMessage); sl@0: TBool DoSetAudioChannelsL(TMMFMessage& aMessage); sl@0: TBool DoGetAudioChannelsL(TMMFMessage& aMessage); sl@0: TBool DoGetSupportedAudioChannelsL(TMMFMessage& aMessage); sl@0: sl@0: TBool DoSetAudioSampleRateL(TMMFMessage& aMessage); sl@0: TBool DoGetAudioSampleRateL(TMMFMessage& aMessage); sl@0: TBool DoGetSupportedAudioSampleRatesL(TMMFMessage& aMessage); sl@0: sl@0: TBool DoCopyArrayDataL(TMMFMessage& aMessage); sl@0: sl@0: void DoCreateBufFromUintArrayL(RArray& aArray); sl@0: sl@0: private: sl@0: MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& iImplementor; sl@0: sl@0: CBufFlat* iDataCopyBuffer; sl@0: }; sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: const TUid KUidInterfaceMMFVideoPlayExt = {0x10283437}; sl@0: sl@0: class TVideoPlayRateCapabilities; sl@0: sl@0: /** sl@0: Mixin class to be derived from controller plug-ins that could support sl@0: play velocity, enabling/disabling audio/video, and auto scaling. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class MMMFVideoPlayControllerExtCustomCommandImplementor sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Sets play velocity. sl@0: Behaviour is same as CVideoPlayerUtility::SetPlayVelocityL sl@0: sl@0: @see CVideoPlayerUtility::SetPlayVelocityL sl@0: */ sl@0: virtual void MvpecSetPlayVelocityL(TInt aVelocity)=0; sl@0: sl@0: /** sl@0: Gets play velocity. sl@0: Behaviour is same as CVideoPlayerUtility::PlayVelocityL sl@0: sl@0: @see CVideoPlayerUtility::PlayVelocityL sl@0: */ sl@0: virtual TInt MvpecPlayVelocityL()=0; sl@0: sl@0: /** sl@0: Steps through frames in pause mode. sl@0: Behaviour is same as CVideoPlayerUtility::StepFrameL sl@0: sl@0: @see CVideoPlayerUtility::StepFrameL sl@0: */ sl@0: virtual void MvpecStepFrameL(TInt aStep)=0; sl@0: sl@0: /** sl@0: Gets play rate capabilities. sl@0: Behaviour is same as CVideoPlayerUtility::GetPlayRateCapabilitiesL sl@0: sl@0: @see CVideoPlayerUtility::GetPlayRateCapabilitiesL sl@0: */ sl@0: virtual void MvpecGetPlayRateCapabilitiesL(TVideoPlayRateCapabilities& aCapabilities)=0; sl@0: sl@0: /** sl@0: Enables/Disables video playback. sl@0: Behaviour is same as CVideoPlayerUtility::SetVideoEnabledL sl@0: sl@0: @see CVideoPlayerUtility::SetVideoEnabledL sl@0: */ sl@0: virtual void MvpecSetVideoEnabledL(TBool aVideoEnabled)=0; sl@0: sl@0: /** sl@0: Queries whether video playback is currently enabled or not. sl@0: Behaviour is same as CVideoPlayerUtility::VideoEnabledL sl@0: sl@0: @see CVideoPlayerUtility::VideoEnabledL sl@0: */ sl@0: virtual TBool MvpecVideoEnabledL()=0; sl@0: sl@0: /** sl@0: Enables or disables audio playback. sl@0: Behaviour is same as CVideoPlayerUtility::SetAudioEnabled sl@0: sl@0: @see CVideoPlayerUtility::SetAudioEnabled sl@0: */ sl@0: virtual void MvpecSetAudioEnabledL(TBool aAudioEnabled)=0; sl@0: sl@0: /** sl@0: Sets Auto scale mode. sl@0: Behaviour is same as CVideoPlayerUtility::SetAutoScaleL sl@0: sl@0: @see CVideoPlayerUtility::SetAutoScaleL sl@0: */ sl@0: virtual void MvpecSetAutoScaleL(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos)=0; sl@0: }; sl@0: sl@0: sl@0: sl@0: /** sl@0: Custom command parser class to be used by controller plug-ins wishing to support play velocity, sl@0: enabling/disabling audio/video, and auto scaling. sl@0: sl@0: The controller plug-in should create an object of this type and add it to the list of custom command parsers sl@0: in the controller framework. The controller plug-in must be derived from MMMFVideoPlayControllerExtCustomCommandImplementor sl@0: to use this class. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class CMMFVideoPlayControllerExtCustomCommandParser : public CMMFCustomCommandParserBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Creates a new custom command parser that supports the video rate control and auto scaling. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plug-in that owns this new object. sl@0: sl@0: @return A pointer to the object created. sl@0: sl@0: */ sl@0: IMPORT_C static CMMFVideoPlayControllerExtCustomCommandParser* NewL(MMMFVideoPlayControllerExtCustomCommandImplementor& aImplementor); sl@0: sl@0: /** sl@0: Destructor. sl@0: sl@0: */ sl@0: IMPORT_C ~CMMFVideoPlayControllerExtCustomCommandParser(); sl@0: sl@0: /** sl@0: Handles a request from the client. Called by the controller framework. sl@0: sl@0: @param aMessage sl@0: The message to be handled. sl@0: sl@0: */ sl@0: void HandleRequest(TMMFMessage& aMessage); sl@0: sl@0: private: sl@0: CMMFVideoPlayControllerExtCustomCommandParser(MMMFVideoPlayControllerExtCustomCommandImplementor& aImplementor); sl@0: void DoHandleRequestL(TMMFMessage& aMessage); sl@0: TBool DoSetPlayVelocityL(TMMFMessage& aMessage); sl@0: TBool DoPlayVelocityL(TMMFMessage& aMessage); sl@0: TBool DoStepFrameL(TMMFMessage& aMessage); sl@0: TBool DoGetPlayRateCapabilitiesL(TMMFMessage& aMessage); sl@0: TBool DoSetVideoEnabledL(TMMFMessage& aMessage); sl@0: TBool DoVideoEnabledL(TMMFMessage& aMessage); sl@0: TBool DoSetAudioEnabledL(TMMFMessage& aMessage); sl@0: TBool DoSetAutoScaleL(TMMFMessage& aMessage); sl@0: private: sl@0: MMMFVideoPlayControllerExtCustomCommandImplementor& iImplementor; sl@0: }; sl@0: sl@0: /** sl@0: Resource class to be used by player utility for sending custom commands. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class RMMFVideoPlayControllerExtCustomCommands: public RMMFCustomCommandsBase sl@0: { sl@0: public: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aController sl@0: The client side controller object to be used by this custom command interface. sl@0: */ sl@0: IMPORT_C RMMFVideoPlayControllerExtCustomCommands(RMMFController& aController); sl@0: sl@0: /** sl@0: Sets play velocity. sl@0: Behaviour is same as CVideoPlayerUtility::SetPlayVelocityL sl@0: sl@0: @param aVelocity sl@0: Velocity of the playback. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @see CVideoPlayerUtility::SetPlayVelocityL sl@0: */ sl@0: IMPORT_C TInt SetPlayVelocity(TInt aVelocity); sl@0: sl@0: /** sl@0: Gets play velocity. sl@0: Behaviour is same as CVideoPlayerUtility::PlayVelocityL sl@0: sl@0: @param aVelocity sl@0: Velocity of the playback. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @see CVideoPlayerUtility::PlayVelocityL sl@0: */ sl@0: IMPORT_C TInt PlayVelocity(TInt &aVelocity)const; sl@0: sl@0: /** sl@0: Steps through frames in pause mode. sl@0: Behaviour is same as CVideoPlayerUtility::StepFrameL sl@0: sl@0: @param aStep sl@0: Count indicating number of frames to step playback position. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @see CVideoPlayerUtility::StepFrameL sl@0: */ sl@0: IMPORT_C TInt StepFrame(TInt aStep); sl@0: sl@0: /** sl@0: Gets play rate capabilities. sl@0: Behaviour is same as CVideoPlayerUtility::GetPlayRateCapabilitiesL sl@0: sl@0: @param aCapabilities Playback rate capabilities sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @see CVideoPlayerUtility::GetPlayRateCapabilitiesL sl@0: */ sl@0: IMPORT_C TInt GetPlayRateCapabilities(TVideoPlayRateCapabilities& aCapabilities)const; sl@0: sl@0: /** sl@0: Enables/Disables video playback. sl@0: Behaviour is same as CVideoPlayerUtility::SetVideoEnabledL sl@0: sl@0: @param aVideoEnabled ETrue to enable video playback, EFalse to disable sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @see CVideoPlayerUtility::SetVideoEnabledL sl@0: */ sl@0: IMPORT_C TInt SetVideoEnabled(TBool aVideoEnabled); sl@0: sl@0: /** sl@0: Queries whether video playback is currently enabled or not. sl@0: Behaviour is same as CVideoPlayerUtility::VideoEnabledL sl@0: sl@0: @param aVideoEnabled sl@0: Out parameter returns ETrue if video playback is enabled, EFalse if not. sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @see CVideoPlayerUtility::VideoEnabledL sl@0: */ sl@0: IMPORT_C TInt VideoEnabled(TBool &aVideoEnabled)const; sl@0: sl@0: /** sl@0: Enables or disables audio playback. sl@0: Behaviour is same as CVideoPlayerUtility::SetAudioEnabledL sl@0: sl@0: @param aVideoEnabled ETrue to enable audio playback, EFalse to disable sl@0: sl@0: @return One of the system-wide error codes. sl@0: sl@0: @see CVideoPlayerUtility::SetAudioEnabledL sl@0: */ sl@0: IMPORT_C TInt SetAudioEnabled(TBool aAudioEnabled); sl@0: sl@0: /** sl@0: Sets Auto scale mode. sl@0: Behaviour is same as CVideoPlayerUtility::SetAutoScaleL sl@0: sl@0: @param aScaleType Automatic scaling type sl@0: @param aHorizPos Video picture horizontal position, relative to the sl@0: video window. sl@0: @param aVertPos Video picture vertical position, relative to the sl@0: video window. sl@0: @return One of the system-wide error codes. sl@0: sl@0: @see CVideoPlayerUtility::SetAutoScaleL sl@0: */ sl@0: IMPORT_C TInt SetAutoScale(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos); sl@0: }; sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: const TUid KUidInterfaceMMFVideoRecorderExt = {0x10283438}; sl@0: sl@0: /** sl@0: Mixin class to be derived from controller plug-ins that could support quality and enabling video. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class MMMFVideoRecordControllerExtCustomCommandImplementor sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Enabled or disables video in recorder. sl@0: Behaviour is same as CVideoRecorderUtility::SetVideoEnabledL sl@0: sl@0: @see CVideoRecorderUtility::SetVideoEnabledL sl@0: */ sl@0: virtual void MvrecSetVideoEnabledL(TBool aEnabled)=0; sl@0: /** sl@0: Gets the flag that indicates video enabled or not. sl@0: Behaviour is same as CVideoRecorderUtility::VideoEnabledL sl@0: sl@0: @see CVideoRecorderUtility::VideoEnabledL sl@0: */ sl@0: virtual TBool MvrecVideoEnabledL() const=0; sl@0: /** sl@0: Sets the quality of video being recorded. sl@0: Behaviour is same as CVideoRecorderUtility::SetVideoQualityL sl@0: sl@0: @see CVideoRecorderUtility::SetVideoQualityL sl@0: */ sl@0: virtual void MvrecSetVideoQualityL(TInt aQuality)=0; sl@0: /** sl@0: Gets video quality level set using SetVideoQualityL. sl@0: Behaviour is same as CVideoRecorderUtility::VideoQualityL sl@0: sl@0: @see CVideoRecorderUtility::VideoQualityL sl@0: */ sl@0: virtual TInt MvrecVideoQualityL() const=0; sl@0: /** sl@0: Sets the video framerate to fixed. sl@0: Behaviour is same as CVideoRecorderUtility::SetVideoFrameRateFixedL sl@0: sl@0: @see CVideoRecorderUtility::SetVideoFrameRateFixedL sl@0: */ sl@0: virtual void MvrecSetVideoFrameRateFixedL(TBool aFixedFrameRate)=0; sl@0: /** sl@0: Gets FrameRateFixed flag set using SetVideoFrameRateFixedL. sl@0: Behaviour is same as CVideoRecorderUtility::VideoFrameRateFixedL sl@0: sl@0: @see CVideoRecorderUtility::VideoFrameRateFixedL sl@0: */ sl@0: virtual TBool MvrecVideoFrameRateFixedL() const=0; sl@0: }; sl@0: sl@0: sl@0: sl@0: /** sl@0: Custom command parser class to be used by controller plug-ins wishing to implement VideoRecorderExt custom commands. sl@0: sl@0: The controller plug-in should create an object of this type and add it to the list of custom command parsers sl@0: in the controller framework. The controller plug-in must be derived from MMMFVideoRecordControllerExtCustomCommandImplementor sl@0: to use this class. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class CMMFVideoRecordControllerExtCustomCommandParser : public CMMFCustomCommandParserBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Creates a new custom command parser that supports the video rate control and auto scaling. sl@0: sl@0: @param aImplementor A reference to the controller plug-in that owns this new object. sl@0: @return A pointer to the object created. sl@0: */ sl@0: IMPORT_C static CMMFVideoRecordControllerExtCustomCommandParser* NewL(MMMFVideoRecordControllerExtCustomCommandImplementor& aImplementor); sl@0: sl@0: /** sl@0: Destructor. sl@0: */ sl@0: IMPORT_C ~CMMFVideoRecordControllerExtCustomCommandParser(); sl@0: sl@0: /** sl@0: Handles a request from the client. Called by the controller framework. sl@0: sl@0: @param aMessage The message to be handled. sl@0: */ sl@0: void HandleRequest(TMMFMessage& aMessage); sl@0: sl@0: private: sl@0: CMMFVideoRecordControllerExtCustomCommandParser(MMMFVideoRecordControllerExtCustomCommandImplementor& aImplementor); sl@0: void DoHandleRequestL(TMMFMessage& aMessage); sl@0: TBool DoSetVideoEnabledL(TMMFMessage& aMessage); sl@0: TBool DoVideoEnabledL(TMMFMessage& aMessage); sl@0: TBool DoSetVideoQualityL(TMMFMessage& aMessage); sl@0: TBool DoVideoQualityL(TMMFMessage& aMessage); sl@0: TBool DoSetVideoFrameRateFixedL(TMMFMessage& aMessage); sl@0: TBool DoVideoFrameRateFixedL(TMMFMessage& aMessage); sl@0: private: sl@0: MMMFVideoRecordControllerExtCustomCommandImplementor& iImplementor; sl@0: }; sl@0: sl@0: /** sl@0: Resource class to be used by Recorder utility for sending custom commands. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class RMMFVideoRecordControllerExtCustomCommands: public RMMFCustomCommandsBase sl@0: { sl@0: public: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aController sl@0: The client side controller object to be used by this custom command interface. sl@0: @return One of the system-wide error codes. sl@0: */ sl@0: IMPORT_C RMMFVideoRecordControllerExtCustomCommands(RMMFController& aController); sl@0: sl@0: /** sl@0: Enabled or disables video in recorder. sl@0: Behaviour is same as CVideoRecorderUtility::SetVideoEnabledL sl@0: sl@0: @param aEnabled ETrue to enable video recording, EFalse to enable it sl@0: sl@0: @return One of the system-wide error codes. sl@0: @see CVideoRecorderUtility::SetVideoEnabledL sl@0: */ sl@0: IMPORT_C TInt SetVideoEnabled(TBool aEnabled); sl@0: sl@0: /** sl@0: Gets the flag that indicates video enabled or not. sl@0: Behaviour is same as CVideoRecorderUtility::VideoEnabledL sl@0: sl@0: @param aEnabled sl@0: Out parameter returns ETrue if video recording is enabled , EFalse otherwise. sl@0: sl@0: @return One of the system-wide error codes. sl@0: @see CVideoRecorderUtility::VideoEnabledL sl@0: */ sl@0: IMPORT_C TInt VideoEnabled(TBool &aEnabled) const; sl@0: sl@0: /** sl@0: Sets the quality of video being recorded. sl@0: Behaviour is same as CVideoRecorderUtility::SetVideoQualityL sl@0: sl@0: @param aQuality Video quality, in the range of 0 to 100, inclusive. sl@0: sl@0: @return One of the system-wide error codes. sl@0: @see CVideoRecorderUtility::SetVideoQualityL sl@0: */ sl@0: IMPORT_C TInt SetVideoQuality(TInt aQuality); sl@0: sl@0: /** sl@0: Gets video quality level set using SetVideoQualityL. sl@0: Behaviour is same as CVideoRecorderUtility::VideoQualityL sl@0: sl@0: @param aQuality Out parameter returning Video quality in the range 0-100. sl@0: sl@0: @return One of the system-wide error codes. sl@0: @see CVideoRecorderUtility::VideoQualityL sl@0: */ sl@0: IMPORT_C TInt VideoQuality(TInt &aQuality) const; sl@0: sl@0: /** sl@0: Sets the video framerate to fixed. sl@0: Behaviour is same as CVideoRecorderUtility::SetVideoFrameRateFixedL sl@0: sl@0: @param aFixedFrameRate ETrue to request a fixed framerate, EFalse to sl@0: request a variable framerate. sl@0: sl@0: @return One of the system-wide error codes. sl@0: @see CVideoRecorderUtility::SetVideoFrameRateFixedL sl@0: */ sl@0: IMPORT_C TInt SetVideoFrameRateFixed(TBool aFixedFrameRate); sl@0: sl@0: /** sl@0: Gets FrameRateFixed flag set using SetVideoFrameRateFixedL. sl@0: Behaviour is same as CVideoRecorderUtility::VideoFrameRateFixedL sl@0: sl@0: @param aFixedFrameRate Out parameter returns ETrue if fixed framerate sl@0: is enabled, EFalse otherwise. sl@0: sl@0: @return One of the system-wide error codes. sl@0: @see CVideoRecorderUtility::VideoFrameRateFixedL sl@0: */ sl@0: IMPORT_C TInt VideoFrameRateFixed(TBool &aFixedFrameRate) const; sl@0: }; sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Interface UID and messages for the Audio Play Controller Set Repeats API. sl@0: */ sl@0: const TUid KUidInterfaceMMFAudioPlaySetRepeatsController = {0x102834D5}; sl@0: sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Client class to access loop play functionality of audio play controller. sl@0: sl@0: The class uses the custom command function of the controller plugin, and removes the necessity sl@0: for the client to formulate the custom commands. sl@0: */ sl@0: class RMMFAudioPlayControllerSetRepeatsCustomCommands : public RMMFCustomCommandsBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aController sl@0: The client side controller object to be used by this custom command interface. sl@0: */ sl@0: IMPORT_C RMMFAudioPlayControllerSetRepeatsCustomCommands(RMMFController& aController); sl@0: sl@0: /** sl@0: Sets the number of times the audio sample to be repeated and the trailing silence period sl@0: sl@0: @param aRepeatNumberOfTimes sl@0: The number of times the audio sample needs to be repeated sl@0: sl@0: @param aTrailingSilence sl@0: The time interval of the trailing silence in microseconds. sl@0: sl@0: @return KErrNotSupported if the controller plugin does not support the loop play functionality. sl@0: */ sl@0: IMPORT_C TInt SetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence); sl@0: }; sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Mixin class to be derived from by controller plugins that could support the set repeats custom command. sl@0: */ sl@0: class MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Sets the number of times the audio sample is to be repeated during the playback operation. sl@0: A period of silence can follow each playing of the sample. The audio sample can be repeated indefinitely. sl@0: sl@0: @param aRepeatNumberOfTimes sl@0: The number of times the audio sample, together with the trailing silence, is to be repeated. sl@0: If this is set to KMdaRepeatForever, then the audio sample, together with the trailing silence, sl@0: is repeated indefinitely or until Stop() is called. sl@0: If this is set to zero, then the audio sample is not repeated. sl@0: sl@0: @param aTrailingSilence sl@0: The time interval of the trailing silence in microseconds. sl@0: sl@0: @return KErrNone if the controller plugin supports the loop play functionality sl@0: KErrNotSupported if the controller plugin does not support the loop play functionality sl@0: KErrNotReady if the controller plugin is not yet added the audio sink sl@0: */ sl@0: virtual TInt MapcSetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence) = 0; sl@0: }; sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: Custom command parser class to be used by controller plugins wishing to support set repeats functionality sl@0: sl@0: The controller plugin should create an object of this type and add it to the list of custom command parsers sl@0: in the controller framework. The controller plugin must be derived from sl@0: MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor to use this class. sl@0: */ sl@0: sl@0: class CMMFAudioPlayControllerSetRepeatsCustomCommandParser : public CMMFCustomCommandParserBase sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: Creates a new custom command parser capable of handling set repeats controller commands. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: @return A pointer to the object created. sl@0: sl@0: */ sl@0: IMPORT_C static CMMFAudioPlayControllerSetRepeatsCustomCommandParser* NewL(MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& aImplementor); sl@0: sl@0: /** sl@0: Destructor. sl@0: sl@0: */ sl@0: IMPORT_C ~CMMFAudioPlayControllerSetRepeatsCustomCommandParser(); sl@0: sl@0: /** sl@0: Handles a request from the client. Called by the controller framework. sl@0: sl@0: @param aMessage sl@0: The message to be handled. sl@0: sl@0: */ sl@0: void HandleRequest(TMMFMessage& aMessage); sl@0: private: sl@0: sl@0: /** sl@0: Constructor. sl@0: sl@0: @param aImplementor sl@0: A reference to the controller plugin that owns this new object. sl@0: sl@0: */ sl@0: CMMFAudioPlayControllerSetRepeatsCustomCommandParser(MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& aImplementor); sl@0: // Internal request handling methods. sl@0: void DoHandleRequestL(TMMFMessage& aMessage); sl@0: TBool DoSetRepeatsL(TMMFMessage& aMessage); sl@0: private: sl@0: /** sl@0: The object that implements the set repeats custom command i.e controller plugin sl@0: */ sl@0: MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& iImplementor; sl@0: }; sl@0: sl@0: #endif