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