epoc32/include/mmf/common/mmfstandardcustomcommands.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
williamr@2
     1
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@2
     4
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
williamr@2
     5
// which accompanies this distribution, and is available
williamr@2
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
//
williamr@2
    15
williamr@2
    16
#ifndef __MMFSTANDARDCUSTOMCOMMANDS_H
williamr@2
    17
#define __MMFSTANDARDCUSTOMCOMMANDS_H
williamr@2
    18
williamr@2
    19
#include <mmf/common/mmfcontroller.h>
williamr@2
    20
#include <mmf/common/mmfvideo.h>
williamr@2
    21
#include <mmf/common/mmcaf.h>
williamr@2
    22
williamr@2
    23
class CMMFVideoFrameMessage;
williamr@2
    24
class CFbsBitmap;
williamr@2
    25
class CDesC8Array;
williamr@2
    26
williamr@2
    27
/**
williamr@2
    28
@publishedAll
williamr@2
    29
@released
williamr@2
    30
*/
williamr@2
    31
const TInt KPlaybackRateNormal = 1;
williamr@2
    32
williamr@2
    33
/**
williamr@2
    34
@publishedAll
williamr@2
    35
@released
williamr@2
    36
williamr@2
    37
Balance value for centre
williamr@2
    38
*/
williamr@2
    39
const TInt KMMFBalanceCenter = 0;
williamr@2
    40
williamr@2
    41
/**
williamr@2
    42
@publishedAll
williamr@2
    43
@released
williamr@2
    44
williamr@2
    45
Balance value for max left
williamr@2
    46
*/
williamr@2
    47
const TInt KMMFBalanceMaxLeft = -100;
williamr@2
    48
williamr@2
    49
/**
williamr@2
    50
@publishedAll
williamr@2
    51
@released
williamr@2
    52
williamr@2
    53
Balance value for max right
williamr@2
    54
*/
williamr@2
    55
const TInt KMMFBalanceMaxRight = 100;
williamr@2
    56
williamr@2
    57
/**
williamr@2
    58
@publishedAll
williamr@2
    59
@released
williamr@2
    60
*/
williamr@2
    61
const TInt KMMFVideoCurrentFrame = -1;
williamr@2
    62
williamr@2
    63
/**
williamr@2
    64
@publishedAll
williamr@2
    65
@released
williamr@2
    66
*/
williamr@2
    67
enum TMMFDSAEvent
williamr@2
    68
	{
williamr@2
    69
	EAbortDSA,
williamr@2
    70
	EResumeDSA
williamr@2
    71
	};
williamr@2
    72
williamr@2
    73
/**
williamr@2
    74
@publishedAll
williamr@2
    75
@released
williamr@2
    76
williamr@2
    77
Interface UID and messages for the Audio Resource Notification API.
williamr@2
    78
*/
williamr@2
    79
const TUid KMMFEventCategoryAudioResourceAvailable = {0x101FD9F2};
williamr@2
    80
williamr@2
    81
/**
williamr@2
    82
@internalComponent
williamr@2
    83
*/
williamr@2
    84
enum TMMFAudioResourceNotificationMessages
williamr@2
    85
	{
williamr@2
    86
	EMMFAudioResourceRegisterNotification,
williamr@2
    87
	EMMFAudioResourceCancelRegisterNotification,
williamr@2
    88
	EMMFAudioResourceGetNotificationData,
williamr@2
    89
	EMMFAudioResourceWillResumePlay
williamr@2
    90
	};
williamr@2
    91
williamr@2
    92
/**
williamr@2
    93
@publishedAll
williamr@2
    94
@released
williamr@2
    95
williamr@2
    96
Interface UID and messages for the Audio Play Device API.
williamr@2
    97
*/
williamr@2
    98
const TUid KUidInterfaceMMFAudioPlayDevice = {0x101F76D6};
williamr@2
    99
williamr@2
   100
/**
williamr@2
   101
@internalComponent
williamr@2
   102
*/
williamr@2
   103
enum TMMFAudioPlayDeviceMessages
williamr@2
   104
	{
williamr@2
   105
	EMMFAudioPlayDeviceSetVolume,
williamr@2
   106
	EMMFAudioPlayDeviceGetMaxVolume,
williamr@2
   107
	EMMFAudioPlayDeviceGetVolume,
williamr@2
   108
	EMMFAudioPlayDeviceSetVolumeRamp,
williamr@2
   109
	EMMFAudioPlayDeviceSetBalance,
williamr@2
   110
	EMMFAudioPlayDeviceGetBalance
williamr@2
   111
	};
williamr@2
   112
williamr@2
   113
/**
williamr@2
   114
@publishedAll
williamr@2
   115
@released
williamr@2
   116
williamr@2
   117
Interface UID and messages for the Audio Record Device API.
williamr@2
   118
*/
williamr@2
   119
const TUid KUidInterfaceMMFAudioRecordDevice = {0x101F76D7};
williamr@2
   120
williamr@2
   121
/**
williamr@2
   122
@internalComponent
williamr@2
   123
*/
williamr@2
   124
enum TMMFAudioRecordDeviceMessage
williamr@2
   125
	{
williamr@2
   126
	EMMFAudioRecordDeviceSetGain,
williamr@2
   127
	EMMFAudioRecordDeviceGetMaxGain,
williamr@2
   128
	EMMFAudioRecordDeviceGetGain,
williamr@2
   129
	EMMFAudioRecordDeviceSetBalance,
williamr@2
   130
	EMMFAudioRecordDeviceGetBalance
williamr@2
   131
	};
williamr@2
   132
williamr@2
   133
/**
williamr@2
   134
@publishedAll
williamr@2
   135
@released
williamr@2
   136
williamr@2
   137
Interface UID and messages for the Audio Play Controller API.
williamr@2
   138
*/
williamr@2
   139
const TUid KUidInterfaceMMFAudioPlayController = {0x101F76D8};
williamr@2
   140
williamr@2
   141
/**
williamr@2
   142
@internalComponent
williamr@2
   143
*/
williamr@2
   144
enum TMMFAudioPlayControllerMessages
williamr@2
   145
	{
williamr@2
   146
	EMMFAudioPlayControllerSetPlaybackWindow,
williamr@2
   147
	EMMFAudioPlayControllerDeletePlaybackWindow,
williamr@2
   148
	EMMFAudioPlayControllerGetLoadingProgress
williamr@2
   149
	};
williamr@2
   150
williamr@2
   151
/**
williamr@2
   152
@publishedAll
williamr@2
   153
@released
williamr@2
   154
williamr@2
   155
Interface UID and messages for the Audio Record Controller API.
williamr@2
   156
*/
williamr@2
   157
const TUid KUidInterfaceMMFAudioRecordController = {0x101F76D9};
williamr@2
   158
williamr@2
   159
/**
williamr@2
   160
@internalComponent
williamr@2
   161
*/
williamr@2
   162
enum TMMFAudioRecordControllerMessages
williamr@2
   163
	{
williamr@2
   164
	EMMFAudioRecordControllerGetRecordTimeAvailable,
williamr@2
   165
	EMMFAudioRecordControllerSetMaxDuration,
williamr@2
   166
	EMMFAudioRecordControllerSetMaxFileSize,
williamr@2
   167
	EMMFAudioRecordControllerCrop,
williamr@2
   168
	EMMFAudioRecordControllerAddMetaDataEntry,
williamr@2
   169
	EMMFAudioRecordControllerRemoveMetaDataEntry,
williamr@2
   170
	EMMFAudioRecordControllerReplaceMetaDataEntry
williamr@2
   171
	};
williamr@2
   172
williamr@2
   173
/**
williamr@2
   174
@publishedAll
williamr@2
   175
@released
williamr@2
   176
williamr@2
   177
Interface UID and messages for the Audio Controller API.
williamr@2
   178
*/
williamr@2
   179
const TUid KUidInterfaceMMFAudioController = {0x101F76DA};
williamr@2
   180
williamr@2
   181
/**
williamr@2
   182
@internalComponent
williamr@2
   183
*/
williamr@2
   184
enum TMMFAudioControllerMessages
williamr@2
   185
	{
williamr@2
   186
	EMMFAudioControllerSetSourceSampleRate,
williamr@2
   187
	EMMFAudioControllerSetSourceNumChannels,
williamr@2
   188
	EMMFAudioControllerSetSourceFormat,
williamr@2
   189
	EMMFAudioControllerSetSourceBitRate,
williamr@2
   190
	EMMFAudioControllerSetSourceDataType,
williamr@2
   191
	EMMFAudioControllerSetSinkSampleRate,
williamr@2
   192
	EMMFAudioControllerSetSinkNumChannels,
williamr@2
   193
	EMMFAudioControllerSetSinkFormat,
williamr@2
   194
	EMMFAudioControllerSetSinkBitRate,
williamr@2
   195
	EMMFAudioControllerSetSinkDataType,
williamr@2
   196
	EMMFAudioControllerGetSourceSampleRate,
williamr@2
   197
	EMMFAudioControllerGetSourceBitRate,
williamr@2
   198
	EMMFAudioControllerGetSourceNumChannels,
williamr@2
   199
	EMMFAudioControllerGetSourceFormat,
williamr@2
   200
	EMMFAudioControllerGetSourceDataType,
williamr@2
   201
	EMMFAudioControllerGetSinkSampleRate,
williamr@2
   202
	EMMFAudioControllerGetSinkBitRate,
williamr@2
   203
	EMMFAudioControllerGetSinkNumChannels,
williamr@2
   204
	EMMFAudioControllerGetSinkFormat,
williamr@2
   205
	EMMFAudioControllerGetSinkDataType,
williamr@2
   206
	EMMFAudioControllerGetSupportedSourceSampleRates,
williamr@2
   207
	EMMFAudioControllerGetSupportedSourceBitRates,
williamr@2
   208
	EMMFAudioControllerGetSupportedSourceNumChannels,
williamr@2
   209
	EMMFAudioControllerGetSupportedSourceDataTypes,
williamr@2
   210
	EMMFAudioControllerGetSupportedSinkSampleRates,
williamr@2
   211
	EMMFAudioControllerGetSupportedSinkBitRates,
williamr@2
   212
	EMMFAudioControllerGetSupportedSinkNumChannels,
williamr@2
   213
	EMMFAudioControllerGetSupportedSinkDataTypes,
williamr@2
   214
	EMMFAudioControllerCopyArrayData,
williamr@2
   215
	EMMFAudioControllerSetCodec
williamr@2
   216
	};
williamr@2
   217
williamr@2
   218
williamr@2
   219
/**
williamr@2
   220
@publishedAll
williamr@2
   221
@released
williamr@2
   222
*/
williamr@2
   223
const TUid KUidInterfaceMMFVideoController = {0x101F76DB};
williamr@2
   224
williamr@2
   225
/**
williamr@2
   226
@internalComponent
williamr@2
   227
*/
williamr@2
   228
enum TMMFVideoControllerMessages
williamr@2
   229
	{
williamr@2
   230
	EMMFVideoControllerGetAudioCodec,
williamr@2
   231
	EMMFVideoControllerGetVideoBitRate,
williamr@2
   232
	EMMFVideoControllerGetAudioBitRate,
williamr@2
   233
	EMMFVideoControllerGetVideoFrameSize,
williamr@2
   234
	EMMFVideoControllerSetFrameRate,
williamr@2
   235
	EMMFVideoControllerGetFrameRate,
williamr@2
   236
	EMMFVideoControllerGetVideoMimeType
williamr@2
   237
	};
williamr@2
   238
williamr@2
   239
/**
williamr@2
   240
@publishedAll
williamr@2
   241
@released
williamr@2
   242
*/
williamr@2
   243
const TUid KUidInterfaceMMFVideoPlayController = {0x101F7B73};
williamr@2
   244
williamr@2
   245
/**
williamr@2
   246
@internalComponent
williamr@2
   247
*/
williamr@2
   248
enum TMMFVideoPlayControllerMessages
williamr@2
   249
	{
williamr@2
   250
	EMMFVideoPlayControllerPrepare,
williamr@2
   251
	EMMFVideoPlayControllerGetFrame,
williamr@2
   252
	EMMFVideoPlayControllerSetDisplayWindow,
williamr@2
   253
	EMMFVideoPlayControllerGetAudioEnabled,
williamr@2
   254
	EMMFVideoPlayControllerUpdateDisplayRegion,
williamr@2
   255
	EMMFVideoPlayControllerDSAEvent,
williamr@2
   256
	EMMFVideoPlayControllerPlay,
williamr@2
   257
	EMMFVideoPlayControllerRefreshFrame,
williamr@2
   258
	EMMFVideoPlayControllerGetLoadingProgress,
williamr@2
   259
	EMMFVideoPlayControllerSetRotation,
williamr@2
   260
	EMMFVideoPlayControllerGetRotation,
williamr@2
   261
	EMMFVideoPlayControllerSetScaleFactor,
williamr@2
   262
	EMMFVideoPlayControllerGetScaleFactor,
williamr@2
   263
	EMMFVideoPlayControllerSetCropRegion,
williamr@2
   264
	EMMFVideoPlayControllerGetCropRegion
williamr@2
   265
	};
williamr@2
   266
williamr@2
   267
/**
williamr@2
   268
@publishedAll
williamr@2
   269
@released
williamr@2
   270
*/
williamr@2
   271
const TUid KUidInterfaceMMFVideoRecordController = {0x101F7B74};
williamr@2
   272
williamr@2
   273
/**
williamr@2
   274
@internalComponent
williamr@2
   275
*/
williamr@2
   276
enum TMMFVideoRecordControllerMessages
williamr@2
   277
	{
williamr@2
   278
	EMMFVideoRecordControllerSetVideoFormat,
williamr@2
   279
	EMMFVideoRecordControllerSetVideoCodec,
williamr@2
   280
	EMMFVideoRecordControllerSetAudioCodec,
williamr@2
   281
	EMMFVideoRecordControllerSetVideoBitRate,
williamr@2
   282
	EMMFVideoRecordControllerSetAudioBitRate,
williamr@2
   283
	EMMFVideoRecordControllerSetVideoFrameSize,
williamr@2
   284
	EMMFVideoRecordControllerSetMaxFileSize,
williamr@2
   285
	EMMFVideoRecordControllerAddMetaDataEntry,
williamr@2
   286
	EMMFVideoRecordControllerRemoveMetaDataEntry,
williamr@2
   287
	EMMFVideoRecordControllerReplaceMetaDataEntry,
williamr@2
   288
	EMMFVideoRecordControllerSetAudioEnabled,
williamr@2
   289
	EMMFVideoRecordControllerPrepare,
williamr@2
   290
	EMMFVideoRecordControllerSetCameraHandle,
williamr@2
   291
	EMMFVideoRecordControllerGetRecordTimeAvailable,
williamr@2
   292
	EMMFVideoRecordControllerGetSupportedSinkAudioTypes,
williamr@2
   293
	EMMFVideoRecordControllerGetSupportedSinkVideoTypes,
williamr@2
   294
	EMMFVideoRecordControllerCopyDescriptorArrayData,
williamr@2
   295
	EMMFVideoRecordControllerCopyFourCCArrayData,
williamr@2
   296
	EMMFVideoRecordControllerGetAudioEnabled // INC23777
williamr@2
   297
	};
williamr@2
   298
williamr@2
   299
/**
williamr@2
   300
@publishedAll
williamr@2
   301
@released
williamr@2
   302
*/
williamr@2
   303
const TUid KUidInterfaceMMFVideoDRMExt = {0x101F7C23};
williamr@2
   304
williamr@2
   305
/**
williamr@2
   306
@internalComponent
williamr@2
   307
*/
williamr@2
   308
enum TMMFDRMIntentMessages
williamr@2
   309
	{
williamr@2
   310
	EMMFVideoDRMExtGetFrame
williamr@2
   311
	};
williamr@2
   312
williamr@2
   313
/**
williamr@2
   314
@publishedAll
williamr@2
   315
@released
williamr@2
   316
williamr@2
   317
Interface UID for the custom command that supports setting the initial screen for video on the controller.
williamr@2
   318
*/
williamr@2
   319
const TUid KUidInterfaceMMFVideoSetInitScreen = {0x102825F7};
williamr@2
   320
williamr@2
   321
/**
williamr@2
   322
@internalComponent
williamr@2
   323
*/
williamr@2
   324
enum TMMFVideoScreenDeviceMessages
williamr@2
   325
	{
williamr@2
   326
	EMMFVideoSetInitScreenNumber
williamr@2
   327
	};
williamr@2
   328
williamr@2
   329
williamr@2
   330
/**
williamr@2
   331
@publishedAll
williamr@2
   332
@prototype
williamr@2
   333
*/
williamr@2
   334
const TUid KUidInterfaceMMFVideoPixelAspectRatio = {0x102831EF};
williamr@2
   335
williamr@2
   336
/**
williamr@2
   337
@internalComponent
williamr@2
   338
*/
williamr@2
   339
enum TMMFVideoPixelAspectRatioMessages
williamr@2
   340
	{
williamr@2
   341
	EMMFVideoGetPixelAspectRatio,
williamr@2
   342
	EMMFVideoSetPixelAspectRatio,
williamr@2
   343
	EMMFVideoGetSupportedPixelAspectRatios,
williamr@2
   344
	EMMFVideoPixelAspectRatioCopyArrayData
williamr@2
   345
	};
williamr@2
   346
williamr@2
   347
/**
williamr@2
   348
@publishedAll
williamr@2
   349
@prototype
williamr@2
   350
*/
williamr@2
   351
const TUid KUidInterfaceMMFVideoAudioSamplingRateAndChannelConfig = {0x102831F0};
williamr@2
   352
williamr@2
   353
/**
williamr@2
   354
@internalComponent
williamr@2
   355
*/
williamr@2
   356
enum TMMFVideoAudioSamplingRateAndChannelConfigMessages
williamr@2
   357
	{
williamr@2
   358
	EMMFVideoGetAudioChannels,
williamr@2
   359
	EMMFVideoSetAudioChannels,
williamr@2
   360
	EMMFVideoGetSupportedAudioChannels,
williamr@2
   361
	EMMFVideoGetAudioSampleRate,
williamr@2
   362
	EMMFVideoSetAudioSampleRate,
williamr@2
   363
	EMMFVideoGetSupportedAudioSampleRates,
williamr@2
   364
	EMMFVideoAudioSamplingRateAndChannelConfigCopyArrayData
williamr@2
   365
	};
williamr@2
   366
williamr@2
   367
/**
williamr@2
   368
@publishedAll
williamr@2
   369
@released
williamr@2
   370
williamr@2
   371
Client class to access Audio Play Device functionality.
williamr@2
   372
williamr@2
   373
The class uses the custom command function of the controller plugin, and removes the necessity
williamr@2
   374
for the client to formulate the custom commands.
williamr@2
   375
@since 7.0s
williamr@2
   376
*/
williamr@2
   377
class RMMFAudioPlayDeviceCustomCommands : public RMMFCustomCommandsBase
williamr@2
   378
	{
williamr@2
   379
public:
williamr@2
   380
williamr@2
   381
	/**
williamr@2
   382
	Constructor.
williamr@2
   383
williamr@2
   384
	@param  aController
williamr@2
   385
	        The client side controller object to be used by this custom command interface.
williamr@2
   386
williamr@2
   387
	@since 7.0s
williamr@2
   388
	*/
williamr@2
   389
	IMPORT_C RMMFAudioPlayDeviceCustomCommands(RMMFController& aController);
williamr@2
   390
williamr@2
   391
	/**
williamr@2
   392
	Sets the volume of the sound device.
williamr@2
   393
williamr@2
   394
	@param  aVolume
williamr@2
   395
	        The new volume.
williamr@2
   396
williamr@2
   397
	@return	One of the system-wide error codes.
williamr@2
   398
williamr@2
   399
	@since 7.0s
williamr@2
   400
	*/
williamr@2
   401
	IMPORT_C TInt SetVolume(TInt aVolume) const;
williamr@2
   402
williamr@2
   403
	/**
williamr@2
   404
	Gets the maximum volume supported by the sound device.
williamr@2
   405
williamr@2
   406
	@param  aMaxVolume
williamr@2
   407
	        The maximum volume, filled in by the controller.
williamr@2
   408
williamr@2
   409
	@return One of the system-wide error codes.
williamr@2
   410
williamr@2
   411
	@since  7.0s
williamr@2
   412
	*/
williamr@2
   413
	IMPORT_C TInt GetMaxVolume(TInt& aMaxVolume) const;
williamr@2
   414
williamr@2
   415
	/**
williamr@2
   416
	Gets the current playback volume.
williamr@2
   417
williamr@2
   418
	@param  aVolume
williamr@2
   419
	        On return contains the current playback volume.
williamr@2
   420
williamr@2
   421
	@return One of the system-wide error codes.
williamr@2
   422
williamr@2
   423
	@since  7.0s
williamr@2
   424
	*/
williamr@2
   425
	IMPORT_C TInt GetVolume(TInt& aVolume) const;
williamr@2
   426
williamr@2
   427
	/**
williamr@2
   428
	Sets a volume ramp.
williamr@2
   429
williamr@2
   430
	This will cause the sound device to start playing with zero volume,
williamr@2
   431
	increasing the volume over aRampDuration microseconds.
williamr@2
   432
williamr@2
   433
	The volume ramp can be removed by setting the ramp duration to zero.
williamr@2
   434
williamr@2
   435
	@param  aRampDuration
williamr@2
   436
	        The duration over which the volume is to be increased, in microseconds.
williamr@2
   437
williamr@2
   438
	@return One of the system-wide error codes.
williamr@2
   439
williamr@2
   440
	@since 7.0s
williamr@2
   441
	*/
williamr@2
   442
	IMPORT_C TInt SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampDuration) const;
williamr@2
   443
williamr@2
   444
	/**
williamr@2
   445
	Sets the balance between the left and right stereo audio channels.
williamr@2
   446
williamr@2
   447
	@param  aBalance
williamr@2
   448
	        Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
williamr@2
   449
	        restored by using KMMFBalanceCenter.
williamr@2
   450
williamr@2
   451
	@return	One of the system-wide error codes.
williamr@2
   452
williamr@2
   453
	@since 7.0s
williamr@2
   454
	*/
williamr@2
   455
	IMPORT_C TInt SetBalance(TInt aBalance) const;
williamr@2
   456
williamr@2
   457
	/**
williamr@2
   458
	Gets the balance between the left and right stereo audio channels.
williamr@2
   459
williamr@2
   460
	@param  aBalance
williamr@2
   461
	        The current balance, filled in by the controller.
williamr@2
   462
williamr@2
   463
	@return One of the system-wide error codes.
williamr@2
   464
	
williamr@2
   465
	@since 7.0s
williamr@2
   466
	*/
williamr@2
   467
	IMPORT_C TInt GetBalance(TInt& aBalance) const;
williamr@2
   468
	};
williamr@2
   469
williamr@2
   470
/**
williamr@2
   471
@publishedAll
williamr@2
   472
@released
williamr@2
   473
williamr@2
   474
Mixin class to be derived from controller plugins that could support the audio play device
williamr@2
   475
custom commands.
williamr@2
   476
*/
williamr@2
   477
class MMMFAudioPlayDeviceCustomCommandImplementor
williamr@2
   478
	{
williamr@2
   479
public:
williamr@2
   480
williamr@2
   481
	/**
williamr@2
   482
	Sets the volume of the sound device.
williamr@2
   483
williamr@2
   484
	This function can leave with one of the system-wide error codes. The request will be
williamr@2
   485
	completed with the leave code.
williamr@2
   486
williamr@2
   487
	@param  aVolume
williamr@2
   488
	        The new volume.
williamr@2
   489
williamr@2
   490
	@since 7.0s
williamr@2
   491
	*/
williamr@2
   492
	virtual void MapdSetVolumeL(TInt aVolume) = 0;
williamr@2
   493
williamr@2
   494
	/**
williamr@2
   495
	Gets the maximum volume supported by the sound device.
williamr@2
   496
williamr@2
   497
	This function can leave with one of the system-wide error codes. The request will be
williamr@2
   498
	completed with the leave code.
williamr@2
   499
williamr@2
   500
	@param  aMaxVolume
williamr@2
   501
	        The maximum volume, to be filled in by the controller plugin.
williamr@2
   502
williamr@2
   503
	@since 7.0s
williamr@2
   504
	*/
williamr@2
   505
	virtual void MapdGetMaxVolumeL(TInt& aMaxVolume) = 0;
williamr@2
   506
williamr@2
   507
	/**
williamr@2
   508
	Gets the current playback volume.
williamr@2
   509
williamr@2
   510
	This function can leave with one of the system-wide error codes. The request will be
williamr@2
   511
	completed with the leave code.
williamr@2
   512
williamr@2
   513
	@param  aVolume
williamr@2
   514
	        The volume, to be filled in by the controller.
williamr@2
   515
williamr@2
   516
	@since 7.0s
williamr@2
   517
	*/
williamr@2
   518
	virtual void MapdGetVolumeL(TInt& aVolume) = 0;
williamr@2
   519
williamr@2
   520
	/**
williamr@2
   521
	Sets a volume ramp.
williamr@2
   522
williamr@2
   523
	This will cause the sound device to start playing with zero volume,
williamr@2
   524
	increasing the volume over aRampDuration microseconds.
williamr@2
   525
williamr@2
   526
	The volume ramp can be removed by setting the ramp duration to zero.
williamr@2
   527
williamr@2
   528
	This function can leave with one of the system-wide error codes. The request will be
williamr@2
   529
	completed with the leave code.
williamr@2
   530
williamr@2
   531
	@param  aRampDuration
williamr@2
   532
	        The duration over which the volume is to be increased, in microseconds.
williamr@2
   533
williamr@2
   534
	@since 7.0s
williamr@2
   535
	*/
williamr@2
   536
	virtual void MapdSetVolumeRampL(const TTimeIntervalMicroSeconds& aRampDuration) = 0;
williamr@2
   537
williamr@2
   538
	/**
williamr@2
   539
	Sets the balance between the left and right stereo audio channels.
williamr@2
   540
williamr@2
   541
	This function can leave with one of the system-wide error codes. The request will be
williamr@2
   542
	completed with the leave code.
williamr@2
   543
williamr@2
   544
	@param  aBalance
williamr@2
   545
	        Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
williamr@2
   546
	        restored by using KMMFBalanceCenter.
williamr@2
   547
williamr@2
   548
	@since 7.0s
williamr@2
   549
	*/
williamr@2
   550
	virtual void MapdSetBalanceL(TInt aBalance) = 0;
williamr@2
   551
williamr@2
   552
	/**
williamr@2
   553
	Gets the balance between the left and right stereo audio channels.
williamr@2
   554
williamr@2
   555
	This function can leave with one of the system-wide error codes. The request will be
williamr@2
   556
	completed with the leave code.
williamr@2
   557
williamr@2
   558
	@param  aBalance
williamr@2
   559
	        The current balance, filled in by the controller.
williamr@2
   560
williamr@2
   561
	@since 7.0s
williamr@2
   562
	*/
williamr@2
   563
	virtual void MapdGetBalanceL(TInt& aBalance) = 0;
williamr@2
   564
	};
williamr@2
   565
williamr@2
   566
/**
williamr@2
   567
@publishedAll
williamr@2
   568
@released
williamr@2
   569
williamr@2
   570
Custom command parser class to be used by controller plugins wishing to support
williamr@2
   571
audio play device commands.
williamr@2
   572
williamr@2
   573
The controller plugin must be derived from MMMFAudioPlayDeviceCustomCommandImplementor
williamr@2
   574
to use this class.
williamr@2
   575
williamr@2
   576
The controller plugin should create an object of this type and add it to the list of custom
williamr@2
   577
command parsers in the controller framework. See the following example code for details.
williamr@2
   578
williamr@2
   579
@code
williamr@2
   580
void CMMFAudioController::ConstructL()
williamr@2
   581
	{
williamr@2
   582
	// Construct custom command parsers
williamr@2
   583
	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
williamr@2
   584
	CleanupStack::PushL(audPlayDevParser);
williamr@2
   585
	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
williamr@2
   586
	CleanupStack::Pop();//audPlayDevParser
williamr@2
   587
williamr@2
   588
	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
williamr@2
   589
	CleanupStack::PushL(audRecDevParser);
williamr@2
   590
	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
williamr@2
   591
	CleanupStack::Pop();//audRecDevParser
williamr@2
   592
williamr@2
   593
etc.
williamr@2
   594
	}
williamr@2
   595
@endcode
williamr@2
   596
williamr@2
   597
@since 7.0s
williamr@2
   598
*/
williamr@2
   599
class CMMFAudioPlayDeviceCustomCommandParser : public CMMFCustomCommandParserBase
williamr@2
   600
	{
williamr@2
   601
public:
williamr@2
   602
williamr@2
   603
	/**
williamr@2
   604
	Creates a new custom command parser capable of handling audio play device commands.
williamr@2
   605
williamr@2
   606
	This function may leave with one of the system-wide error codes.
williamr@2
   607
williamr@2
   608
	@param  aImplementor
williamr@2
   609
	        A reference to the controller plugin that owns this new object.
williamr@2
   610
williamr@2
   611
	@return	A pointer to the object created.
williamr@2
   612
williamr@2
   613
	@since  7.0s
williamr@2
   614
	*/
williamr@2
   615
	IMPORT_C static CMMFAudioPlayDeviceCustomCommandParser* NewL(MMMFAudioPlayDeviceCustomCommandImplementor& aImplementor);
williamr@2
   616
williamr@2
   617
	/**
williamr@2
   618
	Destructor.
williamr@2
   619
williamr@2
   620
	@since  7.0s
williamr@2
   621
	*/
williamr@2
   622
	IMPORT_C ~CMMFAudioPlayDeviceCustomCommandParser();
williamr@2
   623
williamr@2
   624
	/**
williamr@2
   625
	Handles a request from the client. Called by the controller framework.
williamr@2
   626
williamr@2
   627
	@param  aMessage
williamr@2
   628
	        The message to be handled.
williamr@2
   629
williamr@2
   630
	@since  7.0s
williamr@2
   631
	*/
williamr@2
   632
	void HandleRequest(TMMFMessage& aMessage);
williamr@2
   633
private:
williamr@2
   634
williamr@2
   635
	/**
williamr@2
   636
	Constructor.
williamr@2
   637
williamr@2
   638
	@param  aImplementor
williamr@2
   639
	        A reference to the controller plugin that owns this new object.
williamr@2
   640
williamr@2
   641
	@since	7.0s
williamr@2
   642
	*/
williamr@2
   643
	CMMFAudioPlayDeviceCustomCommandParser(MMMFAudioPlayDeviceCustomCommandImplementor& aImplementor);
williamr@2
   644
	// Internal request handling methods.
williamr@2
   645
	void DoHandleRequestL(TMMFMessage& aMessage);
williamr@2
   646
	TBool DoSetVolumeL(TMMFMessage& aMessage);
williamr@2
   647
	TBool DoGetMaxVolumeL(TMMFMessage& aMessage);
williamr@2
   648
	TBool DoGetVolumeL(TMMFMessage& aMessage);
williamr@2
   649
	TBool DoSetVolumeRampL(TMMFMessage& aMessage);
williamr@2
   650
	TBool DoSetBalanceL(TMMFMessage& aMessage);
williamr@2
   651
	TBool DoGetBalanceL(TMMFMessage& aMessage);
williamr@2
   652
private:
williamr@2
   653
	/** The object that implements the audio play device interface */
williamr@2
   654
	MMMFAudioPlayDeviceCustomCommandImplementor& iImplementor;
williamr@2
   655
	};
williamr@2
   656
williamr@2
   657
/**
williamr@2
   658
@publishedAll
williamr@2
   659
@released
williamr@2
   660
williamr@2
   661
Client class to access Audio Record Device functionality.
williamr@2
   662
williamr@2
   663
The class uses the custom command function of the controller plugin, and removes the necessity
williamr@2
   664
for the client to formulate the custom commands.
williamr@2
   665
williamr@2
   666
@since 7.0s
williamr@2
   667
*/
williamr@2
   668
class RMMFAudioRecordDeviceCustomCommands : public RMMFCustomCommandsBase
williamr@2
   669
	{
williamr@2
   670
public:
williamr@2
   671
	
williamr@2
   672
	/**
williamr@2
   673
	Constructor.
williamr@2
   674
williamr@2
   675
	@param  aController
williamr@2
   676
	        The client side controller object to be used by this custom command interface.
williamr@2
   677
williamr@2
   678
	@since 7.0s
williamr@2
   679
	*/
williamr@2
   680
	IMPORT_C RMMFAudioRecordDeviceCustomCommands(RMMFController& aController);
williamr@2
   681
williamr@2
   682
	/**
williamr@2
   683
	Sets the gain of the sound device.
williamr@2
   684
williamr@2
   685
	@param  aGain
williamr@2
   686
	        The new gain.
williamr@2
   687
williamr@2
   688
	@return One of the system-wide error codes.
williamr@2
   689
williamr@2
   690
	@since 7.0s
williamr@2
   691
	*/
williamr@2
   692
	IMPORT_C TInt SetGain(TInt aGain) const;
williamr@2
   693
williamr@2
   694
	/**
williamr@2
   695
	Gets the maximum gain supported by the sound device.
williamr@2
   696
williamr@2
   697
	@param  aMaxGain
williamr@2
   698
	        The maximum gain, filled in by the controller.
williamr@2
   699
williamr@2
   700
	@return One of the system-wide error codes.
williamr@2
   701
williamr@2
   702
	@since 7.0s
williamr@2
   703
	*/
williamr@2
   704
	IMPORT_C TInt GetMaxGain(TInt& aMaxGain) const;
williamr@2
   705
williamr@2
   706
	/**
williamr@2
   707
	Gets the current recording gain.
williamr@2
   708
williamr@2
   709
	@param  aGain
williamr@2
   710
	        The gain, filled in by the controller.
williamr@2
   711
williamr@2
   712
	@return One of the system-wide error codes.
williamr@2
   713
williamr@2
   714
	@since  7.0s
williamr@2
   715
	*/
williamr@2
   716
	IMPORT_C TInt GetGain(TInt& aGain) const;
williamr@2
   717
williamr@2
   718
	/**
williamr@2
   719
	Sets the balance between the left and right stereo microphone channels.
williamr@2
   720
williamr@2
   721
	@param  aBalance
williamr@2
   722
	        Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be 
williamr@2
   723
	        restored by using KMMFBalanceCenter.
williamr@2
   724
williamr@2
   725
	@return One of the system-wide error codes.
williamr@2
   726
williamr@2
   727
	@since 7.0s
williamr@2
   728
	*/
williamr@2
   729
	IMPORT_C TInt SetBalance(TInt aBalance) const;
williamr@2
   730
williamr@2
   731
	/**
williamr@2
   732
	Gets the balance between the left and right stereo microphone channels.
williamr@2
   733
williamr@2
   734
	@param  aBalance
williamr@2
   735
	        The current balance, filled in by the controller.
williamr@2
   736
williamr@2
   737
	@return One of the system-wide error codes.
williamr@2
   738
williamr@2
   739
	@since  7.0s
williamr@2
   740
	*/
williamr@2
   741
	IMPORT_C TInt GetBalance(TInt& aBalance) const;
williamr@2
   742
	};
williamr@2
   743
williamr@2
   744
/**
williamr@2
   745
@publishedAll
williamr@2
   746
@released
williamr@2
   747
williamr@2
   748
Mixin class to be derived from controller plugins that could support the audio record device
williamr@2
   749
custom commands.
williamr@2
   750
*/
williamr@2
   751
class MMMFAudioRecordDeviceCustomCommandImplementor
williamr@2
   752
	{
williamr@2
   753
public:
williamr@2
   754
williamr@2
   755
	/**
williamr@2
   756
	Sets the gain of the sound device.
williamr@2
   757
williamr@2
   758
	This function can leave with one of the system-wide error codes. The request will be
williamr@2
   759
	completed with the leave code.
williamr@2
   760
williamr@2
   761
	@param  aGain
williamr@2
   762
	        The new gain.
williamr@2
   763
williamr@2
   764
	@since 7.0s
williamr@2
   765
	*/
williamr@2
   766
	virtual void MardSetGainL(TInt aGain) = 0;
williamr@2
   767
williamr@2
   768
	/**
williamr@2
   769
	Gets the maximum gain supported by the sound device.
williamr@2
   770
williamr@2
   771
	This function can leave with one of the system-wide error codes. The request will be
williamr@2
   772
	completed with the leave code.
williamr@2
   773
williamr@2
   774
	@param  aMaxGain
williamr@2
   775
	        The maximum gain, to be filled in by the controller plugin.
williamr@2
   776
williamr@2
   777
	@since 7.0s
williamr@2
   778
	*/
williamr@2
   779
	virtual void MardGetMaxGainL(TInt& aMaxGain) = 0;
williamr@2
   780
williamr@2
   781
	/**
williamr@2
   782
	Gets the current recording gain.
williamr@2
   783
williamr@2
   784
	This function can leave with one of the system-wide error codes. The request will be
williamr@2
   785
	completed with the leave code.
williamr@2
   786
williamr@2
   787
	@param  aGain
williamr@2
   788
	        The gain, to be filled in by the controller.
williamr@2
   789
williamr@2
   790
	@since 7.0s
williamr@2
   791
	*/
williamr@2
   792
	virtual void MardGetGainL(TInt& aGain) = 0;
williamr@2
   793
williamr@2
   794
	/**
williamr@2
   795
	Sets the balance between the left and right stereo microphone channels.
williamr@2
   796
williamr@2
   797
	This function can leave with one of the system-wide error codes. The request will be
williamr@2
   798
	completed with the leave code.
williamr@2
   799
williamr@2
   800
	@param  aBalance
williamr@2
   801
	        Use a value between KMMFBalanceMaxLeft and KMMFBalanceMaxRight. Centre balance can be
williamr@2
   802
	        restored by using KMMFBalanceCenter.
williamr@2
   803
williamr@2
   804
	@since 7.0s
williamr@2
   805
	*/
williamr@2
   806
	virtual void MardSetBalanceL(TInt aBalance) = 0;
williamr@2
   807
williamr@2
   808
	/**
williamr@2
   809
	Gets the balance between the left and right stereo microphone channels.
williamr@2
   810
williamr@2
   811
	This function can leave with one of the system-wide error codes. The request will be
williamr@2
   812
	completed with the leave code.
williamr@2
   813
williamr@2
   814
	@param  aBalance
williamr@2
   815
	        The current balance, filled in by the controller.
williamr@2
   816
williamr@2
   817
	@since 7.0s
williamr@2
   818
	*/
williamr@2
   819
	virtual void MardGetBalanceL(TInt& aBalance) = 0;
williamr@2
   820
	};
williamr@2
   821
williamr@2
   822
/**
williamr@2
   823
@publishedAll
williamr@2
   824
@released
williamr@2
   825
williamr@2
   826
Custom command parser class to be used by controller plugins wishing to support
williamr@2
   827
audio record device commands.
williamr@2
   828
williamr@2
   829
The controller plugin must be derived from MMMFAudioRecordDeviceCustomCommandImplementor
williamr@2
   830
to use this class.
williamr@2
   831
williamr@2
   832
The controller plugin should create an object of this type and add it to the list of custom
williamr@2
   833
command parsers in the controller framework.  See the following example code for details.
williamr@2
   834
williamr@2
   835
@code
williamr@2
   836
void CMMFAudioController::ConstructL()
williamr@2
   837
	{
williamr@2
   838
	// Construct custom command parsers
williamr@2
   839
	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
williamr@2
   840
	CleanupStack::PushL(audPlayDevParser);
williamr@2
   841
	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
williamr@2
   842
	CleanupStack::Pop();//audPlayDevParser
williamr@2
   843
williamr@2
   844
	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
williamr@2
   845
	CleanupStack::PushL(audRecDevParser);
williamr@2
   846
	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
williamr@2
   847
	CleanupStack::Pop();//audRecDevParser
williamr@2
   848
williamr@2
   849
etc.
williamr@2
   850
	}
williamr@2
   851
@endcode
williamr@2
   852
williamr@2
   853
@since 7.0s
williamr@2
   854
*/
williamr@2
   855
class CMMFAudioRecordDeviceCustomCommandParser : public CMMFCustomCommandParserBase
williamr@2
   856
	{
williamr@2
   857
public:
williamr@2
   858
williamr@2
   859
	/**
williamr@2
   860
	Creates a new custom command parser capable of handling audio record device commands.
williamr@2
   861
williamr@2
   862
	This function may leave with one of the system-wide error codes.
williamr@2
   863
williamr@2
   864
	@param  aImplementor
williamr@2
   865
	        A reference to the controller plugin that owns this new object.
williamr@2
   866
williamr@2
   867
	@return A pointer to the object created.
williamr@2
   868
williamr@2
   869
	@since	7.0s
williamr@2
   870
	*/
williamr@2
   871
	IMPORT_C static CMMFAudioRecordDeviceCustomCommandParser* NewL(MMMFAudioRecordDeviceCustomCommandImplementor& aImplementor);
williamr@2
   872
williamr@2
   873
	/**
williamr@2
   874
	Destructor.
williamr@2
   875
williamr@2
   876
	@since  7.0s
williamr@2
   877
	*/
williamr@2
   878
	IMPORT_C ~CMMFAudioRecordDeviceCustomCommandParser();
williamr@2
   879
williamr@2
   880
	/**
williamr@2
   881
	Handles a request from the client. Called by the controller framework.
williamr@2
   882
williamr@2
   883
	@param  aMessage
williamr@2
   884
	        The message to be handled.
williamr@2
   885
williamr@2
   886
	@since	7.0s
williamr@2
   887
	*/
williamr@2
   888
	void HandleRequest(TMMFMessage& aMessage);
williamr@2
   889
private:
williamr@2
   890
williamr@2
   891
	/**
williamr@2
   892
	Constructor.
williamr@2
   893
williamr@2
   894
	@param  aImplementor
williamr@2
   895
	        A reference to the controller plugin that owns this new object.
williamr@2
   896
williamr@2
   897
	@since	7.0s
williamr@2
   898
	*/
williamr@2
   899
	CMMFAudioRecordDeviceCustomCommandParser(MMMFAudioRecordDeviceCustomCommandImplementor& aImplementor);
williamr@2
   900
	// Internal request handling methods.
williamr@2
   901
	void DoHandleRequestL(TMMFMessage& aMessage);
williamr@2
   902
	TBool DoSetGainL(TMMFMessage& aMessage);
williamr@2
   903
	TBool DoGetMaxGainL(TMMFMessage& aMessage);
williamr@2
   904
	TBool DoGetGainL(TMMFMessage& aMessage);
williamr@2
   905
	TBool DoSetBalanceL(TMMFMessage& aMessage);
williamr@2
   906
	TBool DoGetBalanceL(TMMFMessage& aMessage);
williamr@2
   907
private:
williamr@2
   908
	/** The object that implements the audio record device interface */
williamr@2
   909
	MMMFAudioRecordDeviceCustomCommandImplementor& iImplementor;
williamr@2
   910
	};
williamr@2
   911
williamr@2
   912
williamr@2
   913
/**
williamr@2
   914
@publishedAll
williamr@2
   915
@released
williamr@2
   916
williamr@2
   917
Client class to access functionality specific to an audio play controller.
williamr@2
   918
williamr@2
   919
The class uses the custom command function of the controller plugin, and removes the necessity
williamr@2
   920
for the client to formulate the custom commands.
williamr@2
   921
williamr@2
   922
@since 7.0s
williamr@2
   923
*/
williamr@2
   924
class RMMFAudioPlayControllerCustomCommands : public RMMFCustomCommandsBase
williamr@2
   925
	{
williamr@2
   926
public:
williamr@2
   927
	
williamr@2
   928
	/**
williamr@2
   929
	Constructor.
williamr@2
   930
williamr@2
   931
	@param  aController
williamr@2
   932
	        The client side controller object to be used by this custom command interface.
williamr@2
   933
williamr@2
   934
	@since  7.0s
williamr@2
   935
	*/
williamr@2
   936
	IMPORT_C RMMFAudioPlayControllerCustomCommands(RMMFController& aController);
williamr@2
   937
williamr@2
   938
	/**
williamr@2
   939
	Sets a playback window.  The controller will start playing from the start of the window,
williamr@2
   940
	and finish playing at the end of the window.
williamr@2
   941
williamr@2
   942
	@param  aStart
williamr@2
   943
	        The start of the window, in microseconds.
williamr@2
   944
	@param  aEnd
williamr@2
   945
	        The end of the window, in microseconds.
williamr@2
   946
williamr@2
   947
	@return One of the system-wide error codes.
williamr@2
   948
williamr@2
   949
	@since 7.0s
williamr@2
   950
	*/
williamr@2
   951
	IMPORT_C TInt SetPlaybackWindow(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) const;
williamr@2
   952
williamr@2
   953
	/**
williamr@2
   954
	Removes a previously defined playback window.
williamr@2
   955
williamr@2
   956
	@return One of the system-wide error codes.
williamr@2
   957
	@since 7.0s
williamr@2
   958
	*/
williamr@2
   959
	IMPORT_C TInt DeletePlaybackWindow();
williamr@2
   960
williamr@2
   961
	/**
williamr@2
   962
	Gets the audio loading progress as a percentage.
williamr@2
   963
williamr@2
   964
	@param  aPercentageProgress
williamr@2
   965
	        The progress loading the clip, as a percentage.
williamr@2
   966
williamr@2
   967
	@return One of the system-wide error codes.
williamr@2
   968
williamr@2
   969
	@since 7.0s
williamr@2
   970
	*/
williamr@2
   971
	IMPORT_C TInt GetLoadingProgress(TInt& aPercentageProgress) const;
williamr@2
   972
	};
williamr@2
   973
williamr@2
   974
williamr@2
   975
/**
williamr@2
   976
@publishedAll
williamr@2
   977
@released
williamr@2
   978
williamr@2
   979
Mixin class to be derived from controller plugins that could support the audio play controller
williamr@2
   980
custom commands.
williamr@2
   981
*/
williamr@2
   982
class MMMFAudioPlayControllerCustomCommandImplementor
williamr@2
   983
	{
williamr@2
   984
public:
williamr@2
   985
williamr@2
   986
	/**
williamr@2
   987
	Sets a playback window. The controller will start playing from the start of the window,
williamr@2
   988
	and finish playing at the end of the window.
williamr@2
   989
williamr@2
   990
	This function can leave with one of the system-wide error codes. The request will be
williamr@2
   991
	completed with the leave code.
williamr@2
   992
williamr@2
   993
	@param  aStart
williamr@2
   994
	        The start of the window, in microseconds.
williamr@2
   995
	@param  aEnd
williamr@2
   996
	        The end of the window, in microseconds.
williamr@2
   997
williamr@2
   998
	@since 7.0s
williamr@2
   999
	*/
williamr@2
  1000
	virtual void MapcSetPlaybackWindowL(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) = 0;
williamr@2
  1001
williamr@2
  1002
	/**
williamr@2
  1003
	Removes a previously defined playback window.
williamr@2
  1004
williamr@2
  1005
	This function can leave with one of the system-wide error codes. The request will be
williamr@2
  1006
	completed with the leave code.
williamr@2
  1007
williamr@2
  1008
	@since 7.0s
williamr@2
  1009
	*/
williamr@2
  1010
	virtual void MapcDeletePlaybackWindowL() = 0;
williamr@2
  1011
williamr@2
  1012
	/**
williamr@2
  1013
	Gets the completion status of loading/rebuffering the current audio clip.
williamr@2
  1014
williamr@2
  1015
	This function can leave with one of the system-wide error codes. The request will be
williamr@2
  1016
	completed with the leave code.
williamr@2
  1017
williamr@2
  1018
	@param  aPercentageComplete
williamr@2
  1019
	        The status of loading as a percentage completed.
williamr@2
  1020
williamr@2
  1021
	@since 7.0s
williamr@2
  1022
	*/
williamr@2
  1023
	virtual void MapcGetLoadingProgressL(TInt& aPercentageComplete) = 0;
williamr@2
  1024
	};
williamr@2
  1025
williamr@2
  1026
/**
williamr@2
  1027
@publishedAll
williamr@2
  1028
@released
williamr@2
  1029
williamr@2
  1030
Custom command parser class to be used by controller plugins wishing to support
williamr@2
  1031
audio play controller commands.
williamr@2
  1032
williamr@2
  1033
The controller plugin must be derived from MMMFAudioPlayControllerCustomCommandImplementor to use 
williamr@2
  1034
this class.
williamr@2
  1035
williamr@2
  1036
The controller plugin should create an object of this type and add it to the list of custom
williamr@2
  1037
command parsers in the controller framework. See the following example code for details.
williamr@2
  1038
williamr@2
  1039
@code
williamr@2
  1040
void CMMFAudioController::ConstructL()
williamr@2
  1041
	{
williamr@2
  1042
	// Construct custom command parsers
williamr@2
  1043
	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
williamr@2
  1044
	CleanupStack::PushL(audPlayDevParser);
williamr@2
  1045
	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
williamr@2
  1046
	CleanupStack::Pop();//audPlayDevParser
williamr@2
  1047
williamr@2
  1048
	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
williamr@2
  1049
	CleanupStack::PushL(audRecDevParser);
williamr@2
  1050
	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
williamr@2
  1051
	CleanupStack::Pop();//audRecDevParser
williamr@2
  1052
williamr@2
  1053
etc.
williamr@2
  1054
	}
williamr@2
  1055
@endcode
williamr@2
  1056
williamr@2
  1057
@since  7.0s
williamr@2
  1058
*/
williamr@2
  1059
class CMMFAudioPlayControllerCustomCommandParser : public CMMFCustomCommandParserBase
williamr@2
  1060
	{
williamr@2
  1061
public:
williamr@2
  1062
williamr@2
  1063
	/**
williamr@2
  1064
	Creates a new custom command parser capable of handling audio play controller commands.
williamr@2
  1065
williamr@2
  1066
	@param  aImplementor
williamr@2
  1067
	        A reference to the controller plugin that owns this new object.
williamr@2
  1068
williamr@2
  1069
	@return A pointer to the object created.
williamr@2
  1070
williamr@2
  1071
	@since	7.0s
williamr@2
  1072
	*/
williamr@2
  1073
	IMPORT_C static CMMFAudioPlayControllerCustomCommandParser* NewL(MMMFAudioPlayControllerCustomCommandImplementor& aImplementor);
williamr@2
  1074
williamr@2
  1075
	/**
williamr@2
  1076
	Destructor.
williamr@2
  1077
williamr@2
  1078
	@since 7.0s
williamr@2
  1079
	*/
williamr@2
  1080
	IMPORT_C ~CMMFAudioPlayControllerCustomCommandParser();
williamr@2
  1081
williamr@2
  1082
	/**
williamr@2
  1083
	Handles a request from the client. Called by the controller framework.
williamr@2
  1084
williamr@2
  1085
	@param  aMessage
williamr@2
  1086
	        The message to be handled.
williamr@2
  1087
williamr@2
  1088
	@since  7.0s
williamr@2
  1089
	*/
williamr@2
  1090
	void HandleRequest(TMMFMessage& aMessage);
williamr@2
  1091
private:
williamr@2
  1092
williamr@2
  1093
	/**
williamr@2
  1094
	Constructor.
williamr@2
  1095
williamr@2
  1096
	@param  aImplementor
williamr@2
  1097
	        A reference to the controller plugin that owns this new object.
williamr@2
  1098
williamr@2
  1099
	@since	7.0s
williamr@2
  1100
	*/
williamr@2
  1101
	CMMFAudioPlayControllerCustomCommandParser(MMMFAudioPlayControllerCustomCommandImplementor& aImplementor);
williamr@2
  1102
	// Internal request handling methods.
williamr@2
  1103
	void DoHandleRequestL(TMMFMessage& aMessage);
williamr@2
  1104
	TBool DoSetPlaybackWindowL(TMMFMessage& aMessage);
williamr@2
  1105
	TBool DoDeletePlaybackWindowL(TMMFMessage& aMessage);
williamr@2
  1106
	TBool DoGetLoadingProgressL(TMMFMessage& aMessage);
williamr@2
  1107
private:
williamr@2
  1108
	/** 
williamr@2
  1109
	The object that implements the audio play controller interface 
williamr@2
  1110
	*/
williamr@2
  1111
	MMMFAudioPlayControllerCustomCommandImplementor& iImplementor;
williamr@2
  1112
	};
williamr@2
  1113
williamr@2
  1114
williamr@2
  1115
williamr@2
  1116
williamr@2
  1117
/**
williamr@2
  1118
@publishedAll
williamr@2
  1119
@released
williamr@2
  1120
williamr@2
  1121
Client class to access functionality specific to an audio record controller.
williamr@2
  1122
williamr@2
  1123
The class uses the custom command function of the controller plugin, and removes the necessity
williamr@2
  1124
for the client to formulate the custom commands.
williamr@2
  1125
williamr@2
  1126
@since  7.0s
williamr@2
  1127
*/
williamr@2
  1128
class RMMFAudioRecordControllerCustomCommands : public RMMFCustomCommandsBase
williamr@2
  1129
	{
williamr@2
  1130
public:
williamr@2
  1131
williamr@2
  1132
	/**
williamr@2
  1133
	Constructor.
williamr@2
  1134
williamr@2
  1135
	@param  aController
williamr@2
  1136
	        The client side controller object to be used by this custom command	interface.
williamr@2
  1137
williamr@2
  1138
	@since  7.0s
williamr@2
  1139
	*/
williamr@2
  1140
	IMPORT_C RMMFAudioRecordControllerCustomCommands(RMMFController& aController);
williamr@2
  1141
williamr@2
  1142
	/**
williamr@2
  1143
	Gets the (possibly estimated) record time left in the clip.
williamr@2
  1144
williamr@2
  1145
	@param  aTime
williamr@2
  1146
	        The record time available, in microseconds.
williamr@2
  1147
williamr@2
  1148
	@return One of the system-wide error codes.
williamr@2
  1149
williamr@2
  1150
	@since 7.0s
williamr@2
  1151
	*/
williamr@2
  1152
	IMPORT_C TInt GetRecordTimeAvailable(TTimeIntervalMicroSeconds& aTime) const;
williamr@2
  1153
williamr@2
  1154
	/**
williamr@2
  1155
	Sets the maximum duration of the recorded clip, in microseconds.
williamr@2
  1156
williamr@2
  1157
	@param  aMaxDuration
williamr@2
  1158
	        The maximum duration of the recorded clip, in microseconds.
williamr@2
  1159
williamr@2
  1160
	@return One of the system-wide error codes.
williamr@2
  1161
williamr@2
  1162
	@since 7.0s
williamr@2
  1163
	*/
williamr@2
  1164
	IMPORT_C TInt SetMaxDuration(const TTimeIntervalMicroSeconds& aMaxDuration) const;
williamr@2
  1165
williamr@2
  1166
	/**
williamr@2
  1167
	Sets the maximum size of the recorded clip, in bytes.
williamr@2
  1168
williamr@2
  1169
	@param  aMaxSize
williamr@2
  1170
	        The maximum size of the recorded clip, in bytes.
williamr@2
  1171
williamr@2
  1172
	@return One of the system-wide error codes.
williamr@2
  1173
williamr@2
  1174
	@since 7.0s
williamr@2
  1175
	*/
williamr@2
  1176
	IMPORT_C TInt SetMaxFileSize(TInt aMaxSize) const;
williamr@2
  1177
williamr@2
  1178
	/**
williamr@2
  1179
	Removes a portion from the clip, either from the current position to the beginning or the 
williamr@2
  1180
	current position to the end.
williamr@2
  1181
williamr@2
  1182
	@param  aToEnd
williamr@2
  1183
	        A boolean indicating whether to crop to the end. Crops to the end if set to ETrue, to 
williamr@2
  1184
			the beginning set to EFalse.
williamr@2
  1185
williamr@2
  1186
	@return One of the system-wide error codes.
williamr@2
  1187
williamr@2
  1188
	@since  7.0s
williamr@2
  1189
	*/
williamr@2
  1190
	IMPORT_C TInt Crop(TBool aToEnd);
williamr@2
  1191
williamr@2
  1192
	/**
williamr@2
  1193
	Adds meta data to the clip.
williamr@2
  1194
williamr@2
  1195
	@param  aNewEntry
williamr@2
  1196
	        The details of the new entry to be added.
williamr@2
  1197
williamr@2
  1198
	@since 7.0s
williamr@2
  1199
	*/
williamr@2
  1200
	IMPORT_C void AddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry);
williamr@2
  1201
williamr@2
  1202
	/**
williamr@2
  1203
	Removes a meta data entry from the clip.
williamr@2
  1204
williamr@2
  1205
	@param  aIndex
williamr@2
  1206
	        The ID of the meta data entry to delete.
williamr@2
  1207
williamr@2
  1208
	@return One of the system-wide error codes.
williamr@2
  1209
williamr@2
  1210
	@since  7.0s
williamr@2
  1211
	*/
williamr@2
  1212
	IMPORT_C TInt RemoveMetaDataEntry(TInt aIndex);
williamr@2
  1213
williamr@2
  1214
	/**
williamr@2
  1215
	Replaces a meta data in the clip.
williamr@2
  1216
williamr@2
  1217
	@param  aIndex
williamr@2
  1218
	        The ID of the meta data entry to replace.
williamr@2
  1219
	@param  aNewEntry
williamr@2
  1220
	        The details of the new entry to be added.
williamr@2
  1221
williamr@2
  1222
	@since 7.0s
williamr@2
  1223
	*/
williamr@2
  1224
	IMPORT_C void ReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry);
williamr@2
  1225
	};
williamr@2
  1226
williamr@2
  1227
/**
williamr@2
  1228
@publishedAll
williamr@2
  1229
@released
williamr@2
  1230
williamr@2
  1231
Mixin class to be derived from controller plugins that could support the audio record controller
williamr@2
  1232
custom commands.
williamr@2
  1233
*/
williamr@2
  1234
class MMMFAudioRecordControllerCustomCommandImplementor
williamr@2
  1235
	{
williamr@2
  1236
public:
williamr@2
  1237
williamr@2
  1238
	/**
williamr@2
  1239
	Gets the (possibly estimated) record time left in the clip.
williamr@2
  1240
williamr@2
  1241
	This function can leave with one of the system-wide error codes. The request will be
williamr@2
  1242
	completed with the leave code.
williamr@2
  1243
williamr@2
  1244
	@param  aTime
williamr@2
  1245
	        The record time available, in microseconds.
williamr@2
  1246
williamr@2
  1247
	@since 7.0s
williamr@2
  1248
	*/
williamr@2
  1249
	virtual void MarcGetRecordTimeAvailableL(TTimeIntervalMicroSeconds& aTime) = 0;
williamr@2
  1250
williamr@2
  1251
	/**
williamr@2
  1252
	Sets the maximum duration of the recorded clip, in microseconds.
williamr@2
  1253
williamr@2
  1254
	This function can leave with one of the system-wide error codes. The request will be
williamr@2
  1255
	completed with the leave code.
williamr@2
  1256
williamr@2
  1257
	@param  aMaxDuration
williamr@2
  1258
	        The maximum duration of the recorded clip, in microseconds.
williamr@2
  1259
williamr@2
  1260
	@since 7.0s
williamr@2
  1261
	*/
williamr@2
  1262
	virtual void MarcSetMaxDurationL(const TTimeIntervalMicroSeconds& aMaxDuration) = 0;
williamr@2
  1263
williamr@2
  1264
	/**
williamr@2
  1265
	Sets the maximum size of the recorded clip, in bytes.
williamr@2
  1266
williamr@2
  1267
	This function can leave with one of the system-wide error codes. The request will be
williamr@2
  1268
	completed with the leave code.
williamr@2
  1269
williamr@2
  1270
	@param  aMaxSize
williamr@2
  1271
	        The maximum size of the recorded clip, in bytes.
williamr@2
  1272
williamr@2
  1273
	@since 7.0s
williamr@2
  1274
	*/
williamr@2
  1275
	virtual void MarcSetMaxFileSizeL(TInt aMaxSize) = 0;
williamr@2
  1276
williamr@2
  1277
	/**
williamr@2
  1278
	Removes a portion from the clip, either from the current position to the beginning
williamr@2
  1279
	or the current position to the end.
williamr@2
  1280
williamr@2
  1281
	This function can leave with one of the system-wide error codes. The request will be
williamr@2
  1282
	completed with the leave code.
williamr@2
  1283
williamr@2
  1284
	@param  aToEnd
williamr@2
  1285
	        A boolean indicating whether to crop to the end or the beginning. ETrue to crop to the
williamr@2
  1286
	        end, EFalse to the beginning.
williamr@2
  1287
williamr@2
  1288
	@since 7.0s
williamr@2
  1289
	*/
williamr@2
  1290
	virtual void MarcCropL(TBool aToEnd) = 0;
williamr@2
  1291
williamr@2
  1292
	/**
williamr@2
  1293
	Adds meta data to the clip.
williamr@2
  1294
williamr@2
  1295
	@param  aNewEntry
williamr@2
  1296
	        The details of the new entry to be added.
williamr@2
  1297
williamr@2
  1298
	@since 7.0s
williamr@2
  1299
	*/
williamr@2
  1300
	virtual void MarcAddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry) = 0;
williamr@2
  1301
williamr@2
  1302
	/**
williamr@2
  1303
	Removes a meta data entry from the clip.
williamr@2
  1304
williamr@2
  1305
	@param  aIndex
williamr@2
  1306
	        The ID of the meta data entry to delete.
williamr@2
  1307
williamr@2
  1308
	@since 7.0s
williamr@2
  1309
	*/
williamr@2
  1310
	virtual void MarcRemoveMetaDataEntryL(TInt aIndex) = 0;
williamr@2
  1311
williamr@2
  1312
	/**
williamr@2
  1313
	Replaces a meta data entry in the clip.
williamr@2
  1314
williamr@2
  1315
	@param  aIndex
williamr@2
  1316
	        The ID of the meta data entry to replace.
williamr@2
  1317
	@param  aNewEntry
williamr@2
  1318
	        The details of the new entry to be added.
williamr@2
  1319
williamr@2
  1320
	@since 7.0s
williamr@2
  1321
	*/
williamr@2
  1322
	virtual void MarcReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry) = 0;
williamr@2
  1323
	};
williamr@2
  1324
williamr@2
  1325
/**
williamr@2
  1326
@publishedAll
williamr@2
  1327
@released
williamr@2
  1328
williamr@2
  1329
Custom command parser class to be used by controller plugins wishing to support
williamr@2
  1330
audio record controller commands.
williamr@2
  1331
williamr@2
  1332
The controller plugin must be derived from MMMFAudioRecordControllerCustomCommandImplementor
williamr@2
  1333
to use this class.
williamr@2
  1334
williamr@2
  1335
The controller plugin should create an object of this type and add it to the list of custom
williamr@2
  1336
command parsers in the controller framework.  See the following example code for details.
williamr@2
  1337
williamr@2
  1338
@code
williamr@2
  1339
void CMMFAudioController::ConstructL()
williamr@2
  1340
	{
williamr@2
  1341
	// Construct custom command parsers
williamr@2
  1342
	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
williamr@2
  1343
	CleanupStack::PushL(audPlayDevParser);
williamr@2
  1344
	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
williamr@2
  1345
	CleanupStack::Pop();//audPlayDevParser
williamr@2
  1346
williamr@2
  1347
	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
williamr@2
  1348
	CleanupStack::PushL(audRecDevParser);
williamr@2
  1349
	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
williamr@2
  1350
	CleanupStack::Pop();//audRecDevParser
williamr@2
  1351
williamr@2
  1352
etc.
williamr@2
  1353
	}
williamr@2
  1354
@endcode
williamr@2
  1355
williamr@2
  1356
@since 7.0s
williamr@2
  1357
*/
williamr@2
  1358
class CMMFAudioRecordControllerCustomCommandParser : public CMMFCustomCommandParserBase
williamr@2
  1359
	{
williamr@2
  1360
public:
williamr@2
  1361
williamr@2
  1362
	/**
williamr@2
  1363
	Creates a new custom command parser capable of handling audio record controller commands.
williamr@2
  1364
williamr@2
  1365
	@param  aImplementor
williamr@2
  1366
	        A reference to the controller plugin that owns this new object.
williamr@2
  1367
williamr@2
  1368
	@return A pointer to the object created.
williamr@2
  1369
williamr@2
  1370
	@since  7.0s
williamr@2
  1371
	*/
williamr@2
  1372
	IMPORT_C static CMMFAudioRecordControllerCustomCommandParser* NewL(MMMFAudioRecordControllerCustomCommandImplementor& aImplementor);
williamr@2
  1373
williamr@2
  1374
	/**
williamr@2
  1375
	Destructor.
williamr@2
  1376
williamr@2
  1377
	@since  7.0s
williamr@2
  1378
	*/
williamr@2
  1379
	IMPORT_C ~CMMFAudioRecordControllerCustomCommandParser();
williamr@2
  1380
williamr@2
  1381
	/**
williamr@2
  1382
	Handles a request from the client. Called by the controller framework.
williamr@2
  1383
	
williamr@2
  1384
	@param  aMessage
williamr@2
  1385
	        The message to be handled.
williamr@2
  1386
williamr@2
  1387
	@since	7.0s
williamr@2
  1388
	*/
williamr@2
  1389
	void HandleRequest(TMMFMessage& aMessage);
williamr@2
  1390
private:
williamr@2
  1391
williamr@2
  1392
	/**
williamr@2
  1393
	Constructor.
williamr@2
  1394
williamr@2
  1395
	@param  aImplementor
williamr@2
  1396
	        A reference to the controller plugin that owns this new object.
williamr@2
  1397
williamr@2
  1398
	@since  7.0s
williamr@2
  1399
	*/
williamr@2
  1400
	CMMFAudioRecordControllerCustomCommandParser(MMMFAudioRecordControllerCustomCommandImplementor& aImplementor);
williamr@2
  1401
	// Internal request handling methods.
williamr@2
  1402
	void DoHandleRequestL(TMMFMessage& aMessage);
williamr@2
  1403
	TBool DoGetRecordTimeAvailableL(TMMFMessage& aMessage);
williamr@2
  1404
	TBool DoSetMaxDurationL(TMMFMessage& aMessage);
williamr@2
  1405
	TBool DoSetMaxFileSizeL(TMMFMessage& aMessage);
williamr@2
  1406
	TBool DoCropL(TMMFMessage& aMessage);
williamr@2
  1407
	TBool DoAddMetaDataEntryL(TMMFMessage& aMessage);
williamr@2
  1408
	TBool DoRemoveMetaDataEntryL(TMMFMessage& aMessage);
williamr@2
  1409
	TBool DoReplaceMetaDataEntryL(TMMFMessage& aMessage);
williamr@2
  1410
private:
williamr@2
  1411
	/**	
williamr@2
  1412
	The object that implements the audio record controller interface.
williamr@2
  1413
	*/
williamr@2
  1414
	MMMFAudioRecordControllerCustomCommandImplementor& iImplementor;
williamr@2
  1415
	};
williamr@2
  1416
williamr@2
  1417
williamr@2
  1418
/**
williamr@2
  1419
@publishedAll
williamr@2
  1420
@released
williamr@2
  1421
williamr@2
  1422
Client class to access functionality specific to an audio controller.
williamr@2
  1423
williamr@2
  1424
The class uses the custom command function of the controller plugin, and removes the necessity
williamr@2
  1425
for the client to formulate the custom commands.
williamr@2
  1426
williamr@2
  1427
@since  7.0s
williamr@2
  1428
*/
williamr@2
  1429
class RMMFAudioControllerCustomCommands : public RMMFCustomCommandsBase
williamr@2
  1430
	{
williamr@2
  1431
public:
williamr@2
  1432
williamr@2
  1433
	/**
williamr@2
  1434
	Constructor.
williamr@2
  1435
williamr@2
  1436
	@param  aController
williamr@2
  1437
	        The client side controller object to be used by this custom command
williamr@2
  1438
	        interface.
williamr@2
  1439
williamr@2
  1440
	@since  7.0s
williamr@2
  1441
	*/
williamr@2
  1442
	IMPORT_C RMMFAudioControllerCustomCommands(RMMFController& aController);
williamr@2
  1443
williamr@2
  1444
	/**
williamr@2
  1445
	Sets the sample rate of the data source in samples per second.
williamr@2
  1446
williamr@2
  1447
	@param  aSampleRate
williamr@2
  1448
	        The sample rate, in samples per second.
williamr@2
  1449
williamr@2
  1450
	@return One of the system-wide error codes.
williamr@2
  1451
williamr@2
  1452
	@since  7.0s
williamr@2
  1453
	*/
williamr@2
  1454
	IMPORT_C TInt SetSourceSampleRate(TUint aSampleRate) const;
williamr@2
  1455
williamr@2
  1456
	/**
williamr@2
  1457
	Sets the bit rate of the data source in bits per second.
williamr@2
  1458
williamr@2
  1459
	@param  aRate
williamr@2
  1460
	        The bit rate, in bits per second.
williamr@2
  1461
williamr@2
  1462
	@return One of the system-wide error codes.
williamr@2
  1463
williamr@2
  1464
	@since 7.0s
williamr@2
  1465
	*/
williamr@2
  1466
	IMPORT_C TInt SetSourceBitRate(TUint aRate) const;
williamr@2
  1467
williamr@2
  1468
	/**
williamr@2
  1469
	Sets the number of channels in the data source.	For example, one channel for mono, two channels 
williamr@2
  1470
	for stereo etc.
williamr@2
  1471
williamr@2
  1472
	@param  aNumChannels
williamr@2
  1473
	        The number of channels.
williamr@2
  1474
williamr@2
  1475
	@return One of the system-wide error codes.
williamr@2
  1476
williamr@2
  1477
	@since 7.0s
williamr@2
  1478
	*/
williamr@2
  1479
	IMPORT_C TInt SetSourceNumChannels(TUint aNumChannels) const;
williamr@2
  1480
williamr@2
  1481
	/**
williamr@2
  1482
	Sets the format of the data source.
williamr@2
  1483
williamr@2
  1484
	The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin to be used.
williamr@2
  1485
williamr@2
  1486
	@param  aFormatUid
williamr@2
  1487
	        The format plugin to be used.
williamr@2
  1488
williamr@2
  1489
	@return One of the system-wide error codes.
williamr@2
  1490
williamr@2
  1491
	@since  7.0s
williamr@2
  1492
	*/
williamr@2
  1493
	IMPORT_C TInt SetSourceFormat(TUid aFormatUid) const;
williamr@2
  1494
williamr@2
  1495
	/**
williamr@2
  1496
	Sets the fourCC code of the source.
williamr@2
  1497
williamr@2
  1498
	@param  aDataType
williamr@2
  1499
	        The fourCC code.
williamr@2
  1500
williamr@2
  1501
	@return One of the system-wide error codes.
williamr@2
  1502
williamr@2
  1503
	@since  7.0s
williamr@2
  1504
	*/
williamr@2
  1505
	IMPORT_C TInt SetSourceDataType(TFourCC aDataType) const;
williamr@2
  1506
williamr@2
  1507
	/**
williamr@2
  1508
	Sets the sample rate of the data sink in samples per second.
williamr@2
  1509
williamr@2
  1510
	@param  aSampleRate
williamr@2
  1511
	        The sample rate, in samples per second.
williamr@2
  1512
williamr@2
  1513
	@return One of the system-wide error codes.
williamr@2
  1514
williamr@2
  1515
	@since 7.0s
williamr@2
  1516
	*/
williamr@2
  1517
	IMPORT_C TInt SetSinkSampleRate(TUint aSampleRate) const;
williamr@2
  1518
williamr@2
  1519
	/**
williamr@2
  1520
	Set the bit rate of the data sink in bits per second.
williamr@2
  1521
williamr@2
  1522
	@param  aRate
williamr@2
  1523
	        The bit rate, in bits per second.
williamr@2
  1524
williamr@2
  1525
	@return One of the system-wide error codes.
williamr@2
  1526
williamr@2
  1527
	@since 7.0s
williamr@2
  1528
	*/
williamr@2
  1529
	IMPORT_C TInt SetSinkBitRate(TUint aRate) const;
williamr@2
  1530
williamr@2
  1531
	/**
williamr@2
  1532
	Sets the number of channels in the data sink. For example, one channel for mono, two channels 
williamr@2
  1533
	for stereo etc.
williamr@2
  1534
williamr@2
  1535
	@param  aNumChannels
williamr@2
  1536
	        The number of channels.
williamr@2
  1537
williamr@2
  1538
	@return One of the system-wide error codes.
williamr@2
  1539
williamr@2
  1540
	@since  7.0s
williamr@2
  1541
	*/
williamr@2
  1542
	IMPORT_C TInt SetSinkNumChannels(TUint aNumChannels) const;
williamr@2
  1543
williamr@2
  1544
	/**
williamr@2
  1545
	Sets the format of the data sink.
williamr@2
  1546
williamr@2
  1547
	The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin to be used.
williamr@2
  1548
williamr@2
  1549
	@param  aFormatUid
williamr@2
  1550
	        The format plugin to be used.
williamr@2
  1551
williamr@2
  1552
	@return One of the system-wide error codes.
williamr@2
  1553
williamr@2
  1554
	@since  7.0s
williamr@2
  1555
	*/
williamr@2
  1556
	IMPORT_C TInt SetSinkFormat(TUid aFormatUid) const;
williamr@2
  1557
williamr@2
  1558
	/**
williamr@2
  1559
	Set the fourCC code of the sink.
williamr@2
  1560
williamr@2
  1561
	@param  aDataType
williamr@2
  1562
	        The fourCC code.
williamr@2
  1563
williamr@2
  1564
	@return One of the system-wide error codes.
williamr@2
  1565
williamr@2
  1566
	@since 7.0s
williamr@2
  1567
	*/
williamr@2
  1568
	IMPORT_C TInt SetSinkDataType(TFourCC aDataType) const;
williamr@2
  1569
williamr@2
  1570
	/**
williamr@2
  1571
	Sets the codec to be used. Useful when recording data.
williamr@2
  1572
williamr@2
  1573
	@param  aSourceDataType
williamr@2
  1574
	        The data type of the source of the codec.
williamr@2
  1575
	@param  aSinkDataType
williamr@2
  1576
	        The data type of the sink of the codec.
williamr@2
  1577
williamr@2
  1578
	@return One of the system-wide error codes.
williamr@2
  1579
williamr@2
  1580
	@since  7.0s
williamr@2
  1581
	*/
williamr@2
  1582
	IMPORT_C TInt SetCodec(TFourCC aSourceDataType, TFourCC aSinkDataType) const;
williamr@2
  1583
williamr@2
  1584
	/**
williamr@2
  1585
	Gets the sample rate of the data source in samples per second.
williamr@2
  1586
williamr@2
  1587
	@param  aRate
williamr@2
  1588
	        The sample rate, in samples per second.
williamr@2
  1589
williamr@2
  1590
	@return One of the system-wide error codes.
williamr@2
  1591
williamr@2
  1592
	@since  7.0s
williamr@2
  1593
	*/
williamr@2
  1594
	IMPORT_C TInt GetSourceSampleRate(TUint& aRate) const;
williamr@2
  1595
williamr@2
  1596
	/**
williamr@2
  1597
	Gets the bit rate of the data source in bits per second.
williamr@2
  1598
williamr@2
  1599
	@param  aRate
williamr@2
  1600
	        The bit rate, in bits per second.
williamr@2
  1601
	
williamr@2
  1602
	@return One of the system-wide error codes.
williamr@2
  1603
williamr@2
  1604
	@since  7.0s
williamr@2
  1605
	*/
williamr@2
  1606
	IMPORT_C TInt GetSourceBitRate(TUint& aRate) const;
williamr@2
  1607
williamr@2
  1608
	/**
williamr@2
  1609
	Gets the number of channels in the data source. For example, one channel for mono, two channels 
williamr@2
  1610
	for stereo etc.
williamr@2
  1611
williamr@2
  1612
	@param  aNumChannels
williamr@2
  1613
	        The number of channels.
williamr@2
  1614
williamr@2
  1615
	@return One of the system-wide error codes.
williamr@2
  1616
williamr@2
  1617
	@since  7.0s
williamr@2
  1618
	*/
williamr@2
  1619
	IMPORT_C TInt GetSourceNumChannels(TUint& aNumChannels) const;
williamr@2
  1620
williamr@2
  1621
	/**
williamr@2
  1622
	Gets the format of the data source.
williamr@2
  1623
williamr@2
  1624
	The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin being used.
williamr@2
  1625
williamr@2
  1626
	@param  aFormat
williamr@2
  1627
	        The format plugin being used.
williamr@2
  1628
williamr@2
  1629
	@return One of the system-wide error codes.
williamr@2
  1630
williamr@2
  1631
	@since  7.0s
williamr@2
  1632
	*/
williamr@2
  1633
	IMPORT_C TInt GetSourceFormat(TUid& aFormat) const;
williamr@2
  1634
williamr@2
  1635
	/**
williamr@2
  1636
	Get the fourCC code of the source.
williamr@2
  1637
williamr@2
  1638
	@param  aDataType
williamr@2
  1639
	        The fourCC code.
williamr@2
  1640
williamr@2
  1641
	@return One of the system-wide error codes.
williamr@2
  1642
williamr@2
  1643
	@since  7.0s
williamr@2
  1644
	*/
williamr@2
  1645
	IMPORT_C TInt GetSourceDataType(TFourCC& aDataType) const;
williamr@2
  1646
williamr@2
  1647
	/**
williamr@2
  1648
	Gets the sample rate of the data sink in samples per second.
williamr@2
  1649
williamr@2
  1650
	@param  aRate
williamr@2
  1651
	        The sample rate, in samples per second.
williamr@2
  1652
williamr@2
  1653
	@return One of the system-wide error codes.
williamr@2
  1654
williamr@2
  1655
	@since  7.0s
williamr@2
  1656
	*/
williamr@2
  1657
	IMPORT_C TInt GetSinkSampleRate(TUint& aRate) const;
williamr@2
  1658
williamr@2
  1659
	/**
williamr@2
  1660
	Gets the bit rate of the data sink in bits per second.
williamr@2
  1661
williamr@2
  1662
	@param  aRate
williamr@2
  1663
	        The bit rate, in bits per second.
williamr@2
  1664
williamr@2
  1665
	@return One of the system-wide error codes.
williamr@2
  1666
williamr@2
  1667
	@since  7.0s
williamr@2
  1668
	*/
williamr@2
  1669
	IMPORT_C TInt GetSinkBitRate(TUint& aRate) const;
williamr@2
  1670
williamr@2
  1671
	/**
williamr@2
  1672
	Gets the number of channels in the data sink. For example, one channel for mono, two channels 
williamr@2
  1673
	for stereo etc.
williamr@2
  1674
williamr@2
  1675
	@param  aNumChannels
williamr@2
  1676
	        The number of channels.
williamr@2
  1677
williamr@2
  1678
	@return One of the system-wide error codes.
williamr@2
  1679
williamr@2
  1680
	@since  7.0s
williamr@2
  1681
	*/
williamr@2
  1682
	IMPORT_C TInt GetSinkNumChannels(TUint& aNumChannels) const;
williamr@2
  1683
williamr@2
  1684
	/**
williamr@2
  1685
	Gets the format of the data sink.
williamr@2
  1686
williamr@2
  1687
	The UID corresponds to the UID of the CMMFFormat-derived ECOM plugin being used.
williamr@2
  1688
williamr@2
  1689
	@param  aFormat
williamr@2
  1690
	        The format plugin being used.
williamr@2
  1691
williamr@2
  1692
	@return One of the system-wide error codes.
williamr@2
  1693
williamr@2
  1694
	@since  7.0s
williamr@2
  1695
	*/
williamr@2
  1696
	IMPORT_C TInt GetSinkFormat(TUid& aFormat) const;
williamr@2
  1697
williamr@2
  1698
	/**
williamr@2
  1699
	Gets the fourCC code of the sink.
williamr@2
  1700
williamr@2
  1701
	@param  aDataType
williamr@2
  1702
	        The fourCC code.
williamr@2
  1703
williamr@2
  1704
	@return One of the system-wide error codes.
williamr@2
  1705
williamr@2
  1706
	@since 7.0s
williamr@2
  1707
	*/
williamr@2
  1708
	IMPORT_C TInt GetSinkDataType(TFourCC& aDataType) const;
williamr@2
  1709
williamr@2
  1710
	/**
williamr@2
  1711
	Gets the list of sample rates supported by the data source.
williamr@2
  1712
williamr@2
  1713
	Warning: Existing objects in this array will be removed by this function.
williamr@2
  1714
williamr@2
  1715
	@param  aSupportedRates
williamr@2
  1716
	        The supported rates.
williamr@2
  1717
williamr@2
  1718
	@return One of the system-wide error codes.
williamr@2
  1719
williamr@2
  1720
	@since  7.0s
williamr@2
  1721
	*/
williamr@2
  1722
	IMPORT_C void GetSupportedSourceSampleRatesL(RArray<TUint>& aSupportedRates) const;
williamr@2
  1723
williamr@2
  1724
	/**
williamr@2
  1725
	Gets the list of bit rates supported by the data source.
williamr@2
  1726
williamr@2
  1727
	Warning: Existing objects in this array will be removed by this function.
williamr@2
  1728
williamr@2
  1729
	@param  aSupportedRates
williamr@2
  1730
	        The supported rates.
williamr@2
  1731
williamr@2
  1732
	@return One of the system-wide error codes.
williamr@2
  1733
williamr@2
  1734
	@since 7.0s
williamr@2
  1735
	*/
williamr@2
  1736
	IMPORT_C void GetSupportedSourceBitRatesL(RArray<TUint>& aSupportedRates) const;
williamr@2
  1737
williamr@2
  1738
	/**
williamr@2
  1739
	Gets the list of channels supported by the data source (ie mono, stereo etc).
williamr@2
  1740
williamr@2
  1741
	Warning: Existing objects in this array will be removed by this method.
williamr@2
  1742
williamr@2
  1743
	@param  aSupportedChannels
williamr@2
  1744
	        The supported channels.
williamr@2
  1745
williamr@2
  1746
	@return One of the system-wide error codes.
williamr@2
  1747
williamr@2
  1748
	@since 7.0s
williamr@2
  1749
	*/
williamr@2
  1750
	IMPORT_C void GetSupportedSourceNumChannelsL(RArray<TUint>& aSupportedChannels) const;
williamr@2
  1751
williamr@2
  1752
	/**
williamr@2
  1753
	Gets the list of fourCC codes supported by the data source.
williamr@2
  1754
williamr@2
  1755
	Warning: Existing objects in this array will be removed by this method.
williamr@2
  1756
williamr@2
  1757
	@param  aSupportedDataTypes
williamr@2
  1758
	        The supported data types.
williamr@2
  1759
williamr@2
  1760
	@return One of the system-wide error codes.
williamr@2
  1761
williamr@2
  1762
	@since  7.0s
williamr@2
  1763
	*/
williamr@2
  1764
	IMPORT_C void GetSupportedSourceDataTypesL(RArray<TFourCC>& aSupportedDataTypes) const;
williamr@2
  1765
williamr@2
  1766
	/**
williamr@2
  1767
	Gets the list of sample rates supported by the data sink.
williamr@2
  1768
williamr@2
  1769
	Warning: Existing objects in this array will be removed by this method.
williamr@2
  1770
williamr@2
  1771
	@param  aSupportedRates
williamr@2
  1772
	        The supported rates.
williamr@2
  1773
williamr@2
  1774
	@return One of the system-wide error codes.
williamr@2
  1775
williamr@2
  1776
	@since  7.0s
williamr@2
  1777
	*/
williamr@2
  1778
	IMPORT_C void GetSupportedSinkSampleRatesL(RArray<TUint>& aSupportedRates) const;
williamr@2
  1779
williamr@2
  1780
	/**
williamr@2
  1781
	Gets the list of bit rates supported by the data sink.
williamr@2
  1782
williamr@2
  1783
	Warning: Existing objects in this array will be removed by this method.
williamr@2
  1784
williamr@2
  1785
	@param  aSupportedRates
williamr@2
  1786
	        The supported rates.
williamr@2
  1787
williamr@2
  1788
	@return One of the system-wide error codes.
williamr@2
  1789
williamr@2
  1790
	@since  7.0s
williamr@2
  1791
	*/
williamr@2
  1792
	IMPORT_C void GetSupportedSinkBitRatesL(RArray<TUint>& aSupportedRates) const;
williamr@2
  1793
williamr@2
  1794
	/**
williamr@2
  1795
	Gets the list of channels supported by the data sink (ie mono, stereo etc).
williamr@2
  1796
williamr@2
  1797
	Warning: Existing objects in this array will be removed by this method.
williamr@2
  1798
williamr@2
  1799
	@param  aSupportedChannels
williamr@2
  1800
	        The supported channels.
williamr@2
  1801
williamr@2
  1802
	@return One of the system-wide error codes.
williamr@2
  1803
williamr@2
  1804
	@since  7.0s
williamr@2
  1805
	*/
williamr@2
  1806
	IMPORT_C void GetSupportedSinkNumChannelsL(RArray<TUint>& aSupportedChannels) const;
williamr@2
  1807
williamr@2
  1808
	/**
williamr@2
  1809
	Gets the list of fourCC codes supported by the data sink.
williamr@2
  1810
williamr@2
  1811
	Warning: Existing objects in this array will be removed by this method.
williamr@2
  1812
williamr@2
  1813
	@param  aSupportedDataTypes
williamr@2
  1814
	        The supported data types.
williamr@2
  1815
williamr@2
  1816
	@return One of the system-wide error codes.
williamr@2
  1817
williamr@2
  1818
	@since  7.0s
williamr@2
  1819
	*/
williamr@2
  1820
	IMPORT_C void GetSupportedSinkDataTypesL(RArray<TFourCC>& aSupportedDataTypes) const;
williamr@2
  1821
williamr@2
  1822
private:
williamr@2
  1823
	void DoGetUintArrayL(RArray<TUint>& aArray, TMMFAudioControllerMessages aIpc) const;
williamr@2
  1824
	void DoGetFourCCArrayL(RArray<TFourCC>& aArray, TMMFAudioControllerMessages aIpc) const;
williamr@2
  1825
	};
williamr@2
  1826
williamr@2
  1827
williamr@2
  1828
/**
williamr@2
  1829
@publishedAll
williamr@2
  1830
@released
williamr@2
  1831
williamr@2
  1832
Mixin class to be derived from controller plugins that could support the audio record controller
williamr@2
  1833
custom commands.
williamr@2
  1834
*/
williamr@2
  1835
class MMMFAudioControllerCustomCommandImplementor
williamr@2
  1836
	{
williamr@2
  1837
public:
williamr@2
  1838
williamr@2
  1839
	/**
williamr@2
  1840
	Sets the sample rate of the data source in samples per second.
williamr@2
  1841
williamr@2
  1842
	@param  aSampleRate
williamr@2
  1843
	        The sample rate, in samples per second.
williamr@2
  1844
williamr@2
  1845
	@since 7.0s
williamr@2
  1846
	*/
williamr@2
  1847
	virtual void MacSetSourceSampleRateL(TUint aSampleRate) = 0;
williamr@2
  1848
williamr@2
  1849
	/**
williamr@2
  1850
	Sets the bit rate of the data source in bits per second.
williamr@2
  1851
williamr@2
  1852
	@param  aBitRate
williamr@2
  1853
	        The bit rate, in bits per second.
williamr@2
  1854
williamr@2
  1855
	@since  7.0s
williamr@2
  1856
	*/
williamr@2
  1857
	virtual void MacSetSourceBitRateL(TUint aBitRate) = 0;
williamr@2
  1858
williamr@2
  1859
	/**
williamr@2
  1860
	Sets the number of channels in the data source.	For example, one channel for mono, two channels 
williamr@2
  1861
	for stereo etc.
williamr@2
  1862
williamr@2
  1863
	@param  aNumChannels
williamr@2
  1864
	        The number of channels.
williamr@2
  1865
williamr@2
  1866
	@since  7.0s
williamr@2
  1867
	*/
williamr@2
  1868
	virtual void MacSetSourceNumChannelsL(TUint aNumChannels) = 0;
williamr@2
  1869
williamr@2
  1870
	/**
williamr@2
  1871
	Sets the format of the data source.	The UID corresponds to the UID of the CMMFFormat-derived 
williamr@2
  1872
	ECOM plugin to be used.
williamr@2
  1873
williamr@2
  1874
	@param  aFormatUid
williamr@2
  1875
	        The format plugin to be used.
williamr@2
  1876
williamr@2
  1877
	@since 7.0s
williamr@2
  1878
	*/
williamr@2
  1879
	virtual void MacSetSourceFormatL(TUid aFormatUid) = 0;
williamr@2
  1880
williamr@2
  1881
	/**
williamr@2
  1882
	Sets the fourCC code of the source.
williamr@2
  1883
williamr@2
  1884
	@param  aDataType
williamr@2
  1885
	        The fourCC code.
williamr@2
  1886
williamr@2
  1887
	@since 7.0s
williamr@2
  1888
	*/
williamr@2
  1889
	virtual void MacSetSourceDataTypeL(TFourCC aDataType) = 0;
williamr@2
  1890
williamr@2
  1891
	/**
williamr@2
  1892
	Sets the sample rate of the data sink in samples per second.
williamr@2
  1893
williamr@2
  1894
	@param  aSampleRate
williamr@2
  1895
	        The sample rate, in samples per second.
williamr@2
  1896
williamr@2
  1897
	@since  7.0s
williamr@2
  1898
	*/
williamr@2
  1899
	virtual void MacSetSinkSampleRateL(TUint aSampleRate) = 0;
williamr@2
  1900
williamr@2
  1901
	/**
williamr@2
  1902
	Sets the bit rate of the data sink in bits per second.
williamr@2
  1903
williamr@2
  1904
	@param  aRate
williamr@2
  1905
	        The bit rate, in bits per second.
williamr@2
  1906
williamr@2
  1907
	@since  7.0s
williamr@2
  1908
	*/
williamr@2
  1909
	virtual void MacSetSinkBitRateL(TUint aRate) = 0;
williamr@2
  1910
williamr@2
  1911
	/**
williamr@2
  1912
	Sets the number of channels in the data sink. For example, one channel for mono, two channels 
williamr@2
  1913
	for stereo etc.
williamr@2
  1914
williamr@2
  1915
	@param  aNumChannels
williamr@2
  1916
	        The number of channels.
williamr@2
  1917
williamr@2
  1918
	@since  7.0s
williamr@2
  1919
	*/
williamr@2
  1920
	virtual void MacSetSinkNumChannelsL(TUint aNumChannels) = 0;
williamr@2
  1921
williamr@2
  1922
	/**
williamr@2
  1923
	Sets the format of the data sink. The UID corresponds to the uid of the CMMFFormat-derived ECOM 
williamr@2
  1924
	plugin to be used.
williamr@2
  1925
williamr@2
  1926
	@param  aFormatUid
williamr@2
  1927
	        The format plugin to be used.
williamr@2
  1928
williamr@2
  1929
	@since  7.0s
williamr@2
  1930
	*/
williamr@2
  1931
	virtual void MacSetSinkFormatL(TUid aFormatUid) = 0;
williamr@2
  1932
williamr@2
  1933
	/**
williamr@2
  1934
	Sets the fourCC code of the sink.
williamr@2
  1935
williamr@2
  1936
	@param  aDataType
williamr@2
  1937
	        The fourCC code.
williamr@2
  1938
williamr@2
  1939
	@since  7.0s
williamr@2
  1940
	*/
williamr@2
  1941
	virtual void MacSetSinkDataTypeL(TFourCC aDataType) = 0;
williamr@2
  1942
williamr@2
  1943
	/**
williamr@2
  1944
	Sets the codec to be used.  Useful when recording data.
williamr@2
  1945
williamr@2
  1946
	@param  aSourceDataType
williamr@2
  1947
	        The data type of the source of the codec.
williamr@2
  1948
	@param  aSinkDataType
williamr@2
  1949
	        The data type of the sink of the codec.
williamr@2
  1950
williamr@2
  1951
	@since  7.0s
williamr@2
  1952
	*/
williamr@2
  1953
	virtual void MacSetCodecL(TFourCC aSourceDataType, TFourCC aSinkDataType) = 0;
williamr@2
  1954
williamr@2
  1955
williamr@2
  1956
	/**
williamr@2
  1957
	Gets the sample rate of the data source in samples per second.
williamr@2
  1958
williamr@2
  1959
	@param  aRate	
williamr@2
  1960
	        The sample rate, in samples per second.
williamr@2
  1961
williamr@2
  1962
	@since  7.0s
williamr@2
  1963
	*/
williamr@2
  1964
	virtual void MacGetSourceSampleRateL(TUint& aRate) = 0;
williamr@2
  1965
williamr@2
  1966
	/**
williamr@2
  1967
	Gets the bit rate of the data source in bits per second.
williamr@2
  1968
williamr@2
  1969
	@param  aRate
williamr@2
  1970
	        The bit rate, in bits per second.
williamr@2
  1971
williamr@2
  1972
	@since  7.0s
williamr@2
  1973
	*/
williamr@2
  1974
	virtual void MacGetSourceBitRateL(TUint& aRate) = 0;
williamr@2
  1975
williamr@2
  1976
	/**
williamr@2
  1977
	Gets the number of channels in the data source.	For example, one channel for mono, two channels 
williamr@2
  1978
	for stereo etc.
williamr@2
  1979
williamr@2
  1980
	@param  aNumChannels
williamr@2
  1981
	        The number of channels.
williamr@2
  1982
williamr@2
  1983
	@since  7.0s
williamr@2
  1984
	*/
williamr@2
  1985
	virtual void MacGetSourceNumChannelsL(TUint& aNumChannels) = 0;
williamr@2
  1986
williamr@2
  1987
	/**
williamr@2
  1988
	Gets the format of the data source.	The UID corresponds to the uid of the CMMFFormat-derived 
williamr@2
  1989
	ECOM plugin being used.
williamr@2
  1990
williamr@2
  1991
	@param  aFormat
williamr@2
  1992
	        The format plugin being used.
williamr@2
  1993
williamr@2
  1994
	@since  7.0s
williamr@2
  1995
	*/
williamr@2
  1996
	virtual void MacGetSourceFormatL(TUid& aFormat) = 0;
williamr@2
  1997
williamr@2
  1998
	/**
williamr@2
  1999
	Gets the fourCC code of the source.
williamr@2
  2000
williamr@2
  2001
	@param  aDataType
williamr@2
  2002
	        The fourCC code.
williamr@2
  2003
williamr@2
  2004
	@since  7.0s
williamr@2
  2005
	*/
williamr@2
  2006
	virtual void MacGetSourceDataTypeL(TFourCC& aDataType) = 0;
williamr@2
  2007
williamr@2
  2008
	/**
williamr@2
  2009
	Gets the sample rate of the data sink in samples per second.
williamr@2
  2010
williamr@2
  2011
	@param  aRate
williamr@2
  2012
	        The sample rate, in samples per second.
williamr@2
  2013
williamr@2
  2014
	@since  7.0s
williamr@2
  2015
	*/
williamr@2
  2016
	virtual void MacGetSinkSampleRateL(TUint& aRate) = 0;
williamr@2
  2017
williamr@2
  2018
	/**
williamr@2
  2019
	Gets the bit rate of the data sink in bits per second.
williamr@2
  2020
williamr@2
  2021
	@param  aRate
williamr@2
  2022
	        The bit rate, in bits per second.
williamr@2
  2023
williamr@2
  2024
	@since  7.0s
williamr@2
  2025
	*/
williamr@2
  2026
	virtual void MacGetSinkBitRateL(TUint& aRate) = 0;
williamr@2
  2027
williamr@2
  2028
	/**
williamr@2
  2029
	Gets the number of channels in the data sink. For example, one channel for mono, two channels 
williamr@2
  2030
	for stereo etc.
williamr@2
  2031
williamr@2
  2032
	@param  aNumChannels
williamr@2
  2033
	        The number of channels.
williamr@2
  2034
williamr@2
  2035
	@since  7.0s
williamr@2
  2036
	*/
williamr@2
  2037
	virtual void MacGetSinkNumChannelsL(TUint& aNumChannels) = 0;
williamr@2
  2038
williamr@2
  2039
	/**
williamr@2
  2040
	Gets the format of the data sink. The UID corresponds to the uid of the CMMFFormat-derived ECOM 
williamr@2
  2041
	plugin being used.
williamr@2
  2042
williamr@2
  2043
	@param  aFormat
williamr@2
  2044
	        The format plugin being used.
williamr@2
  2045
williamr@2
  2046
	@since  7.0s
williamr@2
  2047
	*/
williamr@2
  2048
	virtual void MacGetSinkFormatL(TUid& aFormat) = 0;
williamr@2
  2049
williamr@2
  2050
	/**
williamr@2
  2051
	Gets the fourCC code of the sink.
williamr@2
  2052
williamr@2
  2053
	@param  aDataType
williamr@2
  2054
	        The fourCC code.
williamr@2
  2055
williamr@2
  2056
	@since  7.0s
williamr@2
  2057
	*/
williamr@2
  2058
	virtual void MacGetSinkDataTypeL(TFourCC& aDataType) = 0;
williamr@2
  2059
williamr@2
  2060
	/**
williamr@2
  2061
	Gets the list of sample rates supported by the data source.
williamr@2
  2062
williamr@2
  2063
	@param  aSupportedRates
williamr@2
  2064
	        The supported rates.  Warning: Existing objects in this array will be removed by this method.
williamr@2
  2065
williamr@2
  2066
	@since  7.0s
williamr@2
  2067
	*/
williamr@2
  2068
	virtual void MacGetSupportedSourceSampleRatesL(RArray<TUint>& aSupportedRates) = 0;
williamr@2
  2069
williamr@2
  2070
	/**
williamr@2
  2071
	Gets the list of bit rates supported by the data source.
williamr@2
  2072
williamr@2
  2073
	Warning: Existing objects in this array will be removed by this method.
williamr@2
  2074
williamr@2
  2075
	@param  aSupportedRates
williamr@2
  2076
	        The supported rates.
williamr@2
  2077
williamr@2
  2078
	@since  7.0s
williamr@2
  2079
	*/
williamr@2
  2080
	virtual void MacGetSupportedSourceBitRatesL(RArray<TUint>& aSupportedRates) = 0;
williamr@2
  2081
williamr@2
  2082
	/**
williamr@2
  2083
	Gets the list of channels supported by the data source (ie mono, stereo etc).
williamr@2
  2084
williamr@2
  2085
	Warning: Existing objects in this array will be removed by this method.
williamr@2
  2086
williamr@2
  2087
	@param  aSupportedChannels
williamr@2
  2088
	        The supported channels.
williamr@2
  2089
williamr@2
  2090
	@since  7.0s
williamr@2
  2091
	*/
williamr@2
  2092
	virtual void MacGetSupportedSourceNumChannelsL(RArray<TUint>& aSupportedChannels) = 0;
williamr@2
  2093
williamr@2
  2094
	/**
williamr@2
  2095
	Gets the list of fourCC codes supported by the data source.
williamr@2
  2096
williamr@2
  2097
	Warning: Existing objects in this array will be removed by this method.
williamr@2
  2098
williamr@2
  2099
	@param  aSupportedDataTypes
williamr@2
  2100
	        The supported data types.
williamr@2
  2101
williamr@2
  2102
	@since  7.0s
williamr@2
  2103
	*/
williamr@2
  2104
	virtual void MacGetSupportedSourceDataTypesL(RArray<TFourCC>& aSupportedDataTypes) = 0;
williamr@2
  2105
williamr@2
  2106
	/**
williamr@2
  2107
	Gets the list of sample rates supported by the data sink.
williamr@2
  2108
williamr@2
  2109
	Warning: Existing objects in this array will be removed by this method.
williamr@2
  2110
williamr@2
  2111
	@param  aSupportedRates
williamr@2
  2112
	        The supported rates.
williamr@2
  2113
williamr@2
  2114
	@since  7.0s
williamr@2
  2115
	*/
williamr@2
  2116
	virtual void MacGetSupportedSinkSampleRatesL(RArray<TUint>& aSupportedRates) = 0;
williamr@2
  2117
williamr@2
  2118
	/**
williamr@2
  2119
	Gets the list of bit rates supported by the data sink.
williamr@2
  2120
williamr@2
  2121
	Warning: Existing objects in this array will be removed by this method.
williamr@2
  2122
williamr@2
  2123
	@param  aSupportedRates
williamr@2
  2124
	        The supported rates.
williamr@2
  2125
williamr@2
  2126
	@since  7.0s
williamr@2
  2127
	*/
williamr@2
  2128
	virtual void MacGetSupportedSinkBitRatesL(RArray<TUint>& aSupportedRates) = 0;
williamr@2
  2129
williamr@2
  2130
	/**
williamr@2
  2131
	Gets the list of channels supported by the data sink (ie mono, stereo etc).
williamr@2
  2132
williamr@2
  2133
	Warning: Existing objects in this array will be removed by this method.
williamr@2
  2134
williamr@2
  2135
	@param  aSupportedChannels
williamr@2
  2136
	        The supported channels.
williamr@2
  2137
williamr@2
  2138
	@since  7.0s
williamr@2
  2139
	*/
williamr@2
  2140
	virtual void MacGetSupportedSinkNumChannelsL(RArray<TUint>& aSupportedChannels) = 0;
williamr@2
  2141
williamr@2
  2142
	/**
williamr@2
  2143
	Gets the list of fourCC codes supported by the data sink.
williamr@2
  2144
williamr@2
  2145
	Warning: Existing objects in this array will be removed by this method.
williamr@2
  2146
williamr@2
  2147
	@param  aSupportedDataTypes
williamr@2
  2148
	        The supported data types.
williamr@2
  2149
williamr@2
  2150
	@since  7.0s
williamr@2
  2151
	*/
williamr@2
  2152
	virtual void MacGetSupportedSinkDataTypesL(RArray<TFourCC>& aSupportedDataTypes) = 0;
williamr@2
  2153
	};
williamr@2
  2154
williamr@2
  2155
/**
williamr@2
  2156
@publishedAll
williamr@2
  2157
@released
williamr@2
  2158
williamr@2
  2159
Custom command parser class to be used by controller plugins wishing to support
williamr@2
  2160
audio controller commands.
williamr@2
  2161
williamr@2
  2162
The controller plugin must be derived from MMMFAudioControllerCustomCommandImplementor
williamr@2
  2163
to use this class.
williamr@2
  2164
williamr@2
  2165
The controller plugin should create an object of this type and add it to the list of custom
williamr@2
  2166
command parsers in the controller framework. See the following example code for details.
williamr@2
  2167
williamr@2
  2168
@code
williamr@2
  2169
void CMMFAudioController::ConstructL()
williamr@2
  2170
	{
williamr@2
  2171
	// Construct custom command parsers
williamr@2
  2172
	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
williamr@2
  2173
	CleanupStack::PushL(audPlayDevParser);
williamr@2
  2174
	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
williamr@2
  2175
	CleanupStack::Pop();//audPlayDevParser
williamr@2
  2176
williamr@2
  2177
	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
williamr@2
  2178
	CleanupStack::PushL(audRecDevParser);
williamr@2
  2179
	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
williamr@2
  2180
	CleanupStack::Pop();//audRecDevParser
williamr@2
  2181
williamr@2
  2182
etc.
williamr@2
  2183
	}
williamr@2
  2184
@endcode
williamr@2
  2185
williamr@2
  2186
@since  7.0s
williamr@2
  2187
*/
williamr@2
  2188
class CMMFAudioControllerCustomCommandParser : public CMMFCustomCommandParserBase
williamr@2
  2189
	{
williamr@2
  2190
public:
williamr@2
  2191
williamr@2
  2192
	/**
williamr@2
  2193
	Creates a new custom command parser capable of handling audio controller commands.
williamr@2
  2194
williamr@2
  2195
	@param  aImplementor
williamr@2
  2196
	        A reference to the controller plugin that owns this new object.
williamr@2
  2197
williamr@2
  2198
	@return A pointer to the object created.
williamr@2
  2199
williamr@2
  2200
	@since  7.0s
williamr@2
  2201
	*/
williamr@2
  2202
	IMPORT_C static CMMFAudioControllerCustomCommandParser* NewL(MMMFAudioControllerCustomCommandImplementor& aImplementor);
williamr@2
  2203
williamr@2
  2204
	/**
williamr@2
  2205
	Destructor.
williamr@2
  2206
williamr@2
  2207
	@since 7.0s
williamr@2
  2208
	*/
williamr@2
  2209
	IMPORT_C ~CMMFAudioControllerCustomCommandParser();
williamr@2
  2210
williamr@2
  2211
	/**
williamr@2
  2212
	Handles a request from the client. Called by the controller framework.
williamr@2
  2213
williamr@2
  2214
	@param  aMessage
williamr@2
  2215
	        The message to be handled.
williamr@2
  2216
williamr@2
  2217
	@since  7.0s
williamr@2
  2218
	*/
williamr@2
  2219
	void HandleRequest(TMMFMessage& aMessage);
williamr@2
  2220
private:
williamr@2
  2221
	/**
williamr@2
  2222
	Constructor.
williamr@2
  2223
williamr@2
  2224
	@param  aImplementor
williamr@2
  2225
	        A reference to the controller plugin that owns this new object.
williamr@2
  2226
williamr@2
  2227
	@since  7.0s
williamr@2
  2228
	*/
williamr@2
  2229
	CMMFAudioControllerCustomCommandParser(MMMFAudioControllerCustomCommandImplementor& aImplementor);
williamr@2
  2230
	// Internal request handling methods.
williamr@2
  2231
	void DoHandleRequestL(TMMFMessage& aMessage);
williamr@2
  2232
williamr@2
  2233
	TBool DoSetSourceSampleRateL(TMMFMessage& aMessage);
williamr@2
  2234
	TBool DoSetSourceNumChannelsL(TMMFMessage& aMessage);
williamr@2
  2235
	TBool DoSetSourceFormatL(TMMFMessage& aMessage);
williamr@2
  2236
	TBool DoSetSinkSampleRateL(TMMFMessage& aMessage);
williamr@2
  2237
	TBool DoSetSinkNumChannelsL(TMMFMessage& aMessage);
williamr@2
  2238
	TBool DoSetSinkFormatL(TMMFMessage& aMessage);
williamr@2
  2239
	TBool DoSetCodecL(TMMFMessage& aMessage);
williamr@2
  2240
	TBool DoSetSourceBitRateL(TMMFMessage& aMessage);
williamr@2
  2241
	TBool DoSetSourceDataTypeL(TMMFMessage& aMessage);
williamr@2
  2242
	TBool DoSetSinkBitRateL(TMMFMessage& aMessage);
williamr@2
  2243
	TBool DoSetSinkDataTypeL(TMMFMessage& aMessage);
williamr@2
  2244
	TBool DoGetSourceSampleRateL(TMMFMessage& aMessage);
williamr@2
  2245
	TBool DoGetSourceBitRateL(TMMFMessage& aMessage);
williamr@2
  2246
	TBool DoGetSourceNumChannelsL(TMMFMessage& aMessage);
williamr@2
  2247
	TBool DoGetSourceFormatL(TMMFMessage& aMessage);
williamr@2
  2248
	TBool DoGetSourceDataTypeL(TMMFMessage& aMessage);
williamr@2
  2249
	TBool DoGetSinkSampleRateL(TMMFMessage& aMessage);
williamr@2
  2250
	TBool DoGetSinkBitRateL(TMMFMessage& aMessage);
williamr@2
  2251
	TBool DoGetSinkNumChannelsL(TMMFMessage& aMessage);
williamr@2
  2252
	TBool DoGetSinkFormatL(TMMFMessage& aMessage);
williamr@2
  2253
	TBool DoGetSinkDataTypeL(TMMFMessage& aMessage);
williamr@2
  2254
	TBool DoGetSupportedSourceSampleRatesL(TMMFMessage& aMessage);
williamr@2
  2255
	TBool DoGetSupportedSourceBitRatesL(TMMFMessage& aMessage);
williamr@2
  2256
	TBool DoGetSupportedSourceNumChannelsL(TMMFMessage& aMessage);
williamr@2
  2257
	TBool DoGetSupportedSourceDataTypesL(TMMFMessage& aMessage);
williamr@2
  2258
	TBool DoGetSupportedSinkSampleRatesL(TMMFMessage& aMessage);
williamr@2
  2259
	TBool DoGetSupportedSinkBitRatesL(TMMFMessage& aMessage);
williamr@2
  2260
	TBool DoGetSupportedSinkNumChannelsL(TMMFMessage& aMessage);
williamr@2
  2261
	TBool DoGetSupportedSinkDataTypesL(TMMFMessage& aMessage);
williamr@2
  2262
	TBool DoCopyArrayDataL(TMMFMessage& aMessage);
williamr@2
  2263
williamr@2
  2264
	void DoCreateBufFromUintArrayL(RArray<TUint>& aArray);
williamr@2
  2265
	void DoCreateBufFromFourCCArrayL(RArray<TFourCC>& aArray);
williamr@2
  2266
private:
williamr@2
  2267
	/** 
williamr@2
  2268
	The object that implements the audio record controller interface 
williamr@2
  2269
	*/
williamr@2
  2270
	MMMFAudioControllerCustomCommandImplementor& iImplementor;
williamr@2
  2271
williamr@2
  2272
	CBufFlat* iDataCopyBuffer;
williamr@2
  2273
	};
williamr@2
  2274
williamr@2
  2275
williamr@2
  2276
class RWindow;
williamr@2
  2277
williamr@2
  2278
/**
williamr@2
  2279
@publishedAll
williamr@2
  2280
@released
williamr@2
  2281
williamr@2
  2282
Client class to access functionality specific to a video controller.
williamr@2
  2283
williamr@2
  2284
The class uses the custom command function of the controller plugin, and removes the necessity
williamr@2
  2285
for the client to formulate the custom commands.
williamr@2
  2286
williamr@2
  2287
@since  7.0s
williamr@2
  2288
*/
williamr@2
  2289
class RMMFVideoControllerCustomCommands : public RMMFCustomCommandsBase
williamr@2
  2290
	{
williamr@2
  2291
public:
williamr@2
  2292
williamr@2
  2293
	/**
williamr@2
  2294
	Constructor.
williamr@2
  2295
williamr@2
  2296
	@param  aController
williamr@2
  2297
	        The client side controller object to be used by this custom command interface.
williamr@2
  2298
williamr@2
  2299
	@since  7.0s
williamr@2
  2300
	*/
williamr@2
  2301
	IMPORT_C RMMFVideoControllerCustomCommands(RMMFController& aController);
williamr@2
  2302
williamr@2
  2303
	/**
williamr@2
  2304
	Gets the frame size of the clip.
williamr@2
  2305
williamr@2
  2306
	@param  aVideoFrameSize
williamr@2
  2307
	        The frame size, in pixels.
williamr@2
  2308
williamr@2
  2309
	@return One of the system-wide error codes.
williamr@2
  2310
williamr@2
  2311
	@since 7.0s
williamr@2
  2312
	*/
williamr@2
  2313
	IMPORT_C TInt GetVideoFrameSize(TSize& aVideoFrameSize) const;
williamr@2
  2314
williamr@2
  2315
	/**
williamr@2
  2316
	Gets the audio type.
williamr@2
  2317
williamr@2
  2318
	@param  aCodec
williamr@2
  2319
	        The FourCC of the audio codec.
williamr@2
  2320
williamr@2
  2321
	@return One of the system-wide error codes.
williamr@2
  2322
williamr@2
  2323
	@since  7.0s
williamr@2
  2324
	*/
williamr@2
  2325
	IMPORT_C TInt GetAudioCodec(TFourCC& aCodec) const;
williamr@2
  2326
williamr@2
  2327
	/**
williamr@2
  2328
	Gets the video bit rate.
williamr@2
  2329
williamr@2
  2330
	@param  aBitRate	
williamr@2
  2331
	        The bit rate of the video stream. If this value is KMMFVariableVideoBitRate it signifies
williamr@2
  2332
	        a variable bit rate.
williamr@2
  2333
williamr@2
  2334
	@return One of the system-wide error codes.
williamr@2
  2335
williamr@2
  2336
	@since  7.0s
williamr@2
  2337
	*/
williamr@2
  2338
	IMPORT_C TInt GetVideoBitRate(TInt& aBitRate) const;
williamr@2
  2339
williamr@2
  2340
	/**
williamr@2
  2341
	Gets the audio bit rate.
williamr@2
  2342
williamr@2
  2343
	@param aBitRate
williamr@2
  2344
	       The bit rate of the audio stream.
williamr@2
  2345
williamr@2
  2346
	@return One of the system-wide error codes.
williamr@2
  2347
williamr@2
  2348
	@since  7.0s
williamr@2
  2349
	*/
williamr@2
  2350
	IMPORT_C TInt GetAudioBitRate(TInt& aBitRate) const;
williamr@2
  2351
williamr@2
  2352
	/**
williamr@2
  2353
	Sets the frame rate of the clip.
williamr@2
  2354
williamr@2
  2355
	@param  aFramesPerSecond
williamr@2
  2356
	        The number of frames per second.
williamr@2
  2357
williamr@2
  2358
	@return One of the system-wide error codes.
williamr@2
  2359
williamr@2
  2360
	@since  7.0s
williamr@2
  2361
	*/
williamr@2
  2362
	IMPORT_C TInt SetFrameRate(TReal32 aFramesPerSecond) const;
williamr@2
  2363
williamr@2
  2364
	/**
williamr@2
  2365
	Gets the frame rate of the clip.
williamr@2
  2366
williamr@2
  2367
	@param  aFramesPerSecond
williamr@2
  2368
	        The number of frames per second, filled in by the controller plugin.
williamr@2
  2369
williamr@2
  2370
	@return One of the system-wide error codes.
williamr@2
  2371
williamr@2
  2372
	@since  7.0s
williamr@2
  2373
	*/
williamr@2
  2374
	IMPORT_C TInt GetFrameRate(TReal32& aFramesPerSecond) const;
williamr@2
  2375
williamr@2
  2376
	/**
williamr@2
  2377
	Gets the video clip MIME type.
williamr@2
  2378
williamr@2
  2379
	@param  aMimeType
williamr@2
  2380
	        The Mime type of the current clip.
williamr@2
  2381
williamr@2
  2382
	@since  7.0s
williamr@2
  2383
	*/
williamr@2
  2384
	IMPORT_C TInt GetVideoMimeType(TDes8& aMimeType) const;
williamr@2
  2385
	};
williamr@2
  2386
williamr@2
  2387
/**
williamr@2
  2388
@publishedAll
williamr@2
  2389
@released
williamr@2
  2390
williamr@2
  2391
Client class to access functionality specific to a video playback controller.
williamr@2
  2392
williamr@2
  2393
The class uses the custom command function of the controller plugin, and removes the necessity
williamr@2
  2394
for the client to formulate the custom commands.
williamr@2
  2395
williamr@2
  2396
@since  7.0s
williamr@2
  2397
*/
williamr@2
  2398
class RMMFVideoPlayControllerCustomCommands : public RMMFCustomCommandsBase
williamr@2
  2399
	{
williamr@2
  2400
public:
williamr@2
  2401
williamr@2
  2402
	/**
williamr@2
  2403
	Constructor.
williamr@2
  2404
williamr@2
  2405
	@param  aController
williamr@2
  2406
	        The client side controller object to be used by this custom command interface.
williamr@2
  2407
williamr@2
  2408
	@since  7.0s
williamr@2
  2409
	*/
williamr@2
  2410
	IMPORT_C RMMFVideoPlayControllerCustomCommands(RMMFController& aController);
williamr@2
  2411
williamr@2
  2412
	/**
williamr@2
  2413
	Prepares the video clip to be accessed.
williamr@2
  2414
williamr@2
  2415
	A call to this function tells the loaded controller plugin to finalise its configuration
williamr@2
  2416
	and to prepare to start reading the video clip.  It is not possible to play the video clip
williamr@2
  2417
	or query any of its properties (e.g. duration, meta data etc.) until the controller plugin
williamr@2
  2418
	has signified the completion of this method by generating a KMMFEventCategoryVideoPrepareComplete
williamr@2
  2419
	event.
williamr@2
  2420
williamr@2
  2421
	@since  7.0s
williamr@2
  2422
	*/
williamr@2
  2423
	IMPORT_C TInt Prepare();
williamr@2
  2424
williamr@2
  2425
	/**
williamr@2
  2426
	Asks the controller to store the current frame to a bitmap. 
williamr@2
  2427
williamr@2
  2428
	The video play controller will send an event to the client on completion of the task.
williamr@2
  2429
williamr@2
  2430
	@param  aBitmap
williamr@2
  2431
	        The handle of the CFbsBitmap object to retrieve the frame to.
williamr@2
  2432
	@param  aStatus
williamr@2
  2433
	        The active object to call back on.
williamr@2
  2434
williamr@2
  2435
	@return One of the system-wide error codes.
williamr@2
  2436
williamr@2
  2437
	@since  7.0s
williamr@2
  2438
	*/
williamr@2
  2439
	IMPORT_C void GetFrame(CFbsBitmap& aBitmap, TRequestStatus& aStatus);
williamr@2
  2440
williamr@2
  2441
	/**
williamr@2
  2442
	Sets the screen region to be used to display the video.
williamr@2
  2443
williamr@2
  2444
	@param  aWindowRect
williamr@2
  2445
	        The window rectangle.
williamr@2
  2446
	@param  aClipRect
williamr@2
  2447
	        The clip rectangle.
williamr@2
  2448
williamr@2
  2449
	@return One of the system-wide error codes.
williamr@2
  2450
williamr@2
  2451
	@since  7.0s
williamr@2
  2452
	*/
williamr@2
  2453
	IMPORT_C TInt SetDisplayWindow(const TRect& aWindowRect, const TRect& aClipRect) const;
williamr@2
  2454
williamr@2
  2455
	/**
williamr@2
  2456
	Updates the display region.
williamr@2
  2457
williamr@2
  2458
	@param  aRegion
williamr@2
  2459
	        The valid region to display to.
williamr@2
  2460
williamr@2
  2461
	@return One of the system-wide error codes.
williamr@2
  2462
williamr@2
  2463
	@since  7.0s
williamr@2
  2464
	*/
williamr@2
  2465
	IMPORT_C TInt UpdateDisplayRegion(const TRegion& aRegion) const;
williamr@2
  2466
williamr@2
  2467
	/**
williamr@2
  2468
	Queries whether audio is enabled.
williamr@2
  2469
williamr@2
  2470
	@param  aEnabled
williamr@2
  2471
	        A boolean indicating whether audio is enabled.
williamr@2
  2472
williamr@2
  2473
	@return One of the system-wide error codes.
williamr@2
  2474
williamr@2
  2475
	@since  7.0s
williamr@2
  2476
	*/
williamr@2
  2477
	IMPORT_C TInt GetAudioEnabled(TBool& aEnabled) const;
williamr@2
  2478
williamr@2
  2479
	/**
williamr@2
  2480
	Sends a direct screen access event to controller.
williamr@2
  2481
williamr@2
  2482
	@param  aDSAEvent
williamr@2
  2483
	        The direct screen access event.
williamr@2
  2484
williamr@2
  2485
	@return One of the system-wide error codes.
williamr@2
  2486
williamr@2
  2487
	@since  7.0s
williamr@2
  2488
	*/
williamr@2
  2489
	IMPORT_C TInt DirectScreenAccessEvent(const TMMFDSAEvent aDSAEvent) const;
williamr@2
  2490
williamr@2
  2491
	/**
williamr@2
  2492
 	Sets a time window for video playback.
williamr@2
  2493
williamr@2
  2494
 	@param  aStart
williamr@2
  2495
	        The start time in milliseconds relative to the start of the video clip.
williamr@2
  2496
  	@param  aEnd
williamr@2
  2497
	        The end time in milliseconds relative to the start of the video clip.
williamr@2
  2498
williamr@2
  2499
  	@return One of the system-wide error codes.
williamr@2
  2500
williamr@2
  2501
  	@since  7.0s
williamr@2
  2502
	*/
williamr@2
  2503
	IMPORT_C TInt Play(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) const;
williamr@2
  2504
williamr@2
  2505
	/**
williamr@2
  2506
  	Requests the controller to redraw the current frame.
williamr@2
  2507
williamr@2
  2508
  	@return One of the system-wide error codes.
williamr@2
  2509
williamr@2
  2510
  	@since  7.0s
williamr@2
  2511
	*/
williamr@2
  2512
	IMPORT_C TInt RefreshFrame() const;
williamr@2
  2513
williamr@2
  2514
	/**
williamr@2
  2515
	Gets the video loading progress as a percentage.
williamr@2
  2516
williamr@2
  2517
	@param  aPercentageProgress
williamr@2
  2518
	        The progress loading the clip, as a percentage.
williamr@2
  2519
williamr@2
  2520
	@return One of the system-wide error codes.
williamr@2
  2521
williamr@2
  2522
	@since  7.0s
williamr@2
  2523
	*/
williamr@2
  2524
	IMPORT_C TInt GetLoadingProgress(TInt& aPercentageProgress) const;
williamr@2
  2525
williamr@2
  2526
	/**
williamr@2
  2527
	Rotates the video image on the screen.
williamr@2
  2528
williamr@2
  2529
	@param  aRotation
williamr@2
  2530
	        The desired rotation to apply.
williamr@2
  2531
williamr@2
  2532
	@return One of the system-wide error codes.
williamr@2
  2533
williamr@2
  2534
	@since  7.0s
williamr@2
  2535
	*/
williamr@2
  2536
	IMPORT_C TInt SetRotation(TVideoRotation aRotation) const;
williamr@2
  2537
williamr@2
  2538
	/**
williamr@2
  2539
	Queries the rotation that is currently applied to the video image.
williamr@2
  2540
williamr@2
  2541
	@param  aRotation
williamr@2
  2542
	        The applied rotation.
williamr@2
  2543
williamr@2
  2544
	@return One of the system wide error codes.
williamr@2
  2545
williamr@2
  2546
	@since  7.0s
williamr@2
  2547
	*/
williamr@2
  2548
	IMPORT_C TInt GetRotation(TVideoRotation& aRotation) const;
williamr@2
  2549
williamr@2
  2550
	/**
williamr@2
  2551
	Scales the video image to a specified percentage of its original size.
williamr@2
  2552
williamr@2
  2553
	@param  aWidthPercentage
williamr@2
  2554
	        The percentage (100 = original size) to be used to scale the width of the video image.
williamr@2
  2555
	@param  aHeightPercentage
williamr@2
  2556
	        The percentage (100 = original size) to be used to scale the height of the video image. 
williamr@2
  2557
	        If this is not equal to aWidthPercentage then the image may be distorted.
williamr@2
  2558
	@param  aAntiAliasFiltering
williamr@2
  2559
	        True if anti-aliasing filtering should be used. If the plugin does not
williamr@2
  2560
	        support this kind of processing, this value will be ignored.
williamr@2
  2561
williamr@2
  2562
	@return One of the system wide error codes.
williamr@2
  2563
williamr@2
  2564
	@since 7.0s
williamr@2
  2565
	*/
williamr@2
  2566
	IMPORT_C TInt SetScaleFactor(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering) const;
williamr@2
  2567
williamr@2
  2568
	/**
williamr@2
  2569
	Gets the scale factor currently applied to the video image.
williamr@2
  2570
williamr@2
  2571
	@param  aWidthPercentage
williamr@2
  2572
	        On return, will contain the percentage (100 = original size) used to scale the width
williamr@2
  2573
	        of the video image.
williamr@2
  2574
	@param  aHeightPercentage
williamr@2
  2575
	        On return. will contain the percentage (100 = original size) used to scale the height 
williamr@2
  2576
	        of the video image.
williamr@2
  2577
	@param  aAntiAliasFiltering
williamr@2
  2578
	        True if anti-aliasing filtering is being used
williamr@2
  2579
williamr@2
  2580
	@return One of the system wide error codes.
williamr@2
  2581
williamr@2
  2582
	@since  7.0s
williamr@2
  2583
	*/
williamr@2
  2584
	IMPORT_C TInt GetScaleFactor(TReal32& aWidthPercentage, TReal32& aHeightPercentage, TBool& aAntiAliasFiltering) const;
williamr@2
  2585
williamr@2
  2586
	/**
williamr@2
  2587
	Selects a region of the video image to be displayed.
williamr@2
  2588
williamr@2
  2589
	@param  aCropRegion
williamr@2
  2590
	        The dimensions of the crop region, relative to the video image.
williamr@2
  2591
williamr@2
  2592
	@return One of the system wide error codes.
williamr@2
  2593
williamr@2
  2594
	@since 7.0s
williamr@2
  2595
	*/
williamr@2
  2596
	IMPORT_C TInt SetCropRegion(const TRect& aCropRegion) const;
williamr@2
  2597
williamr@2
  2598
	/**
williamr@2
  2599
	Gets the crop region currently applied to the image.
williamr@2
  2600
williamr@2
  2601
	@param  aCropRegion
williamr@2
  2602
	        The dimensions of the crop region, relative to the video image. If no crop region has
williamr@2
  2603
	        been applied, the full dimensions of the video image will be returned.
williamr@2
  2604
	
williamr@2
  2605
	@return One of the system-wide error codes.
williamr@2
  2606
williamr@2
  2607
	@since  7.0s
williamr@2
  2608
	*/
williamr@2
  2609
	IMPORT_C TInt GetCropRegion(TRect& aCropRegion) const;
williamr@2
  2610
williamr@2
  2611
williamr@2
  2612
private:
williamr@2
  2613
	TPckgBuf<TMMFVideoConfig> iConfigPackage;
williamr@2
  2614
	};
williamr@2
  2615
williamr@2
  2616
/**
williamr@2
  2617
@publishedAll
williamr@2
  2618
@released
williamr@2
  2619
williamr@2
  2620
Client class to access functionality specific to a video recorder controller.
williamr@2
  2621
williamr@2
  2622
The class uses the custom command function of the controller plugin, and removes the necessity
williamr@2
  2623
for the client to formulate the custom commands.
williamr@2
  2624
williamr@2
  2625
@since  7.0s
williamr@2
  2626
*/
williamr@2
  2627
class RMMFVideoRecordControllerCustomCommands : public RMMFCustomCommandsBase
williamr@2
  2628
	{
williamr@2
  2629
public:
williamr@2
  2630
williamr@2
  2631
	/**
williamr@2
  2632
	Constructor.
williamr@2
  2633
williamr@2
  2634
	@param  aController
williamr@2
  2635
	        The client side controller object to be used by this custom command interface.
williamr@2
  2636
williamr@2
  2637
	@since 7.0s
williamr@2
  2638
	*/
williamr@2
  2639
	IMPORT_C RMMFVideoRecordControllerCustomCommands(RMMFController& aController);
williamr@2
  2640
williamr@2
  2641
	/**
williamr@2
  2642
	Sets the format for the video to record.
williamr@2
  2643
williamr@2
  2644
	@param  aVideoFormatUid
williamr@2
  2645
	        The UID of the video format.
williamr@2
  2646
williamr@2
  2647
	@return This method will return with one of the system-wide error codes.
williamr@2
  2648
williamr@2
  2649
	@since  7.0s
williamr@2
  2650
	*/
williamr@2
  2651
	IMPORT_C TInt SetVideoFormat(TUid aVideoFormatUid) const;
williamr@2
  2652
williamr@2
  2653
	/**
williamr@2
  2654
	Sets the video codec for recording.
williamr@2
  2655
williamr@2
  2656
	@param  aVideoCodec
williamr@2
  2657
	        The MIME type of the video codec.
williamr@2
  2658
williamr@2
  2659
	@return	One of the system-wide error codes.
williamr@2
  2660
williamr@2
  2661
	@since  7.0s
williamr@2
  2662
	*/
williamr@2
  2663
	IMPORT_C TInt SetVideoCodec(const TDesC8& aVideoCodec) const;
williamr@2
  2664
williamr@2
  2665
	/**
williamr@2
  2666
	Sets the video bit rate.
williamr@2
  2667
williamr@2
  2668
	@param  aBitRate
williamr@2
  2669
	        The bit rate of the video stream.
williamr@2
  2670
williamr@2
  2671
	@return One of the system-wide error codes.
williamr@2
  2672
williamr@2
  2673
	@since  7.0s
williamr@2
  2674
	*/
williamr@2
  2675
	IMPORT_C TInt SetVideoBitRate(TInt aBitRate) const;
williamr@2
  2676
williamr@2
  2677
	/**
williamr@2
  2678
	Sets the audio bit rate.
williamr@2
  2679
williamr@2
  2680
	@param  aBitRate
williamr@2
  2681
	        The bit rate of the audio stream.
williamr@2
  2682
williamr@2
  2683
	@return One of the system-wide error codes.
williamr@2
  2684
williamr@2
  2685
	@since  7.0s
williamr@2
  2686
	*/
williamr@2
  2687
	IMPORT_C TInt SetAudioBitRate(TInt aBitRate) const;
williamr@2
  2688
williamr@2
  2689
	/**
williamr@2
  2690
	Sets the audio codec for recording.
williamr@2
  2691
williamr@2
  2692
	@param  aAudioCodec
williamr@2
  2693
	        The FourCC code of the audio codec.
williamr@2
  2694
williamr@2
  2695
	@return	One of the system-wide error codes.
williamr@2
  2696
williamr@2
  2697
	@since  7.0s
williamr@2
  2698
	*/
williamr@2
  2699
	IMPORT_C TInt SetAudioCodec(TFourCC aAudioCodec) const;
williamr@2
  2700
williamr@2
  2701
	/**
williamr@2
  2702
	Sets the frame size of the clip.
williamr@2
  2703
williamr@2
  2704
	@param  aVideoFrameSize
williamr@2
  2705
	        The frame size, in pixels.
williamr@2
  2706
williamr@2
  2707
	@return One of the system-wide error codes.
williamr@2
  2708
williamr@2
  2709
	@since  7.0s
williamr@2
  2710
	*/
williamr@2
  2711
	IMPORT_C TInt SetVideoFrameSize(TSize aVideoFrameSize) const;
williamr@2
  2712
williamr@2
  2713
	/**
williamr@2
  2714
	Sets the maximum size of the recorded clip, in bytes.
williamr@2
  2715
williamr@2
  2716
	@param  aMaxSize
williamr@2
  2717
	        The maximum size of the recorded clip, in bytes. This can be called with the parameter 
williamr@2
  2718
	        KMMFNoMaxClipSize which signifies no maximum file size.
williamr@2
  2719
williamr@2
  2720
	@return	One of the system-wide error codes.
williamr@2
  2721
williamr@2
  2722
	@since  7.0s
williamr@2
  2723
	*/
williamr@2
  2724
	IMPORT_C TInt SetMaxFileSize(TInt aMaxSize) const;
williamr@2
  2725
williamr@2
  2726
	/**
williamr@2
  2727
	Adds meta data to the clip.
williamr@2
  2728
williamr@2
  2729
	@param  aNewEntry
williamr@2
  2730
	        The details of the new entry to be added.
williamr@2
  2731
williamr@2
  2732
	@return One of the system-wide error codes.
williamr@2
  2733
williamr@2
  2734
	@since  7.0s
williamr@2
  2735
	*/
williamr@2
  2736
	IMPORT_C void AddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry)const;
williamr@2
  2737
williamr@2
  2738
	/**
williamr@2
  2739
	Removes a meta data entry from the clip.
williamr@2
  2740
williamr@2
  2741
	@param  aIndex
williamr@2
  2742
	        The ID of the meta data entry to delete.
williamr@2
  2743
williamr@2
  2744
	@return One of the system-wide error codes.
williamr@2
  2745
williamr@2
  2746
	@since  7.0s
williamr@2
  2747
	*/
williamr@2
  2748
	IMPORT_C TInt RemoveMetaDataEntry(TInt aIndex)const;
williamr@2
  2749
williamr@2
  2750
	/**
williamr@2
  2751
	Replaces a meta data in the clip.
williamr@2
  2752
williamr@2
  2753
	@param  aIndex
williamr@2
  2754
	        The ID of the meta data entry to replace.
williamr@2
  2755
	@param  aNewEntry
williamr@2
  2756
	        The details of the new entry to be added.
williamr@2
  2757
williamr@2
  2758
	@since  7.0s
williamr@2
  2759
	*/
williamr@2
  2760
	IMPORT_C void ReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry)const;
williamr@2
  2761
williamr@2
  2762
	/**
williamr@2
  2763
	Sets whether audio is enabled.
williamr@2
  2764
williamr@2
  2765
	@param  aEnable
williamr@2
  2766
	        A boolean indicating if audio should be enabled.
williamr@2
  2767
williamr@2
  2768
	@return One of the system-wide error codes.
williamr@2
  2769
williamr@2
  2770
	@since  7.0s
williamr@2
  2771
	*/
williamr@2
  2772
	IMPORT_C TInt SetAudioEnabled(TBool aEnable) const;
williamr@2
  2773
williamr@2
  2774
	/**
williamr@2
  2775
	Prepares the controller for recording. This should be called before the first attempt to record 
williamr@2
  2776
	with the controller.
williamr@2
  2777
williamr@2
  2778
	@return One of the system-wide error codes.
williamr@2
  2779
williamr@2
  2780
	@since  7.0s
williamr@2
  2781
	*/
williamr@2
  2782
	IMPORT_C TInt Prepare() const;
williamr@2
  2783
williamr@2
  2784
	/**
williamr@2
  2785
	Sets the handle of the camera to use.
williamr@2
  2786
williamr@2
  2787
	@param  aCameraHandle
williamr@2
  2788
	        The handle of the camera to use.
williamr@2
  2789
williamr@2
  2790
	@return One of the system-wide error codes.
williamr@2
  2791
williamr@2
  2792
	@since  7.0s
williamr@2
  2793
	*/
williamr@2
  2794
	IMPORT_C TInt SetCameraHandle(TInt aCameraHandle) const;
williamr@2
  2795
williamr@2
  2796
	/**
williamr@2
  2797
	Gets the (possibly estimated) record time left in the clip.
williamr@2
  2798
williamr@2
  2799
	@param  aTime
williamr@2
  2800
	        The record time available, in microseconds.
williamr@2
  2801
williamr@2
  2802
	@return One of the system-wide error codes.
williamr@2
  2803
williamr@2
  2804
	@since  7.0s
williamr@2
  2805
	*/
williamr@2
  2806
	IMPORT_C TInt GetRecordTimeAvailable(TTimeIntervalMicroSeconds& aTime) const;
williamr@2
  2807
williamr@2
  2808
	/**
williamr@2
  2809
	Gets the supported sink audio types.
williamr@2
  2810
williamr@2
  2811
	@param  aSupportedDataTypes
williamr@2
  2812
	        The supported data types.
williamr@2
  2813
williamr@2
  2814
	@since  7.0s
williamr@2
  2815
	*/
williamr@2
  2816
	IMPORT_C TInt GetSupportedSinkAudioTypes(RArray<TFourCC>& aSupportedDataTypes) const;
williamr@2
  2817
williamr@2
  2818
	/**
williamr@2
  2819
	Gets the supported sink video types.
williamr@2
  2820
williamr@2
  2821
	@param  aDataTypes
williamr@2
  2822
	        The supported data types.
williamr@2
  2823
williamr@2
  2824
	@since  7.0s
williamr@2
  2825
	*/
williamr@2
  2826
	IMPORT_C TInt GetSupportedSinkVideoTypes(CDesC8Array& aDataTypes) const;
williamr@2
  2827
williamr@2
  2828
	// INC23777
williamr@2
  2829
	/**
williamr@2
  2830
	Retrieves whether audio is enabled.
williamr@2
  2831
williamr@2
  2832
	@param  aEnabled
williamr@2
  2833
	        A boolean indicating whether audio is enabled.
williamr@2
  2834
williamr@2
  2835
	@return One of the system-wide error codes.
williamr@2
  2836
williamr@2
  2837
	@since  7.0s
williamr@2
  2838
	*/
williamr@2
  2839
	IMPORT_C TInt GetAudioEnabled(TBool& aEnabled) const;
williamr@2
  2840
williamr@2
  2841
private:
williamr@2
  2842
	void DoGetCDesC8ArrayL(CDesC8Array& aArray, TMMFVideoRecordControllerMessages aIpc) const;
williamr@2
  2843
	void DoGetFourCCArrayL(RArray<TFourCC>& aArray) const;
williamr@2
  2844
	};
williamr@2
  2845
williamr@2
  2846
williamr@2
  2847
/**
williamr@2
  2848
@publishedAll
williamr@2
  2849
@released
williamr@2
  2850
williamr@2
  2851
Mixin class to be derived from controller plugins that could support the video record controller 
williamr@2
  2852
custom commands.
williamr@2
  2853
*/
williamr@2
  2854
class MMMFVideoRecordControllerCustomCommandImplementor
williamr@2
  2855
	{
williamr@2
  2856
public:
williamr@2
  2857
williamr@2
  2858
	/**
williamr@2
  2859
	Sets the format for the video to record.
williamr@2
  2860
williamr@2
  2861
	@param  aVideoFormatUid
williamr@2
  2862
	        The UID of the video format.
williamr@2
  2863
williamr@2
  2864
	@return One of the system-wide error codes.
williamr@2
  2865
williamr@2
  2866
	@since  7.0s
williamr@2
  2867
	*/
williamr@2
  2868
	virtual void MvrcSetVideoFormatL(TUid aVideoFormatUid)=0;
williamr@2
  2869
williamr@2
  2870
	/**
williamr@2
  2871
	Sets the video codec for recording.
williamr@2
  2872
williamr@2
  2873
	@param  aVideoCodec
williamr@2
  2874
	        The MIME type of the video codec.
williamr@2
  2875
williamr@2
  2876
	@return One of the system-wide error codes.
williamr@2
  2877
williamr@2
  2878
	@since 7.0s
williamr@2
  2879
	*/
williamr@2
  2880
	virtual void MvrcSetVideoCodecL(const TDesC8& aVideoCodec)=0;
williamr@2
  2881
williamr@2
  2882
	/**
williamr@2
  2883
	Sets the audio codec for recording.
williamr@2
  2884
williamr@2
  2885
	@param  aAudioCodec
williamr@2
  2886
	        The FourCC code of the audio codec.
williamr@2
  2887
williamr@2
  2888
	@return One of the system-wide error codes.
williamr@2
  2889
williamr@2
  2890
	@since  7.0s
williamr@2
  2891
	*/
williamr@2
  2892
	virtual void MvrcSetAudioCodecL(TFourCC aAudioCodec)=0;
williamr@2
  2893
williamr@2
  2894
	/**
williamr@2
  2895
	Sets the video bit rate.
williamr@2
  2896
williamr@2
  2897
	@param  aBitRate
williamr@2
  2898
	        The bit rate of the video stream. This can be called with the parameter 
williamr@2
  2899
	        KMMFVariableVideoBitRate which specifies a variable bit rate.
williamr@2
  2900
williamr@2
  2901
	@return One of the system-wide error codes.
williamr@2
  2902
williamr@2
  2903
	@since  7.0s
williamr@2
  2904
	*/
williamr@2
  2905
	virtual void MvrcSetVideoBitRateL(TInt& aBitRate)=0;
williamr@2
  2906
williamr@2
  2907
	/**
williamr@2
  2908
	Sets the audio bit rate.
williamr@2
  2909
williamr@2
  2910
	@param  aBitRate
williamr@2
  2911
	        The bit rate of the audio stream.
williamr@2
  2912
williamr@2
  2913
	@return One of the system-wide error codes.
williamr@2
  2914
williamr@2
  2915
	@since  7.0s
williamr@2
  2916
	*/
williamr@2
  2917
	virtual void MvrcSetAudioBitRateL(TInt& aBitRate)=0;
williamr@2
  2918
williamr@2
  2919
	/**
williamr@2
  2920
	Adds meta data to the clip.
williamr@2
  2921
williamr@2
  2922
	@param  aNewEntry
williamr@2
  2923
	        The details of the new entry to be added.
williamr@2
  2924
williamr@2
  2925
	@since  7.0s
williamr@2
  2926
	*/
williamr@2
  2927
	virtual void MvrcAddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry)=0;
williamr@2
  2928
williamr@2
  2929
	/**
williamr@2
  2930
	Removes a meta data entry from the clip.
williamr@2
  2931
williamr@2
  2932
	@param  aIndex
williamr@2
  2933
	        The ID of the meta data entry to delete.
williamr@2
  2934
williamr@2
  2935
	@since  7.0s
williamr@2
  2936
	*/
williamr@2
  2937
	virtual void MvrcRemoveMetaDataEntryL(TInt aIndex)=0;
williamr@2
  2938
williamr@2
  2939
	/**
williamr@2
  2940
	Replaces a meta data in the clip.
williamr@2
  2941
williamr@2
  2942
	@param  aIndex
williamr@2
  2943
	        The ID of the meta data entry to replace.
williamr@2
  2944
	@param  aNewEntry
williamr@2
  2945
	        The details of the new entry to be added.
williamr@2
  2946
williamr@2
  2947
	@since  7.0s
williamr@2
  2948
	*/
williamr@2
  2949
	virtual void MvrcReplaceMetaDataEntryL(TInt aIndex, const CMMFMetaDataEntry& aNewEntry)=0;
williamr@2
  2950
williamr@2
  2951
	/**
williamr@2
  2952
	Sets the maximum file size.
williamr@2
  2953
williamr@2
  2954
	@param  aMaxFileSize
williamr@2
  2955
	        The maximum file size allowed for recording. This can be called with the parameter
williamr@2
  2956
	        KMMFNoMaxClipSize which signifies no maximum file size.
williamr@2
  2957
williamr@2
  2958
	@since  7.0s
williamr@2
  2959
	*/
williamr@2
  2960
	virtual void MvrcSetMaxFileSizeL(TInt aMaxFileSize)=0;
williamr@2
  2961
williamr@2
  2962
	/**
williamr@2
  2963
	Sets whether audio is enabled.
williamr@2
  2964
williamr@2
  2965
	@param  aEnable
williamr@2
  2966
	        A boolean indicating if audio is enabled.
williamr@2
  2967
williamr@2
  2968
	@since  7.0s
williamr@2
  2969
	*/
williamr@2
  2970
	virtual void MvrcSetAudioEnabledL(TBool aEnable)=0;
williamr@2
  2971
williamr@2
  2972
	/**
williamr@2
  2973
	Sets the frame size for the video recording.
williamr@2
  2974
williamr@2
  2975
	@param  aFrameSize
williamr@2
  2976
	        The frame size for recording.
williamr@2
  2977
williamr@2
  2978
	@since  7.0s
williamr@2
  2979
	*/
williamr@2
  2980
	virtual void MvrcSetVideoFrameSizeL(TSize aFrameSize)=0;
williamr@2
  2981
williamr@2
  2982
	/**
williamr@2
  2983
	Prepares the controller for recording. This needs to be called before
williamr@2
  2984
	the first call to Record().
williamr@2
  2985
williamr@2
  2986
	@since  7.0s
williamr@2
  2987
	*/
williamr@2
  2988
	virtual void MvrcPrepareL()=0;
williamr@2
  2989
williamr@2
  2990
	/**
williamr@2
  2991
	Sets the handle of the camera to use for recording.
williamr@2
  2992
williamr@2
  2993
	@since  7.0s
williamr@2
  2994
	*/
williamr@2
  2995
	virtual void MvrcSetCameraHandleL(TInt aCameraHandle)=0;
williamr@2
  2996
williamr@2
  2997
	/**
williamr@2
  2998
	Gets the (possibly estimated) record time left in the clip.
williamr@2
  2999
williamr@2
  3000
	@param  aTime
williamr@2
  3001
	        The record time available, in microseconds.
williamr@2
  3002
williamr@2
  3003
	@since  7.0s
williamr@2
  3004
	*/
williamr@2
  3005
	virtual void MvrcGetRecordTimeAvailableL(TTimeIntervalMicroSeconds& aTime) = 0;
williamr@2
  3006
williamr@2
  3007
	/**
williamr@2
  3008
	Gets the supported sink audio types.
williamr@2
  3009
williamr@2
  3010
	@param  aDataTypes
williamr@2
  3011
	        The supported data types.
williamr@2
  3012
williamr@2
  3013
	@return One of the system-wide error codes.
williamr@2
  3014
williamr@2
  3015
	@since  7.0s
williamr@2
  3016
	*/
williamr@2
  3017
	virtual void MvrcGetSupportedSinkAudioTypesL(RArray<TFourCC>& aDataTypes)=0;
williamr@2
  3018
williamr@2
  3019
	/**
williamr@2
  3020
	Gets the supported sink video types.
williamr@2
  3021
williamr@2
  3022
	@param  aDataTypes
williamr@2
  3023
	        The supported data types.
williamr@2
  3024
williamr@2
  3025
	@return One of the system-wide error codes.
williamr@2
  3026
williamr@2
  3027
	@since  7.0s
williamr@2
  3028
	*/
williamr@2
  3029
	virtual void MvrcGetSupportedSinkVideoTypesL(CDesC8Array& aDataTypes)=0;
williamr@2
  3030
williamr@2
  3031
	//INC23777
williamr@2
  3032
	/**
williamr@2
  3033
	Indicates if the audio is enabled.
williamr@2
  3034
williamr@2
  3035
	@param  aEnabled
williamr@2
  3036
	        A boolean indicating if the audio is enabled.
williamr@2
  3037
williamr@2
  3038
	@since  7.0s
williamr@2
  3039
	*/
williamr@2
  3040
	virtual void MvrcGetAudioEnabledL(TBool& aEnabled)=0;
williamr@2
  3041
	};
williamr@2
  3042
williamr@2
  3043
williamr@2
  3044
/**
williamr@2
  3045
@publishedAll
williamr@2
  3046
@released
williamr@2
  3047
williamr@2
  3048
Client class to access functionality specific to a video playback controller.
williamr@2
  3049
williamr@2
  3050
The class uses the custom command function of the controller plugin, and removes the necessity
williamr@2
  3051
for the client to formulate the custom commands.
williamr@2
  3052
williamr@2
  3053
@since  7.0s
williamr@2
  3054
*/
williamr@2
  3055
class MMMFVideoPlayControllerCustomCommandImplementor
williamr@2
  3056
	{
williamr@2
  3057
public:
williamr@2
  3058
williamr@2
  3059
	/**
williamr@2
  3060
	Prepares the video clip to be accessed.
williamr@2
  3061
williamr@2
  3062
	A call to this method tells the controller plugin to finalise its configuration
williamr@2
  3063
	and to prepare to start reading the video clip.  It is not possible to play the video clip
williamr@2
  3064
	or query any of its properties (e.g. duration, meta data etc.) until the controller plugin
williamr@2
  3065
	has signified the completion of this method by generating a 
williamr@2
  3066
	KMMFEventCategoryVideoPrepareComplete event.
williamr@2
  3067
williamr@2
  3068
	@since  7.0s
williamr@2
  3069
	*/
williamr@2
  3070
	virtual void MvpcPrepare()=0;
williamr@2
  3071
williamr@2
  3072
	/**
williamr@2
  3073
	Gets a frame previously requested from the controller.
williamr@2
  3074
williamr@2
  3075
	@param  aVideoFrame
williamr@2
  3076
	        The handle of bitmap to retrieve frame to.
williamr@2
  3077
williamr@2
  3078
	@since  7.0s
williamr@2
  3079
	*/
williamr@2
  3080
	virtual void MvpcGetFrameL(MMMFVideoFrameMessage& aVideoFrame)=0;
williamr@2
  3081
williamr@2
  3082
	/**
williamr@2
  3083
	Indicates whether audio is enabled.
williamr@2
  3084
williamr@2
  3085
	@param  aEnabled
williamr@2
  3086
	        On return, contains a boolean indicating whether audio is enabled.
williamr@2
  3087
williamr@2
  3088
	@since  7.0s
williamr@2
  3089
	*/
williamr@2
  3090
	virtual void MvpcGetAudioEnabledL(TBool& aEnabled)=0;
williamr@2
  3091
williamr@2
  3092
	/**
williamr@2
  3093
	Sets the screen region to be used to display the video.
williamr@2
  3094
williamr@2
  3095
	@param  aClipRect
williamr@2
  3096
	        The clip rect used to display the video.
williamr@2
  3097
williamr@2
  3098
	@since  7.0s
williamr@2
  3099
	*/
williamr@2
  3100
	virtual void MvpcSetDisplayWindowL(const TRect& aWindowRect, const TRect& aClipRect) = 0;
williamr@2
  3101
williamr@2
  3102
	/**
williamr@2
  3103
	Updates the region to display.
williamr@2
  3104
williamr@2
  3105
	@param  aRegion
williamr@2
  3106
	        A TRegion containing the current display regions, ownership of the TRegion is not
williamr@2
  3107
	        transferred.
williamr@2
  3108
williamr@2
  3109
	@since  7.0s
williamr@2
  3110
	*/
williamr@2
  3111
	virtual void MvpcUpdateDisplayRegionL(const TRegion& aRegion) = 0;
williamr@2
  3112
williamr@2
  3113
	/**
williamr@2
  3114
	Pauses/Resumes video playback. This is to be used with direct screen access
williamr@2
  3115
	to indicate that the display has changed and should not be written to. This
williamr@2
  3116
	does not affect audio playback.
williamr@2
  3117
williamr@2
  3118
	@param  aDSAEvent
williamr@2
  3119
	        Whether the video display should be active.
williamr@2
  3120
williamr@2
  3121
	@since  7.0s
williamr@2
  3122
	*/
williamr@2
  3123
	virtual void MvpcDirectScreenAccessEventL(const TMMFDSAEvent aDSAEvent) = 0;
williamr@2
  3124
williamr@2
  3125
	/**
williamr@2
  3126
 	Sets a time window for video playback.
williamr@2
  3127
williamr@2
  3128
 	@param  aStart
williamr@2
  3129
	        Start time in milliseconds relative to the start of the video clip.
williamr@2
  3130
  	@param  aEnd
williamr@2
  3131
	        End time in milliseconds relative to the start of the video clip.
williamr@2
  3132
williamr@2
  3133
  	@since 7.0s
williamr@2
  3134
	*/
williamr@2
  3135
	virtual void MvpcPlayL(const TTimeIntervalMicroSeconds& aStart, const TTimeIntervalMicroSeconds& aEnd) = 0;
williamr@2
  3136
	
williamr@2
  3137
	/**
williamr@2
  3138
  	Requests the controller to redraw the current frame.
williamr@2
  3139
williamr@2
  3140
  	@since  7.0s
williamr@2
  3141
	*/
williamr@2
  3142
	virtual void MvpcRefreshFrameL() = 0;
williamr@2
  3143
williamr@2
  3144
	/**
williamr@2
  3145
	Gets the progress of loading a video clip.
williamr@2
  3146
williamr@2
  3147
	@param  aPercentageComplete
williamr@2
  3148
	        The progress loading the clip, as a percentage.
williamr@2
  3149
williamr@2
  3150
	@since  7.0s
williamr@2
  3151
	*/
williamr@2
  3152
	virtual void MvpcGetLoadingProgressL(TInt& aPercentageComplete) = 0;
williamr@2
  3153
williamr@2
  3154
	/**
williamr@2
  3155
	Rotates the video image on the screen.
williamr@2
  3156
williamr@2
  3157
	@param  aRotation
williamr@2
  3158
	        The desired rotation to apply.
williamr@2
  3159
williamr@2
  3160
	@since  7.0s
williamr@2
  3161
	*/
williamr@2
  3162
	virtual void MvpcSetRotationL(TVideoRotation aRotation) = 0;
williamr@2
  3163
williamr@2
  3164
	/**
williamr@2
  3165
	Queries the rotation that is currently applied to the video image.
williamr@2
  3166
williamr@2
  3167
	@param  aRotation
williamr@2
  3168
	        The applied rotation.
williamr@2
  3169
williamr@2
  3170
	@since  7.0s
williamr@2
  3171
	*/
williamr@2
  3172
	virtual void MvpcGetRotationL(TVideoRotation& aRotation) = 0;
williamr@2
  3173
williamr@2
  3174
	/**
williamr@2
  3175
	Scales the video image to a specified percentage of its original size.
williamr@2
  3176
williamr@2
  3177
	@param  aWidthPercentage
williamr@2
  3178
	        The percentage (100 = original size) to be used to scale the width of the video image.
williamr@2
  3179
	@param  aHeightPercentage
williamr@2
  3180
	        The percentage (100 = original size) to be used to scale the height of the video image. 
williamr@2
  3181
	        If this is not equal to aWidthPercentage then the image may be distorted.
williamr@2
  3182
	@param  aAntiAliasFiltering
williamr@2
  3183
	        A boolean indicating if anit-aliasing filtering should be used. ETrue if anti-aliasing 
williamr@2
  3184
	        should be used.  If the plugin does not support this kind of processing, this value will 
williamr@2
  3185
	        be ignored.
williamr@2
  3186
williamr@2
  3187
	@since  7.0s
williamr@2
  3188
	*/
williamr@2
  3189
	virtual void MvpcSetScaleFactorL(TReal32 aWidthPercentage, TReal32 aHeightPercentage, TBool aAntiAliasFiltering) = 0;
williamr@2
  3190
williamr@2
  3191
	/**
williamr@2
  3192
	Gets the scale factor currently applied to the video image.
williamr@2
  3193
williamr@2
  3194
	@param  aWidthPercentage
williamr@2
  3195
	        The percentage (100 = original size) used to scale the width of the video image will be 
williamr@2
  3196
	        copied into here.
williamr@2
  3197
	@param  aHeightPercentage
williamr@2
  3198
	        The percentage (100 = original size) used to scale the height of the video image will be 
williamr@2
  3199
	        copied into here.
williamr@2
  3200
	@param  aAntiAliasFiltering
williamr@2
  3201
	        A boolean indicating if anti-aliasing filtering should be used. ETrue if anti-aliasing 
williamr@2
  3202
	        filtering is being used, EFalse if not.
williamr@2
  3203
williamr@2
  3204
	@since 7.0s
williamr@2
  3205
	*/
williamr@2
  3206
	virtual void MvpcGetScaleFactorL(TReal32& aWidthPercentage, TReal32& aHeightPercentage, TBool& aAntiAliasFiltering) = 0;
williamr@2
  3207
williamr@2
  3208
	/**
williamr@2
  3209
	Selects a region of the video image to be displayed.
williamr@2
  3210
williamr@2
  3211
	@param  aCropRegion
williamr@2
  3212
	        The dimensions of the crop region, relative to the video image.
williamr@2
  3213
williamr@2
  3214
	@since  7.0s
williamr@2
  3215
	*/
williamr@2
  3216
	virtual void MvpcSetCropRegionL(const TRect& aCropRegion) = 0;
williamr@2
  3217
williamr@2
  3218
	/**
williamr@2
  3219
	Gets the crop region currently applied to the image
williamr@2
  3220
williamr@2
  3221
	@param  aCropRegion
williamr@2
  3222
	        The dimensions of the crop region, relative to the video image. If no crop region has 
williamr@2
  3223
	        been applied, the full dimensions of the video image will be returned.
williamr@2
  3224
williamr@2
  3225
	@since  7.0s
williamr@2
  3226
	*/
williamr@2
  3227
	virtual void MvpcGetCropRegionL(TRect& aCropRegion) = 0;
williamr@2
  3228
	};
williamr@2
  3229
williamr@2
  3230
/**
williamr@2
  3231
@publishedAll
williamr@2
  3232
@released
williamr@2
  3233
williamr@2
  3234
Mixin class to be derived from controller plugins that could support the video record controller
williamr@2
  3235
custom commands.
williamr@2
  3236
*/
williamr@2
  3237
class MMMFVideoControllerCustomCommandImplementor
williamr@2
  3238
	{
williamr@2
  3239
public:
williamr@2
  3240
williamr@2
  3241
	/**
williamr@2
  3242
	Gets the frame size of the clip.
williamr@2
  3243
williamr@2
  3244
	@param  aVideoFrameSize
williamr@2
  3245
	        The frame size, in pixels.
williamr@2
  3246
williamr@2
  3247
	@since  7.0s
williamr@2
  3248
	*/
williamr@2
  3249
	virtual void MvcGetVideoFrameSizeL(TSize& aVideoFrameSize)=0;
williamr@2
  3250
williamr@2
  3251
	/**
williamr@2
  3252
	Gets the audio type.
williamr@2
  3253
williamr@2
  3254
	@param  aCodec
williamr@2
  3255
	        The FourCC of the audio codec.
williamr@2
  3256
williamr@2
  3257
	@since  7.0s
williamr@2
  3258
	*/
williamr@2
  3259
	virtual void MvcGetAudioCodecL(TFourCC& aCodec)=0;
williamr@2
  3260
williamr@2
  3261
	/**
williamr@2
  3262
	Gets the video bit rate.
williamr@2
  3263
williamr@2
  3264
	@param  aBitRate
williamr@2
  3265
	        The bit rate of the video stream. If this value is KMMFVariableVideoBitRate it signifies
williamr@2
  3266
	        a variable bit rate.
williamr@2
  3267
williamr@2
  3268
	@since  7.0s
williamr@2
  3269
	*/
williamr@2
  3270
	virtual void MvcGetVideoBitRateL(TInt& aBitRate)=0;
williamr@2
  3271
williamr@2
  3272
	/**
williamr@2
  3273
	Gets the audio bit rate.
williamr@2
  3274
williamr@2
  3275
	@param  aBitRate
williamr@2
  3276
	        The bit rate of the audio stream.
williamr@2
  3277
williamr@2
  3278
	@since  7.0s
williamr@2
  3279
	*/
williamr@2
  3280
	virtual void MvcGetAudioBitRateL(TInt& aBitRate)=0;
williamr@2
  3281
williamr@2
  3282
	/**
williamr@2
  3283
	Sets the frame rate of the clip.
williamr@2
  3284
williamr@2
  3285
	@param  aFramesPerSecond
williamr@2
  3286
	        The number of frames per second.
williamr@2
  3287
williamr@2
  3288
	@since  7.0s
williamr@2
  3289
	*/
williamr@2
  3290
	virtual void MvcSetFrameRateL(TReal32 aFramesPerSecond)=0;
williamr@2
  3291
williamr@2
  3292
	/**
williamr@2
  3293
	Gets the frame rate of the clip.
williamr@2
  3294
williamr@2
  3295
	@param  aFramesPerSecond
williamr@2
  3296
	        The number of frames per second, filled in by the controller plugin.
williamr@2
  3297
williamr@2
  3298
	@since  7.0s
williamr@2
  3299
	*/
williamr@2
  3300
	virtual void MvcGetFrameRateL(TReal32& aFramesPerSecond)=0;
williamr@2
  3301
williamr@2
  3302
	/**
williamr@2
  3303
	Gets the supported sink video types.
williamr@2
  3304
williamr@2
  3305
	@param  aMimeType
williamr@2
  3306
	        The supported data types.
williamr@2
  3307
williamr@2
  3308
	@since  7.0s
williamr@2
  3309
	*/
williamr@2
  3310
	virtual void MvcGetVideoMimeTypeL(TDes8& aMimeType)=0;
williamr@2
  3311
	};
williamr@2
  3312
williamr@2
  3313
williamr@2
  3314
/**
williamr@2
  3315
@publishedAll
williamr@2
  3316
@released
williamr@2
  3317
williamr@2
  3318
Custom command parser class to be used by controller plugins wishing to support
williamr@2
  3319
video controller commands.
williamr@2
  3320
williamr@2
  3321
The controller plugin must be derived from MMMFVideoControllerCustomCommandImplementor
williamr@2
  3322
to use this class.
williamr@2
  3323
williamr@2
  3324
The controller plugin should create an object of this type and add it to the list of custom
williamr@2
  3325
command parsers in the controller framework.  See the following example code for details.
williamr@2
  3326
williamr@2
  3327
@code
williamr@2
  3328
void CMMFAudioController::ConstructL()
williamr@2
  3329
	{
williamr@2
  3330
	// Construct custom command parsers
williamr@2
  3331
	CMMFAudioPlayDeviceCustomCommandParser* audPlayDevParser = CMMFAudioPlayDeviceCustomCommandParser::NewL(*this);
williamr@2
  3332
	CleanupStack::PushL(audPlayDevParser);
williamr@2
  3333
	AddCustomCommandParserL(*audPlayDevParser); //parser now owned by controller framework
williamr@2
  3334
	CleanupStack::Pop();//audPlayDevParser
williamr@2
  3335
williamr@2
  3336
	CMMFAudioRecordDeviceCustomCommandParser* audRecDevParser = CMMFAudioRecordDeviceCustomCommandParser::NewL(*this);
williamr@2
  3337
	CleanupStack::PushL(audRecDevParser);
williamr@2
  3338
	AddCustomCommandParserL(*audRecDevParser); //parser now owned by controller framework
williamr@2
  3339
	CleanupStack::Pop();//audRecDevParser
williamr@2
  3340
williamr@2
  3341
etc.
williamr@2
  3342
	}
williamr@2
  3343
@endcode
williamr@2
  3344
williamr@2
  3345
@since 7.0s
williamr@2
  3346
williamr@2
  3347
*/
williamr@2
  3348
class CMMFVideoControllerCustomCommandParser : public CMMFCustomCommandParserBase
williamr@2
  3349
	{
williamr@2
  3350
public:
williamr@2
  3351
williamr@2
  3352
	/**
williamr@2
  3353
	Creates a new custom command parser capable of handling video controller commands.
williamr@2
  3354
williamr@2
  3355
	@param  aImplementor
williamr@2
  3356
	        A reference to the controller plugin that owns this new object.
williamr@2
  3357
williamr@2
  3358
	@return	A pointer to the object created.
williamr@2
  3359
williamr@2
  3360
	@since  7.0s
williamr@2
  3361
	*/
williamr@2
  3362
	IMPORT_C static CMMFVideoControllerCustomCommandParser* NewL(MMMFVideoControllerCustomCommandImplementor& aImplementor);
williamr@2
  3363
williamr@2
  3364
	/**
williamr@2
  3365
	Destructor.
williamr@2
  3366
williamr@2
  3367
	@since  7.0s
williamr@2
  3368
	*/
williamr@2
  3369
	IMPORT_C ~CMMFVideoControllerCustomCommandParser();
williamr@2
  3370
williamr@2
  3371
	/**
williamr@2
  3372
	Handles a request from the client. Called by the controller framework.
williamr@2
  3373
williamr@2
  3374
	@param  aMessage
williamr@2
  3375
	        The message to be handled.
williamr@2
  3376
williamr@2
  3377
	@since  7.0s
williamr@2
  3378
	*/
williamr@2
  3379
	void HandleRequest(TMMFMessage& aMessage);
williamr@2
  3380
private:
williamr@2
  3381
williamr@2
  3382
	/**
williamr@2
  3383
	Constructor.
williamr@2
  3384
williamr@2
  3385
	@param  aImplementor
williamr@2
  3386
	        A reference to the controller plugin that owns this new object.
williamr@2
  3387
williamr@2
  3388
	@since  7.0s
williamr@2
  3389
	*/
williamr@2
  3390
	CMMFVideoControllerCustomCommandParser(MMMFVideoControllerCustomCommandImplementor& aImplementor);
williamr@2
  3391
	// Internal request handling methods.
williamr@2
  3392
	void DoHandleRequestL(TMMFMessage& aMessage);
williamr@2
  3393
	TBool DoGetAudioCodecL(TMMFMessage& aMessage);
williamr@2
  3394
williamr@2
  3395
	TBool DoGetAudioBitRateL(TMMFMessage& aMessage);
williamr@2
  3396
	TBool DoGetVideoBitRateL(TMMFMessage& aMessage);
williamr@2
  3397
	TBool DoGetVideoFrameSizeL(TMMFMessage& aMessage);
williamr@2
  3398
	TBool DoSetFrameRateL(TMMFMessage& aMessage);
williamr@2
  3399
	TBool DoGetFrameRateL(TMMFMessage& aMessage);
williamr@2
  3400
	TBool DoGetVideoMimeTypeL(TMMFMessage& aMessage);
williamr@2
  3401
private:
williamr@2
  3402
	/** 
williamr@2
  3403
	The object that implements the video record controller interface 
williamr@2
  3404
	*/
williamr@2
  3405
	MMMFVideoControllerCustomCommandImplementor& iImplementor;
williamr@2
  3406
	};
williamr@2
  3407
williamr@2
  3408
/**
williamr@2
  3409
@publishedAll
williamr@2
  3410
@released
williamr@2
  3411
williamr@2
  3412
Custom command parser class to be used by controller plugins wishing to support video play 
williamr@2
  3413
controller commands.
williamr@2
  3414
williamr@2
  3415
The controller plugin must be derived from MMMFVideoPlayControllerCustomCommandImplementor to use 
williamr@2
  3416
this class. The controller plugin should create an object of this type and add it to the list of 
williamr@2
  3417
custom command parsers in the controller framework.
williamr@2
  3418
*/
williamr@2
  3419
class CMMFVideoPlayControllerCustomCommandParser : public CMMFCustomCommandParserBase
williamr@2
  3420
	{
williamr@2
  3421
public:
williamr@2
  3422
williamr@2
  3423
	/**
williamr@2
  3424
	Creates a new custom command parser capable of handling video controller commands.
williamr@2
  3425
williamr@2
  3426
	@param  aImplementor
williamr@2
  3427
	        A reference to the controller plugin that owns this new object.
williamr@2
  3428
williamr@2
  3429
	@return A pointer to the object created.
williamr@2
  3430
williamr@2
  3431
	@since  7.0s
williamr@2
  3432
	*/
williamr@2
  3433
	IMPORT_C static CMMFVideoPlayControllerCustomCommandParser* NewL(MMMFVideoPlayControllerCustomCommandImplementor& aImplementor);
williamr@2
  3434
williamr@2
  3435
	/**
williamr@2
  3436
	Destructor.
williamr@2
  3437
williamr@2
  3438
	@since  7.0s
williamr@2
  3439
	*/
williamr@2
  3440
	IMPORT_C ~CMMFVideoPlayControllerCustomCommandParser();
williamr@2
  3441
williamr@2
  3442
	/**
williamr@2
  3443
	Handles a request from the client. Called by the controller framework.
williamr@2
  3444
williamr@2
  3445
	@param  aMessage
williamr@2
  3446
	        The message to be handled.
williamr@2
  3447
williamr@2
  3448
	@since  7.0s
williamr@2
  3449
	*/
williamr@2
  3450
	void HandleRequest(TMMFMessage& aMessage);
williamr@2
  3451
private:
williamr@2
  3452
	/**
williamr@2
  3453
	Constructor.
williamr@2
  3454
williamr@2
  3455
	@param  aImplementor
williamr@2
  3456
	        A reference to the controller plugin that owns this new object.
williamr@2
  3457
williamr@2
  3458
	@since  7.0s
williamr@2
  3459
	*/
williamr@2
  3460
	CMMFVideoPlayControllerCustomCommandParser(MMMFVideoPlayControllerCustomCommandImplementor& aImplementor);
williamr@2
  3461
	// Internal request handling methods.
williamr@2
  3462
	void DoHandleRequestL(TMMFMessage& aMessage);
williamr@2
  3463
	TBool DoRequestFrameL(TMMFMessage& aMessage);
williamr@2
  3464
	TBool DoGetFrameL(TMMFMessage& aMessage);
williamr@2
  3465
	TBool DoSetDisplayWindowL(TMMFMessage& aMessage);
williamr@2
  3466
	TBool DoUpdateDisplayRegionL(TMMFMessage& aMessage);
williamr@2
  3467
	TBool DoGetAudioEnabledL(TMMFMessage& aMessage);
williamr@2
  3468
	TBool DoDirectScreenAccessEventL(TMMFMessage& aMessage);
williamr@2
  3469
	TBool DoPlayL(TMMFMessage& aMessage);
williamr@2
  3470
	TBool DoRefreshFrameL(TMMFMessage& aMessage);
williamr@2
  3471
	TBool DoGetLoadingProgressL(TMMFMessage& aMessage);
williamr@2
  3472
	TBool DoPrepareL(TMMFMessage& aMessage);
williamr@2
  3473
	TBool DoSetRotationL(TMMFMessage& aMessage);
williamr@2
  3474
	TBool DoGetRotationL(TMMFMessage& aMessage);
williamr@2
  3475
	TBool DoSetScaleFactorL(TMMFMessage& aMessage);
williamr@2
  3476
	TBool DoGetScaleFactorL(TMMFMessage& aMessage);
williamr@2
  3477
	TBool DoSetCropRegionL(TMMFMessage& aMessage);
williamr@2
  3478
	TBool DoGetCropRegionL(TMMFMessage& aMessage);
williamr@2
  3479
williamr@2
  3480
williamr@2
  3481
private:
williamr@2
  3482
	/** 
williamr@2
  3483
	The object that implements the video record controller interface 
williamr@2
  3484
	*/
williamr@2
  3485
	MMMFVideoPlayControllerCustomCommandImplementor& iImplementor;
williamr@2
  3486
	CMMFVideoFrameMessage* iVideoFrameMessage;
williamr@2
  3487
	};
williamr@2
  3488
williamr@2
  3489
/**
williamr@2
  3490
@publishedAll
williamr@2
  3491
@released
williamr@2
  3492
williamr@2
  3493
Custom command parser class to be used by controller plugins wishing to support video record 
williamr@2
  3494
controller commands.
williamr@2
  3495
williamr@2
  3496
The controller plugin must be derived from MMMFVideoRecordControllerCustomCommandImplementor to use 
williamr@2
  3497
this class. The controller plugin should create an object of this type and add it to the list of 
williamr@2
  3498
custom command parsers in the controller framework.
williamr@2
  3499
*/
williamr@2
  3500
class CMMFVideoRecordControllerCustomCommandParser : public CMMFCustomCommandParserBase
williamr@2
  3501
	{
williamr@2
  3502
public:
williamr@2
  3503
williamr@2
  3504
	/**
williamr@2
  3505
	Creates a new custom command parser capable of handling video controller commands.
williamr@2
  3506
williamr@2
  3507
	@param  aImplementor
williamr@2
  3508
	        A reference to the controller plugin that owns this new object.
williamr@2
  3509
williamr@2
  3510
	@return A pointer to the object created.
williamr@2
  3511
williamr@2
  3512
	@since  7.0s
williamr@2
  3513
	*/
williamr@2
  3514
	IMPORT_C static CMMFVideoRecordControllerCustomCommandParser* NewL(MMMFVideoRecordControllerCustomCommandImplementor& aImplementor);
williamr@2
  3515
williamr@2
  3516
	/**
williamr@2
  3517
	Destructor.
williamr@2
  3518
williamr@2
  3519
	@since  7.0s
williamr@2
  3520
	*/
williamr@2
  3521
	IMPORT_C ~CMMFVideoRecordControllerCustomCommandParser();
williamr@2
  3522
williamr@2
  3523
	/**
williamr@2
  3524
	Handles a request from the client. Called by the controller framework.
williamr@2
  3525
williamr@2
  3526
	@param  aMessage
williamr@2
  3527
	        The message to be handled.
williamr@2
  3528
williamr@2
  3529
	@since  7.0s
williamr@2
  3530
	*/
williamr@2
  3531
	void HandleRequest(TMMFMessage& aMessage);
williamr@2
  3532
private:
williamr@2
  3533
	/**
williamr@2
  3534
	Constructor.
williamr@2
  3535
williamr@2
  3536
	@param  aImplementor
williamr@2
  3537
	        A reference to the controller plugin that owns this new object.
williamr@2
  3538
williamr@2
  3539
	@since  7.0s
williamr@2
  3540
	*/
williamr@2
  3541
	CMMFVideoRecordControllerCustomCommandParser(MMMFVideoRecordControllerCustomCommandImplementor& aImplementor);
williamr@2
  3542
	// Internal request handling methods.
williamr@2
  3543
	void DoHandleRequestL(TMMFMessage& aMessage);
williamr@2
  3544
	TBool DoSetVideoFormatL(TMMFMessage& aMessage);
williamr@2
  3545
	TBool DoSetAudioBitRateL(TMMFMessage& aMessage);
williamr@2
  3546
	TBool DoSetVideoBitRateL(TMMFMessage& aMessage);
williamr@2
  3547
	TBool DoSetVideoCodecL(TMMFMessage& aMessage);
williamr@2
  3548
	TBool DoSetAudioCodecL(TMMFMessage& aMessage);
williamr@2
  3549
	TBool DoAddMetaDataEntryL(TMMFMessage& aMessage);
williamr@2
  3550
	TBool DoRemoveMetaDataEntryL(TMMFMessage& aMessage);
williamr@2
  3551
	TBool DoReplaceMetaDataEntryL(TMMFMessage& aMessage);
williamr@2
  3552
	TBool DoSetMaxFileSizeL(TMMFMessage& aMessage);
williamr@2
  3553
	TBool DoSetAudioEnabledL(TMMFMessage& aMessage);
williamr@2
  3554
	TBool DoSetVideoFrameSizeL(TMMFMessage& aMessage);
williamr@2
  3555
	TBool DoPrepareL(TMMFMessage& aMessage);
williamr@2
  3556
	TBool DoSetCameraHandleL(TMMFMessage& aMessage);
williamr@2
  3557
	TBool DoGetRecordTimeAvailableL(TMMFMessage& aMessage);
williamr@2
  3558
williamr@2
  3559
	TBool DoGetSupportedSinkAudioTypesL(TMMFMessage& aMessage);
williamr@2
  3560
	TBool DoGetSupportedSinkVideoTypesL(TMMFMessage& aMessage);
williamr@2
  3561
williamr@2
  3562
	TInt32 DoCreateBufFromCDesC8ArrayL(CDesC8Array& aArray);
williamr@2
  3563
	TBool DoCopyCDesC8ArrayDataL(TMMFMessage& aMessage);
williamr@2
  3564
williamr@2
  3565
	TBool DoCopyFourCCArrayDataL(TMMFMessage& aMessage);
williamr@2
  3566
	void DoCreateBufFromFourCCArrayL(RArray<TFourCC>& aArray);
williamr@2
  3567
	TBool DoGetAudioEnabledL(TMMFMessage& aMessage); // (INC23777)
williamr@2
  3568
williamr@2
  3569
private:
williamr@2
  3570
	/** 
williamr@2
  3571
	The object that implements the video record controller interface 
williamr@2
  3572
	*/
williamr@2
  3573
	MMMFVideoRecordControllerCustomCommandImplementor& iImplementor;
williamr@2
  3574
	CBufFlat* iDataCopyBuffer;
williamr@2
  3575
	};
williamr@2
  3576
williamr@2
  3577
williamr@2
  3578
williamr@2
  3579
/**
williamr@2
  3580
@publishedAll
williamr@2
  3581
@released
williamr@2
  3582
williamr@2
  3583
Client class to allow the client to specify DRM Intent.
williamr@2
  3584
williamr@2
  3585
The class uses the custom command function of the controller plugin, and removes the necessity
williamr@2
  3586
for the client to formulate the custom commands.
williamr@2
  3587
williamr@2
  3588
@since  7.0s
williamr@2
  3589
*/
williamr@2
  3590
class RMMFVideoDRMExtCustomCommands : public RMMFCustomCommandsBase
williamr@2
  3591
	{
williamr@2
  3592
public:
williamr@2
  3593
williamr@2
  3594
	/**
williamr@2
  3595
	Constructor.
williamr@2
  3596
williamr@2
  3597
	@param  aController
williamr@2
  3598
	        The client side controller object to be used by this custom command interface.
williamr@2
  3599
williamr@2
  3600
	@since  7.0s
williamr@2
  3601
	*/
williamr@2
  3602
	IMPORT_C RMMFVideoDRMExtCustomCommands(RMMFController& aController);
williamr@2
  3603
williamr@2
  3604
	/**
williamr@2
  3605
	Gets a frame previously requested from the controller.
williamr@2
  3606
williamr@2
  3607
	@param  aBitmap
williamr@2
  3608
	        The handle of bitmap to retrieve frame to.
williamr@2
  3609
	@param  aIntent
williamr@2
  3610
	        The DRM Intent to pass in.
williamr@2
  3611
	@param  aStatus
williamr@2
  3612
	        The active object to call back on.
williamr@2
  3613
	*/
williamr@2
  3614
	IMPORT_C void GetFrame(CFbsBitmap& aBitmap, ContentAccess::TIntent aIntent, TRequestStatus& aStatus);
williamr@2
  3615
williamr@2
  3616
private:
williamr@2
  3617
	TPckgBuf<TMMFVideoConfig> iConfigPackage;
williamr@2
  3618
	TPckgBuf<ContentAccess::TIntent> iIntentPackage;
williamr@2
  3619
	};
williamr@2
  3620
williamr@2
  3621
williamr@2
  3622
williamr@2
  3623
/**
williamr@2
  3624
@publishedAll
williamr@2
  3625
@released
williamr@2
  3626
williamr@2
  3627
Mixin class to be derived from controller plugins that could support the DRM Intent
williamr@2
  3628
custom commands.
williamr@2
  3629
*/
williamr@2
  3630
class MMMFVideoDRMExtCustomCommandImplementor
williamr@2
  3631
	{
williamr@2
  3632
public:
williamr@2
  3633
williamr@2
  3634
	/**
williamr@2
  3635
	Gets a frame previously requested from the controller.
williamr@2
  3636
williamr@2
  3637
	@param  aVideoFrame
williamr@2
  3638
	        The callback interface to allow the caller to retrieve a bitmap.
williamr@2
  3639
	@param  aIntent
williamr@2
  3640
	        The DRM Intent to supply.
williamr@2
  3641
	*/
williamr@2
  3642
	virtual void MvdeGetFrameL(MMMFVideoFrameMessage& aVideoFrame, ContentAccess::TIntent aIntent)=0;
williamr@2
  3643
	};
williamr@2
  3644
williamr@2
  3645
williamr@2
  3646
/**
williamr@2
  3647
@publishedAll
williamr@2
  3648
@released
williamr@2
  3649
williamr@2
  3650
Client class to provide DRM extensions to video controllers.
williamr@2
  3651
williamr@2
  3652
The class uses the custom command function of the controller plugin, and removes the necessity
williamr@2
  3653
for the client to formulate the custom commands.
williamr@2
  3654
*/
williamr@2
  3655
class CMMFVideoDRMExtCustomCommandParser : public CMMFCustomCommandParserBase
williamr@2
  3656
	{
williamr@2
  3657
public:
williamr@2
  3658
williamr@2
  3659
	/**
williamr@2
  3660
	Creates a new custom command parser capable of DRM Intent controller commands.
williamr@2
  3661
williamr@2
  3662
	@param  aImplementor
williamr@2
  3663
	        A reference to the controller plugin that owns this new object.
williamr@2
  3664
williamr@2
  3665
	@return A pointer to the object created.
williamr@2
  3666
williamr@2
  3667
	@since  7.0s
williamr@2
  3668
	*/
williamr@2
  3669
	IMPORT_C static CMMFVideoDRMExtCustomCommandParser* NewL(MMMFVideoDRMExtCustomCommandImplementor& aImplementor);
williamr@2
  3670
williamr@2
  3671
	/**
williamr@2
  3672
	Destructor.
williamr@2
  3673
williamr@2
  3674
	@since  7.0s
williamr@2
  3675
	*/
williamr@2
  3676
	IMPORT_C ~CMMFVideoDRMExtCustomCommandParser();
williamr@2
  3677
williamr@2
  3678
	/**
williamr@2
  3679
	Handles a request from the client. Called by the controller framework.
williamr@2
  3680
williamr@2
  3681
	@param  aMessage
williamr@2
  3682
	        The message to be handled.
williamr@2
  3683
williamr@2
  3684
	@since  7.0s
williamr@2
  3685
	*/
williamr@2
  3686
	void HandleRequest(TMMFMessage& aMessage);
williamr@2
  3687
williamr@2
  3688
private:
williamr@2
  3689
	/**
williamr@2
  3690
	Constructor.
williamr@2
  3691
williamr@2
  3692
	@param  aImplementor
williamr@2
  3693
	        A reference to the controller plugin that owns this new object.
williamr@2
  3694
	@since  7.0s
williamr@2
  3695
	*/
williamr@2
  3696
	CMMFVideoDRMExtCustomCommandParser(MMMFVideoDRMExtCustomCommandImplementor& aImplementor);
williamr@2
  3697
	// Internal request handling methods.
williamr@2
  3698
williamr@2
  3699
	void DoGetFrameL(TMMFMessage& aMessage);
williamr@2
  3700
williamr@2
  3701
private:
williamr@2
  3702
	MMMFVideoDRMExtCustomCommandImplementor& iImplementor;
williamr@2
  3703
	CMMFVideoFrameMessage* iVideoFrameMessage;
williamr@2
  3704
	};
williamr@2
  3705
williamr@2
  3706
/**
williamr@2
  3707
@publishedAll
williamr@2
  3708
@released
williamr@2
  3709
williamr@2
  3710
Client class to allow the client to register notification .
williamr@2
  3711
williamr@2
  3712
The class uses the custom command function of the controller plugin, and removes the necessity
williamr@2
  3713
for the client to formulate the custom commands.
williamr@2
  3714
williamr@2
  3715
@since  7.0s
williamr@2
  3716
*/
williamr@2
  3717
class RMMFResourceNotificationCustomCommands : public RMMFCustomCommandsBase
williamr@2
  3718
	{
williamr@2
  3719
public:
williamr@2
  3720
	/**
williamr@2
  3721
	Constructor.
williamr@2
  3722
williamr@2
  3723
	@param  aController
williamr@2
  3724
	        The client side controller object to be used by this custom command interface.
williamr@2
  3725
williamr@2
  3726
	@since  7.0s
williamr@2
  3727
	*/
williamr@2
  3728
	IMPORT_C RMMFResourceNotificationCustomCommands(RMMFController& aController);
williamr@2
  3729
	
williamr@2
  3730
	/**
williamr@2
  3731
	Registers the Event for Notification when resource is avaliable.
williamr@2
  3732
williamr@2
  3733
	@param aEventType
williamr@2
  3734
		The Event to notify the client.
williamr@2
  3735
		
williamr@2
  3736
	@param aNotificationRegistrationData
williamr@2
  3737
		Notification registration specific data.
williamr@2
  3738
williamr@2
  3739
	@return An error code indicating if the registration was successful. KErrNone on success, 
williamr@2
  3740
		otherwise another of the system-wide error codes.
williamr@2
  3741
	*/
williamr@2
  3742
	IMPORT_C TInt RegisterAsClient(TUid aEventType,const TDesC8& aNotificationRegistrationData);
williamr@2
  3743
	
williamr@2
  3744
	/**
williamr@2
  3745
	Cancels the registered notification event.
williamr@2
  3746
williamr@2
  3747
	@param  aEventType
williamr@2
  3748
		The Event to notify the client.
williamr@2
  3749
		
williamr@2
  3750
	@return An error code indicating if the cancel registration was successful. KErrNone on success, 
williamr@2
  3751
		otherwise another of the system-wide error codes.
williamr@2
  3752
	*/
williamr@2
  3753
	IMPORT_C TInt CancelRegisterAsClient(TUid aEventType);
williamr@2
  3754
	
williamr@2
  3755
	/**
williamr@2
  3756
	Gets the notification data for the event.
williamr@2
  3757
	
williamr@2
  3758
	@param  aEventType
williamr@2
  3759
		The Event to notify the client.
williamr@2
  3760
		
williamr@2
  3761
	@param aNotificationData
williamr@2
  3762
		The Notification data for the client to resume the play.
williamr@2
  3763
		
williamr@2
  3764
	@return An error code indicating if the get notification data was successful. KErrNone on success, 
williamr@2
  3765
		otherwise another of the system-wide error codes.
williamr@2
  3766
	*/
williamr@2
  3767
	IMPORT_C TInt GetResourceNotificationData(TUid aEventType,TDes8& aNotificationData);
williamr@2
  3768
	
williamr@2
  3769
	/**
williamr@2
  3770
	Waits for the client to resume the play even after the default timer expires.
williamr@2
  3771
williamr@2
  3772
	@return An error code indicating if the registration was successful. KErrNone on success, 
williamr@2
  3773
			otherwise any of the system-wide error codes.
williamr@2
  3774
	*/
williamr@2
  3775
	IMPORT_C TInt WillResumePlay();
williamr@2
  3776
	};
williamr@2
  3777
williamr@2
  3778
/**
williamr@2
  3779
@publishedAll
williamr@2
  3780
@released
williamr@2
  3781
williamr@2
  3782
Mixin class to be derived from controller plugins that could support the audio resource notification
williamr@2
  3783
custom commands.
williamr@2
  3784
*/
williamr@2
  3785
class MMMFResourceNotificationCustomCommandImplementor
williamr@2
  3786
	{
williamr@2
  3787
public:
williamr@2
  3788
	/**
williamr@2
  3789
	Registers the Event for Notification when resource is available.
williamr@2
  3790
williamr@2
  3791
	@param aEventType
williamr@2
  3792
		The event which the client is notified of.
williamr@2
  3793
		
williamr@2
  3794
	@param aNotificationRegistrationData
williamr@2
  3795
		Notification registration specific data, which has been reserved for future use.
williamr@2
  3796
		
williamr@2
  3797
	@leave	This method may leave with one of the system-wide error codes.  KErrNotReady if there is no
williamr@2
  3798
			data sink.
williamr@2
  3799
	*/
williamr@2
  3800
	virtual void MarnRegisterAsClientL(TUid aEventType,const TDesC8& aNotificationRegistrationData) = 0;
williamr@2
  3801
	
williamr@2
  3802
	/**
williamr@2
  3803
	Cancels the registered notification event.
williamr@2
  3804
williamr@2
  3805
	@param  aEventType
williamr@2
  3806
		The event to cancel.
williamr@2
  3807
		
williamr@2
  3808
	@leave This method may leave with one of the system-wide error codes.  KErrNotReady if there is no
williamr@2
  3809
			data sink.
williamr@2
  3810
	*/
williamr@2
  3811
	virtual void MarnCancelRegisterAsClientL(TUid aEventType) = 0;
williamr@2
  3812
	
williamr@2
  3813
	/**
williamr@2
  3814
	Gets the notification data for the event.
williamr@2
  3815
	
williamr@2
  3816
	@param  aEventType
williamr@2
  3817
		The event which the client is notified of.
williamr@2
  3818
		
williamr@2
  3819
	@param aNotificationData
williamr@2
  3820
		The Notification data for the client to resume playing.
williamr@2
  3821
		
williamr@2
  3822
	@leave This method may leave with one of the system-wide error codes.  KErrNotReady if there is no
williamr@2
  3823
			data sink, KErrArgument if unable to provide the notification data.
williamr@2
  3824
	*/
williamr@2
  3825
	virtual void MarnGetResourceNotificationDataL(TUid aEventType,TDes8& aNotificationData) = 0;
williamr@2
  3826
	
williamr@2
  3827
	/**
williamr@2
  3828
	Waits for the client to resume the play even after the default timer expires.
williamr@2
  3829
		
williamr@2
  3830
	@leave This method may leave with one of the system-wide error codes.  KErrNotReady if there is no
williamr@2
  3831
			data sink.
williamr@2
  3832
	*/
williamr@2
  3833
	virtual void MarnWillResumePlayL() = 0;
williamr@2
  3834
	};
williamr@2
  3835
williamr@2
  3836
/**
williamr@2
  3837
@publishedAll
williamr@2
  3838
@released
williamr@2
  3839
williamr@2
  3840
Client class to provide Audio resource notification controllers.
williamr@2
  3841
williamr@2
  3842
The class uses the custom command function of the controller plugin, and removes the necessity
williamr@2
  3843
for the client to formulate the custom commands.
williamr@2
  3844
*/
williamr@2
  3845
class CMMFResourceNotificationCustomCommandParser: public CMMFCustomCommandParserBase
williamr@2
  3846
	{
williamr@2
  3847
public:	
williamr@2
  3848
	/**
williamr@2
  3849
	Creates a new custom command parser capable of handling resource notification controller commands.
williamr@2
  3850
williamr@2
  3851
	@param  aImplementor
williamr@2
  3852
	        A reference to the controller plugin that owns this new object.
williamr@2
  3853
williamr@2
  3854
	@return A pointer to the object created.
williamr@2
  3855
williamr@2
  3856
	@since  7.0s
williamr@2
  3857
	*/
williamr@2
  3858
	IMPORT_C static CMMFResourceNotificationCustomCommandParser* NewL(MMMFResourceNotificationCustomCommandImplementor& aImplementor);
williamr@2
  3859
	
williamr@2
  3860
	/**
williamr@2
  3861
	Destructor.
williamr@2
  3862
williamr@2
  3863
	@since  7.0s
williamr@2
  3864
	*/
williamr@2
  3865
	IMPORT_C ~CMMFResourceNotificationCustomCommandParser();
williamr@2
  3866
	
williamr@2
  3867
	/**
williamr@2
  3868
	Handles a request from the client. Called by the controller framework.
williamr@2
  3869
williamr@2
  3870
	@param  aMessage
williamr@2
  3871
	        The message to be handled.
williamr@2
  3872
williamr@2
  3873
	@since  7.0s
williamr@2
  3874
	*/
williamr@2
  3875
	void HandleRequest(TMMFMessage& aMessage);
williamr@2
  3876
williamr@2
  3877
private:
williamr@2
  3878
	/**
williamr@2
  3879
	Constructor.
williamr@2
  3880
williamr@2
  3881
	@param  aImplementor
williamr@2
  3882
	        A reference to the controller plugin that owns this new object.
williamr@2
  3883
williamr@2
  3884
	@since  7.0s
williamr@2
  3885
	*/
williamr@2
  3886
	CMMFResourceNotificationCustomCommandParser(MMMFResourceNotificationCustomCommandImplementor& aImplementor);
williamr@2
  3887
	void DoHandleRequestL(TMMFMessage& aMessage);
williamr@2
  3888
	// Internal request handling methods.
williamr@2
  3889
	TBool DoRegisterAsClientL(TMMFMessage& aMessage);
williamr@2
  3890
	TBool DoCancelRegisterAsClientL(TMMFMessage& aMessage);
williamr@2
  3891
	TBool DoGetResourceNotificationDataL(TMMFMessage& aMessage);
williamr@2
  3892
	TBool DoWillResumePlayL(TMMFMessage& aMessage);
williamr@2
  3893
private:
williamr@2
  3894
    MMMFResourceNotificationCustomCommandImplementor& iImplementor;
williamr@2
  3895
	};
williamr@2
  3896
williamr@2
  3897
/**
williamr@2
  3898
@publishedPartner
williamr@2
  3899
@prototype
williamr@2
  3900
williamr@2
  3901
Client class to allow setting the initial screen for video display.
williamr@2
  3902
williamr@2
  3903
*/
williamr@2
  3904
class RMMFVideoSetInitScreenCustomCommands : public RMMFCustomCommandsBase
williamr@2
  3905
	{
williamr@2
  3906
public:
williamr@2
  3907
williamr@2
  3908
	/**
williamr@2
  3909
	Constructor.
williamr@2
  3910
williamr@2
  3911
	@param  aController
williamr@2
  3912
	        The client side controller object to be used by this custom command interface.
williamr@2
  3913
williamr@2
  3914
	*/
williamr@2
  3915
	IMPORT_C RMMFVideoSetInitScreenCustomCommands(RMMFController& aController);
williamr@2
  3916
williamr@2
  3917
	/**
williamr@2
  3918
	Sets the initial screen number for the video display on the controller.
williamr@2
  3919
williamr@2
  3920
	@param  aScreenNumber
williamr@2
  3921
	        The screen number
williamr@2
  3922
	
williamr@2
  3923
	*/
williamr@2
  3924
	IMPORT_C TInt SetInitScreenNumber(TInt aScreenNumber);
williamr@2
  3925
	};
williamr@2
  3926
williamr@2
  3927
williamr@2
  3928
williamr@2
  3929
/**
williamr@2
  3930
@publishedPartner
williamr@2
  3931
@prototype
williamr@2
  3932
williamr@2
  3933
Mixin class to be derived from controller plugins that could support setting the initial screen for displaying video.
williamr@2
  3934
*/
williamr@2
  3935
class MMMFVideoSetInitScreenCustomCommandImplementor
williamr@2
  3936
	{
williamr@2
  3937
public:
williamr@2
  3938
williamr@2
  3939
	/**
williamr@2
  3940
	Sets the initial screen number.
williamr@2
  3941
williamr@2
  3942
	@param  aScreenNumber
williamr@2
  3943
	        The screen number
williamr@2
  3944
	*/
williamr@2
  3945
	virtual void MvsdSetInitScreenNumber(TInt aScreenNumber)=0;
williamr@2
  3946
	};
williamr@2
  3947
williamr@2
  3948
williamr@2
  3949
/**
williamr@2
  3950
@publishedPartner
williamr@2
  3951
@prototype
williamr@2
  3952
williamr@2
  3953
Custom command parser class to be used by controller plugins wishing to support setting the initial screen
williamr@2
  3954
number for the video display.
williamr@2
  3955
williamr@2
  3956
The controller plugin should create an object of this type and add it to the list of custom command parsers 
williamr@2
  3957
in the controller framework. The controller plugin must be derived from MMMFVideoSetInitScreenCustomCommandImplementor 
williamr@2
  3958
to use this class. 
williamr@2
  3959
*/
williamr@2
  3960
class CMMFVideoSetInitScreenCustomCommandParser : public CMMFCustomCommandParserBase
williamr@2
  3961
	{
williamr@2
  3962
public:
williamr@2
  3963
williamr@2
  3964
	/**
williamr@2
  3965
	Creates a new custom command parser that supports setting screen device for video dusplay.
williamr@2
  3966
williamr@2
  3967
	@param  aImplementor
williamr@2
  3968
	        A reference to the controller plugin that owns this new object.
williamr@2
  3969
williamr@2
  3970
	@return A pointer to the object created.
williamr@2
  3971
williamr@2
  3972
	*/
williamr@2
  3973
	IMPORT_C static CMMFVideoSetInitScreenCustomCommandParser* NewL(MMMFVideoSetInitScreenCustomCommandImplementor& aImplementor);
williamr@2
  3974
williamr@2
  3975
	/**
williamr@2
  3976
	Destructor.
williamr@2
  3977
williamr@2
  3978
	*/
williamr@2
  3979
	IMPORT_C ~CMMFVideoSetInitScreenCustomCommandParser();
williamr@2
  3980
williamr@2
  3981
	/**
williamr@2
  3982
	Handles a request from the client. Called by the controller framework.
williamr@2
  3983
williamr@2
  3984
	@param  aMessage
williamr@2
  3985
	        The message to be handled.
williamr@2
  3986
williamr@2
  3987
	*/
williamr@2
  3988
	void HandleRequest(TMMFMessage& aMessage);
williamr@2
  3989
williamr@2
  3990
private:
williamr@2
  3991
	/**
williamr@2
  3992
	Constructor.
williamr@2
  3993
williamr@2
  3994
	@param  aImplementor
williamr@2
  3995
	        A reference to the controller plugin that owns this new object.
williamr@2
  3996
	*/
williamr@2
  3997
	CMMFVideoSetInitScreenCustomCommandParser(MMMFVideoSetInitScreenCustomCommandImplementor& aImplementor);
williamr@2
  3998
	void DoHandleRequestL(TMMFMessage& aMessage);
williamr@2
  3999
	TBool DoSetInitScreenNumberL(TMMFMessage& aMessage);
williamr@2
  4000
williamr@2
  4001
private:
williamr@2
  4002
	MMMFVideoSetInitScreenCustomCommandImplementor& iImplementor;
williamr@2
  4003
	};
williamr@2
  4004
williamr@2
  4005
williamr@2
  4006
/**
williamr@2
  4007
@publishedPartner
williamr@2
  4008
@prototype
williamr@2
  4009
williamr@2
  4010
Client class to allow setting and getting the pixel aspect ratio for video recording.
williamr@2
  4011
williamr@2
  4012
*/
williamr@2
  4013
class RMMFVideoPixelAspectRatioCustomCommands : public RMMFCustomCommandsBase
williamr@2
  4014
	{
williamr@2
  4015
public:
williamr@2
  4016
williamr@2
  4017
	/**
williamr@2
  4018
	Constructor.
williamr@2
  4019
williamr@2
  4020
	@param  aController
williamr@2
  4021
	        The client side controller object to be used by this custom command interface.
williamr@2
  4022
williamr@2
  4023
	*/
williamr@2
  4024
	IMPORT_C RMMFVideoPixelAspectRatioCustomCommands(RMMFController& aController);
williamr@2
  4025
williamr@2
  4026
	/**
williamr@2
  4027
	Sets the pixel aspect ratio for the video recording on the controller.
williamr@2
  4028
williamr@2
  4029
	@param  aAspectRatio
williamr@2
  4030
	        The new pixel aspect ratio. The default pixel aspect ratio is 1:1.
williamr@2
  4031
	
williamr@2
  4032
	@return One of the system-wide error codes.
williamr@2
  4033
	
williamr@2
  4034
	*/
williamr@2
  4035
	IMPORT_C TInt SetPixelAspectRatio(const TVideoAspectRatio& aAspectRatio);
williamr@2
  4036
	
williamr@2
  4037
	/**
williamr@2
  4038
	Gets the current pixel aspect ratio for the video recording on the controller.
williamr@2
  4039
williamr@2
  4040
	@param  aAspectRatio
williamr@2
  4041
	        The current video pixel aspect ratio.
williamr@2
  4042
williamr@2
  4043
	@return One of the system-wide error codes.	
williamr@2
  4044
	*/
williamr@2
  4045
	IMPORT_C TInt GetPixelAspectRatio(TVideoAspectRatio& aAspectRatio) const;
williamr@2
  4046
	
williamr@2
  4047
	/**
williamr@2
  4048
	Gets the list of supported pixel aspect ratios for the video recording on the controller.
williamr@2
  4049
williamr@2
  4050
	@param  aAspectRatios
williamr@2
  4051
	        The supported pixel aspect ratios.
williamr@2
  4052
	
williamr@2
  4053
	@leave	This method may leave with one of the system-wide error codes.
williamr@2
  4054
	*/
williamr@2
  4055
	IMPORT_C void GetSupportedPixelAspectRatiosL(RArray<TVideoAspectRatio>& aAspectRatios) const;
williamr@2
  4056
williamr@2
  4057
private:
williamr@2
  4058
	void DoGetVideoPixelAspectRatioArrayL(RArray<TVideoAspectRatio>& aArray, TMMFVideoPixelAspectRatioMessages aIpc) const;
williamr@2
  4059
	};
williamr@2
  4060
williamr@2
  4061
williamr@2
  4062
/**
williamr@2
  4063
@publishedPartner
williamr@2
  4064
@prototype
williamr@2
  4065
williamr@2
  4066
Mixin class to be derived from controller plug-ins that could support setting and getting the pixel aspect ratio for video recording. 
williamr@2
  4067
*/
williamr@2
  4068
class MMMFVideoPixelAspectRatioCustomCommandImplementor
williamr@2
  4069
	{
williamr@2
  4070
public:
williamr@2
  4071
williamr@2
  4072
	/**
williamr@2
  4073
	Sets the pixel aspect ratio.
williamr@2
  4074
williamr@2
  4075
	@param  aAspectRatio
williamr@2
  4076
	        The pixel aspect ratio to use.
williamr@2
  4077
	*/
williamr@2
  4078
	virtual void MvparSetPixelAspectRatioL(const TVideoAspectRatio& aAspectRatio) = 0;
williamr@2
  4079
williamr@2
  4080
	/**
williamr@2
  4081
	Gets the current pixel aspect ratio.
williamr@2
  4082
williamr@2
  4083
	@param  aAspectRatio
williamr@2
  4084
	        The current pixel aspect ratio.
williamr@2
  4085
	*/
williamr@2
  4086
	virtual void MvparGetPixelAspectRatioL(TVideoAspectRatio& aAspectRatio) = 0;
williamr@2
  4087
	
williamr@2
  4088
	/**
williamr@2
  4089
	Gets the list of supported pixel aspect ratios.
williamr@2
  4090
williamr@2
  4091
	@param  aAspectRatios
williamr@2
  4092
	        The list of supported pixel aspect ratios.
williamr@2
  4093
	*/
williamr@2
  4094
	virtual void MvparGetSupportedPixelAspectRatiosL(RArray<TVideoAspectRatio>& aAspectRatios) = 0;
williamr@2
  4095
	};
williamr@2
  4096
williamr@2
  4097
williamr@2
  4098
/**
williamr@2
  4099
@publishedPartner
williamr@2
  4100
@prototype
williamr@2
  4101
williamr@2
  4102
Custom command parser class to be used by controller plug-ins wishing to support setting and getting the pixel aspect 
williamr@2
  4103
ratio for the video recording.
williamr@2
  4104
williamr@2
  4105
The controller plug-in should create an object of this type and add it to the list of custom command parsers 
williamr@2
  4106
in the controller framework. The controller plug-in must be derived from MMMFVideoPixelAspectRatioCustomCommandImplementor 
williamr@2
  4107
to use this class. 
williamr@2
  4108
*/
williamr@2
  4109
class CMMFVideoPixelAspectRatioCustomCommandParser : public CMMFCustomCommandParserBase
williamr@2
  4110
	{
williamr@2
  4111
public:
williamr@2
  4112
williamr@2
  4113
	/**
williamr@2
  4114
	Creates a new custom command parser that supports setting and getting pixel aspect ratio for video recording.
williamr@2
  4115
williamr@2
  4116
	@param  aImplementor
williamr@2
  4117
	        A reference to the controller plug-in that owns this new object.
williamr@2
  4118
williamr@2
  4119
	@return A pointer to the object created.
williamr@2
  4120
williamr@2
  4121
	*/
williamr@2
  4122
	IMPORT_C static CMMFVideoPixelAspectRatioCustomCommandParser* NewL(MMMFVideoPixelAspectRatioCustomCommandImplementor& aImplementor);
williamr@2
  4123
williamr@2
  4124
	/**
williamr@2
  4125
	Destructor.
williamr@2
  4126
williamr@2
  4127
	*/
williamr@2
  4128
	IMPORT_C ~CMMFVideoPixelAspectRatioCustomCommandParser();
williamr@2
  4129
williamr@2
  4130
	/**
williamr@2
  4131
	Handles a request from the client. Called by the controller framework.
williamr@2
  4132
williamr@2
  4133
	@param  aMessage
williamr@2
  4134
	        The message to be handled.
williamr@2
  4135
williamr@2
  4136
	*/
williamr@2
  4137
	void HandleRequest(TMMFMessage& aMessage);
williamr@2
  4138
williamr@2
  4139
private:
williamr@2
  4140
	CMMFVideoPixelAspectRatioCustomCommandParser(MMMFVideoPixelAspectRatioCustomCommandImplementor& aImplementor);
williamr@2
  4141
	void DoHandleRequestL(TMMFMessage& aMessage);
williamr@2
  4142
	TBool DoSetPixelAspectRatioL(TMMFMessage& aMessage);
williamr@2
  4143
	TBool DoGetPixelAspectRatioL(TMMFMessage& aMessage);
williamr@2
  4144
	TBool DoGetSupportedPixelAspectRatiosL(TMMFMessage& aMessage);
williamr@2
  4145
	TBool DoCopyArrayDataL(TMMFMessage& aMessage);
williamr@2
  4146
	void DoCreateBufFromVideoAspectRatioArrayL(RArray<TVideoAspectRatio>& aArray);
williamr@2
  4147
williamr@2
  4148
private:
williamr@2
  4149
	MMMFVideoPixelAspectRatioCustomCommandImplementor& iImplementor;
williamr@2
  4150
	
williamr@2
  4151
	CBufFlat* iDataCopyBuffer;
williamr@2
  4152
	};
williamr@2
  4153
williamr@2
  4154
williamr@2
  4155
/**
williamr@2
  4156
@publishedPartner
williamr@2
  4157
@prototype
williamr@2
  4158
williamr@2
  4159
Client class to allow the audio sampling rate and channels configuration for video recording.
williamr@2
  4160
williamr@2
  4161
*/
williamr@2
  4162
class RMMFVideoAudioSamplingRateAndChannelConfigCustomCommands : public RMMFCustomCommandsBase
williamr@2
  4163
	{
williamr@2
  4164
public:
williamr@2
  4165
williamr@2
  4166
	/**
williamr@2
  4167
	Constructor.
williamr@2
  4168
williamr@2
  4169
	@param  aController
williamr@2
  4170
	        The client side controller object to be used by this custom command interface.
williamr@2
  4171
williamr@2
  4172
	*/
williamr@2
  4173
	IMPORT_C RMMFVideoAudioSamplingRateAndChannelConfigCustomCommands(RMMFController& aController);
williamr@2
  4174
williamr@2
  4175
	/**
williamr@2
  4176
	Sets the number of audio channels to record (1 for mono, 2 for stereo).
williamr@2
  4177
williamr@2
  4178
	@param  aChannels
williamr@2
  4179
	        The number of audio channels to record.
williamr@2
  4180
williamr@2
  4181
	@return One of the system-wide error codes.
williamr@2
  4182
	
williamr@2
  4183
	*/
williamr@2
  4184
	IMPORT_C TInt SetAudioChannels(const TUint aChannels);
williamr@2
  4185
williamr@2
  4186
	/**
williamr@2
  4187
	Gets the current number of audio channels to record (1 for mono, 2 for stereo).
williamr@2
  4188
williamr@2
  4189
	@param  aChannels
williamr@2
  4190
	        The current number of audio channels to record.
williamr@2
  4191
williamr@2
  4192
	@return One of the system-wide error codes.
williamr@2
  4193
	
williamr@2
  4194
	*/
williamr@2
  4195
	IMPORT_C TInt GetAudioChannels(TUint& aChannels) const;
williamr@2
  4196
williamr@2
  4197
	/**
williamr@2
  4198
	Gets the list of supported number of audio channels for video recording.
williamr@2
  4199
williamr@2
  4200
	@param  aChannels
williamr@2
  4201
	        The supported numbers of audio channels.
williamr@2
  4202
	
williamr@2
  4203
	@leave	This method may leave with one of the system-wide error codes.
williamr@2
  4204
	*/
williamr@2
  4205
	IMPORT_C void GetSupportedAudioChannelsL(RArray<TUint>& aChannels) const;
williamr@2
  4206
	
williamr@2
  4207
	/**
williamr@2
  4208
	Sets the audio sample rate for video recording.
williamr@2
  4209
williamr@2
  4210
	@param  aSampleRate
williamr@2
  4211
	        The sample rate for audio recording.
williamr@2
  4212
williamr@2
  4213
	@return One of the system-wide error codes.
williamr@2
  4214
	
williamr@2
  4215
	*/
williamr@2
  4216
	IMPORT_C TInt SetAudioSampleRate(const TUint aSampleRate);
williamr@2
  4217
williamr@2
  4218
	/**
williamr@2
  4219
	Gets the current audio sample rate for recording.
williamr@2
  4220
williamr@2
  4221
	@param  aSampleRate
williamr@2
  4222
	        The current audio sample rate for recording.
williamr@2
  4223
williamr@2
  4224
	@return One of the system-wide error codes.
williamr@2
  4225
	
williamr@2
  4226
	*/
williamr@2
  4227
	IMPORT_C TInt GetAudioSampleRate(TUint& aSampleRate) const;
williamr@2
  4228
williamr@2
  4229
	/**
williamr@2
  4230
	Gets the list of supported audio sample rates for video recording.
williamr@2
  4231
williamr@2
  4232
	@param  aSampleRates
williamr@2
  4233
	        The supported audio sample rates.
williamr@2
  4234
	
williamr@2
  4235
	@leave	This method may leave with one of the system-wide error codes.
williamr@2
  4236
	*/
williamr@2
  4237
	IMPORT_C void GetSupportedAudioSampleRatesL(RArray<TUint>& aSampleRates) const;
williamr@2
  4238
	
williamr@2
  4239
private:
williamr@2
  4240
	void DoGetUintArrayL(RArray<TUint>& aArray, TMMFVideoAudioSamplingRateAndChannelConfigMessages aIpc) const;
williamr@2
  4241
	};
williamr@2
  4242
williamr@2
  4243
williamr@2
  4244
/**
williamr@2
  4245
@publishedPartner
williamr@2
  4246
@prototype
williamr@2
  4247
williamr@2
  4248
Mixin class to be derived from controller plug-ins that could support the audio sampling rate and channels configuration. 
williamr@2
  4249
*/
williamr@2
  4250
class MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor
williamr@2
  4251
	{
williamr@2
  4252
public:
williamr@2
  4253
williamr@2
  4254
	/**
williamr@2
  4255
	Sets the number of audio channels.
williamr@2
  4256
williamr@2
  4257
	@param  aChannels
williamr@2
  4258
	        The number of audio channels to use.
williamr@2
  4259
	*/
williamr@2
  4260
	virtual void MvasrccSetAudioChannelsL(const TUint aChannels) = 0;
williamr@2
  4261
williamr@2
  4262
	/**
williamr@2
  4263
	Gets the current number of audio channels.
williamr@2
  4264
williamr@2
  4265
	@param  aChannels
williamr@2
  4266
	        The current number of audio channels.
williamr@2
  4267
	*/
williamr@2
  4268
	virtual void MvasrccGetAudioChannelsL(TUint& aChannels) = 0;
williamr@2
  4269
williamr@2
  4270
	/**
williamr@2
  4271
	Gets the list of supported number of audio channels.
williamr@2
  4272
williamr@2
  4273
	@param  aChannels
williamr@2
  4274
	        The list of supported number of audio channels.
williamr@2
  4275
	*/
williamr@2
  4276
	virtual void MvasrccGetSupportedAudioChannelsL(RArray<TUint>& aChannels) = 0;
williamr@2
  4277
	
williamr@2
  4278
	/**
williamr@2
  4279
	Sets the audio sample rate.
williamr@2
  4280
williamr@2
  4281
	@param  aSampleRate
williamr@2
  4282
	        The audio sample rate to use.
williamr@2
  4283
	*/
williamr@2
  4284
	virtual void MvasrccSetAudioSampleRateL(const TUint aSampleRate) = 0;
williamr@2
  4285
williamr@2
  4286
	/**
williamr@2
  4287
	Gets the current audio sample rate.
williamr@2
  4288
williamr@2
  4289
	@param  aSampleRate
williamr@2
  4290
	        The current audio sample rate.
williamr@2
  4291
	*/
williamr@2
  4292
	virtual void MvasrccGetAudioSampleRateL(TUint& aSampleRate) = 0;
williamr@2
  4293
williamr@2
  4294
	/**
williamr@2
  4295
	Gets the list of supported audio sample rates.
williamr@2
  4296
williamr@2
  4297
	@param  aSampleRates
williamr@2
  4298
	        The list of supported audio sample rates.
williamr@2
  4299
	*/
williamr@2
  4300
	virtual void MvasrccGetSupportedAudioSampleRatesL(RArray<TUint>& aSampleRates) = 0;
williamr@2
  4301
	};
williamr@2
  4302
williamr@2
  4303
/**
williamr@2
  4304
@publishedPartner
williamr@2
  4305
@prototype
williamr@2
  4306
williamr@2
  4307
Custom command parser class to be used by controller plug-ins wishing to support the audio sampling rate and channels
williamr@2
  4308
configuration for the video recording.
williamr@2
  4309
williamr@2
  4310
The controller plug-in should create an object of this type and add it to the list of custom command parsers 
williamr@2
  4311
in the controller framework. The controller plug-in must be derived from MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor 
williamr@2
  4312
to use this class. 
williamr@2
  4313
*/
williamr@2
  4314
class CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser : public CMMFCustomCommandParserBase
williamr@2
  4315
	{
williamr@2
  4316
public:
williamr@2
  4317
williamr@2
  4318
	/**
williamr@2
  4319
	Creates a new custom command parser that supports the audio sampling rate and channels configuration for video recording.
williamr@2
  4320
williamr@2
  4321
	@param  aImplementor
williamr@2
  4322
	        A reference to the controller plug-in that owns this new object.
williamr@2
  4323
williamr@2
  4324
	@return A pointer to the object created.
williamr@2
  4325
williamr@2
  4326
	*/
williamr@2
  4327
	IMPORT_C static CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser* NewL(MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& aImplementor);
williamr@2
  4328
williamr@2
  4329
	/**
williamr@2
  4330
	Destructor.
williamr@2
  4331
williamr@2
  4332
	*/
williamr@2
  4333
	IMPORT_C ~CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser();
williamr@2
  4334
williamr@2
  4335
	/**
williamr@2
  4336
	Handles a request from the client. Called by the controller framework.
williamr@2
  4337
williamr@2
  4338
	@param  aMessage
williamr@2
  4339
	        The message to be handled.
williamr@2
  4340
williamr@2
  4341
	*/
williamr@2
  4342
	void HandleRequest(TMMFMessage& aMessage);
williamr@2
  4343
williamr@2
  4344
private:
williamr@2
  4345
	CMMFVideoAudioSamplingRateAndChannelConfigCustomCommandParser(MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& aImplementor);
williamr@2
  4346
	void DoHandleRequestL(TMMFMessage& aMessage);
williamr@2
  4347
	TBool DoSetAudioChannelsL(TMMFMessage& aMessage);
williamr@2
  4348
	TBool DoGetAudioChannelsL(TMMFMessage& aMessage);
williamr@2
  4349
	TBool DoGetSupportedAudioChannelsL(TMMFMessage& aMessage);
williamr@2
  4350
	
williamr@2
  4351
	TBool DoSetAudioSampleRateL(TMMFMessage& aMessage);
williamr@2
  4352
	TBool DoGetAudioSampleRateL(TMMFMessage& aMessage);
williamr@2
  4353
	TBool DoGetSupportedAudioSampleRatesL(TMMFMessage& aMessage);
williamr@2
  4354
	
williamr@2
  4355
	TBool DoCopyArrayDataL(TMMFMessage& aMessage);
williamr@2
  4356
	
williamr@2
  4357
	void DoCreateBufFromUintArrayL(RArray<TUint>& aArray);
williamr@2
  4358
williamr@2
  4359
private:
williamr@2
  4360
	MMMFVideoAudioSamplingRateAndChannelConfigCustomCommandImplementor& iImplementor;
williamr@2
  4361
	
williamr@2
  4362
	CBufFlat* iDataCopyBuffer;
williamr@2
  4363
	};
williamr@2
  4364
williamr@2
  4365
/**
williamr@2
  4366
@publishedPartner
williamr@2
  4367
@prototype
williamr@2
  4368
*/
williamr@2
  4369
const TUid KUidInterfaceMMFVideoPlayExt = {0x10283437};	
williamr@2
  4370
williamr@2
  4371
/**
williamr@2
  4372
Mixin class to be derived from controller plug-ins that could support
williamr@2
  4373
play velocity, enabling/disabling audio/video, and auto scaling.
williamr@2
  4374
williamr@2
  4375
@publishedPartner
williamr@2
  4376
@prototype
williamr@2
  4377
*/	
williamr@2
  4378
class MMMFVideoPlayControllerExtCustomCommandImplementor
williamr@2
  4379
	{
williamr@2
  4380
public:
williamr@2
  4381
williamr@2
  4382
	/**
williamr@2
  4383
	Sets play velocity. 
williamr@2
  4384
	Behaviour is same as CVideoPlayerUtility::SetPlayVelocityL
williamr@2
  4385
	
williamr@2
  4386
	@see CVideoPlayerUtility::SetPlayVelocityL
williamr@2
  4387
	*/
williamr@2
  4388
	virtual void MvpecSetPlayVelocityL(TInt aVelocity)=0;
williamr@2
  4389
	
williamr@2
  4390
	/**
williamr@2
  4391
	Gets play velocity.
williamr@2
  4392
	Behaviour is same as CVideoPlayerUtility::PlayVelocityL	
williamr@2
  4393
	
williamr@2
  4394
	@see CVideoPlayerUtility::PlayVelocityL
williamr@2
  4395
	*/
williamr@2
  4396
	virtual TInt MvpecPlayVelocityL()=0;
williamr@2
  4397
	
williamr@2
  4398
	/**
williamr@2
  4399
	Steps through frames in pause mode.
williamr@2
  4400
	Behaviour is same as CVideoPlayerUtility::StepFrameL	
williamr@2
  4401
		
williamr@2
  4402
	@see CVideoPlayerUtility::StepFrameL
williamr@2
  4403
	*/
williamr@2
  4404
	virtual void MvpecStepFrameL(TInt aStep)=0;
williamr@2
  4405
	
williamr@2
  4406
	/**
williamr@2
  4407
	Gets play rate capabilities.
williamr@2
  4408
	Behaviour is same as CVideoPlayerUtility::GetPlayRateCapabilitiesL	
williamr@2
  4409
		
williamr@2
  4410
	@see CVideoPlayerUtility::GetPlayRateCapabilitiesL
williamr@2
  4411
	*/
williamr@2
  4412
	virtual void MvpecGetPlayRateCapabilitiesL(TVideoPlayRateCapabilities& aCapabilities)=0;
williamr@2
  4413
	
williamr@2
  4414
	/**
williamr@2
  4415
	Enables/Disables video playback.
williamr@2
  4416
	Behaviour is same as CVideoPlayerUtility::SetVideoEnabledL	
williamr@2
  4417
	
williamr@2
  4418
	@see CVideoPlayerUtility::SetVideoEnabledL
williamr@2
  4419
	*/
williamr@2
  4420
	virtual void MvpecSetVideoEnabledL(TBool aVideoEnabled)=0;
williamr@2
  4421
	
williamr@2
  4422
	/**
williamr@2
  4423
    Queries whether video playback is currently enabled or not.
williamr@2
  4424
	Behaviour is same as CVideoPlayerUtility::VideoEnabledL	
williamr@2
  4425
	
williamr@2
  4426
	@see CVideoPlayerUtility::VideoEnabledL
williamr@2
  4427
	*/
williamr@2
  4428
	virtual TBool MvpecVideoEnabledL()=0;
williamr@2
  4429
	
williamr@2
  4430
	/**
williamr@2
  4431
	Enables or disables audio playback.
williamr@2
  4432
	Behaviour is same as CVideoPlayerUtility::SetAudioEnabled	
williamr@2
  4433
	
williamr@2
  4434
	@see CVideoPlayerUtility::SetAudioEnabled
williamr@2
  4435
	*/
williamr@2
  4436
	virtual void MvpecSetAudioEnabledL(TBool aAudioEnabled)=0;
williamr@2
  4437
	
williamr@2
  4438
	/**
williamr@2
  4439
	Sets Auto scale mode.
williamr@2
  4440
	Behaviour is same as CVideoPlayerUtility::SetAutoScaleL	
williamr@2
  4441
	
williamr@2
  4442
	@see CVideoPlayerUtility::SetAutoScaleL
williamr@2
  4443
	*/
williamr@2
  4444
	virtual void MvpecSetAutoScaleL(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos)=0;
williamr@2
  4445
	};
williamr@2
  4446
williamr@2
  4447
/**
williamr@2
  4448
Used for commands between RMMFVideoPlayControllerExtCustomCommands and 
williamr@2
  4449
CMMFVideoPlayControllerExtCustomCommandParser classes.
williamr@2
  4450
williamr@2
  4451
@internalComponent
williamr@2
  4452
*/
williamr@2
  4453
enum TMMFVideoPlayControllerExtCustomCommandConfigMessages
williamr@2
  4454
	{
williamr@2
  4455
	EMMFVideoPlayControllerSetPlayVelocity = 0,
williamr@2
  4456
	EMMFVideoPlayControllerPlayVelocity,
williamr@2
  4457
	EMMFVideoPlayControllerStepFrame,
williamr@2
  4458
	EMMFVideoPlayControllerGetPlayRateCapabilities,
williamr@2
  4459
	EMMFVideoPlayControllerSetVideoEnabled,
williamr@2
  4460
	EMMFVideoPlayControllerVideoEnabled,
williamr@2
  4461
	EMMFVideoPlayControllerSetAudioEnabled,
williamr@2
  4462
	EMMFVideoPlayControllerSetAutoScale
williamr@2
  4463
	};
williamr@2
  4464
/**
williamr@2
  4465
@internalComponent
williamr@2
  4466
*/
williamr@2
  4467
class TMMFVideoPlayAutoScaleParams
williamr@2
  4468
	{
williamr@2
  4469
public:
williamr@2
  4470
	TAutoScaleType iScaleType;
williamr@2
  4471
	TInt iHorizPos;
williamr@2
  4472
	TInt iVertPos;
williamr@2
  4473
	};
williamr@2
  4474
	
williamr@2
  4475
/**
williamr@2
  4476
Custom command parser class to be used by controller plug-ins wishing to support play velocity, 
williamr@2
  4477
enabling/disabling audio/video, and auto scaling.
williamr@2
  4478
williamr@2
  4479
The controller plug-in should create an object of this type and add it to the list of custom command parsers 
williamr@2
  4480
in the controller framework. The controller plug-in must be derived from MMMFVideoPlayControllerExtCustomCommandImplementor 
williamr@2
  4481
to use this class. 
williamr@2
  4482
williamr@2
  4483
@publishedPartner
williamr@2
  4484
@prototype
williamr@2
  4485
*/
williamr@2
  4486
class CMMFVideoPlayControllerExtCustomCommandParser : public CMMFCustomCommandParserBase
williamr@2
  4487
	{
williamr@2
  4488
public:
williamr@2
  4489
williamr@2
  4490
	/**
williamr@2
  4491
	Creates a new custom command parser that supports the video rate control and auto scaling.
williamr@2
  4492
williamr@2
  4493
	@param  aImplementor
williamr@2
  4494
	        A reference to the controller plug-in that owns this new object.
williamr@2
  4495
williamr@2
  4496
	@return A pointer to the object created.
williamr@2
  4497
williamr@2
  4498
	*/
williamr@2
  4499
	IMPORT_C static CMMFVideoPlayControllerExtCustomCommandParser* NewL(MMMFVideoPlayControllerExtCustomCommandImplementor& aImplementor);
williamr@2
  4500
williamr@2
  4501
	/**
williamr@2
  4502
	Destructor.
williamr@2
  4503
williamr@2
  4504
	*/
williamr@2
  4505
	IMPORT_C ~CMMFVideoPlayControllerExtCustomCommandParser();
williamr@2
  4506
williamr@2
  4507
	/**
williamr@2
  4508
	Handles a request from the client. Called by the controller framework.
williamr@2
  4509
williamr@2
  4510
	@param  aMessage
williamr@2
  4511
	        The message to be handled.
williamr@2
  4512
williamr@2
  4513
	*/
williamr@2
  4514
	void HandleRequest(TMMFMessage& aMessage);
williamr@2
  4515
williamr@2
  4516
private:
williamr@2
  4517
	CMMFVideoPlayControllerExtCustomCommandParser(MMMFVideoPlayControllerExtCustomCommandImplementor& aImplementor);
williamr@2
  4518
	void DoHandleRequestL(TMMFMessage& aMessage);
williamr@2
  4519
	TBool DoSetPlayVelocityL(TMMFMessage& aMessage);
williamr@2
  4520
	TBool DoPlayVelocityL(TMMFMessage& aMessage);
williamr@2
  4521
	TBool DoStepFrameL(TMMFMessage& aMessage);
williamr@2
  4522
	TBool DoGetPlayRateCapabilitiesL(TMMFMessage& aMessage);
williamr@2
  4523
	TBool DoSetVideoEnabledL(TMMFMessage& aMessage);
williamr@2
  4524
	TBool DoVideoEnabledL(TMMFMessage& aMessage);
williamr@2
  4525
	TBool DoSetAudioEnabledL(TMMFMessage& aMessage);
williamr@2
  4526
	TBool DoSetAutoScaleL(TMMFMessage& aMessage);
williamr@2
  4527
private:
williamr@2
  4528
	MMMFVideoPlayControllerExtCustomCommandImplementor& iImplementor;
williamr@2
  4529
	};
williamr@2
  4530
williamr@2
  4531
/**
williamr@2
  4532
Resource class to be used by player utility for sending custom commands.
williamr@2
  4533
williamr@2
  4534
@publishedPartner
williamr@2
  4535
@prototype
williamr@2
  4536
*/	
williamr@2
  4537
class RMMFVideoPlayControllerExtCustomCommands: public RMMFCustomCommandsBase
williamr@2
  4538
	{
williamr@2
  4539
public:
williamr@2
  4540
	/**
williamr@2
  4541
	Constructor.
williamr@2
  4542
williamr@2
  4543
	@param  aController
williamr@2
  4544
	        The client side controller object to be used by this custom command interface.
williamr@2
  4545
	*/
williamr@2
  4546
	IMPORT_C RMMFVideoPlayControllerExtCustomCommands(RMMFController& aController);
williamr@2
  4547
	
williamr@2
  4548
	/**
williamr@2
  4549
	Sets play velocity.
williamr@2
  4550
	Behaviour is same as CVideoPlayerUtility::SetPlayVelocityL
williamr@2
  4551
		
williamr@2
  4552
	@param  aVelocity 
williamr@2
  4553
			Velocity of the playback.
williamr@2
  4554
williamr@2
  4555
	@return One of the system-wide error codes.	
williamr@2
  4556
williamr@2
  4557
	@see CVideoPlayerUtility::SetPlayVelocityL	
williamr@2
  4558
	*/
williamr@2
  4559
	IMPORT_C TInt SetPlayVelocity(TInt aVelocity);
williamr@2
  4560
williamr@2
  4561
	/**
williamr@2
  4562
	Gets play velocity.
williamr@2
  4563
	Behaviour is same as CVideoPlayerUtility::PlayVelocityL	
williamr@2
  4564
williamr@2
  4565
	@param  aVelocity 
williamr@2
  4566
			Velocity of the playback.
williamr@2
  4567
williamr@2
  4568
	@return One of the system-wide error codes.	
williamr@2
  4569
		
williamr@2
  4570
	@see CVideoPlayerUtility::PlayVelocityL
williamr@2
  4571
	*/
williamr@2
  4572
	IMPORT_C TInt PlayVelocity(TInt &aVelocity)const;
williamr@2
  4573
williamr@2
  4574
	/**
williamr@2
  4575
	Steps through frames in pause mode.
williamr@2
  4576
	Behaviour is same as CVideoPlayerUtility::StepFrameL	
williamr@2
  4577
williamr@2
  4578
	@param  aStep 
williamr@2
  4579
			Count indicating number of frames to step playback position.
williamr@2
  4580
williamr@2
  4581
	@return One of the system-wide error codes.
williamr@2
  4582
williamr@2
  4583
	@see CVideoPlayerUtility::StepFrameL
williamr@2
  4584
	*/
williamr@2
  4585
	IMPORT_C TInt StepFrame(TInt aStep);
williamr@2
  4586
	
williamr@2
  4587
	/**
williamr@2
  4588
	Gets play rate capabilities.
williamr@2
  4589
	Behaviour is same as CVideoPlayerUtility::GetPlayRateCapabilitiesL	
williamr@2
  4590
williamr@2
  4591
    @param aCapabilities Playback rate capabilities
williamr@2
  4592
williamr@2
  4593
	@return One of the system-wide error codes.
williamr@2
  4594
		
williamr@2
  4595
	@see CVideoPlayerUtility::GetPlayRateCapabilitiesL
williamr@2
  4596
	*/
williamr@2
  4597
	IMPORT_C TInt GetPlayRateCapabilities(TVideoPlayRateCapabilities& aCapabilities)const;
williamr@2
  4598
williamr@2
  4599
	/**
williamr@2
  4600
	Enables/Disables video playback.
williamr@2
  4601
	Behaviour is same as CVideoPlayerUtility::SetVideoEnabledL	
williamr@2
  4602
    
williamr@2
  4603
    @param aVideoEnabled ETrue to enable video playback, EFalse to disable
williamr@2
  4604
williamr@2
  4605
	@return One of the system-wide error codes.    	
williamr@2
  4606
williamr@2
  4607
	@see CVideoPlayerUtility::SetVideoEnabledL
williamr@2
  4608
	*/
williamr@2
  4609
	IMPORT_C TInt SetVideoEnabled(TBool aVideoEnabled);
williamr@2
  4610
	
williamr@2
  4611
	/**
williamr@2
  4612
    Queries whether video playback is currently enabled or not.
williamr@2
  4613
	Behaviour is same as CVideoPlayerUtility::VideoEnabledL
williamr@2
  4614
williamr@2
  4615
    @param aVideoEnabled 
williamr@2
  4616
    	   Out parameter returns ETrue if video playback is enabled, EFalse if not.
williamr@2
  4617
williamr@2
  4618
	@return One of the system-wide error codes.
williamr@2
  4619
	
williamr@2
  4620
	@see CVideoPlayerUtility::VideoEnabledL
williamr@2
  4621
	*/
williamr@2
  4622
	IMPORT_C TInt VideoEnabled(TBool &aVideoEnabled)const;
williamr@2
  4623
	
williamr@2
  4624
	/**
williamr@2
  4625
	Enables or disables audio playback.
williamr@2
  4626
	Behaviour is same as CVideoPlayerUtility::SetAudioEnabledL
williamr@2
  4627
williamr@2
  4628
    @param aVideoEnabled ETrue to enable audio playback, EFalse to disable		
williamr@2
  4629
williamr@2
  4630
	@return One of the system-wide error codes.
williamr@2
  4631
williamr@2
  4632
	@see CVideoPlayerUtility::SetAudioEnabledL
williamr@2
  4633
	*/
williamr@2
  4634
	IMPORT_C TInt SetAudioEnabled(TBool aAudioEnabled);
williamr@2
  4635
williamr@2
  4636
	/**
williamr@2
  4637
	Sets Auto scale mode.
williamr@2
  4638
 	Behaviour is same as CVideoPlayerUtility::SetAutoScaleL
williamr@2
  4639
	
williamr@2
  4640
    @param aScaleType Automatic scaling type
williamr@2
  4641
    @param aHorizPos Video picture horizontal position, relative to the
williamr@2
  4642
                     video window.
williamr@2
  4643
    @param aVertPos Video picture vertical position, relative to the
williamr@2
  4644
                     video window.
williamr@2
  4645
	@return One of the system-wide error codes.
williamr@2
  4646
		
williamr@2
  4647
	@see CVideoPlayerUtility::SetAutoScaleL
williamr@2
  4648
	*/
williamr@2
  4649
	IMPORT_C TInt SetAutoScale(TAutoScaleType aScaleType, TInt aHorizPos, TInt aVertPos);
williamr@2
  4650
	};
williamr@2
  4651
williamr@2
  4652
/**
williamr@2
  4653
@publishedPartner
williamr@2
  4654
@prototype
williamr@2
  4655
*/
williamr@2
  4656
const TUid KUidInterfaceMMFVideoRecorderExt = {0x10283438};
williamr@2
  4657
williamr@2
  4658
/**
williamr@2
  4659
Mixin class to be derived from controller plug-ins that could support quality and enabling video. 
williamr@2
  4660
williamr@2
  4661
@publishedPartner
williamr@2
  4662
@prototype
williamr@2
  4663
*/	
williamr@2
  4664
class MMMFVideoRecordControllerExtCustomCommandImplementor
williamr@2
  4665
	{
williamr@2
  4666
public:
williamr@2
  4667
williamr@2
  4668
	/**
williamr@2
  4669
	Enabled or disables video in recorder.
williamr@2
  4670
	Behaviour is same as CVideoRecorderUtility::SetVideoEnabledL	
williamr@2
  4671
williamr@2
  4672
	@see CVideoRecorderUtility::SetVideoEnabledL
williamr@2
  4673
	*/
williamr@2
  4674
    virtual void MvrecSetVideoEnabledL(TBool aEnabled)=0;
williamr@2
  4675
	/**
williamr@2
  4676
	Gets the flag that indicates video enabled or not.
williamr@2
  4677
	Behaviour is same as CVideoRecorderUtility::VideoEnabledL	
williamr@2
  4678
williamr@2
  4679
	@see CVideoRecorderUtility::VideoEnabledL
williamr@2
  4680
	*/
williamr@2
  4681
    virtual TBool MvrecVideoEnabledL() const=0;
williamr@2
  4682
	/**
williamr@2
  4683
	Sets the quality of video being recorded.
williamr@2
  4684
	Behaviour is same as CVideoRecorderUtility::SetVideoQualityL	
williamr@2
  4685
williamr@2
  4686
	@see CVideoRecorderUtility::SetVideoQualityL
williamr@2
  4687
	*/
williamr@2
  4688
    virtual void MvrecSetVideoQualityL(TInt aQuality)=0;
williamr@2
  4689
	/**
williamr@2
  4690
	Gets video quality level set using SetVideoQualityL.
williamr@2
  4691
	Behaviour is same as CVideoRecorderUtility::VideoQualityL	
williamr@2
  4692
williamr@2
  4693
	@see CVideoRecorderUtility::VideoQualityL
williamr@2
  4694
	*/
williamr@2
  4695
    virtual TInt MvrecVideoQualityL() const=0;
williamr@2
  4696
	/**
williamr@2
  4697
	Sets the video framerate to fixed.
williamr@2
  4698
	Behaviour is same as CVideoRecorderUtility::SetVideoFrameRateFixedL	
williamr@2
  4699
williamr@2
  4700
	@see CVideoRecorderUtility::SetVideoFrameRateFixedL
williamr@2
  4701
	*/
williamr@2
  4702
    virtual void MvrecSetVideoFrameRateFixedL(TBool aFixedFrameRate)=0;
williamr@2
  4703
	/**
williamr@2
  4704
	Gets FrameRateFixed flag set using SetVideoFrameRateFixedL.
williamr@2
  4705
	Behaviour is same as CVideoRecorderUtility::VideoFrameRateFixedL	
williamr@2
  4706
williamr@2
  4707
	@see CVideoRecorderUtility::VideoFrameRateFixedL
williamr@2
  4708
	*/
williamr@2
  4709
    virtual TBool MvrecVideoFrameRateFixedL() const=0;
williamr@2
  4710
	};
williamr@2
  4711
williamr@2
  4712
/**
williamr@2
  4713
@internalComponent
williamr@2
  4714
*/
williamr@2
  4715
enum TMMFVideoRecorderExtCustomCommandConfigMessages
williamr@2
  4716
	{
williamr@2
  4717
	EMMFVideoRecordControllerSetVideoEnabled = 0,
williamr@2
  4718
	EMMFVideoRecordControllerVideoEnabled,
williamr@2
  4719
	EMMFVideoRecordControllerSetVideoQuality,	
williamr@2
  4720
	EMMFVideoRecordControllerVideoQuality,
williamr@2
  4721
	EMMFVideoRecordControllerSetVideoFrameRateFixed,
williamr@2
  4722
	EMMFVideoRecordControllerVideoFrameRateFixed
williamr@2
  4723
	};
williamr@2
  4724
williamr@2
  4725
/**
williamr@2
  4726
Custom command parser class to be used by controller plug-ins wishing to implement VideoRecorderExt custom commands.
williamr@2
  4727
williamr@2
  4728
The controller plug-in should create an object of this type and add it to the list of custom command parsers 
williamr@2
  4729
in the controller framework. The controller plug-in must be derived from MMMFVideoRecordControllerExtCustomCommandImplementor
williamr@2
  4730
to use this class.
williamr@2
  4731
williamr@2
  4732
@publishedPartner
williamr@2
  4733
@prototype
williamr@2
  4734
*/
williamr@2
  4735
class CMMFVideoRecordControllerExtCustomCommandParser : public CMMFCustomCommandParserBase
williamr@2
  4736
	{
williamr@2
  4737
public:
williamr@2
  4738
williamr@2
  4739
	/**
williamr@2
  4740
	Creates a new custom command parser that supports the video rate control and auto scaling.
williamr@2
  4741
williamr@2
  4742
	@param  aImplementor A reference to the controller plug-in that owns this new object.
williamr@2
  4743
	@return A pointer to the object created.
williamr@2
  4744
	*/
williamr@2
  4745
	IMPORT_C static CMMFVideoRecordControllerExtCustomCommandParser* NewL(MMMFVideoRecordControllerExtCustomCommandImplementor& aImplementor);
williamr@2
  4746
williamr@2
  4747
	/**
williamr@2
  4748
	Destructor.
williamr@2
  4749
	*/
williamr@2
  4750
	IMPORT_C ~CMMFVideoRecordControllerExtCustomCommandParser();
williamr@2
  4751
williamr@2
  4752
	/**
williamr@2
  4753
	Handles a request from the client. Called by the controller framework.
williamr@2
  4754
williamr@2
  4755
	@param  aMessage The message to be handled.
williamr@2
  4756
	*/
williamr@2
  4757
	void HandleRequest(TMMFMessage& aMessage);
williamr@2
  4758
williamr@2
  4759
private:
williamr@2
  4760
	CMMFVideoRecordControllerExtCustomCommandParser(MMMFVideoRecordControllerExtCustomCommandImplementor& aImplementor);
williamr@2
  4761
	void DoHandleRequestL(TMMFMessage& aMessage);
williamr@2
  4762
	TBool DoSetVideoEnabledL(TMMFMessage& aMessage);
williamr@2
  4763
	TBool DoVideoEnabledL(TMMFMessage& aMessage);
williamr@2
  4764
	TBool DoSetVideoQualityL(TMMFMessage& aMessage);
williamr@2
  4765
	TBool DoVideoQualityL(TMMFMessage& aMessage);
williamr@2
  4766
	TBool DoSetVideoFrameRateFixedL(TMMFMessage& aMessage);
williamr@2
  4767
	TBool DoVideoFrameRateFixedL(TMMFMessage& aMessage);
williamr@2
  4768
private:
williamr@2
  4769
	MMMFVideoRecordControllerExtCustomCommandImplementor& iImplementor;
williamr@2
  4770
	};
williamr@2
  4771
williamr@2
  4772
/**
williamr@2
  4773
Resource class to be used by Recorder utility for sending custom commands.
williamr@2
  4774
williamr@2
  4775
@publishedPartner
williamr@2
  4776
@prototype
williamr@2
  4777
*/	
williamr@2
  4778
class RMMFVideoRecordControllerExtCustomCommands: public RMMFCustomCommandsBase
williamr@2
  4779
	{
williamr@2
  4780
public:
williamr@2
  4781
	/**
williamr@2
  4782
	Constructor.
williamr@2
  4783
williamr@2
  4784
	@param  aController
williamr@2
  4785
	        The client side controller object to be used by this custom command interface.
williamr@2
  4786
	@return One of the system-wide error codes.
williamr@2
  4787
	*/
williamr@2
  4788
	IMPORT_C RMMFVideoRecordControllerExtCustomCommands(RMMFController& aController);
williamr@2
  4789
	
williamr@2
  4790
	/**
williamr@2
  4791
	Enabled or disables video in recorder.
williamr@2
  4792
	Behaviour is same as CVideoRecorderUtility::SetVideoEnabledL	
williamr@2
  4793
williamr@2
  4794
    @param aEnabled ETrue to enable video recording, EFalse to enable it
williamr@2
  4795
williamr@2
  4796
	@return One of the system-wide error codes.	
williamr@2
  4797
	@see CVideoRecorderUtility::SetVideoEnabledL
williamr@2
  4798
	*/
williamr@2
  4799
    IMPORT_C TInt SetVideoEnabled(TBool aEnabled);
williamr@2
  4800
    
williamr@2
  4801
	/**
williamr@2
  4802
	Gets the flag that indicates video enabled or not.
williamr@2
  4803
	Behaviour is same as CVideoRecorderUtility::VideoEnabledL	
williamr@2
  4804
williamr@2
  4805
    @param aEnabled 
williamr@2
  4806
    	   Out parameter returns ETrue if video recording is enabled , EFalse otherwise.
williamr@2
  4807
williamr@2
  4808
	@return One of the system-wide error codes.	
williamr@2
  4809
	@see CVideoRecorderUtility::VideoEnabledL
williamr@2
  4810
	*/
williamr@2
  4811
    IMPORT_C TInt VideoEnabled(TBool &aEnabled) const;
williamr@2
  4812
    
williamr@2
  4813
	/**
williamr@2
  4814
	Sets the quality of video being recorded.
williamr@2
  4815
	Behaviour is same as CVideoRecorderUtility::SetVideoQualityL	
williamr@2
  4816
williamr@2
  4817
    @param aQuality Video quality, in the range of 0 to 100, inclusive.
williamr@2
  4818
williamr@2
  4819
	@return One of the system-wide error codes.	
williamr@2
  4820
	@see CVideoRecorderUtility::SetVideoQualityL
williamr@2
  4821
	*/
williamr@2
  4822
    IMPORT_C TInt SetVideoQuality(TInt aQuality);
williamr@2
  4823
    
williamr@2
  4824
	/**
williamr@2
  4825
	Gets video quality level set using SetVideoQualityL.
williamr@2
  4826
	Behaviour is same as CVideoRecorderUtility::VideoQualityL	
williamr@2
  4827
    
williamr@2
  4828
    @param aQuality Out parameter returning Video quality in the range 0-100.
williamr@2
  4829
    
williamr@2
  4830
    @return One of the system-wide error codes.	
williamr@2
  4831
	@see CVideoRecorderUtility::VideoQualityL
williamr@2
  4832
	*/
williamr@2
  4833
    IMPORT_C TInt VideoQuality(TInt &aQuality) const;
williamr@2
  4834
    
williamr@2
  4835
	/**
williamr@2
  4836
	Sets the video framerate to fixed.
williamr@2
  4837
	Behaviour is same as CVideoRecorderUtility::SetVideoFrameRateFixedL	
williamr@2
  4838
	
williamr@2
  4839
    @param aFixedFrameRate ETrue to request a fixed framerate, EFalse to
williamr@2
  4840
                          request a variable framerate.
williamr@2
  4841
williamr@2
  4842
	@return One of the system-wide error codes.	
williamr@2
  4843
	@see CVideoRecorderUtility::SetVideoFrameRateFixedL
williamr@2
  4844
	*/
williamr@2
  4845
    IMPORT_C TInt SetVideoFrameRateFixed(TBool aFixedFrameRate);
williamr@2
  4846
    
williamr@2
  4847
	/**
williamr@2
  4848
	Gets FrameRateFixed flag set using SetVideoFrameRateFixedL.
williamr@2
  4849
	Behaviour is same as CVideoRecorderUtility::VideoFrameRateFixedL	
williamr@2
  4850
williamr@2
  4851
    @param aFixedFrameRate Out parameter returns ETrue if fixed framerate
williamr@2
  4852
     						is enabled, EFalse otherwise.
williamr@2
  4853
    
williamr@2
  4854
	@return One of the system-wide error codes.	
williamr@2
  4855
	@see CVideoRecorderUtility::VideoFrameRateFixedL
williamr@2
  4856
	*/
williamr@2
  4857
    IMPORT_C TInt VideoFrameRateFixed(TBool &aFixedFrameRate) const;
williamr@2
  4858
    };
williamr@2
  4859
williamr@2
  4860
/**
williamr@2
  4861
@publishedPartner
williamr@2
  4862
@released
williamr@2
  4863
williamr@2
  4864
Interface UID and messages for the Audio Play Controller Set Repeats API.
williamr@2
  4865
*/
williamr@2
  4866
const TUid KUidInterfaceMMFAudioPlaySetRepeatsController = {0x102834D5};
williamr@2
  4867
williamr@2
  4868
/**
williamr@2
  4869
@internalComponent
williamr@2
  4870
*/
williamr@2
  4871
enum TMMFAudioPlayControllerSetRepeatsMessages
williamr@2
  4872
	{
williamr@2
  4873
	EMMFAudioPlayControllerSetRepeats
williamr@2
  4874
	};
williamr@2
  4875
williamr@2
  4876
/**
williamr@2
  4877
@publishedPartner
williamr@2
  4878
@released
williamr@2
  4879
williamr@2
  4880
Client class to access loop play functionality of audio play controller.
williamr@2
  4881
williamr@2
  4882
The class uses the custom command function of the controller plugin, and removes the necessity
williamr@2
  4883
for the client to formulate the custom commands.
williamr@2
  4884
*/
williamr@2
  4885
class RMMFAudioPlayControllerSetRepeatsCustomCommands : public RMMFCustomCommandsBase
williamr@2
  4886
	{
williamr@2
  4887
public:
williamr@2
  4888
	
williamr@2
  4889
	/**
williamr@2
  4890
	Constructor.
williamr@2
  4891
williamr@2
  4892
	@param  aController
williamr@2
  4893
	        The client side controller object to be used by this custom command interface.
williamr@2
  4894
	*/
williamr@2
  4895
	IMPORT_C RMMFAudioPlayControllerSetRepeatsCustomCommands(RMMFController& aController);
williamr@2
  4896
williamr@2
  4897
	/**
williamr@2
  4898
	Sets the number of times the audio sample to be repeated and the trailing silence period
williamr@2
  4899
	
williamr@2
  4900
	@param  aRepeatNumberOfTimes
williamr@2
  4901
			The number of times the audio sample needs to be repeated
williamr@2
  4902
	
williamr@2
  4903
	@param  aTrailingSilence
williamr@2
  4904
	        The time interval of the trailing silence in microseconds.
williamr@2
  4905
	        
williamr@2
  4906
	@return KErrNotSupported if the controller plugin does not support the loop play functionality.
williamr@2
  4907
	*/
williamr@2
  4908
	IMPORT_C TInt SetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence);
williamr@2
  4909
	};
williamr@2
  4910
williamr@2
  4911
/**
williamr@2
  4912
@publishedPartner
williamr@2
  4913
@released
williamr@2
  4914
williamr@2
  4915
Mixin class to be derived from by controller plugins that could support the set repeats custom command.
williamr@2
  4916
*/
williamr@2
  4917
class MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor
williamr@2
  4918
	{
williamr@2
  4919
public:
williamr@2
  4920
williamr@2
  4921
	/**
williamr@2
  4922
	Sets the number of times the audio sample is to be repeated during the playback operation.	
williamr@2
  4923
	A period of silence can follow each playing of the sample. The audio sample can be repeated indefinitely.
williamr@2
  4924
	
williamr@2
  4925
	@param	aRepeatNumberOfTimes
williamr@2
  4926
    		The number of times the audio sample, together with the trailing silence, is to be repeated. 
williamr@2
  4927
    		If this is set to KMdaRepeatForever, then the audio sample, together with the trailing silence, 
williamr@2
  4928
    		is repeated indefinitely or until Stop() is called. 
williamr@2
  4929
    		If this is set to zero, then the audio sample is not repeated.
williamr@2
  4930
	
williamr@2
  4931
	@param  aTrailingSilence
williamr@2
  4932
         	The time interval of the trailing silence in microseconds.
williamr@2
  4933
	
williamr@2
  4934
	@return	KErrNone if the controller plugin supports the loop play functionality
williamr@2
  4935
			KErrNotSupported if the controller plugin does not support the loop play functionality
williamr@2
  4936
			KErrNotReady if the controller plugin is not yet added the audio sink
williamr@2
  4937
	*/		
williamr@2
  4938
	virtual TInt MapcSetRepeats(TInt aRepeatNumberOfTimes, const TTimeIntervalMicroSeconds& aTrailingSilence) = 0;		
williamr@2
  4939
	};
williamr@2
  4940
williamr@2
  4941
/**
williamr@2
  4942
@publishedPartner
williamr@2
  4943
@released
williamr@2
  4944
williamr@2
  4945
Custom command parser class to be used by controller plugins wishing to support set repeats functionality
williamr@2
  4946
williamr@2
  4947
The controller plugin should create an object of this type and add it to the list of custom command parsers 
williamr@2
  4948
in the controller framework. The controller plugin must be derived from 
williamr@2
  4949
MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor to use this class. 
williamr@2
  4950
*/
williamr@2
  4951
williamr@2
  4952
class CMMFAudioPlayControllerSetRepeatsCustomCommandParser : public CMMFCustomCommandParserBase
williamr@2
  4953
	{
williamr@2
  4954
public:
williamr@2
  4955
williamr@2
  4956
	/**
williamr@2
  4957
	Creates a new custom command parser capable of handling set repeats controller commands.
williamr@2
  4958
williamr@2
  4959
	@param  aImplementor
williamr@2
  4960
	        A reference to the controller plugin that owns this new object.
williamr@2
  4961
williamr@2
  4962
	@return A pointer to the object created.
williamr@2
  4963
williamr@2
  4964
	*/
williamr@2
  4965
	IMPORT_C static CMMFAudioPlayControllerSetRepeatsCustomCommandParser* NewL(MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& aImplementor);
williamr@2
  4966
williamr@2
  4967
	/**
williamr@2
  4968
	Destructor.
williamr@2
  4969
williamr@2
  4970
	*/
williamr@2
  4971
	IMPORT_C ~CMMFAudioPlayControllerSetRepeatsCustomCommandParser();
williamr@2
  4972
williamr@2
  4973
	/**
williamr@2
  4974
	Handles a request from the client. Called by the controller framework.
williamr@2
  4975
williamr@2
  4976
	@param  aMessage
williamr@2
  4977
	        The message to be handled.
williamr@2
  4978
williamr@2
  4979
	*/
williamr@2
  4980
	void HandleRequest(TMMFMessage& aMessage);
williamr@2
  4981
private:
williamr@2
  4982
williamr@2
  4983
	/**
williamr@2
  4984
	Constructor.
williamr@2
  4985
williamr@2
  4986
	@param  aImplementor
williamr@2
  4987
	        A reference to the controller plugin that owns this new object.
williamr@2
  4988
williamr@2
  4989
	*/
williamr@2
  4990
	CMMFAudioPlayControllerSetRepeatsCustomCommandParser(MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& aImplementor);
williamr@2
  4991
	// Internal request handling methods.
williamr@2
  4992
	void DoHandleRequestL(TMMFMessage& aMessage);
williamr@2
  4993
	TBool DoSetRepeatsL(TMMFMessage& aMessage);
williamr@2
  4994
private:
williamr@2
  4995
	/** 
williamr@2
  4996
	The object that implements the set repeats custom command i.e controller plugin
williamr@2
  4997
	*/
williamr@2
  4998
	MMMFAudioPlayControllerSetRepeatsCustomCommandImplementor& iImplementor;
williamr@2
  4999
	};
williamr@2
  5000
williamr@2
  5001
#endif