2 #include "qtcamvideomode.h"
3 #include "qtcamdevice.h"
6 VideoMode::VideoMode(QObject *parent) :
12 VideoMode::~VideoMode() {
17 bool VideoMode::startRecording(const QString& fileName) {
18 return m_video ? m_video->startRecording(fileName) : false;
21 void VideoMode::stopRecording() {
23 m_video->stopRecording();
27 void VideoMode::preChangeMode() {
29 QObject::disconnect(m_video, SIGNAL(recordingStateChanged()),
30 this, SIGNAL(recordingStateChanged()));
36 void VideoMode::postChangeMode() {
37 m_video = m_cam->device()->videoMode();
40 QObject::connect(m_video, SIGNAL(recordingStateChanged()),
41 this, SIGNAL(recordingStateChanged()));
45 bool VideoMode::isRecording() {
46 return m_video ? m_video->isRecording() : false;
49 void VideoMode::changeMode() {
50 m_mode = m_cam->device()->videoMode();