-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathOnvifSession.h
36 lines (28 loc) · 955 Bytes
/
OnvifSession.h
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
#pragma once
#include "WebRTSP/Client/ClientRecordSession.h"
#include "Config.h"
class OnvifSession : public ClientRecordSession
{
public:
enum Error: int32_t {
DEVICE_MEDIA_HAS_NO_PROFILES = 1,
DEVICE_MEDIA_PROFILE_HAS_NO_STREAM_URI = 2,
NOTIFICATION_MESSAGE_HAS_NO_DATA_ELEMENT = 3,
NOTIFICATION_MESSAGE_DOES_NOT_CONTAIN_MOTION_EVENT = 4,
};
OnvifSession(
const Config&,
const CreatePeer& createPeer,
const SendRequest& sendRequest,
const SendResponse& sendResponse) noexcept;
~OnvifSession();
bool onOptionsResponse(
const rtsp::Request&,
const rtsp::Response&) noexcept override;
protected:
bool playSupportRequired(const std::string& /*uri*/) noexcept override { return false; }
bool recordSupportRequired(const std::string& /*uri*/) noexcept override { return true; }
private:
struct Private;
std::unique_ptr<Private> _p;
};