Ring Daemon 16.0.0
Loading...
Searching...
No Matches
androidvideo/video_device_monitor_impl.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2004-2025 Savoir-faire Linux Inc.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#include "../video_device_monitor.h"
19#include "logger.h"
20#include "noncopyable.h"
21
22#include "client/ring_signal.h"
23
24#include <algorithm>
25#include <mutex>
26#include <sstream>
27#include <stdexcept> // for std::runtime_error
28#include <string>
29#include <thread>
30#include <vector>
31
32namespace jami {
33namespace video {
34
35using std::vector;
36using std::string;
37
39{
40 /*
41 * This class is instantiated in VideoDeviceMonitor's constructor. The
42 * daemon has a global VideoManager, and it contains a VideoDeviceMonitor.
43 * So, when the library is loaded on Android, VideoDeviceMonitorImpl will
44 * be instantiated before we get a chance to register callbacks. At this
45 * point, if we use emitSignal to get a list of cameras, it will simply
46 * do nothing.
47 * To work around this issue, functions have been added in the video
48 * manager interface to allow to add/remove devices from Java code.
49 * To conclude, this class is just an empty stub.
50 */
51public:
54
55 void start();
56
57private:
59};
60
62
63void
66
68
70 : preferences_()
71 , devices_()
72 , monitorImpl_(new VideoDeviceMonitorImpl(this))
73{}
74
76
77} // namespace video
78} // namespace jami
void emitSignal(Args... args)
Definition ring_signal.h:64
Simple macro to hide class' copy constructor and assignment operator.
#define NON_COPYABLE(ClassName)
Definition noncopyable.h:30