Added a function to reset all capabilities
[harmattan/cameraplus] / lib / qtcamvideomode.h
1 // -*- c++ -*-
2
3 #ifndef QT_CAM_VIDEO_MODE_H
4 #define QT_CAM_VIDEO_MODE_H
5
6 #include "qtcammode.h"
7 #include <gst/pbutils/encoding-profile.h>
8
9 class QtCamDevicePrivate;
10 class QtCamVideoModePrivate;
11 class QtCamVideoSettings;
12
13 class QtCamVideoMode : public QtCamMode {
14   Q_OBJECT
15
16   Q_PROPERTY(bool recording READ isRecording NOTIFY recordingStateChanged);
17
18 public:
19   QtCamVideoMode(QtCamDevicePrivate *d, QObject *parent = 0);
20   ~QtCamVideoMode();
21
22   virtual bool canCapture();
23   virtual void applySettings();
24
25   bool isRecording();
26   Q_INVOKABLE bool startRecording(const QString& fileName);
27
28   bool setSettings(const QtCamVideoSettings& settings);
29
30   void setProfile(GstEncodingProfile *profile);
31
32 public slots:
33   void stopRecording();
34
35 signals:
36   void recordingStateChanged();
37
38 protected:
39   virtual void start();
40   virtual void stop();
41
42 private:
43   Q_PRIVATE_SLOT(d_ptr, void _d_idleStateChanged(bool));
44
45   QtCamVideoModePrivate *d_ptr;
46 };
47
48 #endif /* QT_CAM_VIDEO_MODE_H */