forked from sony/nmos-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmedia_type.h
35 lines (26 loc) · 991 Bytes
/
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
#ifndef NMOS_MEDIA_TYPE_H
#define NMOS_MEDIA_TYPE_H
#include "nmos/string_enum.h"
namespace nmos
{
// Media types (used in flows and receivers)
// See https://github.com/AMWA-TV/nmos-discovery-registration/blob/v1.2/APIs/schemas/flow_video.json
// and https://github.com/AMWA-TV/nmos-discovery-registration/blob/v1.2/APIs/schemas/flow_audio_raw.json
// and https://github.com/AMWA-TV/nmos-discovery-registration/blob/v1.2/APIs/schemas/receiver_video.json
// etc.
DEFINE_STRING_ENUM(media_type)
namespace media_types
{
// Video media types
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") };
}
}
#endif