camerauis/cameraxui/cxengine/inc/cxequalitypresetssymbian.h
branchRCL_3
changeset 24 bac7acad7cb3
parent 23 61bc0f252b2b
child 25 2c87b2808fd7
equal deleted inserted replaced
23:61bc0f252b2b 24:bac7acad7cb3
     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:
       
    15 *
       
    16 */
       
    17 #ifndef CXEQUALITYPRESETSSYMBIAN_H
       
    18 #define CXEQUALITYPRESETSSYMBIAN_H
       
    19 
       
    20 //  Include Files
       
    21 #include <QSize>
       
    22 #include "cxequalitypresets.h"
       
    23 
       
    24 // forward declarations
       
    25 class CImagingConfigManager;
       
    26 class TImageQualitySet;
       
    27 class TVideoQualitySet;
       
    28 class CxeSettings;
       
    29 
       
    30 /**!
       
    31 * Class CxeQualityPresetsSymbian
       
    32 * Queries supported image and video qualities from ICM and creates the related
       
    33 * data and wraps up the quality settings for the client.
       
    34 */
       
    35 class CxeQualityPresetsSymbian : public CxeQualityPresets
       
    36 {
       
    37 public:
       
    38     CxeQualityPresetsSymbian(CxeSettings &settings);
       
    39     ~CxeQualityPresetsSymbian();
       
    40     QList<CxeImageDetails> imageQualityPresets(Cxe::CameraIndex cameraId);
       
    41     QList<CxeVideoDetails> videoQualityPresets(Cxe::CameraIndex cameraId);
       
    42     int recordingTimeAvailable(const CxeVideoDetails& details, qint64 space);
       
    43 
       
    44 private:
       
    45     qreal avgVideoBitRateScaler();
       
    46     Cxe::AspectRatio calculateAspectRatio(int width, int height) const;
       
    47     QString toString(const TUint8* aData);
       
    48     CxeVideoDetails createVideoPreset(const TVideoQualitySet &set);
       
    49     CxeImageDetails createImagePreset(const TImageQualitySet &set);
       
    50     QString calculateMegaPixelCount(int imageWidth, int imageHeight);
       
    51     void debugPrints(const CxeVideoDetails &preset);
       
    52     void debugPrints(const CxeImageDetails &newPreset);
       
    53 
       
    54 private:
       
    55     CImagingConfigManager *mIcm;
       
    56     CxeSettings &mSettings;
       
    57     qreal mCMRAvgVideoBitRateScaler;
       
    58 };
       
    59 
       
    60 
       
    61 #endif  // CXEQUALITYPRESETSSYMBIAN_H