1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mdfdevvideoextensions/nga_mdf_postprocessor/inc/NGAPostProcHwDevice.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,1136 @@
1.4 +/*
1.5 +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +#ifndef __NGAPOSTPROCHWDEVICE_H__
1.23 +#define __NGAPOSTPROCHWDEVICE_H__
1.24 +
1.25 +#include <e32std.h>
1.26 +#include <w32std.h>
1.27 +#include <e32base.h>
1.28 +#include <e32def.h>
1.29 +#include <e32cmn.h>
1.30 +#include <stdio.h>
1.31 +#include <string.h>
1.32 +#include <stdarg.h>
1.33 +
1.34 +#include <mmf/devvideo/videoplayhwdevice.h>
1.35 +#include <mmf/devvideo/devvideostandardcustominterfaces.h>
1.36 +#include <mmf/devvideo/devvideovideosurfacecustominterface.h>
1.37 +#include <graphics/surfacemanager.h> //RSurfaceManager
1.38 +#include <graphics/surface.h> //TSurfaceId
1.39 +#include <mmf/common/mmfvideo.h> //TVideoAspectRatio
1.40 +#include <mmf/devvideo/devvideosurfacehandlecustominterface.h>
1.41 +#include <mmf/devvideo/devvideoplayratecustominterface.h>
1.42 +#include <surface_hints.h>
1.43 +#include <secureoutputci.h>
1.44 +#include <advancedsecureoutputci.h>
1.45 +#include <graphics/suerror.h>
1.46 +
1.47 +#include "fetchframecustominterface.h"
1.48 +#include "MdfRDebug.h"
1.49 +#include "NGAPostProcHwDevice_UID.hrh"
1.50 +#include "NGAPostProcSessionManagerObserver.h"
1.51 +#include "common.h"
1.52 +
1.53 +class CNGAPostProcSessionManager;
1.54 +class CNGAPostProcSurfaceHandler;
1.55 +class CNGAPostProcTimer;
1.56 +class RWsSession;
1.57 +
1.58 +class CNGAPostProcHwDevice: public CMMFVideoPostProcHwDevice,
1.59 + public MMmfVideoBufferManagement,
1.60 + public MNGAPostProcSessionManagerObserver,
1.61 + public MMMFVideoSurfaceSupport,
1.62 + public MMmfVideoPropertiesObserver,
1.63 + public MMmfVideoResourceObserver,
1.64 + public MMmfVideoSurfaceHandleControl,
1.65 + public MMmfVideoPropertiesNotifier,
1.66 + public MMmfVideoPlayRateControl,
1.67 + public MMmfVideoSecureOutput,
1.68 + public MMmfAdvancedVideoSecureOutput
1.69 +{
1.70 +
1.71 +public:
1.72 + // === Constructors and destructor ===
1.73 + /**
1.74 + * Two-phased constructor.
1.75 + * @return pointer to an instance of CMMFVideoPostProcHwDevice
1.76 + */
1.77 + static CMMFVideoPostProcHwDevice* NewL();
1.78 +
1.79 + /**
1.80 + * Destructor.
1.81 + */
1.82 + ~CNGAPostProcHwDevice();
1.83 +
1.84 +public:
1.85 +
1.86 + // === CMMFVideoPostProcHwDevice ===
1.87 +
1.88 + /**
1.89 + Sets the device input format to an uncompressed video format.
1.90 +
1.91 + @param "aFormat" "The input format to use."
1.92 + @leave "The method will leave if an error occurs. Typical error codes used:
1.93 + * KErrNotSupported - The input format is not supported."
1.94 + @pre "This method can only be called before the hwdevice has been initialized with Initialize()."
1.95 + */
1.96 + void SetInputFormatL(const TUncompressedVideoFormat& aFormat);
1.97 +
1.98 + /**
1.99 + Sets the decoder device that will write data to this post-processor. Decoded pictures will be
1.100 + written with WritePictureL() or through a custom interface. After pictures have been processed,
1.101 + they must be returned to the decoder using ReturnPicture().
1.102 +
1.103 + @param "aDevice" "The decoder source plug-in to use."
1.104 + @pre "This method can only be called before the hwdevice has been initialized with Initialize()."
1.105 + */
1.106 + void SetInputDevice(CMMFVideoDecodeHwDevice* aDevice);
1.107 +
1.108 + /**
1.109 + Writes an uncompressed video picture to the post-processor. The picture must be returned to the
1.110 + client or source plug-in after it has been used.
1.111 +
1.112 + @param "aPicture" "The picture to write."
1.113 + @leave "This method may leave with one of the system-wide error codes."
1.114 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.115 + */
1.116 + void WritePictureL(TVideoPicture* aPicture);
1.117 +
1.118 + /**
1.119 + Retrieves post-processing information about this hardware device.
1.120 + The device creates a CPostProcessorInfo structure, fills it with correct data, pushes it
1.121 + to the cleanup stack and returns it. The client will delete the object when it is no
1.122 + longer needed.
1.123 +
1.124 + @return "Post-processor information as a CPostProcessorInfo object.
1.125 + The object is pushed to the cleanup stack, and must be deallocated by the caller."
1.126 + @leave "This method may leave with one of the system-wide error codes.
1.127 + */
1.128 + CPostProcessorInfo* PostProcessorInfoLC();
1.129 +
1.130 + /**
1.131 + Retrieves the list of the output formats that the device supports. The list is ordered in
1.132 + plug-in preference order, with the preferred formats at the beginning of the list. The list
1.133 + can depend on the device source format, and therefore SetSourceFormatL() must be called before
1.134 + calling this method.
1.135 +
1.136 + @param "aFormats" "An array for the result format list. The array must be created and destroyed by the caller."
1.137 + @leave "This method may leave with one of the system-wide error codes.
1.138 + @pre "This method may only be called before the hwdevice has been initialized using Initialize()."
1.139 + */
1.140 + void GetOutputFormatListL(RArray<TUncompressedVideoFormat>& aFormats);
1.141 +
1.142 + /**
1.143 + Sets the device output format.
1.144 +
1.145 + @param "aFormat" "The format to use."
1.146 + @leave "This method may leave with one of the system-wide error codes.
1.147 + @pre "This method may only be called before the hwdevice has been initialized using Initialize()."
1.148 + */
1.149 + void SetOutputFormatL(const TUncompressedVideoFormat &aFormat);
1.150 +
1.151 + /**
1.152 + Sets the clock source to use for video timing. If no clock source is set. video playback
1.153 + will not be synchronized, but will proceed as fast as possible, depending on input data
1.154 + and output buffer availability.
1.155 +
1.156 + @param "aClock" "The clock source to be used."
1.157 + @pre "This method can only be called before the hwdevice has been initialized with Initialize()."
1.158 + */
1.159 + void SetClockSource(MMMFClockSource* aClock);
1.160 +
1.161 + /**
1.162 + Sets the device video output destination. The destination can be the screen (using direct
1.163 + screen access) or memory buffers. By default memory buffers are used. If data is written
1.164 + to another device, this method is ignored, and suitable memory buffers are always used.
1.165 +
1.166 + @param "aScreen" "True if video output destination is the screen, false if memory buffers."
1.167 + @leave "This method may leave with one of the system-wide error codes.
1.168 + @pre "This method can only be called before the hwdevice has been initialized with Initialize()."
1.169 + */
1.170 + void SetVideoDestScreenL(TBool aScreen);
1.171 +
1.172 + /**
1.173 + Sets the post-processing types to be used.
1.174 +
1.175 + @param "aPostProcCombination" "The post-processing steps to perform, a bitwise OR of values from TPostProcessType."
1.176 + @leave "This method may leave with one of the system-wide error codes.
1.177 + @pre "This method can be called either before or after the hwdevice has been initialized with Initialize().
1.178 + If called after initialization, the change must only be committed when CommitL() is called."
1.179 + */
1.180 + void SetPostProcessTypesL(TUint32 aPostProcCombination);
1.181 +
1.182 + /**
1.183 + Sets post-processing options for input (pan-scan) cropping.
1.184 +
1.185 + @param "aRect" "The cropping rectangle to use."
1.186 + @leave "This method may leave with one of the system-wide error codes.
1.187 + @pre "This method can be called either before or after the hwdevice has been initialized with Initialize().
1.188 + If called after initialization, the change must only be committed when CommitL() is called."
1.189 + */
1.190 + void SetInputCropOptionsL(const TRect& aRect);
1.191 +
1.192 + /**
1.193 + Sets post-processing options for YUV to RGB color space conversion.
1.194 + Specifies the input YUV and output RGB formats to use explicitly. SetSourceFormatL(),
1.195 + SetOutputFormatL(), and SetPostProcessTypesL() must be called before this method is used.
1.196 +
1.197 + @param "aOptions" "The conversion options to use."
1.198 + @param "aYuvFormat" "Conversion source YUV format"
1.199 + @param "aRgbFormat" "Conversion target RGB format"
1.200 + @leave "This method may leave with one of the system-wide error codes.
1.201 + @pre "This method can be called either before or after the hwdevice has been initialized with Initialize().
1.202 + If called after initialization, the change must only be committed when CommitL() is called."
1.203 + */
1.204 + void SetYuvToRgbOptionsL(const TYuvToRgbOptions& aOptions, const TYuvFormat& aYuvFormat,
1.205 + TRgbFormat aRgbFormat);
1.206 +
1.207 + /**
1.208 + Sets post-processing options for YUV to RGB color space conversion.
1.209 + Uses the device input and output formats. For decoder devices the default YUV format used is
1.210 + the format specified in the input bitstream. SetSourceFormatL(), SetOutputFormatL(), and
1.211 + SetPostProcessTypesL() must be called before this method is used.
1.212 +
1.213 + @param "aOptions" "The conversion options to use."
1.214 + @leave "This method may leave with one of the system-wide error codes.
1.215 + @pre "This method can be called either before or after the hwdevice has been initialized with Initialize().
1.216 + If called after initialization, the change must only be committed when CommitL() is called."
1.217 + */
1.218 + void SetYuvToRgbOptionsL(const TYuvToRgbOptions& aOptions);
1.219 +
1.220 + /**
1.221 + Sets post-processing options for rotation. SetPostProcessTypesL() must be called before
1.222 + this method is used.
1.223 +
1.224 + @param "aRotationType" "The rotation to perform."
1.225 + @leave "This method may leave with one of the system-wide error codes.
1.226 + @pre "This method can be called either before or after the hwdevice has been initialized with Initialize().
1.227 + If called after initialization, the change must only be committed when CommitL() is called."
1.228 + */
1.229 + void SetRotateOptionsL(TRotationType aRotationType);
1.230 +
1.231 + /**
1.232 + Sets post-processing options for scaling. SetPostProcessTypesL() must be called before
1.233 + this method is used.
1.234 +
1.235 + @param "aTargetSize" "Scaling target size. If a fixed scale factor size is used,
1.236 + the new dimensions must be set to width=floor(factor*width),
1.237 + height=floor(factor*height). For example, scaling a
1.238 + QCIF (176x144) picture up by a factor of 4/3 yields a size
1.239 + of 234x192."
1.240 + @param "aAntiAliasFiltering" "True if anti-aliasing filtering should be used.
1.241 + If the post-processor does not support anti-aliased scaling,
1.242 + or supports anti-aliased scaling only, this argument is ignored."
1.243 + @leave "This method may leave with one of the system-wide error codes.
1.244 + @pre "This method can be called either before or after the hwdevice has been initialized with Initialize().
1.245 + If called after initialization, the change must only be committed when CommitL() is called."
1.246 + */
1.247 + void SetScaleOptionsL(const TSize& aTargetSize, TBool aAntiAliasFiltering);
1.248 +
1.249 + /**
1.250 + Sets post-processing options for output cropping. SetPostProcessTypesL() must be called before
1.251 + this method is used.
1.252 +
1.253 + @param "aRect" "Output cropping area."
1.254 + @leave "This method may leave with one of the system-wide error codes.
1.255 + @pre "This method can be called either before or after the hwdevice has been initialized with Initialize().
1.256 + If called after initialization, the change must only be committed when CommitL() is called."
1.257 + */
1.258 + void SetOutputCropOptionsL(const TRect& aRect);
1.259 +
1.260 + /**
1.261 + Sets post-processing plug-in specific options. SetPostProcessTypesL() must be called before
1.262 + this method is used.
1.263 +
1.264 + @param "aOptions" "The options. The format is plug-in specific."
1.265 + @leave "This method may leave with one of the system-wide error codes.
1.266 + @pre "This method can be called either before or after the hwdevice has been initialized with Initialize().
1.267 + If called after initialization, the change must only be committed when CommitL() is called."
1.268 + */
1.269 + void SetPostProcSpecificOptionsL(const TDesC8& aOptions);
1.270 +
1.271 + /**
1.272 + Initializes the device. This method is asynchronous, the device will call
1.273 + MMFVideoPlayProxy::MdvppInitializeComplete() after initialization has completed. After this
1.274 + method has successfully completed, further configuration changes are not possible except where
1.275 + separately noted.
1.276 + */
1.277 + void Initialize();
1.278 +
1.279 + /**
1.280 + Commit all changes since the last CommitL(), Revert() or Initialize()
1.281 + to the hardware device. This only applies to methods which can be called both
1.282 + before AND after DevVideoPlay has been initialized.
1.283 +
1.284 + @see SetPostProcessTypesL
1.285 + @see SetInputCropOptionsL
1.286 + @see SetYuvToRgbOptionsL
1.287 + @see SetRotateOptionsL
1.288 + @see SetScaleOptionsL
1.289 + @see SetOutputCropOptionsL
1.290 + @see SetPostProcSpecificOptionsL
1.291 +
1.292 + @leave "The method will leave if an error occurs."
1.293 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.294 + */
1.295 + void CommitL();
1.296 +
1.297 + /**
1.298 + Revert all changes since the last CommitL(), Revert() or Initialize()
1.299 + back to their previous settings. This only applies to methods which can
1.300 + be called both before AND after DevVideoPlay has been initialized.
1.301 +
1.302 + @see SetPostProcessTypesL
1.303 + @see SetInputCropOptionsL
1.304 + @see SetYuvToRgbOptionsL
1.305 + @see SetRotateOptionsL
1.306 + @see SetScaleOptionsL
1.307 + @see SetOutputCropOptionsL
1.308 + @see SetPostProcSpecificOptionsL
1.309 +
1.310 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.311 + */
1.312 + void Revert();
1.313 +
1.314 + /**
1.315 + Starts writing output directly to the display frame buffer using Direct Screen Access.
1.316 +
1.317 + @param "aVideoRect" "The video output rectangle on screen."
1.318 + @param "aScreenDevice" "The screen device to use. The screen device object must be valid in the current thread."
1.319 + @param "aClipRegion" "Initial clipping region to use."
1.320 +
1.321 + @leave "This method may leave with one of the system-wide error codes.
1.322 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.323 + */
1.324 + void StartDirectScreenAccessL(const TRect& aVideoRect,
1.325 + CFbsScreenDevice& aScreenDevice, const TRegion& aClipRegion);
1.326 +
1.327 + /**
1.328 + Sets a new clipping region for Direct Screen Access. After the method returns, no video will
1.329 + be drawn outside of the region. If clipping is not supported, or the clipping region is too
1.330 + complex, either playback will pause or will resume without video display, depending on the
1.331 + current setting of SetPauseOnClipFail(), and the result can be verified with IsPlaying().
1.332 + Clipping can be disabled by setting a new clipping region that includes the whole video window.
1.333 +
1.334 + @param "aRegion" "The new clipping region. After the method returns, no video will be drawn outside the region."
1.335 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.336 + */
1.337 + void SetScreenClipRegion(const TRegion& aRegion);
1.338 +
1.339 + /**
1.340 + Sets whether the system should pause playback when it gets a clipping region it cannot handle,
1.341 + or Direct Screen Access is aborted completely. If not, processing will proceed normally, but no
1.342 + video will be drawn. By default, playback is paused.
1.343 +
1.344 + @param "aPause" "True if playback should be paused when clipping fails, false if not.
1.345 + If playback is not paused, it will be continued without video display."
1.346 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.347 + */
1.348 + void SetPauseOnClipFail(TBool aPause);
1.349 +
1.350 + /**
1.351 + Aborts Direct Screen Access completely, to be called from MAbortDirectScreenAccess::AbortNow()
1.352 + and similar methods. DSA can be resumed by calling StartDirectScreenAccessL().
1.353 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.354 + */
1.355 + void AbortDirectScreenAccess();
1.356 +
1.357 + /**
1.358 + Indicates whether playback is proceeding. This method can be used to check whether playback was
1.359 + paused or not in response to a new clipping region or DSA abort.
1.360 +
1.361 + @return "ETrue if video is still being played (even if not necessarily displayed)."
1.362 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.363 + */
1.364 + TBool IsPlaying();
1.365 +
1.366 + /**
1.367 + Re-draws the latest video picture. Only available when DSA is being used. If DSA is aborted or a
1.368 + non-supported clipping region has been set, the request may be ignored.
1.369 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.370 + */
1.371 + void Redraw();
1.372 +
1.373 +
1.374 + /**
1.375 + Starts video playback, including decoding, post-processing, and rendering. Playback will proceed
1.376 + until it has been stopped or paused, or the end of the bitstream is reached.
1.377 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.378 + */
1.379 + void Start();
1.380 +
1.381 + /**
1.382 + Stops video playback. No new pictures will be decoded, post-processed, or rendered.
1.383 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.384 + */
1.385 + void Stop();
1.386 +
1.387 + /**
1.388 + Pauses video playback, including decoding, post-processing, and rendering. No pictures will be
1.389 + decoded, post-processed, or rendered until playback has been resumed.
1.390 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.391 + */
1.392 + void Pause();
1.393 +
1.394 + /**
1.395 + Resumes video playback after a pause.
1.396 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.397 + */
1.398 + void Resume();
1.399 +
1.400 + /**
1.401 + Changes to a new decoding and playback position, used for randomly accessing (seeking) the
1.402 + input stream. The position change flushes all input and output buffers. Pre-decoder and
1.403 + post-decoder buffering are handled as if a new bitstream was being decoded. If the device still
1.404 + has buffered pictures that precede the new playback position, they will be discarded. If playback
1.405 + is synchronized to a clock source, the client is responsible for setting the clock source to the
1.406 + new position.
1.407 +
1.408 + @param "aPlaybackPosition" "The new playback position in the video stream."
1.409 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.410 + */
1.411 + void SetPosition(const TTimeIntervalMicroSeconds& aPlaybackPosition);
1.412 +
1.413 + /**
1.414 + Freezes a picture on the screen. After the picture has been frozen, no new pictures are
1.415 + displayed until the freeze is released with ReleaseFreeze(). If the device output is being
1.416 + written to memory buffers or to another plug-in, instead of the screen, no decoded pictures
1.417 + will be delivered while the freeze is active, and they are simply discarded.
1.418 +
1.419 + @param "aTimestamp" "The presentation timestamp of the picture to freeze. The frozen picture
1.420 + will be the first picture with a timestamp greater than or equal to this
1.421 + parameter."
1.422 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.423 + */
1.424 + void FreezePicture(const TTimeIntervalMicroSeconds& aTimestamp);
1.425 +
1.426 + /**
1.427 + Releases a picture frozen with FreezePicture().
1.428 +
1.429 + @param "aTimestamp" "The presentation timestamp of the picture to release. The first picture
1.430 + displayed after the release will be the first picture with a timestamp
1.431 + greater than or equal to this parameter. To release the freeze immediately,
1.432 + set the timestamp to zero."
1.433 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.434 + */
1.435 + void ReleaseFreeze(const TTimeIntervalMicroSeconds& aTimestamp);
1.436 +
1.437 +
1.438 + /**
1.439 + Returns the current playback position, i.e. the timestamp for the most recently displayed or
1.440 + virtually displayed picture. If the device output is written to another device, the most recent
1.441 + output picture is used.
1.442 +
1.443 + @return "Current playback position."
1.444 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.445 + */
1.446 + TTimeIntervalMicroSeconds PlaybackPosition();
1.447 +
1.448 + /**
1.449 + Returns the total amount of memory allocated for uncompressed pictures. This figure only
1.450 + includes the pictures actually allocated by the plug-in itself, so that the total number of
1.451 + bytes allocated in the system can be calculated by taking the sum of the values from all plug-ins.
1.452 +
1.453 + @return "Total number of bytes of memory allocated for uncompressed pictures."
1.454 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.455 + */
1.456 + TUint PictureBufferBytes();
1.457 +
1.458 + /**
1.459 + Reads various counters related to decoded pictures. The counters are reset when Initialize()
1.460 + or this method is called, and thus they only include pictures processed since the last call.
1.461 +
1.462 + Post-processor devices return the number of input pictures in iPicturesDecoded and
1.463 + iTotalPictures. If the decoded pictures are written to another plug-in, they are considered
1.464 + to be "virtually displayed".
1.465 +
1.466 + @param "aCounters" "The counter structure to fill."
1.467 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.468 + */
1.469 + void GetPictureCounters(CMMFDevVideoPlay::TPictureCounters& aCounters);
1.470 +
1.471 +
1.472 + /**
1.473 + Sets the computational complexity level to use. If separate complexity levels are not available,
1.474 + the method call is ignored. If the level specified is not available, the results are undefined.
1.475 + Typically the device will either ignore the request or use the nearest suitable level.
1.476 +
1.477 + The complexity level can be changed at any point during playback.
1.478 +
1.479 + @param "aLevel" "The computational complexity level to use. Level zero (0) is the most complex
1.480 + one, with the highest quality. Higher level numbers require less processing
1.481 + and may have lower quality."
1.482 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.483 + */
1.484 + void SetComplexityLevel(TUint aLevel);
1.485 +
1.486 + /**
1.487 + Gets the number of complexity levels available.
1.488 +
1.489 + @return "The number of complexity control levels available, or zero if the information is not
1.490 + available yet. The information may not be available if the number of levels depends on
1.491 + the input data, and enough input data has not been read yet. In that case, using level
1.492 + zero is safe."
1.493 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.494 + */
1.495 + TUint NumComplexityLevels();
1.496 +
1.497 + /**
1.498 + Gets information about a computational complexity level. This method can be called after
1.499 + NumComplexityLevels() has returned a non-zero value - at that point the information is guaranteed
1.500 + to be available. Some hardware device implementations may not be able to provide all values,
1.501 + in that case the values will be approximated.
1.502 +
1.503 + @param "aLevel" "The computational complexity level to query. The level numbers range from zero
1.504 + (the most complex) to NumComplexityLevels()-1."
1.505 + @param "aInfo" "The information structure to fill."
1.506 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.507 + */
1.508 + void GetComplexityLevelInfo(TUint aLevel, CMMFDevVideoPlay::TComplexityLevelInfo& aInfo);
1.509 +
1.510 + /**
1.511 + Returns a picture back to the device. This method is called by CMMFDevVideoPlay to return pictures
1.512 + from the client (after they have been written with NewPicture()), or by the output device when
1.513 + it has finished using a picture.
1.514 +
1.515 + @param "aPicture" "The picture to return. The device can re-use the memory for the picture."
1.516 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.517 + */
1.518 + void ReturnPicture(TVideoPicture* aPicture);
1.519 +
1.520 + /**
1.521 + Gets a copy of the latest picture sent to output.
1.522 +
1.523 + @param "aPictureData" "Target picture. The memory for the picture must be allocated by the
1.524 + caller, and initialized properly. The data formats must match the snapshot
1.525 + format requested."
1.526 + @param "aFormat" "The picture format to use for the snapshot."
1.527 +
1.528 + @return "ETrue if the snapshot was taken, EFalse if a picture is not available. The picture may not
1.529 + be available if decoding has not progressed far enough yet."
1.530 +
1.531 + @leave "The method will leave if an error occurs. Typical error codes used:
1.532 + * KErrNotSupported - The requested data format or picture size is not supported, or the
1.533 + plug-in does not support snapshots."
1.534 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.535 + */
1.536 +// TBool GetSnapshotL(TPictureData& aPictureData, const TUncompressedVideoFormat& aFormat) {return EFalse;};
1.537 + TBool GetSnapshotL(TPictureData& aPictureData, const TUncompressedVideoFormat& aFormat);
1.538 +
1.539 + /**
1.540 + When the snapshot is available, it will be returned to the client using the TimedSnapshotComplete()
1.541 + callback. To cancel a timed snapshot request, use CancelTimedSnapshot(). Only one timed snapshot
1.542 + request can be active at a time.
1.543 +
1.544 + @param "aPictureData" "Target picture. The memory for the picture must be allocated by
1.545 + the caller, and initialized properly. The data formats must match
1.546 + the snapshot format requested. The picture must remain valid until
1.547 + the snapshot has been taken or until the request has been cancelled
1.548 + with CancelTimedSnapshot()."
1.549 + @param "aFormat" "The picture format to use for the snapshot."
1.550 + @param "aPresentationTimestamp" "Presentation timestamp for the picture to copy."
1.551 +
1.552 + @leave "The method will leave if an error occurs. Typical error codes used:
1.553 + * KErrNotSupported - The requested data format or picture size is not supported or
1.554 + the plug-in does not support timed snapshots."
1.555 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.556 + */
1.557 + //void GetTimedSnapshotL(TPictureData* aPictureData, const TUncompressedVideoFormat& aFormat,
1.558 + // const TTimeIntervalMicroSeconds& aPresentationTimestamp){};
1.559 + void GetTimedSnapshotL(TPictureData*, const TUncompressedVideoFormat&, const TTimeIntervalMicroSeconds&){};
1.560 +
1.561 +
1.562 + /**
1.563 + When the snapshot is available, it will be returned to the client using the TimedSnapshotComplete()
1.564 + callback. To cancel a timed snapshot request, use CancelTimedSnapshot(). Only one timed snapshot
1.565 + request can be active at a time.
1.566 +
1.567 + @param "aPictureData" "Target picture. The memory for the picture must be allocated by
1.568 + the caller, and initialized properly. The data formats must match
1.569 + the snapshot format requested. The picture must remain valid until
1.570 + the snapshot has been taken or until the request has been cancelled
1.571 + with CancelTimedSnapshot()."
1.572 + @param "aFormat" "The picture format to use for the snapshot."
1.573 + @param "aPictureId" "Picture identifier for the picture to copy."
1.574 +
1.575 + @leave "The method will leave if an error occurs. Typical error codes used:
1.576 + * KErrNotSupported - The requested data format or picture size is not supported or
1.577 + the plug-in does not support timed snapshots."
1.578 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.579 + */
1.580 +// void GetTimedSnapshotL(TPictureData* aPictureData, const TUncompressedVideoFormat& aFormat,
1.581 +// const TPictureId& aPictureId){};
1.582 + void GetTimedSnapshotL(TPictureData*, const TUncompressedVideoFormat&, const TPictureId& ){};
1.583 +
1.584 + /**
1.585 + Cancels a timed snapshot request.
1.586 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.587 + */
1.588 + void CancelTimedSnapshot(){};
1.589 +
1.590 + /**
1.591 + Gets a list of the supported snapshot picture formats.
1.592 +
1.593 + @param "aFormats" "An array for the result format list. The array must be created and destroyed by
1.594 + the caller."
1.595 +
1.596 + @leave "This method may leave with one of the standard error codes."
1.597 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.598 + */
1.599 + void GetSupportedSnapshotFormatsL(RArray<TUncompressedVideoFormat>&){};
1.600 +
1.601 +
1.602 + /**
1.603 +
1.604 + Notifies the hardware device that the end of input data has been reached and no more input data
1.605 + will be written. The hardware device can use this signal to ensure that the remaining data gets
1.606 + processed, without waiting for new data. For example when the data type is not EDuCodedPicture,
1.607 + calling this method is necessary otherwise a hardware device implementation might be looking for
1.608 + the start code for the next picture to ensure it has a complete picture before starting to decode
1.609 + the previous one.
1.610 +
1.611 +
1.612 + After the remaining data has been processed (and displayed, if applicable), the hardware
1.613 + device must notify the proxy with the MdvppStreamEnd() callback.
1.614 +
1.615 + DevVideo clients are encouraged to call this method, but its use is not mandatory for synchronized
1.616 + processing. For synchronized playback, all video pictures are processed or discarded according to
1.617 + their timestamps, and so the client can easily infer when processing is complete. However, it
1.618 + should be noted that the last picture might not be displayed if this method is not called and the
1.619 + input data type is not EDuCodedPicture.
1.620 +
1.621 + For non-synchronized playback (e.g. file conversion), a client must call this method otherwise it
1.622 + will never find out when the hardware device has finished processing the data.
1.623 +
1.624 + @pre "This method can only be called after the hwdevice has been initialized with Initialize()."
1.625 + */
1.626 + void InputEnd();
1.627 +
1.628 + /**
1.629 + Retrieves a custom interface to the device.
1.630 + @param "aInterface" "Interface UID, defined with the custom interface."
1.631 + @return "Pointer to the interface implementation, or NULL if the device does not
1.632 + implement the interface requested. The return value must be cast to the
1.633 + correct type by the user."
1.634 + */
1.635 + TAny* CustomInterface(TUid aInterface);
1.636 +
1.637 + // === MNGAPostProcSessionManagerObserver ===
1.638 + /**
1.639 + Set the proxy implementation to be used. Called just after the object is constructed.
1.640 + @param "aProxy" "The proxy to use."
1.641 + */
1.642 + void BufferAvailable(TInt aBufId, TInt aStatus);
1.643 +
1.644 +public:
1.645 +
1.646 + // === MMmfVideoBufferManagement ===
1.647 +
1.648 + /**
1.649 + * Sets the observer object to use. The observer gets notified
1.650 + * when new buffers are available and when buffers need to be
1.651 + * released back to the media device.
1.652 + *
1.653 + * This method can only be called before the media device has
1.654 + * been Initialized with InitializeL().
1.655 + *
1.656 + * @param aObserver The observer object to use.
1.657 + */
1.658 + void MmvbmSetObserver(MMmfVideoBufferManagementObserver* aObserver);
1.659 +
1.660 + /**
1.661 + * Enables input buffer management mode. In buffer management mode
1.662 + * the target media device allocates memory for input buffers and
1.663 + * the client can only use input buffers allocated with
1.664 + * MmvbmGetBufferL().
1.665 + *
1.666 + * This method can only be called before the media device has been
1.667 + * Initialized with InitializeL(). This method must be called if
1.668 + * the client uses MmvbmGetBufferL().
1.669 + *
1.670 + * @param aEnable ETrue if input buffer management mode is used.
1.671 + */
1.672 + void MmvbmEnable(TBool aEnable);
1.673 +
1.674 + /**
1.675 + * Sets the buffer options to use. The client can request the
1.676 + * number of input buffers that should be available, but typically
1.677 + * only few (one or two) buffers can be used.
1.678 + *
1.679 + * This method can only be called before the media device has been
1.680 + * Initialized with InitializeL().
1.681 + *
1.682 + * @param aOptions The buffer options to use, see TBufferOptions.
1.683 + *
1.684 + * @leave KErrNotSupported The requested buffer options are not
1.685 + * supported. Typically the client has requested too many input
1.686 + * buffers.
1.687 + */
1.688 + void MmvbmSetBufferOptionsL(const TBufferOptions& aOptions);
1.689 +
1.690 + /**
1.691 + * Gets the buffer options currently in use.
1.692 + *
1.693 + * This method can only be called before the media device has been
1.694 + * Initialized with InitializeL().
1.695 + *
1.696 + * @param aOptions Target buffer options data structure.
1.697 + */
1.698 + void MmvbmGetBufferOptions(TBufferOptions& aOptions);
1.699 +
1.700 + /**
1.701 + * Gets a new input picture buffer. The client can then write data
1.702 + * into the buffer and write it back to the media device with
1.703 + * WritePictureL().
1.704 + *
1.705 + * This method can only be called after the media device has been
1.706 + * Initialized with InitializeL(). This method can only be called
1.707 + * in buffer management mode, i.e. if the client has called
1.708 + * MmvbmEnable(ETrue).
1.709 + *
1.710 + * Note that target-allocated and client-allocated input buffers
1.711 + * cannot be mixed. In buffer management mode only input buffers
1.712 + * allocated with this method can be sent to the media device.
1.713 + *
1.714 + * If a client has retrieved buffers with MmvbmGetBufferL(), it
1.715 + * must be prepated to release them synchronously at any point if
1.716 + * MmmfBufferManagementObserver::MmvbmoReleaseBuffers() is
1.717 + * called. This may happen if the target media device suddenly
1.718 + * loses access to the buffers due to DSA abort, resource
1.719 + * management conflict, or media device destruction.
1.720 + *
1.721 + * @param aSize The requested buffer size, in pixels. The buffer
1.722 + * size should match the picture size set at initialisation phase,
1.723 + * or otherwise suitable buffer may not be available. If the size
1.724 + * is smaller than the size set at initialisation phase, the
1.725 + * allocated buffer may be larger than requested.
1.726 + *
1.727 + * @return A new input picture buffer. If no free buffers are
1.728 + * available, the return value is NULL.
1.729 + *
1.730 + * @leave General The method will leave if an error occurs. Lack
1.731 + * of free buffers is not considered an error.
1.732 + */
1.733 + TVideoPicture* MmvbmGetBufferL(const TSize& aSize);
1.734 +
1.735 + /**
1.736 + * Releases an input buffer back to the media device without using
1.737 + * it. This method is mainly used as a response to a
1.738 + * MmvbmReleaseBuffers() callback.
1.739 + *
1.740 + * @param aBuffer The buffer to release.
1.741 + */
1.742 + void MmvbmReleaseBuffer(TVideoPicture* aBuffer);
1.743 +
1.744 +public:
1.745 +
1.746 + // === MMMFVideoSurfaceSupport ===
1.747 +
1.748 + /**
1.749 + Requests the media device to use graphics surfaces for video rendering.
1.750 + The client must call this method before Initialize() to ensure the media
1.751 + device allocates the right types of resources for rendering.
1.752 + */
1.753 + void MmvssUseSurfaces();
1.754 +
1.755 + /**
1.756 + Sets a new video surface support observer to receive surface management events
1.757 + from the media device.
1.758 +
1.759 + @param aObserver New observer object to use.
1.760 + */
1.761 + void MmvssSetObserver(MMMFVideoSurfaceObserver& aObserver);
1.762 +
1.763 + /**
1.764 + Retrieves surface parameters for a display. The client typically calls this in response
1.765 + to a MmvsoSurfaceCreated() or MmvsoSurfaceParametersUpdated() observer callback.
1.766 +
1.767 + @param aSurfaceId
1.768 + Surface ID for the display.
1.769 + @param aCropRect
1.770 + Cropping rectangle within the surface. The crop rectangle identifies the area of
1.771 + the surface that should be shown on the screen.
1.772 + @param aPixelAspectRatio
1.773 + Video picture pixel aspect ratio.
1.774 +
1.775 + @leave KErrNotReady if no surface is available for the display.
1.776 + */
1.777 +
1.778 + void MmvssGetSurfaceParametersL(TSurfaceId& aSurfaceId, TRect& aCropRect,
1.779 + TVideoAspectRatio& aPixelAspectRatio);
1.780 + /**
1.781 + Indicates that the surface is no longer in use and can be destroyed. The client typically calls
1.782 + this in response to MmvsoSurfaceCreated() (while old surface is already in use and the current
1.783 + should be removed) or MmvsoRemoveSurface() observer callback.
1.784 +
1.785 + @param aSurfaceId Surface ID that is no longer in use
1.786 +
1.787 + @leave KErrNotFound if the surface does not exist
1.788 + */
1.789 + void MmvssSurfaceRemovedL(const TSurfaceId& aSurfaceId);
1.790 +
1.791 +public:
1.792 +
1.793 + // === MMmfVideoPropertiesObserver ===
1.794 +
1.795 + /**
1.796 + Decoded video properties updated. The media device implementing the
1.797 + MMmfVideoPropertiesNotifier extension will call this method immediately
1.798 + before outputting a picture with the updated properties.
1.799 +
1.800 + When the extension is used between a decoder and a post-processor media
1.801 + device, the post-processor can associate the changed properties with the
1.802 + correct picture, since the next incoming picture after this call will
1.803 + be the first updated one.
1.804 +
1.805 + When the extension is used between a DevVideoPlay client and a
1.806 + post-processor media device, the client can synchronously reconfigure
1.807 + video display options using SetScaleOptionsL() and related methods. This
1.808 + lets the client reconfigure the display for the correct picture.
1.809 +
1.810 + @param aYuvFormat Updated YUV format parameters. The updated fields are
1.811 + iAspectRatioDenom, iAspectRatioNum, and iCoefficients
1.812 + @param aPictureSize Updated picture size. This size will be the true
1.813 + picture display size, excluding any padding that
1.814 + the codec might use.
1.815 + */
1.816 + virtual void MmvpoUpdateVideoProperties(const TYuvFormat& aYuvFormat, const TSize& aPictureSize);
1.817 +
1.818 +public:
1.819 +
1.820 + // === MMmfVideoResourceObserver ===
1.821 +
1.822 + /**
1.823 + Indicates that a media device has lost its resources. The client must
1.824 + synchronously pause or stop processing before returning from this method
1.825 + so that the media device can release its resources to the system. If
1.826 + the client does not pause or stop, resource loss will be handled as a
1.827 + fatal error.
1.828 +
1.829 + The client may start again or resume after receiving a
1.830 + MvroResourcesRestored() callback.
1.831 +
1.832 + @param aMediaDevice UID for the media device that lost resources. The
1.833 + client can use this e.g. to determine whether the
1.834 + decoder or the post-processor lost resources. This
1.835 + is typically not required though since the client
1.836 + must pause DevVideo entirely.
1.837 + */
1.838 + virtual void MmvroResourcesLost(TUid aMediaDevice);
1.839 +
1.840 + /**
1.841 + Indicates that a media device has regained its resources after a
1.842 + previous resource loss. The client can restart or resume processing.
1.843 + This can be done either synchronously or asynchronously.
1.844 +
1.845 + @param aMediaDevice UID for the media device that regained resources.
1.846 + */
1.847 + virtual void MmvroResourcesRestored(TUid aMediaDevice);
1.848 +
1.849 +
1.850 + // === MMmfVideoSurfaceHandleControl ===
1.851 +
1.852 + /**
1.853 + Sets an external surface ID. This should be called as soon as external surface is created.
1.854 +
1.855 + @param aSurfaceID external surface ID.
1.856 +
1.857 + */
1.858 +
1.859 + virtual void MmvshcSetSurfaceHandle(const TSurfaceId& aSurfaceHandle);
1.860 +
1.861 + /**
1.862 + Sets a redraw buffer to be used during resource loss.
1.863 +
1.864 + @param aRedrawBuffer redraw buffer.
1.865 +
1.866 + */
1.867 + virtual void MmvshcRedrawBufferToSurface(TPtrC8& aRedrawBuffer);
1.868 +public:
1.869 + // === MMmfVideoPropertiesNotifier ===
1.870 + /**
1.871 + Sets a new video properties observer. This method can be called at any
1.872 + time after the media device has been instantiated.
1.873 +
1.874 + @param aObserver New observer object.
1.875 + */
1.876 + virtual void MmvpnSetObserver(MMmfVideoPropertiesObserver* aObserver);
1.877 +
1.878 +public:
1.879 +
1.880 + void ReturnPicToDecoder(TVideoPicture* aPic);
1.881 + TInt AttemptToPost();
1.882 +
1.883 +public:
1.884 + //=== MMdfTrickPlayControl === =
1.885 + /**
1.886 + * Query the Direction capabilities from the MDF decoders and
1.887 + * post processor.
1.888 + *
1.889 + */
1.890 + virtual void MmvprcGetPlayRateCapabilitiesL(TVideoPlayRateCapabilities& aCapabilities);
1.891 +
1.892 + /**
1.893 + * Sets the playback speed. A negative rate means play backward.
1.894 + * +/- percentage.
1.895 + *
1.896 + */
1.897 + virtual void MmvprcSetPlayRateL(const TInt aRate);
1.898 +
1.899 + /**
1.900 + * Gets the playback speed. A negative rate means play backward.
1.901 + * +/- percentage.
1.902 + *
1.903 + */
1.904 + virtual TInt MmvprcPlayRateL();
1.905 +
1.906 + /**
1.907 + * Sets the step frame number in frame step mode
1.908 + * +/- frames
1.909 + */
1.910 + virtual void MmvprcStepFrameL(const TInt aStep);
1.911 +
1.912 + /**
1.913 + * Registers the observer
1.914 + */
1.915 + virtual void MmvprcSetObserver(MMmfVideoPlayRateObserver& aObserver);
1.916 +
1.917 +public:
1.918 +
1.919 + // === MMmfVideoSecureOutput ===
1.920 + /**
1.921 + * Notifies the media device if the content can only be sent to a
1.922 + * secure output. The device display is typically considered a
1.923 + * secure output, but a high-quality unprotected analog or digital
1.924 + * video output connector is not. By default all content can be
1.925 + * sent to both secure and insecure outputs.
1.926 + *
1.927 + * This method can only be called before the media device has been
1.928 + * initialised with InitializeL().
1.929 + *
1.930 + * @param aSecure Set to ETrue if the content can only be sent to
1.931 + * a secure output, EFalse if both secure and unsecure outputs can
1.932 + * be used.
1.933 + *
1.934 + * @leave KErrNotSupported Insecure outputs cannot be
1.935 + * disabled. The client should not play protected content.
1.936 + */
1.937 + virtual void MmvsoSetSecureOutputL(TBool aSecure);
1.938 +
1.939 +public:
1.940 + //=== AdvancedVideoSecureOutput === =
1.941 + virtual void MmavsoSetAllowedOutputL(TUint aAllowedOutputMask);
1.942 +
1.943 +protected:
1.944 +
1.945 + // === CMMFVideoPostProcHwDevice ===
1.946 + /**
1.947 + Set the proxy implementation to be used. Called just after the object is constructed.
1.948 + @param "aProxy" "The proxy to use."
1.949 + */
1.950 + void SetProxy(MMMFDevVideoPlayProxy& aProxy);
1.951 +
1.952 +protected:
1.953 +
1.954 + /**
1.955 + * Symbian 2nd phase constructor .
1.956 + */
1.957 + void ConstructL();
1.958 +
1.959 +private:
1.960 + TInt IsTimeToPost(TVideoPicture* frame, TInt64& delta);
1.961 + TVideoPicture* CreateBuffersL(TInt aBufId);
1.962 + void CreateVBMBuffersL();
1.963 + TInt SetupExternalSurface(const TSurfaceId &aSurfaceID);
1.964 + void ReleaseInputQ();
1.965 + void ReleaseProcessQ();
1.966 + void ReleasePicture(TVideoPicture *pic);
1.967 + void PublishSurfaceCreated();
1.968 + void PublishSurfaceUpdated();
1.969 + TInt SetupSurface(const TSize& aSize);
1.970 + void SetSurfaceAttributes(const TSize& aSize, TInt aNumBuf);
1.971 + TInt GetID(TVideoPicture *aPicture);
1.972 + TInt GetExternalBufferID(TVideoPicture *aPicture);
1.973 + TInt RegisterSurface(const TSurfaceId& aSurfaceId);
1.974 + TInt IsGceReady();
1.975 + void SetTimer(TInt64 aDelta);
1.976 + TInt ConvertPostProcBuffer(TVideoPicture* pSrc, TVideoPicture* pDest);
1.977 + void AddPictureToVBMQ(TVideoPicture *pic);
1.978 + void AddPictureToColorConversionQ(TVideoPicture *pic);
1.979 + void ResetCountingBuffer();
1.980 + void PicturesSkipped();
1.981 + TVideoPicture* DoColorConvert(TVideoPicture* aPicture);
1.982 +
1.983 + /**
1.984 + Adds a picture to the Input queue. Based on the timestamp of the picture,
1.985 + it is either appeneded at the end of the queue or inserted at the
1.986 + appropriate position. The queue is arranged in the ascending order.
1.987 + The ret value indicates if the head of the queue was changed or not.
1.988 + */
1.989 + TInt AddToQ(TVideoPicture* aPicture);
1.990 +
1.991 + /**
1.992 + Removes a picture from Input queue based on the playrate.
1.993 + If the playrate is +ve ie forward playback head will be removed
1.994 + and if the playrate is -ve ie backward playback tail
1.995 + will be removed.
1.996 + */
1.997 + void RemoveFromQ();
1.998 +
1.999 + /**
1.1000 + Returns a picture from Input queue based on the playrate.
1.1001 + If the playrate is +ve ie forward playback head will be returned
1.1002 + and if the playrate is -ve ie backward playback tail
1.1003 + will be returned.
1.1004 + */
1.1005 + TVideoPicture* PeekQ();
1.1006 +
1.1007 + /**
1.1008 + Adds a surface hint to a video surface. If there is any hint already added,
1.1009 + the surface is updated with the new hint.
1.1010 + */
1.1011 + TInt AddHints();
1.1012 +
1.1013 + #ifdef _DUMP_YUV_FRAMES
1.1014 + void captureYuv(TVideoPicture* aPicture);
1.1015 + #endif
1.1016 +
1.1017 + TInt SetSourceFormat();
1.1018 + TInt SetSourceRange();
1.1019 + TInt ColorConvert(tBaseVideoFrame* aInputFrame, TUint8* aDestPtr, tWndParam* aInputCropWindow, tWndParam* aOutputCropWindow);
1.1020 +
1.1021 +private:
1.1022 +
1.1023 + //
1.1024 + // C++ default constructor.
1.1025 + //
1.1026 + CNGAPostProcHwDevice();
1.1027 +
1.1028 + //
1.1029 + // State of post processor
1.1030 + //
1.1031 + enum TPPState
1.1032 + {
1.1033 + EInitializing,
1.1034 + EInitialized,
1.1035 + EPlaying,
1.1036 + EPaused,
1.1037 + EStopped
1.1038 + };
1.1039 +
1.1040 + enum TTimeToPost
1.1041 + {
1.1042 + ESkipIt = -1,
1.1043 + EPostIt = 0,
1.1044 + EDelayIt = 1,
1.1045 + };
1.1046 +
1.1047 +private:
1.1048 +
1.1049 + MMMFDevVideoPlayProxy* iProxy;
1.1050 + CMMFVideoDecodeHwDevice* iInputDecoderDevice;
1.1051 + RArray<TVideoPicture*> iInputQ;
1.1052 + RArray<TVideoPicture*> iProcessQ;
1.1053 + MMMFClockSource* iClockSource;
1.1054 + TTimeIntervalMicroSeconds iCurrentPlaybackPosition;
1.1055 + TPPState iPPState;
1.1056 + CNGAPostProcSurfaceHandler* iSurfaceHandler;
1.1057 + CNGAPostProcSessionManager* iSessionManager;
1.1058 +
1.1059 + RSurfaceManager::TSurfaceCreationAttributesBuf iAttributes;
1.1060 + RChunk iChunk;
1.1061 + RSurfaceManager::TInfoBuf iInfo;
1.1062 + TSurfaceId iSurfaceId;
1.1063 + TBool iIsInputEnded;
1.1064 + CNGAPostProcTimer* iPostingTimer;
1.1065 + CMMFDevVideoPlay::TPictureCounters iPictureCounters;
1.1066 + TBool iFirstPictureUpdated;
1.1067 + TBool iUsingExternalSurface;
1.1068 + TBool iIsColorConversionNeeded;
1.1069 + RArray<TVideoPicture*> iColorConversionQ;
1.1070 + TBool iSurfaceCreatedEventPublished;
1.1071 + TInt iOverflowPictureCounter;
1.1072 + TInt iVideoFrameBufSize;
1.1073 + TBool iResourceLost;
1.1074 + TBool iRedrawDone;
1.1075 + // Flag to indicate that the redraw surface has been created, and
1.1076 + // can be used in a subsequent call ro Redraw()
1.1077 + TBool iRedrawSurfaceInUse;
1.1078 +
1.1079 + //-- members for buffer management --
1.1080 + MMmfVideoBufferManagementObserver* iVBMObserver;
1.1081 + TBufferOptions iVBMBufferOptions;
1.1082 + RArray<TVideoPicture*> iVBMBufferReferenceQ;
1.1083 + RArray<TVideoPicture*> iVBMBufferQ;
1.1084 + TBool iVBMEnabled;
1.1085 + RArray<TUncompressedVideoFormat> iSupportedInputFormats;
1.1086 + TInt count;
1.1087 +
1.1088 + //-- members for Surface Hints --
1.1089 + RSurfaceManager::THintPair iHint;
1.1090 + TUint iSurfaceMask;
1.1091 + TUid iSurfaceKey;
1.1092 +
1.1093 + //-- members for Surface support --
1.1094 + MMMFVideoSurfaceObserver* iVideoSurfaceObserver;
1.1095 + MMmfVideoPropertiesObserver* iVPObserver;
1.1096 + RWsSession iWsSession;
1.1097 + TSize iPicSize;
1.1098 + TUint iAspectRatioNum;
1.1099 + TUint iAspectRatioDenom;
1.1100 + //-- members for Trickplay support --
1.1101 + TInt iStepFrameCount;
1.1102 + TInt iPlayRate;
1.1103 + TBool iKeyFrameMode;
1.1104 + MMmfVideoPlayRateObserver* iFPObserver;
1.1105 + TUint8 iSkippedFramesCountingBuffer[64];
1.1106 + TUint8 iSkippedFramesInLast64Frames;
1.1107 + TUint8 iCurrentPosInFramesCountingBuffer;
1.1108 + TUncompressedVideoFormat iVideoFormat;
1.1109 + //---------- utility variables -------
1.1110 + // Image source format
1.1111 + TUint8 iSourceFormat;
1.1112 +
1.1113 + //Image range
1.1114 + TUint8 iSourceRange;
1.1115 +};
1.1116 +
1.1117 +/**
1.1118 + * Timer of Posting
1.1119 + */
1.1120 +
1.1121 +class CNGAPostProcTimer: public CTimer
1.1122 + {
1.1123 +public:
1.1124 + static CNGAPostProcTimer* NewL( CNGAPostProcHwDevice& aParent );
1.1125 + ~CNGAPostProcTimer();
1.1126 +
1.1127 +protected:
1.1128 + void RunL();
1.1129 +
1.1130 +private:
1.1131 + CNGAPostProcTimer( CNGAPostProcHwDevice& aParent );
1.1132 + void ConstructL();
1.1133 +
1.1134 +private:
1.1135 + CNGAPostProcHwDevice& iParent;
1.1136 +};
1.1137 +
1.1138 +#endif //__NGAPOSTPROCHWDEVICE_H__
1.1139 +