7d06a82dc26e55a884fa29888dfba44dbb96c2c8
[harmattan/cameraplus] / lib / qtcamconfig.h
1 // -*- c++ -*-
2
3 /*!
4  * This file is part of CameraPlus.
5  *
6  * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21  */
22
23 #ifndef QT_CAM_CONFIG_H
24 #define QT_CAM_CONFIG_H
25
26 #include <QObject>
27 #include "qtcamimagesettings.h"
28 #include "qtcamvideosettings.h"
29
30 #define SCANNER_TYPE_V4L2                     "v4l2"
31 #define SCANNER_TYPE_ENUM                     "enum"
32
33 // TODO: kill those
34 //#define RENDERER_TYPE_GL_SINK                 "glsink"
35 //#define RENDERER_TYPE_X_OVERLAY               "xoverlay"
36 #define RENDERER_TYPE_MEEGO                   "meego"
37 #define RENDERER_TYPE_GENERIC                 "generic"
38 class QtCamConfigPrivate;
39
40 class QtCamConfig : public QObject {
41   Q_OBJECT
42
43 public:
44   QtCamConfig(QObject *parent = 0);
45   QtCamConfig(const QString& configPath, QObject *parent = 0);
46
47   virtual ~QtCamConfig();
48
49   QString deviceScannerType() const;
50   QString deviceScannerProperty() const;
51
52   QString videoSource() const;
53   QString viewfinderSink() const;
54   QString viewfinderRenderer() const;
55   QString audioSource() const;
56   QString wrapperVideoSource() const;
57   QString wrapperVideoSourceProperty() const;
58
59   QtCamImageSettings *imageSettings(const QVariant& id);
60   QtCamVideoSettings *videoSettings(const QVariant& id);
61
62   QString imageEncodingProfileName() const;
63   QString imageEncodingProfilePath() const;
64
65   QString videoEncodingProfileName() const;
66   QString videoEncodingProfilePath() const;
67
68   QString imageSuffix() const;
69   QString videoSuffix() const;
70
71   QString audioCaptureCaps() const;
72
73 private:
74   QtCamConfigPrivate *d_ptr;
75 };
76
77 #endif /* QT_CAM_CONFIG_H */