forked from sony/nmos-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
media_type.h
56 lines (40 loc) · 1.74 KB
/
media_type.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef NMOS_MEDIA_TYPE_H
#define NMOS_MEDIA_TYPE_H
#include "cpprest/basic_utils.h"
#include "nmos/string_enum.h"
namespace nmos
{
// Media types (used in flows and receivers)
// See https://specs.amwa.tv/is-04/releases/v1.2.0/APIs/schemas/with-refs/flow_video.html
// and https://specs.amwa.tv/is-04/releases/v1.2.0/APIs/schemas/with-refs/flow_audio_raw.html
// and https://specs.amwa.tv/is-04/releases/v1.2.0/APIs/schemas/with-refs/receiver_video.html
// etc.
DEFINE_STRING_ENUM(media_type)
namespace media_types
{
// Video media types
// Uncompressed Video
// See https://tools.ietf.org/html/rfc4175#section-6
const media_type video_raw{ U("video/raw") };
// Audio media types
inline media_type audio_L(unsigned int bit_depth)
{
return media_type{ U("audio/L") + utility::ostringstreamed(bit_depth) };
}
const media_type audio_L24 = audio_L(24);
// Data media types
const media_type video_smpte291{ U("video/smpte291") };
const media_type application_json{ U("application/json") };
// Mux media types
// See SMPTE ST 2022-8:2019
const media_type video_SMPTE2022_6{ U("video/SMPTE2022-6") };
// Additional media types for NMOS responses
const media_type application_sdp{ U("application/sdp") };
// experimental extension, to support HTML rendering of NMOS responses
const media_type text_html{ U("text/html") };
// experimental extension, to support JSON rendering in NMOS responses
const media_type application_schema_json{ U("application/schema+json") };
const media_type application_sdp_json{ U("application/sdp+json") };
}
}
#endif