summaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2014-09-24 23:34:21 +0200
committerChristian Pointner <equinox@spreadspace.org>2014-09-24 23:34:21 +0200
commitbe982f880df6388bd00386b2cae8c318f902f1b2 (patch)
tree4452fa85d9b32bd1f98dca9fa25c97b9d2b76e1a /src/utils.c
parentadded simple UDP protocol (diff)
moved pipeline creation subs to own file
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c
index e9466fa..1180b0a 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -36,8 +36,21 @@
#include "datatypes.h"
#include "utils.h"
#include "log.h"
+
+#include <string.h>
+
#include <gst/gst.h>
+gint cmp_addr_port(gconstpointer A, gconstpointer B)
+{
+ const struct addr_port *a = (const struct addr_port *)A;
+ const struct addr_port *b = (const struct addr_port *)B;
+
+ if(a->type_ != b->type_ || a->port_ != b->port_)
+ return -1;
+ return strncmp(a->addr_, b->addr_, sizeof(a->addr_));
+}
+
GstElement* sydra_create_bin_from_desc(const char* type, const char* desc)
{
GError *error = NULL;