1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __DEVVIDEOBASE_H__
17 #define __DEVVIDEOBASE_H__
21 #include <mmf/devvideo/devvideoconstants.h>
22 #include <ecom/ecom.h>
23 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
24 #include <mmf/devvideo/devvideohwdeviceadaptersetup.h>
29 Panic utility function
32 LOCAL_C void DevVideoPanic(TInt aReason)
34 User::Panic(KDevVideoPanicCategory, aReason);
39 A hardware device ID that identifies an instantiated video hardware device.
40 Used in the playback and recording APIs to identify the component being controlled.
44 typedef TInt THwDeviceId;
48 Defines a supported scale factor for a scaling pre-processor or post-processor.
50 The scale factor is defined as iScaleNum/iScaleDenom,
51 where the values are positive integers and relatively prime.
58 /**Scale factor numerator. Non-zero.*/
60 /**Scale factor denominator. Non-zero.*/
66 A custom YUV/RGB conversion matrix. The same matrix structure is used for both conversion directions.
70 class TYuvConversionMatrix
74 Post-multiplication offset, a three-item vector.
79 Multiplication matrix, a 3x3 matrix. iMatrix[3*i+j] contains the j:th item on the i:th row of the matrix.
84 Pre-multiplication offset, a three-item vector.
91 YUV (YCbCr) uncompressed image data format.
99 The YUV/RGB conversion coefficients to use
101 TYuvCoefficients iCoefficients;
104 Luminance/chrominance sampling pattern.
106 TYuvSamplingPattern iPattern;
109 Data layout, specifies whether the data is stored in a planar or interleaved mode.
111 TYuvDataLayout iDataLayout;
114 Custom YUV to RGB conversion matrix to use.
115 Valid only if custom conversion matrix is used (iCoefficients is ECustomYuvMatrix).
117 TYuvConversionMatrix* iYuv2RgbMatrix;
120 Custom RGB to YUV conversion matrix to use.
121 Valid only if custom conversion matrix is used (iCoefficients is ECustomYuvMatrix).
123 TYuvConversionMatrix* iRgb2YuvMatrix;
126 Pixel aspect ratio numerator.
128 TUint iAspectRatioNum;
131 Pixel aspect ratio denominator.
132 The aspect ratio is defined as iAspectRatioNum/iAspectRatioDenom,
133 where the values are positive integers and relatively prime.
135 TUint iAspectRatioDenom;
138 Tests whether this TYuvFormat object is the same as aOther.
139 @param "aOther" "The object to compare."
140 @return "ETrue if they are the same, EFalse if not."
142 inline TBool operator==(const TYuvFormat& aOther) const;
146 Defines an uncompressed video format.
147 This structure is mainly just a combination of YUV and RGB formats, defined to simplify the rest of the API.
151 class TUncompressedVideoFormat
155 The image data format. The validity of the rest of the fields depends on the data format used.
157 TImageDataFormat iDataFormat;
161 YUV picture format details, valid if iDataFormat is EYuvRawData.
163 TYuvFormat iYuvFormat;
166 RGB picture format details, valid if iDataFormat is ERgbRawData or ERgbFbsBitmap.
168 TRgbFormat iRgbFormat;
172 Tests whether this TUncompressedVideoFormat object is the same as aOther.
173 @param "aOther" "The object to compare."
174 @return "ETrue if they are the same, EFalse if not."
176 inline TBool operator==(const TUncompressedVideoFormat& aOther) const;
179 Sets this object equal to aOther.
180 @param "aOther" "The object to clone."
182 inline void operator=(const TUncompressedVideoFormat& aOther);
187 Uncompressed picture data for one video picture.
195 The image data format. The validity of the rest of the fields depends on the data format used.
197 TImageDataFormat iDataFormat;
200 Image data size in pixels. In decoder output pictures the actual active picture area may be smaller,
201 this is indicated using TVideoPicture.iCropRect.
208 Pointer to raw image data. Valid if iDataFormat is ERgbRawData or iYuvRawData.
209 The data layout depends on the format used.
214 Pointer to an RGB bitmap. Valid if iDataFormat is ERgbFbsBitmap.
216 CFbsBitmap* iRgbBitmap;
219 Buffer number of current buffer for composition that is used when submitting a surface update. Valid if iDataFormat is set to ESurfaceBuffer
226 Header information for one decoded picture.
227 The header information is returned alongside with decoded pictures,
228 or it can be read separately when DevVideoPlay is being initialized.
233 class TVideoPictureHeader
240 /** Decoding timestamp is valid
242 EDecodingTimestamp = 0x00000001,
243 /** Presentation timestamp is valid
245 EPresentationTimestamp = 0x00000002,
246 /** Pre-decoder buffersize is valid
248 EPreDecoderBufferSize = 0x00000004,
249 /** Post-decoder buffersize is valid
251 EPostDecoderBufferSize = 0x00000008,
252 /** Picture number field is valid
254 EPictureNumber = 0x00000010,
255 /** Layered coding is used and the layer number field is valid
257 ELayeredCoding = 0x00000020,
258 /** Supplemental data is available
260 ESupplementalData = 0x00000040,
261 /** Random access buffering period is valid
263 ERandomAccessBufferingPeriod = 0x00000080,
264 /** Random access buffer occupancy is valid
266 ERandomAccessBufferOccupancy = 0x00000100
270 Header options. The value is a bitfield combined from values from THeaderOptions.
275 Video codec profile used. Use -1 if not applicable or not defined.
280 Video codec level. Use -1 if not applicable or not defined.
285 Video codec version. Use -1 if not applicable or not defined.
290 Pointer to a descriptor that contains optional codec-specific features. Set to NULL if not used.
291 The format of the data is codec-specific. The pointer and descriptor data are valid as long as
292 the header information structure is valid.
294 const TDesC8* iOptional;
297 Image size in memory, in pixels. May be larger than the displayed picture.
302 The portion of the full image to display.
304 TRect iDisplayedRect;
307 Picture presentation timestamp. Valid only if EPresentationTimestamp is set in the options.
308 The clock frequency is stored in the timestamp structure.
310 TTimeIntervalMicroSeconds iPresentationTimestamp;
313 Picture decoding timestamp. Valid only if EDecodingTimestamp is set in the options.
315 TTimeIntervalMicroSeconds iDecodingTimestamp;
318 Expected pre-decoder buffer size in bytes. Valid only if EPreDecoderBufferSize is set in the options.
320 TUint iPreDecoderBufferSize;
323 Expected post-decoder buffer size in bytes. Valid only if EPostDecoderBufferSize is set in the options.
324 It is assumed that a frame buffer to be displayed is returned before the decoding of the next frame
325 is started. If this is not the case, a larger post-decoder buffer may actually be needed.
327 TUint iPostDecoderBufferSize;
330 Picture number, valid only if EPictureNumber is set in the options.
331 This field is used to indicate one of the following: picture number or long-term picture index for H.263,
332 vop_id for MPEG-4 Visual, picture number or long-term picture number for AVC.
334 TUint iPictureNumber;
337 Picture layer number if layered coding is used, valid only if ELayeredCoding is set in the options.
338 Layers are numbered [0…n-1], where n is the number of layers available. The first layer (layer zero)
339 is the base layer, it can be decoded independently from the other layers, and it has the lowest total bitrate.
344 Picture supplemental data, valid only if ESupplementalData is set in the options.
345 The pointer and descriptor data are valid as long as the header information structure is valid.
347 const TDesC8* iSupplementalData;
350 True if the picture is a random-accessible picture.
352 TBool iIsRandomAccessible;
355 The expected initial pre-decoder buffering period before starting the playback from this picture.
356 Valid only if this picture is randomly accessible (iIsRandomAccessible is true) and
357 ERandomAccessBufferingPeriod is set in the options. MPEG-2 and H.264 | MPEG-4 AVC use this value.
359 TTimeIntervalMicroSeconds32 iRandomAccessBufferingPeriod;
362 The expected initial pre-decoder buffer occupancy in bytes before starting the playback
363 from this picture. Valid if this picture is randomly accessible (iIsRandomAccessible is true) and
364 ERandomAccessBufferOccupancy is set in the options. MPEG-4 Visual uses this value.
366 TUint iRandomAccessBufferOccupancy;
372 One uncompressed video picture. Used for both decoded picture output as well as uncompressed picture input.
382 enum TVideoPictureOptions
384 /** The timestamp field is valid.
386 ETimestamp = 0x00000001,
387 /** The crop rectangle field is valid.
389 ECropRect = 0x00000002,
390 /** Picture header information is present.
392 EHeader = 0x00000004,
393 /** The layer bit count targets field is valid.
395 EBitTargets = 0x00000008,
396 /** Set in encoder input to request an instantaneous decoder refresh.
397 As a response, the encoder should code an intra frame and no consecutive
398 frame should refer to any frame before the encoded intra frame (in coding order).
400 EReqInstantRefresh = 0x00000010,
401 /** Set in encoder input to indicate a scene cut in the picture stream.
403 ESceneCut = 0x00000020,
404 /** Set if a picture effect is in use and the picture effect field is valid.
406 EPictureEffect = 0x00000040,
407 /** Set if picture effect parameters are valid.
409 EEffectParameters = 0x00000080,
410 /** Content protected pictures cannot be displayed on unprotected
411 external displays such as TV-out.
413 EContentProtected = 0x00000100
417 The picture data. The picture data, including all pointers, must remain valid until
418 the picture has been returned to its originator.
423 Picture options. The value is a bitfield combined from values from TVideoPictureOptions.
428 Picture timestamp. Valid if ETimestamp is set in the options.
429 Used for presentation timestamps in video playback and capture timestamps in uncompressed video
430 input for recording. If the timestamp is not specified for decoded video input for playback,
431 the picture is displayed immediately. For decoded video output in playback and uncompressed
432 video input for recording, the timestamp must always be set.
434 TTimeIntervalMicroSeconds iTimestamp;
437 Pan-scan cropping rectangle. Defines the area of the picture used for further processing.
438 Only used for decoded video output.
443 Picture header information. Valid if EHeader is set in the options.
444 Normally this field is only used in decoded pictures returned from the playback API.
445 In that case the header info pointer is valid until the picture is returned to the API.
447 TVideoPictureHeader* iHeader;
450 The target number of bits for each bit-rate scalability layer, valid when EBitTargets is set in the options.
451 Used in video encoding when the caller controls the bit-rate for each picture separately.
452 The field points to a table containing the target number of bits to use for each layer when
453 encoding this picture, starting from the lowest layer. The bit count for an enhancement layer
454 includes all lower layers. For example, if the client uses two layers, and reserves 1.5 kilobits
455 for the base layer and three kilobits for the whole picture, this field is set to {1500, 3000}.
457 RArray<TUint>* iLayerBitRates;
460 The picture effect in use when capturing this picture, valid when EPictureEffect is set in the options.
461 This information can be used when encoding the picture. Note that setting a picture effect does not
462 imply that the encoder should modify the picture data based on the effect. Instead, it can be used as
463 an encoding hint. For example, fade to black implies that the global picture brightness has been decreased,
464 and this knowledge can be used to aid motion prediction.
467 TPictureEffect iEffect;
470 Picture effect parameter for fade to/from black, valid when EEffectParameters is set in the options
471 and iEffect is EEffectFadeFromBlack or EEffectFadeToBlack. The value range is [0…65536], with zero
472 indicating the picture is black and 65536 indicating that the lightness of the picture is unchanged.
473 If the parameter is not given, the caller is unaware of the proper value or the value fluctuates spatially.
478 A pointer for free-form user data. The pointer is set by the module that created the buffer, and is
479 usually used for memory management purposes.
484 A queue link used internally by the MSL video components.
490 Identifies a video picture in feedback messages.
500 /** Unidentified picture. */
502 /** The picture is identified using its temporal reference. */
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.. */
508 /** Picture identified type. */
509 TPictureIdType iIdType;
511 /** The picture identifier. The interpretation of this field depends on the value iIdType */
517 Defines a compressed video format. The format is identified by its MIME type, which may include
518 parameters that describe the used format profile and level. The MIME type used for H.263
519 is video/H263-2000, specified in TS 26.234, and the type for MPEG-4 is video/MP4V-ES, specified in RFC 3016.
524 class CCompressedVideoFormat : public CBase
528 Static factory function for creating new CCompressedVideoFormat objects.
530 @param "aMimeType" "Video codec MIME type, including optional parameters for profile,
531 level and version information. The CCompressedVideoFormat object creates
532 and owns a copy of this buffer and takes care of deallocation."
534 @param "aOptionalData" "Reference to a descriptor that contains optional codec-specific data.
535 Set to KNullDesC8 if not used. [The format of the data is codec-specific, typically
536 a package buffer containing a data structure may be used. The pointer lifetime
537 and validity requirements are specified with each method that uses this structure."
539 @return "Pointer to a fully constructed CCompressedVideoFormat object."
540 @leave "This method may leave with one of the system-wide error codes."
542 IMPORT_C static CCompressedVideoFormat* NewL(const TDesC8& aMimeType, const TDesC8& aOptionalData = KNullDesC8);
545 Static factory function for creating a copy of an existing CCompressedVideoFormat object.
547 @param "aFormat" "The CCompressedVideoFormat object to copy."
549 @return Pointer to a fully constructed CCompressedVideoFormat object.
550 @leave This method may leave with one of the system-wide error codes.
552 IMPORT_C static CCompressedVideoFormat* NewL(const CCompressedVideoFormat& aFormat);
555 Virtual destructor. Destroys iMimeType.
557 IMPORT_C virtual ~CCompressedVideoFormat();
560 Returns the video codec MIME type.
562 @return "Reference to a descriptor that contains the video codec MIME type."
564 IMPORT_C const TDesC8& MimeType() const;
567 Returns the optional data.
569 @return "Reference to a descriptor that contains optional codec-specific data.
570 Zero length if not used. The format of the data is codec-specific, typically a package buffer
571 containing a data structure may be used."
573 IMPORT_C const TDesC8& OptionalData() const;
576 Tests whether this CCompressedVideoFormat is identical to aOther or not.
577 @return "ETrue if the two objects are identical, EFalse if not."
579 IMPORT_C TBool operator==(const CCompressedVideoFormat& aOther) const;
584 CCompressedVideoFormat();
589 void ConstructL(const TDesC8& aMimeType, const TDesC8& aOptionalData);
592 HBufC8* iOptionalData;
597 Specifies the HRD/VBV parameters used when 3GPP TS 26.234 annex G HRD/VBV settings are used (EHrdVbv3GPP).
598 See TS 26.234 Release 5 for details.
602 class T3gppHrdVbvParams
605 /** Initial pre-decoder buffering period. */
606 TTimeIntervalMicroSeconds iInitialPreDecoderBufferPeriod;
608 /** Initial post-decoder buffering period. */
609 TTimeIntervalMicroSeconds iInitialPostDecoderBufferPeriod;
611 /** Hypothetical pre-decoder buffer size, in bytes. */
612 TUint iPreDecoderBufferSize;
614 /** Peak decoding byte rate. By default, the peak decoding byte rate is
615 defined according to the video coding profile and level in use. */
616 TUint iPeakDecodingByteRate;
618 /** Decoding macroblock rate. The default decoding macroblock rate is defined
619 according to the video coding profile and level in use. */
620 TUint iDecodingMacroblockRate;
625 YUV to RGB post-processing options.
629 class TYuvToRgbOptions
633 Lightness setting. The value range is [-100 … 100], with -100 corresponding to minimum setting,
634 100 to maximum setting, and 0 to no change in lightness. The actual lightness change formula
635 used is hardware device specific.
640 Saturation setting. The value range is [-100 … 100], with -100 corresponding to minimum setting,
641 100 to maximum setting, and 0 to no change in saturation. The actual saturation formula used
642 is hardware device specific.
647 Contrast setting. The value range is [-100 … 100], with -100 corresponding to minimum setting,
648 100 to maximum setting, and 0 to no change in contrast. The actual contrast change formula
649 used is hardware device specific.
654 Gamma setting for conversion. Ignored if the converter does not support gamma correction.
655 The gamma correction is defined as x' = x^(1/g), where x' refers to the corrected value,
656 x to the original input value and g to this field. Gamma correction is performed on the RGB values.
657 Set gamma to 1.0 to disable gamma correction.
662 The dithering type to use.
664 TDitherType iDitherType;
668 Pre-processing options for color enhancement.
669 The value ranges have been chosen to match those in the Onboard Camera API.
673 class TColorEnhancementOptions
677 Lightness setting. The value range is [-100 … 100], with -100 corresponding to minimum setting,
678 100 to maximum setting, and 0 to no change in lightness.
683 Saturation setting. The value range is [-100 … 100], with -100 corresponding to minimum setting,
684 100 to maximum setting, and 0 to no change in saturation.
689 Contrast setting. The value range is [-100 … 100], with -100 corresponding to minimum setting,
690 100 to maximum setting, and 0 to no change in contrast.
696 Describes the YUV to RGB color conversion capabilities of a post-processor.
700 class TYuvToRgbCapabilities
704 Input YUV sampling patterns supported, a bitfield combination (bitwise OR) of TYuvSamplingPattern.
706 TUint32 iSamplingPatterns;
709 YUV to RGB conversion coefficients supported, a bitfield combination of TYuvCoefficients.
711 TUint32 iCoefficients;
714 Output RGB formats supported, a bitfield combination of TRgbFormat.
719 True if lightness control is supported.
721 TBool iLightnessControl;
724 True if saturation control is supported.
726 TBool iSaturationControl;
729 True if contrast control is supported.
731 TBool iContrastControl;
734 True if gamma correction is supported.
736 TBool iGammaCorrection;
739 Dithering types supported, a bitfield combination of TDitherType.
741 TUint32 iDitherTypes;
745 Specifies the YUV-to-YUV conversion capabilities for a plug-in.
749 class TYuvToYuvCapabilities
753 The YUV sampling patterns supported for input data, a combination (binary OR) of values from TYuvSamplingPatterns.
755 TUint32 iInputSamplingPatterns;
758 The YUV data layouts supported for input data, a combination (binary OR) of values from TYuvDataLayout.
760 TUint32 iInputDataLayouts;
763 The YUV sampling patterns supported for output data, a combination (binary OR) of values from TYuvSamplingPatterns.
765 TUint32 iOutputSamplingPatterns;
768 The YUV data layouts supported for output data, a combination (binary OR) of values from TYuvDataLayout.
770 TUint32 iOutputDataLayouts;
774 Structure to combine a picture rate and size. Used when defining the maximum rate/size combinations
779 class TPictureRateAndSize
782 /** The picture rate. */
785 /** The picture size. */
790 CMMFVideoHwDevice is a base class for all video hardware devices.
794 class CMMFVideoHwDevice : public CBase
798 Retrieves a custom interface to the device.
799 @param "aInterface" "Interface UID, defined with the custom interface."
800 @return "Pointer to the interface implementation, or NULL if the device does not
801 implement the interface requested. The return value must be cast to the
802 correct type by the user."
804 virtual TAny* CustomInterface(TUid aInterface) = 0;
810 Defines the interface that video clock sources must to implement.
812 A clock source can be used to synchronize video processing to some other processing entity,
813 for example an audio stream. The clock source is created and controlled by the DevVideo client,
814 and passed to the video hwdevices via the DevVideo interface. This allows the hwdevice to query
815 the current stream time, so it can ascertain which frame should be processed at any given moment.
817 "Stream time" is defined as the current position in the media stream. For example, when playing
818 a video clip, the stream time will always equal the current position in the clip. So, when the
819 clip is repositioned, the stream time will be equal to the new clip position. When the clip is
820 paused, the stream time will pause too.
822 Many hwdevice implementations will use extra threads to perform the video processing, so it is
823 essential that all implementations of the MMMFClockSource interface can be used from multiple
824 threads. A hwdevice that receives a clock source from the DevVideo client must be able to
825 assume that it can pass a pointer to the clock source object into another thread and use the
826 object directly from there.
828 All clock source implementations must protect the methods defined in the MMMFClockSource interface
829 so they can be called from any thread within the current process. Practically speaking, this means
830 using mutexes and critical sections to protect member data from being accessed from multiple threads
831 simultaneously. Also, any use of thread-specific handles (e.g. a CMMFDevSound object) must be
832 avoided from within these methods.
834 It can be assumed that any methods defined outside the MMMFClockSource interface (for example
835 methods used to control the clock source) will only be executed within the DevVideo client's thread,
836 so do not require protection.
841 class MMMFClockSource
845 Retrieves a custom interface for the clock source.
847 This method can be called from any thread running inside the process in which the concrete
848 clock source was created. Note that this does not mean that all methods in the custom
849 interface can be called from any thread - that will be specified by the custom interface itself.
851 @param "aInterface" "Interface UID, defined by the entity specifying the interface."
852 @return "Pointer to the interface implementation, or NULL if the interface is not available.
853 The pointer must be cast to the appropriate interface class."
855 virtual TAny* CustomInterface(TUid aInterface) = 0;
858 Retrieves the current stream time. For example, if a clip is being played, the stream time will
859 be equal to the current position in the clip.
861 This method can be called from any thread running inside the process in which the concrete clock
864 @return "The number of microseconds passed in the clock compared to the reference time."
866 virtual TTimeIntervalMicroSeconds Time() = 0;
870 The CSystemClockSource provides a basic clock source implementation based on the system clock.
871 It will count microseconds since the object was created or Reset() was last called, and return
872 that count from Time(). It does not implement any custom interfaces.
876 class CSystemClockSource : public CBase, public MMMFClockSource
880 Creates a new CSystemClockSource object.
881 @return "A new clock source object."
882 @leave "This method may leave with one of the system-wide error codes."
884 IMPORT_C static CSystemClockSource* NewL();
889 IMPORT_C ~CSystemClockSource();
893 Resets the clock source to zero. Typically called by the DevVideo client at stream start.
895 IMPORT_C void Reset();
898 Resets the clock source to a user-defined offset. Typically called by the DevVideo client
899 when seeking in a file.
901 @param "aOffset" "The clock offset."
903 IMPORT_C void Reset(const TTimeIntervalMicroSeconds& aOffset);
906 Suspends the clock source. The clock time will not increment until the clock has been resumed.
907 This method is used when pausing playback.
909 IMPORT_C void Suspend();
912 Resumes the clock source after a Suspend() method call. This method is used when resuming playback.
914 IMPORT_C void Resume();
916 // Implementation of MMMFClockSource
918 No custom interfaces are implemented by this clock source, so this method will always return NULL.
919 @param "aInterface" "The interface"
922 virtual TAny* CustomInterface(TUid aInterface);
924 Retrieves the time that has elapsed since Reset() was last called, subtracting any time
925 during which the clock was suspended.
927 @return "The number of microseconds that have elapsed in the stream."
929 virtual TTimeIntervalMicroSeconds Time();
932 CSystemClockSource();
938 TTimeIntervalMicroSeconds iOffset;
940 TTime iTimeWhenSuspended;
941 TTimeIntervalMicroSeconds iTimeSuspended;
944 RCriticalSection iCriticalSection;
949 Observer class to be used with class CMMFClockSourcePeriodicUtility.
953 class MMMFClockSourcePeriodicUtilityObserver
957 Notifies the observer that the specified period has elapsed.
958 @param "aTime" "The current time, queried from the clock source."
960 virtual void MmcspuoTick(const TTimeIntervalMicroSeconds& aTime) = 0;
964 Utility class that can be used by video HW devices to receive periodic callbacks with the current time.
965 Note that the exact timing of the callbacks cannot be guaranteed due to other things pre-empting
966 the execution of the active object or thread.
970 class CMMFClockSourcePeriodicUtility : public CBase
974 Creates a new clock source periodic utility object.
976 @param "aClockSource" "A reference to the clock source to be used to query the current time."
977 @param "aObserver" "A reference to the observer of the utility that will receive callbacks
978 each time the specified period elapses."
979 @return "A new clock source periodic utility object."
980 @leave "The method will leave if an error occurs."
982 IMPORT_C static CMMFClockSourcePeriodicUtility* NewL(MMMFClockSource& aClockSource, MMMFClockSourcePeriodicUtilityObserver& aObserver);
985 Starts the clock source periodic utility. The utility will call MmcspuoTick on its observer
986 every aPeriod microseconds until Stop() is called. Note that the utility will not stop
987 automatically when the clock source is stopped.
989 @param "aPeriod" "Defines the period with which the observer will receive callbacks."
991 IMPORT_C void Start(TTimeIntervalMicroSeconds32 aPeriod);
994 Stops the clock source periodic utility. No more callbacks will be made after this method has
997 IMPORT_C void Stop();
1002 IMPORT_C ~CMMFClockSourcePeriodicUtility();
1004 CMMFClockSourcePeriodicUtility(MMMFClockSource& aClockSource, MMMFClockSourcePeriodicUtilityObserver& aObserver);
1006 static TInt Callback(TAny* aAny);
1010 MMMFClockSource& iClockSource;
1011 MMMFClockSourcePeriodicUtilityObserver& iObserver;
1016 Specifies the encoder buffering options.
1020 class TEncoderBufferOptions
1024 The maximum number of pictures in the pre-encoder buffer.
1026 TUint iMaxPreEncoderBufferPictures;
1029 The HRD/VBV specification that shall be fullfilled.
1031 THrdVbvSpecification iHrdVbvSpec;
1034 The HRD/VBV buffering parameters. The data format depends on the parameters chosen. For
1035 3GPP TS 26.234 parameters (iHrdVbvSpec=EHrdVbv3GPP), the data in the descriptor is a package of type
1036 TPckC<T3gppHrdVbvParams> (see T3gppHrdVbvParams). If no HRD/VBV parameters are used, the
1037 descriptor is empty.
1039 TPtrC8 iHrdVbvParams;
1042 The maximum size of an output buffer, in bytes. Use KMaxTUint for an unlimited size.
1044 TUint iMaxOutputBufferSize;
1047 The maximum size of a coded picture, in bytes. Use KMaxTUint for an unlimited size.
1049 TUint iMaxCodedPictureSize;
1052 The maximum size of a coded video segment, in bytes. Use KMaxTUint for an unlimited size.
1054 TUint iMaxCodedSegmentSize;
1057 The mimimum number of output buffers.
1059 TUint iMinNumOutputBuffers;
1063 Specifies the video encoder bit-rate control options.
1067 class TRateControlOptions
1071 Defines the bit-rate control type.
1073 TBitrateControlType iControl;
1076 The target bit-rate, in bits per second. Used if bit-rate control type is EBrControlStream.
1077 If specified for an enhancement layer, the target bit-rate includes all lower layers. For example,
1078 if the client uses two layers, with the base layer using 64000 bps and the whole stream 192000 bps,
1079 this field is set to 64000 for layer zero and 192000 for layer one.
1084 The target picture quality. The value range is [0…100], with 0 corresponding to minimum quality
1085 and 100 to lossless coding (or the closest equivalent supported).
1087 TUint iPictureQuality;
1090 The target picture rate, in pictures per second. If specified for an enhancement layer, the target
1091 frame rate includes all lower layers.
1096 The quality/temporal tradeoff for bit-rate control. The value range is [0.0…1.0]. Value 0.0
1097 specifies that picture quality should be maintained as well as possible, sacrificing picture rate.
1098 Value 1.0 specifies that picture rate should be maintained as well as possible, sacrificing
1101 TReal iQualityTemporalTradeoff;
1104 The latency/quality tradeoff for bit-rate control. The value range is [0.0…1.0]. Value 0.0
1105 specifies that the transmission delay and the decoder input buffer occupancy level caused by
1106 the bit-rate control is minimized, i.e. the actual coded bit-rate follows the target bit-rate
1107 as closely as possible. 1.0 specifies that the transmission delay caused by the bit-rate control
1108 should be as high as needed to guarantee a constant picture quality and frame rate as long as
1109 the coded data conforms to the given HRD/VBV parameters (if any).
1112 TReal iLatencyQualityTradeoff;
1116 Custom interface Uid for setting up the DevVideo hw device adapter
1118 const TInt KUidDevVideoHwDeviceAdapterSetup = 0x102737EF;
1120 #include <mmf/devvideo/devvideobase.inl>