~schwann/qtubuntu-camera/qtcamera-no-thumbnails

« back to all changes in this revision

Viewing changes to unittests/aalmediarecordercontrol/aalcameraservice.cpp

  • Committer: Tarmac
  • Author(s): Guenter Schwann
  • Date: 2013-06-07 12:25:19 UTC
  • mfrom: (46.2.10 qtcamera-video-recording)
  • Revision ID: tarmac-20130607122519-gjybf5yjncygcdfm
First version to support video recording.

Approved by PS Jenkins bot, Jim Hodapp.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2013 Canonical, Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU Lesser General Public License as published by
 
6
 * the Free Software Foundation; version 3.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU Lesser General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU Lesser General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
 
 
17
#include "aalcameraservice.h"
 
18
#include "storagemanager.h"
 
19
 
 
20
#include "camera_control.h"
 
21
 
 
22
AalCameraService *AalCameraService::m_service = 0;
 
23
 
 
24
AalCameraService::AalCameraService(QObject *parent) :
 
25
    QMediaService(parent),
 
26
    m_androidControl(0),
 
27
    m_androidListener(0)
 
28
{
 
29
    m_storageManager = new StorageManager;
 
30
}
 
31
 
 
32
AalCameraService::~AalCameraService()
 
33
{
 
34
    delete m_storageManager;
 
35
    delete m_androidControl;
 
36
}
 
37
 
 
38
QMediaControl *AalCameraService::requestControl(const char *name)
 
39
{
 
40
    Q_UNUSED(name);
 
41
    return 0;
 
42
}
 
43
 
 
44
void AalCameraService::releaseControl(QMediaControl *control)
 
45
{
 
46
    Q_UNUSED(control);
 
47
}
 
48
 
 
49
CameraControl *AalCameraService::androidControl()
 
50
{
 
51
    return m_androidControl;
 
52
}
 
53
 
 
54
bool AalCameraService::connectCamera()
 
55
{
 
56
    m_androidControl = new CameraControl;
 
57
    return true;
 
58
}
 
59
 
 
60
void AalCameraService::disconnectCamera()
 
61
{
 
62
}
 
63
 
 
64
void AalCameraService::initControls(CameraControl *camControl, CameraControlListener *listener)
 
65
{
 
66
    delete m_androidControl;
 
67
    m_androidControl = 0;
 
68
    Q_UNUSED(camControl);
 
69
    Q_UNUSED(listener);
 
70
}
 
71
 
 
72
bool AalCameraService::isCameraActive() const
 
73
{
 
74
    return true;
 
75
}
 
76
 
 
77
bool AalCameraService::isBackCameraUsed() const
 
78
{
 
79
    return true;
 
80
}
 
81
 
 
82
void AalCameraService::updateCaptureReady()
 
83
{
 
84
}
 
85
 
 
86
StorageManager *AalCameraService::storageManager()
 
87
{
 
88
    return m_storageManager;
 
89
}