os/mm/mdfdevvideoextensions/nga_mdf_postprocessor_shai/inc/NGAPostProcHwDevice.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:
    15 *
    16 */
    17 
    18 
    19 #ifndef __NGAPOSTPROCHWDEVICE_H__
    20 #define __NGAPOSTPROCHWDEVICE_H__
    21 
    22 #include <e32std.h> 
    23 #include <w32std.h>
    24 #include <e32base.h>
    25 #include <e32def.h>
    26 #include <e32cmn.h>
    27 #include <stdio.h>
    28 #include <string.h>
    29 #include <stdarg.h>
    30 
    31 #include <mmf/devvideo/videoplayhwdevice.h>
    32 #include <mmf/devvideo/devvideostandardcustominterfaces.h>
    33 #include <mmf/devvideo/devvideovideosurfacecustominterface.h>
    34 #include <graphics/surfacemanager.h> //RSurfaceManager
    35 #include <graphics/surface.h> //TSurfaceId
    36 #include <mmf/common/mmfvideo.h> //TVideoAspectRatio
    37 //TBC++
    38 //#include <mmf/devvideo/devvideosurfacehandlecustominterface.h>
    39 #include "devvideosurfacehandlecustominterface.h"
    40 #include "postinitializeci.h"
    41 //TBC--
    42 #include <mmf/devvideo/devvideoplayratecustominterface.h>  
    43 #include <surface_hints.h>
    44 #include <secureoutputci.h>
    45 #include <advancedsecureoutputci.h>
    46 #include <graphics/suerror.h>
    47 
    48 #include "fetchframecustominterface.h"
    49 #include "MdfRDebug.h"
    50 #include "NGAPostProcHwDevice_UID.hrh"
    51 #include "NGAPostProcSessionManagerObserver.h"
    52 #include "common.h"
    53 
    54 class CNGAPostProcSessionManager;
    55 class CNGAPostProcSurfaceHandler;
    56 class CNGAPostProcTimer;
    57 class RWsSession;
    58 
    59 class CNGAPostProcHwDevice: public CMMFVideoPostProcHwDevice,
    60 							public MMmfVideoBufferManagement,
    61 							public MNGAPostProcSessionManagerObserver,
    62 							public MMMFVideoSurfaceSupport,
    63 							public MMmfVideoPropertiesObserver,
    64 							public MMmfVideoResourceObserver,
    65 							public MMmfVideoSurfaceHandleControl,
    66 							public MMmfVideoPropertiesNotifier,
    67 							public MMmfVideoPlayRateControl,
    68 							public MMmfVideoSecureOutput,
    69 							public MMmfAdvancedVideoSecureOutput,
    70 							public MMmfPostInitializeRequest
    71 {
    72 
    73 public: 
    74     //  === Constructors and destructor ===
    75     /**
    76     * Two-phased constructor.   
    77     * @return pointer to an instance of CMMFVideoPostProcHwDevice
    78     */
    79     static CMMFVideoPostProcHwDevice* NewL();
    80 
    81     /**
    82     * Destructor.
    83     */
    84     ~CNGAPostProcHwDevice();
    85 
    86 public: 
    87     
    88     // === CMMFVideoPostProcHwDevice ===
    89     
    90     /**
    91     Sets the device input format to an uncompressed video format.
    92 
    93     @param  "aFormat"   "The input format to use."
    94     @leave  "The method will leave if an error occurs. Typical error codes used:
    95             * KErrNotSupported - The input format is not supported."    
    96     @pre    "This method can only be called before the hwdevice has been initialized with Initialize()."
    97     */
    98     void SetInputFormatL(const TUncompressedVideoFormat& aFormat);
    99 
   100     /**
   101     Sets the decoder device that will write data to this post-processor. Decoded pictures will be 
   102     written with WritePictureL() or through a custom interface. After pictures have been processed, 
   103     they must be returned to the decoder using ReturnPicture().
   104 
   105     @param  "aDevice"   "The decoder source plug-in to use."
   106     @pre    "This method can only be called before the hwdevice has been initialized with Initialize()."
   107     */
   108     void SetInputDevice(CMMFVideoDecodeHwDevice* aDevice);
   109 
   110     /**
   111     Writes an uncompressed video picture to the post-processor. The picture must be returned to the 
   112     client or source plug-in after it has been used.
   113 
   114     @param  "aPicture"  "The picture to write."
   115     @leave  "This method may leave with one of the system-wide error codes."
   116     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   117     */
   118     void WritePictureL(TVideoPicture* aPicture);    
   119 
   120     /**
   121     Retrieves post-processing information about this hardware device. 
   122     The device creates a CPostProcessorInfo structure, fills it with correct data, pushes it 
   123     to the cleanup stack and returns it. The client will delete the object when it is no 
   124     longer needed.
   125 
   126     @return "Post-processor information as a CPostProcessorInfo object. 
   127             The object is pushed to the cleanup stack, and must be deallocated by the caller."
   128     @leave  "This method may leave with one of the system-wide error codes.
   129     */
   130     CPostProcessorInfo* PostProcessorInfoLC();
   131 
   132     /**
   133     Retrieves the list of the output formats that the device supports. The list is ordered in 
   134     plug-in preference order, with the preferred formats at the beginning of the list. The list 
   135     can depend on the device source format, and therefore SetSourceFormatL() must be called before 
   136     calling this method.
   137 
   138     @param "aFormats" "An array for the result format list. The array must be created and destroyed by the caller."
   139     @leave  "This method may leave with one of the system-wide error codes.
   140     @pre    "This method may only be called before the hwdevice has been initialized using Initialize()."
   141     */
   142     void GetOutputFormatListL(RArray<TUncompressedVideoFormat>& aFormats);
   143 
   144     /**
   145     Sets the device output format.
   146 
   147     @param  "aFormat" "The format to use."
   148     @leave  "This method may leave with one of the system-wide error codes.
   149     @pre    "This method may only be called before the hwdevice has been initialized using Initialize()."
   150     */
   151     void SetOutputFormatL(const TUncompressedVideoFormat &aFormat);
   152 
   153     /**
   154     Sets the clock source to use for video timing. If no clock source is set. video playback 
   155     will not be synchronized, but will proceed as fast as possible, depending on input data 
   156     and output buffer availability. 
   157 
   158     @param  "aClock" "The clock source to be used."
   159     @pre    "This method can only be called before the hwdevice has been initialized with Initialize()."
   160     */
   161     void SetClockSource(MMMFClockSource* aClock);
   162 
   163     /**
   164     Sets the device video output destination. The destination can be the screen (using direct 
   165     screen access) or memory buffers. By default memory buffers are used. If data is written 
   166     to another device, this method is ignored, and suitable memory buffers are always used.
   167     
   168     @param  "aScreen" "True if video output destination is the screen, false if memory buffers."
   169     @leave  "This method may leave with one of the system-wide error codes.
   170     @pre    "This method can only be called before the hwdevice has been initialized with Initialize()."
   171     */
   172     void SetVideoDestScreenL(TBool aScreen);
   173 
   174     /**
   175     Sets the post-processing types to be used.
   176 
   177     @param  "aPostProcCombination" "The post-processing steps to perform, a bitwise OR of values from TPostProcessType."
   178     @leave  "This method may leave with one of the system-wide error codes.
   179     @pre    "This method can be called either before or after the hwdevice has been initialized with Initialize().
   180             If called after initialization, the change must only be committed when CommitL() is called."
   181     */
   182     void SetPostProcessTypesL(TUint32 aPostProcCombination);
   183 
   184     /**
   185     Sets post-processing options for input (pan-scan) cropping.
   186 
   187     @param  "aRect" "The cropping rectangle to use."
   188     @leave  "This method may leave with one of the system-wide error codes.
   189     @pre    "This method can be called either before or after the hwdevice has been initialized with Initialize().
   190             If called after initialization, the change must only be committed when CommitL() is called."
   191     */
   192     void SetInputCropOptionsL(const TRect& aRect);
   193 
   194     /**
   195     Sets post-processing options for YUV to RGB color space conversion. 
   196     Specifies the input YUV and output RGB formats to use explicitly. SetSourceFormatL(), 
   197     SetOutputFormatL(), and SetPostProcessTypesL() must be called before this method is used.
   198 
   199     @param  "aOptions"      "The conversion options to use."
   200     @param  "aYuvFormat"    "Conversion source YUV format"
   201     @param  "aRgbFormat"    "Conversion target RGB format"
   202     @leave  "This method may leave with one of the system-wide error codes.
   203     @pre    "This method can be called either before or after the hwdevice has been initialized with Initialize().
   204             If called after initialization, the change must only be committed when CommitL() is called."
   205     */
   206     void SetYuvToRgbOptionsL(const TYuvToRgbOptions& aOptions, const TYuvFormat& aYuvFormat, 
   207                                 TRgbFormat aRgbFormat);
   208 
   209     /**
   210     Sets post-processing options for YUV to RGB color space conversion.
   211     Uses the device input and output formats. For decoder devices the default YUV format used is 
   212     the format specified in the input bitstream. SetSourceFormatL(), SetOutputFormatL(), and 
   213     SetPostProcessTypesL() must be called before this method is used.
   214 
   215     @param  "aOptions"      "The conversion options to use."
   216     @leave  "This method may leave with one of the system-wide error codes.
   217     @pre    "This method can be called either before or after the hwdevice has been initialized with Initialize().
   218             If called after initialization, the change must only be committed when CommitL() is called."
   219     */
   220     void SetYuvToRgbOptionsL(const TYuvToRgbOptions& aOptions);
   221 
   222     /**
   223     Sets post-processing options for rotation. SetPostProcessTypesL() must be called before 
   224     this method is used.
   225 
   226     @param  "aRotationType" "The rotation to perform."  
   227     @leave  "This method may leave with one of the system-wide error codes.
   228     @pre    "This method can be called either before or after the hwdevice has been initialized with Initialize().
   229             If called after initialization, the change must only be committed when CommitL() is called."
   230     */
   231     void SetRotateOptionsL(TRotationType aRotationType);
   232 
   233     /**
   234     Sets post-processing options for scaling. SetPostProcessTypesL() must be called before 
   235     this method is used.
   236     
   237     @param  "aTargetSize"           "Scaling target size. If a fixed scale factor size is used, 
   238                                     the new dimensions must be set to width=floor(factor*width), 
   239                                     height=floor(factor*height). For example, scaling a 
   240                                     QCIF (176x144) picture up by a factor of 4/3 yields a size 
   241                                     of 234x192."
   242     @param  "aAntiAliasFiltering"   "True if anti-aliasing filtering should be used. 
   243                                     If the post-processor does not support anti-aliased scaling, 
   244                                     or supports anti-aliased scaling only, this argument is ignored."
   245     @leave  "This method may leave with one of the system-wide error codes.
   246     @pre    "This method can be called either before or after the hwdevice has been initialized with Initialize().
   247             If called after initialization, the change must only be committed when CommitL() is called."
   248     */
   249     void SetScaleOptionsL(const TSize& aTargetSize, TBool aAntiAliasFiltering);
   250 
   251     /**
   252     Sets post-processing options for output cropping. SetPostProcessTypesL() must be called before 
   253     this method is used.
   254     
   255     @param  "aRect" "Output cropping area."
   256     @leave  "This method may leave with one of the system-wide error codes.
   257     @pre    "This method can be called either before or after the hwdevice has been initialized with Initialize().
   258             If called after initialization, the change must only be committed when CommitL() is called."
   259     */
   260     void SetOutputCropOptionsL(const TRect& aRect);
   261 
   262     /**
   263     Sets post-processing plug-in specific options. SetPostProcessTypesL() must be called before 
   264     this method is used.
   265 
   266     @param  "aOptions" "The options. The format is plug-in specific."
   267     @leave  "This method may leave with one of the system-wide error codes.
   268     @pre    "This method can be called either before or after the hwdevice has been initialized with Initialize().
   269             If called after initialization, the change must only be committed when CommitL() is called."
   270     */
   271     void SetPostProcSpecificOptionsL(const TDesC8& aOptions);
   272 
   273     /**
   274     Initializes the device. This method is asynchronous, the device will call 
   275     MMFVideoPlayProxy::MdvppInitializeComplete() after initialization has completed. After this 
   276     method has successfully completed, further configuration changes are not possible except where 
   277     separately noted.
   278     */
   279     void Initialize();
   280 
   281     /**
   282     Commit all changes since the last CommitL(), Revert() or Initialize()
   283     to the hardware device.  This only applies to methods which can be called both
   284     before AND after DevVideoPlay has been initialized.
   285 
   286     @see    SetPostProcessTypesL
   287     @see    SetInputCropOptionsL
   288     @see    SetYuvToRgbOptionsL
   289     @see    SetRotateOptionsL
   290     @see    SetScaleOptionsL
   291     @see    SetOutputCropOptionsL
   292     @see    SetPostProcSpecificOptionsL
   293 
   294     @leave  "The method will leave if an error occurs."
   295     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   296     */
   297     void CommitL();
   298 
   299     /**
   300     Revert all changes since the last CommitL(), Revert() or Initialize()
   301     back to their previous settings.  This only applies to methods which can 
   302     be called both before AND after DevVideoPlay has been initialized.
   303 
   304     @see    SetPostProcessTypesL
   305     @see    SetInputCropOptionsL
   306     @see    SetYuvToRgbOptionsL
   307     @see    SetRotateOptionsL
   308     @see    SetScaleOptionsL
   309     @see    SetOutputCropOptionsL
   310     @see    SetPostProcSpecificOptionsL
   311 
   312     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   313     */
   314     void Revert();
   315 
   316     /**
   317     Starts writing output directly to the display frame buffer using Direct Screen Access.
   318 
   319     @param  "aVideoRect"    "The video output rectangle on screen."
   320     @param  "aScreenDevice" "The screen device to use. The screen device object must be valid in the current thread."
   321     @param  "aClipRegion"   "Initial clipping region to use."
   322     
   323     @leave  "This method may leave with one of the system-wide error codes.
   324     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   325     */
   326     void StartDirectScreenAccessL(const TRect& aVideoRect, 
   327         CFbsScreenDevice& aScreenDevice, const TRegion& aClipRegion);
   328 
   329     /**
   330     Sets a new clipping region for Direct Screen Access. After the method returns, no video will 
   331     be drawn outside of the region. If clipping is not supported, or the clipping region is too 
   332     complex, either playback will pause or will resume without video display, depending on the 
   333     current setting of SetPauseOnClipFail(), and the result can be verified with IsPlaying(). 
   334     Clipping can be disabled by setting a new clipping region that includes the whole video window.
   335 
   336     @param  "aRegion" "The new clipping region. After the method returns, no video will be drawn outside the region."
   337     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   338     */
   339     void SetScreenClipRegion(const TRegion& aRegion);
   340 
   341     /**
   342     Sets whether the system should pause playback when it gets a clipping region it cannot handle, 
   343     or Direct Screen Access is aborted completely. If not, processing will proceed normally, but no 
   344     video will be drawn. By default, playback is paused.
   345 
   346     @param "aPause" "True if playback should be paused when clipping fails, false if not. 
   347                     If playback is not paused, it will be continued without video display."
   348     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   349     */
   350     void SetPauseOnClipFail(TBool aPause);
   351 
   352     /**
   353     Aborts Direct Screen Access completely, to be called from MAbortDirectScreenAccess::AbortNow() 
   354     and similar methods. DSA can be resumed by calling StartDirectScreenAccessL().
   355     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   356     */
   357     void AbortDirectScreenAccess();
   358 
   359     /**
   360     Indicates whether playback is proceeding. This method can be used to check whether playback was 
   361     paused or not in response to a new clipping region or DSA abort.
   362 
   363     @return "ETrue if video is still being played (even if not necessarily displayed)."
   364     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   365     */
   366     TBool IsPlaying();
   367 
   368     /**
   369     Re-draws the latest video picture. Only available when DSA is being used. If DSA is aborted or a 
   370     non-supported clipping region has been set, the request may be ignored.
   371     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   372     */
   373     void Redraw();
   374 
   375 
   376     /**
   377     Starts video playback, including decoding, post-processing, and rendering. Playback will proceed 
   378     until it has been stopped or paused, or the end of the bitstream is reached.
   379     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   380     */
   381     void Start();
   382 
   383     /**
   384     Stops video playback. No new pictures will be decoded, post-processed, or rendered.
   385     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   386     */
   387     void Stop();
   388 
   389     /**
   390     Pauses video playback, including decoding, post-processing, and rendering. No pictures will be 
   391     decoded, post-processed, or rendered until playback has been resumed.
   392     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   393     */
   394     void Pause();
   395 
   396     /**
   397     Resumes video playback after a pause.
   398     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   399     */
   400     void Resume();
   401 
   402     /**
   403     Changes to a new decoding and playback position, used for randomly accessing (seeking) the 
   404     input stream. The position change flushes all input and output buffers. Pre-decoder and 
   405     post-decoder buffering are handled as if a new bitstream was being decoded. If the device still
   406     has buffered pictures that precede the new playback position, they will be discarded. If playback
   407     is synchronized to a clock source, the client is responsible for setting the clock source to the 
   408     new position.
   409     
   410     @param "aPlaybackPosition" "The new playback position in the video stream."
   411     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   412     */
   413     void SetPosition(const TTimeIntervalMicroSeconds& aPlaybackPosition);
   414 
   415     /**
   416     Freezes a picture on the screen. After the picture has been frozen, no new pictures are 
   417     displayed until the freeze is released with ReleaseFreeze(). If the device output is being 
   418     written to memory buffers or to another plug-in, instead of the screen, no decoded pictures 
   419     will be delivered while the freeze is active, and they are simply discarded.
   420 
   421     @param "aTimestamp" "The presentation timestamp of the picture to freeze. The frozen picture 
   422                         will be the first picture with a timestamp greater than or equal to this 
   423                         parameter."
   424     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   425     */
   426     void FreezePicture(const TTimeIntervalMicroSeconds& aTimestamp);
   427 
   428     /**
   429     Releases a picture frozen with FreezePicture().
   430 
   431     @param "aTimestamp" "The presentation timestamp of the picture to release. The first picture 
   432                         displayed after the release will be the first picture with a timestamp 
   433                         greater than or equal to this parameter. To release the freeze immediately, 
   434                         set the timestamp to zero."
   435     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   436     */
   437     void ReleaseFreeze(const TTimeIntervalMicroSeconds& aTimestamp);
   438 
   439 
   440     /**
   441     Returns the current playback position, i.e. the timestamp for the most recently displayed or 
   442     virtually displayed picture. If the device output is written to another device, the most recent 
   443     output picture is used.
   444 
   445     @return "Current playback position."
   446     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   447     */
   448     TTimeIntervalMicroSeconds PlaybackPosition();
   449 
   450     /**
   451     Returns the total amount of memory allocated for uncompressed pictures. This figure only 
   452     includes the pictures actually allocated by the plug-in itself, so that the total number of 
   453     bytes allocated in the system can be calculated by taking the sum of the values from all plug-ins.
   454 
   455     @return "Total number of bytes of memory allocated for uncompressed pictures."
   456     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   457     */
   458     TUint PictureBufferBytes();
   459 
   460     /**
   461     Reads various counters related to decoded pictures. The counters are reset when Initialize() 
   462     or this method is called, and thus they only include pictures processed since the last call.
   463 
   464     Post-processor devices return the number of input pictures in iPicturesDecoded and 
   465     iTotalPictures. If the decoded pictures are written to another plug-in, they are considered 
   466     to be "virtually displayed".
   467 
   468     @param "aCounters" "The counter structure to fill."
   469     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   470     */
   471     void GetPictureCounters(CMMFDevVideoPlay::TPictureCounters& aCounters);
   472 
   473 
   474     /**
   475     Sets the computational complexity level to use. If separate complexity levels are not available, 
   476     the method call is ignored. If the level specified is not available, the results are undefined. 
   477     Typically the device will either ignore the request or use the nearest suitable level.
   478 
   479     The complexity level can be changed at any point during playback.
   480 
   481     @param "aLevel" "The computational complexity level to use. Level zero (0) is the most complex 
   482                     one, with the highest quality. Higher level numbers require less processing 
   483                     and may have lower quality."
   484     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   485     */
   486     void SetComplexityLevel(TUint aLevel);
   487 
   488     /**
   489     Gets the number of complexity levels available.
   490     
   491     @return "The number of complexity control levels available, or zero if the information is not 
   492             available yet. The information may not be available if the number of levels depends on 
   493             the input data, and enough input data has not been read yet. In that case, using level 
   494             zero is safe."
   495     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   496     */
   497     TUint NumComplexityLevels();
   498 
   499     /**
   500     Gets information about a computational complexity level. This method can be called after 
   501     NumComplexityLevels() has returned a non-zero value - at that point the information is guaranteed 
   502     to be available. Some hardware device implementations may not be able to provide all values, 
   503     in that case the values will be approximated.
   504 
   505     @param "aLevel" "The computational complexity level to query. The level numbers range from zero 
   506                     (the most complex) to NumComplexityLevels()-1."
   507     @param "aInfo"  "The information structure to fill."
   508     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   509     */
   510     void GetComplexityLevelInfo(TUint aLevel, CMMFDevVideoPlay::TComplexityLevelInfo& aInfo);
   511 
   512     /**
   513     Returns a picture back to the device. This method is called by CMMFDevVideoPlay to return pictures 
   514     from the client (after they have been written with NewPicture()), or by the output device when 
   515     it has finished using a picture.
   516 
   517     @param "aPicture" "The picture to return. The device can re-use the memory for the picture."
   518     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   519     */
   520     void ReturnPicture(TVideoPicture* aPicture);
   521 
   522     /**
   523     Gets a copy of the latest picture sent to output.
   524 
   525     @param "aPictureData"   "Target picture. The memory for the picture must be allocated by the 
   526                             caller, and initialized properly. The data formats must match the snapshot 
   527                             format requested."
   528     @param "aFormat"        "The picture format to use for the snapshot."
   529 
   530     @return "ETrue if the snapshot was taken, EFalse if a picture is not available. The picture may not 
   531             be available if decoding has not progressed far enough yet."
   532 
   533     @leave  "The method will leave if an error occurs. Typical error codes used:
   534             * KErrNotSupported - The requested data format or picture size is not supported, or the 
   535             plug-in does not support snapshots."
   536     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   537     */
   538 //  TBool GetSnapshotL(TPictureData& aPictureData, const TUncompressedVideoFormat& aFormat) {return EFalse;};
   539     TBool GetSnapshotL(TPictureData& aPictureData, const TUncompressedVideoFormat& aFormat);
   540 
   541     /**
   542     When the snapshot is available, it will be returned to the client using the TimedSnapshotComplete()
   543     callback. To cancel a timed snapshot request, use CancelTimedSnapshot(). Only one timed snapshot 
   544     request can be active at a time.
   545 
   546     @param "aPictureData"           "Target picture. The memory for the picture must be allocated by 
   547                                     the caller, and initialized properly. The data formats must match 
   548                                     the snapshot format requested. The picture must remain valid until 
   549                                     the snapshot has been taken or until the request has been cancelled 
   550                                     with CancelTimedSnapshot()."
   551     @param "aFormat"                "The picture format to use for the snapshot."
   552     @param "aPresentationTimestamp" "Presentation timestamp for the picture to copy."
   553 
   554     @leave  "The method will leave if an error occurs. Typical error codes used:
   555             * KErrNotSupported - The requested data format or picture size is not supported or 
   556             the plug-in does not support timed snapshots."
   557     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   558     */
   559     //void GetTimedSnapshotL(TPictureData* aPictureData, const TUncompressedVideoFormat& aFormat, 
   560     //                        const TTimeIntervalMicroSeconds& aPresentationTimestamp){};
   561     void GetTimedSnapshotL(TPictureData*, const TUncompressedVideoFormat&, const TTimeIntervalMicroSeconds&){};
   562 
   563 
   564     /**
   565     When the snapshot is available, it will be returned to the client using the TimedSnapshotComplete()
   566     callback. To cancel a timed snapshot request, use CancelTimedSnapshot(). Only one timed snapshot 
   567     request can be active at a time.
   568 
   569     @param "aPictureData"           "Target picture. The memory for the picture must be allocated by 
   570                                     the caller, and initialized properly. The data formats must match 
   571                                     the snapshot format requested. The picture must remain valid until 
   572                                     the snapshot has been taken or until the request has been cancelled 
   573                                     with CancelTimedSnapshot()."
   574     @param "aFormat"                "The picture format to use for the snapshot."
   575     @param "aPictureId"             "Picture identifier for the picture to copy."
   576 
   577     @leave  "The method will leave if an error occurs. Typical error codes used:
   578             * KErrNotSupported - The requested data format or picture size is not supported or 
   579             the plug-in does not support timed snapshots."
   580     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   581     */
   582 //    void GetTimedSnapshotL(TPictureData* aPictureData, const TUncompressedVideoFormat& aFormat, 
   583 //                            const TPictureId& aPictureId){};
   584     void GetTimedSnapshotL(TPictureData*, const TUncompressedVideoFormat&, const TPictureId& ){};
   585 
   586     /**
   587     Cancels a timed snapshot request.
   588     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   589     */
   590     void CancelTimedSnapshot(){};
   591 
   592     /**
   593     Gets a list of the supported snapshot picture formats.
   594 
   595     @param "aFormats" "An array for the result format list. The array must be created and destroyed by 
   596     the caller."
   597 
   598     @leave "This method may leave with one of the standard error codes."
   599     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   600     */
   601     void GetSupportedSnapshotFormatsL(RArray<TUncompressedVideoFormat>&){};
   602 
   603 
   604     /**
   605 
   606     Notifies the hardware device that the end of input data has been reached and no more input data 
   607     will be written. The hardware device can use this signal to ensure that the remaining data gets 
   608     processed, without waiting for new data. For example when the data type is not EDuCodedPicture,
   609     calling this method is necessary otherwise a hardware device implementation might be looking for 
   610     the start code for the next picture to ensure it has a complete picture before starting to decode
   611     the previous one. 
   612     
   613       
   614     After the remaining data has been processed (and displayed, if applicable), the hardware 
   615     device must notify the proxy with the MdvppStreamEnd() callback.
   616 
   617     DevVideo clients are encouraged to call this method, but its use is not mandatory for synchronized
   618     processing.  For synchronized playback, all video pictures are processed or discarded according to 
   619     their timestamps, and so the client can easily infer when processing is complete.  However, it 
   620     should be noted that the last picture might not be displayed if this method is not called and the 
   621     input data type is not EDuCodedPicture.
   622 
   623     For non-synchronized playback (e.g. file conversion), a client must call this method otherwise it
   624     will never find out when the hardware device has finished processing the data.
   625     
   626     @pre    "This method can only be called after the hwdevice has been initialized with Initialize()."
   627     */
   628     void InputEnd();
   629 
   630     /**
   631     Retrieves a custom interface to the device.
   632     @param  "aInterface"    "Interface UID, defined with the custom interface."
   633     @return "Pointer to the interface implementation, or NULL if the device does not 
   634             implement the interface requested. The return value must be cast to the 
   635             correct type by the user."
   636     */
   637     TAny* CustomInterface(TUid aInterface);  
   638     
   639     // === MNGAPostProcSessionManagerObserver ===
   640     /**
   641     Set the proxy implementation to be used. Called just after the object is constructed.
   642     @param  "aProxy"    "The proxy to use."
   643     */
   644     void BufferAvailable(TInt aBufId, TInt aStatus);
   645     
   646 public: 
   647 
   648     // === MMmfVideoBufferManagement ===
   649     
   650     /** 
   651      * Sets the observer object to use. The observer gets notified
   652      * when new buffers are available and when buffers need to be
   653      * released back to the media device.
   654      *
   655      * This method can only be called before the media device has
   656      * been Initialized with InitializeL().
   657      * 
   658      * @param aObserver The observer object to use.
   659      */
   660     void MmvbmSetObserver(MMmfVideoBufferManagementObserver* aObserver);
   661     
   662     /** 
   663      * Enables input buffer management mode. In buffer management mode
   664      * the target media device allocates memory for input buffers and
   665      * the client can only use input buffers allocated with
   666      * MmvbmGetBufferL().
   667      *
   668      * This method can only be called before the media device has been
   669      * Initialized with InitializeL(). This method must be called if
   670      * the client uses MmvbmGetBufferL().
   671      * 
   672      * @param aEnable ETrue if input buffer management mode is used.
   673      */
   674     void MmvbmEnable(TBool aEnable);
   675     
   676     /** 
   677      * Sets the buffer options to use. The client can request the
   678      * number of input buffers that should be available, but typically
   679      * only few (one or two) buffers can be used.
   680      *
   681      * This method can only be called before the media device has been
   682      * Initialized with InitializeL().
   683      * 
   684      * @param aOptions The buffer options to use, see TBufferOptions.
   685      *
   686      * @leave KErrNotSupported The requested buffer options are not
   687      *   supported. Typically the client has requested too many input
   688      *   buffers.
   689      */
   690     void MmvbmSetBufferOptionsL(const TBufferOptions& aOptions);
   691     
   692     /** 
   693      * Gets the buffer options currently in use.
   694      *
   695      * This method can only be called before the media device has been
   696      * Initialized with InitializeL().
   697      * 
   698      * @param aOptions Target buffer options data structure.
   699      */
   700     void MmvbmGetBufferOptions(TBufferOptions& aOptions);
   701     
   702     /** 
   703      * Gets a new input picture buffer. The client can then write data
   704      * into the buffer and write it back to the media device with
   705      * WritePictureL().
   706      *
   707      * This method can only be called after the media device has been
   708      * Initialized with InitializeL(). This method can only be called
   709      * in buffer management mode, i.e. if the client has called
   710      * MmvbmEnable(ETrue).
   711      *
   712      * Note that target-allocated and client-allocated input buffers
   713      * cannot be mixed. In buffer management mode only input buffers
   714      * allocated with this method can be sent to the media device.
   715      *
   716      * If a client has retrieved buffers with MmvbmGetBufferL(), it
   717      * must be prepated to release them synchronously at any point if
   718      * MmmfBufferManagementObserver::MmvbmoReleaseBuffers() is
   719      * called. This may happen if the target media device suddenly
   720      * loses access to the buffers due to DSA abort, resource
   721      * management conflict, or media device destruction.
   722      * 
   723      * @param aSize The requested buffer size, in pixels. The buffer
   724      *   size should match the picture size set at initialisation phase,
   725      *   or otherwise suitable buffer may not be available. If the size
   726      *   is smaller than the size set at initialisation phase, the
   727      *   allocated buffer may be larger than requested.
   728      * 
   729      * @return A new input picture buffer. If no free buffers are
   730      * available, the return value is NULL.
   731      *
   732      * @leave General The method will leave if an error occurs. Lack
   733      * of free buffers is not considered an error.
   734      */
   735     TVideoPicture* MmvbmGetBufferL(const TSize& aSize);
   736     
   737     /** 
   738      * Releases an input buffer back to the media device without using
   739      * it. This method is mainly used as a response to a
   740      * MmvbmReleaseBuffers() callback.
   741      * 
   742      * @param aBuffer The buffer to release.
   743      */
   744     void MmvbmReleaseBuffer(TVideoPicture* aBuffer);    
   745     
   746 public:
   747     
   748      // === MMMFVideoSurfaceSupport ===
   749     
   750 	/** 
   751     Requests the media device to use graphics surfaces for video rendering. 
   752     The client must call this method before Initialize() to ensure the media 
   753     device allocates the right types of resources for rendering.
   754     */
   755     void MmvssUseSurfaces();
   756          
   757     /** 
   758     Sets a new video surface support observer to receive surface management events 
   759     from the media device.
   760      
   761     @param aObserver New observer object to use.
   762     */
   763     void MmvssSetObserver(MMMFVideoSurfaceObserver& aObserver);
   764     
   765     /** 
   766     Retrieves surface parameters for a display. The client typically calls this in response 
   767     to a MmvsoSurfaceCreated() or MmvsoSurfaceParametersUpdated() observer callback.
   768      
   769     @param  aSurfaceId
   770 	        Surface ID for the display.
   771 	@param  aCropRect
   772 	        Cropping rectangle within the surface. The crop rectangle identifies the area of 
   773 	        the surface that should be shown on the screen.
   774 	@param  aPixelAspectRatio
   775 	        Video picture pixel aspect ratio.
   776 
   777 	@leave KErrNotReady if no surface is available for the display.
   778     */
   779     
   780     void MmvssGetSurfaceParametersL(TSurfaceId& aSurfaceId, TRect& aCropRect, 
   781     					TVideoAspectRatio& aPixelAspectRatio);
   782     /** 
   783     Indicates that the surface is no longer in use and can be destroyed. The client typically calls
   784     this in response to MmvsoSurfaceCreated() (while old surface is already in use and the current
   785     should be removed) or MmvsoRemoveSurface() observer callback.  
   786          
   787     @param aSurfaceId Surface ID that is no longer in use
   788     
   789     @leave KErrNotFound if the surface does not exist
   790     */
   791     void MmvssSurfaceRemovedL(const TSurfaceId& aSurfaceId);    
   792 
   793 public:    
   794 
   795     // === MMmfVideoPropertiesObserver ===
   796     
   797     /** 
   798     Decoded video properties updated. The media device implementing the
   799     MMmfVideoPropertiesNotifier extension will call this method immediately
   800     before outputting a picture with the updated properties.
   801     
   802     When the extension is used between a decoder and a post-processor media
   803     device, the post-processor can associate the changed properties with the
   804     correct picture, since the next incoming picture after this call will
   805     be the first updated one. 
   806     
   807     When the extension is used between a DevVideoPlay client and a
   808     post-processor media device, the client can synchronously reconfigure
   809     video display options using SetScaleOptionsL() and related methods. This
   810     lets the client reconfigure the display for the correct picture.
   811     
   812     @param aYuvFormat Updated YUV format parameters. The updated fields are
   813                       iAspectRatioDenom, iAspectRatioNum, and iCoefficients     
   814     @param aPictureSize	Updated picture size. This size will be the true
   815                        	picture display size, excluding any padding that
   816                        	the codec might use.
   817     */
   818     virtual void MmvpoUpdateVideoProperties(const TYuvFormat& aYuvFormat, const TSize& aPictureSize);
   819     
   820 public:
   821 
   822     // === MMmfVideoResourceObserver ===
   823     
   824     /** 
   825     Indicates that a media device has lost its resources. The client must
   826     synchronously pause or stop processing before returning from this method
   827     so that the media device can release its resources to the system. If
   828     the client does not pause or stop, resource loss will be handled as a
   829     fatal error.
   830      
   831     The client may start again or resume after receiving a
   832     MvroResourcesRestored() callback.
   833      
   834     @param aMediaDevice UID for the media device that lost resources. The
   835                         client can use this e.g. to determine whether the
   836                         decoder or the post-processor lost resources. This
   837                         is typically not required though since the client
   838                         must pause DevVideo entirely.
   839     */
   840     virtual void MmvroResourcesLost(TUid aMediaDevice);
   841 
   842     /** 
   843     Indicates that a media device has regained its resources after a
   844     previous resource loss. The client can restart or resume processing.
   845     This can be done either synchronously or asynchronously.
   846      
   847     @param aMediaDevice UID for the media device that regained resources.
   848     */
   849     virtual void MmvroResourcesRestored(TUid aMediaDevice);
   850             
   851     
   852     // === MMmfVideoSurfaceHandleControl ===
   853     
   854     /** 
   855     Sets an external surface ID. This should be called as soon as external surface is created.    
   856      
   857     @param aSurfaceID external surface ID.
   858         
   859     */
   860     
   861     virtual void MmvshcSetSurfaceHandle(const TSurfaceId& aSurfaceHandle);
   862     
   863     /** 
   864     Sets a redraw buffer to be used during resource loss.    
   865      
   866     @param aRedrawBuffer redraw buffer.
   867         
   868     */
   869      virtual void MmvshcRedrawBufferToSurface(TPtrC8& aRedrawBuffer);
   870      
   871      /**
   872       * Creates a surface and maps the surface with the chunk handle passed in.
   873       * @param aAttributes
   874       * @param aHandle is the Chunk handle for the data.
   875       * @param aSurfaceId returns the surfaceId that was just created
   876       * 
   877       * @return error code
   878       */
   879          
   880      virtual TInt MmvshcCreateSurface(const RSurfaceManager::TSurfaceCreationAttributes& aAttributes, TInt aHandle, TSurfaceId& aSurfaceId);
   881    
   882 public:
   883 	// === MMmfVideoPropertiesNotifier ===
   884     /** 
   885     Sets a new video properties observer. This method can be called at any
   886     time after the media device has been instantiated.
   887      
   888     @param aObserver New observer object.
   889     */
   890     virtual void MmvpnSetObserver(MMmfVideoPropertiesObserver* aObserver);
   891 
   892 public:
   893 	
   894 	void ReturnPicToDecoder(TVideoPicture* aPic);
   895 	TInt AttemptToPost();
   896 	
   897 public:
   898     //=== MMdfTrickPlayControl === =     
   899     /**        
   900      * Query the Direction capabilities from the MDF decoders and       
   901      * post processor.       
   902      *        
   903     */       
   904     virtual void MmvprcGetPlayRateCapabilitiesL(TVideoPlayRateCapabilities& aCapabilities);
   905 
   906     /**       
   907      * Sets the playback speed. A negative rate means play backward.       
   908      * +/- percentage.       
   909      *        
   910      */       
   911     virtual void MmvprcSetPlayRateL(const TInt aRate);
   912 
   913     /**       
   914      * Gets the playback speed. A negative rate means play backward.       
   915      * +/- percentage.       
   916      *        
   917      */       
   918     virtual TInt MmvprcPlayRateL();
   919 
   920     /**       
   921      * Sets the step frame number in frame step mode       
   922      * +/- frames       
   923      */       
   924     virtual void MmvprcStepFrameL(const TInt aStep);
   925 
   926     /**       
   927      * Registers the observer       
   928      */       
   929     virtual void MmvprcSetObserver(MMmfVideoPlayRateObserver& aObserver); 
   930 
   931 public: 
   932      
   933     // === MMmfVideoSecureOutput ===
   934     /**
   935      * Notifies the media device if the content can only be sent to a
   936      * secure output. The device display is typically considered a
   937      * secure output, but a high-quality unprotected analog or digital
   938      * video output connector is not. By default all content can be
   939      * sent to both secure and insecure outputs.
   940      *
   941      * This method can only be called before the media device has been
   942      * initialised with InitializeL().
   943      *
   944      * @param aSecure Set to ETrue if the content can only be sent to
   945      *     a secure output, EFalse if both secure and unsecure outputs can
   946      *     be used.
   947      *
   948      * @leave KErrNotSupported Insecure outputs cannot be
   949      * disabled. The client should not play protected content.
   950      */    
   951      virtual void MmvsoSetSecureOutputL(TBool aSecure);
   952 
   953 public:
   954      //=== AdvancedVideoSecureOutput === =     
   955      virtual void MmavsoSetAllowedOutputL(TUint aAllowedOutputMask);
   956     
   957 public:
   958      // === MMmfPostInitializeRequest ===
   959      virtual void MmpirPostInitializeRequest(MMmfPostInitializeResponse& aResponse);
   960      
   961 protected: 
   962 
   963     // === CMMFVideoPostProcHwDevice ===
   964     /**
   965     Set the proxy implementation to be used. Called just after the object is constructed.
   966     @param  "aProxy"    "The proxy to use."
   967     */
   968     void SetProxy(MMMFDevVideoPlayProxy& aProxy);
   969     
   970 protected:
   971 
   972     /**
   973      *  Symbian 2nd phase constructor .
   974      */
   975     void ConstructL();
   976     
   977 private:    
   978 	TInt IsTimeToPost(TVideoPicture* frame, TInt64& delta);
   979 	TVideoPicture* CreateBuffersL(TInt aBufId);
   980     void CreateVBMBuffersL();
   981     TInt SetupExternalSurface(const TSurfaceId &aSurfaceID);
   982     void ReleaseInputQ();
   983     void ReleaseProcessQ();
   984     void ReleasePicture(TVideoPicture *pic);
   985     void PublishSurfaceCreated();
   986     void PublishSurfaceUpdated();
   987     TInt SetupSurface();
   988     void SetSurfaceAttributes(const TSize& aSize, TInt aNumBuf);
   989     TInt GetID(TVideoPicture *aPicture);
   990     TInt GetExternalBufferID(TVideoPicture *aPicture);
   991     TInt RegisterSurface(const TSurfaceId& aSurfaceId);
   992     TInt IsGceReady();
   993     void SetTimer(TInt64 aDelta);
   994     TInt ConvertPostProcBuffer(TVideoPicture* pSrc, TVideoPicture* pDest);
   995     void AddPictureToVBMQ(TVideoPicture *pic);
   996     void AddPictureToColorConversionQ(TVideoPicture *pic);
   997     void ResetCountingBuffer();
   998     void PicturesSkipped();
   999     TVideoPicture* DoColorConvert(TVideoPicture* aPicture);
  1000 
  1001     /**       
  1002      Adds a picture to the Input queue. Based on the timestamp of the picture,
  1003      it is either appeneded at the end of the queue or inserted at the 
  1004      appropriate position. The queue is arranged in the ascending order. 
  1005      The ret value indicates if the head of the queue was changed or not.         
  1006     */  
  1007     TInt AddToQ(TVideoPicture* aPicture);
  1008     
  1009     /**       
  1010      Removes a picture from Input queue based on the playrate.
  1011      If the playrate is +ve ie forward playback head will be removed
  1012      and if the playrate is -ve ie backward playback tail
  1013      will be removed.         
  1014     */  
  1015     void RemoveFromQ();
  1016     
  1017     /**       
  1018      Returns a picture from Input queue based on the playrate.
  1019      If the playrate is +ve ie forward playback head will be returned
  1020      and if the playrate is -ve ie backward playback tail  
  1021      will be returned.       
  1022     */  
  1023     TVideoPicture* PeekQ();
  1024 
  1025     /**
  1026     Adds a surface hint to a video surface. If there is any hint already added, 
  1027     the surface is updated with the new hint. 
  1028     */		
  1029     TInt AddHints();
  1030     
  1031 	#ifdef _DUMP_YUV_FRAMES
  1032     void captureYuv(TVideoPicture* aPicture);
  1033     #endif
  1034     
  1035     TInt SetSourceFormat();
  1036     TInt SetSourceRange();
  1037     TInt ColorConvert(tBaseVideoFrame* aInputFrame, TUint8* aDestPtr, tWndParam* aInputCropWindow, tWndParam* aOutputCropWindow);
  1038 
  1039 private:
  1040 
  1041     //
  1042     // C++ default constructor.  
  1043     //
  1044     CNGAPostProcHwDevice();
  1045 
  1046     //
  1047     // State of post processor
  1048     //
  1049     enum TPPState
  1050     {
  1051         EInitializing,
  1052         EInitialized,
  1053         EPlaying,
  1054         EPaused,
  1055         EStopped
  1056     };
  1057     
  1058     enum TTimeToPost
  1059     {
  1060         ESkipIt = -1,
  1061         EPostIt = 0,
  1062         EDelayIt = 1,
  1063     };
  1064     
  1065 private: 
  1066 
  1067     MMMFDevVideoPlayProxy*      				iProxy;															
  1068     CMMFVideoDecodeHwDevice*    				iInputDecoderDevice;															
  1069     RArray<TVideoPicture*>              		iInputQ;															
  1070     RArray<TVideoPicture*>              		iProcessQ;															
  1071     MMMFClockSource*            				iClockSource;															
  1072     TTimeIntervalMicroSeconds					iCurrentPlaybackPosition;															
  1073     TPPState        							iPPState;															
  1074     CNGAPostProcSurfaceHandler*					iSurfaceHandler;
  1075     CNGAPostProcSessionManager*					iSessionManager;
  1076 	
  1077 	RSurfaceManager::TSurfaceCreationAttributesBuf	iAttributes;
  1078 	RChunk										iChunk;
  1079 	RSurfaceManager::TInfoBuf 					iInfo;
  1080 	TSurfaceId									iSurfaceId;
  1081 	TBool           							iIsInputEnded;
  1082 	CNGAPostProcTimer*							iPostingTimer;
  1083 	CMMFDevVideoPlay::TPictureCounters  		iPictureCounters;
  1084 	TBool 										iFirstPictureUpdated;
  1085 	TBool 										iUsingExternalSurface;
  1086     TBool           							iIsColorConversionNeeded;
  1087     RArray<TVideoPicture*>              		iColorConversionQ;
  1088     TBool 										iSurfaceCreatedEventPublished;
  1089     TInt                                		iOverflowPictureCounter;
  1090     TInt 								    	iVideoFrameBufSize;	
  1091     TBool 										iResourceLost;
  1092     TBool 										iRedrawDone;
  1093 	// Flag to indicate that the redraw surface has been created, and
  1094 	// can be used in a subsequent call ro Redraw()
  1095 	TBool										iRedrawSurfaceInUse;
  1096 
  1097     //-- members for buffer management --
  1098     MMmfVideoBufferManagementObserver*  		iVBMObserver;
  1099     TBufferOptions                      		iVBMBufferOptions;
  1100     RArray<TVideoPicture*>              		iVBMBufferReferenceQ;
  1101     RArray<TVideoPicture*>              		iVBMBufferQ;
  1102     TBool                               		iVBMEnabled;
  1103     RArray<TUncompressedVideoFormat>    		iSupportedInputFormats;
  1104     TInt										count;
  1105     
  1106     //-- members for Surface Hints --
  1107     RSurfaceManager::THintPair					iHint;
  1108     TUint 										iSurfaceMask;
  1109     TUid										iSurfaceKey;
  1110             
  1111     //-- members for Surface support --
  1112     MMMFVideoSurfaceObserver*					iVideoSurfaceObserver;
  1113 	MMmfVideoPropertiesObserver*				iVPObserver;
  1114 	RWsSession									iWsSession;
  1115 	TSize										iPicSize;
  1116 	TUint										iAspectRatioNum;
  1117 	TUint										iAspectRatioDenom;
  1118 	//-- members for Trickplay support --
  1119 	TInt                                iStepFrameCount;
  1120     TInt                                iPlayRate;       
  1121     TBool                               iKeyFrameMode;       
  1122     MMmfVideoPlayRateObserver*          iFPObserver;       
  1123     TUint8                              iSkippedFramesCountingBuffer[64];       
  1124     TUint8                              iSkippedFramesInLast64Frames;       
  1125     TUint8                              iCurrentPosInFramesCountingBuffer; 
  1126 	TUncompressedVideoFormat 			iVideoFormat;
  1127         //---------- utility variables -------
  1128 	// Image source format
  1129 	TUint8 								iSourceFormat;
  1130 
  1131 	//Image range
  1132 	TUint8		 						iSourceRange;
  1133 
  1134     //-- members for PostInitializeRequest support --
  1135     MMmfPostInitializeResponse* iPostInitializeResponse;
  1136     TBool iIsExternalChunk;
  1137 };    
  1138 
  1139 /**
  1140  * Timer of Posting
  1141  */
  1142 
  1143 class CNGAPostProcTimer: public CTimer
  1144     {
  1145 public:
  1146     static CNGAPostProcTimer* NewL( CNGAPostProcHwDevice& aParent );
  1147     ~CNGAPostProcTimer();
  1148     
  1149 protected:    
  1150     void RunL();
  1151     
  1152 private:
  1153     CNGAPostProcTimer( CNGAPostProcHwDevice& aParent );
  1154     void ConstructL();
  1155     
  1156 private:
  1157     CNGAPostProcHwDevice& iParent;
  1158 };
  1159 
  1160 #endif //__NGAPOSTPROCHWDEVICE_H__
  1161