camerauis/cameraapp/generic/common/inc/CamVideoQualityLevel.h
branchRCL_3
changeset 24 bac7acad7cb3
parent 0 1ddebce53859
equal deleted inserted replaced
23:61bc0f252b2b 24:bac7acad7cb3
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Container class for video quality data*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 #ifndef CAMVIDEOQUALITYLEVEL_H
       
    20 #define CAMVIDEOQUALITYLEVEL_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <barsread.h>
       
    24 #include "camconfigurationconstants.h"
       
    25 
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30 *  Container class to hold video quality settings 
       
    31 *  Read in from resource file
       
    32 *
       
    33 *  @since 2.8
       
    34 */
       
    35 class CCamVideoQualityLevel : public CBase
       
    36     {
       
    37     public:  // Constructors and destructor
       
    38         
       
    39         /**
       
    40         * Two-phased constructor.
       
    41         * @param aReader resource reader for video quality level resources
       
    42         * @return pointer to instances of CCamVideoQualityLevel
       
    43         */
       
    44         static CCamVideoQualityLevel* NewL( TResourceReader& aReader );
       
    45 
       
    46         /**
       
    47         * Two-phased constructor.
       
    48         * @param aReader resource reader for video quality level resources
       
    49         * @param aVariantFlags The flags to specify operator variants
       
    50         * @return pointer to instances of CCamVideoQualityLevel
       
    51         */
       
    52         static CCamVideoQualityLevel* NewL( TVideoQualitySettings& aSettings );
       
    53 
       
    54         /**
       
    55         * Destructor.
       
    56         */
       
    57         virtual ~CCamVideoQualityLevel();
       
    58 
       
    59     public: // New functions
       
    60 
       
    61         /**
       
    62         * Return video resolution associated with this quality level
       
    63         * @since 2.8
       
    64         * @return Video resolution
       
    65         */
       
    66         TVideoResolution VideoResolution();
       
    67 
       
    68         /**
       
    69         * Return video frame rate associated with this quality level
       
    70         * @since 2.8
       
    71         * @return Video frame rate
       
    72         */
       
    73         TReal FrameRate();
       
    74 
       
    75         /**
       
    76         * Return video bitrate associated with this quality level
       
    77         * @since 2.8
       
    78         * @return Video bitrate
       
    79         */
       
    80         TInt VideoBitRate();
       
    81 
       
    82         /**
       
    83         * Return audio bitrate associated with this quality level identifier
       
    84         * @since 2.8
       
    85         * @return audio bitrate
       
    86         */
       
    87         TInt AudioBitRate();
       
    88 
       
    89         /**
       
    90         * Return mime type required associated with this video quality level
       
    91         * @since 2.8
       
    92         * @return descriptor containing mime type
       
    93         */
       
    94         TPtrC8 VideoMimeType();
       
    95 
       
    96         /**
       
    97         * Return preferred supplier value associated with this video quality level
       
    98         * @since 2.8
       
    99         * @return descriptor containing preferred supplier
       
   100         */
       
   101         TPtrC PreferredSupplier();
       
   102 
       
   103         /**
       
   104         * Return video codec associated with this video quality level
       
   105         * @since 2.8
       
   106         * @return descriptor containing codec
       
   107         */
       
   108         TPtrC8 VideoFileType();
       
   109 
       
   110         /**
       
   111         * Return audio codec associated with this video quality level
       
   112         * @since 2.8
       
   113         * @return descriptor containing audio codec
       
   114         */
       
   115         TPtrC8 AudioType();
       
   116 
       
   117         /**
       
   118         * Return file type identier associated with this video quality level
       
   119         * either Mpeg4 or 3GP
       
   120         * @since 2.8
       
   121         * @return flags
       
   122         */
       
   123         TInt VideoType();
       
   124 
       
   125         /**
       
   126         * Return file length associated with this video quality level
       
   127         * either max or short
       
   128         * @since 2.8
       
   129         * @return flags
       
   130         */
       
   131         TInt VideoLength();
       
   132 
       
   133         /**
       
   134         * Return video quality level
       
   135         * @since 3.0
       
   136         * @return quality level value
       
   137         */
       
   138         TInt VideoQuality();
       
   139 
       
   140     private:
       
   141 
       
   142         /**
       
   143         * C++ default constructor.
       
   144         */
       
   145         CCamVideoQualityLevel();
       
   146 
       
   147         /**
       
   148         * By default Symbian 2nd phase constructor is private.
       
   149         * @param aReader resource reader for video quality level resources
       
   150         * @param aVariantFlags The flags to specify operator variants
       
   151         */
       
   152         void ConstructL( TVideoQualitySettings& aSettings );
       
   153 
       
   154         /**
       
   155         * By default Symbian 2nd phase constructor is private.
       
   156         * @param aReader resource reader for video quality level resources
       
   157         * @param aVariantFlags The flags to specify operator variants
       
   158         */
       
   159         void ConstructFromResourceL( TResourceReader& aReader );
       
   160 
       
   161     private:
       
   162         /**
       
   163         * Reads an LTEXT element from resources and returns
       
   164         * it as HBufC8.
       
   165         * @since 2.8
       
   166         * @param aReader Resource reader to read descriptor from
       
   167         * @return HBufC8 containing string read from resource
       
   168         */
       
   169         HBufC8* ReadHBufC8L( TResourceReader& aReader ) const;
       
   170 
       
   171     private:    // Data
       
   172         // Identifer
       
   173         TInt iQualityLevel;
       
   174         // Video reoslution
       
   175         TVideoResolution iVideoResolution;
       
   176         // Video Frame rate
       
   177         TReal iVideoFrameRate;
       
   178         // Video bit rate
       
   179         TInt iVideoBitRate;
       
   180         // Audio bit rate
       
   181         TInt iAudioBitRate;
       
   182         // Video mime type
       
   183         HBufC8* iVideoMimeType;
       
   184         // Preferred supplier
       
   185         HBufC* iPreferredSupplier;
       
   186         // Video file type
       
   187         HBufC8* iVideoCodec;
       
   188         // Audio codec
       
   189         HBufC8* iAudioCodec;
       
   190         // video type identifier (MPeg4 or 3GP)
       
   191         TInt iVideoFileType;
       
   192         // video length (max or short)
       
   193         TInt iVideoLength;
       
   194     };
       
   195 
       
   196 #endif      // CAMVIDEOQUALITYLEVEL_H  
       
   197             
       
   198 // End of File