summaryrefslogtreecommitdiff
path: root/modules/vp8/sdp.c
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2016-06-04 22:15:30 +0200
committerAlfred E. Heggestad <aeh@db.org>2016-06-04 22:15:30 +0200
commit346aaad2b057f823b7181e7b6711badd2554e5c2 (patch)
treee96076ad537c1a078acb3f9584fb2df513906805 /modules/vp8/sdp.c
parentb062f43d7ec08324593cd6f1bdfed98ebeeafdc9 (diff)
vp8: rename vpx.so module to vp8.so
Diffstat (limited to 'modules/vp8/sdp.c')
-rw-r--r--modules/vp8/sdp.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/modules/vp8/sdp.c b/modules/vp8/sdp.c
new file mode 100644
index 0000000..8d2ecca
--- /dev/null
+++ b/modules/vp8/sdp.c
@@ -0,0 +1,39 @@
+/**
+ * @file vp8/sdp.c VP8 SDP Functions
+ *
+ * Copyright (C) 2010 Creytiv.com
+ */
+
+#include <re.h>
+#include <baresip.h>
+#include "vp8.h"
+
+
+uint32_t vp8_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 vp8_fmtp_enc(struct mbuf *mb, const struct sdp_format *fmt,
+ bool offer, void *arg)
+{
+ const struct vp8_vidcodec *vp8 = arg;
+ (void)offer;
+
+ if (!mb || !fmt || !vp8 || !vp8->max_fs)
+ return 0;
+
+ return mbuf_printf(mb, "a=fmtp:%s max-fs=%u\r\n",
+ fmt->id, vp8->max_fs);
+}