diff options
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 13 |
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; |