dbusvideomanager.cpp 3.46 KB
Newer Older
1
/*
2
 *  Copyright (C) 2004-2020 Savoir-faire Linux Inc.
Guillaume Roguez's avatar
Guillaume Roguez committed
3
 *
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
 *  Author: Philippe Proulx <philippe.proulx@savoirfairelinux.com>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
 */

#include "dbusvideomanager.h"
22
#include "dring/videomanager_interface.h"
23 24

DBusVideoManager::DBusVideoManager(DBus::Connection& connection)
Adrien Béraud's avatar
Adrien Béraud committed
25
    : DBus::ObjectAdaptor(connection, "/cx/ring/Ring/VideoManager")
26
{}
27

28 29
auto
DBusVideoManager::getDeviceList() -> decltype(DRing::getDeviceList())
30
{
31
    return DRing::getDeviceList();
32 33
}

34
auto
35
DBusVideoManager::getCapabilities(const std::string& deviceId) -> decltype(DRing::getCapabilities(deviceId))
36
{
37
    return DRing::getCapabilities(deviceId);
38 39
}

40
auto
41
DBusVideoManager::getSettings(const std::string& deviceId) -> decltype(DRing::getSettings(deviceId))
42
{
43
    return DRing::getSettings(deviceId);
44 45
}

46
void
47
DBusVideoManager::applySettings(const std::string& deviceId, const std::map<std::string, std::string>& settings)
48
{
49
    DRing::applySettings(deviceId, settings);
50 51
}

52
void
53
DBusVideoManager::setDefaultDevice(const std::string& deviceId)
54
{
55
    DRing::setDefaultDevice(deviceId);
56 57
}

58 59
auto
DBusVideoManager::getDefaultDevice() -> decltype(DRing::getDefaultDevice())
60
{
61
    return DRing::getDefaultDevice();
62 63
}

64 65
void
DBusVideoManager::startCamera()
66
{
67
    DRing::startCamera();
68 69
}

70 71
void
DBusVideoManager::stopCamera()
72
{
73
    DRing::stopCamera();
74 75
}

Philippe Gorley's avatar
Philippe Gorley committed
76 77 78 79 80 81 82 83 84 85 86 87
void
DBusVideoManager::startAudioDevice()
{
    DRing::startAudioDevice();
}

void
DBusVideoManager::stopAudioDevice()
{
    DRing::stopAudioDevice();
}

88 89
auto
DBusVideoManager::switchInput(const std::string& resource) -> decltype(DRing::switchInput(resource))
90
{
91
    return DRing::switchInput(resource);
92 93
}

94 95
auto
DBusVideoManager::hasCameraStarted() -> decltype(DRing::hasCameraStarted())
96
{
97
    return DRing::hasCameraStarted();
98
}
99

100 101
auto
DBusVideoManager::getDecodingAccelerated() -> decltype(DRing::getDecodingAccelerated())
102 103 104 105 106
{
    return DRing::getDecodingAccelerated();
}

void
107
DBusVideoManager::setDecodingAccelerated(const bool& state)
108 109 110
{
    DRing::setDecodingAccelerated(state);
}
111

Philippe Gorley's avatar
Philippe Gorley committed
112 113 114 115 116 117 118 119 120 121 122 123
auto
DBusVideoManager::getEncodingAccelerated() -> decltype(DRing::getEncodingAccelerated())
{
    return DRing::getEncodingAccelerated();
}

void
DBusVideoManager::setEncodingAccelerated(const bool& state)
{
    DRing::setEncodingAccelerated(state);
}

Adrien Béraud's avatar
Adrien Béraud committed
124
void
125
DBusVideoManager::setDeviceOrientation(const std::string& deviceId, const int& angle)
Adrien Béraud's avatar
Adrien Béraud committed
126
{
127
    DRing::setDeviceOrientation(deviceId, angle);
Adrien Béraud's avatar
Adrien Béraud committed
128 129
}

130 131 132 133 134 135
std::map<std::string, std::string>
DBusVideoManager::getRenderer(const std::string& callId)
{
    return DRing::getRenderer(callId);
}

136 137 138 139 140 141 142 143 144 145 146
std::string
DBusVideoManager::startLocalRecorder(const bool& audioOnly, const std::string& filepath)
{
    return DRing::startLocalRecorder(audioOnly, filepath);
}

void
DBusVideoManager::stopLocalRecorder(const std::string& filepath)
{
    DRing::stopLocalRecorder(filepath);
}