James Kuszmaul | 82f6c04 | 2021-01-17 11:30:16 -0800 | [diff] [blame^] | 1 | /** |
| 2 | * @file sdp/str.c SDP strings |
| 3 | * |
| 4 | * Copyright (C) 2010 Creytiv.com |
| 5 | */ |
| 6 | #include <re_types.h> |
| 7 | #include <re_fmt.h> |
| 8 | #include <re_list.h> |
| 9 | #include <re_sa.h> |
| 10 | #include <re_sdp.h> |
| 11 | |
| 12 | |
| 13 | const char sdp_attr_fmtp[] = "fmtp"; /**< fmtp */ |
| 14 | const char sdp_attr_maxptime[] = "maxptime"; /**< maxptime */ |
| 15 | const char sdp_attr_ptime[] = "ptime"; /**< ptime */ |
| 16 | const char sdp_attr_rtcp[] = "rtcp"; /**< rtcp */ |
| 17 | const char sdp_attr_rtpmap[] = "rtpmap"; /**< rtpmap */ |
| 18 | |
| 19 | const char sdp_media_audio[] = "audio"; /**< Media type 'audio' */ |
| 20 | const char sdp_media_video[] = "video"; /**< Media type 'video' */ |
| 21 | const char sdp_media_text[] = "text"; /**< Media type 'text' */ |
| 22 | |
| 23 | const char sdp_proto_rtpavp[] = "RTP/AVP"; /**< RTP Profile */ |
| 24 | const char sdp_proto_rtpsavp[] = "RTP/SAVP"; /**< Secure RTP Profile */ |
| 25 | |
| 26 | |
| 27 | /** |
| 28 | * Get the SDP media direction name |
| 29 | * |
| 30 | * @param dir Media direction |
| 31 | * |
| 32 | * @return Name of media direction |
| 33 | */ |
| 34 | const char *sdp_dir_name(enum sdp_dir dir) |
| 35 | { |
| 36 | switch (dir) { |
| 37 | |
| 38 | case SDP_INACTIVE: return "inactive"; |
| 39 | case SDP_RECVONLY: return "recvonly"; |
| 40 | case SDP_SENDONLY: return "sendonly"; |
| 41 | case SDP_SENDRECV: return "sendrecv"; |
| 42 | default: return "??"; |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | |
| 47 | /** |
| 48 | * Get the SDP bandwidth name |
| 49 | * |
| 50 | * @param type Bandwidth type |
| 51 | * |
| 52 | * @return Bandwidth name |
| 53 | */ |
| 54 | const char *sdp_bandwidth_name(enum sdp_bandwidth type) |
| 55 | { |
| 56 | switch (type) { |
| 57 | |
| 58 | case SDP_BANDWIDTH_CT: return "CT"; |
| 59 | case SDP_BANDWIDTH_AS: return "AS"; |
| 60 | case SDP_BANDWIDTH_RS: return "RS"; |
| 61 | case SDP_BANDWIDTH_RR: return "RR"; |
| 62 | case SDP_BANDWIDTH_TIAS: return "TIAS"; |
| 63 | default: return "??"; |
| 64 | } |
| 65 | } |