-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLiveMediaFactory.hh
40 lines (33 loc) · 1.35 KB
/
LiveMediaFactory.hh
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
#pragma once
#include <functional>
#include <string>
#include <map>
#include <vector>
#include <memory>
#include "UsageEnvironment.hh"
#include "ServerMediaSession.hh"
#include "StreamReplicator.hh"
#include "LiveMediaTypeDef.h"
#include "LiveMediaSubsession.hh"
#include "LiveMediaInputSource.hh"
namespace LiveRTSP {
// TODO: Reflector
class LiveMediaFactory {
public:
LiveMediaFactory();
~LiveMediaFactory();
ServerMediaSession *MakeServerMediaSession(UsageEnvironment &env, std::string session_name, std::string description,
const ParamTypeKeyValMap &insrc, const ParamTypeKeyValMap &video, const ParamTypeKeyValMap &audio);
bool ParamValidation(const ParamTypeKeyValMap &insrc,
const ParamTypeKeyValMap &video, const ParamTypeKeyValMap &audio);
private:
using LiveMediaInputSourceCreator = std::function<
LiveMediaInputSource *(UsageEnvironment &env, const ParamTypeKeyValMap &tkv)>;
using LiveMediaSubsessionCreator = std::function<
LiveMediaSubsession *(UsageEnvironment &env, StreamReplicator *replicator, const ParamTypeKeyValMap &tkv)>;
using LiveMediaInputSourceTypeCreator = std::map<std::string, LiveMediaInputSourceCreator>;
// TODO: use abstract interface
std::map<std::string, LiveMediaInputSourceTypeCreator> insrcs;
std::map<std::string, LiveMediaSubsessionCreator> subsess;
};
}