htiui/HtiServicePlugins/HtiCameraServicePlugin/engine/inc/VideoRecordingQualityLevels.h
branchRCL_3
changeset 13 822c625f7adc
equal deleted inserted replaced
11:454d022d514b 13:822c625f7adc
       
     1 /*
       
     2 * Copyright (c) 2009 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:  Engine video quality level and container.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef VIDEORECORDINGQUALITYLEVELS_H_
       
    19 #define VIDEORECORDINGQUALITYLEVELS_H_
       
    20 
       
    21 
       
    22 const TInt KMaxVideoStringParLength = 32;
       
    23 const TInt KMaxAudioTypeStringParLength = 4;
       
    24 
       
    25 const TInt KMaxVideoQltyLevelCount = 6;
       
    26 
       
    27 const TInt KImgWidthSubQCIF  = 128; 
       
    28 const TInt KImgHeightSubQCIF = 96; 
       
    29 
       
    30 const TInt KImgWidthQCIF     = 176; 
       
    31 const TInt KImgHeightQCIF    = 144; 
       
    32 
       
    33 const TInt KImgWidthCIF      = 352; 
       
    34 const TInt KImgHeightCIF     = 288; 
       
    35 
       
    36 _LIT8(KVideoMimeType, "video/3gpp");
       
    37 
       
    38 _LIT(KPreferredSupplier, "Nokia");
       
    39 
       
    40 _LIT8(KVideoType, "video/H263-2000");
       
    41 
       
    42 _LIT8(KAudioType, " AMR");
       
    43 
       
    44 class CVideoRecordingQualityLevel : public CBase
       
    45     {
       
    46 public:
       
    47     CVideoRecordingQualityLevel(){}
       
    48     virtual ~CVideoRecordingQualityLevel(){}
       
    49     
       
    50 public:
       
    51 
       
    52     // The video recording frame size.
       
    53     TSize iFrameSize;
       
    54 
       
    55     // The video recording frame rate.
       
    56     TReal32 iFrameRate;
       
    57 
       
    58     // The video recording bit rate.
       
    59     TInt iBitRate;
       
    60 
       
    61     // A Boolean indicating if video recording audio is enabled or not.
       
    62     TBool iAudioEnabled;
       
    63 
       
    64     // The video recording audio bit rate.
       
    65     TInt iAudioBitRate;
       
    66 
       
    67     // The video MIME type (e.g. "video/3gpp").
       
    68     TBuf8<KMaxVideoStringParLength> iMimeType;
       
    69 
       
    70     // The preferred supplier of video controller (e.g. "Company X").
       
    71     TBuf<KMaxVideoStringParLength> iPreferredSupplier;
       
    72 
       
    73     // The video type (e.g. "video/H263-2000").
       
    74     TBuf8<KMaxVideoStringParLength> iVideoType;
       
    75 
       
    76     // The audio type expressed with four characters (e.g. " AMR").
       
    77     TBuf8<KMaxAudioTypeStringParLength> iAudioType;
       
    78 
       
    79     // The estimated video recording bit rate to storage (bits per second).
       
    80     TInt iStorageRate;
       
    81     };
       
    82 
       
    83 
       
    84 class CVideoRecordingQualityLevels : public CBase
       
    85     {
       
    86 public:
       
    87     /**
       
    88     * Destructor.
       
    89     */
       
    90     virtual ~CVideoRecordingQualityLevels();
       
    91     
       
    92     /**
       
    93     * Two-phased constructor.
       
    94     */
       
    95     static CVideoRecordingQualityLevels* NewL();
       
    96 
       
    97     /**
       
    98     * Initializes quality levels to hardcoded default values.
       
    99     * @return The count of quality levels initialized
       
   100     */
       
   101     TInt InitDefaultsL();
       
   102     
       
   103     /**
       
   104     * Gets the quality level count.
       
   105     * @return Quality level count
       
   106     */
       
   107     TInt Count() const;
       
   108 
       
   109     /**
       
   110     * Gets the specified quality level.
       
   111     * @param aIndex Quality level index
       
   112     * @return Video quality level
       
   113     */
       
   114     CVideoRecordingQualityLevel& At( 
       
   115         TInt aIndex ) const;
       
   116     
       
   117 private:
       
   118 
       
   119     /**
       
   120     * C++ constructor.
       
   121     */
       
   122     CVideoRecordingQualityLevels();
       
   123 
       
   124     /**
       
   125     * Symbian OS 2nd phase constructor that can leave.
       
   126     */
       
   127     void ConstructL();
       
   128     
       
   129 private:
       
   130 
       
   131     // Supported video recording quality levels.
       
   132     CArrayFixFlat<CVideoRecordingQualityLevel>* iQualityLevels;
       
   133     };
       
   134 
       
   135 #endif /* VIDEORECORDINGQUALITYLEVELS_H_ */