mmlibs/mmfw/inc/mmf/ControllerFramework/mmfstandardcustomcommandsimpl.h
changeset 0 b8ed18f6c07b
equal deleted inserted replaced
-1:000000000000 0:b8ed18f6c07b
       
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __MMFSTANDARDCUSTOMCOMMANDS_IMPL_H
       
    17 #define __MMFSTANDARDCUSTOMCOMMANDS_IMPL_H
       
    18 
       
    19 #include <mmf/common/mmfcontroller.h>
       
    20 #include <mmf/common/mmfvideo.h>
       
    21 #include <mmf/common/mmcaf.h>
       
    22 
       
    23 class CMMFVideoFrameMessage;
       
    24 class CFbsBitmap;
       
    25 class CDesC8Array;
       
    26 
       
    27 
       
    28 /**
       
    29 @publishedPartner
       
    30 @released
       
    31 
       
    32 Client class to allow setting the initial screen for video display.
       
    33 
       
    34 */
       
    35 class RMMFVideoSetInitScreenCustomCommands : public RMMFCustomCommandsBase
       
    36 	{
       
    37 public:
       
    38 
       
    39 	/**
       
    40 	Constructor.
       
    41 
       
    42 	@param  aController
       
    43 	        The client side controller object to be used by this custom command interface.
       
    44 
       
    45 	*/
       
    46 	IMPORT_C RMMFVideoSetInitScreenCustomCommands(RMMFController& aController);
       
    47 
       
    48 	/**
       
    49 	Sets the initial screen number for the video display on the controller.
       
    50 
       
    51 	@param  aScreenNumber
       
    52 	        The screen number
       
    53 	
       
    54 	*/
       
    55 	IMPORT_C TInt SetInitScreenNumber(TInt aScreenNumber);
       
    56 	};
       
    57 
       
    58 
       
    59 
       
    60 /**
       
    61 @publishedPartner
       
    62 @released
       
    63 
       
    64 Mixin class to be derived from controller plugins that could support setting the initial screen for displaying video.
       
    65 */
       
    66 class MMMFVideoSetInitScreenCustomCommandImplementor
       
    67 	{
       
    68 public:
       
    69 
       
    70 	/**
       
    71 	Sets the initial screen number.
       
    72 
       
    73 	@param  aScreenNumber
       
    74 	        The screen number
       
    75 	*/
       
    76 	virtual void MvsdSetInitScreenNumber(TInt aScreenNumber)=0;
       
    77 	};
       
    78 
       
    79 
       
    80 /**
       
    81 @publishedPartner
       
    82 @released
       
    83 
       
    84 Custom command parser class to be used by controller plugins wishing to support setting the initial screen
       
    85 number for the video display.
       
    86 
       
    87 The controller plugin should create an object of this type and add it to the list of custom command parsers 
       
    88 in the controller framework. The controller plugin must be derived from MMMFVideoSetInitScreenCustomCommandImplementor 
       
    89 to use this class. 
       
    90 */
       
    91 class CMMFVideoSetInitScreenCustomCommandParser : public CMMFCustomCommandParserBase
       
    92 	{
       
    93 public:
       
    94 
       
    95 	/**
       
    96 	Creates a new custom command parser that supports setting screen device for video dusplay.
       
    97 
       
    98 	@param  aImplementor
       
    99 	        A reference to the controller plugin that owns this new object.
       
   100 
       
   101 	@return A pointer to the object created.
       
   102 
       
   103 	*/
       
   104 	IMPORT_C static CMMFVideoSetInitScreenCustomCommandParser* NewL(MMMFVideoSetInitScreenCustomCommandImplementor& aImplementor);
       
   105 
       
   106 	/**
       
   107 	Destructor.
       
   108 
       
   109 	*/
       
   110 	IMPORT_C ~CMMFVideoSetInitScreenCustomCommandParser();
       
   111 
       
   112 	/**
       
   113 	Handles a request from the client. Called by the controller framework.
       
   114 
       
   115 	@param  aMessage
       
   116 	        The message to be handled.
       
   117 
       
   118 	*/
       
   119 	void HandleRequest(TMMFMessage& aMessage);
       
   120 
       
   121 private:
       
   122 	/**
       
   123 	Constructor.
       
   124 
       
   125 	@param  aImplementor
       
   126 	        A reference to the controller plugin that owns this new object.
       
   127 	*/
       
   128 	CMMFVideoSetInitScreenCustomCommandParser(MMMFVideoSetInitScreenCustomCommandImplementor& aImplementor);
       
   129 	void DoHandleRequestL(TMMFMessage& aMessage);
       
   130 	TBool DoSetInitScreenNumberL(TMMFMessage& aMessage);
       
   131 
       
   132 private:
       
   133 	MMMFVideoSetInitScreenCustomCommandImplementor& iImplementor;
       
   134 	};
       
   135 
       
   136 
       
   137 /**
       
   138 WARNING: For internal use ONLY. Compatibility is not guaranteed in future releases.
       
   139 @internalComponent
       
   140 */
       
   141 enum TMMFVideoPixelAspectRatioMessages
       
   142 	{
       
   143 	EMMFVideoGetPixelAspectRatio,
       
   144 	EMMFVideoSetPixelAspectRatio,
       
   145 	EMMFVideoGetSupportedPixelAspectRatios,
       
   146 	EMMFVideoPixelAspectRatioCopyArrayData
       
   147 	};
       
   148 
       
   149 /**
       
   150 WARNING: For internal use ONLY. Compatibility is not guaranteed in future releases.
       
   151 @internalComponent
       
   152 */
       
   153 enum TMMFVideoAudioSamplingRateAndChannelConfigMessages
       
   154 	{
       
   155 	EMMFVideoGetAudioChannels,
       
   156 	EMMFVideoSetAudioChannels,
       
   157 	EMMFVideoGetSupportedAudioChannels,
       
   158 	EMMFVideoGetAudioSampleRate,
       
   159 	EMMFVideoSetAudioSampleRate,
       
   160 	EMMFVideoGetSupportedAudioSampleRates,
       
   161 	EMMFVideoAudioSamplingRateAndChannelConfigCopyArrayData
       
   162 	};
       
   163 
       
   164 
       
   165 /**
       
   166 @publishedPartner
       
   167 @released
       
   168 
       
   169 Client class to allow setting and getting the pixel aspect ratio for video recording.
       
   170 
       
   171 */
       
   172 class RMMFVideoPixelAspectRatioCustomCommands : public RMMFCustomCommandsBase
       
   173 	{
       
   174 public:
       
   175 
       
   176 	/**
       
   177 	Constructor.
       
   178 
       
   179 	@param  aController
       
   180 	        The client side controller object to be used by this custom command interface.
       
   181 
       
   182 	*/
       
   183 	IMPORT_C RMMFVideoPixelAspectRatioCustomCommands(RMMFController& aController);
       
   184 
       
   185 	/**
       
   186 	Sets the pixel aspect ratio for the video recording on the controller.
       
   187 
       
   188 	@param  aAspectRatio
       
   189 	        The new pixel aspect ratio. The default pixel aspect ratio is 1:1.
       
   190 	
       
   191 	@return One of the system-wide error codes.
       
   192 	
       
   193 	*/
       
   194 	IMPORT_C TInt SetPixelAspectRatio(const TVideoAspectRatio& aAspectRatio);
       
   195 	
       
   196 	/**
       
   197 	Gets the current pixel aspect ratio for the video recording on the controller.
       
   198 
       
   199 	@param  aAspectRatio
       
   200 	        The current video pixel aspect ratio.
       
   201 
       
   202 	@return One of the system-wide error codes.	
       
   203 	*/
       
   204 	IMPORT_C TInt GetPixelAspectRatio(TVideoAspectRatio& aAspectRatio) const;
       
   205 	
       
   206 	/**
       
   207 	Gets the list of supported pixel aspect ratios for the video recording on the controller.
       
   208 
       
   209 	@param  aAspectRatios
       
   210 	        The supported pixel aspect ratios.
       
   211 	
       
   212 	@leave	This method may leave with one of the system-wide error codes.
       
   213 	*/
       
   214 	IMPORT_C void GetSupportedPixelAspectRatiosL(RArray<TVideoAspectRatio>& aAspectRatios) const;
       
   215 
       
   216 private:
       
   217 	void DoGetVideoPixelAspectRatioArrayL(RArray<TVideoAspectRatio>& aArray, TMMFVideoPixelAspectRatioMessages aIpc) const;
       
   218 	};
       
   219 
       
   220 
       
   221 /**
       
   222 @publishedPartner
       
   223 @released
       
   224 
       
   225 Mixin class to be derived from controller plug-ins that could support setting and getting the pixel aspect ratio for video recording. 
       
   226 */
       
   227 class MMMFVideoPixelAspectRatioCustomCommandImplementor
       
   228 	{
       
   229 public:
       
   230 
       
   231 	/**
       
   232 	Sets the pixel aspect ratio.
       
   233 
       
   234 	@param  aAspectRatio
       
   235 	        The pixel aspect ratio to use.
       
   236 	*/
       
   237 	virtual void MvparSetPixelAspectRatioL(const TVideoAspectRatio& aAspectRatio) = 0;
       
   238 
       
   239 	/**
       
   240 	Gets the current pixel aspect ratio.
       
   241 
       
   242 	@param  aAspectRatio
       
   243 	        The current pixel aspect ratio.
       
   244 	*/
       
   245 	virtual void MvparGetPixelAspectRatioL(TVideoAspectRatio& aAspectRatio) = 0;
       
   246 	
       
   247 	/**
       
   248 	Gets the list of supported pixel aspect ratios.
       
   249 
       
   250 	@param  aAspectRatios
       
   251 	        The list of supported pixel aspect ratios.
       
   252 	*/
       
   253 	virtual void MvparGetSupportedPixelAspectRatiosL(RArray<TVideoAspectRatio>& aAspectRatios) = 0;
       
   254 	};
       
   255 
       
   256 
       
   257 /**
       
   258 @publishedPartner
       
   259 @released
       
   260 
       
   261 Custom command parser class to be used by controller plug-ins wishing to support setting and getting the pixel aspect 
       
   262 ratio for the video recording.
       
   263 
       
   264 The controller plug-in should create an object of this type and add it to the list of custom command parsers 
       
   265 in the controller framework. The controller plug-in must be derived from MMMFVideoPixelAspectRatioCustomCommandImplementor 
       
   266 to use this class. 
       
   267 */
       
   268 class CMMFVideoPixelAspectRatioCustomCommandParser : public CMMFCustomCommandParserBase
       
   269 	{
       
   270 public:
       
   271 
       
   272 	/**
       
   273 	Creates a new custom command parser that supports setting and getting pixel aspect ratio for video recording.
       
   274 
       
   275 	@param  aImplementor
       
   276 	        A reference to the controller plug-in that owns this new object.
       
   277 
       
   278 	@return A pointer to the object created.
       
   279 
       
   280 	*/
       
   281 	IMPORT_C static CMMFVideoPixelAspectRatioCustomCommandParser* NewL(MMMFVideoPixelAspectRatioCustomCommandImplementor& aImplementor);
       
   282 
       
   283 	/**
       
   284 	Destructor.
       
   285 
       
   286 	*/
       
   287 	IMPORT_C ~CMMFVideoPixelAspectRatioCustomCommandParser();
       
   288 
       
   289 	/**
       
   290 	Handles a request from the client. Called by the controller framework.
       
   291 
       
   292 	@param  aMessage
       
   293 	        The message to be handled.
       
   294 
       
   295 	*/
       
   296 	void HandleRequest(TMMFMessage& aMessage);
       
   297 
       
   298 private:
       
   299 	CMMFVideoPixelAspectRatioCustomCommandParser(MMMFVideoPixelAspectRatioCustomCommandImplementor& aImplementor);
       
   300 	void DoHandleRequestL(TMMFMessage& aMessage);
       
   301 	TBool DoSetPixelAspectRatioL(TMMFMessage& aMessage);
       
   302 	TBool DoGetPixelAspectRatioL(TMMFMessage& aMessage);
       
   303 	TBool DoGetSupportedPixelAspectRatiosL(TMMFMessage& aMessage);
       
   304 	TBool DoCopyArrayDataL(TMMFMessage& aMessage);
       
   305 	void DoCreateBufFromVideoAspectRatioArrayL(RArray<TVideoAspectRatio>& aArray);
       
   306 
       
   307 private:
       
   308 	MMMFVideoPixelAspectRatioCustomCommandImplementor& iImplementor;
       
   309 	
       
   310 	CBufFlat* iDataCopyBuffer;
       
   311 	};
       
   312 
       
   313 
       
   314 /**
       
   315 @publishedPartner
       
   316 @released
       
   317 
       
   318 Client class to allow the audio sampling rate and channels configuration for video recording.
       
   319 
       
   320 */
       
   321 class RMMFVideoAudioSamplingRateAndChannelConfigCustomCommands : public RMMFCustomCommandsBase
       
   322 	{
       
   323 public:
       
   324 
       
   325 	/**
       
   326 	Constructor.
       
   327 
       
   328 	@param  aController
       
   329 	        The client side controller object to be used by this custom command interface.
       
   330 
       
   331 	*/
       
   332 	IMPORT_C RMMFVideoAudioSamplingRateAndChannelConfigCustomCommands(RMMFController& aController);
       
   333 
       
   334 	/**
       
   335 	Sets the number of audio channels to record (1 for mono, 2 for stereo).
       
   336 
       
   337 	@param  aChannels
       
   338 	        The number of audio channels to record.
       
   339 
       
   340 	@return One of the system-wide error codes.
       
   341 	
       
   342 	*/
       
   343 	IMPORT_C TInt SetAudioChannels(const TUint aChannels);
       
   344 
       
   345 	/**
       
   346 	Gets the current number of audio channels to record (1 for mono, 2 for stereo).
       
   347 
       
   348 	@param  aChannels
       
   349 	        The current number of audio channels to record.
       
   350 
       
   351 	@return One of the system-wide error codes.
       
   352 	
       
   353 	*/
       
   354 	IMPORT_C TInt GetAudioChannels(TUint& aChannels) const;
       
   355 
       
   356 	/**
       
   357 	Gets the list of supported number of audio channels for video recording.
       
   358 
       
   359 	@param  aChannels
       
   360 	        The supported numbers of audio channels.
       
   361 	
       
   362 	@leave	This method may leave with one of the system-wide error codes.
       
   363 	*/
       
   364 	IMPORT_C void GetSupportedAudioChannelsL(RArray<TUint>& aChannels) const;
       
   365 	
       
   366 	/**
       
   367 	Sets the audio sample rate for video recording.
       
   368 
       
   369 	@param  aSampleRate
       
   370 	        The sample rate for audio recording.
       
   371 
       
   372 	@return One of the system-wide error codes.
       
   373 	
       
   374 	*/
       
   375 	IMPORT_C TInt SetAudioSampleRate(const TUint aSampleRate);
       
   376 
       
   377 	/**
       
   378 	Gets the current audio sample rate for recording.
       
   379 
       
   380 	@param  aSampleRate
       
   381 	        The current audio sample rate for recording.
       
   382 
       
   383 	@return One of the system-wide error codes.
       
   384 	
       
   385 	*/
       
   386 	IMPORT_C TInt GetAudioSampleRate(TUint& aSampleRate) const;
       
   387 
       
   388 	/**
       
   389 	Gets the list of supported audio sample rates for video recording.
       
   390 
       
   391 	@param  aSampleRates
       
   392 	        The supported audio sample rates.
       
   393 	
       
   394 	@leave	This method may leave with one of the system-wide error codes.
       
   395 	*/
       
   396 	IMPORT_C void GetSupportedAudioSampleRatesL(RArray<TUint>& aSampleRates) const;
       
   397 	
       
   398 private:
       
   399 	void DoGetUintArrayL(RArray<TUint>& aArray, TMMFVideoAudioSamplingRateAndChannelConfigMessages aIpc) const;
       
   400 	};
       
   401 
       
   402 
       
   403 /**
       
   404 @publishedPartner
       
   405 @released
       
   406 
       
   407 Mixin class to be derived from controller plug-ins that could support the audio sampling rate and channels configuration. 
       
   408 */
       
   409 class MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor
       
   410 	{
       
   411 public:
       
   412 
       
   413 	/**
       
   414 	Sets the number of audio channels.
       
   415 
       
   416 	@param  aChannels
       
   417 	        The number of audio channels to use.
       
   418 	*/
       
   419 	virtual void MvasrccSetAudioChannelsL(const TUint aChannels) = 0;
       
   420 
       
   421 	/**
       
   422 	Gets the current number of audio channels.
       
   423 
       
   424 	@param  aChannels
       
   425 	        The current number of audio channels.
       
   426 	*/
       
   427 	virtual void MvasrccGetAudioChannelsL(TUint& aChannels) = 0;
       
   428 
       
   429 	/**
       
   430 	Gets the list of supported number of audio channels.
       
   431 
       
   432 	@param  aChannels
       
   433 	        The list of supported number of audio channels.
       
   434 	*/
       
   435 	virtual void MvasrccGetSupportedAudioChannelsL(RArray<TUint>& aChannels) = 0;
       
   436 	
       
   437 	/**
       
   438 	Sets the audio sample rate.
       
   439 
       
   440 	@param  aSampleRate
       
   441 	        The audio sample rate to use.
       
   442 	*/
       
   443 	virtual void MvasrccSetAudioSampleRateL(const TUint aSampleRate) = 0;
       
   444 
       
   445 	/**
       
   446 	Gets the current audio sample rate.
       
   447 
       
   448 	@param  aSampleRate
       
   449 	        The current audio sample rate.
       
   450 	*/
       
   451 	virtual void MvasrccGetAudioSampleRateL(TUint& aSampleRate) = 0;
       
   452 
       
   453 	/**
       
   454 	Gets the list of supported audio sample rates.
       
   455 
       
   456 	@param  aSampleRates
       
   457 	        The list of supported audio sample rates.
       
   458 	*/
       
   459 	virtual void MvasrccGetSupportedAudioSampleRatesL(RArray<TUint>& aSampleRates) = 0;
       
   460 	};
       
   461 
       
   462 /**
       
   463 @publishedPartner
       
   464 @released
       
   465 
       
   466 Custom command parser class to be used by controller plug-ins wishing to support the audio sampling rate and channels
       
   467 configuration for the video recording.
       
   468 
       
   469 The controller plug-in should create an object of this type and add it to the list of custom command parsers 
       
   470 in the controller framework. The controller plug-in must be derived from MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor 
       
   471 to use this class. 
       
   472 */
       
   473 class CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser : public CMMFCustomCommandParserBase
       
   474 	{
       
   475 public:
       
   476 
       
   477 	/**
       
   478 	Creates a new custom command parser that supports the audio sampling rate and channels configuration for video recording.
       
   479 
       
   480 	@param  aImplementor
       
   481 	        A reference to the controller plug-in that owns this new object.
       
   482 
       
   483 	@return A pointer to the object created.
       
   484 
       
   485 	*/
       
   486 	IMPORT_C static CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser* NewL(MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& aImplementor);
       
   487 
       
   488 	/**
       
   489 	Destructor.
       
   490 
       
   491 	*/
       
   492 	IMPORT_C ~CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser();
       
   493 
       
   494 	/**
       
   495 	Handles a request from the client. Called by the controller framework.
       
   496 
       
   497 	@param  aMessage
       
   498 	        The message to be handled.
       
   499 
       
   500 	*/
       
   501 	void HandleRequest(TMMFMessage& aMessage);
       
   502 
       
   503 private:
       
   504 	CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser(MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& aImplementor);
       
   505 	void DoHandleRequestL(TMMFMessage& aMessage);
       
   506 	TBool DoSetAudioChannelsL(TMMFMessage& aMessage);
       
   507 	TBool DoGetAudioChannelsL(TMMFMessage& aMessage);
       
   508 	TBool DoGetSupportedAudioChannelsL(TMMFMessage& aMessage);
       
   509 	
       
   510 	TBool DoSetAudioSampleRateL(TMMFMessage& aMessage);
       
   511 	TBool DoGetAudioSampleRateL(TMMFMessage& aMessage);
       
   512 	TBool DoGetSupportedAudioSampleRatesL(TMMFMessage& aMessage);
       
   513 	
       
   514 	TBool DoCopyArrayDataL(TMMFMessage& aMessage);
       
   515 	
       
   516 	void DoCreateBufFromUintArrayL(RArray<TUint>& aArray);
       
   517 
       
   518 private:
       
   519 	MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& iImplementor;
       
   520 	
       
   521 	CBufFlat* iDataCopyBuffer;
       
   522 	};
       
   523 
       
   524 /**
       
   525 @publishedPartner
       
   526 @released
       
   527 */
       
   528 const TUid KUidInterfaceMMFVideoPlayExt = {0x10283437};	
       
   529 
       
   530 class TVideoPlayRateCapabilities;
       
   531 
       
   532 /**
       
   533 Mixin class to be derived from controller plug-ins that could support
       
   534 play velocity, enabling/disabling audio/video, and auto scaling.
       
   535 
       
   536 @publishedPartner
       
   537 @released
       
   538 */	
       
   539 class MMMFVideoPlayControllerExtCustomCommandImplementor
       
   540 	{
       
   541 public:
       
   542 
       
   543 	/**
       
   544 	Sets play velocity. 
       
   545 	Behaviour is same as CVideoPlayerUtility::SetPlayVelocityL
       
   546 	
       
   547 	@see CVideoPlayerUtility::SetPlayVelocityL
       
   548 	*/
       
   549 	virtual void MvpecSetPlayVelocityL(TInt aVelocity)=0;
       
   550 	
       
   551 	/**
       
   552 	Gets play velocity.
       
   553 	Behaviour is same as CVideoPlayerUtility::PlayVelocityL	
       
   554 	
       
   555 	@see CVideoPlayerUtility::PlayVelocityL
       
   556 	*/
       
   557 	virtual TInt MvpecPlayVelocityL()=0;
       
   558 	
       
   559 	/**
       
   560 	Steps through frames in pause mode.
       
   561 	Behaviour is same as CVideoPlayerUtility::StepFrameL	
       
   562 		
       
   563 	@see CVideoPlayerUtility::StepFrameL
       
   564 	*/
       
   565 	virtual void MvpecStepFrameL(TInt aStep)=0;
       
   566 	
       
   567 	/**
       
   568 	Gets play rate capabilities.
       
   569 	Behaviour is same as CVideoPlayerUtility::GetPlayRateCapabilitiesL	
       
   570 		
       
   571 	@see CVideoPlayerUtility::GetPlayRateCapabilitiesL
       
   572 	*/
       
   573 	virtual void MvpecGetPlayRateCapabilitiesL(TVideoPlayRateCapabilities& aCapabilities)=0;
       
   574 	
       
   575 	/**
       
   576 	Enables/Disables video playback.
       
   577 	Behaviour is same as CVideoPlayerUtility::SetVideoEnabledL	
       
   578 	
       
   579 	@see CVideoPlayerUtility::SetVideoEnabledL
       
   580 	*/
       
   581 	virtual void MvpecSetVideoEnabledL(TBool aVideoEnabled)=0;
       
   582 	
       
   583 	/**
       
   584     Queries whether video playback is currently enabled or not.
       
   585 	Behaviour is same as CVideoPlayerUtility::VideoEnabledL	
       
   586 	
       
   587 	@see CVideoPlayerUtility::VideoEnabledL
       
   588 	*/
       
   589 	virtual TBool MvpecVideoEnabledL()=0;
       
   590 	
       
   591 	/**
       
   592 	Enables or disables audio playback.
       
   593 	Behaviour is same as CVideoPlayerUtility::SetAudioEnabled	
       
   594 	
       
   595 	@see CVideoPlayerUtility::SetAudioEnabled
       
   596 	*/
       
   597 	virtual void MvpecSetAudioEnabledL(TBool aAudioEnabled)=0;
       
   598 	
       
   599 	/**
       
   600 	Sets Auto scale mode.
       
   601 	Behaviour is same as CVideoPlayerUtility::SetAutoScaleL	
       
   602 	
       
   603 	@see CVideoPlayerUtility::SetAutoScaleL
       
   604 	*/
       
   605 	virtual void MvpecSetAutoScaleL(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos)=0;
       
   606 	};
       
   607 
       
   608 
       
   609 
       
   610 /**
       
   611 Custom command parser class to be used by controller plug-ins wishing to support play velocity, 
       
   612 enabling/disabling audio/video, and auto scaling.
       
   613 
       
   614 The controller plug-in should create an object of this type and add it to the list of custom command parsers 
       
   615 in the controller framework. The controller plug-in must be derived from MMMFVideoPlayControllerExtCustomCommandImplementor 
       
   616 to use this class. 
       
   617 
       
   618 @publishedPartner
       
   619 @released
       
   620 */
       
   621 class CMMFVideoPlayControllerExtCustomCommandParser : public CMMFCustomCommandParserBase
       
   622 	{
       
   623 public:
       
   624 
       
   625 	/**
       
   626 	Creates a new custom command parser that supports the video rate control and auto scaling.
       
   627 
       
   628 	@param  aImplementor
       
   629 	        A reference to the controller plug-in that owns this new object.
       
   630 
       
   631 	@return A pointer to the object created.
       
   632 
       
   633 	*/
       
   634 	IMPORT_C static CMMFVideoPlayControllerExtCustomCommandParser* NewL(MMMFVideoPlayControllerExtCustomCommandImplementor& aImplementor);
       
   635 
       
   636 	/**
       
   637 	Destructor.
       
   638 
       
   639 	*/
       
   640 	IMPORT_C ~CMMFVideoPlayControllerExtCustomCommandParser();
       
   641 
       
   642 	/**
       
   643 	Handles a request from the client. Called by the controller framework.
       
   644 
       
   645 	@param  aMessage
       
   646 	        The message to be handled.
       
   647 
       
   648 	*/
       
   649 	void HandleRequest(TMMFMessage& aMessage);
       
   650 
       
   651 private:
       
   652 	CMMFVideoPlayControllerExtCustomCommandParser(MMMFVideoPlayControllerExtCustomCommandImplementor& aImplementor);
       
   653 	void DoHandleRequestL(TMMFMessage& aMessage);
       
   654 	TBool DoSetPlayVelocityL(TMMFMessage& aMessage);
       
   655 	TBool DoPlayVelocityL(TMMFMessage& aMessage);
       
   656 	TBool DoStepFrameL(TMMFMessage& aMessage);
       
   657 	TBool DoGetPlayRateCapabilitiesL(TMMFMessage& aMessage);
       
   658 	TBool DoSetVideoEnabledL(TMMFMessage& aMessage);
       
   659 	TBool DoVideoEnabledL(TMMFMessage& aMessage);
       
   660 	TBool DoSetAudioEnabledL(TMMFMessage& aMessage);
       
   661 	TBool DoSetAutoScaleL(TMMFMessage& aMessage);
       
   662 private:
       
   663 	MMMFVideoPlayControllerExtCustomCommandImplementor& iImplementor;
       
   664 	};
       
   665 
       
   666 /**
       
   667 Resource class to be used by player utility for sending custom commands.
       
   668 
       
   669 @publishedPartner
       
   670 @released
       
   671 */	
       
   672 class RMMFVideoPlayControllerExtCustomCommands: public RMMFCustomCommandsBase
       
   673 	{
       
   674 public:
       
   675 	/**
       
   676 	Constructor.
       
   677 
       
   678 	@param  aController
       
   679 	        The client side controller object to be used by this custom command interface.
       
   680 	*/
       
   681 	IMPORT_C RMMFVideoPlayControllerExtCustomCommands(RMMFController& aController);
       
   682 	
       
   683 	/**
       
   684 	Sets play velocity.
       
   685 	Behaviour is same as CVideoPlayerUtility::SetPlayVelocityL
       
   686 		
       
   687 	@param  aVelocity 
       
   688 			Velocity of the playback.
       
   689 
       
   690 	@return One of the system-wide error codes.	
       
   691 
       
   692 	@see CVideoPlayerUtility::SetPlayVelocityL	
       
   693 	*/
       
   694 	IMPORT_C TInt SetPlayVelocity(TInt aVelocity);
       
   695 
       
   696 	/**
       
   697 	Gets play velocity.
       
   698 	Behaviour is same as CVideoPlayerUtility::PlayVelocityL	
       
   699 
       
   700 	@param  aVelocity 
       
   701 			Velocity of the playback.
       
   702 
       
   703 	@return One of the system-wide error codes.	
       
   704 		
       
   705 	@see CVideoPlayerUtility::PlayVelocityL
       
   706 	*/
       
   707 	IMPORT_C TInt PlayVelocity(TInt &aVelocity)const;
       
   708 
       
   709 	/**
       
   710 	Steps through frames in pause mode.
       
   711 	Behaviour is same as CVideoPlayerUtility::StepFrameL	
       
   712 
       
   713 	@param  aStep 
       
   714 			Count indicating number of frames to step playback position.
       
   715 
       
   716 	@return One of the system-wide error codes.
       
   717 
       
   718 	@see CVideoPlayerUtility::StepFrameL
       
   719 	*/
       
   720 	IMPORT_C TInt StepFrame(TInt aStep);
       
   721 	
       
   722 	/**
       
   723 	Gets play rate capabilities.
       
   724 	Behaviour is same as CVideoPlayerUtility::GetPlayRateCapabilitiesL	
       
   725 
       
   726     @param aCapabilities Playback rate capabilities
       
   727 
       
   728 	@return One of the system-wide error codes.
       
   729 		
       
   730 	@see CVideoPlayerUtility::GetPlayRateCapabilitiesL
       
   731 	*/
       
   732 	IMPORT_C TInt GetPlayRateCapabilities(TVideoPlayRateCapabilities& aCapabilities)const;
       
   733 
       
   734 	/**
       
   735 	Enables/Disables video playback.
       
   736 	Behaviour is same as CVideoPlayerUtility::SetVideoEnabledL	
       
   737     
       
   738     @param aVideoEnabled ETrue to enable video playback, EFalse to disable
       
   739 
       
   740 	@return One of the system-wide error codes.    	
       
   741 
       
   742 	@see CVideoPlayerUtility::SetVideoEnabledL
       
   743 	*/
       
   744 	IMPORT_C TInt SetVideoEnabled(TBool aVideoEnabled);
       
   745 	
       
   746 	/**
       
   747     Queries whether video playback is currently enabled or not.
       
   748 	Behaviour is same as CVideoPlayerUtility::VideoEnabledL
       
   749 
       
   750     @param aVideoEnabled 
       
   751     	   Out parameter returns ETrue if video playback is enabled, EFalse if not.
       
   752 
       
   753 	@return One of the system-wide error codes.
       
   754 	
       
   755 	@see CVideoPlayerUtility::VideoEnabledL
       
   756 	*/
       
   757 	IMPORT_C TInt VideoEnabled(TBool &aVideoEnabled)const;
       
   758 	
       
   759 	/**
       
   760 	Enables or disables audio playback.
       
   761 	Behaviour is same as CVideoPlayerUtility::SetAudioEnabledL
       
   762 
       
   763     @param aVideoEnabled ETrue to enable audio playback, EFalse to disable		
       
   764 
       
   765 	@return One of the system-wide error codes.
       
   766 
       
   767 	@see CVideoPlayerUtility::SetAudioEnabledL
       
   768 	*/
       
   769 	IMPORT_C TInt SetAudioEnabled(TBool aAudioEnabled);
       
   770 
       
   771 	/**
       
   772 	Sets Auto scale mode.
       
   773  	Behaviour is same as CVideoPlayerUtility::SetAutoScaleL
       
   774 	
       
   775     @param aScaleType Automatic scaling type
       
   776     @param aHorizPos Video picture horizontal position, relative to the
       
   777                      video window.
       
   778     @param aVertPos Video picture vertical position, relative to the
       
   779                      video window.
       
   780 	@return One of the system-wide error codes.
       
   781 		
       
   782 	@see CVideoPlayerUtility::SetAutoScaleL
       
   783 	*/
       
   784 	IMPORT_C TInt SetAutoScale(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos);
       
   785 	};
       
   786 
       
   787 /**
       
   788 @publishedPartner
       
   789 @released
       
   790 */
       
   791 const TUid KUidInterfaceMMFVideoRecorderExt = {0x10283438};
       
   792 
       
   793 /**
       
   794 Mixin class to be derived from controller plug-ins that could support quality and enabling video. 
       
   795 
       
   796 @publishedPartner
       
   797 @released
       
   798 */	
       
   799 class MMMFVideoRecordControllerExtCustomCommandImplementor
       
   800 	{
       
   801 public:
       
   802 
       
   803 	/**
       
   804 	Enabled or disables video in recorder.
       
   805 	Behaviour is same as CVideoRecorderUtility::SetVideoEnabledL	
       
   806 
       
   807 	@see CVideoRecorderUtility::SetVideoEnabledL
       
   808 	*/
       
   809     virtual void MvrecSetVideoEnabledL(TBool aEnabled)=0;
       
   810 	/**
       
   811 	Gets the flag that indicates video enabled or not.
       
   812 	Behaviour is same as CVideoRecorderUtility::VideoEnabledL	
       
   813 
       
   814 	@see CVideoRecorderUtility::VideoEnabledL
       
   815 	*/
       
   816     virtual TBool MvrecVideoEnabledL() const=0;
       
   817 	/**
       
   818 	Sets the quality of video being recorded.
       
   819 	Behaviour is same as CVideoRecorderUtility::SetVideoQualityL	
       
   820 
       
   821 	@see CVideoRecorderUtility::SetVideoQualityL
       
   822 	*/
       
   823     virtual void MvrecSetVideoQualityL(TInt aQuality)=0;
       
   824 	/**
       
   825 	Gets video quality level set using SetVideoQualityL.
       
   826 	Behaviour is same as CVideoRecorderUtility::VideoQualityL	
       
   827 
       
   828 	@see CVideoRecorderUtility::VideoQualityL
       
   829 	*/
       
   830     virtual TInt MvrecVideoQualityL() const=0;
       
   831 	/**
       
   832 	Sets the video framerate to fixed.
       
   833 	Behaviour is same as CVideoRecorderUtility::SetVideoFrameRateFixedL	
       
   834 
       
   835 	@see CVideoRecorderUtility::SetVideoFrameRateFixedL
       
   836 	*/
       
   837     virtual void MvrecSetVideoFrameRateFixedL(TBool aFixedFrameRate)=0;
       
   838 	/**
       
   839 	Gets FrameRateFixed flag set using SetVideoFrameRateFixedL.
       
   840 	Behaviour is same as CVideoRecorderUtility::VideoFrameRateFixedL	
       
   841 
       
   842 	@see CVideoRecorderUtility::VideoFrameRateFixedL
       
   843 	*/
       
   844     virtual TBool MvrecVideoFrameRateFixedL() const=0;
       
   845 	};
       
   846 
       
   847 
       
   848 
       
   849 /**
       
   850 Custom command parser class to be used by controller plug-ins wishing to implement VideoRecorderExt custom commands.
       
   851 
       
   852 The controller plug-in should create an object of this type and add it to the list of custom command parsers 
       
   853 in the controller framework. The controller plug-in must be derived from MMMFVideoRecordControllerExtCustomCommandImplementor
       
   854 to use this class.
       
   855 
       
   856 @publishedPartner
       
   857 @released
       
   858 */
       
   859 class CMMFVideoRecordControllerExtCustomCommandParser : public CMMFCustomCommandParserBase
       
   860 	{
       
   861 public:
       
   862 
       
   863 	/**
       
   864 	Creates a new custom command parser that supports the video rate control and auto scaling.
       
   865 
       
   866 	@param  aImplementor A reference to the controller plug-in that owns this new object.
       
   867 	@return A pointer to the object created.
       
   868 	*/
       
   869 	IMPORT_C static CMMFVideoRecordControllerExtCustomCommandParser* NewL(MMMFVideoRecordControllerExtCustomCommandImplementor& aImplementor);
       
   870 
       
   871 	/**
       
   872 	Destructor.
       
   873 	*/
       
   874 	IMPORT_C ~CMMFVideoRecordControllerExtCustomCommandParser();
       
   875 
       
   876 	/**
       
   877 	Handles a request from the client. Called by the controller framework.
       
   878 
       
   879 	@param  aMessage The message to be handled.
       
   880 	*/
       
   881 	void HandleRequest(TMMFMessage& aMessage);
       
   882 
       
   883 private:
       
   884 	CMMFVideoRecordControllerExtCustomCommandParser(MMMFVideoRecordControllerExtCustomCommandImplementor& aImplementor);
       
   885 	void DoHandleRequestL(TMMFMessage& aMessage);
       
   886 	TBool DoSetVideoEnabledL(TMMFMessage& aMessage);
       
   887 	TBool DoVideoEnabledL(TMMFMessage& aMessage);
       
   888 	TBool DoSetVideoQualityL(TMMFMessage& aMessage);
       
   889 	TBool DoVideoQualityL(TMMFMessage& aMessage);
       
   890 	TBool DoSetVideoFrameRateFixedL(TMMFMessage& aMessage);
       
   891 	TBool DoVideoFrameRateFixedL(TMMFMessage& aMessage);
       
   892 private:
       
   893 	MMMFVideoRecordControllerExtCustomCommandImplementor& iImplementor;
       
   894 	};
       
   895 
       
   896 /**
       
   897 Resource class to be used by Recorder utility for sending custom commands.
       
   898 
       
   899 @publishedPartner
       
   900 @released
       
   901 */	
       
   902 class RMMFVideoRecordControllerExtCustomCommands: public RMMFCustomCommandsBase
       
   903 	{
       
   904 public:
       
   905 	/**
       
   906 	Constructor.
       
   907 
       
   908 	@param  aController
       
   909 	        The client side controller object to be used by this custom command interface.
       
   910 	@return One of the system-wide error codes.
       
   911 	*/
       
   912 	IMPORT_C RMMFVideoRecordControllerExtCustomCommands(RMMFController& aController);
       
   913 	
       
   914 	/**
       
   915 	Enabled or disables video in recorder.
       
   916 	Behaviour is same as CVideoRecorderUtility::SetVideoEnabledL	
       
   917 
       
   918     @param aEnabled ETrue to enable video recording, EFalse to enable it
       
   919 
       
   920 	@return One of the system-wide error codes.	
       
   921 	@see CVideoRecorderUtility::SetVideoEnabledL
       
   922 	*/
       
   923     IMPORT_C TInt SetVideoEnabled(TBool aEnabled);
       
   924     
       
   925 	/**
       
   926 	Gets the flag that indicates video enabled or not.
       
   927 	Behaviour is same as CVideoRecorderUtility::VideoEnabledL	
       
   928 
       
   929     @param aEnabled 
       
   930     	   Out parameter returns ETrue if video recording is enabled , EFalse otherwise.
       
   931 
       
   932 	@return One of the system-wide error codes.	
       
   933 	@see CVideoRecorderUtility::VideoEnabledL
       
   934 	*/
       
   935     IMPORT_C TInt VideoEnabled(TBool &aEnabled) const;
       
   936     
       
   937 	/**
       
   938 	Sets the quality of video being recorded.
       
   939 	Behaviour is same as CVideoRecorderUtility::SetVideoQualityL	
       
   940 
       
   941     @param aQuality Video quality, in the range of 0 to 100, inclusive.
       
   942 
       
   943 	@return One of the system-wide error codes.	
       
   944 	@see CVideoRecorderUtility::SetVideoQualityL
       
   945 	*/
       
   946     IMPORT_C TInt SetVideoQuality(TInt aQuality);
       
   947     
       
   948 	/**
       
   949 	Gets video quality level set using SetVideoQualityL.
       
   950 	Behaviour is same as CVideoRecorderUtility::VideoQualityL	
       
   951     
       
   952     @param aQuality Out parameter returning Video quality in the range 0-100.
       
   953     
       
   954     @return One of the system-wide error codes.	
       
   955 	@see CVideoRecorderUtility::VideoQualityL
       
   956 	*/
       
   957     IMPORT_C TInt VideoQuality(TInt &aQuality) const;
       
   958     
       
   959 	/**
       
   960 	Sets the video framerate to fixed.
       
   961 	Behaviour is same as CVideoRecorderUtility::SetVideoFrameRateFixedL	
       
   962 	
       
   963     @param aFixedFrameRate ETrue to request a fixed framerate, EFalse to
       
   964                           request a variable framerate.
       
   965 
       
   966 	@return One of the system-wide error codes.	
       
   967 	@see CVideoRecorderUtility::SetVideoFrameRateFixedL
       
   968 	*/
       
   969     IMPORT_C TInt SetVideoFrameRateFixed(TBool aFixedFrameRate);
       
   970     
       
   971 	/**
       
   972 	Gets FrameRateFixed flag set using SetVideoFrameRateFixedL.
       
   973 	Behaviour is same as CVideoRecorderUtility::VideoFrameRateFixedL	
       
   974 
       
   975     @param aFixedFrameRate Out parameter returns ETrue if fixed framerate
       
   976      						is enabled, EFalse otherwise.
       
   977     
       
   978 	@return One of the system-wide error codes.	
       
   979 	@see CVideoRecorderUtility::VideoFrameRateFixedL
       
   980 	*/
       
   981     IMPORT_C TInt VideoFrameRateFixed(TBool &aFixedFrameRate) const;
       
   982     };
       
   983 
       
   984 /**
       
   985 @publishedPartner
       
   986 @released
       
   987 
       
   988 Interface UID and messages for the Audio Play Controller Set Repeats API.
       
   989 */
       
   990 const TUid KUidInterfaceMMFAudioPlaySetRepeatsController = {0x102834D5};
       
   991 
       
   992 
       
   993 /**
       
   994 @publishedPartner
       
   995 @released
       
   996 
       
   997 Client class to access loop play functionality of audio play controller.
       
   998 
       
   999 The class uses the custom command function of the controller plugin, and removes the necessity
       
  1000 for the client to formulate the custom commands.
       
  1001 */
       
  1002 class RMMFAudioPlayControllerSetRepeatsCustomCommands : public RMMFCustomCommandsBase
       
  1003 	{
       
  1004 public:
       
  1005 	
       
  1006 	/**
       
  1007 	Constructor.
       
  1008 
       
  1009 	@param  aController
       
  1010 	        The client side controller object to be used by this custom command interface.
       
  1011 	*/
       
  1012 	IMPORT_C RMMFAudioPlayControllerSetRepeatsCustomCommands(RMMFController& aController);
       
  1013 
       
  1014 	/**
       
  1015 	Sets the number of times the audio sample to be repeated and the trailing silence period
       
  1016 	
       
  1017 	@param  aRepeatNumberOfTimes
       
  1018 			The number of times the audio sample needs to be repeated
       
  1019 	
       
  1020 	@param  aTrailingSilence
       
  1021 	        The time interval of the trailing silence in microseconds.
       
  1022 	        
       
  1023 	@return KErrNotSupported if the controller plugin does not support the loop play functionality.
       
  1024 	*/
       
  1025 	IMPORT_C TInt SetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence);
       
  1026 	};
       
  1027 
       
  1028 /**
       
  1029 @publishedPartner
       
  1030 @released
       
  1031 
       
  1032 Mixin class to be derived from by controller plugins that could support the set repeats custom command.
       
  1033 */
       
  1034 class MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor
       
  1035 	{
       
  1036 public:
       
  1037 
       
  1038 	/**
       
  1039 	Sets the number of times the audio sample is to be repeated during the playback operation.	
       
  1040 	A period of silence can follow each playing of the sample. The audio sample can be repeated indefinitely.
       
  1041 	
       
  1042 	@param	aRepeatNumberOfTimes
       
  1043     		The number of times the audio sample, together with the trailing silence, is to be repeated. 
       
  1044     		If this is set to KMdaRepeatForever, then the audio sample, together with the trailing silence, 
       
  1045     		is repeated indefinitely or until Stop() is called. 
       
  1046     		If this is set to zero, then the audio sample is not repeated.
       
  1047 	
       
  1048 	@param  aTrailingSilence
       
  1049          	The time interval of the trailing silence in microseconds.
       
  1050 	
       
  1051 	@return	KErrNone if the controller plugin supports the loop play functionality
       
  1052 			KErrNotSupported if the controller plugin does not support the loop play functionality
       
  1053 			KErrNotReady if the controller plugin is not yet added the audio sink
       
  1054 	*/		
       
  1055 	virtual TInt MapcSetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence) = 0;		
       
  1056 	};
       
  1057 
       
  1058 /**
       
  1059 @publishedPartner
       
  1060 @released
       
  1061 
       
  1062 Custom command parser class to be used by controller plugins wishing to support set repeats functionality
       
  1063 
       
  1064 The controller plugin should create an object of this type and add it to the list of custom command parsers 
       
  1065 in the controller framework. The controller plugin must be derived from 
       
  1066 MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor to use this class. 
       
  1067 */
       
  1068 
       
  1069 class CMMFAudioPlayControllerSetRepeatsCustomCommandParser : public CMMFCustomCommandParserBase
       
  1070 	{
       
  1071 public:
       
  1072 
       
  1073 	/**
       
  1074 	Creates a new custom command parser capable of handling set repeats controller commands.
       
  1075 
       
  1076 	@param  aImplementor
       
  1077 	        A reference to the controller plugin that owns this new object.
       
  1078 
       
  1079 	@return A pointer to the object created.
       
  1080 
       
  1081 	*/
       
  1082 	IMPORT_C static CMMFAudioPlayControllerSetRepeatsCustomCommandParser* NewL(MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& aImplementor);
       
  1083 
       
  1084 	/**
       
  1085 	Destructor.
       
  1086 
       
  1087 	*/
       
  1088 	IMPORT_C ~CMMFAudioPlayControllerSetRepeatsCustomCommandParser();
       
  1089 
       
  1090 	/**
       
  1091 	Handles a request from the client. Called by the controller framework.
       
  1092 
       
  1093 	@param  aMessage
       
  1094 	        The message to be handled.
       
  1095 
       
  1096 	*/
       
  1097 	void HandleRequest(TMMFMessage& aMessage);
       
  1098 private:
       
  1099 
       
  1100 	/**
       
  1101 	Constructor.
       
  1102 
       
  1103 	@param  aImplementor
       
  1104 	        A reference to the controller plugin that owns this new object.
       
  1105 
       
  1106 	*/
       
  1107 	CMMFAudioPlayControllerSetRepeatsCustomCommandParser(MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& aImplementor);
       
  1108 	// Internal request handling methods.
       
  1109 	void DoHandleRequestL(TMMFMessage& aMessage);
       
  1110 	TBool DoSetRepeatsL(TMMFMessage& aMessage);
       
  1111 private:
       
  1112 	/** 
       
  1113 	The object that implements the set repeats custom command i.e controller plugin
       
  1114 	*/
       
  1115 	MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& iImplementor;
       
  1116 	};
       
  1117 
       
  1118 #endif