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
32
namespace
jami
{
33
namespace
video
{
34
35
using
std::vector;
36
using
std::string;
37
38
class
VideoDeviceMonitorImpl
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
*/
51
public
:
52
VideoDeviceMonitorImpl
(
VideoDeviceMonitor
* monitor);
53
~VideoDeviceMonitorImpl
();
54
55
void
start
();
56
57
private
:
58
NON_COPYABLE
(
VideoDeviceMonitorImpl
);
59
};
60
61
VideoDeviceMonitorImpl::VideoDeviceMonitorImpl
(
VideoDeviceMonitor
* monitor) {}
62
63
void
64
VideoDeviceMonitorImpl::start
()
65
{}
66
67
VideoDeviceMonitorImpl::~VideoDeviceMonitorImpl
() {}
68
69
VideoDeviceMonitor::VideoDeviceMonitor
()
70
: preferences_()
71
, devices_()
72
, monitorImpl_(
new
VideoDeviceMonitorImpl
(
this
))
73
{}
74
75
VideoDeviceMonitor::~VideoDeviceMonitor
() {}
76
77
}
// namespace video
78
}
// namespace jami
jami::video::VideoDeviceMonitorImpl
Definition
androidvideo/video_device_monitor_impl.cpp:39
jami::video::VideoDeviceMonitorImpl::start
void start()
Definition
androidvideo/video_device_monitor_impl.cpp:64
jami::video::VideoDeviceMonitorImpl::VideoDeviceMonitorImpl
VideoDeviceMonitorImpl(VideoDeviceMonitor *monitor)
Definition
androidvideo/video_device_monitor_impl.cpp:61
jami::video::VideoDeviceMonitorImpl::~VideoDeviceMonitorImpl
~VideoDeviceMonitorImpl()
Definition
androidvideo/video_device_monitor_impl.cpp:67
jami::video::VideoDeviceMonitor
Definition
video_device_monitor.h:41
jami::video::VideoDeviceMonitor::VideoDeviceMonitor
VideoDeviceMonitor()
Definition
androidvideo/video_device_monitor_impl.cpp:69
jami::video::VideoDeviceMonitor::~VideoDeviceMonitor
~VideoDeviceMonitor()
Definition
androidvideo/video_device_monitor_impl.cpp:75
logger.h
jami
Definition
account.cpp:61
jami::emitSignal
void emitSignal(Args... args)
Definition
ring_signal.h:64
noncopyable.h
Simple macro to hide class' copy constructor and assignment operator.
NON_COPYABLE
#define NON_COPYABLE(ClassName)
Definition
noncopyable.h:30
ring_signal.h
StreamType::video
@ video
src
media
video
androidvideo
video_device_monitor_impl.cpp
Generated on Thu Jun 19 2025 15:50:37 for Ring Daemon by
1.9.8