-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathsdptransform.hpp
More file actions
44 lines (33 loc) · 837 Bytes
/
sdptransform.hpp
File metadata and controls
44 lines (33 loc) · 837 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
38
39
40
41
42
43
44
#ifndef SDPTRANSFORM_HPP
#define SDPTRANSFORM_HPP
#include "json.hpp"
#include <string>
#include <vector>
#include <map>
#include <functional>
#include "matcher.hpp"
using json = nlohmann::json;
namespace sdptransform
{
namespace grammar
{
struct Rule
{
std::string name;
std::string push;
matcher::Ptr reg;
std::vector<std::string> names;
std::vector<char> types;
std::string format;
std::function<const std::string(const json&)> formatFunc;
};
extern const std::map<char, std::vector<Rule>> rulesMap;
}
json parse(const std::string& sdp);
json parseParams(const std::string& str);
std::vector<int> parsePayloads(const std::string& str);
json parseImageAttributes(const std::string& str);
json parseSimulcastStreamList(const std::string& str);
std::string write(json& session);
}
#endif