[farsight2/master] Add test program for codec discovery (its a manual test for now)
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:19:47 PST 2008
---
.gitignore | 1 +
configure.ac | 1 +
tests/Makefile.am | 4 ++--
tests/rtp/Makefile.am | 10 ++++++++++
tests/rtp/codec-discovery.c | 43 +++++++++++++++++++++++++++++++++++++++++++
5 files changed, 57 insertions(+), 2 deletions(-)
create mode 100644 tests/rtp/Makefile.am
create mode 100644 tests/rtp/codec-discovery.c
diff --git a/.gitignore b/.gitignore
index 77aeadb..633bbf8 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 5104daf..7c3a7ba 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 d0cbc34..dfba5ae 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 0000000..40612c8
--- /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 0000000..376169a
--- /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;
+}
--
1.5.6.5
More information about the farsight-commits
mailing list