summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--configure.ac1
-rw-r--r--tests/Makefile.am4
-rw-r--r--tests/rtp/Makefile.am10
-rw-r--r--tests/rtp/codec-discovery.c43
5 files changed, 57 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 77aeadb7..633bbf88 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,6 +36,7 @@ tests/check/base/fscodec
tests/check/base/fstransmitter
tests/check/transmitter/.dirstamp
tests/check/transmitter/rawudp
+tests/rtp/codec-discovery
aclocal.m4
autom4te.cache
diff --git a/configure.ac b/configure.ac
index 5104daf9..7c3a7ba1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -346,6 +346,7 @@ dnl pkgconfig/farsight2.pc
dnl pkgconfig/farsight2-uninstalled.pc
tests/Makefile
tests/check/Makefile
+tests/rtp/Makefile
docs/Makefile
docs/libs/Makefile
docs/version.entities
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d0cbc349..dfba5ae6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -4,6 +4,6 @@ else
SUBDIRS_CHECK =
endif
-SUBDIRS = $(SUBDIRS_CHECK)
+SUBDIRS = $(SUBDIRS_CHECK) rtp
-DIST_SUBDIRS = check
+DIST_SUBDIRS = check rtp
diff --git a/tests/rtp/Makefile.am b/tests/rtp/Makefile.am
new file mode 100644
index 00000000..40612c81
--- /dev/null
+++ b/tests/rtp/Makefile.am
@@ -0,0 +1,10 @@
+
+noinst_PROGRAMS = codec-discovery
+
+codec_discovery_SOURCES = codec-discovery.c \
+ $(top_srcdir)/gst/fsrtpconference/fs-rtp-discover-codecs.c \
+ $(top_srcdir)/gst/fsrtpconference/fs-rtp-codec-cache.c
+codec_discovery_CFLAGS = -I$(top_srcdir)/gst/fsrtpconference/ \
+ $(FS2_INTERNAL_CFLAGS) $(FS2_CFLAGS) $(GST_CFLAGS) $(CFLAGS)
+LDADD = $(GST_LIBS) $(GST_CHECK_LIBS) \
+ $(top_builddir)/gst-libs/gst/farsight/libgstfarsight-0.10.la
diff --git a/tests/rtp/codec-discovery.c b/tests/rtp/codec-discovery.c
new file mode 100644
index 00000000..376169a8
--- /dev/null
+++ b/tests/rtp/codec-discovery.c
@@ -0,0 +1,43 @@
+
+
+#include <gst/gst.h>
+
+#include <gst/farsight/fs-codec.h>
+
+#include "fs-rtp-discover-codecs.h"
+
+int main (int argc, char **argv)
+{
+ GList *elements = NULL;
+ GError *error = NULL;
+
+ gst_init (&argc, &argv);
+
+ g_debug ("AUDIO STARTING!!");
+
+ elements = load_codecs (FS_MEDIA_TYPE_AUDIO, &error);
+
+ if (error)
+ g_debug ("Error: %s", error->message);
+
+ g_clear_error (&error);
+ unload_codecs (FS_MEDIA_TYPE_AUDIO);
+
+ g_debug ("AUDIO FINISHED!!");
+
+
+ g_debug ("VIDEO STARTING!!");
+
+ elements = load_codecs (FS_MEDIA_TYPE_VIDEO, &error);
+
+ if (error)
+ g_debug ("Error: %s", error->message);
+
+ g_clear_error (&error);
+
+ unload_codecs (FS_MEDIA_TYPE_VIDEO);
+
+ g_debug ("VIDEO FINISHED!!");
+
+ return 0;
+}