diff options
author | Alfred E. Heggestad <aeh@db.org> | 2016-06-04 23:22:55 +0200 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2016-06-04 23:22:55 +0200 |
commit | 3bb22d2bb13a1700617b6c40eac08811a1b5b775 (patch) | |
tree | d69fd443dd3a93bd3d6c898667f39a2d64e07b86 /modules/vp9/sdp.c | |
parent | e6085d98b562cfc78a7d62ac9e3aa1c3923796dc (diff) |
vp9: add VP9 video codec
Diffstat (limited to 'modules/vp9/sdp.c')
-rw-r--r-- | modules/vp9/sdp.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/modules/vp9/sdp.c b/modules/vp9/sdp.c new file mode 100644 index 0000000..25a3d12 --- /dev/null +++ b/modules/vp9/sdp.c @@ -0,0 +1,39 @@ +/** + * @file vp9/sdp.c VP9 SDP Functions + * + * Copyright (C) 2010 - 2016 Creytiv.com + */ + +#include <re.h> +#include <baresip.h> +#include "vp9.h" + + +uint32_t vp9_max_fs(const char *fmtp) +{ + struct pl pl, max_fs; + + if (!fmtp) + return 0; + + pl_set_str(&pl, fmtp); + + if (fmt_param_get(&pl, "max-fs", &max_fs)) + return pl_u32(&max_fs); + + return 0; +} + + +int vp9_fmtp_enc(struct mbuf *mb, const struct sdp_format *fmt, + bool offer, void *arg) +{ + const struct vp9_vidcodec *vp9 = arg; + (void)offer; + + if (!mb || !fmt || !vp9 || !vp9->max_fs) + return 0; + + return mbuf_printf(mb, "a=fmtp:%s max-fs=%u\r\n", + fmt->id, vp9->max_fs); +} |