-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathSingleCameraPageFactory.cs
More file actions
78 lines (74 loc) · 3.03 KB
/
Copy pathSingleCameraPageFactory.cs
File metadata and controls
78 lines (74 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
using Microsoft.Extensions.Logging;
using OpenIPC.Viewer.App.ViewModels;
using OpenIPC.Viewer.Core.Entities;
using OpenIPC.Viewer.Core.Majestic;
using OpenIPC.Viewer.Core.Onvif;
using OpenIPC.Viewer.Core.Recording;
using OpenIPC.Viewer.Core.Services;
using OpenIPC.Viewer.Core.Snapshots;
using OpenIPC.Viewer.Core.Video;
namespace OpenIPC.Viewer.App.Services;
public sealed class SingleCameraPageFactory
{
private readonly LiveStreamCoordinator _coordinator;
private readonly CameraDirectoryService _directory;
private readonly IOnvifClient _onvif;
private readonly IMajesticClient _majestic;
private readonly IMajesticConfigSchema _schema;
private readonly IMajesticSshConfigClient _majesticSsh;
private readonly RecordingService _recordings;
private readonly UserSettingsService _userSettings;
private readonly IDialogService _dialogs;
private readonly ISnapshotService _snapshots;
private readonly AudioMonitor _audio;
private readonly OpenIPC.Viewer.Core.Platform.IAudioInput _audioInput;
private readonly IAudioBackchannelClient _backchannel;
private readonly IReachabilityProbe _reachability;
private readonly OpenIPC.Viewer.Core.Analytics.IAnalyticsEngine _analytics;
private readonly AnalyticsBootstrap _analyticsBootstrap;
private readonly ILoggerFactory _loggerFactory;
public SingleCameraPageFactory(
LiveStreamCoordinator coordinator,
CameraDirectoryService directory,
IOnvifClient onvif,
IMajesticClient majestic,
IMajesticConfigSchema schema,
IMajesticSshConfigClient majesticSsh,
RecordingService recordings,
UserSettingsService userSettings,
IDialogService dialogs,
ISnapshotService snapshots,
AudioMonitor audio,
OpenIPC.Viewer.Core.Platform.IAudioInput audioInput,
IAudioBackchannelClient backchannel,
IReachabilityProbe reachability,
OpenIPC.Viewer.Core.Analytics.IAnalyticsEngine analytics,
AnalyticsBootstrap analyticsBootstrap,
ILoggerFactory loggerFactory)
{
_coordinator = coordinator;
_directory = directory;
_onvif = onvif;
_majestic = majestic;
_schema = schema;
_majesticSsh = majesticSsh;
_recordings = recordings;
_userSettings = userSettings;
_dialogs = dialogs;
_snapshots = snapshots;
_audio = audio;
_audioInput = audioInput;
_backchannel = backchannel;
_reachability = reachability;
_analytics = analytics;
_analyticsBootstrap = analyticsBootstrap;
_loggerFactory = loggerFactory;
}
public SingleCameraPageViewModel Create(Camera camera) =>
new(camera, _coordinator, _directory, _onvif, _majestic, _schema, _majesticSsh, _recordings, _userSettings, _dialogs, _snapshots, _audio,
new PushToTalkController(_audioInput, _backchannel),
_reachability,
_analytics,
_analyticsBootstrap,
_loggerFactory.CreateLogger<SingleCameraPageViewModel>());
}