mmshplugins/mmcctranscoder/inc/transcodersessioninfo.h
changeset 15 ccd8e69b5392
parent 2 b31261fd4e04
child 20 e8be2c2e049d
child 22 496ad160a278
equal deleted inserted replaced
2:b31261fd4e04 15:ccd8e69b5392
     1 /*
       
     2 * Copyright (c) 2002-2005 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 MCC_TRANSCODER_SESSION_INFO_H
       
    20 #define MCC_TRANSCODER_SESSION_INFO_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <e32std.h>
       
    25 
       
    26 #include "transcodervideocodec.h"
       
    27 #include "transcoderaudiocodec.h"
       
    28 #include "mcctranscoderlogs.h"
       
    29 
       
    30 class TMccTranscoderCodecInfo;
       
    31 /**
       
    32 *
       
    33 */ 
       
    34 class CMccTranscoderSessionInfo : public CBase 
       
    35     {
       
    36     public:  // Constructors and destructor
       
    37         /**
       
    38         * Two-phased constructor.
       
    39         */
       
    40         static   CMccTranscoderSessionInfo* NewLC();
       
    41 
       
    42         /**
       
    43         * Destructor.
       
    44         */
       
    45         virtual  ~CMccTranscoderSessionInfo();
       
    46 
       
    47     public:  // New functions
       
    48 
       
    49                      
       
    50         TUint32 SessionId();  
       
    51         
       
    52         void GenerateSessionId();
       
    53         
       
    54         void SetQuality( TUint32 aQuality );
       
    55         
       
    56         void CreateMovieL();
       
    57         
       
    58         CVedMovie& Movie();
       
    59         
       
    60                              
       
    61         CVedMovie::TVedMovieQuality Quality();
       
    62         
       
    63         void SetDesFileL( const TDesC& aFileName );
       
    64         
       
    65         const TDesC& DesFile();
       
    66         
       
    67         
       
    68         CMccTranscoderVideoCodec& VideoCodec();
       
    69         
       
    70         void SetVideoCodec( CMccTranscoderVideoCodec* aCodec );
       
    71         
       
    72         
       
    73         CMccTranscoderAudioCodec& AudioCodec();
       
    74         
       
    75         void SetAudioCodec( CMccTranscoderAudioCodec* aCodec );
       
    76         
       
    77       
       
    78         
       
    79         void SetVideoType( const TDesC8& aSdpNam,
       
    80                            const TInt aVideoBitRate );
       
    81                            
       
    82         void SetAudioType( const TDesC8& aSdpNam ); 
       
    83         
       
    84         void CheckVideoCodecL( const TMccTranscoderCodecInfo& aCodecInfo );
       
    85         
       
    86         void CheckAudioCodecL( const TMccTranscoderCodecInfo& aCodecInfo );
       
    87         
       
    88         void GetPutputParameters( TVedOutputParameters& params );
       
    89         
       
    90         void SetRemoved( TBool aIsRemoved );
       
    91         
       
    92         TBool IsRemoved() const;
       
    93         
       
    94         TInt Progressed( TInt aProgressPercentage );
       
    95         
       
    96         void ClipAdded();
       
    97         
       
    98         TBool QualityChangeNeeded();
       
    99         
       
   100     protected:  // Functions from base classes
       
   101     
       
   102     private:
       
   103         /**
       
   104         * C++ default constructor.
       
   105         */
       
   106         CMccTranscoderSessionInfo();
       
   107 
       
   108         /**
       
   109         * By default Symbian 2nd phase constructor is private.
       
   110         *
       
   111         * @param aSource    Source of the data for the payload format plugin
       
   112         */
       
   113         void ConstructL();
       
   114         
       
   115     private:
       
   116     
       
   117         TInt CalculateVideoBitrate( CVedMovie& aMovie );
       
   118         
       
   119     private: // data
       
   120     
       
   121         TUint32                          iSessionId;
       
   122         CVedMovie*                       iMovie;
       
   123         CVedMovie::TVedMovieQuality      iQuality;
       
   124         TFileName                        iDesFile;
       
   125         CMccTranscoderVideoCodec*        iVideoCodec;
       
   126         CMccTranscoderAudioCodec*        iAudioCodec;
       
   127         TBool                            iIsRemoved;
       
   128         TBool                            iAudioNotPresent;
       
   129         TInt                             iSyncIntervalInPicture;
       
   130         TInt                             iSegmentSizeInBytes;
       
   131 
       
   132         
       
   133     private:    // Friend classes
       
   134     
       
   135     #ifdef EUNIT_TEST
       
   136        friend class UT_CMccTranscoderSessionInfo;
       
   137     #endif
       
   138     };
       
   139 
       
   140 
       
   141 #endif // end of MCC_TRANSCODER_SESSION_INFO_H