videoeditorengine/vedtranscoder/inc/ctrtranscoderimp.h
changeset 9 d87d32eab1a9
parent 0 951a5db380a0
equal deleted inserted replaced
0:951a5db380a0 9:d87d32eab1a9
     1 /*
       
     2 * Copyright (c) 2010 Ixonos Plc.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "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 * Ixonos Plc
       
    14 *
       
    15 * Description:  
       
    16 * Transcoder.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef CTRTRANSCODERIMP_H
       
    22 #define CTRTRANSCODERIMP_H
       
    23 
       
    24 
       
    25 // INCLUDES
       
    26 #include "ctrtranscoder.h"
       
    27 #include "ctrdevvideoclientobserver.h"
       
    28 
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CTRVideoDecoderClient;
       
    32 class CTRVideoEncoderClient;
       
    33 class CTRScaler;
       
    34 
       
    35 
       
    36 // CONSTANTS
       
    37 const TInt KTRErrNotReady = -1001;
       
    38 
       
    39 
       
    40 // CLASS DECLARATION
       
    41 
       
    42 /**
       
    43 *  CTranscoder Implementation class
       
    44 *  @lib TRANSCODER.LIB
       
    45 *  @since 3.1
       
    46 */
       
    47 NONSHARABLE_CLASS(CTRTranscoderImp) : public CTRTranscoder, public MTRDevVideoClientObserver, public CActive
       
    48     {
       
    49     public: // Constructors and destructor
       
    50 
       
    51         /**
       
    52         * Two-phased constructor.
       
    53         */
       
    54         static CTRTranscoderImp* NewL(MTRTranscoderObserver& aObserver);
       
    55 
       
    56         /**
       
    57         * Destructor.
       
    58         */
       
    59         ~CTRTranscoderImp();
       
    60 
       
    61     public: // Transcoder methods
       
    62         /**
       
    63         * From CTranscoder. Open the transcoder. Instantiates other submodules based on the selected operational mode. 
       
    64         * @param aMediaSink MCMRMediaSink for encoded data output
       
    65         * @param aMode Mode for the transcoder, operation to perform
       
    66         * @param aMimeTypeInputFormat  Mime type for input format
       
    67         * @param aMimeTypeOutputFormat Mime type for otput format
       
    68         * @param aRealTimeProcessing Specifies how to process data. ETrue - Real-time processing; EFalse - non-real time. 
       
    69         * If the processing cannot be performed in real-time, the transcoder process data as fast as it can. 
       
    70         * @return void. Can leave (KErrNotSupported - selected operation or codecs are not supported, 
       
    71         * @ or any other Symbian error code )
       
    72         */
       
    73         void OpenL( MCMRMediaSink* aMediaSink, 
       
    74                     CTRTranscoder::TTROperationalMode aMode, 
       
    75                     const TDesC8& aInputMimeType, 
       
    76                     const TDesC8& aOutputMimeType, 
       
    77                     const TTRVideoFormat& aVideoInputFormat, 
       
    78                     const TTRVideoFormat& aVideoOutputFormat, 
       
    79                     TBool aRealTime );
       
    80         
       
    81         // Information methods
       
    82         /**
       
    83         * Check support for input format
       
    84         * @param aMimeType MIME type
       
    85         * @return TBool: ETrue - supports; EFalse - does not support
       
    86         */
       
    87         TBool SupportsInputVideoFormat(const TDesC8& aMimeType);
       
    88 
       
    89         /**
       
    90         * Check support for output format
       
    91         * @param aMimeType MIME type
       
    92         * @return TBool: ETrue - supports; EFalse - does not support
       
    93         */
       
    94         TBool SupportsOutputVideoFormat(const TDesC8& aMimeType);
       
    95 
       
    96         // Control
       
    97         /**
       
    98         * From CTranscoder. Initializes the transcoder. Initializing completes asynchronously with MtroInitializeComplete observer callback.
       
    99         * @param none
       
   100         * @return void
       
   101         */
       
   102         void InitializeL();
       
   103 
       
   104         /**
       
   105         * From CTranscoder. Starts transcoding. 
       
   106         * @param none
       
   107         * @return void. Can leave with Symbian error code in case of an error. 
       
   108         */
       
   109         void StartL();
       
   110 
       
   111         /**
       
   112         * From CTranscoder. Stops transcoding synchronously. Use this method to stop data processing synchronously. In this case 
       
   113         * all active requests are cancelled and data that was not processed is returned to data owner immediately. 
       
   114         * @param none
       
   115         * @return void. Can leave with Symbian error code in case of an error. 
       
   116         */
       
   117         void StopL();
       
   118 
       
   119         /**
       
   120         * From CTranscoder. Stops transcoding asynchronously. The transcoder use this signal to ensure that the remaining data gets processed, 
       
   121         * without waiting for new data. This method is mainly useful for file-to-file conversions and other non-realtime 
       
   122         * processing. 
       
   123         * @param none
       
   124         * @return void. Can leave with Symbian error code in case of an error. 
       
   125         */
       
   126         void AsyncStopL();
       
   127 
       
   128         /**
       
   129         * From CTranscoder. Pauses transcoding.
       
   130         * @param 
       
   131         * @return void. Can leave with Symbian error code in case of an error. 
       
   132         */
       
   133         inline void PauseL(){};
       
   134 
       
   135         /**
       
   136         * From CTranscoder. Resumes transcoding. 
       
   137         * @param 
       
   138         * @return void. 
       
   139         */
       
   140         inline void Resume(){};
       
   141 
       
   142         // Settings
       
   143         /**
       
   144         * From CTranscoder. Sets bit rate parameter for transcoded bitstream. Can be run-time setting
       
   145         * @param aBitRate Bitrate
       
   146         * @return void Can leave with KErrNotSupported
       
   147         */
       
   148         void SetVideoBitRateL(TUint aBitRate);
       
   149 
       
   150         /**
       
   151         * From CTranscoder. Sets frame rate for decoded bitstream. Can be run-time setting. 
       
   152         * @param aFrameRate Frame rate
       
   153         * @return void Can leave with KErrNotSupported
       
   154         */
       
   155         void SetFrameRateL(TReal aFrameRate);
       
   156 
       
   157         /**
       
   158         * From CTranscoder. Sets channel bit error rate. Can be run-time setting
       
   159         * @param aErrorRate Channel expected error rate.
       
   160         *        aErrorRate = 0.0     - low bit error rate or error is not expected
       
   161         *        aErrorRate = 0.00001 - medium bit error rate
       
   162         *        aErrorRate = 0.0001  - high bit error rate
       
   163         * @return void
       
   164         */
       
   165         void SetChannelBitErrorRateL(TReal aErrorRate);
       
   166 
       
   167         /**
       
   168         * From CTranscoder. Sets misc video coding options
       
   169         * @param aOptions Coding options
       
   170         * @return void
       
   171         */
       
   172         void SetVideoCodingOptionsL(TTRVideoCodingOptions& aOptions);
       
   173 
       
   174         /**
       
   175         * From CTranscoder. Makes a request to retrieve the intermediate content from the transcoder
       
   176         * @param aRetrieve: ETrue - retrieve; EFalse - don't retrieve.
       
   177         * @param aSize Requested picture size for intermediate decoded picture
       
   178         * @return void Can leave with KErrNotSupported, if the intermediate picture size is not supported
       
   179         */
       
   180         void SetVideoPictureSinkOptionsL(TSize& aSize, MTRVideoPictureSink* aSink);
       
   181 
       
   182         /**
       
   183         * From CTranscoder. Makes a request to use direct screen access
       
   184         * @param aUseDSA Use Direct Screen Access (DSA). ETrue - use DSA; EFalse - don't use DSA. 
       
   185         * @param aOptions Display options, valid only if aUseDSA is set to ETrue
       
   186         * @return void Can leave with KErrNotSupported, the DSA is not supported. 
       
   187         */
       
   188         void UseDirectScreenAccessL(TBool aUseDSA, CFbsScreenDevice& aScreenDevice, TTRDisplayOptions& aOptions);
       
   189 
       
   190         /**
       
   191         * From CTranscoder. Gets the current output bit rate for transcoded bit stream
       
   192         * @param none
       
   193         * @return TUint Bit rate
       
   194         */
       
   195         TUint GetVideoBitRateL();
       
   196 
       
   197         /**
       
   198         * From CTranscoder. Gets the current frame rate for transcoded stream
       
   199         * @param none
       
   200         * @return TReal Framerate
       
   201         */
       
   202         TReal GetFrameRateL();
       
   203 
       
   204         /**
       
   205         * From CTranscoder. Retrieve currently used codec for transcoding stream
       
   206         * @param aVideoMimeType video mime type
       
   207         * @return void
       
   208         */
       
   209         void GetVideoCodecL(TDes8& aVideoMimeType);
       
   210 
       
   211         /**
       
   212         * From CTranscoder. Get transcoded picture size
       
   213         * @param aSize Picture size
       
   214         * @return void
       
   215         */
       
   216         void GetTranscodedPictureSizeL(TSize& aSize);
       
   217 
       
   218         // Data transfer methods
       
   219         /**
       
   220         * Sends filled buffer with new portion of the bitstream to transcoder. Note, this is asynchronous operation, 
       
   221         * and this bufer is returned back with Transcoder Observer call MtroReturnCodedBuffer(aBuffer); 
       
   222         * @param aBuffer Media buffer. It is not allowed to use this buffer on the client side until it is returned back 
       
   223         * from the transcoder with MtroReturnCodedBuffer(aBuffer).
       
   224         * @return void 
       
   225         */
       
   226         void WriteCodedBufferL(CCMRMediaBuffer* aBuffer);
       
   227 
       
   228         /**
       
   229         * From CTranscoder. Sends video picture to transcoder / releases decoded picture (Decode mode)
       
   230         * @param aPicture Video picture
       
   231         * @return void
       
   232         */
       
   233         void SendPictureToTranscoderL(TTRVideoPicture* aPicture);
       
   234 
       
   235         /**
       
   236         * Resample picture in Resampling only mode. The client should specify souce picture and buffer for target 
       
   237         * resampled picture
       
   238         * @param aSrc Source picture
       
   239         * @param aTrg Target picture
       
   240         * @return void
       
   241         */
       
   242         void ResampleL(TPtr8& aSrc, TPtr8& aTrg);
       
   243 
       
   244         // MTRDevVideoClientObserver implementation
       
   245         /**
       
   246         * From MTRDevVideoClientObserver. Reports an error from the devVideo client
       
   247         * @param aError Error reason
       
   248         * @return void
       
   249         */
       
   250         void MtrdvcoFatalError(TInt aError);
       
   251 
       
   252         /**
       
   253         * From MTRDevVideoClientObserver. Reports that data encoding process has been finished
       
   254         * @param none
       
   255         * @return void
       
   256         */
       
   257         void MtrdvcoEncStreamEnd();
       
   258 
       
   259         /**
       
   260         * From MTRDevVideoClientObserver. Reports that data decoding process has been finished
       
   261         * @param none
       
   262         * @return void
       
   263         */
       
   264         void MtrdvcoDecStreamEnd();
       
   265 
       
   266         /**
       
   267         * From MTRDevVideoClientObserver. Returns video picture from the video encoder client
       
   268         * @param aPicture video picture
       
   269         * @return void
       
   270         */
       
   271         void MtrdvcoEncoderReturnPicture(TVideoPicture* aPicture);
       
   272 
       
   273         /**
       
   274         * From MTRDevVideoClientObserver. Returns videopicture from the renderer
       
   275         * @param aPicture video picture
       
   276         * @return void
       
   277         */
       
   278         void MtrdvcoRendererReturnPicture(TVideoPicture* aPicture);
       
   279 
       
   280         /**
       
   281         * From MTRDevVideoClientObserver. Informs about initializing video encoder client
       
   282         * @param aError Initializing error status 
       
   283         * @return void
       
   284         */
       
   285         void MtrdvcoEncInitializeComplete(TInt aError);
       
   286 
       
   287         /**
       
   288         * From MTRDevVideoClientObserver. Informs about initializing video decoder client
       
   289         * @param aError Initializing error status 
       
   290         * @return void
       
   291         */
       
   292         void MtrdvcoDecInitializeComplete(TInt aError);
       
   293 
       
   294         /**
       
   295         * From MTRDevVideoClientObserver. Supplies new encoded bitstream buffer
       
   296         * @param aPicture Decoded picture
       
   297         * @return void
       
   298         */
       
   299         void MtrdvcoNewPicture(TVideoPicture* aPicture);
       
   300 
       
   301         /**
       
   302         * Supplies new encoded bitstream buffer
       
   303         * @param 
       
   304         * @return void
       
   305         */
       
   306         void MtrdvcoNewBuffer(CCMRMediaBuffer* aBuffer);
       
   307         /**
       
   308         * Returns media bitstream buffer to the client
       
   309         * @param aBuffer Bitstream media buffer
       
   310         * @return void
       
   311         */
       
   312         void MtrdvcoReturnCodedBuffer(CCMRMediaBuffer* aBuffer);
       
   313         
       
   314         
       
   315         //  AA
       
   316         void SetDecoderInitDataL(TPtrC8& aInitData);
       
   317         
       
   318         /**
       
   319         * Gets coding-standard specific initialization output. The buffer is pushed to the cleanup stack, 
       
   320         * and the caller is responsible for deallocating it. 
       
   321         * @param none
       
   322         * @return HBufC8 Coding options (VOL header)
       
   323         */
       
   324         HBufC8* GetCodingStandardSpecificInitOutputLC();
       
   325 
       
   326         /**
       
   327         * Enable / Disable use of picture sink; Note: This method is relevant only for full transcoding use cases;
       
   328         * 
       
   329         * @param aEnable ETrue: Picture sink is enabled; EFalse: Picture sink is disabled
       
   330         * @return none
       
   331         */
       
   332         void EnablePictureSink(TBool aEnable);
       
   333     
       
   334         /**
       
   335         * Enable / Disable use of Encoder; Note: This method is relevant only for full transcoding use cases;
       
   336         * By default encoding is always enabled in FullTranscoding mode
       
   337         * 
       
   338         * @param aEnable ETrue: Encoder is enabled; EFalse: Encoder is disabled
       
   339         * @return none
       
   340         */
       
   341         void EnableEncoder(TBool aEnable);
       
   342         
       
   343         /**
       
   344         * Requests random access point to the following transcoded picture
       
   345         * This change is applied for the next written coded buffer with WriteCodedBufferL
       
   346         * @param none
       
   347         * @return none
       
   348         */
       
   349         void SetRandomAccessPoint();
       
   350         
       
   351         /**
       
   352         * From MTRDevVideoClientObserver. Notifies the transcoder about available picture buffers throug CI or MDF
       
   353         * @param none
       
   354         * @return none
       
   355         */
       
   356         void MtrdvcoNewBuffers();
       
   357         
       
   358         /**
       
   359         * Returns a time estimate of how long it takes to process one second of the input video with the
       
   360         * current transcoder settings. OpenL must be called before calling this function. Estimate
       
   361         * will be more accurate if InitializeL is called before calling this function.
       
   362         * @param aInput Input video format
       
   363         * @param aOutput Output video format
       
   364         * @return TReal Time estimate in seconds
       
   365         */
       
   366         TReal EstimateTranscodeTimeFactorL(const TTRVideoFormat& aInput, const TTRVideoFormat& aOutput);
       
   367         
       
   368         /**
       
   369         * From CTranscoder. Get max number of frames in processing.
       
   370         * This is just a recommendation, not a hard limit.
       
   371         * @return TInt Number of frames
       
   372         */
       
   373         TInt GetMaxFramesInProcessing();
       
   374         
       
   375         /**
       
   376         * Enable / Disable pausing of transcoding if resources are lost. If enabled transcoder
       
   377         * will notify the observer about resource losses by calling MtroSuspend / MtroResume
       
   378         * @param aEnable ETrue: Pausing is enabled
       
   379         *                EFalse: Pausing is disabled and resource losses will cause a fatal error
       
   380         * @return none
       
   381         */
       
   382         void EnablePausing(TBool aEnable);
       
   383         
       
   384         /**
       
   385         * Indicates that a media device has lost its resources
       
   386         * @param aFromDecoder Flag to indicate source of resource loss 
       
   387         * @return none
       
   388         */
       
   389         void MtrdvcoResourcesLost(TBool aFromDecoder);
       
   390         
       
   391         /**
       
   392         * Indicates that a media device has regained its resources
       
   393         * @return none
       
   394         */
       
   395         void MtrdvcoResourcesRestored();
       
   396 
       
   397     protected:
       
   398         /**
       
   399         * From CActive. 
       
   400         * @param 
       
   401         * @return void
       
   402         */
       
   403         void RunL();
       
   404 
       
   405         /**
       
   406         * From CActive. 
       
   407         * @param 
       
   408         * @return void
       
   409         */
       
   410         void DoCancel();
       
   411 
       
   412         /**
       
   413         * From CActive. 
       
   414         * @param aError error
       
   415         * @return void
       
   416         */
       
   417         TInt RunError(TInt aError);
       
   418 
       
   419     private:
       
   420         /**
       
   421         * C++ default constructor.
       
   422         */
       
   423         CTRTranscoderImp(MTRTranscoderObserver& aObserver);
       
   424 
       
   425         /**
       
   426         * Symbian 2nd phase constructor, can leave
       
   427         */
       
   428         void ConstructL();
       
   429 
       
   430         /**
       
   431         * Parses mime type
       
   432         * @param aInputMimeType Input mime tipe
       
   433         * @param aVideoInputFormat Output mime type
       
   434         * @param aInOutMime ETrue - input mime, EFalse
       
   435         * @return void
       
   436         */
       
   437         void ParseMimeTypeL(const TDesC8& aInputMimeType, TBool aInOutMime);
       
   438 
       
   439         /**
       
   440         * Check picture size if valid
       
   441         * @param 
       
   442         * @return void
       
   443         */
       
   444         TBool IsValid(TSize& aSize);
       
   445 
       
   446         /**
       
   447         * Handles initialize complete call
       
   448         * @param 
       
   449         * @return void
       
   450         */
       
   451         void InitComplete();
       
   452 
       
   453         /**
       
   454         * Allocate transcoder buffers and other data structures
       
   455         * @param 
       
   456         * @return void
       
   457         */
       
   458         void AllocateBuffersL();
       
   459 
       
   460         /**
       
   461         * Makes a new request
       
   462         * @param 
       
   463         * @return void
       
   464         */
       
   465         void DoRequest();
       
   466         
       
   467         /**
       
   468         * Loads codec Uids from central repository
       
   469         * @return void
       
   470         */
       
   471         void LoadCodecUids();
       
   472 
       
   473     private:
       
   474         // Transcoder Observer
       
   475         MTRTranscoderObserver& iObserver;
       
   476 
       
   477         // Video decoder client
       
   478         CTRVideoDecoderClient* iVideoDecoderClient;
       
   479 
       
   480         // Video Encoder client
       
   481         CTRVideoEncoderClient* iVideoEncoderClient;
       
   482 
       
   483         // Scaler
       
   484         CTRScaler* iScaler;
       
   485 
       
   486         // Processing mode (RT / Non-RT)
       
   487         TBool iRealTime;
       
   488 
       
   489         // MediaSink for output transcoded stream
       
   490         MCMRMediaSink* iMediaSink;
       
   491 
       
   492         // MTRVideoPictureSink
       
   493         MTRVideoPictureSink* iPictureSink;
       
   494 
       
   495         // MTRVideoPictureSink temp sink
       
   496         MTRVideoPictureSink* iPictureSinkTemp;
       
   497 
       
   498         // Enable / disable encoder flag (relevant only for full transcoding use cases)
       
   499         TBool iEncoderEnabled;
       
   500 
       
   501         // Input picture size
       
   502         TSize iInputPictureSize;
       
   503         
       
   504         // Picture size after decoding
       
   505         TSize iDecodedPictureSize;
       
   506 
       
   507         // Output picture size
       
   508         TSize iOutputPictureSize;
       
   509 
       
   510         // Intermediate picture size
       
   511         TSize iIntermediatePictureSize;
       
   512 
       
   513         // Operational mode
       
   514         TInt iMode;
       
   515 
       
   516         // Transcoder state
       
   517         TInt iState;
       
   518 
       
   519         // Encoder init status
       
   520         TInt iEncoderInitStatus;
       
   521 
       
   522         // Decoder init status
       
   523         TInt iDecoderInitStatus;
       
   524 
       
   525         // Codec level
       
   526         TInt iInputCodecLevel;
       
   527         
       
   528         // Codec level
       
   529         TInt iOutputCodecLevel;
       
   530 
       
   531         // Request status
       
   532         TRequestStatus* iStat;
       
   533 
       
   534         // Encoder stream end status
       
   535         TBool iEncoderStreamEnd;
       
   536 
       
   537         // Decoder stream end status
       
   538         TBool iDecoderStreamEnd;
       
   539 
       
   540         // Input mimetype
       
   541         TBufC8<256> iInputMimeType;
       
   542         
       
   543         // Short mimetype
       
   544         TBufC8<256> iInputShortMimeType;
       
   545 
       
   546         // Output mimetype
       
   547         TBufC8<256> iOutputMimeType;
       
   548         
       
   549         // Short mimetype
       
   550         TBufC8<256> iOutputShortMimeType;
       
   551 
       
   552         // Max bit rate
       
   553         TUint iOutputMaxBitRate;
       
   554 
       
   555         // Input codec
       
   556         TInt iInputCodec;
       
   557 
       
   558         // Output codec
       
   559         TInt iOutputCodec;
       
   560 
       
   561         // Input Max Bit Rate
       
   562         TUint iInputMaxBitRate;
       
   563 
       
   564         // Input max picture size
       
   565         TSize iInputMaxPictureSize;
       
   566 
       
   567         // Output max picture size
       
   568         TSize iOutputMaxPictureSize;
       
   569 
       
   570         // Transcoder picture queue
       
   571         TDblQue<TVideoPicture> iTranscoderPictureQueue;
       
   572 
       
   573         // Transcoder picture queue
       
   574         TDblQue<TVideoPicture> iEncoderPictureQueue;
       
   575 
       
   576         // CI picture buffers queue
       
   577         TDblQue<TVideoPicture> iCIPictureBuffersQueue;
       
   578         
       
   579         // Transcoder events queue
       
   580         TDblQue<CTREventItem> iTranscoderEventQueue;
       
   581 
       
   582         // Transcoder events queue
       
   583         TDblQue<CTREventItem> iTranscoderEventSrc;
       
   584 
       
   585         // Transcoder async events queue
       
   586         TDblQue<CTREventItem> iTranscoderAsyncEventQueue;
       
   587 
       
   588         // Transcoder TRVideoPicture queue
       
   589         TDblQue<TTRVideoPicture> iTranscoderTRPictureQueue;
       
   590 
       
   591         // TVideopicture container wait queue
       
   592         TDblQue<TVideoPicture> iContainerWaitQueue;
       
   593         
       
   594         // Data array
       
   595         TUint8** iDataArray;
       
   596         
       
   597         // Events
       
   598         CTREventItem* iEvents;
       
   599         
       
   600         // TVideo picture array
       
   601         TVideoPicture* iVideoPictureArray;
       
   602         
       
   603         // TTRVideo picture array
       
   604         TTRVideoPicture* iTRVideoPictureArray;
       
   605         
       
   606         // Decoded picture
       
   607         TVideoPicture* iDecodedPicture;
       
   608         
       
   609         // Picture container to client
       
   610         TTRVideoPicture iPicureToClient;
       
   611         
       
   612         // Temp video picture
       
   613         TVideoPicture* iVideoPictureTemp;
       
   614         
       
   615         // Set bitrate flag
       
   616         TBool iBitRateSetting;
       
   617         
       
   618         // Fatal error
       
   619         TInt iFatalError;
       
   620 
       
   621         // Data transfer optimization (applicable only to full transcoding mode)
       
   622         TBool iOptimizedDataTransfer;
       
   623         
       
   624         // Set random access point flag
       
   625         TBool iSetRandomAccessPoint;
       
   626         
       
   627         // EnableEncoder setting status flag
       
   628         TBool iEncoderEnabledSettingChanged;
       
   629         
       
   630         // EnableEncoder setting from the client
       
   631         TBool iEncoderEnableClientSetting;
       
   632         
       
   633         // EnablePicture sink transcoder setting
       
   634         TBool iPictureSinkEnabled;
       
   635         
       
   636         // EnablePictureSink setting status flag
       
   637         TBool iPictureSinkSettingChanged;
       
   638         
       
   639         // PictuereSink enabled client's setting
       
   640         TBool iPictureSinkClientSetting;
       
   641         
       
   642         // Wait picture from client
       
   643         TTRVideoPicture* iWaitPictureFromClient;
       
   644         
       
   645         // Wait new decoded picture
       
   646         TVideoPicture* iWaitNewDecodedPicture;
       
   647         
       
   648         // New event
       
   649         CTREventItem* iNewEvent;
       
   650         
       
   651         // Acync event
       
   652         CTREventItem* iAsyncEvent;
       
   653         
       
   654         // Current setting
       
   655         TBool iCurrentPictureSinkEnabled;
       
   656         
       
   657         // Current setting 
       
   658         TBool iCurrentEncoderEnabled;
       
   659         
       
   660         // Current setting
       
   661         TBool iCurrentRandomAccess;
       
   662         
       
   663         // Current async PS setting
       
   664         TBool iCurrentAsyncPictureSinkEnabled;
       
   665         
       
   666         // Current async enc setting
       
   667         TBool iCurrentAsyncEncoderEnabled;
       
   668 
       
   669         // Current async setting
       
   670         TBool iCurrentAsyncRandomAccess;
       
   671         
       
   672         // Asynchronous stop is used
       
   673         TBool iAsyncStop;
       
   674         
       
   675         // Max number of frames sent to transcoder at a time
       
   676         // This is just a recommendation, not a hard limit
       
   677         TInt iMaxFramesInProcessing;
       
   678         
       
   679         // Default decoder uids for different codecs
       
   680         TInt iH263DecoderUid;
       
   681         TInt iH264DecoderUid;
       
   682         TInt iMPEG4DecoderUid;
       
   683         
       
   684         // Default encoder uids for different codecs
       
   685         TInt iH263EncoderUid;
       
   686         TInt iH264EncoderUid;
       
   687         TInt iMPEG4EncoderUid;
       
   688         
       
   689         // Decoder uids for low resolutions
       
   690         TInt iH263DecoderLowResUid;
       
   691         TInt iH264DecoderLowResUid;
       
   692         TInt iMPEG4DecoderLowResUid;
       
   693         
       
   694         // Max width of low resolutions
       
   695         TInt iH263DecoderLowResThreshold;
       
   696         TInt iH264DecoderLowResThreshold;
       
   697         TInt iMPEG4DecoderLowResThreshold;
       
   698         
       
   699         // Decoder uids for low resolutions
       
   700         TInt iH263EncoderLowResUid;
       
   701         TInt iH264EncoderLowResUid;
       
   702         TInt iMPEG4EncoderLowResUid;
       
   703         
       
   704         // Max width of low resolutions
       
   705         TInt iH263EncoderLowResThreshold;
       
   706         TInt iH264EncoderLowResThreshold;
       
   707         TInt iMPEG4EncoderLowResThreshold;
       
   708         
       
   709         // Flag to store resource loss source (decoder / encoder)
       
   710         TBool iDecoderResourceLost;
       
   711         
       
   712     };
       
   713 
       
   714 
       
   715 #endif    // CTRTRANSCODERIMP_H