-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRecordSession.h
More file actions
37 lines (29 loc) · 988 Bytes
/
RecordSession.h
File metadata and controls
37 lines (29 loc) · 988 Bytes
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
#pragma once
#include <map>
#include <unordered_map>
#include "RtspSession/ServerSession.h"
#include "Config.h"
class RecordSession : public rtsp::ServerSession
{
public:
RecordSession(
const Config*,
const CreatePeer& createPeer,
const rtsp::Session::SendRequest& sendRequest,
const rtsp::Session::SendResponse& sendResponse) noexcept;
RecordSession(
const Config*,
const CreatePeer& createPeer,
const CreatePeer& createRecordPeer,
const rtsp::Session::SendRequest& sendRequest,
const rtsp::Session::SendResponse& sendResponse) noexcept;
~RecordSession();
protected:
bool recordEnabled(const std::string& uri) noexcept override;
bool authorizeRecorder(const std::unique_ptr<rtsp::Request>&) noexcept;
bool authorize(const std::unique_ptr<rtsp::Request>&) noexcept override;
private:
void startRecord(const std::string& uri) noexcept;
private:
const Config *const _config;
};