epoc32/include/mmf/devvideo/devvideobase.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
// Copyright (c) 2003-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 __DEVVIDEOBASE_H__
williamr@2
    17
#define __DEVVIDEOBASE_H__
williamr@2
    18
williamr@2
    19
#include <e32base.h>
williamr@2
    20
#include <w32std.h>
williamr@2
    21
#include <mmf/devvideo/devvideoconstants.h>
williamr@2
    22
#include <ecom/ecom.h>
williamr@2
    23
williamr@2
    24
williamr@2
    25
/**
williamr@2
    26
Panic utility function
williamr@2
    27
@internalTechnology
williamr@2
    28
*/
williamr@2
    29
LOCAL_C void DevVideoPanic(TInt aReason)
williamr@2
    30
	{
williamr@2
    31
	User::Panic(KDevVideoPanicCategory, aReason);
williamr@2
    32
	}
williamr@2
    33
williamr@2
    34
williamr@2
    35
/**
williamr@2
    36
A hardware device ID that identifies an instantiated video hardware device. 
williamr@2
    37
Used in the playback and recording APIs to identify the component being controlled.
williamr@2
    38
@publishedAll
williamr@2
    39
@released
williamr@2
    40
*/
williamr@2
    41
typedef TInt THwDeviceId;
williamr@2
    42
williamr@2
    43
williamr@2
    44
/**
williamr@2
    45
Defines a supported scale factor for a scaling pre-processor or post-processor.
williamr@2
    46
williamr@2
    47
The scale factor is defined as iScaleNum/iScaleDenom, 
williamr@2
    48
where the values are positive integers and relatively prime.
williamr@2
    49
@publishedAll
williamr@2
    50
@released
williamr@2
    51
*/
williamr@2
    52
class TScaleFactor
williamr@2
    53
	{
williamr@2
    54
public:
williamr@2
    55
	/**Scale factor numerator. Non-zero.*/
williamr@2
    56
	TUint iScaleNum;
williamr@2
    57
	/**Scale factor denominator. Non-zero.*/
williamr@2
    58
	TUint iScaleDenom;
williamr@2
    59
	};
williamr@2
    60
williamr@2
    61
williamr@2
    62
/**
williamr@2
    63
A custom YUV/RGB conversion matrix. The same matrix structure is used for both conversion directions.
williamr@2
    64
@publishedAll
williamr@2
    65
@released
williamr@2
    66
*/
williamr@2
    67
class TYuvConversionMatrix
williamr@2
    68
	{
williamr@2
    69
public:
williamr@2
    70
	/**
williamr@2
    71
	Post-multiplication offset, a three-item vector.
williamr@2
    72
	*/
williamr@2
    73
	TReal iPostOffset[3];
williamr@2
    74
williamr@2
    75
	/**
williamr@2
    76
	Multiplication matrix, a 3x3 matrix. iMatrix[3*i+j] contains the j:th item on the i:th row of the matrix.
williamr@2
    77
	*/
williamr@2
    78
	TReal iMatrix[9];
williamr@2
    79
williamr@2
    80
	/**
williamr@2
    81
	Pre-multiplication offset, a three-item vector.
williamr@2
    82
	*/
williamr@2
    83
	TReal iPreOffset[3];
williamr@2
    84
	};
williamr@2
    85
williamr@2
    86
williamr@2
    87
/**
williamr@2
    88
YUV (YCbCr) uncompressed image data format.
williamr@2
    89
@publishedAll
williamr@2
    90
@released
williamr@2
    91
*/
williamr@2
    92
class TYuvFormat
williamr@2
    93
	{
williamr@2
    94
public:
williamr@2
    95
	/**
williamr@2
    96
	The YUV/RGB conversion coefficients to use
williamr@2
    97
	*/
williamr@2
    98
	TYuvCoefficients iCoefficients;
williamr@2
    99
williamr@2
   100
	/**
williamr@2
   101
	Luminance/chrominance sampling pattern.
williamr@2
   102
	*/
williamr@2
   103
	TYuvSamplingPattern iPattern;
williamr@2
   104
williamr@2
   105
	/**
williamr@2
   106
	Data layout, specifies whether the data is stored in a planar or interleaved mode.
williamr@2
   107
	*/
williamr@2
   108
	TYuvDataLayout iDataLayout;
williamr@2
   109
williamr@2
   110
	/**
williamr@2
   111
	Custom YUV to RGB conversion matrix to use. 
williamr@2
   112
	Valid only if custom conversion matrix is used (iCoefficients is ECustomYuvMatrix).
williamr@2
   113
	*/
williamr@2
   114
	TYuvConversionMatrix* iYuv2RgbMatrix;
williamr@2
   115
williamr@2
   116
	/**
williamr@2
   117
	Custom RGB to YUV conversion matrix to use. 
williamr@2
   118
	Valid only if custom conversion matrix is used (iCoefficients is ECustomYuvMatrix).
williamr@2
   119
	*/
williamr@2
   120
	TYuvConversionMatrix* iRgb2YuvMatrix;
williamr@2
   121
williamr@2
   122
	/**
williamr@2
   123
	Pixel aspect ratio numerator.
williamr@2
   124
	*/
williamr@2
   125
	TUint iAspectRatioNum;
williamr@2
   126
williamr@2
   127
	/**
williamr@2
   128
	Pixel aspect ratio denominator. 
williamr@2
   129
	The aspect ratio is defined as iAspectRatioNum/iAspectRatioDenom, 
williamr@2
   130
	where the values are positive integers and relatively prime.
williamr@2
   131
	*/
williamr@2
   132
	TUint iAspectRatioDenom;
williamr@2
   133
williamr@2
   134
	/**
williamr@2
   135
	Tests whether this TYuvFormat object is the same as aOther.
williamr@2
   136
	@param  "aOther" "The object to compare."
williamr@2
   137
	@return "ETrue if they are the same, EFalse if not."
williamr@2
   138
	*/
williamr@2
   139
	inline TBool operator==(const TYuvFormat& aOther) const;
williamr@2
   140
	};
williamr@2
   141
williamr@2
   142
/**
williamr@2
   143
Defines an uncompressed video format. 
williamr@2
   144
This structure is mainly just a combination of YUV and RGB formats, defined to simplify the rest of the API.
williamr@2
   145
@publishedAll
williamr@2
   146
@released
williamr@2
   147
*/
williamr@2
   148
class TUncompressedVideoFormat
williamr@2
   149
	{
williamr@2
   150
public:
williamr@2
   151
	/**
williamr@2
   152
	The image data format. The validity of the rest of the fields depends on the data format used.
williamr@2
   153
	*/
williamr@2
   154
	TImageDataFormat iDataFormat;
williamr@2
   155
	union
williamr@2
   156
		{
williamr@2
   157
		/**
williamr@2
   158
		YUV picture format details, valid if iDataFormat is EYuvRawData.
williamr@2
   159
		*/
williamr@2
   160
		TYuvFormat iYuvFormat;
williamr@2
   161
williamr@2
   162
		/**
williamr@2
   163
		RGB picture format details, valid if iDataFormat is ERgbRawData or ERgbFbsBitmap.
williamr@2
   164
		*/
williamr@2
   165
		TRgbFormat iRgbFormat;
williamr@2
   166
		};
williamr@2
   167
williamr@2
   168
	/**
williamr@2
   169
	Tests whether this TUncompressedVideoFormat object is the same as aOther.
williamr@2
   170
	@param  "aOther" "The object to compare."
williamr@2
   171
	@return "ETrue if they are the same, EFalse if not."
williamr@2
   172
	*/
williamr@2
   173
	inline TBool operator==(const TUncompressedVideoFormat& aOther) const;
williamr@2
   174
williamr@2
   175
	/**
williamr@2
   176
	Sets this object equal to aOther.
williamr@2
   177
	@param  "aOther" "The object to clone."
williamr@2
   178
	*/
williamr@2
   179
	inline void operator=(const TUncompressedVideoFormat& aOther);
williamr@2
   180
	};
williamr@2
   181
williamr@2
   182
williamr@2
   183
/**
williamr@2
   184
Uncompressed picture data for one video picture.
williamr@2
   185
@publishedAll
williamr@2
   186
@released
williamr@2
   187
*/
williamr@2
   188
class TPictureData
williamr@2
   189
	{
williamr@2
   190
public:
williamr@2
   191
	/**
williamr@2
   192
	The image data format. The validity of the rest of the fields depends on the data format used.
williamr@2
   193
	*/
williamr@2
   194
	TImageDataFormat iDataFormat;
williamr@2
   195
williamr@2
   196
	/**
williamr@2
   197
	Image data size in pixels. In decoder output pictures the actual active picture area may be smaller, 
williamr@2
   198
	this is indicated using TVideoPicture.iCropRect.
williamr@2
   199
	*/
williamr@2
   200
	TSize iDataSize;
williamr@2
   201
williamr@2
   202
	union
williamr@2
   203
		{
williamr@2
   204
		/**
williamr@2
   205
		Pointer to raw image data. Valid if iDataFormat is ERgbRawData or iYuvRawData. 
williamr@2
   206
		The data layout depends on the format used.
williamr@2
   207
		*/
williamr@2
   208
		TPtr8* iRawData;
williamr@2
   209
williamr@2
   210
		/**
williamr@2
   211
		Pointer to an RGB bitmap. Valid if iDataFormat is ERgbFbsBitmap.
williamr@2
   212
		*/
williamr@2
   213
		CFbsBitmap* iRgbBitmap;
williamr@2
   214
		};
williamr@2
   215
	};
williamr@2
   216
williamr@2
   217
/**
williamr@2
   218
Header information for one decoded picture. 
williamr@2
   219
The header information is returned alongside with decoded pictures, 
williamr@2
   220
or it can be read separately when DevVideoPlay is being initialized.
williamr@2
   221
williamr@2
   222
@publishedAll
williamr@2
   223
@released
williamr@2
   224
*/
williamr@2
   225
class TVideoPictureHeader
williamr@2
   226
	{
williamr@2
   227
public:
williamr@2
   228
	/**
williamr@2
   229
	*/
williamr@2
   230
	enum THeaderOptions
williamr@2
   231
		{
williamr@2
   232
		/** Decoding timestamp is valid
williamr@2
   233
		*/
williamr@2
   234
		EDecodingTimestamp		   = 0x00000001,
williamr@2
   235
		/** Presentation timestamp is valid
williamr@2
   236
		*/
williamr@2
   237
		EPresentationTimestamp	   = 0x00000002,
williamr@2
   238
		/** Pre-decoder buffersize is valid
williamr@2
   239
		*/
williamr@2
   240
		EPreDecoderBufferSize		= 0x00000004,
williamr@2
   241
		/** Post-decoder buffersize is valid
williamr@2
   242
		*/
williamr@2
   243
		EPostDecoderBufferSize	   = 0x00000008,
williamr@2
   244
		/** Picture number field is valid
williamr@2
   245
		*/
williamr@2
   246
		EPictureNumber			   = 0x00000010,
williamr@2
   247
		/** Layered coding is used and the layer number field is valid
williamr@2
   248
		*/
williamr@2
   249
		ELayeredCoding			   = 0x00000020,
williamr@2
   250
		/** Supplemental data is available
williamr@2
   251
		*/
williamr@2
   252
		ESupplementalData			= 0x00000040,
williamr@2
   253
		/** Random access buffering period is valid
williamr@2
   254
		*/
williamr@2
   255
		ERandomAccessBufferingPeriod = 0x00000080,
williamr@2
   256
		/** Random access buffer occupancy is valid
williamr@2
   257
		*/
williamr@2
   258
		ERandomAccessBufferOccupancy = 0x00000100
williamr@2
   259
		};
williamr@2
   260
williamr@2
   261
	/**
williamr@2
   262
	Header options.  The value is a bitfield combined from values from THeaderOptions.
williamr@2
   263
	*/
williamr@2
   264
	TUint32 iOptions;
williamr@2
   265
williamr@2
   266
	/**
williamr@2
   267
	Video codec profile used. Use -1 if not applicable or not defined.
williamr@2
   268
	*/
williamr@2
   269
	TInt iProfile;
williamr@2
   270
williamr@2
   271
	/**
williamr@2
   272
	Video codec level. Use -1 if not applicable or not defined.
williamr@2
   273
	*/
williamr@2
   274
	TInt iLevel;
williamr@2
   275
williamr@2
   276
	/**
williamr@2
   277
	Video codec version. Use -1 if not applicable or not defined.
williamr@2
   278
	*/
williamr@2
   279
	TInt iVersion;
williamr@2
   280
williamr@2
   281
	/**
williamr@2
   282
	Pointer to a descriptor that contains optional codec-specific features. Set to NULL if not used. 
williamr@2
   283
	The format of the data is codec-specific. The pointer and descriptor data are valid as long as 
williamr@2
   284
	the header information structure is valid.
williamr@2
   285
	*/
williamr@2
   286
	const TDesC8* iOptional;
williamr@2
   287
williamr@2
   288
	/**
williamr@2
   289
	Image size in memory, in pixels. May be larger than the displayed picture.
williamr@2
   290
	*/
williamr@2
   291
	TSize iSizeInMemory;
williamr@2
   292
williamr@2
   293
	/**
williamr@2
   294
	The portion of the full image to display.
williamr@2
   295
	*/
williamr@2
   296
	TRect iDisplayedRect;
williamr@2
   297
williamr@2
   298
	/**
williamr@2
   299
	Picture presentation timestamp. Valid only if EPresentationTimestamp is set in the options. 
williamr@2
   300
	The clock frequency is stored in the timestamp structure.
williamr@2
   301
	*/
williamr@2
   302
	TTimeIntervalMicroSeconds iPresentationTimestamp;
williamr@2
   303
williamr@2
   304
	/**
williamr@2
   305
	Picture decoding timestamp. Valid only if EDecodingTimestamp is set in the options.
williamr@2
   306
	*/
williamr@2
   307
	TTimeIntervalMicroSeconds iDecodingTimestamp;
williamr@2
   308
williamr@2
   309
	/**
williamr@2
   310
	Expected pre-decoder buffer size in bytes. Valid only if EPreDecoderBufferSize is set in the options.
williamr@2
   311
	*/
williamr@2
   312
	TUint iPreDecoderBufferSize;
williamr@2
   313
williamr@2
   314
	/**
williamr@2
   315
	Expected post-decoder buffer size in bytes. Valid only if EPostDecoderBufferSize is set in the options. 
williamr@2
   316
	It is assumed that a frame buffer to be displayed is returned before the decoding of the next frame 
williamr@2
   317
	is started. If this is not the case, a larger post-decoder buffer may actually be needed.
williamr@2
   318
	*/
williamr@2
   319
	TUint iPostDecoderBufferSize;
williamr@2
   320
williamr@2
   321
	/**
williamr@2
   322
	Picture number, valid only if EPictureNumber is set in the options. 
williamr@2
   323
	This field is used to indicate one of the following: picture number or long-term picture index for H.263, 
williamr@2
   324
	vop_id for MPEG-4 Visual,  picture number or long-term picture number for AVC.
williamr@2
   325
	*/
williamr@2
   326
	TUint iPictureNumber;
williamr@2
   327
williamr@2
   328
	/**
williamr@2
   329
	Picture layer number if layered coding is used, valid only if ELayeredCoding is set in the options. 
williamr@2
   330
	Layers are numbered [0…n-1], where n is the number of layers available. The first layer (layer zero) 
williamr@2
   331
	is the base layer, it can be decoded independently from the other layers, and it has the lowest total bitrate.
williamr@2
   332
	*/
williamr@2
   333
	TUint iPictureLayer;
williamr@2
   334
williamr@2
   335
	/**
williamr@2
   336
	Picture supplemental data, valid only if ESupplementalData is set in the options. 
williamr@2
   337
	The pointer and descriptor data are valid as long as the header information structure is valid.
williamr@2
   338
	*/
williamr@2
   339
	const TDesC8* iSupplementalData;
williamr@2
   340
williamr@2
   341
	/**
williamr@2
   342
	True if the picture is a random-accessible picture.
williamr@2
   343
	*/
williamr@2
   344
	TBool iIsRandomAccessible;
williamr@2
   345
williamr@2
   346
	/**
williamr@2
   347
	The expected initial pre-decoder buffering period before starting the playback from this picture. 
williamr@2
   348
	Valid only if this picture is randomly accessible (iIsRandomAccessible is true) and 
williamr@2
   349
	ERandomAccessBufferingPeriod is set in the options. MPEG-2 and H.264 | MPEG-4 AVC use this value.
williamr@2
   350
	*/
williamr@2
   351
	TTimeIntervalMicroSeconds32 iRandomAccessBufferingPeriod;
williamr@2
   352
williamr@2
   353
	/**
williamr@2
   354
	The expected initial pre-decoder buffer occupancy in bytes before starting the playback 
williamr@2
   355
	from this picture. Valid if this picture is randomly accessible (iIsRandomAccessible is true) and 
williamr@2
   356
	ERandomAccessBufferOccupancy is set in the options. MPEG-4 Visual uses this value.
williamr@2
   357
	*/
williamr@2
   358
	TUint iRandomAccessBufferOccupancy;
williamr@2
   359
	};
williamr@2
   360
williamr@2
   361
williamr@2
   362
williamr@2
   363
/**
williamr@2
   364
One uncompressed video picture. Used for both decoded picture output as well as uncompressed picture input.
williamr@2
   365
williamr@2
   366
@publishedAll
williamr@2
   367
@released
williamr@2
   368
*/
williamr@2
   369
class TVideoPicture
williamr@2
   370
	{
williamr@2
   371
public:
williamr@2
   372
	/**
williamr@2
   373
	*/
williamr@2
   374
	enum TVideoPictureOptions
williamr@2
   375
		{
williamr@2
   376
		/** The timestamp field is valid.
williamr@2
   377
		*/
williamr@2
   378
		ETimestamp		 = 0x00000001,
williamr@2
   379
		/** The crop rectangle field is valid.
williamr@2
   380
		*/
williamr@2
   381
		ECropRect		  = 0x00000002,
williamr@2
   382
		/** Picture header information is present.
williamr@2
   383
		*/
williamr@2
   384
		EHeader			= 0x00000004,
williamr@2
   385
		/** The layer bit count targets field is valid.
williamr@2
   386
		*/
williamr@2
   387
		EBitTargets		= 0x00000008,
williamr@2
   388
		/** Set in encoder input to request an instantaneous decoder refresh. 
williamr@2
   389
		As a response, the encoder should code an intra frame and no consecutive 
williamr@2
   390
		frame should refer to any frame before the encoded intra frame (in coding order).
williamr@2
   391
		*/
williamr@2
   392
		EReqInstantRefresh = 0x00000010,
williamr@2
   393
		/** Set in encoder input to indicate a scene cut in the picture stream.
williamr@2
   394
		*/
williamr@2
   395
		ESceneCut		  = 0x00000020,
williamr@2
   396
		/** Set if a picture effect is in use and the picture effect field is valid.
williamr@2
   397
		*/
williamr@2
   398
		EPictureEffect	 = 0x00000040,
williamr@2
   399
		/** Set if picture effect parameters are valid.
williamr@2
   400
		*/
williamr@2
   401
		EEffectParameters  = 0x00000080
williamr@2
   402
		};
williamr@2
   403
williamr@2
   404
	/**
williamr@2
   405
	The picture data. The picture data, including all pointers, must remain valid until 
williamr@2
   406
	the picture has been returned to its originator.
williamr@2
   407
	*/
williamr@2
   408
	TPictureData iData;
williamr@2
   409
williamr@2
   410
	/**
williamr@2
   411
	Picture options. The value is a bitfield combined from values from TVideoPictureOptions.
williamr@2
   412
	*/
williamr@2
   413
	TUint32 iOptions;
williamr@2
   414
williamr@2
   415
	/**
williamr@2
   416
	Picture timestamp. Valid if ETimestamp is set in the options. 
williamr@2
   417
	Used for presentation timestamps in video playback and capture timestamps in uncompressed video 
williamr@2
   418
	input for recording. If the timestamp is not specified for decoded video input for playback, 
williamr@2
   419
	the picture is displayed immediately. For decoded video output in playback and uncompressed 
williamr@2
   420
	video input for recording, the timestamp must always be set.
williamr@2
   421
	*/
williamr@2
   422
	TTimeIntervalMicroSeconds iTimestamp;
williamr@2
   423
williamr@2
   424
	/**
williamr@2
   425
	Pan-scan cropping rectangle. Defines the area of the picture used for further processing. 
williamr@2
   426
	Only used for decoded video output.
williamr@2
   427
	*/
williamr@2
   428
	TRect iCropRect;
williamr@2
   429
williamr@2
   430
	/**
williamr@2
   431
	Picture header information. Valid if EHeader is set in the options. 
williamr@2
   432
	Normally this field is only used in decoded pictures returned from the playback API. 
williamr@2
   433
	In that case the header info pointer is valid until the picture is returned to the API.
williamr@2
   434
	*/
williamr@2
   435
	TVideoPictureHeader* iHeader;
williamr@2
   436
williamr@2
   437
	/**
williamr@2
   438
	The target number of bits for each bit-rate scalability layer, valid when EBitTargets is set in the options. 
williamr@2
   439
	Used in video encoding when the caller controls the bit-rate for each picture separately.
williamr@2
   440
	The field points to a table containing the target number of bits to use for each layer when 
williamr@2
   441
	encoding this picture, starting from the lowest layer. The bit count for an enhancement layer 
williamr@2
   442
	includes all lower layers. For example, if the client uses two layers, and reserves 1.5 kilobits 
williamr@2
   443
	for the base layer and three kilobits for the whole picture, this field is set to {1500, 3000}.
williamr@2
   444
	*/
williamr@2
   445
	RArray<TUint>* iLayerBitRates;
williamr@2
   446
williamr@2
   447
	/**
williamr@2
   448
	The picture effect in use when capturing this picture, valid when EPictureEffect is set in the options. 
williamr@2
   449
	This information can be used when encoding the picture. Note that setting a picture effect does not 
williamr@2
   450
	imply that the encoder should modify the picture data based on the effect. Instead, it can be used as 
williamr@2
   451
	an encoding hint. For example, fade to black implies that the global picture brightness has been decreased, 
williamr@2
   452
	and this knowledge can be used to aid motion prediction.
williamr@2
   453
	@see TPictureEffects
williamr@2
   454
	*/
williamr@2
   455
	TPictureEffect iEffect;
williamr@2
   456
williamr@2
   457
	/**
williamr@2
   458
	Picture effect parameter for fade to/from black, valid when EEffectParameters is set in the options 
williamr@2
   459
	and iEffect is EEffectFadeFromBlack or EEffectFadeToBlack. The value range is [0…65536], with zero 
williamr@2
   460
	indicating the picture is black and 65536 indicating that the lightness of the picture is unchanged. 
williamr@2
   461
	If the parameter is not given, the caller is unaware of the proper value or the value fluctuates spatially.
williamr@2
   462
	*/
williamr@2
   463
	TUint iFadeParam;
williamr@2
   464
williamr@2
   465
	/**
williamr@2
   466
	A pointer for free-form user data. The pointer is set by the module that created the buffer, and is 
williamr@2
   467
	usually used for memory management purposes.
williamr@2
   468
	*/
williamr@2
   469
	TAny* iUser;
williamr@2
   470
williamr@2
   471
	/**
williamr@2
   472
	A queue link used internally by the MSL video components.
williamr@2
   473
	*/
williamr@2
   474
	TDblQueLink iLink;
williamr@2
   475
	};
williamr@2
   476
williamr@2
   477
/**
williamr@2
   478
Identifies a video picture in feedback messages.
williamr@2
   479
williamr@2
   480
@publishedAll
williamr@2
   481
@released
williamr@2
   482
*/
williamr@2
   483
class TPictureId
williamr@2
   484
	{
williamr@2
   485
public:
williamr@2
   486
	enum TPictureIdType
williamr@2
   487
		{
williamr@2
   488
		/** Unidentified picture. */
williamr@2
   489
		ENone,
williamr@2
   490
		/** The picture is identified using its temporal reference. */
williamr@2
   491
		ETemporalReference,
williamr@2
   492
		/** The picture is identified using its picture number. Picture numbers are used in H.263 annex U and H.264 | MPEG-4 AVC, for example.. */
williamr@2
   493
		EPictureNumber
williamr@2
   494
		};
williamr@2
   495
williamr@2
   496
	/** Picture identified type. */
williamr@2
   497
	TPictureIdType iIdType;	
williamr@2
   498
	
williamr@2
   499
	/** The picture identifier. The interpretation of this field depends on the value iIdType */
williamr@2
   500
	TUint32 iId;
williamr@2
   501
	};
williamr@2
   502
williamr@2
   503
williamr@2
   504
/**
williamr@2
   505
Defines a compressed video format. The format is identified by its MIME type, which may include 
williamr@2
   506
parameters that describe the used format profile and level. The MIME type used for H.263
williamr@2
   507
is video/H263-2000, specified in TS 26.234, and the type for MPEG-4 is video/MP4V-ES, specified in RFC 3016.
williamr@2
   508
williamr@2
   509
@publishedAll
williamr@2
   510
@released
williamr@2
   511
*/
williamr@2
   512
class CCompressedVideoFormat : public CBase
williamr@2
   513
	{
williamr@2
   514
public:
williamr@2
   515
	/**
williamr@2
   516
	Static factory function for creating new CCompressedVideoFormat objects.
williamr@2
   517
williamr@2
   518
	@param "aMimeType"		"Video codec MIME type, including optional parameters for profile, 
williamr@2
   519
							level and version information. The CCompressedVideoFormat object creates
williamr@2
   520
							and owns a copy of this buffer and takes care of deallocation."
williamr@2
   521
williamr@2
   522
	@param "aOptionalData"	"Reference to a descriptor that contains optional codec-specific data. 
williamr@2
   523
							Set to KNullDesC8 if not used. [The format of the data is codec-specific, typically
williamr@2
   524
							a package buffer containing a data structure may be used. The pointer lifetime 
williamr@2
   525
							and validity requirements are specified with each method that uses this structure."
williamr@2
   526
williamr@2
   527
	@return "Pointer to a fully constructed CCompressedVideoFormat object."
williamr@2
   528
	@leave	"This method may leave with one of the system-wide error codes."
williamr@2
   529
	*/
williamr@2
   530
	IMPORT_C static CCompressedVideoFormat* NewL(const TDesC8& aMimeType, const TDesC8& aOptionalData = KNullDesC8);
williamr@2
   531
williamr@2
   532
	/**
williamr@2
   533
	Static factory function for creating a copy of an existing CCompressedVideoFormat object.
williamr@2
   534
williamr@2
   535
	@param "aFormat"          "The CCompressedVideoFormat object to copy."
williamr@2
   536
williamr@2
   537
	@return Pointer to a fully constructed CCompressedVideoFormat object.
williamr@2
   538
	@leave	This method may leave with one of the system-wide error codes.
williamr@2
   539
	*/
williamr@2
   540
	IMPORT_C static CCompressedVideoFormat* NewL(const CCompressedVideoFormat& aFormat);
williamr@2
   541
williamr@2
   542
	/**
williamr@2
   543
	Virtual destructor. Destroys iMimeType.
williamr@2
   544
	*/
williamr@2
   545
	IMPORT_C virtual ~CCompressedVideoFormat();
williamr@2
   546
williamr@2
   547
	/**
williamr@2
   548
	Returns the video codec MIME type.
williamr@2
   549
williamr@2
   550
	@return "Reference to a descriptor that contains the video codec MIME type."
williamr@2
   551
	*/
williamr@2
   552
	IMPORT_C const TDesC8& MimeType() const;
williamr@2
   553
williamr@2
   554
	/**
williamr@2
   555
	Returns the optional data.
williamr@2
   556
	
williamr@2
   557
	@return "Reference to a descriptor that contains optional codec-specific data. 
williamr@2
   558
			Zero length if not used. The format of the data is codec-specific, typically a package buffer 
williamr@2
   559
			containing a data structure may be used."
williamr@2
   560
	*/
williamr@2
   561
	IMPORT_C const TDesC8& OptionalData() const;
williamr@2
   562
williamr@2
   563
	/**
williamr@2
   564
	Tests whether this CCompressedVideoFormat is identical to aOther or not.
williamr@2
   565
	@return "ETrue if the two objects are identical, EFalse if not."
williamr@2
   566
	*/
williamr@2
   567
	IMPORT_C TBool operator==(const CCompressedVideoFormat& aOther) const;
williamr@2
   568
protected:
williamr@2
   569
    /**     
williamr@2
   570
    @internalTechnology
williamr@2
   571
    */
williamr@2
   572
	CCompressedVideoFormat();
williamr@2
   573
williamr@2
   574
    /**     
williamr@2
   575
    @internalTechnology
williamr@2
   576
    */
williamr@2
   577
	void ConstructL(const TDesC8& aMimeType, const TDesC8& aOptionalData);
williamr@2
   578
private:
williamr@2
   579
	HBufC8* iMimeType;
williamr@2
   580
	HBufC8* iOptionalData;
williamr@2
   581
	};
williamr@2
   582
williamr@2
   583
williamr@2
   584
/**
williamr@2
   585
Specifies the HRD/VBV parameters used when 3GPP TS 26.234 annex G HRD/VBV settings are used (EHrdVbv3GPP). 
williamr@2
   586
See TS 26.234 Release 5 for details.
williamr@2
   587
@publishedAll
williamr@2
   588
@released
williamr@2
   589
*/
williamr@2
   590
class T3gppHrdVbvParams
williamr@2
   591
	{
williamr@2
   592
public:
williamr@2
   593
	/** Initial pre-decoder buffering period. */
williamr@2
   594
	TTimeIntervalMicroSeconds iInitialPreDecoderBufferPeriod;
williamr@2
   595
williamr@2
   596
	/** Initial post-decoder buffering period. */
williamr@2
   597
	TTimeIntervalMicroSeconds iInitialPostDecoderBufferPeriod;
williamr@2
   598
williamr@2
   599
	/** Hypothetical pre-decoder buffer size, in bytes. */
williamr@2
   600
	TUint iPreDecoderBufferSize;
williamr@2
   601
williamr@2
   602
	/** Peak decoding byte rate. By default, the peak decoding byte rate is 
williamr@2
   603
	defined according to the video coding profile and level in use. */
williamr@2
   604
	TUint iPeakDecodingByteRate;
williamr@2
   605
williamr@2
   606
	/** Decoding macroblock rate. The default decoding macroblock rate is defined 
williamr@2
   607
	according to the video coding profile and level in use. */
williamr@2
   608
	TUint iDecodingMacroblockRate;
williamr@2
   609
	};
williamr@2
   610
williamr@2
   611
williamr@2
   612
/**
williamr@2
   613
YUV to RGB post-processing options.
williamr@2
   614
@publishedAll
williamr@2
   615
@released
williamr@2
   616
*/
williamr@2
   617
class TYuvToRgbOptions
williamr@2
   618
	{
williamr@2
   619
public:
williamr@2
   620
	/**
williamr@2
   621
	Lightness setting. The value range is [-100 … 100], with -100 corresponding to minimum setting, 
williamr@2
   622
	100 to maximum setting, and 0 to no change in lightness. The actual lightness change formula 
williamr@2
   623
	used is hardware device specific.
williamr@2
   624
	*/
williamr@2
   625
	TInt iLightness;
williamr@2
   626
williamr@2
   627
	/**
williamr@2
   628
	Saturation setting. The value range is [-100 … 100], with -100 corresponding to minimum setting, 
williamr@2
   629
	100 to maximum setting, and 0 to no change in saturation. The actual saturation formula used 
williamr@2
   630
	is hardware device specific.
williamr@2
   631
	*/
williamr@2
   632
	TInt iSaturation;
williamr@2
   633
williamr@2
   634
	/**
williamr@2
   635
	Contrast setting. The value range is [-100 … 100], with -100 corresponding to minimum setting, 
williamr@2
   636
	100 to maximum setting, and 0 to no change in contrast. The actual contrast change formula 
williamr@2
   637
	used is hardware device specific.
williamr@2
   638
	*/
williamr@2
   639
	TInt iContrast;
williamr@2
   640
williamr@2
   641
	/**
williamr@2
   642
	Gamma setting for conversion. Ignored if the converter does not support gamma correction. 
williamr@2
   643
	The gamma correction is defined as x' = x^(1/g), where x' refers to the corrected value, 
williamr@2
   644
	x to the original input value and g to this field. Gamma correction is performed on the RGB values. 
williamr@2
   645
	Set gamma to 1.0 to disable gamma correction.
williamr@2
   646
	*/
williamr@2
   647
	TReal iGamma;
williamr@2
   648
williamr@2
   649
	/**
williamr@2
   650
	The dithering type to use.
williamr@2
   651
	*/
williamr@2
   652
	TDitherType iDitherType;
williamr@2
   653
	};
williamr@2
   654
williamr@2
   655
/**
williamr@2
   656
Pre-processing options for color enhancement. 
williamr@2
   657
The value ranges have been chosen to match those in the Onboard Camera API.
williamr@2
   658
@publishedAll
williamr@2
   659
@released
williamr@2
   660
*/
williamr@2
   661
class TColorEnhancementOptions
williamr@2
   662
	{
williamr@2
   663
public:
williamr@2
   664
	/**
williamr@2
   665
	Lightness setting. The value range is [-100 … 100], with -100 corresponding to minimum setting, 
williamr@2
   666
	100 to maximum setting, and 0 to no change in lightness.
williamr@2
   667
	*/
williamr@2
   668
	TInt iLightness;
williamr@2
   669
williamr@2
   670
	/**
williamr@2
   671
	Saturation setting. The value range is [-100 … 100], with -100 corresponding to minimum setting, 
williamr@2
   672
	100 to maximum setting, and 0 to no change in saturation.
williamr@2
   673
	*/
williamr@2
   674
	TInt iSaturation;
williamr@2
   675
williamr@2
   676
	/**
williamr@2
   677
	Contrast setting. The value range is [-100 … 100], with -100 corresponding to minimum setting, 
williamr@2
   678
	100 to maximum setting, and 0 to no change in contrast.
williamr@2
   679
	*/
williamr@2
   680
	TInt iContrast;
williamr@2
   681
	};
williamr@2
   682
williamr@2
   683
/**
williamr@2
   684
Describes the YUV to RGB color conversion capabilities of a post-processor.
williamr@2
   685
@publishedAll
williamr@2
   686
@released
williamr@2
   687
*/
williamr@2
   688
class TYuvToRgbCapabilities
williamr@2
   689
	{
williamr@2
   690
public:
williamr@2
   691
	/**
williamr@2
   692
	Input YUV sampling patterns supported, a bitfield combination (bitwise OR) of TYuvSamplingPattern.
williamr@2
   693
	*/
williamr@2
   694
	TUint32 iSamplingPatterns;
williamr@2
   695
williamr@2
   696
 	/**
williamr@2
   697
	YUV to RGB conversion coefficients supported, a bitfield combination of TYuvCoefficients.
williamr@2
   698
	*/
williamr@2
   699
	TUint32 iCoefficients;
williamr@2
   700
williamr@2
   701
 	/**
williamr@2
   702
	Output RGB formats supported, a bitfield combination of TRgbFormat.
williamr@2
   703
	*/
williamr@2
   704
	TUint32 iRgbFormats;
williamr@2
   705
williamr@2
   706
 	/**
williamr@2
   707
	True if lightness control is supported.
williamr@2
   708
	*/
williamr@2
   709
	TBool iLightnessControl;
williamr@2
   710
williamr@2
   711
 	/**
williamr@2
   712
	True if saturation control is supported.
williamr@2
   713
	*/
williamr@2
   714
	TBool iSaturationControl;
williamr@2
   715
williamr@2
   716
 	/**
williamr@2
   717
	True if contrast control is supported.
williamr@2
   718
	*/
williamr@2
   719
	TBool iContrastControl;
williamr@2
   720
williamr@2
   721
 	/**
williamr@2
   722
	True if gamma correction is supported.
williamr@2
   723
	*/
williamr@2
   724
	TBool iGammaCorrection;
williamr@2
   725
williamr@2
   726
 	/**
williamr@2
   727
	Dithering types supported, a bitfield combination of TDitherType.
williamr@2
   728
	*/
williamr@2
   729
	TUint32 iDitherTypes;
williamr@2
   730
	};
williamr@2
   731
williamr@2
   732
/**
williamr@2
   733
Specifies the YUV-to-YUV conversion capabilities for a plug-in.
williamr@2
   734
@publishedAll
williamr@2
   735
@released
williamr@2
   736
*/
williamr@2
   737
class TYuvToYuvCapabilities
williamr@2
   738
	{
williamr@2
   739
public:
williamr@2
   740
	/**
williamr@2
   741
	The YUV sampling patterns supported for input data, a combination (binary OR) of values from TYuvSamplingPatterns.
williamr@2
   742
	*/
williamr@2
   743
	TUint32 iInputSamplingPatterns;
williamr@2
   744
williamr@2
   745
	/**
williamr@2
   746
	The YUV data layouts supported for input data, a combination (binary OR) of values from TYuvDataLayout.
williamr@2
   747
	*/
williamr@2
   748
	TUint32 iInputDataLayouts;
williamr@2
   749
williamr@2
   750
	/**
williamr@2
   751
	The YUV sampling patterns supported for output data, a combination (binary OR) of values from TYuvSamplingPatterns.
williamr@2
   752
	*/
williamr@2
   753
	TUint32 iOutputSamplingPatterns;
williamr@2
   754
williamr@2
   755
	/**
williamr@2
   756
	The YUV data layouts supported for output data, a combination (binary OR) of values from TYuvDataLayout.
williamr@2
   757
	*/
williamr@2
   758
	TUint32 iOutputDataLayouts;
williamr@2
   759
	};
williamr@2
   760
williamr@2
   761
/**
williamr@2
   762
Structure to combine a picture rate and size.  Used when defining the maximum rate/size combinations
williamr@2
   763
available.
williamr@2
   764
@publishedAll
williamr@2
   765
@released
williamr@2
   766
*/
williamr@2
   767
class TPictureRateAndSize
williamr@2
   768
	{
williamr@2
   769
public:
williamr@2
   770
	/** The picture rate. */
williamr@2
   771
	TReal iPictureRate;
williamr@2
   772
williamr@2
   773
	/** The picture size. */
williamr@2
   774
	TSize iPictureSize;
williamr@2
   775
	};
williamr@2
   776
williamr@2
   777
/**
williamr@2
   778
CMMFVideoHwDevice is a base class for all video hardware devices.
williamr@2
   779
@publishedAll
williamr@2
   780
@released
williamr@2
   781
*/
williamr@2
   782
class CMMFVideoHwDevice : public CBase
williamr@2
   783
	{
williamr@2
   784
public:
williamr@2
   785
	/**
williamr@2
   786
	Retrieves a custom interface to the device.
williamr@2
   787
	@param  "aInterface"	"Interface UID, defined with the custom interface."
williamr@2
   788
	@return "Pointer to the interface implementation, or NULL if the device does not 
williamr@2
   789
			implement the interface requested. The return value must be cast to the 
williamr@2
   790
			correct type by the user."
williamr@2
   791
	*/
williamr@2
   792
	virtual TAny* CustomInterface(TUid aInterface) = 0;
williamr@2
   793
	};
williamr@2
   794
williamr@2
   795
williamr@2
   796
williamr@2
   797
/**
williamr@2
   798
Defines the interface that video clock sources must to implement.
williamr@2
   799
williamr@2
   800
A clock source can be used to synchronize video processing to some other processing entity, 
williamr@2
   801
for example an audio stream.  The clock source is created and controlled by the DevVideo client, 
williamr@2
   802
and passed to the video hwdevices via the DevVideo interface. This allows the hwdevice to query 
williamr@2
   803
the current stream time, so it can ascertain which frame should be processed at any given moment.
williamr@2
   804
williamr@2
   805
"Stream time" is defined as the current position in the media stream. For example, when playing
williamr@2
   806
a video clip, the stream time will always equal the current position in the clip. So, when the 
williamr@2
   807
clip is repositioned, the stream time will be equal to the new clip position.  When the clip is
williamr@2
   808
paused, the stream time will pause too.
williamr@2
   809
williamr@2
   810
Many hwdevice implementations will use extra threads to perform the video processing, so it is
williamr@2
   811
essential that all implementations of the MMMFClockSource interface can be used from multiple 
williamr@2
   812
threads.  A hwdevice that receives a clock source from the DevVideo client must be able to
williamr@2
   813
assume that it can pass a pointer to the clock source object into another thread and use the 
williamr@2
   814
object directly from there.
williamr@2
   815
williamr@2
   816
All clock source implementations must protect the methods defined in the MMMFClockSource interface
williamr@2
   817
so they can be called from any thread within the current process.  Practically speaking, this means
williamr@2
   818
using mutexes and critical sections to protect member data from being accessed from multiple threads
williamr@2
   819
simultaneously.  Also, any use of thread-specific handles (e.g. a CMMFDevSound object) must be 
williamr@2
   820
avoided from within these methods.
williamr@2
   821
williamr@2
   822
It can be assumed that any methods defined outside the MMMFClockSource interface (for example 
williamr@2
   823
methods used to control the clock source) will only be executed within the DevVideo client's thread,
williamr@2
   824
so do not require protection.
williamr@2
   825
williamr@2
   826
@publishedAll
williamr@2
   827
@released
williamr@2
   828
*/
williamr@2
   829
class MMMFClockSource
williamr@2
   830
	{
williamr@2
   831
public:
williamr@2
   832
	/**
williamr@2
   833
	Retrieves a custom interface for the clock source.
williamr@2
   834
williamr@2
   835
	This method can be called from any thread running inside the process in which the concrete
williamr@2
   836
	clock source was created.  Note that this does not mean that all methods in the custom 
williamr@2
   837
	interface can be called from any thread - that will be specified by the custom interface itself.
williamr@2
   838
williamr@2
   839
	@param  "aInterface"	"Interface UID, defined by the entity specifying the interface."
williamr@2
   840
	@return "Pointer to the interface implementation, or NULL if the interface is not available. 
williamr@2
   841
			The pointer must be cast to the appropriate interface class."
williamr@2
   842
	*/
williamr@2
   843
	virtual TAny* CustomInterface(TUid aInterface) = 0;
williamr@2
   844
williamr@2
   845
	/**
williamr@2
   846
	Retrieves the current stream time.  For example, if a clip is being played, the stream time will
williamr@2
   847
	be equal to the current position in the clip.
williamr@2
   848
williamr@2
   849
	This method can be called from any thread running inside the process in which the concrete clock
williamr@2
   850
	source was created.
williamr@2
   851
williamr@2
   852
	@return "The number of microseconds passed in the clock compared to the reference time."
williamr@2
   853
	*/
williamr@2
   854
	virtual TTimeIntervalMicroSeconds Time() = 0;
williamr@2
   855
	};
williamr@2
   856
williamr@2
   857
/**
williamr@2
   858
The CSystemClockSource provides a basic clock source implementation based on the system clock. 
williamr@2
   859
It will count microseconds since the object was created or Reset() was last called, and return 
williamr@2
   860
that count from Time(). It does not implement any custom interfaces.
williamr@2
   861
@publishedAll
williamr@2
   862
@released
williamr@2
   863
*/
williamr@2
   864
class CSystemClockSource : public CBase, public MMMFClockSource
williamr@2
   865
	{
williamr@2
   866
public:
williamr@2
   867
	/**
williamr@2
   868
	Creates a new CSystemClockSource object.
williamr@2
   869
	@return "A new clock source object."
williamr@2
   870
	@leave  "This method may leave with one of the system-wide error codes."
williamr@2
   871
	*/
williamr@2
   872
	IMPORT_C static CSystemClockSource* NewL();
williamr@2
   873
williamr@2
   874
	/**
williamr@2
   875
	Destructor.
williamr@2
   876
	*/
williamr@2
   877
	IMPORT_C ~CSystemClockSource();
williamr@2
   878
williamr@2
   879
// Control methods
williamr@2
   880
	/**
williamr@2
   881
	Resets the clock source to zero. Typically called by the DevVideo client at stream start.
williamr@2
   882
	*/
williamr@2
   883
	IMPORT_C void Reset();
williamr@2
   884
williamr@2
   885
	/**
williamr@2
   886
	Resets the clock source to a user-defined offset. Typically called by the DevVideo client 
williamr@2
   887
	when seeking in a file.
williamr@2
   888
williamr@2
   889
	@param "aOffset"	"The clock offset."
williamr@2
   890
	*/
williamr@2
   891
	IMPORT_C void Reset(const TTimeIntervalMicroSeconds& aOffset);
williamr@2
   892
williamr@2
   893
	/**
williamr@2
   894
	Suspends the clock source. The clock time will not increment until the clock has been resumed.
williamr@2
   895
	This method is used when pausing playback.
williamr@2
   896
	*/
williamr@2
   897
	IMPORT_C void Suspend();
williamr@2
   898
williamr@2
   899
	/**
williamr@2
   900
	Resumes the clock source after a Suspend() method call. This method is used when resuming playback.
williamr@2
   901
	*/
williamr@2
   902
	IMPORT_C void Resume();
williamr@2
   903
williamr@2
   904
// Implementation of MMMFClockSource
williamr@2
   905
	/** 
williamr@2
   906
	No custom interfaces are implemented by this clock source, so this method will always return NULL.
williamr@2
   907
	@param "aInterface"	"The interface"
williamr@2
   908
	@return "NULL"
williamr@2
   909
	*/
williamr@2
   910
	virtual TAny* CustomInterface(TUid aInterface);
williamr@2
   911
	/**
williamr@2
   912
	Retrieves the time that has elapsed since Reset() was last called, subtracting any time 
williamr@2
   913
	during which the clock was suspended.
williamr@2
   914
williamr@2
   915
	@return "The number of microseconds that have elapsed in the stream."
williamr@2
   916
	*/
williamr@2
   917
	virtual TTimeIntervalMicroSeconds Time();
williamr@2
   918
williamr@2
   919
private:
williamr@2
   920
	CSystemClockSource();
williamr@2
   921
	void ConstructL();
williamr@2
   922
private:
williamr@2
   923
	TTime iStartTime;
williamr@2
   924
	TTime iCurrentTime;
williamr@2
   925
williamr@2
   926
	TTimeIntervalMicroSeconds iOffset;
williamr@2
   927
williamr@2
   928
	TTime iTimeWhenSuspended;
williamr@2
   929
	TTimeIntervalMicroSeconds iTimeSuspended;
williamr@2
   930
	TBool iSuspended;
williamr@2
   931
	
williamr@2
   932
	RCriticalSection iCriticalSection;
williamr@2
   933
	};
williamr@2
   934
williamr@2
   935
williamr@2
   936
/**
williamr@2
   937
Observer class to be used with class CMMFClockSourcePeriodicUtility.
williamr@2
   938
@publishedAll
williamr@2
   939
@released
williamr@2
   940
*/
williamr@2
   941
class MMMFClockSourcePeriodicUtilityObserver
williamr@2
   942
	{
williamr@2
   943
public:
williamr@2
   944
	/**
williamr@2
   945
	Notifies the observer that the specified period has elapsed.
williamr@2
   946
	@param	"aTime"	"The current time, queried from the clock source."
williamr@2
   947
	*/
williamr@2
   948
	virtual void MmcspuoTick(const TTimeIntervalMicroSeconds& aTime) = 0;
williamr@2
   949
	};
williamr@2
   950
williamr@2
   951
/**
williamr@2
   952
Utility class that can be used by video HW devices to receive periodic callbacks with the current time.
williamr@2
   953
Note that the exact timing of the callbacks cannot be guaranteed due to other things pre-empting 
williamr@2
   954
the execution of the active object or thread.
williamr@2
   955
@publishedAll
williamr@2
   956
@released
williamr@2
   957
*/
williamr@2
   958
class CMMFClockSourcePeriodicUtility : public CBase
williamr@2
   959
	{
williamr@2
   960
public:
williamr@2
   961
	/**
williamr@2
   962
	Creates a new clock source periodic utility object.
williamr@2
   963
williamr@2
   964
	@param	"aClockSource"	"A reference to the clock source to be used to query the current time."
williamr@2
   965
	@param	"aObserver"		"A reference to the observer of the utility that will receive callbacks  
williamr@2
   966
							each time the specified period elapses."
williamr@2
   967
	@return "A new clock source periodic utility object."
williamr@2
   968
	@leave	"The method will leave if an error occurs."
williamr@2
   969
	*/
williamr@2
   970
	IMPORT_C static CMMFClockSourcePeriodicUtility* NewL(MMMFClockSource& aClockSource, MMMFClockSourcePeriodicUtilityObserver& aObserver);
williamr@2
   971
williamr@2
   972
	/**
williamr@2
   973
	Starts the clock source periodic utility.  The utility will call MmcspuoTick on its observer 
williamr@2
   974
	every aPeriod microseconds until Stop() is called.  Note that the utility will not stop 
williamr@2
   975
	automatically when the clock source is stopped.
williamr@2
   976
williamr@2
   977
	@param  "aPeriod" "Defines the period with which the observer will receive callbacks."
williamr@2
   978
	*/
williamr@2
   979
	IMPORT_C void Start(TTimeIntervalMicroSeconds32 aPeriod);
williamr@2
   980
williamr@2
   981
	/**
williamr@2
   982
	Stops the clock source periodic utility.  No more callbacks will be made after this method has 
williamr@2
   983
	been called.
williamr@2
   984
	*/
williamr@2
   985
	IMPORT_C void Stop();
williamr@2
   986
	
williamr@2
   987
	/**
williamr@2
   988
	Destructor.
williamr@2
   989
	*/
williamr@2
   990
	IMPORT_C ~CMMFClockSourcePeriodicUtility();
williamr@2
   991
private:
williamr@2
   992
	CMMFClockSourcePeriodicUtility(MMMFClockSource& aClockSource, MMMFClockSourcePeriodicUtilityObserver& aObserver);
williamr@2
   993
	void ConstructL();
williamr@2
   994
	static TInt Callback(TAny* aAny);
williamr@2
   995
	void DoCallback();
williamr@2
   996
private:
williamr@2
   997
	CPeriodic* iTimer;
williamr@2
   998
	MMMFClockSource& iClockSource;
williamr@2
   999
	MMMFClockSourcePeriodicUtilityObserver& iObserver;
williamr@2
  1000
	};
williamr@2
  1001
williamr@2
  1002
williamr@2
  1003
/**
williamr@2
  1004
Specifies the encoder buffering options.
williamr@2
  1005
@publishedAll
williamr@2
  1006
@released
williamr@2
  1007
*/
williamr@2
  1008
class TEncoderBufferOptions
williamr@2
  1009
	{
williamr@2
  1010
public:
williamr@2
  1011
	/** 
williamr@2
  1012
	The maximum number of pictures in the pre-encoder buffer. 
williamr@2
  1013
	*/
williamr@2
  1014
	TUint iMaxPreEncoderBufferPictures;
williamr@2
  1015
williamr@2
  1016
	/** 
williamr@2
  1017
	The HRD/VBV specification that shall be fullfilled. 
williamr@2
  1018
	*/
williamr@2
  1019
	THrdVbvSpecification iHrdVbvSpec;
williamr@2
  1020
williamr@2
  1021
	/**
williamr@2
  1022
	The HRD/VBV buffering parameters. The data format depends on the parameters chosen. For 
williamr@2
  1023
	3GPP TS 26.234 parameters (iHrdVbvSpec=EHrdVbv3GPP), the data in the descriptor is a package of type 
williamr@2
  1024
	TPckC<T3gppHrdVbvParams> (see T3gppHrdVbvParams). If no HRD/VBV parameters are used, the 
williamr@2
  1025
	descriptor is empty.
williamr@2
  1026
	*/
williamr@2
  1027
	TPtrC8 iHrdVbvParams;
williamr@2
  1028
williamr@2
  1029
	/**
williamr@2
  1030
	The maximum size of an output buffer, in bytes. Use KMaxTUint for an unlimited size.
williamr@2
  1031
	*/
williamr@2
  1032
	TUint iMaxOutputBufferSize;
williamr@2
  1033
williamr@2
  1034
	/**
williamr@2
  1035
	The maximum size of a coded picture, in bytes. Use KMaxTUint for an unlimited size.
williamr@2
  1036
	*/
williamr@2
  1037
	TUint iMaxCodedPictureSize;
williamr@2
  1038
williamr@2
  1039
	/**
williamr@2
  1040
	The maximum size of a coded video segment, in bytes. Use KMaxTUint for an unlimited size.
williamr@2
  1041
	*/
williamr@2
  1042
	TUint iMaxCodedSegmentSize;
williamr@2
  1043
williamr@2
  1044
	/**
williamr@2
  1045
	The mimimum number of output buffers.
williamr@2
  1046
	*/
williamr@2
  1047
	TUint iMinNumOutputBuffers;
williamr@2
  1048
	};
williamr@2
  1049
williamr@2
  1050
/**
williamr@2
  1051
Specifies the video encoder bit-rate control options.
williamr@2
  1052
@publishedAll
williamr@2
  1053
@released
williamr@2
  1054
*/
williamr@2
  1055
class TRateControlOptions
williamr@2
  1056
	{
williamr@2
  1057
public:
williamr@2
  1058
	/**
williamr@2
  1059
	Defines the bit-rate control type.
williamr@2
  1060
	*/
williamr@2
  1061
	TBitrateControlType iControl;
williamr@2
  1062
williamr@2
  1063
	/**
williamr@2
  1064
	The target bit-rate, in bits per second. Used if bit-rate control type is EBrControlStream. 
williamr@2
  1065
	If specified for an enhancement layer, the target bit-rate includes all lower layers. For example, 
williamr@2
  1066
	if the client uses two layers, with the base layer using 64000 bps and the whole stream 192000 bps, 
williamr@2
  1067
	this field is set to 64000 for layer zero and 192000 for layer one.
williamr@2
  1068
	*/
williamr@2
  1069
	TUint iBitrate;
williamr@2
  1070
williamr@2
  1071
	/**
williamr@2
  1072
	The target picture quality. The value range is [0…100], with 0 corresponding to minimum quality 
williamr@2
  1073
	and 100 to lossless coding (or the closest equivalent supported).
williamr@2
  1074
	*/
williamr@2
  1075
	TUint iPictureQuality;
williamr@2
  1076
williamr@2
  1077
	/**
williamr@2
  1078
	The target picture rate, in pictures per second. If specified for an enhancement layer, the target 
williamr@2
  1079
	frame rate includes all lower layers.
williamr@2
  1080
	*/
williamr@2
  1081
	TReal iPictureRate;
williamr@2
  1082
	
williamr@2
  1083
	/**
williamr@2
  1084
	The quality/temporal tradeoff for bit-rate control. The value range is [0.0…1.0]. Value 0.0 
williamr@2
  1085
	specifies that picture quality should be maintained as well as possible, sacrificing picture rate. 
williamr@2
  1086
	Value 1.0 specifies that picture rate should be maintained as well as possible, sacrificing 
williamr@2
  1087
	picture quality.
williamr@2
  1088
	*/
williamr@2
  1089
	TReal iQualityTemporalTradeoff;
williamr@2
  1090
williamr@2
  1091
	/**
williamr@2
  1092
	The latency/quality tradeoff for bit-rate control. The value range is [0.0…1.0]. Value 0.0 
williamr@2
  1093
	specifies that the transmission delay and the decoder input buffer occupancy level caused by 
williamr@2
  1094
	the bit-rate control is minimized, i.e. the actual coded bit-rate follows the target bit-rate 
williamr@2
  1095
	as closely as possible. 1.0 specifies that the transmission delay caused by the bit-rate control 
williamr@2
  1096
	should be as high as needed to guarantee a constant picture quality and frame rate as long as 
williamr@2
  1097
	the coded data conforms to the given HRD/VBV parameters (if any).
williamr@2
  1098
	*/
williamr@2
  1099
	TReal iLatencyQualityTradeoff;
williamr@2
  1100
	};
williamr@2
  1101
	
williamr@2
  1102
/**
williamr@2
  1103
Custom interface Uid for setting up the DevVideo hw device adapter
williamr@2
  1104
*/
williamr@2
  1105
const TInt	KUidDevVideoHwDeviceAdapterSetup = 0x102737EF;
williamr@2
  1106
williamr@2
  1107
/**
williamr@2
  1108
Custom interface for setting up the DevVideo hw device adapter
williamr@2
  1109
@publishedPartner
williamr@2
  1110
@prototype
williamr@2
  1111
*/	
williamr@2
  1112
class MDevVideoHwDeviceAdapterSetup 
williamr@2
  1113
	{
williamr@2
  1114
public:
williamr@2
  1115
	/**
williamr@2
  1116
	Set the Uid of the processing unit into the hw device adapter
williamr@2
  1117
	*/
williamr@2
  1118
	virtual void LoadProcessingUnitL(const CImplementationInformation& aImplInfo) = 0;
williamr@2
  1119
	};
williamr@2
  1120
	
williamr@2
  1121
#include <mmf/devvideo/devvideobase.inl>
williamr@2
  1122
williamr@2
  1123
#endif