summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/old/examples/Makefile.am24
-rw-r--r--tests/old/examples/TODO66
-rw-r--r--tests/old/examples/appreader/.gitignore1
-rw-r--r--tests/old/examples/appreader/Makefile.am5
-rw-r--r--tests/old/examples/appreader/appreader.c76
-rw-r--r--tests/old/examples/cutter/.gitignore4
-rw-r--r--tests/old/examples/cutter/Makefile.am5
-rw-r--r--tests/old/examples/cutter/cutter.c203
-rw-r--r--tests/old/examples/cutter/cutter.h14
-rw-r--r--tests/old/examples/events/Makefile.am4
-rw-r--r--tests/old/examples/events/seek.c68
-rw-r--r--tests/old/examples/helloworld2/.gitignore1
-rw-r--r--tests/old/examples/helloworld2/Makefile.am5
-rw-r--r--tests/old/examples/helloworld2/helloworld2.c133
-rw-r--r--tests/old/examples/manual/.gitignore39
-rw-r--r--tests/old/examples/manual/Makefile.am104
-rwxr-xr-xtests/old/examples/manual/extract.pl78
-rw-r--r--tests/old/examples/mixer/.gitignore5
-rw-r--r--tests/old/examples/mixer/Makefile.am5
-rw-r--r--tests/old/examples/mixer/mixer.c398
-rw-r--r--tests/old/examples/mixer/mixer.h12
-rw-r--r--tests/old/examples/pingpong/.gitignore12
-rw-r--r--tests/old/examples/pingpong/Makefile.am5
-rw-r--r--tests/old/examples/pingpong/pingpong.c99
-rw-r--r--tests/old/examples/plugins/.gitignore10
-rw-r--r--tests/old/examples/plugins/Makefile.am12
-rw-r--r--tests/old/examples/plugins/example.c426
-rw-r--r--tests/old/examples/plugins/example.h87
-rw-r--r--tests/old/examples/pwg/.gitignore18
-rw-r--r--tests/old/examples/pwg/Makefile.am88
-rwxr-xr-xtests/old/examples/pwg/extract.pl78
-rw-r--r--tests/old/examples/queue2/.gitignore4
-rw-r--r--tests/old/examples/queue2/Makefile.am5
-rw-r--r--tests/old/examples/queue2/queue2.c76
-rw-r--r--tests/old/examples/queue3/.gitignore4
-rw-r--r--tests/old/examples/queue3/Makefile.am5
-rw-r--r--tests/old/examples/queue3/queue3.c76
-rw-r--r--tests/old/examples/queue4/.gitignore4
-rw-r--r--tests/old/examples/queue4/Makefile.am5
-rw-r--r--tests/old/examples/queue4/queue4.c84
-rw-r--r--tests/old/examples/retag/.gitignore5
-rw-r--r--tests/old/examples/retag/Makefile.am7
-rw-r--r--tests/old/examples/retag/retag.c103
-rw-r--r--tests/old/examples/retag/transcode.c105
-rw-r--r--tests/old/examples/thread/.gitignore4
-rw-r--r--tests/old/examples/thread/Makefile.am5
-rw-r--r--tests/old/examples/thread/thread.c79
-rw-r--r--tests/old/testsuite/.gitignore14
-rw-r--r--tests/old/testsuite/Makefile.am38
-rw-r--r--tests/old/testsuite/Rules33
-rw-r--r--tests/old/testsuite/caps/.gitignore36
-rw-r--r--tests/old/testsuite/caps/Makefile.am33
-rw-r--r--tests/old/testsuite/caps/app_fixate.c51
-rw-r--r--tests/old/testsuite/caps/audioscale.c174
-rw-r--r--tests/old/testsuite/caps/caps.c159
-rw-r--r--tests/old/testsuite/caps/caps.h18
-rw-r--r--tests/old/testsuite/caps/caps_strings263
-rw-r--r--tests/old/testsuite/caps/compatibility.c93
-rw-r--r--tests/old/testsuite/caps/deserialize.c85
-rw-r--r--tests/old/testsuite/caps/enumcaps.c95
-rw-r--r--tests/old/testsuite/caps/eratosthenes.c71
-rw-r--r--tests/old/testsuite/caps/filtercaps.c49
-rw-r--r--tests/old/testsuite/caps/fixed.c82
-rw-r--r--tests/old/testsuite/caps/fraction-convert.c139
-rw-r--r--tests/old/testsuite/caps/fraction-multiply-and-zero.c131
-rw-r--r--tests/old/testsuite/caps/intersect2.c121
-rw-r--r--tests/old/testsuite/caps/intersection.c109
-rw-r--r--tests/old/testsuite/caps/normalisation.c85
-rw-r--r--tests/old/testsuite/caps/random.c69
-rw-r--r--tests/old/testsuite/caps/renegotiate.c150
-rw-r--r--tests/old/testsuite/caps/sets.c81
-rw-r--r--tests/old/testsuite/caps/simplify.c125
-rw-r--r--tests/old/testsuite/caps/string-conversions.c205
-rw-r--r--tests/old/testsuite/caps/structure.c25
-rw-r--r--tests/old/testsuite/caps/subtract.c63
-rw-r--r--tests/old/testsuite/caps/union.c34
-rw-r--r--tests/old/testsuite/debug/.gitignore5
-rw-r--r--tests/old/testsuite/debug/Makefile.am5
-rw-r--r--tests/old/testsuite/debug/category.c84
-rw-r--r--tests/old/testsuite/debug/commandline.c118
-rw-r--r--tests/old/testsuite/debug/global.c112
-rw-r--r--tests/old/testsuite/debug/output.c127
-rw-r--r--tests/old/testsuite/debug/printf_extension.c48
-rw-r--r--tests/old/testsuite/dlopen/.gitignore1
-rw-r--r--tests/old/testsuite/dlopen/Makefile.am41
-rw-r--r--tests/old/testsuite/dlopen/dlopen_gst.c28
-rw-r--r--tests/old/testsuite/dlopen/loadgst.c26
-rw-r--r--tests/old/testsuite/elements/.gitignore16
-rw-r--r--tests/old/testsuite/elements/Makefile.am15
-rwxr-xr-xtests/old/testsuite/elements/gst-inspect-check.in90
-rw-r--r--tests/old/testsuite/elements/struct_i386.h148
-rw-r--r--tests/old/testsuite/elements/struct_size.c69
-rw-r--r--tests/old/testsuite/indexers/.gitignore9
-rw-r--r--tests/old/testsuite/indexers/Makefile.am5
-rw-r--r--tests/old/testsuite/indexers/cache1.c114
-rw-r--r--tests/old/testsuite/indexers/indexdump.c81
-rw-r--r--tests/old/testsuite/parse/.gitignore9
-rw-r--r--tests/old/testsuite/parse/Makefile.am5
-rw-r--r--tests/old/testsuite/parse/parse1.c229
-rw-r--r--tests/old/testsuite/parse/parse2.c212
-rw-r--r--tests/old/testsuite/plugin/.gitignore16
-rw-r--r--tests/old/testsuite/plugin/Makefile.am16
-rw-r--r--tests/old/testsuite/plugin/README59
-rw-r--r--tests/old/testsuite/plugin/dynamic.c23
-rw-r--r--tests/old/testsuite/plugin/linked.c22
-rw-r--r--tests/old/testsuite/plugin/loading.c55
-rw-r--r--tests/old/testsuite/plugin/registry.c17
-rw-r--r--tests/old/testsuite/plugin/static.c22
-rw-r--r--tests/old/testsuite/plugin/static2.c49
-rw-r--r--tests/old/testsuite/plugin/testplugin.c18
-rw-r--r--tests/old/testsuite/plugin/testplugin2.c18
-rw-r--r--tests/old/testsuite/plugin/testplugin2_s.c18
-rw-r--r--tests/old/testsuite/plugin/testplugin_s.c18
-rw-r--r--tests/old/testsuite/refcounting/.gitignore14
-rw-r--r--tests/old/testsuite/refcounting/Makefile.am14
-rw-r--r--tests/old/testsuite/refcounting/bin.c318
-rw-r--r--tests/old/testsuite/refcounting/element.c139
-rw-r--r--tests/old/testsuite/refcounting/element_pad.c115
-rw-r--r--tests/old/testsuite/refcounting/mainloop.c32
-rw-r--r--tests/old/testsuite/refcounting/mem.c31
-rw-r--r--tests/old/testsuite/refcounting/mem.h1
-rw-r--r--tests/old/testsuite/refcounting/object.c160
-rw-r--r--tests/old/testsuite/refcounting/pad.c153
-rw-r--r--tests/old/testsuite/refcounting/sched.c77
-rw-r--r--tests/old/testsuite/refcounting/thread.c304
-rw-r--r--tests/old/testsuite/states/.gitignore11
-rw-r--r--tests/old/testsuite/states/Makefile.am5
-rw-r--r--tests/old/testsuite/states/bin.c158
-rw-r--r--tests/old/testsuite/states/locked.c105
-rw-r--r--tests/old/testsuite/states/parent.c111
-rw-r--r--tests/old/testsuite/threads/.gitignore19
-rw-r--r--tests/old/testsuite/threads/159566.c96
-rw-r--r--tests/old/testsuite/threads/159852.c33
-rw-r--r--tests/old/testsuite/threads/Makefile.am33
-rw-r--r--tests/old/testsuite/threads/queue.c89
-rw-r--r--tests/old/testsuite/threads/signals.c231
-rw-r--r--tests/old/testsuite/threads/staticrec.c49
-rw-r--r--tests/old/testsuite/threads/thread.c128
-rw-r--r--tests/old/testsuite/threads/threadb.c80
-rw-r--r--tests/old/testsuite/threads/threadc.c93
-rw-r--r--tests/old/testsuite/threads/threadd.c95
-rw-r--r--tests/old/testsuite/threads/threade.c81
-rw-r--r--tests/old/testsuite/threads/threadf.c83
-rw-r--r--tests/old/testsuite/threads/threadg.c67
-rw-r--r--tests/old/testsuite/threads/threadh.c53
-rw-r--r--tests/old/testsuite/threads/threadi.c139
146 files changed, 0 insertions, 10352 deletions
diff --git a/tests/old/examples/Makefile.am b/tests/old/examples/Makefile.am
deleted file mode 100644
index bcb38a9efa..0000000000
--- a/tests/old/examples/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-# these example currently don't build (see TODO)
-
-dirs =
-
-#appreader
-#cutter
-#events
-#helloworld2
-#launch
-#manual
-#mixer
-#pingpong
-#plugins
-#pwg
-#queue2
-#queue3
-#queue4
-#retag
-#thread
-
-SUBDIRS = $(dirs)
-
-DIST_SUBDIRS = $(dirs)
-
diff --git a/tests/old/examples/TODO b/tests/old/examples/TODO
deleted file mode 100644
index 566610742c..0000000000
--- a/tests/old/examples/TODO
+++ /dev/null
@@ -1,66 +0,0 @@
-state of the examples:
-
-appreader
-controller
- okay
-cutter
-events
-helloworld
-helloworld2
-manual
-metadata
-mixer
-pingpong
-plugins
-pwg
-queue
-queue2
-queue3
-queue4
-retag
-typefind
-xml
-
-----
-
-appreader
- gst_bin_iterate
-
-cutter
- gst_bin_iterate
-
-events
- gst_bin_iterate
- gst_event_new_seek
- gst_event_new_flush
-
-helloworld
- GstAutoplug
-
-manual
- dynamic
- gst_registry_pool_feature_filter
-
-mixer
- gst_bin_iterate
- gst_scheduler_show
- gst_element_add_ghost_pad
-
-pingpong
- gst_bin_iterate
- gst_element_add_ghost_pad
- gst_element_default_deep_notify
-
-plugins
- lots of errors
-
-pwg
- lots of errors
-
-retag
- gst_tag_setter_
- gst_bin_iterate
-
-thread
- obsolete, uses gst_thread_new
-
diff --git a/tests/old/examples/appreader/.gitignore b/tests/old/examples/appreader/.gitignore
deleted file mode 100644
index 2167b1baf8..0000000000
--- a/tests/old/examples/appreader/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-appreader
diff --git a/tests/old/examples/appreader/Makefile.am b/tests/old/examples/appreader/Makefile.am
deleted file mode 100644
index 68b2265bef..0000000000
--- a/tests/old/examples/appreader/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-noinst_PROGRAMS = appreader
-
-appreader_LDADD = $(GST_OBJ_LIBS)
-appreader_CFLAGS = $(GST_OBJ_CFLAGS)
-
diff --git a/tests/old/examples/appreader/appreader.c b/tests/old/examples/appreader/appreader.c
deleted file mode 100644
index 730d547a4f..0000000000
--- a/tests/old/examples/appreader/appreader.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* GStreamer
- * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <gst/gst.h>
-
-static void
-fill_queue (GstElement * queue, gint level, GstBin * pipeline)
-{
- /* this needs to iterate till something is pushed
- * in the queue */
- gst_bin_iterate (pipeline);
-}
-
-gint
-main (gint argc, gchar * argv[])
-{
- GstElement *queue, *src, *pipeline;
- GstBuffer *buffer;
- gboolean done = FALSE;
- GstPad *pad;
-
- gst_init (&argc, &argv);
-
- queue = gst_element_factory_make ("queue", "queue");
- g_object_set (G_OBJECT (queue), "signal_marks", TRUE, NULL);
-
- src = gst_element_factory_make ("filesrc", "src");
- g_object_set (G_OBJECT (src), "location", "appreader.c", NULL);
-
- pipeline = gst_pipeline_new ("pipeline");
-
- gst_bin_add_many (GST_BIN (pipeline), src, queue, NULL);
-
- gst_element_link_many (src, queue, NULL);
-
- pad = gst_element_get_pad (queue, "src");
- g_signal_connect (G_OBJECT (queue), "low_watermark", G_CALLBACK (fill_queue),
- pipeline);
-
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
-
- do {
- /* get buffer into the app */
- buffer = GST_RPAD_GETFUNC (pad) (pad);
-
- /* just exit on any event */
- if (GST_IS_EVENT (buffer)) {
- done = TRUE;
- } else {
- gst_util_dump_mem (GST_BUFFER_DATA (buffer), GST_BUFFER_SIZE (buffer));
- }
- gst_data_unref (GST_DATA (buffer));
-
- } while (!done);
-
- gst_element_set_state (pipeline, GST_STATE_NULL);
- gst_object_unref (pipeline);
-
- return 0;
-}
diff --git a/tests/old/examples/cutter/.gitignore b/tests/old/examples/cutter/.gitignore
deleted file mode 100644
index d1442f38e5..0000000000
--- a/tests/old/examples/cutter/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-cutter
-*.bb
-*.bbg
-*.da
diff --git a/tests/old/examples/cutter/Makefile.am b/tests/old/examples/cutter/Makefile.am
deleted file mode 100644
index 5285612a45..0000000000
--- a/tests/old/examples/cutter/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-noinst_PROGRAMS = cutter
-noinst_HEADERS = cutter.h
-
-cutter_LDADD = $(GST_OBJ_LIBS)
-cutter_CFLAGS = $(GST_OBJ_CFLAGS)
diff --git a/tests/old/examples/cutter/cutter.c b/tests/old/examples/cutter/cutter.c
deleted file mode 100644
index 26e0c04c6e..0000000000
--- a/tests/old/examples/cutter/cutter.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * cutter.c - cut audio into pieces based on silence - thomas@apestaart.org
- *
- * construct a simple pipeline osssrc ! cutter ! filesink
- * pause when necessary, change output
- *
- * Latest change : 03/06/2001
- *
- * Version : 0.3
- */
-
-#include <stdlib.h>
-#include <gst/gst.h>
-#include <unistd.h>
-#include <time.h>
-
-#define DEBUG
-
-gboolean playing = TRUE;
-gboolean cut_start_signalled = FALSE;
-gboolean cut_stop_signalled = FALSE;
-
-int id = 0; /* increment this for each new cut */
-GstElement *main_bin;
-GstElement *audiosrc;
-GstElement *queue;
-GstElement *thread;
-GstElement *cutter;
-GstElement *filesink;
-GstElement *encoder;
-char buffer[255];
-
-/* signal callbacks */
-
-void
-cut_start (GstElement * element)
-{
- g_print ("\nDEBUG: main: cut start\n");
- /* we should pause the pipeline, unlink cutter and filesink
- * create a new filesink to a real file, relink, and set to play
- */
- g_print ("DEBUG: cut_start: main_bin pausing\n");
- gst_element_set_state (main_bin, GST_STATE_PAUSED);
- g_print ("DEBUG: cut_start: main_bin paused\n");
-
- {
- time_t seconds;
- struct tm *ct;
-
- time (&seconds);
- ct = localtime (&seconds);
-/* sprintf (buffer, "/news/incoming/audio/cutter.%06d.wav", id); */
- sprintf (buffer,
- "/news/incoming/audio/cutter.%04d%02d%02d.%02d%02d%02d.wav",
- ct->tm_year + 1900, ct->tm_mon, ct->tm_mday, ct->tm_hour, ct->tm_min,
- ct->tm_sec);
- }
- g_print ("DEBUG: cut_start: setting new location to %s\n", buffer);
- g_object_set (G_OBJECT (filesink), "location", buffer, NULL);
- g_object_set (G_OBJECT (filesink), "type", 4, NULL);
-
- gst_element_set_state (main_bin, GST_STATE_PLAYING);
- ++id;
- g_print ("start_cut_signal done\n");
- return;
-}
-
-void
-cut_start_signal (GstElement * element)
-{
- g_print ("\nDEBUG: main: cut start signal\n");
- cut_start_signalled = TRUE;
-}
-
-void
-cut_stop (GstElement * element)
-{
- g_print ("\nDEBUG: main: cut stop\n");
- /* we should pause the pipeline, unlink filesink, create a fake filesink,
- * link to pipeline, and set to play
- */
- g_print ("DEBUG: cut_stop: main_bin paused\n");
- gst_element_set_state (main_bin, GST_STATE_PAUSED);
-
- g_print ("DEBUG: cut_stop: setting new location\n");
- g_object_set (G_OBJECT (filesink), "location", "/dev/null", NULL);
-
- gst_element_set_state (main_bin, GST_STATE_PLAYING);
- g_print ("stop_cut_signal done\n");
- return;
-}
-
-void
-cut_stop_signal (GstElement * element)
-{
- g_print ("\nDEBUG: main: cut stop signal\n");
- cut_stop_signalled = TRUE;
-}
-
-int
-main (int argc, char *argv[])
-{
- /*int i, j; */
- /*gboolean done; */
-
- /*char buffer[20]; */
-
- /*output_channel_t *channel_out; */
-
- GstElement *audiosrc;
-
- gst_init (&argc, &argv);
-/*
- if (argc == 1)
- {
- g_print("usage: %s <filename1> <filename2> <...>\n", argv[0]);
- exit(-1);
- }*/
-
- /* set up input channel and main bin */
-
- g_print ("creating main bin\n");
- /* create cutter */
- cutter = gst_element_factory_make ("cutter", "cutter");
-
- g_object_set (G_OBJECT (cutter),
- "threshold_dB", -40.0, "runlength", 0.5, "prelength", 1.0, NULL);
-
- /* create an audio src */
- if (!(audiosrc = gst_element_factory_make ("osssrc", "audio_src")))
- g_error ("Could not create 'osssrc' element !\n");
-
- /* set params */
-
- g_object_set (G_OBJECT (audiosrc), "frequency", 44100,
- "channels", 1, "format", 16, NULL);
-
- if (!(encoder = gst_element_factory_make ("passthrough", "encoder")))
- g_error ("Could not create 'passthrough' element !\n");
-
- if (!(filesink = gst_element_factory_make ("afsink", "disk_sink")))
- g_error ("Could not create 'afsink' element !\n");
-
- g_object_set (G_OBJECT (filesink), "location", "/dev/null", NULL);
-
- thread = gst_thread_new ("thread");
- g_assert (thread != NULL);
-
- /* create main bin */
- main_bin = gst_pipeline_new ("bin");
- g_assert (main_bin != NULL);
-
- queue = gst_element_factory_make ("queue", "queue");
- g_assert (queue);
-
- /* add elements to bin */
- gst_bin_add (GST_BIN (main_bin), audiosrc);
- gst_bin_add (GST_BIN (thread), queue);
-
- gst_bin_add_many (GST_BIN (thread), cutter, encoder, filesink, NULL);
-
- gst_element_link_many (audiosrc, queue, cutter, encoder, filesink, NULL);
- gst_bin_add (GST_BIN (main_bin), thread);
-
- /* set signal handlers */
- g_print ("setting signal handlers\n");
- g_signal_connect (G_OBJECT (cutter), "cut_start",
- (GCallback) cut_start_signal, NULL);
- g_signal_connect (G_OBJECT (cutter), "cut_stop",
- (GCallback) cut_stop_signal, NULL);
-
- /* start playing */
- g_print ("setting to play\n");
- gst_element_set_state (main_bin, GST_STATE_PLAYING);
-/*
- g_print ("setting thread to play\n");
- gst_element_set_state (GST_ELEMENT (thread), GST_STATE_PLAYING);
-*/
- while (playing) {
-/* g_print ("> "); */
- gst_bin_iterate (GST_BIN (main_bin));
-/* g_print (" <"); */
- if (cut_start_signalled) {
- g_print ("\nDEBUG: main: cut_start_signalled true !\n");
- cut_start (cutter);
- cut_start_signalled = FALSE;
- }
- if (cut_stop_signalled) {
- g_print ("\nDEBUG: main: cut_stop_signalled true !\n");
- cut_stop (cutter);
- cut_stop_signalled = FALSE;
- }
- }
- g_print ("we're done iterating.\n");
- /* stop the bin */
-
- gst_element_set_state (main_bin, GST_STATE_NULL);
-
- gst_object_unref (filesink);
- gst_object_unref (main_bin);
-
- exit (0);
-}
diff --git a/tests/old/examples/cutter/cutter.h b/tests/old/examples/cutter/cutter.h
deleted file mode 100644
index d3ac594776..0000000000
--- a/tests/old/examples/cutter/cutter.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * cutter.h header file
- * thomas@apestaart.org
- */
-
-typedef struct
-{
- GstElement *pipe;
- GstElement *filesink;
- GstElement *audiosink;
-
- char *location;
- int channel_id;
-} output_channel_t;
diff --git a/tests/old/examples/events/Makefile.am b/tests/old/examples/events/Makefile.am
deleted file mode 100644
index ef74b46b5d..0000000000
--- a/tests/old/examples/events/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-noinst_PROGRAMS = seek
-
-LDADD = $(GST_OBJ_LIBS)
-AM_CFLAGS = $(GST_OBJ_CFLAGS)
diff --git a/tests/old/examples/events/seek.c b/tests/old/examples/events/seek.c
deleted file mode 100644
index 4e45f53731..0000000000
--- a/tests/old/examples/events/seek.c
+++ /dev/null
@@ -1,68 +0,0 @@
-#include <gst/gst.h>
-
-int
-main (int argc, char *argv[])
-{
- GstBin *bin;
- GstElement *src, *sink;
- GstPad *srcpad, *sinkpad;
-
-/* _gst_plugin_spew = TRUE; */
- gst_init (&argc, &argv);
-
- bin = GST_BIN (gst_pipeline_new ("pipeline"));
- g_return_val_if_fail (bin != NULL, -1);
-
- g_print ("--- creating src and sink elements\n");
- src = gst_element_factory_make ("fakesrc", "src");
- g_return_val_if_fail (src != NULL, -1);
- sink = gst_element_factory_make ("fakesink", "sink");
- g_return_val_if_fail (sink != NULL, -1);
-
- g_print ("--- about to add the elements to the bin\n");
- gst_bin_add (bin, GST_ELEMENT (src));
- gst_bin_add (bin, GST_ELEMENT (sink));
-
- g_print ("--- getting pads\n");
- srcpad = gst_element_get_pad (src, "src");
- g_return_val_if_fail (srcpad != NULL, -1);
- sinkpad = gst_element_get_pad (sink, "sink");
- g_return_val_if_fail (srcpad != NULL, -1);
-
- g_print ("--- linking\n");
- gst_pad_link (srcpad, sinkpad);
-
- g_print ("--- setting up\n");
- gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING);
-
- g_print ("--- iterating\n");
- gst_bin_iterate (bin);
- gst_bin_iterate (bin);
-
- g_print ("--- seek to 100\n");
- gst_pad_send_event (srcpad, gst_event_new_seek (GST_SEEK_ANY, 100, FALSE));
-
- g_print ("--- seek done, iterating\n");
- gst_bin_iterate (bin);
- gst_bin_iterate (bin);
-
- g_print ("--- seek to 200 with flush\n");
- gst_pad_send_event (srcpad, gst_event_new_seek (GST_SEEK_ANY, 200, TRUE));
-
- g_print ("--- seek done, iterating\n");
- gst_bin_iterate (bin);
- gst_bin_iterate (bin);
- gst_bin_iterate (bin);
-
- g_print ("--- flush\n");
- gst_pad_send_event (srcpad, gst_event_new_flush ());
-
- g_print ("--- flush done, iterating\n");
- gst_bin_iterate (bin);
- gst_bin_iterate (bin);
-
- g_print ("--- cleaning up\n");
- gst_element_set_state (GST_ELEMENT (bin), GST_STATE_NULL);
-
- return 0;
-}
diff --git a/tests/old/examples/helloworld2/.gitignore b/tests/old/examples/helloworld2/.gitignore
deleted file mode 100644
index 907ddb903c..0000000000
--- a/tests/old/examples/helloworld2/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-helloworld2
diff --git a/tests/old/examples/helloworld2/Makefile.am b/tests/old/examples/helloworld2/Makefile.am
deleted file mode 100644
index 8e00b0ac04..0000000000
--- a/tests/old/examples/helloworld2/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-noinst_PROGRAMS = helloworld2
-
-helloworld2_LDADD = $(GST_OBJ_LIBS)
-helloworld2_CFLAGS = $(GST_OBJ_CFLAGS)
-
diff --git a/tests/old/examples/helloworld2/helloworld2.c b/tests/old/examples/helloworld2/helloworld2.c
deleted file mode 100644
index e78b0b0a12..0000000000
--- a/tests/old/examples/helloworld2/helloworld2.c
+++ /dev/null
@@ -1,133 +0,0 @@
-#include <gst/gst.h>
-
-static void
-gst_play_have_type (GstElement * typefind, GstCaps * caps,
- GstElement * pipeline)
-{
- GstElement *osssink;
- GstElement *new_element;
- GstAutoplug *autoplug;
- GstElement *autobin;
- GstElement *filesrc;
- GstElement *cache;
-
- GST_DEBUG ("GstPipeline: play have type");
-
- gst_element_set_state (pipeline, GST_STATE_PAUSED);
-
- filesrc = gst_bin_get_by_name (GST_BIN (pipeline), "disk_source");
- autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin");
- cache = gst_bin_get_by_name (GST_BIN (autobin), "cache");
-
- /* unlink_pads the typefind from the pipeline and remove it */
- gst_element_unlink_pads (cache, "src", typefind, "sink");
- gst_bin_remove (GST_BIN (autobin), typefind);
-
- /* and an audio sink */
- osssink = gst_element_factory_make ("osssink", "play_audio");
- g_assert (osssink != NULL);
-
- autoplug = gst_autoplug_factory_make ("staticrender");
- g_assert (autoplug != NULL);
-
- new_element = gst_autoplug_to_renderers (autoplug, caps, osssink, NULL);
-
- if (!new_element) {
- g_print ("could not autoplug, no suitable codecs found...\n");
- exit (-1);
- }
-
- gst_element_set_name (new_element, "new_element");
-
- gst_bin_add (GST_BIN (autobin), new_element);
-
- g_object_set (G_OBJECT (cache), "reset", TRUE, NULL);
-
- gst_element_link_pads (cache, "src", new_element, "sink");
-
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
-}
-
-static void
-gst_play_cache_empty (GstElement * element, GstElement * pipeline)
-{
- GstElement *autobin;
- GstElement *filesrc;
- GstElement *cache;
- GstElement *new_element;
-
- fprintf (stderr, "have cache empty\n");
-
- gst_element_set_state (pipeline, GST_STATE_PAUSED);
-
- filesrc = gst_bin_get_by_name (GST_BIN (pipeline), "disk_source");
- autobin = gst_bin_get_by_name (GST_BIN (pipeline), "autobin");
- cache = gst_bin_get_by_name (GST_BIN (autobin), "cache");
- new_element = gst_bin_get_by_name (GST_BIN (autobin), "new_element");
-
- gst_element_unlink_pads (filesrc, "src", cache, "sink");
- gst_element_unlink_pads (cache, "src", new_element, "sink");
- gst_bin_remove (GST_BIN (autobin), cache);
- gst_element_link_pads (filesrc, "src", new_element, "sink");
-
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
-
- fprintf (stderr, "done with cache_empty\n");
-}
-
-int
-main (int argc, char *argv[])
-{
- GstElement *filesrc;
- GstElement *pipeline;
- GstElement *autobin;
- GstElement *typefind;
- GstElement *cache;
-
- gst_init (&argc, &argv);
-
- if (argc != 2) {
- g_print ("usage: %s <filename>\n", argv[0]);
- exit (-1);
- }
-
- /* create a new pipeline to hold the elements */
- pipeline = gst_pipeline_new ("pipeline");
- g_assert (pipeline != NULL);
-
- /* create a disk reader */
- filesrc = gst_element_factory_make ("filesrc", "disk_source");
- g_assert (filesrc != NULL);
- g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
- gst_bin_add (GST_BIN (pipeline), filesrc);
-
- autobin = gst_bin_new ("autobin");
- cache = gst_element_factory_make ("autoplugcache", "cache");
- g_signal_connect (G_OBJECT (cache), "cache_empty",
- G_CALLBACK (gst_play_cache_empty), pipeline);
-
- typefind = gst_element_factory_make ("typefind", "typefind");
- g_signal_connect (G_OBJECT (typefind), "have_type",
- G_CALLBACK (gst_play_have_type), pipeline);
- gst_bin_add (GST_BIN (autobin), cache);
- gst_bin_add (GST_BIN (autobin), typefind);
-
- gst_element_link_pads (cache, "src", typefind, "sink");
- gst_element_add_ghost_pad (autobin, gst_element_get_pad (cache, "sink"),
- "sink");
-
- gst_bin_add (GST_BIN (pipeline), autobin);
- gst_element_link_pads (filesrc, "src", autobin, "sink");
-
- /* start playing */
- gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
-
- while (gst_bin_iterate (GST_BIN (pipeline)));
-
- /* stop the pipeline */
- gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL);
-
- gst_object_unref (pipeline);
-
- exit (0);
-}
diff --git a/tests/old/examples/manual/.gitignore b/tests/old/examples/manual/.gitignore
deleted file mode 100644
index 964c94afd4..0000000000
--- a/tests/old/examples/manual/.gitignore
+++ /dev/null
@@ -1,39 +0,0 @@
-Makefile
-Makefile.in
-*.c
-*.o
-*.lo
-*.la
-.deps
-.libs
-
-dynamic
-elementget
-elementmake
-gnome
-fakesrc
-helloworld
-helloworld2
-init
-popt
-queue
-threads
-bin
-decodebin
-elementcreate
-elementfactory
-elementlink
-ghostpad
-pad
-playbin
-query
-typefind
-
-xml-mp3
-xml
-xmlTest.gst
-README
-
-*.bb
-*.bbg
-*.da
diff --git a/tests/old/examples/manual/Makefile.am b/tests/old/examples/manual/Makefile.am
deleted file mode 100644
index 2f2c1fb03b..0000000000
--- a/tests/old/examples/manual/Makefile.am
+++ /dev/null
@@ -1,104 +0,0 @@
-if HAVE_LIBGNOMEUI
-GNOME=gnome
-else
-GNOME=
-endif
-
-if GST_DISABLE_LOADSAVE
-GST_LOADSAVE_SRC =
-else
-GST_LOADSAVE_SRC = xml-mp3
-endif
-
-INCLUDES = $(GST_OBJ_CFLAGS)
-
-goption_CFLAGS = -DGETTEXT_PACKAGE="\"gstreamer-0.9\""
-
-#dynamic_LDADD = $(GST_OBJ_LIBS) $(LIBGNOMEUI_LIBS)
-#dynamic_CFLAGS = $(GST_OBJ_CFLAGS) $(LIBGNOMEUI_CFLAGS)
-gnome_LDADD = $(GST_OBJ_LIBS) $(LIBGNOMEUI_LIBS)
-gnome_CFLAGS = $(GST_OBJ_CFLAGS) $(LIBGNOMEUI_CFLAGS)
-
-EXTRA_DIST = extract.pl
-
-EXAMPLES = \
- bus \
- dynamic \
- $(GNOME) \
- elementcreate \
- elementmake \
- elementfactory \
- elementget \
- elementlink \
- bin \
- pad \
- ghostpad \
- helloworld \
- init \
- goption \
- query \
- typefind \
- probe \
- fakesrc \
- playbin \
- decodebin \
- $(GST_LOADSAVE_SRC)
-
-elementmake.c elementcreate.c elementget.c elementlink.c elementfactory.c: $(top_srcdir)/docs/manual/basics-elements.xml
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/manual/basics-elements.xml
-
-bin.c : $(top_srcdir)/docs/manual/basics-bins.xml
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/manual/basics-bins.xml
-
-bus.c: $(top_srcdir)/docs/manual/basics-bus.xml
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/manual/basics-bus.xml
-
-pad.c ghostpad.c: $(top_srcdir)/docs/manual/basics-pads.xml
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/manual/basics-pads.xml
-
-gnome.c: $(top_srcdir)/docs/manual/appendix-integration.xml
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/manual/appendix-integration.xml
-
-helloworld.c: $(top_srcdir)/docs/manual/basics-helloworld.xml
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/manual/basics-helloworld.xml
-
-init.c goption.c: $(top_srcdir)/docs/manual/basics-init.xml
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/manual/basics-init.xml
-
-query.c: $(top_srcdir)/docs/manual/advanced-position.xml
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/manual/advanced-position.xml
-
-typefind.c dynamic.c: $(top_srcdir)/docs/manual/advanced-autoplugging.xml
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/manual/advanced-autoplugging.xml
-
-probe.c fakesrc.c: $(top_srcdir)/docs/manual/advanced-dataaccess.xml
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/manual/advanced-dataaccess.xml
-
-playbin.c decodebin.c: $(top_srcdir)/docs/manual/highlevel-components.xml
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/manual/highlevel-components.xml
-
-xml-mp3.c: $(top_srcdir)/docs/manual/highlevel-xml.xml
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/manual/highlevel-xml.xml
-
-# we use some of the examples as testsuite apps, to verify that
-# they actually run
-include $(top_srcdir)/tests/old/testsuite/Rules
-
-tests_pass = elementmake elementget init goption
-tests_fail =
-tests_ignore =
-
-noinst_PROGRAMS = $(EXAMPLES)
-LDADD = $(GST_OBJ_LIBS)
diff --git a/tests/old/examples/manual/extract.pl b/tests/old/examples/manual/extract.pl
deleted file mode 100755
index 5c257c70a0..0000000000
--- a/tests/old/examples/manual/extract.pl
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/perl
-
-# extract code fragments from xml program listings
-# first argument: source code file to find
-# second argument: xml files to extract code from
-
-# main
-
-# decodes xml by translating &amp; &lt; &gt; back to what they should be
-# and also ignore
-# <![CDATA[ and ]]> and <!-- and -->
-sub
-xml_decode ($)
-{
- my $input = shift;
-
- $input =~ s/\&amp;/&/g;
- $input =~ s/&lt;/</g;
- $input =~ s/&gt;/>/g;
-
- if ($input =~ /<!\[CDATA\[/) { $input = ""; }
- if ($input =~ /]]>/) { $input = ""; }
- if ($input =~ /<!--/) { $input = ""; }
- if ($input =~ /-->/) { $input = ""; }
-
- #print "Returning line $input";
- return $input;
-}
-
-# main
-my $output = shift @ARGV;
-
-$found = 0;
-%blocks = ();
-
-foreach $file (@ARGV)
-{
- open FILE, $file or die "Cannot open file $file";
-
- while ($line = <FILE>)
- {
- if ($line =~ /<!-- example-begin $output (.*?)-->/)
- {
- $found = 1;
- $block_id = $1;
- $block = "\n/*** block $block_id from $file ***/\n";
-
- print "Extracting $output block $block_id from $file\n";
-
- while ($line = <FILE>)
- {
- if ($line =~ /<!-- example-end $output (.*?)-->/)
- {
- last;
- }
- $block .= xml_decode ($line);
- }
- $blocks{$block_id} = $block;
- }
- }
-}
-
-
-if (!$found)
-{
- print "Could not find $output example !\n";
- exit(1);
-}
-
-# now output all the blocks in the right order
-open OUTPUT, ">$output";
-@block_ids = keys %blocks;
-foreach $block_id (sort @block_ids)
-{
- print "Writing $output block $block_id\n";
- print OUTPUT $blocks{$block_id};
-}
-close OUTPUT;
diff --git a/tests/old/examples/mixer/.gitignore b/tests/old/examples/mixer/.gitignore
deleted file mode 100644
index 0ba0585042..0000000000
--- a/tests/old/examples/mixer/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-helloworld
-mixer
-*.bb
-*.bbg
-*.da
diff --git a/tests/old/examples/mixer/Makefile.am b/tests/old/examples/mixer/Makefile.am
deleted file mode 100644
index a1f226a00e..0000000000
--- a/tests/old/examples/mixer/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-noinst_PROGRAMS = mixer
-noinst_HEADERS = mixer.h
-
-mixer_LDADD = $(GST_OBJ_LIBS)
-mixer_CFLAGS = $(GST_OBJ_CFLAGS)
diff --git a/tests/old/examples/mixer/mixer.c b/tests/old/examples/mixer/mixer.c
deleted file mode 100644
index 0dd703a00d..0000000000
--- a/tests/old/examples/mixer/mixer.c
+++ /dev/null
@@ -1,398 +0,0 @@
-/*
- * mixer.c - stereo audio mixer - thomas@apestaart.org
- * example based on helloworld
- * demonstrates the adder plugin and the volume envelope plugin
- * work in progress but do try it out
- *
- * Latest change : 28/08/2001
- * trying to adapt to incsched
- * delayed start for channels > 1
- * now works by quickhacking the
- * adder plugin to set
- * GST_ELEMENT_COTHREAD_STOPPING
- * Version : 0.5.1
- */
-
-#include <stdlib.h>
-#include <gst/gst.h>
-#include "mixer.h"
-#include <unistd.h>
-
-/*#define WITH_BUG */
-/*#define WITH_BUG2 */
-/*#define DEBUG */
-/*#define AUTOPLUG * define if you want autoplugging of input channels * */
-/* function prototypes */
-
-input_channel_t *create_input_channel (int id, char *location);
-void destroy_input_channel (input_channel_t * pipe);
-void env_register_cp (GstElement * volenv, double cp_time, double cp_level);
-
-
-gboolean playing;
-
-
-/* eos will be called when the src element has an end of stream */
-void
-eos (GstElement * element)
-{
- g_print ("have eos, quitting ?\n");
-
-/* playing = FALSE; */
-}
-
-G_GNUC_UNUSED static GstCaps *
-gst_play_type_find (GstBin * bin, GstElement * element)
-{
- GstElement *typefind;
- GstElement *pipeline;
- GstCaps *caps = NULL;
-
- GST_DEBUG ("GstPipeline: typefind for element \"%s\"",
- GST_ELEMENT_NAME (element));
-
- pipeline = gst_pipeline_new ("autoplug_pipeline");
-
- typefind = gst_element_factory_make ("typefind", "typefind");
- g_return_val_if_fail (typefind != NULL, FALSE);
-
- gst_pad_link (gst_element_get_pad (element, "src"),
- gst_element_get_pad (typefind, "sink"));
- gst_bin_add (bin, typefind);
- gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (bin));
-
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
-
- /* push a buffer... the have_type signal handler will set the found flag */
- gst_bin_iterate (GST_BIN (pipeline));
-
- gst_element_set_state (pipeline, GST_STATE_NULL);
-
- caps = gst_pad_get_caps (gst_element_get_pad (element, "src"));
-
- gst_pad_unlink (gst_element_get_pad (element, "src"),
- gst_element_get_pad (typefind, "sink"));
- gst_bin_remove (bin, typefind);
- gst_bin_remove (GST_BIN (pipeline), GST_ELEMENT (bin));
- gst_object_unref (typefind);
- gst_object_unref (pipeline);
-
- return caps;
-}
-
-int
-main (int argc, char *argv[])
-{
- int i, j;
- int num_channels;
-
- char buffer[20];
-
- GList *input_channels; /* structure holding all the input channels */
-
- input_channel_t *channel_in;
-
- GstElement *main_bin;
- GstElement *adder;
- GstElement *audiosink;
-
- GstPad *pad; /* to request pads for the adder */
-
- gst_init (&argc, &argv);
-
- if (argc == 1) {
- g_print ("usage: %s <filename1> <filename2> <...>\n", argv[0]);
- exit (-1);
- }
- num_channels = argc - 1;
-
- /* set up output channel and main bin */
-
- /* create adder */
- adder = gst_element_factory_make ("adder", "adderel");
-
- /* create an audio sink */
- audiosink = gst_element_factory_make ("esdsink", "play_audio");
-
- /* create main bin */
- main_bin = gst_pipeline_new ("bin");
-
- /* link adder and output to bin */
- GST_INFO ("main: adding adder to bin");
- gst_bin_add (GST_BIN (main_bin), adder);
- GST_INFO ("main: adding audiosink to bin");
- gst_bin_add (GST_BIN (main_bin), audiosink);
-
- /* link adder and audiosink */
-
- gst_pad_link (gst_element_get_pad (adder, "src"),
- gst_element_get_pad (audiosink, "sink"));
-
- /* start looping */
- input_channels = NULL;
-
- for (i = 1; i < argc; ++i) {
- printf ("Opening channel %d from file %s...\n", i, argv[i]);
- channel_in = create_input_channel (i, argv[i]);
- input_channels = g_list_append (input_channels, channel_in);
-
- if (i > 1)
- gst_element_set_state (main_bin, GST_STATE_PAUSED);
- gst_bin_add (GST_BIN (main_bin), channel_in->pipe);
-
- /* request pads and link to adder */
- GST_INFO ("requesting pad\n");
- pad = gst_element_get_request_pad (adder, "sink%d");
- printf ("\tGot new adder sink pad %s\n", gst_pad_get_name (pad));
- sprintf (buffer, "channel%d", i);
- gst_pad_link (gst_element_get_pad (channel_in->pipe, buffer), pad);
-
- /* register a volume envelope */
- printf ("\tregistering volume envelope...\n");
-
- /*
- * this is the volenv :
- * each song gets a slot of 5 seconds, with a 5 second fadeout
- * at the end of that, all audio streams play simultaneously
- * at a level ensuring no distortion
- * example for three songs :
- * song1 : starts at full level, plays 5 seconds, faded out at 10 seconds,
- * sleep until 25, fade to end level at 30
- * song2 : starts silent, fades in at 5 seconds, full blast at 10 seconds,
- * full level until 15, faded out at 20, sleep until 25, fade to end at 30
- * song3 : starts muted, fades in from 15, full at 20, until 25, fade to end level
- */
-
- if (i == 1) {
- /* first song gets special treatment for end style */
- env_register_cp (channel_in->volenv, 0.0, 1.0);
- } else {
- env_register_cp (channel_in->volenv, 0.0, 0.0000001); /* start muted */
- env_register_cp (channel_in->volenv, i * 10.0 - 15.0, 0.0000001); /* start fade in */
- env_register_cp (channel_in->volenv, i * 10.0 - 10.0, 1.0);
- }
- env_register_cp (channel_in->volenv, i * 10.0 - 5.0, 1.0); /* end of full level */
-
- if (i != num_channels) {
- env_register_cp (channel_in->volenv, i * 10.0, 0.0000001); /* fade to black */
- env_register_cp (channel_in->volenv, num_channels * 10.0 - 5.0, 0.0000001); /* start fade in */
- }
- env_register_cp (channel_in->volenv, num_channels * 10.0, 1.0 / num_channels); /* to end level */
-
-#ifndef GST_DISABLE_LOADSAVE
- gst_xml_write_file (GST_ELEMENT (main_bin), fopen ("mixer.xml", "w"));
-#endif
-
- /* start playing */
- gst_element_set_state (main_bin, GST_STATE_PLAYING);
-
- /* write out the schedule */
- gst_scheduler_show (GST_ELEMENT_SCHEDULER (main_bin));
- playing = TRUE;
-
- j = 0;
- /*printf ("main: start iterating from 0"); */
- while (playing && j < 100) {
-/* printf ("main: iterating %d\n", j); */
- gst_bin_iterate (GST_BIN (main_bin));
- /*fprintf(stderr,"after iterate()\n"); */
- ++j;
- }
- }
- printf ("main: all the channels are open\n");
- while (playing) {
- gst_bin_iterate (GST_BIN (main_bin));
- /*fprintf(stderr,"after iterate()\n"); */
- }
- /* stop the bin */
- gst_element_set_state (main_bin, GST_STATE_NULL);
-
- while (input_channels) {
- destroy_input_channel (input_channels->data);
- input_channels = g_list_next (input_channels);
- }
- g_list_free (input_channels);
-
- gst_object_unref (audiosink);
-
- gst_object_unref (main_bin);
-
- exit (0);
-}
-
-input_channel_t *
-create_input_channel (int id, char *location)
-{
- /* create an input channel, reading from location
- * return a pointer to the channel
- * return NULL if failed
- */
-
- input_channel_t *channel;
-
- char buffer[20]; /* hold the names */
-
-/* GstAutoplug *autoplug;
- GstCaps *srccaps; */
- GstElement *new_element;
- GstElement *decoder;
-
- GST_DEBUG ("c_i_p : creating channel with id %d for file %s", id, location);
-
- /* allocate channel */
-
- channel = (input_channel_t *) malloc (sizeof (input_channel_t));
- if (channel == NULL) {
- printf ("create_input_channel : could not allocate memory for channel !\n");
- return NULL;
- }
-
- /* create channel */
-
- GST_DEBUG ("c_i_p : creating pipeline");
-
- sprintf (buffer, "pipeline%d", id);
- channel->pipe = gst_bin_new (buffer);
- g_assert (channel->pipe != NULL);
-
- /* create elements */
-
- GST_DEBUG ("c_i_p : creating filesrc");
-
- sprintf (buffer, "filesrc%d", id);
- channel->filesrc = gst_element_factory_make ("filesrc", buffer);
- g_assert (channel->filesrc != NULL);
-
- GST_DEBUG ("c_i_p : setting location");
- g_object_set (G_OBJECT (channel->filesrc), "location", location, NULL);
-
- /* add filesrc to the bin before autoplug */
- gst_bin_add (GST_BIN (channel->pipe), channel->filesrc);
-
- /* link signal to eos of filesrc */
- g_signal_connect (G_OBJECT (channel->filesrc), "eos", G_CALLBACK (eos), NULL);
-
-
-#ifdef DEBUG
- printf ("DEBUG : c_i_p : creating volume envelope\n");
-#endif
-
- sprintf (buffer, "volenv%d", id);
- channel->volenv = gst_element_factory_make ("volenv", buffer);
- g_assert (channel->volenv != NULL);
-
- /* autoplug the pipe */
-
-#ifdef DEBUG
- printf ("DEBUG : c_i_p : getting srccaps\n");
-#endif
-
-#ifdef WITH_BUG
- srccaps = gst_play_type_find (GST_BIN (channel->pipe), channel->filesrc);
-#endif
-#ifdef WITH_BUG2
- {
- GstElement *pipeline;
-
- pipeline = gst_pipeline_new ("autoplug_pipeline");
-
- gst_bin_add (GST_BIN (pipeline), channel->pipe);
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
- gst_element_set_state (pipeline, GST_STATE_NULL);
- gst_bin_remove (GST_BIN (pipeline), channel->pipe);
-
- }
-#endif
-
-#ifdef AUTOPLUG
- if (!srccaps) {
- g_print ("could not autoplug, unknown media type...\n");
- exit (-1);
- }
-#ifdef DEBUG
- printf ("DEBUG : c_i_p : creating autoplug\n");
-#endif
-
- autoplug = gst_autoplug_factory_make ("static");
- g_assert (autoplug != NULL);
-
-#ifdef DEBUG
- printf ("DEBUG : c_i_p : autoplugging\n");
-#endif
-
- new_element = gst_autoplug_to_caps (autoplug, srccaps,
- gst_caps_new ("audio/raw", NULL), NULL);
-
- if (!new_element) {
- g_print ("could not autoplug, no suitable codecs found...\n");
- exit (-1);
- }
-#else
-
- new_element = gst_bin_new ("autoplug_bin");
-
- /* static plug, use mad plugin and assume mp3 input */
- printf ("using static plugging for input channel\n");
- decoder = gst_element_factory_make ("mad", "mpg123");
- if (!decoder) {
- fprintf (stderr, "Could not get a decoder element !\n");
- exit (1);
- }
- gst_bin_add (GST_BIN (new_element), decoder);
-
- gst_element_add_ghost_pad (new_element,
- gst_element_get_pad (decoder, "sink"), "sink");
- gst_element_add_ghost_pad (new_element,
- gst_element_get_pad (decoder, "src"), "src_00");
-
-#endif
-#ifndef GST_DISABLE_LOADSAVE
- gst_xml_write_file (GST_ELEMENT (new_element), fopen ("mixer.gst", "w"));
-#endif
-
- gst_bin_add (GST_BIN (channel->pipe), channel->volenv);
- gst_bin_add (GST_BIN (channel->pipe), new_element);
-
- gst_element_link_pads (channel->filesrc, "src", new_element, "sink");
- gst_element_link_pads (new_element, "src_00", channel->volenv, "sink");
-
- /* add a ghost pad */
- sprintf (buffer, "channel%d", id);
- gst_element_add_ghost_pad (channel->pipe,
- gst_element_get_pad (channel->volenv, "src"), buffer);
-
-
-#ifdef DEBUG
- printf ("DEBUG : c_i_p : end function\n");
-#endif
-
- return channel;
-}
-
-void
-destroy_input_channel (input_channel_t * channel)
-{
- /*
- * destroy an input channel
- */
-
-#ifdef DEBUG
- printf ("DEBUG : d_i_p : start\n");
-#endif
-
- /* destroy elements */
-
- gst_object_unref (channel->pipe);
-
- free (channel);
-}
-
-void
-env_register_cp (GstElement * volenv, double cp_time, double cp_level)
-{
- char buffer[30];
-
- sprintf (buffer, "%f:%f", cp_time, cp_level);
- g_object_set (G_OBJECT (volenv), "controlpoint", buffer, NULL);
-
-}
diff --git a/tests/old/examples/mixer/mixer.h b/tests/old/examples/mixer/mixer.h
deleted file mode 100644
index 76e55f6ea3..0000000000
--- a/tests/old/examples/mixer/mixer.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * mixer.h header file
- * thomas@apestaart.org
- */
-
-typedef struct
-{
- GstElement *pipe, *filesrc, *volenv;
-
- char *location;
- int channel_id;
-} input_channel_t;
diff --git a/tests/old/examples/pingpong/.gitignore b/tests/old/examples/pingpong/.gitignore
deleted file mode 100644
index 53dd624638..0000000000
--- a/tests/old/examples/pingpong/.gitignore
+++ /dev/null
@@ -1,12 +0,0 @@
-Makefile
-Makefile.in
-*.o
-*.lo
-*.la
-.deps
-.libs
-
-pingpong
-*.bb
-*.bbg
-*.da
diff --git a/tests/old/examples/pingpong/Makefile.am b/tests/old/examples/pingpong/Makefile.am
deleted file mode 100644
index feaa456b6e..0000000000
--- a/tests/old/examples/pingpong/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-noinst_PROGRAMS = pingpong
-
-pingpong_LDADD = $(GST_OBJ_LIBS)
-pingpong_CFLAGS = $(GST_OBJ_CFLAGS)
-
diff --git a/tests/old/examples/pingpong/pingpong.c b/tests/old/examples/pingpong/pingpong.c
deleted file mode 100644
index 59f7be64f2..0000000000
--- a/tests/old/examples/pingpong/pingpong.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* GStreamer
- * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <gst/gst.h>
-
-static GstElement *
-make_bin (gint count)
-{
- GstElement *bin;
- GstElement *src;
- char *name;
-
- name = g_strdup_printf ("bin%d", count);
- bin = gst_bin_new (name);
- g_free (name);
-
- name = g_strdup_printf ("fakesrc%d", count);
- src = gst_element_factory_make ("fakesrc", name);
- g_free (name);
-
- gst_bin_add (GST_BIN (bin), src);
-
- gst_element_add_ghost_pad (bin, gst_element_get_pad (src, "src"), "src");
-
- return bin;
-}
-
-gint
-main (gint argc, gchar * argv[])
-{
- GstElement *pipeline;
- GstElement *aggregator, *sink;
- GstElement *bin1, *bin2;
- GstPad *pad1, *pad2;
- gint i;
-
- gst_init (&argc, &argv);
-
- pipeline = gst_pipeline_new ("main");
- g_signal_connect (pipeline, "deep_notify",
- G_CALLBACK (gst_element_default_deep_notify), NULL);
-
- aggregator = gst_element_factory_make ("aggregator", "mixer");
- sink = gst_element_factory_make ("fakesink", "sink");
-
- gst_bin_add (GST_BIN (pipeline), aggregator);
- gst_bin_add (GST_BIN (pipeline), sink);
-
- gst_element_link_pads (aggregator, "src", sink, "sink");
-
- bin1 = make_bin (1);
- pad1 = gst_element_get_request_pad (aggregator, "sink%d");
- gst_pad_link (gst_element_get_pad (bin1, "src"), pad1);
- gst_bin_add (GST_BIN (pipeline), bin1);
-
- bin2 = make_bin (2);
- pad2 = gst_element_get_request_pad (aggregator, "sink%d");
- gst_pad_link (gst_element_get_pad (bin2, "src"), pad2);
- gst_bin_add (GST_BIN (pipeline), bin2);
-
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
- i = 2;
- while (i--)
- gst_bin_iterate (GST_BIN (pipeline));
-
- g_print ("pause bin1\n");
- gst_element_set_state (bin1, GST_STATE_PAUSED);
-
- i = 4;
- while (i--)
- gst_bin_iterate (GST_BIN (pipeline));
-
- g_print ("playing bin1\n");
- gst_element_set_state (bin1, GST_STATE_PLAYING);
-
- i = 4;
- while (i--)
- gst_bin_iterate (GST_BIN (pipeline));
-
- gst_element_set_state (pipeline, GST_STATE_NULL);
-
- return 0;
-}
diff --git a/tests/old/examples/plugins/.gitignore b/tests/old/examples/plugins/.gitignore
deleted file mode 100644
index 1eec6ddd7c..0000000000
--- a/tests/old/examples/plugins/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-Makefile
-Makefile.in
-*.o
-*.lo
-*.la
-.deps
-.libs
-*.bb
-*.bbg
-*.da
diff --git a/tests/old/examples/plugins/Makefile.am b/tests/old/examples/plugins/Makefile.am
deleted file mode 100644
index 16d260df08..0000000000
--- a/tests/old/examples/plugins/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-
-plugin_LTLIBRARIES = libgstexample.la
-
-libgstexample_la_SOURCES = example.c
-libgstexample_la_CFLAGS = $(GST_OBJ_CFLAGS)
-libgstexample_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-
-noinst_HEADERS = example.h
-
-## ... but we don't want them installed so we override the install target
-install:
- @true
diff --git a/tests/old/examples/plugins/example.c b/tests/old/examples/plugins/example.c
deleted file mode 100644
index c65960dda7..0000000000
--- a/tests/old/examples/plugins/example.c
+++ /dev/null
@@ -1,426 +0,0 @@
-/* GStreamer
- * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/* First, include the header file for the plugin, to bring in the
- * object definition and other useful things.
- */
-#include <string.h>
-#include "example.h"
-
-/* The ElementDetails structure gives a human-readable description of the
- * plugin, as well as author and version data. Use the GST_ELEMENT_DETAILS
- * macro when defining it.
- */
-static GstElementDetails example_details =
-GST_ELEMENT_DETAILS ("An example plugin",
- "Example/FirstExample",
- "Shows the basic structure of a plugin",
- "your name <your.name@your.isp>");
-
-/* These are the signals that this element can fire. They are zero-
- * based because the numbers themselves are private to the object.
- * LAST_SIGNAL is used for initialization of the signal array.
- */
-enum
-{
- ASDF,
- /* FILL ME */
- LAST_SIGNAL
-};
-
-/* Arguments are identified the same way, but cannot be zero, so you
- * must leave the ARG_0 entry in as a placeholder.
- */
-enum
-{
- ARG_0,
- ARG_ACTIVE
- /* FILL ME */
-};
-
-/* The PadFactory structures describe what pads the element has or
- * can have. They can be quite complex, but for this example plugin
- * they are rather simple.
- */
-GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", /* The name of the pad */
- GST_PAD_SINK, /* Direction of the pad */
- GST_PAD_ALWAYS, /* The pad exists for every instance */
- GST_STATIC_CAPS ("unknown/unknown, " /* The MIME media type */
- "foo:int=1, " /* an integer property */
- "bar:boolean=true, " /* a boolean property */
- "baz:int={ 1, 3 }" /* a list of values */
- )
- );
-
-/* This factory is much simpler, and defines the source pad. */
-GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
- GST_PAD_SRC,
- GST_PAD_ALWAYS,
- GST_STATIC_CAPS ("unknown/unknown")
- );
-
-
-/* A number of function prototypes are given so we can refer to them later. */
-static void gst_example_class_init (GstExampleClass * klass);
-static void gst_example_init (GstExample * example);
-
-static void gst_example_chain (GstPad * pad, GstData * _data);
-
-static void gst_example_set_property (GObject * object, guint prop_id,
- const GValue * value, GParamSpec * pspec);
-static void gst_example_get_property (GObject * object, guint prop_id,
- GValue * value, GParamSpec * pspec);
-static GstStateChangeReturn gst_example_change_state (GstElement * element,
- GstStateChange transition);
-
-/* The parent class pointer needs to be kept around for some object
- * operations.
- */
-static GstElementClass *parent_class = NULL;
-
-/* This array holds the ids of the signals registered for this object.
- * The array indexes are based on the enum up above.
- */
-static guint gst_example_signals[LAST_SIGNAL] = { 0 };
-
-/* This function is used to register and subsequently return the type
- * identifier for this object class. On first invocation, it will
- * register the type, providing the name of the class, struct sizes,
- * and pointers to the various functions that define the class.
- */
-GType
-gst_example_get_type (void)
-{
- static GType example_type = 0;
-
- if (!example_type) {
- static const GTypeInfo example_info = {
- sizeof (GstExampleClass),
- NULL,
- NULL,
- (GClassInitFunc) gst_example_class_init,
- NULL,
- NULL,
- sizeof (GstExample),
- 0,
- (GInstanceInitFunc) gst_example_init,
- };
- example_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstExample", &example_info,
- 0);
- }
- return example_type;
-}
-
-/* In order to create an instance of an object, the class must be
- * initialized by this function. GObject will take care of running
- * it, based on the pointer to the function provided above.
- */
-static void
-gst_example_class_init (GstExampleClass * klass)
-{
- /* Class pointers are needed to supply pointers to the private
- * implementations of parent class methods.
- */
- GObjectClass *gobject_class;
- GstElementClass *gstelement_class;
-
- /* Since the example class contains the parent classes, you can simply
- * cast the pointer to get access to the parent classes.
- */
- gobject_class = G_OBJECT_CLASS (klass);
- gstelement_class = GST_ELEMENT_CLASS (klass);
-
- /* The parent class is needed for class method overrides. */
- parent_class = g_type_class_peek_parent (klass);
-
- /* Here we add an argument to the object. This argument is an integer,
- * and can be both read and written.
- */
- g_object_class_install_property (gobject_class, ARG_ACTIVE, g_param_spec_int ("active", "active", "active", G_MININT, G_MAXINT, 0, G_PARAM_READWRITE)); /* CHECKME */
-
- /* Here we add a signal to the object. This is a very useless signal
- * called asdf. The signal will also pass a pointer to the listeners
- * which happens to be the example element itself */
- gst_example_signals[ASDF] =
- g_signal_new ("asdf", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GstExampleClass, asdf), NULL, NULL,
- g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, GST_TYPE_EXAMPLE);
-
-
- /* The last thing is to provide the functions that implement get and set
- * of arguments.
- */
- gobject_class->set_property = gst_example_set_property;
- gobject_class->get_property = gst_example_get_property;
-
- /* we also override the default state change handler with our own
- * implementation */
- gstelement_class->change_state = gst_example_change_state;
- /* We can now provide the details for this element, that we defined earlier. */
- gst_element_class_set_details (gstelement_class, &example_details);
- /* The pad templates can be easily generated from the factories above,
- * and then added to the list of padtemplates for the class.
- */
- gst_element_class_add_pad_template (gstelement_class,
- gst_static_pad_template_get (&sink_template));
- gst_element_class_add_pad_template (gstelement_class,
- gst_static_pad_template_get (&src_template));
-}
-
-/* This function is responsible for initializing a specific instance of
- * the plugin.
- */
-static void
-gst_example_init (GstExample * example)
-{
- /* First we create the sink pad, which is the input to the element.
- * We will use the template constructed by the factory.
- */
- example->sinkpad =
- gst_pad_new_from_template (gst_static_pad_template_get (&sink_template),
- "sink");
- /* Setting the chain function allows us to supply the function that will
- * actually be performing the work. Without this, the element would do
- * nothing, with undefined results (assertion failures and such).
- */
- gst_pad_set_chain_function (example->sinkpad, gst_example_chain);
- /* We then must add this pad to the element's list of pads. The base
- * element class manages the list of pads, and provides accessors to it.
- */
- gst_element_add_pad (GST_ELEMENT (example), example->sinkpad);
-
- /* The src pad, the output of the element, is created and registered
- * in the same way, with the exception of the chain function. Source
- * pads don't have chain functions, because they can't accept buffers,
- * they only produce them.
- */
- example->srcpad =
- gst_pad_new_from_template (gst_static_pad_template_get (&src_template),
- "src");
- gst_element_add_pad (GST_ELEMENT (example), example->srcpad);
-
- /* Initialization of element's private variables. */
- example->active = FALSE;
-}
-
-/* The chain function is the heart of the element. It's where all the
- * work is done. It is passed a pointer to the pad in question, as well
- * as the buffer provided by the peer element.
- */
-static void
-gst_example_chain (GstPad * pad, GstData * _data)
-{
- GstBuffer *buf = GST_BUFFER (_data);
- GstExample *example;
- GstBuffer *outbuf;
-
- /* Some of these checks are of dubious value, since if there were not
- * already true, the chain function would never be called.
- */
- g_return_if_fail (pad != NULL);
- g_return_if_fail (GST_IS_PAD (pad));
- g_return_if_fail (buf != NULL);
-
- /* We need to get a pointer to the element this pad belongs to. */
- example = GST_EXAMPLE (gst_pad_get_parent (pad));
-
- /* A few more sanity checks to make sure that the element that owns
- * this pad is the right kind of element, in case something got confused.
- */
- g_return_if_fail (example != NULL);
- g_return_if_fail (GST_IS_EXAMPLE (example));
-
- /* If we are supposed to be doing something, here's where it happens. */
- if (example->active) {
- /* In this example we're going to copy the buffer to another one,
- * so we need to allocate a new buffer first. */
- outbuf = gst_buffer_new ();
-
- /* We need to copy the size and offset of the buffer at a minimum. */
- GST_BUFFER_SIZE (outbuf) = GST_BUFFER_SIZE (buf);
- GST_BUFFER_OFFSET (outbuf) = GST_BUFFER_OFFSET (buf);
-
- /* Then allocate the memory for the new buffer */
- GST_BUFFER_DATA (outbuf) = (guchar *) g_malloc (GST_BUFFER_SIZE (outbuf));
-
- /* Then copy the data in the incoming buffer into the new buffer. */
- memcpy (GST_BUFFER_DATA (outbuf), GST_BUFFER_DATA (buf),
- GST_BUFFER_SIZE (outbuf));
-
- /* we don't need the incomming buffer anymore so we unref it. When we are
- * the last plugin with a handle to the buffer, its memory will be freed */
- gst_buffer_unref (buf);
-
- /* When we're done with the buffer, we push it on to the next element
- * in the pipeline, through the element's source pad, which is stored
- * in the element's structure.
- */
- gst_pad_push (example->srcpad, GST_DATA (outbuf));
-
- /* For fun we'll emit our useless signal here */
- g_signal_emit (G_OBJECT (example), gst_example_signals[ASDF], 0, example);
-
- /* If we're not doing something, just send the original incoming buffer. */
- } else {
- gst_pad_push (example->srcpad, GST_DATA (buf));
- }
-}
-
-/* Properties are part of the GLib+ object system, and these functions
- * enable the element to respond to various properties.
- */
-static void
-gst_example_set_property (GObject * object, guint prop_id, const GValue * value,
- GParamSpec * pspec)
-{
- GstExample *example;
-
- g_return_if_fail (GST_IS_EXAMPLE (object));
-
- /* Get a pointer of the right type. */
- example = GST_EXAMPLE (object);
-
- /* Check the argument id to see which argument we're setting. */
- switch (prop_id) {
- case ARG_ACTIVE:
- /* Here we simply copy the value of the argument to our private
- * storage. More complex operations can be done, but beware that
- * they may occur at any time, possibly even while your chain function
- * is running, if you are using threads.
- */
- example->active = g_value_get_int (value);
- g_print ("example: set active to %d\n", example->active);
- break;
- default:
- break;
- }
-}
-
-/* The set function is simply the inverse of the get fuction. */
-static void
-gst_example_get_property (GObject * object, guint prop_id, GValue * value,
- GParamSpec * pspec)
-{
- GstExample *example;
-
- g_return_if_fail (GST_IS_EXAMPLE (object));
-
- example = GST_EXAMPLE (object);
-
- switch (prop_id) {
- case ARG_ACTIVE:
- g_value_set_int (value, example->active);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-/* This is the state change function that will be called when
- * the element goes through the different state changes.
- * The plugin can prepare itself and its internal data structures
- * in the various state transitions.
- */
-static GstStateChangeReturn
-gst_example_change_state (GstElement * element, GstStateChange transition)
-{
- GstExample *example;
-
- /* cast to our plugin */
- example = GST_EXAMPLE (element);
-
- /* we perform our actions based on the state transition
- * of the element */
- switch (transition) {
- /* The NULL to READY transition is used to
- * create threads (if any), and/or open devices */
- case GST_STATE_CHANGE_NULL_TO_READY:
- break;
- case GST_STATE_CHANGE_READY_TO_PAUSED:
- break;
- /* In the PAUSED to PLAYING state, the element should
- * prepare itself for operation or continue after a PAUSE */
- case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
- break;
- /* In the PLAYING to PAUSED state, the element should
- * PAUSE itself and make sure it can resume operation */
- case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
- break;
- /* In the PAUSED to READY state, the element should reset
- * its internal state and close any devices. */
- case GST_STATE_CHANGE_PAUSED_TO_READY:
- break;
- /* The element should free all resources, terminate threads
- * and put itself into its initial state again */
- case GST_STATE_CHANGE_READY_TO_NULL:
- break;
- }
-
- /* Then we call the parent state change handler */
- return parent_class->change_state (element, transition);
-}
-
-
-/* This is the entry into the plugin itself. When the plugin loads,
- * this function is called to register everything that the plugin provides.
- */
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
- /* We need to register each element we provide with the plugin. This consists
- * of the name of the element, a rank that gives the importance of the element
- * when compared to similar plugins and the GType identifier.
- */
- if (!gst_element_register (plugin, "example", GST_RANK_MARGINAL,
- GST_TYPE_EXAMPLE))
- return FALSE;
-
- /* Now we can return successfully. */
- return TRUE;
-
- /* At this point, the GStreamer core registers the plugin, its
- * elementfactories, padtemplates, etc., for use in your application.
- */
-}
-
-/* This structure describes the plugin to the system for dynamically loading
- * plugins, so that the version number and name can be checked in a uniform
- * way.
- *
- * The symbol pointing to this structure is the only symbol looked up when
- * loading the plugin.
- */
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, /* The major version of the core that this was built with */
- GST_VERSION_MINOR, /* The minor version of the core that this was built with */
- "example", /* The name of the plugin. This must be unique: plugins with
- * the same name will be assumed to be identical, and only
- * one will be loaded. */
- "an example plugin", /* a short description of the plugin in English */
- plugin_init, /* Pointer to the initialisation function for the plugin. */
- "0.1", /* The version number of the plugin */
- "LGPL", /* effective license the plugin can be shipped with. Must be
- * valid for all libraries it links to, too. */
- "my nifty plugin package",
- /* package this plugin belongs to. */
- "http://www.mydomain.com"
- /* originating URL for this plugin. This is the place to look
- * for updates, information and so on. */
- );
diff --git a/tests/old/examples/plugins/example.h b/tests/old/examples/plugins/example.h
deleted file mode 100644
index cfa100a666..0000000000
--- a/tests/old/examples/plugins/example.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* GStreamer
- * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-#ifndef __GST_EXAMPLE_H__
-#define __GST_EXAMPLE_H__
-
-#include <gst/gst.h>
-
-G_BEGIN_DECLS
-
-/* This is the definition of the element's object structure. */
-typedef struct _GstExample GstExample;
-
-/* The structure itself is derived from GstElement, as can be seen by the
- * fact that there's a complete instance of the GstElement structure at
- * the beginning of the object. This allows the element to be cast to
- * an Element or even an Object.
- */
-struct _GstExample {
- GstElement element;
-
- /* We need to keep track of our pads, so we do so here. */
- GstPad *sinkpad,*srcpad;
-
- /* We'll use this to decide whether to do anything to the data we get. */
- gboolean active;
-};
-
-/* The other half of the object is its class. The class also derives from
- * the same parent, though it must be the class structure this time.
- * Function pointers for polymophic methods and signals are placed in this
- * structure. */
-typedef struct _GstExampleClass GstExampleClass;
-
-struct _GstExampleClass {
- GstElementClass parent_class;
-
- /* signals */
- void (*asdf) (GstElement *element, GstExample *example);
-};
-
-/* Five standard preprocessing macros are used in the GLib object system.
- * The first uses the object's _get_type function to return the GType
- * of the object.
- */
-#define GST_TYPE_EXAMPLE \
- (gst_example_get_type())
-/* The second is a checking cast to the correct type. If the object passed
- * is not the right type, a warning will be generated on stderr.
- */
-#define GST_EXAMPLE(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_EXAMPLE,GstExample))
-/* The third is a checking cast of the class instead of the object. */
-#define GST_EXAMPLE_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_EXAMPLE,GstExampleClass))
-/* The last two simply check to see if the passed pointer is an object or
- * class of the correct type. */
-#define GST_IS_EXAMPLE(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_EXAMPLE))
-#define GST_IS_EXAMPLE_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_EXAMPLE))
-
-/* This is the only prototype needed, because it is used in the above
- * GST_TYPE_EXAMPLE macro.
- */
-GType gst_example_get_type(void);
-
-G_END_DECLS
-
-#endif /* __GST_EXAMPLE_H__ */
diff --git a/tests/old/examples/pwg/.gitignore b/tests/old/examples/pwg/.gitignore
deleted file mode 100644
index 14c2d7ac06..0000000000
--- a/tests/old/examples/pwg/.gitignore
+++ /dev/null
@@ -1,18 +0,0 @@
-boilerplate.c
-caps.func
-chain2.c
-chain.c
-chain.func
-convertcaps.c
-filter.h
-forwardcaps.c
-getcaps.c
-init.func
-pads.c
-properties.c
-range.c
-register.func
-state.c
-state.func
-task.c
-test.c
diff --git a/tests/old/examples/pwg/Makefile.am b/tests/old/examples/pwg/Makefile.am
deleted file mode 100644
index e1647ae735..0000000000
--- a/tests/old/examples/pwg/Makefile.am
+++ /dev/null
@@ -1,88 +0,0 @@
-INCLUDES = $(GST_OBJ_CFLAGS) \
- -DVERSION="\"0.0.1\""
-
-libboilerplate_la_SOURCES = boilerplate.c
-libpads_la_SOURCES = pads.c
-libchain_la_SOURCES = chain.c
-libchain2_la_SOURCES = chain2.c
-libstate_la_SOURCES = state.c
-libproperties_la_SOURCES = properties.c
-libforwardcaps_la_SOURCES = forwardcaps.c
-libconvertcaps_la_SOURCES = convertcaps.c
-libgetcaps_la_SOURCES = getcaps.c
-libtask_la_SOURCES = task.c
-librange_la_SOURCES = range.c
-DISTCLEANFILES = \
- boilerplate.c pads.c chain.c chain2.c state.c properties.c \
- forwardcaps.c convertcaps.c getcaps.c task.c range.c \
- init.func caps.func chain.func state.func register.func filter.h
-
-EXTRA_DIST = extract.pl
-
-EXAMPLES = \
- libboilerplate.la \
- libpads.la \
- libchain.la \
- libchain2.la \
- libstate.la \
- libproperties.la \
- libforwardcaps.la \
- libconvertcaps.la \
- libgetcaps.la \
- libtask.la \
- librange.la
-
-EXAMPLE_APPS = \
- test
-
-filter.h register.func: $(top_srcdir)/docs/pwg/building-boiler.xml
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/pwg/building-boiler.xml
-
-boilerplate.c: $(top_srcdir)/docs/pwg/building-boiler.xml filter.h register.func
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/pwg/building-boiler.xml
-
-caps.func init.func: $(top_srcdir)/docs/pwg/building-pads.xml filter.h
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/pwg/building-pads.xml
-
-pads.c: $(top_srcdir)/docs/pwg/building-pads.xml register.func caps.func init.func
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/pwg/building-pads.xml
-
-chain.func: $(top_srcdir)/docs/pwg/building-chainfn.xml
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/pwg/building-chainfn.xml
-
-chain.c chain2.c: $(top_srcdir)/docs/pwg/building-chainfn.xml register.func caps.func init.func chain.func
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/pwg/building-chainfn.xml
-
-state.func: $(top_srcdir)/docs/pwg/building-state.xml
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/pwg/building-state.xml
-
-state.c: $(top_srcdir)/docs/pwg/building-state.xml register.func caps.func init.func chain.func state.func
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/pwg/building-state.xml
-
-properties.c: $(top_srcdir)/docs/pwg/building-props.xml filter.h register.func
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/pwg/building-props.xml
-
-test.c: $(top_srcdir)/docs/pwg/building-testapp.xml
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/pwg/building-testapp.xml
-
-forwardcaps.c convertcaps.c getcaps.c: $(top_srcdir)/docs/pwg/advanced-negotiation.xml init.func register.func chain.func state.func
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/pwg/advanced-negotiation.xml
-
-task.c range.c: $(top_srcdir)/docs/pwg/advanced-scheduling.xml register.func
- $(PERL_PATH) $(srcdir)/extract.pl $@ \
- $(top_srcdir)/docs/pwg/advanced-scheduling.xml
-
-noinst_PROGRAMS = $(EXAMPLE_APPS)
-noinst_LTLIBRARIES = $(EXAMPLES)
-LDADD = $(GST_OBJ_LIBS)
diff --git a/tests/old/examples/pwg/extract.pl b/tests/old/examples/pwg/extract.pl
deleted file mode 100755
index 5c257c70a0..0000000000
--- a/tests/old/examples/pwg/extract.pl
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/perl
-
-# extract code fragments from xml program listings
-# first argument: source code file to find
-# second argument: xml files to extract code from
-
-# main
-
-# decodes xml by translating &amp; &lt; &gt; back to what they should be
-# and also ignore
-# <![CDATA[ and ]]> and <!-- and -->
-sub
-xml_decode ($)
-{
- my $input = shift;
-
- $input =~ s/\&amp;/&/g;
- $input =~ s/&lt;/</g;
- $input =~ s/&gt;/>/g;
-
- if ($input =~ /<!\[CDATA\[/) { $input = ""; }
- if ($input =~ /]]>/) { $input = ""; }
- if ($input =~ /<!--/) { $input = ""; }
- if ($input =~ /-->/) { $input = ""; }
-
- #print "Returning line $input";
- return $input;
-}
-
-# main
-my $output = shift @ARGV;
-
-$found = 0;
-%blocks = ();
-
-foreach $file (@ARGV)
-{
- open FILE, $file or die "Cannot open file $file";
-
- while ($line = <FILE>)
- {
- if ($line =~ /<!-- example-begin $output (.*?)-->/)
- {
- $found = 1;
- $block_id = $1;
- $block = "\n/*** block $block_id from $file ***/\n";
-
- print "Extracting $output block $block_id from $file\n";
-
- while ($line = <FILE>)
- {
- if ($line =~ /<!-- example-end $output (.*?)-->/)
- {
- last;
- }
- $block .= xml_decode ($line);
- }
- $blocks{$block_id} = $block;
- }
- }
-}
-
-
-if (!$found)
-{
- print "Could not find $output example !\n";
- exit(1);
-}
-
-# now output all the blocks in the right order
-open OUTPUT, ">$output";
-@block_ids = keys %blocks;
-foreach $block_id (sort @block_ids)
-{
- print "Writing $output block $block_id\n";
- print OUTPUT $blocks{$block_id};
-}
-close OUTPUT;
diff --git a/tests/old/examples/queue2/.gitignore b/tests/old/examples/queue2/.gitignore
deleted file mode 100644
index fcbde93534..0000000000
--- a/tests/old/examples/queue2/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-queue2
-*.bb
-*.bbg
-*.da
diff --git a/tests/old/examples/queue2/Makefile.am b/tests/old/examples/queue2/Makefile.am
deleted file mode 100644
index 5b2aa36b49..0000000000
--- a/tests/old/examples/queue2/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-noinst_PROGRAMS = queue2
-
-queue2_LDADD = $(GST_OBJ_LIBS)
-queue2_CFLAGS = $(GST_OBJ_CFLAGS)
-
diff --git a/tests/old/examples/queue2/queue2.c b/tests/old/examples/queue2/queue2.c
deleted file mode 100644
index 49b67ff459..0000000000
--- a/tests/old/examples/queue2/queue2.c
+++ /dev/null
@@ -1,76 +0,0 @@
-#include <stdlib.h>
-#include <gst/gst.h>
-
-gboolean playing;
-
-/* eos will be called when the src element has an end of stream */
-void
-eos (GstElement * element, gpointer data)
-{
- g_print ("have eos, quitting\n");
-
- playing = FALSE;
-}
-
-int
-main (int argc, char *argv[])
-{
- GstElement *filesrc, *audiosink, *queue;
- GstElement *pipeline;
-
- gst_init (&argc, &argv);
-
- if (argc != 2) {
- g_print ("usage: %s <filename>\n", argv[0]);
- exit (-1);
- }
-
- /* create a new bin to hold the elements */
- pipeline = gst_pipeline_new ("pipeline");
- g_assert (pipeline != NULL);
-
- /* create a disk reader */
- filesrc = gst_element_factory_make ("filesrc", "disk_source");
- g_assert (filesrc != NULL);
- g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
- g_signal_connect (G_OBJECT (filesrc), "eos", G_CALLBACK (eos), thread);
-
- queue = gst_element_factory_make ("queue", "queue");
-
- /* and an audio sink */
- audiosink = gst_element_factory_make ("alsasink", "play_audio");
- g_assert (audiosink != NULL);
-
- /* add objects to the main pipeline */
- /*
- gst_pipeline_add_src(GST_PIPELINE(pipeline), filesrc);
- gst_pipeline_add_sink(GST_PIPELINE(pipeline), queue);
-
- gst_bin_add(GST_BIN (pipeline), audiosink);
-
- gst_pad_link(gst_element_get_pad(queue,"src"),
- gst_element_get_pad(audiosink,"sink"));
-
- if (!gst_pipeline_autoplug(GST_PIPELINE(pipeline))) {
- g_print("cannot autoplug pipeline\n");
- exit(-1);
- }
- */
-
- gst_bin_add (GST_BIN (pipeline), thread);
-
- /* make it ready */
- gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_READY);
- /* start playing */
- gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
-
- playing = TRUE;
-
- while (playing) {
- gst_bin_iterate (GST_BIN (pipeline));
- }
-
- gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL);
-
- exit (0);
-}
diff --git a/tests/old/examples/queue3/.gitignore b/tests/old/examples/queue3/.gitignore
deleted file mode 100644
index 7e70b37ffc..0000000000
--- a/tests/old/examples/queue3/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-queue3
-*.bb
-*.bbg
-*.da
diff --git a/tests/old/examples/queue3/Makefile.am b/tests/old/examples/queue3/Makefile.am
deleted file mode 100644
index f229f3f152..0000000000
--- a/tests/old/examples/queue3/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-noinst_PROGRAMS = queue3
-
-queue3_LDADD = $(GST_OBJ_LIBS)
-queue3_CFLAGS = $(GST_OBJ_CFLAGS)
-
diff --git a/tests/old/examples/queue3/queue3.c b/tests/old/examples/queue3/queue3.c
deleted file mode 100644
index 3a17854d7d..0000000000
--- a/tests/old/examples/queue3/queue3.c
+++ /dev/null
@@ -1,76 +0,0 @@
-#include <stdlib.h>
-#include <gst/gst.h>
-
-gboolean playing;
-
-/* eos will be called when the src element has an end of stream */
-void
-eos (GstElement * element, gpointer data)
-{
- g_print ("have eos, quitting\n");
-
- playing = FALSE;
-}
-
-int
-main (int argc, char *argv[])
-{
- GstElement *filesrc, *osssink, *queue, *parse, *decode;
- GstElement *bin;
- GstElement *thread;
-
- gst_init (&argc, &argv);
-
- if (argc != 2) {
- g_print ("usage: %s <filename>\n", argv[0]);
- exit (-1);
- }
-
- /* create a new thread to hold the elements */
- thread = gst_thread_new ("thread");
- g_assert (thread != NULL);
-
- /* create a new bin to hold the elements */
- bin = gst_bin_new ("bin");
- g_assert (bin != NULL);
-
- /* create a disk reader */
- filesrc = gst_element_factory_make ("filesrc", "disk_source");
- g_assert (filesrc != NULL);
- g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
- g_signal_connect (G_OBJECT (filesrc), "eos", G_CALLBACK (eos), thread);
-
- queue = gst_element_factory_make ("queue", "queue");
-
- /* and an audio sink */
- osssink = gst_element_factory_make ("osssink", "play_audio");
- g_assert (osssink != NULL);
-
- parse = gst_element_factory_make ("mp3parse", "parse");
- decode = gst_element_factory_make ("mpg123", "decode");
-
- /* add objects to the main bin */
- gst_bin_add (GST_BIN (bin), filesrc);
- gst_bin_add (GST_BIN (bin), queue);
-
- gst_bin_add (GST_BIN (thread), parse);
- gst_bin_add (GST_BIN (thread), decode);
- gst_bin_add (GST_BIN (thread), osssink);
-
- gst_element_link_many (filesrc, queue, parse, decode, osssink, NULL);
-
- /* make it ready */
- gst_element_set_state (GST_ELEMENT (bin), GST_STATE_READY);
- /* start playing */
- gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING);
-
- playing = TRUE;
-
- while (playing) {
- gst_bin_iterate (GST_BIN (bin));
- }
-
- gst_element_set_state (GST_ELEMENT (bin), GST_STATE_NULL);
-
- exit (0);
-}
diff --git a/tests/old/examples/queue4/.gitignore b/tests/old/examples/queue4/.gitignore
deleted file mode 100644
index 7e190c534c..0000000000
--- a/tests/old/examples/queue4/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-queue4
-*.bb
-*.bbg
-*.da
diff --git a/tests/old/examples/queue4/Makefile.am b/tests/old/examples/queue4/Makefile.am
deleted file mode 100644
index 9b3911de8e..0000000000
--- a/tests/old/examples/queue4/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-noinst_PROGRAMS = queue4
-
-queue4_LDADD = $(GST_OBJ_LIBS)
-queue4_CFLAGS = $(GST_OBJ_CFLAGS)
-
diff --git a/tests/old/examples/queue4/queue4.c b/tests/old/examples/queue4/queue4.c
deleted file mode 100644
index 8ea60d89e7..0000000000
--- a/tests/old/examples/queue4/queue4.c
+++ /dev/null
@@ -1,84 +0,0 @@
-#include <stdlib.h>
-#include <gst/gst.h>
-
-gboolean playing;
-
-/* eos will be called when the src element has an end of stream */
-void
-eos (GstElement * element, gpointer data)
-{
- g_print ("have eos, quitting\n");
-
- playing = FALSE;
-}
-
-int
-main (int argc, char *argv[])
-{
- GstElement *filesrc, *osssink, *queue, *queue2, *parse, *decode;
- GstElement *bin;
- GstElement *thread, *thread2;
-
- gst_init (&argc, &argv);
-
- if (argc != 2) {
- g_print ("usage: %s <filename>\n", argv[0]);
- exit (-1);
- }
-
- /* create a new thread to hold the elements */
- thread = gst_thread_new ("thread");
- g_assert (thread != NULL);
- thread2 = gst_thread_new ("thread2");
- g_assert (thread2 != NULL);
-
- /* create a new bin to hold the elements */
- bin = gst_bin_new ("bin");
- g_assert (bin != NULL);
-
- /* create a disk reader */
- filesrc = gst_element_factory_make ("filesrc", "disk_source");
- g_assert (filesrc != NULL);
- g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
- g_signal_connect (G_OBJECT (filesrc), "eos", G_CALLBACK (eos), thread);
-
- queue = gst_element_factory_make ("queue", "queue");
- queue2 = gst_element_factory_make ("queue", "queue2");
-
- /* and an audio sink */
- osssink = gst_element_factory_make ("osssink", "play_audio");
- g_assert (osssink != NULL);
-
- parse = gst_element_factory_make ("mp3parse", "parse");
- decode = gst_element_factory_make ("mpg123", "decode");
-
- /* add objects to the main bin */
- gst_bin_add (GST_BIN (bin), filesrc);
- gst_bin_add (GST_BIN (bin), queue);
-
- gst_bin_add (GST_BIN (thread), parse);
- gst_bin_add (GST_BIN (thread), decode);
- gst_bin_add (GST_BIN (thread), queue2);
-
- gst_bin_add (GST_BIN (thread2), osssink);
-
- gst_element_link_many (filesrc, queue, parse, decode, queue2, osssink, NULL);
-
- gst_bin_add (GST_BIN (bin), thread);
- gst_bin_add (GST_BIN (bin), thread2);
-
- /* make it ready */
- gst_element_set_state (GST_ELEMENT (bin), GST_STATE_READY);
- /* start playing */
- gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING);
-
- playing = TRUE;
-
- while (playing) {
- gst_bin_iterate (GST_BIN (bin));
- }
-
- gst_element_set_state (GST_ELEMENT (bin), GST_STATE_NULL);
-
- exit (0);
-}
diff --git a/tests/old/examples/retag/.gitignore b/tests/old/examples/retag/.gitignore
deleted file mode 100644
index 1948113728..0000000000
--- a/tests/old/examples/retag/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-retag
-transcode
-*.bb
-*.bbg
-*.da
diff --git a/tests/old/examples/retag/Makefile.am b/tests/old/examples/retag/Makefile.am
deleted file mode 100644
index 9e9e8cd71c..0000000000
--- a/tests/old/examples/retag/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-noinst_PROGRAMS = retag transcode
-
-retag_LDADD = $(GST_OBJ_LIBS)
-retag_CFLAGS = $(GST_OBJ_CFLAGS)
-
-transcode_LDADD = $(GST_OBJ_LIBS)
-transcode_CFLAGS = $(GST_OBJ_CFLAGS)
diff --git a/tests/old/examples/retag/retag.c b/tests/old/examples/retag/retag.c
deleted file mode 100644
index 668da88af8..0000000000
--- a/tests/old/examples/retag/retag.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * This example shows how to use interfaces and the tag subsystem.
- * It takes an mp3 file as input, and makes an ogg file out of it. While doing
- * this, it parses the filename and sets artist and title in the ogg file.
- * It assumes the filename to be "<artist> - <title>.mp3"
- *
- * Run the program as "retag <mp3 file>"
- *
- * To run this program, you need to have the gst-plugins package (specifically
- * the vorbis and mad plugins) installed.
- */
-
-/* main header */
-#include <gst/gst.h>
-/* and a header we need for the string manipulation */
-#include <string.h>
-
-int
-main (int argc, char *argv[])
-{
- GstElement *bin, *filesrc, *tag_changer, *filesink;
- gchar *artist, *title, *ext, *filename;
-
- /* initialize GStreamer */
- gst_init (&argc, &argv);
-
- /* check that the argument is there */
- if (argc != 2) {
- g_print ("usage: %s <mp3 file>\n", argv[0]);
- return 1;
- }
-
- /* parse the mp3 name */
- artist = strrchr (argv[1], '/');
- if (artist == NULL)
- artist = argv[1];
- artist = g_strdup (artist);
- ext = strrchr (artist, '.');
- if (ext)
- *ext = '\0';
- title = strstr (artist, " - ");
- if (title == NULL) {
- g_print ("The format of the mp3 file is invalid.\n");
- return 1;
- }
- *title = '\0';
- title += 3;
-
-
- /* create a new bin to hold the elements */
- bin = gst_pipeline_new ("pipeline");
- g_assert (bin);
-
- /* create a file reader */
- filesrc = gst_element_factory_make ("filesrc", "disk_source");
- g_assert (filesrc);
-
- /* now it's time to get the tag_changer */
- tag_changer = gst_element_factory_make ("id3tag", "tag_changer");
- if (!tag_changer) {
- g_print ("could not find plugin \"mad\"");
- return 1;
- }
-
- /* and a file writer */
- filesink = gst_element_factory_make ("filesink", "filesink");
- g_assert (filesink);
-
- /* set the filenames */
- filename = g_strdup_printf ("%s.temp", argv[1]); /* easy solution */
- g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
- g_object_set (G_OBJECT (filesink), "location", filename, NULL);
-
- /* make sure the tag setter uses our stuff
- (though that should already be default) */
- gst_tag_setter_set_merge_mode (GST_TAG_SETTER (tag_changer),
- GST_TAG_MERGE_KEEP);
- /* set the tagging information */
- gst_tag_setter_add (GST_TAG_SETTER (tag_changer), GST_TAG_MERGE_REPLACE,
- GST_TAG_ARTIST, artist, GST_TAG_TITLE, title, NULL);
-
- /* add objects to the main pipeline */
- gst_bin_add_many (GST_BIN (bin), filesrc, tag_changer, filesink, NULL);
-
- /* link the elements */
- if (!gst_element_link_many (filesrc, tag_changer, filesink, NULL))
- g_assert_not_reached ();
-
- /* start playing */
- gst_element_set_state (bin, GST_STATE_PLAYING);
-
- while (gst_bin_iterate (GST_BIN (bin)));
-
- /* stop the bin */
- gst_element_set_state (bin, GST_STATE_NULL);
-
- /* rename the file to the correct name and remove the old one */
- remove (argv[1]);
- rename (filename, argv[1]);
- g_free (filename);
-
- return 0;
-}
diff --git a/tests/old/examples/retag/transcode.c b/tests/old/examples/retag/transcode.c
deleted file mode 100644
index e818b89f32..0000000000
--- a/tests/old/examples/retag/transcode.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * This example shows how to use interfaces and the tag subsystem.
- * It takes an mp3 file as input, and makes an ogg file out of it. While doing
- * this, it parses the filename and sets artist and title in the ogg file.
- * It assumes the filename to be "<artist> - <title>.mp3"
- *
- * Run the program as "transcode <mp3 file>"
- *
- * To run this program, you need to have the gst-plugins package (specifically
- * the vorbis and mad plugins) installed.
- */
-
-/* main header */
-#include <gst/gst.h>
-/* and a header we need for the string manipulation */
-#include <string.h>
-
-int
-main (int argc, char *argv[])
-{
- GstElement *bin, *filesrc, *decoder, *encoder, *filesink;
- gchar *artist, *title, *ext, *filename;
-
- /* initialize GStreamer */
- gst_init (&argc, &argv);
-
- /* check that the argument is there */
- if (argc != 2) {
- g_print ("usage: %s <mp3 file>\n", argv[0]);
- return 1;
- }
-
- /* parse the mp3 name */
- artist = strrchr (argv[1], '/');
- if (artist == NULL)
- artist = argv[1];
- artist = g_strdup (artist);
- ext = strrchr (artist, '.');
- if (ext)
- *ext = '\0';
- title = strstr (artist, " - ");
- if (title == NULL) {
- g_print ("The format of the mp3 file is invalid.\n");
- g_print ("It needs to be in the form of artist - title.mp3.\n");
- return 1;
- }
- *title = '\0';
- title += 3;
-
-
- /* create a new bin to hold the elements */
- bin = gst_pipeline_new ("pipeline");
- g_assert (bin);
-
- /* create a file reader */
- filesrc = gst_element_factory_make ("filesrc", "disk_source");
- g_assert (filesrc);
-
- /* now it's time to get the decoder */
- decoder = gst_element_factory_make ("mad", "decode");
- if (!decoder) {
- g_print ("could not find plugin \"mad\"");
- return 1;
- }
-
- /* create the encoder */
- encoder = gst_element_factory_make ("vorbisenc", "encoder");
- if (!encoder) {
- g_print ("cound not find plugin \"vorbisenc\"");
- return 1;
- }
-
- /* and a file writer */
- filesink = gst_element_factory_make ("filesink", "filesink");
- g_assert (filesink);
-
- /* set the filenames */
- filename = g_strdup_printf ("%s.ogg", argv[1]); /* easy solution */
- g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
- g_object_set (G_OBJECT (filesink), "location", filename, NULL);
- g_free (filename);
-
- /* make sure the tag setter uses our stuff
- (though that should already be default) */
- gst_tag_setter_set_merge_mode (GST_TAG_SETTER (encoder), GST_TAG_MERGE_KEEP);
- /* set the tagging information */
- gst_tag_setter_add (GST_TAG_SETTER (encoder), GST_TAG_MERGE_REPLACE,
- GST_TAG_ARTIST, artist, GST_TAG_TITLE, title, NULL);
-
- /* add objects to the main pipeline */
- gst_bin_add_many (GST_BIN (bin), filesrc, decoder, encoder, filesink, NULL);
-
- /* link the elements */
- gst_element_link_many (filesrc, decoder, encoder, filesink, NULL);
-
- /* start playing */
- gst_element_set_state (bin, GST_STATE_PLAYING);
-
- while (gst_bin_iterate (GST_BIN (bin)));
-
- /* stop the bin */
- gst_element_set_state (bin, GST_STATE_NULL);
-
- return 0;
-}
diff --git a/tests/old/examples/thread/.gitignore b/tests/old/examples/thread/.gitignore
deleted file mode 100644
index 74051926de..0000000000
--- a/tests/old/examples/thread/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-thread
-*.bb
-*.bbg
-*.da
diff --git a/tests/old/examples/thread/Makefile.am b/tests/old/examples/thread/Makefile.am
deleted file mode 100644
index 86a7c19abf..0000000000
--- a/tests/old/examples/thread/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-noinst_PROGRAMS = thread
-
-thread_LDADD = $(GST_OBJ_LIBS)
-thread_CFLAGS = $(GST_OBJ_CFLAGS)
-
diff --git a/tests/old/examples/thread/thread.c b/tests/old/examples/thread/thread.c
deleted file mode 100644
index 6de6692a6e..0000000000
--- a/tests/old/examples/thread/thread.c
+++ /dev/null
@@ -1,79 +0,0 @@
-#include <stdlib.h>
-#include <gst/gst.h>
-
-static GMainLoop *loop;
-
-/* eos will be called when the src element has an end of stream */
-void
-eos (GstElement * element, gpointer data)
-{
- GstThread *thread = GST_THREAD (data);
-
- g_print ("have eos, quitting\n");
-
- /* stop the bin */
- gst_element_set_state (GST_ELEMENT (thread), GST_STATE_NULL);
-
- g_main_loop_quit (loop);
- g_main_loop_unref (loop);
-}
-
-int
-main (int argc, char *argv[])
-{
- GstElement *filesrc, *osssink;
- GstElement *pipeline;
- GstElement *thread;
-
- gst_init (&argc, &argv);
-
- if (argc != 2) {
- g_print ("usage: %s <filename>\n", argv[0]);
- exit (-1);
- }
-
- /* create a new thread to hold the elements */
- thread = gst_thread_new ("thread");
- g_assert (thread != NULL);
-
- /* create a new bin to hold the elements */
- pipeline = gst_pipeline_new ("pipeline");
- g_assert (pipeline != NULL);
-
- /* create a disk reader */
- filesrc = gst_element_factory_make ("filesrc", "disk_source");
- g_assert (filesrc != NULL);
- g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
- g_signal_connect (G_OBJECT (filesrc), "eos", G_CALLBACK (eos), thread);
-
- /* and an audio sink */
- osssink = gst_element_factory_make ("osssink", "play_audio");
- g_assert (osssink != NULL);
-
- /* add objects to the main pipeline */
- /*
- gst_pipeline_add_src(GST_PIPELINE(pipeline), filesrc);
- gst_pipeline_add_sink(GST_PIPELINE(pipeline), osssink);
-
- if (!gst_pipeline_autoplug(GST_PIPELINE(pipeline))) {
- g_print("unable to handle stream\n");
- exit(-1);
- }
- */
-
- /*gst_bin_remove(GST_BIN(pipeline), filesrc); */
-
- /*gst_bin_add(GST_BIN(thread), filesrc); */
- gst_bin_add (GST_BIN (thread), GST_ELEMENT (pipeline));
-
- /* make it ready */
- gst_element_set_state (GST_ELEMENT (thread), GST_STATE_READY);
- /* start playing */
- gst_element_set_state (GST_ELEMENT (thread), GST_STATE_PLAYING);
-
- loop = g_main_loop_new (NULL, FALSE);
-
- gst_object_unref (thread);
-
- exit (0);
-}
diff --git a/tests/old/testsuite/.gitignore b/tests/old/testsuite/.gitignore
deleted file mode 100644
index 4fa802d8bf..0000000000
--- a/tests/old/testsuite/.gitignore
+++ /dev/null
@@ -1,14 +0,0 @@
-Makefile
-Makefile.in
-*.o
-*.lo
-*.la
-.deps
-.libs
-test-registry.xml
-elementstest-registry.xml
-threadstest-registry.xml
-*.bb
-*.bbg
-*.da
-test_gst_init
diff --git a/tests/old/testsuite/Makefile.am b/tests/old/testsuite/Makefile.am
deleted file mode 100644
index 58308989ed..0000000000
--- a/tests/old/testsuite/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-include Rules
-
-
-if GST_DISABLE_PARSE
-GST_PARSE_DIRS =
-else
-GST_PARSE_DIRS = parse
-endif
-
-if GST_DISABLE_GST_DEBUG
-GST_DEBUG_DIRS =
-else
-GST_DEBUG_DIRS = debug
-endif
-
-SUBDIRS = \
- caps \
- $(GST_DEBUG_DIRS) \
- dlopen \
- elements indexers \
- $(GST_PARSE_DIRS) \
- plugin refcounting states threads
-
-DIST_SUBDIRS = \
- caps \
- debug \
- dlopen \
- elements indexers \
- parse \
- plugin refcounting states threads
-
-tests_pass =
-tests_fail =
-tests_ignore =
-
-# we makes them, we gots to clean them
-CLEANFILES += test-registry.xml
-
diff --git a/tests/old/testsuite/Rules b/tests/old/testsuite/Rules
deleted file mode 100644
index 6eda0d4191..0000000000
--- a/tests/old/testsuite/Rules
+++ /dev/null
@@ -1,33 +0,0 @@
-
-TESTS_ENVIRONMENT=\
- G_DEBUG=fatal_warnings \
- GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/testsuite \
- GST_REGISTRY=$(top_builddir)/testsuite/test-registry.xml
-
-
-plugindir = $(libdir)/gstreamer-@GST_MAJORMINOR@
-
-check_PROGRAMS = $(tests_pass) $(tests_fail) $(tests_ignore)
-
-# make all tests depend on the versioned gst-register
-$(tests_pass) $(tests_fail): $(top_builddir)/tools/gst-register-@GST_MAJORMINOR@
-
-# rebuild gst-register-@GST_MAJORMINOR@ if needed
-# the EXEEXT is because am 1.6 complained about overrides
-$(top_builddir)/tools/gst-register-@GST_MAJORMINOR@$(EXEEXT):
- cd $(top_builddir)/tools && make
-
-TESTS = $(top_builddir)/tools/gst-register-@GST_MAJORMINOR@ \
- $(tests_pass) $(tests_fail)
-XFAIL_TESTS = $(tests_fail)
-
-AM_CFLAGS = $(GST_OBJ_CFLAGS)
-LIBS = $(GST_OBJ_LIBS)
-
-# override to _not_ install the test plugins
-install-pluginLTLIBRARIES:
-
-# This rule is here so make distcheck works on machines where core
-# dumps have PIDs appended
-CLEANFILES = core.*
-
diff --git a/tests/old/testsuite/caps/.gitignore b/tests/old/testsuite/caps/.gitignore
deleted file mode 100644
index 5419534b31..0000000000
--- a/tests/old/testsuite/caps/.gitignore
+++ /dev/null
@@ -1,36 +0,0 @@
-Makefile
-Makefile.in
-*.o
-*.lo
-*.la
-*.bb
-*.bbg
-*.da
-.deps
-.libs
-
-app_fixate
-audioscale
-caps
-compatibility
-deserialize
-enumcaps
-eratosthenes
-filtercaps
-fixed
-fraction-convert
-fraction-multiply-and-zero
-intersect2
-intersection
-normalisation
-random
-renegotiate
-union
-simplify
-sets
-string-conversions
-structure
-subtract
-value_compare
-value_intersect
-value_serialize
diff --git a/tests/old/testsuite/caps/Makefile.am b/tests/old/testsuite/caps/Makefile.am
deleted file mode 100644
index c5752bf56d..0000000000
--- a/tests/old/testsuite/caps/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-include ../Rules
-
-tests_pass = \
- app_fixate \
- enumcaps \
- intersection \
- compatibility \
- deserialize \
- normalisation \
- union \
- string-conversions \
- fixed \
- fraction-convert \
- fraction-multiply-and-zero \
- intersect2 \
- caps \
- audioscale \
- filtercaps \
- eratosthenes \
- renegotiate \
- subtract \
- sets \
- simplify \
- random \
- structure
-
-EXTRA_DIST = caps_strings
-
-noinst_HEADERS = \
- caps.h
-
-tests_fail =
-tests_ignore =
diff --git a/tests/old/testsuite/caps/app_fixate.c b/tests/old/testsuite/caps/app_fixate.c
deleted file mode 100644
index 52658e7ee2..0000000000
--- a/tests/old/testsuite/caps/app_fixate.c
+++ /dev/null
@@ -1,51 +0,0 @@
-
-#include <gst/gst.h>
-
-
-static GstCaps *
-handler (GObject * object, GstCaps * caps, gpointer user_data)
-{
- g_print ("in handler %p, %p, %p\n", object, caps, user_data);
-
- g_assert (GST_IS_PAD (object));
-
- g_print ("caps: %s\n", gst_caps_to_string (caps));
-
- if (gst_caps_is_any (caps)) {
- return gst_caps_new_simple ("application/x-foo",
- "field", GST_TYPE_INT_RANGE, 1, 10, NULL);
- }
-
- return NULL;
-}
-
-
-int
-main (int argc, char *argv[])
-{
- GstElement *a;
- GstElement *b;
- GstElement *pipeline;
- GstPad *pad;
-
- gst_init (&argc, &argv);
-
- pipeline = gst_pipeline_new (NULL);
-
- a = gst_element_factory_make ("fakesrc", NULL);
- g_assert (a);
- b = gst_element_factory_make ("fakesink", NULL);
- g_assert (b);
-
- gst_bin_add_many (GST_BIN (pipeline), a, b, NULL);
- gst_element_link (a, b);
-
- pad = gst_element_get_pad (a, "src");
- g_signal_connect (G_OBJECT (pad), "fixate", G_CALLBACK (handler),
- (void *) 0xdeadbeef);
-
- gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
-
-
- return 0;
-}
diff --git a/tests/old/testsuite/caps/audioscale.c b/tests/old/testsuite/caps/audioscale.c
deleted file mode 100644
index 1dd8ad1050..0000000000
--- a/tests/old/testsuite/caps/audioscale.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/* GStreamer
- * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-/* Element-Checklist-Version: 5 */
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <string.h>
-#include <math.h>
-
-#include <gst/gst.h>
-
-
-static void
-gst_audioscale_expand_value (GValue * dest, const GValue * src)
-{
- int rate_min, rate_max;
-
- if (G_VALUE_TYPE (src) == G_TYPE_INT ||
- G_VALUE_TYPE (src) == GST_TYPE_INT_RANGE) {
- if (G_VALUE_TYPE (src) == G_TYPE_INT) {
- rate_min = g_value_get_int (src);
- rate_max = rate_min;
- } else {
- rate_min = gst_value_get_int_range_min (src);
- rate_max = gst_value_get_int_range_max (src);
- }
-
- rate_min /= 2;
- if (rate_min < 1)
- rate_min = 1;
- if (rate_max < G_MAXINT / 2) {
- rate_max *= 2;
- } else {
- rate_max = G_MAXINT;
- }
-
- g_value_init (dest, GST_TYPE_INT_RANGE);
- gst_value_set_int_range (dest, rate_min, rate_max);
- return;
- }
-
- if (G_VALUE_TYPE (src) == GST_TYPE_LIST) {
- int i;
-
- g_value_init (dest, GST_TYPE_LIST);
- for (i = 0; i < gst_value_list_get_size (src); i++) {
- const GValue *s = gst_value_list_get_value (src, i);
- GValue d = { 0 };
- int j;
-
- gst_audioscale_expand_value (&d, s);
-
- for (j = 0; j < gst_value_list_get_size (dest); j++) {
- const GValue *s2 = gst_value_list_get_value (dest, j);
- GValue d2 = { 0 };
-
- gst_value_union (&d2, &d, s2);
- if (G_VALUE_TYPE (&d2) == GST_TYPE_INT_RANGE) {
- g_value_unset ((GValue *) s2);
- gst_value_init_and_copy ((GValue *) s2, &d2);
- break;
- }
- g_value_unset (&d2);
- }
- if (j == gst_value_list_get_size (dest)) {
- gst_value_list_append_value (dest, &d);
- }
- g_value_unset (&d);
- }
-
- if (gst_value_list_get_size (dest) == 1) {
- const GValue *s = gst_value_list_get_value (dest, 0);
- GValue d = { 0 };
-
- gst_value_init_and_copy (&d, s);
- g_value_unset (dest);
- gst_value_init_and_copy (dest, &d);
- g_value_unset (&d);
- }
-
- return;
- }
-
- GST_ERROR ("unexpected value type");
-}
-
-static GstCaps *
-gst_audioscale_getcaps (const GstCaps * othercaps)
-{
- GstCaps *caps;
- int i;
-
- caps = gst_caps_copy (othercaps);
-
- /* we do this hack, because the audioscale lib doesn't handle
- * rate conversions larger than a factor of 2 */
- for (i = 0; i < gst_caps_get_size (caps); i++) {
- GstStructure *structure = gst_caps_get_structure (caps, i);
- const GValue *value;
- GValue dest = { 0 };
-
- value = gst_structure_get_value (structure, "rate");
- if (value == NULL) {
- GST_ERROR ("caps structure doesn't have required rate field");
- return NULL;
- }
-
- gst_audioscale_expand_value (&dest, value);
-
- gst_structure_set_value (structure, "rate", &dest);
- }
-
- return caps;
-}
-
-
-void
-test_caps (const char *s)
-{
- GstCaps *caps;
- GstCaps *caps2;
- char *s2;
-
- caps = gst_caps_from_string (s);
- caps2 = gst_audioscale_getcaps (caps);
- s2 = gst_caps_to_string (caps2);
-
- g_print ("original: %s\nfiltered: %s\n\n", s, s2);
-
- g_free (s2);
- gst_caps_unref (caps);
- gst_caps_unref (caps2);
-}
-
-
-int
-main (int argc, char *argv[])
-{
-
- gst_init (&argc, &argv);
-
- test_caps ("audio/x-raw-int, rate=(int)1");
- test_caps ("audio/x-raw-int, rate=(int)10");
- test_caps ("audio/x-raw-int, rate=(int)100");
- test_caps ("audio/x-raw-int, rate=(int)10000");
- test_caps ("audio/x-raw-int, rate=(int)2000000000");
-
- test_caps ("audio/x-raw-int, rate=(int)[1,100]");
- test_caps ("audio/x-raw-int, rate=(int)[1000,40000]");
-
- test_caps ("audio/x-raw-int, rate=(int){1,100}");
- test_caps ("audio/x-raw-int, rate=(int){100,200,300}");
- test_caps ("audio/x-raw-int, rate=(int){[100,200],1000}");
-
- return 0;
-}
diff --git a/tests/old/testsuite/caps/caps.c b/tests/old/testsuite/caps/caps.c
deleted file mode 100644
index bf8cabbfaa..0000000000
--- a/tests/old/testsuite/caps/caps.c
+++ /dev/null
@@ -1,159 +0,0 @@
-
-#include <gst/gst.h>
-
-
-void
-test1 (void)
-{
- GstCaps *caps;
- GstCaps *caps2;
-
- g_print ("type is %d\n", (int) gst_caps_get_type ());
-
- caps = gst_caps_new_empty ();
- g_assert (caps != NULL);
- gst_caps_unref (caps);
-
- caps = gst_caps_new_any ();
- g_assert (caps != NULL);
- gst_caps_unref (caps);
-
- caps = gst_caps_new_simple ("audio/raw", "_int", G_TYPE_INT, 100, NULL);
- g_assert (caps != NULL);
- g_assert (gst_caps_is_empty (caps) == FALSE);
- g_assert (gst_caps_is_any (caps) == FALSE);
- g_assert (GST_CAPS_IS_SIMPLE (caps) == TRUE);
- g_assert (gst_caps_is_fixed (caps) == TRUE);
- g_print ("%s\n", gst_caps_to_string (caps));
- gst_caps_unref (caps);
-
- caps = gst_caps_new_simple ("audio/raw",
- "_double", G_TYPE_DOUBLE, 100.0, NULL);
- g_assert (caps != NULL);
- g_assert (gst_caps_is_empty (caps) == FALSE);
- g_assert (gst_caps_is_any (caps) == FALSE);
- g_assert (GST_CAPS_IS_SIMPLE (caps) == TRUE);
- g_assert (gst_caps_is_fixed (caps) == TRUE);
- g_print ("%s\n", gst_caps_to_string (caps));
- gst_caps_unref (caps);
-
- caps = gst_caps_new_simple ("audio/raw",
- "_fourcc", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('a', 'b', 'c', 'd'), NULL);
- g_assert (caps != NULL);
- g_assert (gst_caps_is_empty (caps) == FALSE);
- g_assert (gst_caps_is_any (caps) == FALSE);
- g_assert (GST_CAPS_IS_SIMPLE (caps) == TRUE);
- g_assert (gst_caps_is_fixed (caps) == TRUE);
- g_print ("%s\n", gst_caps_to_string (caps));
- gst_caps_unref (caps);
-
- caps = gst_caps_new_simple ("audio/raw",
- "_boolean", G_TYPE_BOOLEAN, TRUE, NULL);
- g_assert (caps != NULL);
- g_assert (gst_caps_is_empty (caps) == FALSE);
- g_assert (gst_caps_is_any (caps) == FALSE);
- g_assert (GST_CAPS_IS_SIMPLE (caps) == TRUE);
- g_assert (gst_caps_is_fixed (caps) == TRUE);
- g_print ("%s\n", gst_caps_to_string (caps));
- gst_caps_unref (caps);
-
- caps =
- gst_caps_new_full (gst_structure_new ("audio/raw", "_int", G_TYPE_INT,
- 100, NULL), gst_structure_new ("audio/raw2", "_int", G_TYPE_INT, 100,
- NULL), NULL);
- g_assert (caps != NULL);
- g_assert (gst_caps_is_empty (caps) == FALSE);
- g_assert (gst_caps_is_any (caps) == FALSE);
- g_assert (GST_CAPS_IS_SIMPLE (caps) == FALSE);
- g_assert (gst_caps_is_fixed (caps) == FALSE);
- g_print ("%s\n", gst_caps_to_string (caps));
- gst_caps_unref (caps);
-
- caps = gst_caps_new_simple ("audio/raw", "_int", G_TYPE_INT, 100, NULL);
- g_assert (caps != NULL);
- caps2 = gst_caps_copy (caps);
- g_assert (caps2 != NULL);
- g_assert (gst_caps_is_empty (caps2) == FALSE);
- g_assert (gst_caps_is_any (caps2) == FALSE);
- g_assert (GST_CAPS_IS_SIMPLE (caps2) == TRUE);
- g_assert (gst_caps_is_fixed (caps2) == TRUE);
- g_print ("%s\n", gst_caps_to_string (caps));
- g_print ("%s\n", gst_caps_to_string (caps2));
- gst_caps_unref (caps);
- gst_caps_unref (caps2);
-
- caps = gst_caps_new_simple ("audio/raw", "_int", G_TYPE_INT, 100, NULL);
- gst_caps_append (caps,
- gst_caps_new_simple ("audio/raw", "_int", G_TYPE_INT, 200, NULL));
- g_assert (caps != NULL);
- g_assert (gst_caps_is_empty (caps) == FALSE);
- g_assert (gst_caps_is_any (caps) == FALSE);
- g_assert (GST_CAPS_IS_SIMPLE (caps) == FALSE);
- g_assert (gst_caps_is_fixed (caps) == FALSE);
- g_print ("%s\n", gst_caps_to_string (caps));
- gst_caps_unref (caps);
-
- caps = gst_caps_new_simple ("audio/raw", "_int", G_TYPE_INT, 100, NULL);
- g_assert (caps != NULL);
- gst_caps_append_structure (caps,
- gst_structure_new ("audio/raw", "_int", G_TYPE_INT, 200, NULL));
- g_assert (gst_caps_is_empty (caps) == FALSE);
- g_assert (gst_caps_is_any (caps) == FALSE);
- g_assert (GST_CAPS_IS_SIMPLE (caps) == FALSE);
- g_assert (gst_caps_is_fixed (caps) == FALSE);
- g_print ("%s\n", gst_caps_to_string (caps));
- gst_caps_unref (caps);
-}
-
-void
-test2 (void)
-{
- GstCaps *caps1;
- GstCaps *caps2;
- GstCaps *caps;
-
- caps1 =
- gst_caps_new_full (gst_structure_new ("audio/raw", "_int", G_TYPE_INT,
- 100, NULL), gst_structure_new ("audio/raw", "_int", G_TYPE_INT, 200,
- NULL), NULL);
- caps2 =
- gst_caps_new_full (gst_structure_new ("audio/raw", "_int", G_TYPE_INT,
- 100, NULL), gst_structure_new ("audio/raw", "_int", G_TYPE_INT, 300,
- NULL), NULL);
- caps = gst_caps_intersect (caps1, caps2);
- g_print ("%s\n", gst_caps_to_string (caps));
- gst_caps_unref (caps);
- gst_caps_unref (caps1);
- gst_caps_unref (caps2);
-
-}
-
-void
-test3 (void)
-{
- GstCaps *caps1;
- GstCaps *caps2;
-
- caps1 = gst_caps_new_any ();
- caps2 = gst_caps_new_simple ("audio/raw", NULL);
-
- gst_caps_append (caps1, caps2);
- g_print ("%s\n", gst_caps_to_string (caps1));
-
- g_assert (gst_caps_is_any (caps1));
- g_assert (gst_caps_get_size (caps1) == 0);
-
- gst_caps_unref (caps1);
-}
-
-int
-main (int argc, char *argv[])
-{
- gst_init (&argc, &argv);
-
- test1 ();
- test2 ();
- test3 ();
-
- return 0;
-}
diff --git a/tests/old/testsuite/caps/caps.h b/tests/old/testsuite/caps/caps.h
deleted file mode 100644
index 3024eeca9f..0000000000
--- a/tests/old/testsuite/caps/caps.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <glib.h>
-
-/* defines an array of strings named caps_list, that contains a list of caps for
- general tests. So if you don't know what caps to use to write a test, just
- include this file */
-
-static const gchar *caps_list[] = {
- "audio/x-adpcm, layout=(string)quicktime; audio/x-adpcm, layout=(string)quicktime; audio/x-adpcm, layout=(string)wav; audio/x-adpcm, layout=(string)wav; audio/x-adpcm, layout=(string)dk3; audio/x-adpcm, layout=(string)dk3; audio/x-adpcm, layout=(string)dk4; audio/x-adpcm, layout=(string)dk4; audio/x-adpcm, layout=(string)westwood; audio/x-adpcm, layout=(string)westwood; audio/x-adpcm, layout=(string)smjpeg; audio/x-adpcm, layout=(string)smjpeg; audio/x-adpcm, layout=(string)microsoft; audio/x-adpcm, layout=(string)microsoft; audio/x-adpcm, layout=(string)4xm; audio/x-adpcm, layout=(string)4xm; audio/x-adpcm, layout=(string)xa; audio/x-adpcm, layout=(string)xa; audio/x-adpcm, layout=(string)adx; audio/x-adpcm, layout=(string)adx; audio/x-adpcm, layout=(string)ea; audio/x-adpcm, layout=(string)ea; audio/x-adpcm, layout=(string)g726; audio/x-adpcm, layout=(string)g726",
- "video/x-raw-yuv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], format=(fourcc)I420; video/x-raw-yuv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], format=(fourcc)YUY2; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)24, depth=(int)24, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, endianness=(int)4321; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)24, depth=(int)24, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, endianness=(int)4321; video/x-raw-yuv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], format=(fourcc)Y42B; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)32, depth=(int)24, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, endianness=(int)4321; video/x-raw-yuv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], format=(fourcc)YUV9; video/x-raw-yuv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], format=(fourcc)Y41B; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)16, depth=(int)16, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, endianness=(int)1234; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)16, depth=(int)15, red_mask=(int)31744, green_mask=(int)992, blue_mask=(int)31, endianness=(int)1234",
- "video/x-raw-yuv, format=(fourcc){ YUY2, I420 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-jpeg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-divx, divxversion=(int)[ 3, 5 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-xvid, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-3ivx, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-msmpeg, msmpegversion=(int)[ 41, 43 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/mpeg, mpegversion=(int)1, systemstream=(boolean)false, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h263, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-dv, systemstream=(boolean)false, width=(int)720, height=(int){ 576, 480 }; video/x-huffyuv, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]",
- "video/x-raw-yuv, format=(fourcc){ YUY2, I420 }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; image/jpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-divx, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], divxversion=(int)[ 3, 5 ]; video/x-xvid, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-3ivx, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-msmpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], msmpegversion=(int)[ 41, 43 ]; video/mpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], mpegversion=(int)1, systemstream=(boolean)false; video/x-h263, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-dv, width=(int)720, height=(int){ 576, 480 }, systemstream=(boolean)false; video/x-huffyuv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]",
- "video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]",
- "video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]",
- "video/x-raw-yuv, format=(fourcc){ I420 }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]",
- "ANY",
- "EMPTY"
-};
-
diff --git a/tests/old/testsuite/caps/caps_strings b/tests/old/testsuite/caps/caps_strings
deleted file mode 100644
index 72f90522c4..0000000000
--- a/tests/old/testsuite/caps/caps_strings
+++ /dev/null
@@ -1,263 +0,0 @@
-ANY
-EMPTY
-image/bmp
-image/gif
-image/png
-audio/x-au
-image/jpeg
-text/plain
-audio/x-ac3
-audio/x-m4a
-audio/x-mod
-audio/x-sid
-audio/x-wav
-image/x-jng
-image/x-xcf
-video/x-4xm
-video/x-fli
-video/x-mng
-audio/x-aiff
-audio/x-flac
-video/x-cdxa
-audio/x-speex
-text/uri-list
-audio/x-vorbis
-video/x-ms-asf
-video/x-theora
-application/ogg
-application/zip
-audio/x-shorten
-image/x-xpixmap
-video/quicktime
-video/x-msvideo
-video/x-matroska
-application/x-ape
-application/x-id3
-application/x-rtp
-application/x-bzip
-application/x-gzip
-image/x-sun-raster
-video/x-pn-realvideo
-application/x-compress
-video/x-dvd-subpicture
-audio/x-gst_ff-vmdaudio
-application/x-gst_ff-RoQ
-application/x-gst_ff-ffm
-application/x-gst_ff-flv
-application/x-gst_ff-gif
-application/x-gst_ff-mp3
-application/x-gst_ff-nut
-application/x-gst_ff-sdp
-application/x-gst_ff-vmd
-application/x-gst_ff-flic
-application/x-gst_ff-rtsp
-application/x-gst_ff-idcin
-application/x-gst_ff-redir
-application/x-gst_ff-wsaud
-application/x-gst_ff-wsvqa
-application/x-gst_ff-psxstr
-application/vnd.rn-realmedia
-application/x-gst_ff-ipmovie
-video/quicktime; audio/x-m4a
-application/x-gst_ff-film_cpk
-application/x-gst_ff-wc3movie
-application/x-shockwave-flash
-audio/mpeg, mpegversion=(int)1
-text/x-pango-markup; text/plain
-audio/x-adpcm, layout=(string)ea
-audio/x-adpcm, layout=(string)xa
-audio/x-dpcm, layout=(string)roq
-audio/x-dpcm, layout=(string)xan
-audio/x-mace, maceversion=(int)3
-audio/x-mace, maceversion=(int)6
-application/x-gst_ff-yuv4mpegpipe
-audio/x-adpcm, layout=(string)4xm
-audio/x-adpcm, layout=(string)adx
-audio/x-adpcm, layout=(string)dk3
-audio/x-adpcm, layout=(string)dk4
-audio/x-adpcm, layout=(string)dvi
-audio/x-adpcm, layout=(string)g726
-audio/x-adpcm, layout=(string)smjpeg
-audio/x-flac; application/x-gst-tags
-audio/x-aiff; audio/x-wav; audio/x-au
-audio/x-adpcm, layout=(string)westwood
-audio/x-dpcm, layout=(string)interplay
-audio/x-gsm, rate=(int)[ 1000, 48000 ]
-audio/x-pn-realaudio, raversion=(int)1
-audio/x-pn-realaudio, raversion=(int)2
-audio/x-vorbis; application/x-gst-tags
-video/mpeg, systemstream=(boolean)true
-video/x-dv, systemstream=(boolean)true
-audio/x-adpcm, layout=(string)microsoft
-audio/x-adpcm, layout=(string)quicktime
-video/mpeg, systemstream=(boolean)false
-video/mpegts, systemstream=(boolean)true
-application/x-yuv4mpeg, y4mversion=(int)1
-image/tiff, endianness=(int){ 4321, 1234 }
-audio/mpeg, mpegversion=(int)1, layer=(int)2
-audio/mpeg, mpegversion=(int)1; audio/x-flac
-audio/mpeg, mpegversion=(int)1, layer=(int)[ 1, 2 ]
-audio/mpeg, mpegversion=(int)1, layer=(int)[ 1, 3 ]
-application/x-pn-realmedia, systemstream=(boolean)true
-audio/x-gsm, rate=(int)[ 1000, 48000 ], channels=(int)1
-audio/x-speex, rate=(int)[ 1000, 48000 ], channels=(int)1
-video/mpeg, mpegversion=(int)1, systemstream=(boolean)false
-audio/x-ac3, channels=(int)[ 1, 6 ], rate=(int)[ 32000, 48000 ]
-audio/x-alaw, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 2 ]
-audio/x-mulaw, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 2 ]
-video/mpeg, mpegversion=(int)[ 1, 2 ], systemstream=(boolean)true
-video/mpeg, mpegversion=(int){ 1, 2 }, systemstream=(boolean)true
-video/mpeg, systemstream=(boolean)true, mpegversion=(int)[ 1, 2 ]
-audio/mpeg, systemstream=(boolean)false, mpegversion=(int){ 2, 4 }
-video/mpeg, mpegversion=(int)[ 1, 2 ], systemstream=(boolean)false
-video/mpeg, mpegversion=(int){ 1, 2 }, systemstream=(boolean)false
-audio/x-raw-int, signed=(boolean)true, endianness=(int)1234, width=(int)16, depth=(int)16
-video/x-raw-yuv, format=(fourcc){ I420 }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]
-video/x-raw-yuv, format=(fourcc)I420, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]
-audio/mpeg, mpegversion=(int)1, layer=(int)[ 1, 2 ], channels=(int)[ 1, 2 ], rate=(int)[ 8000, 96000 ]
-audio/mpeg, mpegversion=(int)1, layer=(int)[ 1, 3 ], rate=(int)[ 8000, 48000 ], channels=(int)[ 1, 2 ]
-video/x-raw-rgb, framerate=(double)[ 1, 100 ], width=(int)[ 0, 2147483647 ], height=(int)[ 0, 2147483647 ]
-video/x-dv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-image/jpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 1, 1.7976931348623157e+308 ]
-video/x-4xm, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-png, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-vp3, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-h263, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-h264, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-jpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-theora, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-cinepak, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-huffyuv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-gst_ff-flv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-gst_ff-smc, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-apple-video, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-gst_ff-8bps, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-gst_ff-asv1, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-gst_ff-asv2, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-gst_ff-cljr, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-gst_ff-cyuv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-gst_ff-flic, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-gst_ff-mdec, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-gst_ff-mszh, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-gst_ff-vcr1, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-gst_ff-zlib, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-gst_ff-qtrle, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-audio/x-raw-float, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234, buffer-frames=(int)[ 1, 2147483647 ]
-audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)16000, channels=(int)1
-audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
-video/x-gst_ff-xan_wc3, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-jpeg, width=(int)[ 0, 2147483647 ], height=(int)[ 0, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-jpeg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-xvid, width=(int)[ 0, 2147483647 ], height=(int)[ 0, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-gst_ff-roqvideo, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-gst_ff-vmdvideo, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-gst_ff-vqavideo, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-gst_ff-idcinvideo, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-gst_ff-truemotion1, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-audio/x-raw-float, rate=(int)[ 11025, 48000 ], channels=(int)[ 1, 2 ], endianness=(int)1234, width=(int)32, buffer-frames=(int)0
-video/x-gst_ff-interplayvideo, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-ffv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], ffvversion=(int)1
-video/x-svq, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], svqversion=(int)1
-video/x-wmv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], wmvversion=(int)1
-video/x-wmv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], wmvversion=(int)2
-audio/x-raw-int, depth=(int)16, width=(int)16, signed=(boolean)true, channels=(int)2, endianness=(int)1234, rate=(int)[ 4000, 48000 ]
-audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 1000, 48000 ], channels=(int)1
-audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 8000, 96000 ], channels=(int)1
-audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 1, 2147483647 ], channels=(int)1
-audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)2, endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true
-video/x-indeo, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], indeoversion=(int)3
-video/x-raw-yuv, format=(fourcc)I420, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-msmpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], msmpegversion=(int)41
-video/x-msmpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], msmpegversion=(int)42
-video/x-msmpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], msmpegversion=(int)43
-audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 1000, 48000 ], channels=(int)[ 1, 2 ]
-audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 4000, 48000 ], channels=(int)[ 1, 6 ]
-audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]
-audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 11025, 48000 ], channels=(int)[ 1, 2 ]
-audio/x-raw-int, width=(int)16, depth=(int)16, endianness=(int)1234, signed=(boolean)true, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 2 ]
-audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2, chunksize=(int)2352
-video/x-msvideocodec, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], msvideoversion=(int)1
-video/x-raw-yuv, format=(fourcc)I420, height=(int)[ 1, 2147483647 ], width=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-raw-yuv, format=(fourcc){ I420, YV12 }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int){ 32000, 44100, 48000 }, channels=(int)[ 1, 2 ]
-audio/x-raw-float, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int)1234, width=(int)32, buffer-frames=(int)[ 0, 2147483647 ]
-video/mpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], mpegversion=(int)1, systemstream=(boolean)false
-video/mpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], mpegversion=(int)2, systemstream=(boolean)false
-video/mpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], systemstream=(boolean)false, mpegversion=(int)4
-video/x-rle, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], layout=(string)microsoft, depth=(int)[ 1, 64 ]
-audio/x-raw-int, rate=(int)44100, channels=(int)2, endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true, buffer-frames=(int)[ 1, 2147483647 ]
-video/x-raw-yuv, format=(fourcc){ YV12, I420, IYUV }, height=(int)[ 1, 2147483647 ], width=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-audio/x-raw-int, endianness=(int)1234, signed=(boolean){ true, false }, width=(int){ 8, 16 }, depth=(int){ 8, 16 }, rate=(int)[ 8000, 48000 ], channels=(int)[ 1, 2 ]
-audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int)1234, width=(int){ 8, 16 }, depth=(int){ 8, 16 }, signed=(boolean)true
-video/x-raw-yuv, format=(fourcc){ YUY2, I420, YV12, YUYV, UYVY }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-audio/x-raw-int, endianness=(int)1234, signed=(boolean){ true, false }, width=(int){ 8, 16 }, depth=(int){ 8, 16 }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ]
-video/x-pn-realvideo, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], systemstream=(boolean)false, rmversion=(int)1
-video/x-pn-realvideo, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], systemstream=(boolean)false, rmversion=(int)2
-video/x-raw-yuv, format=(fourcc){ I420, YV12, YUY2, YVYU, UYVY }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-audio/x-wma, wmaversion=(int)1, flags1=(int)[ -2147483648, 2147483647 ], flags2=(int)[ -2147483648, 2147483647 ], block_align=(int)[ 0, 2147483647 ], bitrate=(int)[ 0, 2147483647 ]
-audio/x-wma, wmaversion=(int)2, flags1=(int)[ -2147483648, 2147483647 ], flags2=(int)[ -2147483648, 2147483647 ], block_align=(int)[ 0, 2147483647 ], bitrate=(int)[ 0, 2147483647 ]
-video/x-raw-yuv, format=(fourcc)I420, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double){ 23.976023976, 24, 25, 29.97002997, 30, 50, 59.94005994, 60 }
-audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int){ 8, 16, 32 }, depth=(int)[ 1, 32 ], signed=(boolean){ true, false }
-audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ], endianness=(int)1234, width=(int){ 8, 16 }, depth=(int){ 8, 16 }, signed=(boolean){ true, false }, buffer-frames=(int)[ 1, 2147483647 ]
-audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 8000, 48000 ], channels=(int)[ 1, 2 ]; audio/x-mulaw, rate=(int)[ 8000, 48000 ], channels=(int)[ 1, 2 ]
-audio/mpeg, mpegversion=(int)1; audio/x-raw-int, endianness=(int)4321, signed=(boolean)true, width=(int){ 16, 20, 24 }, depth=(int){ 16, 20, 24 }, rate=(int){ 48000, 96000 }, channels=(int)[ 1, 8 ]; audio/x-ac3
-audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int)1234, width=(int){ 8, 16 }, depth=(int){ 8, 16 }, signed=(boolean){ true, false }, buffer-frames=(int)[ 1, 2147483647 ]
-video/x-raw-rgb, framerate=(double)[ 1, 100 ], width=(int)[ 0, 2147483647 ], height=(int)[ 0, 2147483647 ]; video/x-raw-yuv, framerate=(double)[ 1, 100 ], width=(int)[ 0, 2147483647 ], height=(int)[ 0, 2147483647 ]
-video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 1, 60 ]
-video/mpeg, mpegversion=(int)1, systemstream=(boolean)false, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], pixel_width=(int)[ 1, 255 ], pixel_height=(int)[ 1, 255 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/mpeg, mpegversion=(int){ 1, 4 }, systemstream=(boolean)false, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double){ 23.976023976, 24, 25, 29.97002997, 30, 50, 59.94005994, 60 }
-video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)256, height=(int)128, framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-raw-rgb, bpp=(int)16, depth=(int)16, endianness=(int)1234, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-raw-rgb, bpp=(int)24, depth=(int)24, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-raw-rgb, bpp=(int)24, depth=(int)24, endianness=(int)4321, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-audio/x-raw-float, depth=(int)32, endianness=(int)1234, rate=(int)[ 11025, 48000 ], channels=(int)2; audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 11025, 48000 ], channels=(int)[ 1, 2 ]
-video/x-svq, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], svqversion=(int)3, halfpel_flag=(int)[ 0, 1 ], thirdpel_flag=(int)[ 0, 1 ], low_delay=(int)[ 0, 1 ], unknown_svq3_flag=(int)[ 0, 1 ]
-video/x-raw-rgb, depth=(int)24, bpp=(int)32, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, height=(int)[ 1, 2147483647 ], width=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int){ 8, 16, 32 }, depth=(int)[ 1, 32 ], signed=(boolean){ true, false }; audio/x-alaw, rate=(int)[ 8000, 48000 ], channels=(int)[ 1, 2 ]
-audio/x-raw-int, endianess=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-raw-int, signed=(boolean)false, width=(int)8, depth=(int)8, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ]
-audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-raw-int, signed=(boolean)false, width=(int)8, depth=(int)8, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]
-video/x-raw-yuv, format=(fourcc){ YV12, I420, Y42B }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], pixel_width=(int)[ 1, 255 ], pixel_height=(int)[ 1, 255 ], framerate=(double){ 23.976023976, 24, 25, 29.97002997, 30, 50, 59.94005994, 60 }
-audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 4000, 96000 ], channels=(int)1; audio/x-raw-float, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234, width=(int)32, buffer-frames=(int)[ 0, 2147483647 ]
-video/x-divx, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], divxversion=(int)3; video/x-msmpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], msmpegversion=(int)43
-audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int){ 16, 24, 32 }, depth=(int){ 16, 24, 32 }, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 6 ]; audio/x-raw-float, endianness=(int)1234, depth=(int){ 32, 64 }, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 6 ]
-audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean){ true, false }; audio/x-raw-float, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234, width=(int)32, buffer-frames=(int)[ 0, 2147483647 ]
-audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int){ 8000, 11025, 22050, 44100 }, channels=(int)[ 1, 2 ]; audio/x-raw-int, signed=(boolean)false, width=(int)8, depth=(int)8, rate=(int){ 8000, 11025, 22050, 44100 }, channels=(int)[ 1, 2 ]
-audio/x-raw-float, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int)1234, width=(int)32, buffer-frames=(int)[ 1, 2147483647 ]; audio/x-raw-int, channels=(int)[ 1, 2147483647 ], rate=(int)[ 1, 2147483647 ], endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean)true
-audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]; audio/x-raw-float, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int)1234, width=(int)32, buffer-frames=(int)[ 0, 2147483647 ]
-audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int){ 8, 16, 32 }, depth=(int)[ 1, 32 ], signed=(boolean){ true, false }; audio/x-raw-float, rate=(int)[ 1, 2147483647 ], channels=(int)1, endianness=(int)1234, buffer-frames=(int)[ 1, 2147483647 ]
-audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int)1234, width=(int)16, depth=(int)16, signed=(boolean){ true, false }; audio/x-raw-float, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int)1234, width=(int)32, buffer-frames=(int)[ 0, 2147483647 ]
-audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ], endianness=(int){ 1234, 4321 }, width=(int){ 8, 16, 32 }, depth=(int)[ 1, 32 ], signed=(boolean){ true, false }; audio/x-raw-float, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ], endianness=(int)1234, width=(int)32, buffer-frames=(int)[ 0, 2147483647 ]
-image/png; image/jpeg; image/gif; image/x-icon; application/x-navi-animation; image/x-cmu-raster; image/x-sun-raster; image/x-pixmap; image/tiff; image/x-portable-anymap; image/x-portable-bitmap; image/x-portable-graymap; image/x-portable-pixmap; image/bmp; image/x-bmp; image/x-MS-bmp; image/vnd.wap.wbmp; image/x-bitmap; image/x-tga
-audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int){ 8, 16, 32 }, depth=(int)[ 1, 32 ], signed=(boolean){ true, false }; audio/x-raw-float, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int){ 32, 64 }, buffer-frames=(int)[ 1, 2147483647 ]
-audio/x-raw-int, endianness=(int)1234, signed=(boolean){ true, false }, width=(int){ 8, 16 }, depth=(int){ 8, 16 }, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ]; audio/mpeg, mpegversion=(int)1, layer=(int)[ 1, 3 ], rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-vorbis, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-ac3, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ]
-audio/x-raw-int, endianness=(int)1234, signed=(boolean){ true, false }, width=(int){ 8, 16 }, depth=(int){ 8, 16 }, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ]; audio/mpeg, mpegversion=(int)1, layer=(int){ 1, 3 }, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-vorbis, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-ac3, rate=(int)[ 1000, 96000 ], channels=(int)[ 1, 2 ]
-audio/mpeg, mpegversion=(int)1, layer=(int)[ 1, 3 ], channels=(int)[ 1, 8 ], rate=(int)[ 8000, 96000 ]; audio/mpeg, mpegversion=(int){ 2, 4 }, channels=(int)[ 1, 8 ], rate=(int)[ 8000, 96000 ]; audio/x-ac3, channels=(int)[ 1, 8 ], rate=(int)[ 8000, 96000 ]; audio/x-raw-int, width=(int){ 8, 16, 24 }, depth=(int){ 8, 16, 24 }, endianness=(int){ 4321, 1234 }, signed=(boolean){ true, false }, channels=(int)[ 1, 8 ], rate=(int)[ 8000, 96000 ]
-video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/mpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], mpegversion=(int)4, systemstream=(boolean)false; video/x-3ivx, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-divx, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], divxversion=(int)[ 4, 5 ]; video/x-xvid, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-raw-yuv, format=(fourcc)YUY2, width=(int)720, height=(int){ 480, 576 }, framerate=(double){ 25, 29.97002997 }; video/x-raw-rgb, bpp=(int)32, depth=(int)32, endianness=(int)4321, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, width=(int)720, height=(int){ 480, 576 }, framerate=(double){ 25, 29.97002997 }; video/x-raw-rgb, bpp=(int)24, depth=(int)24, endianness=(int)4321, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, width=(int)720, height=(int){ 480, 576 }, framerate=(double){ 25, 29.97002997 }
-audio/mpeg, mpegversion=(int)1, layer=(int){ 3, 2 }, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-ac3, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-adpcm, layout=(string)microsoft, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-alaw, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-mulaw, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-raw-int, endianness=(int)1234, signed=(boolean){ true, false }, width=(int){ 8, 16 }, depth=(int){ 8, 16 }, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-vorbis, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]
-audio/x-raw-int, endianness=(int)1234, signed=(boolean){ true, false }, width=(int){ 8, 16 }, depth=(int){ 8, 16 }, rate=(int)[ 8000, 48000 ], channels=(int)[ 1, 2 ]; audio/mpeg, mpegversion=(int)1, layer=(int)[ 1, 3 ], rate=(int)[ 8000, 48000 ], channels=(int)[ 1, 2 ]; audio/x-alaw, rate=(int)[ 8000, 48000 ], channels=(int)[ 1, 2 ]; audio/x-mulaw, rate=(int)[ 8000, 48000 ], channels=(int)[ 1, 2 ]; audio/x-adpcm, layout=(string)microsoft, block_align=(int)[ 1, 8192 ], rate=(int)[ 8000, 48000 ], channels=(int)[ 1, 2 ]; audio/x-adpcm, layout=(string)dvi, block_align=(int)[ 1, 8192 ], rate=(int)[ 8000, 48000 ], channels=(int)[ 1, 2 ]
-video/x-raw-rgb, depth=(int)24, bpp=(int)24, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, height=(int)[ 1, 2147483647 ], width=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, depth=(int)24, bpp=(int)32, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, height=(int)[ 1, 2147483647 ], width=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-yuv, format=(fourcc)I420, height=(int)[ 1, 2147483647 ], width=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)24, depth=(int)24, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)16, depth=(int)16, endianness=(int)1234, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-audio/mpeg, mpegversion=(int)1, layer=(int){ 3, 2 }, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-ac3, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-raw-int, endianness=(int)1234, signed=(boolean){ true, false }, width=(int){ 8, 16 }, depth=(int){ 8, 16 }, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-vorbis, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-wma, wmaversion=(int){ 1, 2 }, flags1=(int)[ -2147483648, 2147483647 ], flags2=(int)[ -2147483648, 2147483647 ], block_align=(int)[ 0, 2147483647 ], bitrate=(int)[ 0, 2147483647 ], rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]; audio/x-wma, wmaversion=(int)9, rate=(int)[ 8000, 96000 ], channels=(int)[ 1, 2 ]
-audio/mpeg, mpegversion=(int)1, layer=(int){ 3, 2 }; audio/x-ac3; audio/x-adpcm, layout=(string){ g726, ea, adx, xa, 4xm, microsoft, smjpeg, westwood, dk4, dk3, dvi, quicktime }; audio/x-alaw; audio/x-dpcm, layout=(string){ roq, interplay, xan }; audio/x-gst_ff-vmdaudio; audio/x-mace, maceversion=(int){ 3, 6 }; audio/x-mulaw; audio/x-pn-realaudio, raversion=(int){ 1, 2 }; audio/x-raw-int, width=(int)16, depth=(int)16, endianness=(int){ 4321, 1234 }, signed=(boolean){ false, true }; audio/x-raw-int, width=(int)8, depth=(int)8, endianness=(int)1234, signed=(boolean){ false, true }; audio/x-wma, wmaversion=(int){ 1, 2 }, flags1=(int)[ -2147483648, 2147483647 ], flags2=(int)[ -2147483648, 2147483647 ], block_align=(int)[ 0, 2147483647 ], bitrate=(int)[ 0, 2147483647 ]
-video/mpeg, mpegversion=(int){ 1, 2, 4 }, systemstream=(boolean)false, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-divx, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-xvid, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-msmpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-jpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-yuv, format=(fourcc){ YUY2, I420 }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-raw-yuv, format=(fourcc){ YUY2, I420 }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; image/jpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-divx, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], divxversion=(int)[ 3, 5 ]; video/x-xvid, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-3ivx, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-msmpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], msmpegversion=(int)[ 41, 43 ]; video/mpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], mpegversion=(int)1, systemstream=(boolean)false; video/x-h263, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-dv, width=(int)720, height=(int){ 576, 480 }, systemstream=(boolean)false; video/x-huffyuv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]
-audio/mpeg, mpegversion=(int)1, layer=(int){ 1, 2, 3 }, channels=(int)[ 1, 6 ], rate=(int)[ 4000, 96000 ]; audio/mpeg, mpegversion=(int){ 2, 4 }, channels=(int)[ 1, 6 ], rate=(int)[ 4000, 96000 ]; audio/x-ac3, channels=(int)[ 1, 6 ], rate=(int)[ 4000, 96000 ]; audio/x-adpcm, layout=(string)microsoft, rate=(int)[ 4000, 96000 ], channels=(int)[ 1, 6 ]; audio/x-alaw, rate=(int)[ 4000, 96000 ], channels=(int)[ 1, 6 ]; audio/x-mulaw, rate=(int)[ 4000, 96000 ], channels=(int)[ 1, 6 ]; audio/x-raw-float, endianness=(int)1234, buffer-frames=(int)[ 1, 2147483647 ], width=(int)[ 32, 64 ], channels=(int)[ 1, 6 ], rate=(int)[ 4000, 96000 ]; audio/x-raw-int, signed=(boolean){ true, false }, depth=(int){ 8, 16 }, width=(int){ 8, 16 }, endianness=(int){ 4321, 1234 }, channels=(int)[ 1, 6 ], rate=(int)[ 4000, 96000 ]; audio/x-vorbis, rate=(int)[ 4000, 96000 ], channels=(int)[ 1, 6 ]
-video/x-raw-yuv, format=(fourcc){ YUY2, I420 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-jpeg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-divx, divxversion=(int)[ 3, 5 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-xvid, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-3ivx, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-msmpeg, msmpegversion=(int)[ 41, 43 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/mpeg, mpegversion=(int)1, systemstream=(boolean)false, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h263, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-dv, systemstream=(boolean)false, width=(int)720, height=(int){ 576, 480 }; video/x-huffyuv, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]
-video/x-divx, divxversion=(int){ 3, 5 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(double)[ 25, 1.7976931348623157e+308 ]; video/x-dv, systemstream=(boolean)false, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(double)[ 25, 1.7976931348623157e+308 ]; video/x-jpeg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(double)[ 25, 1.7976931348623157e+308 ]; video/x-msmpeg, msmpegversion=(int){ 41, 42, 43 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(double)[ 25, 1.7976931348623157e+308 ]; video/x-raw-yuv, format=(fourcc){ I420, YUY2 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(double)[ 25, 1.7976931348623157e+308 ]; video/x-wmv, wmvversion=(int){ 1, 2 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(double)[ 25, 1.7976931348623157e+308 ]
-video/x-raw-rgb, bpp=(int)24, depth=(int)24, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)16, depth=(int)16, endianness=(int)1234, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)16, depth=(int)15, endianness=(int)1234, red_mask=(int)31744, green_mask=(int)992, blue_mask=(int)31, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-raw-rgb, depth=(int)24, bpp=(int)32, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, height=(int)[ 1, 2147483647 ], width=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, depth=(int)24, bpp=(int)32, endianness=(int)4321, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, height=(int)[ 1, 2147483647 ], width=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, depth=(int)24, bpp=(int)32, endianness=(int)4321, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, height=(int)[ 1, 2147483647 ], width=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, depth=(int)24, bpp=(int)32, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, height=(int)[ 1, 2147483647 ], width=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-audio/x-alaw, rate=(int)[ 8000, 192000 ], channels=(int)1; audio/x-mulaw, rate=(int)[ 8000, 192000 ], channels=(int)1; audio/x-raw-float, width=(int){ 32, 64 }, endianness=(int)1234, rate=(int)[ 8000, 192000 ], channels=(int)1; audio/x-raw-int, width=(int)16, depth=(int)16, signed=(boolean){ false, true }, endianness=(int){ 1234, 4321 }, rate=(int)[ 8000, 192000 ], channels=(int)1; audio/x-raw-int, width=(int)32, depth=(int)24, signed=(boolean){ false, true }, endianness=(int){ 1234, 4321 }, rate=(int)[ 8000, 192000 ], channels=(int)1; audio/x-raw-int, width=(int)32, depth=(int)32, signed=(boolean){ false, true }, endianness=(int){ 1234, 4321 }, rate=(int)[ 8000, 192000 ], channels=(int)1; audio/x-raw-int, width=(int)24, depth=(int)24, signed=(boolean){ false, true }, endianness=(int){ 1234, 4321 }, rate=(int)[ 8000, 192000 ], channels=(int)1; audio/x-raw-int, width=(int)24, depth=(int)20, signed=(boolean){ false, true }, endianness=(int){ 1234, 4321 }, rate=(int)[ 8000, 192000 ], channels=(int)1; audio/x-raw-int, width=(int)24, depth=(int)18, signed=(boolean){ false, true }, endianness=(int){ 1234, 4321 }, rate=(int)[ 8000, 192000 ], channels=(int)1; audio/x-raw-int, width=(int)8, depth=(int)8, signed=(boolean){ true, false }, rate=(int)[ 8000, 192000 ], channels=(int)1
-video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)24, depth=(int)24, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, endianness=(int)4321; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)24, depth=(int)24, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, endianness=(int)4321; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)32, depth=(int)24, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, endianness=(int)4321; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)16, depth=(int)16, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, endianness=(int)1234; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)16, depth=(int)15, red_mask=(int)31744, green_mask=(int)992, blue_mask=(int)31, endianness=(int)1234; video/x-raw-yuv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], format=(fourcc){ I420, YUY2, Y42B, YUV9, Y41B }
-audio/x-alaw, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 32 ]; audio/x-mulaw, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 32 ]; audio/x-raw-float, width=(int){ 32, 64 }, endianness=(int)1234, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 32 ]; audio/x-raw-int, width=(int)16, depth=(int)16, signed=(boolean){ false, true }, endianness=(int){ 1234, 4321 }, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 32 ]; audio/x-raw-int, width=(int)32, depth=(int)24, signed=(boolean){ false, true }, endianness=(int){ 1234, 4321 }, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 32 ]; audio/x-raw-int, width=(int)32, depth=(int)32, signed=(boolean){ false, true }, endianness=(int){ 1234, 4321 }, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 32 ]; audio/x-raw-int, width=(int)24, depth=(int)24, signed=(boolean){ false, true }, endianness=(int){ 1234, 4321 }, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 32 ]; audio/x-raw-int, width=(int)24, depth=(int)20, signed=(boolean){ false, true }, endianness=(int){ 1234, 4321 }, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 32 ]; audio/x-raw-int, width=(int)24, depth=(int)18, signed=(boolean){ false, true }, endianness=(int){ 1234, 4321 }, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 32 ]; audio/x-raw-int, width=(int)8, depth=(int)8, signed=(boolean){ true, false }, rate=(int)[ 8000, 192000 ], channels=(int)[ 1, 32 ]
-video/x-raw-rgb, bpp=(int){ 32, 24 }, endianness=(int)4321, depth=(int)24, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int){ 32, 24 }, endianness=(int)4321, depth=(int)24, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)32, endianness=(int)4321, depth=(int)24, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)16, endianness=(int)1234, depth=(int)16, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)16, endianness=(int)1234, depth=(int)15, red_mask=(int)31744, green_mask=(int)992, blue_mask=(int)31, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-yuv, format=(fourcc){ YUY2, UYVY, Y422, UYNV, YVYU, IYU2, YVU9, YUV9, YV12, I420, Y800 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-raw-rgb, depth=(int)24, bpp=(int){ 32, 24 }, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 100, 2147483647 ], height=(int)[ 100, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, depth=(int)24, bpp=(int){ 32, 24 }, endianness=(int)4321, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, width=(int)[ 100, 2147483647 ], height=(int)[ 100, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, depth=(int)24, bpp=(int)32, endianness=(int)4321, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, width=(int)[ 100, 2147483647 ], height=(int)[ 100, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, depth=(int)24, bpp=(int)32, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 100, 2147483647 ], height=(int)[ 100, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, depth=(int)16, bpp=(int)16, endianness=(int)1234, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, width=(int)[ 100, 2147483647 ], height=(int)[ 100, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, depth=(int)15, bpp=(int)16, endianness=(int)1234, red_mask=(int)31744, green_mask=(int)992, blue_mask=(int)31, width=(int)[ 100, 2147483647 ], height=(int)[ 100, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-yuv, format=(fourcc){ YUY2, UYVY, Y422, UYNV, YVYU, YV12, I420, Y800 }, width=(int)[ 100, 2147483647 ], height=(int)[ 100, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-dv, systemstream=(boolean)true, width=(int)[ 1, 4096 ], height=(int)[ 1, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-jpeg, width=(int)[ 1, 4096 ], height=(int)[ 1, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)8, depth=(int)8, red_mask=(int)224, green_mask=(int)28, blue_mask=(int)3, endianness=(int)1234, width=(int)[ 1, 4096 ], height=(int)[ 1, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)16, depth=(int)15, red_mask=(int)31744, green_mask=(int)992, blue_mask=(int)31, endianness=(int){ 1234, 4321 }, width=(int)[ 1, 4096 ], height=(int)[ 1, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)24, depth=(int)24, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, endianness=(int)4321, width=(int)[ 1, 4096 ], height=(int)[ 1, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)24, depth=(int)24, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, endianness=(int)4321, width=(int)[ 1, 4096 ], height=(int)[ 1, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)32, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, endianness=(int)4321, width=(int)[ 1, 4096 ], height=(int)[ 1, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)32, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, endianness=(int)4321, width=(int)[ 1, 4096 ], height=(int)[ 1, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-yuv, format=(fourcc){ YVU9, YV12, YUY2, UYVY, Y42B, Y41B, Y41P, YUV9, I420 }, width=(int)[ 1, 4096 ], height=(int)[ 1, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-raw-yuv, format=(fourcc){ I420, YUY2, YV12, YVYU, UYVY }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, width=(int)[ 0, 2147483647 ], height=(int)[ 0, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], depth=(int)24, bpp=(int)32, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255; video/x-raw-rgb, width=(int)[ 0, 2147483647 ], height=(int)[ 0, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], depth=(int)24, bpp=(int)32, endianness=(int)4321, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280; video/x-raw-rgb, width=(int)[ 0, 2147483647 ], height=(int)[ 0, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], depth=(int)24, bpp=(int)32, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216; video/x-raw-rgb, width=(int)[ 0, 2147483647 ], height=(int)[ 0, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], depth=(int)24, bpp=(int)32, endianness=(int)4321, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680; video/x-raw-rgb, width=(int)[ 0, 2147483647 ], height=(int)[ 0, 2147483647 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], depth=(int)24, bpp=(int)24, endianness=(int)4321, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680; video/x-raw-rgb, bpp=(int)16, depth=(int)15, endianness=(int)1234, red_mask=(int)31744, green_mask=(int)992, blue_mask=(int)31, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)16, depth=(int)16, endianness=(int)1234, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)24, depth=(int)24, endianness=(int)4321, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)24, depth=(int)24, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)16, depth=(int)16, endianness=(int)1234, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)16, depth=(int)15, endianness=(int)1234, red_mask=(int)31744, green_mask=(int)992, blue_mask=(int)31, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-image/jpeg, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/mpeg, systemstream=(boolean)false, mpegversion=(int)1, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-3ivx, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-cinepak, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-divx, divxversion=(int){ 3, 4 }, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-dv, systemstream=(boolean)false, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-h263, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-huffyuv, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-msmpeg, msmpegversion=(int){ 41, 42, 43 }, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-msvideocodec, msvideoversion=(int)1, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-raw-yuv, format=(fourcc){ I420, YUY2 }, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-rle, layout=(string)microsoft, depth=(int)[ 1, 64 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-wmv, wmvversion=(int){ 1, 2 }, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-xvid, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]
-video/x-raw-rgb, bpp=(int)24, depth=(int)24, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)24, depth=(int)24, endianness=(int)4321, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)-16777216, green_mask=(int)16711680, blue_mask=(int)65280, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)32, depth=(int)24, endianness=(int)4321, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)16, depth=(int)16, endianness=(int)1234, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-rgb, bpp=(int)16, depth=(int)15, endianness=(int)1234, red_mask=(int)31744, green_mask=(int)992, blue_mask=(int)31, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-raw-yuv, format=(fourcc){ I420, YV12, YUY2, YVYU, UYVY, YUV9, YVU9, Y800, Y41P, Y41B, Y42B, IUY2 }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]
-image/jpeg, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], pixel_width=(int)[ 0, 255 ], pixel_height=(int)[ 0, 255 ]; video/mpeg, mpegversion=(int){ 4, 2, 1 }, systemstream=(boolean)false, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], pixel_width=(int)[ 0, 255 ], pixel_height=(int)[ 0, 255 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-3ivx, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], pixel_width=(int)[ 0, 255 ], pixel_height=(int)[ 0, 255 ]; video/x-cinepak, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], pixel_width=(int)[ 0, 255 ], pixel_height=(int)[ 0, 255 ]; video/x-divx, divxversion=(int){ 5, 4, 3 }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], pixel_width=(int)[ 0, 255 ], pixel_height=(int)[ 0, 255 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-dv, systemstream=(boolean)false, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], pixel_width=(int)[ 0, 255 ], pixel_height=(int)[ 0, 255 ]; video/x-h263, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], pixel_width=(int)[ 0, 255 ], pixel_height=(int)[ 0, 255 ]; video/x-huffyuv, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], pixel_width=(int)[ 0, 255 ], pixel_height=(int)[ 0, 255 ]; video/x-jpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], pixel_width=(int)[ 0, 255 ], pixel_height=(int)[ 0, 255 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-msmpeg, msmpegversion=(int){ 41, 42, 43 }, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], pixel_width=(int)[ 0, 255 ], pixel_height=(int)[ 0, 255 ]; video/x-msvideocodec, msvideoversion=(int)1, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], pixel_width=(int)[ 0, 255 ], pixel_height=(int)[ 0, 255 ]; video/x-raw-yuv, format=(fourcc){ YV12, YUY2, I420 }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], pixel_width=(int)[ 0, 255 ], pixel_height=(int)[ 0, 255 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-rle, layout=(string)microsoft, depth=(int)[ 1, 64 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], pixel_width=(int)[ 0, 255 ], pixel_height=(int)[ 0, 255 ]; video/x-wmv, wmvversion=(int){ 1, 2 }, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], pixel_width=(int)[ 0, 255 ], pixel_height=(int)[ 0, 255 ]; video/x-xvid, framerate=(double)[ 0, 1.7976931348623157e+308 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], pixel_width=(int)[ 0, 255 ], pixel_height=(int)[ 0, 255 ]
-video/x-dv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/mpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], mpegversion=(int){ 1, 2, 4 }, systemstream=(boolean)false; video/x-4xm, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-apple-video, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-cinepak, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-ffv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], ffvversion=(int)1; video/x-gst_ff-8bps, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-asv1, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-asv2, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-cljr, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-cyuv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-flic, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-flv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-idcinvideo, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-interplayvideo, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-mdec, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-mszh, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-qtrle, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-roqvideo, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-smc, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-truemotion1, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-vcr1, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-vmdvideo, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-vqavideo, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-xan_wc3, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-gst_ff-zlib, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-h263, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-h264, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-huffyuv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-indeo, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], indeoversion=(int)3; video/x-jpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-msmpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], msmpegversion=(int){ 41, 42, 43 }; video/x-msvideocodec, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], msvideoversion=(int)1; video/x-pn-realvideo, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], systemstream=(boolean)false, rmversion=(int){ 2, 1 }; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)24, depth=(int)24, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, endianness=(int)4321; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)24, depth=(int)24, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, endianness=(int)4321; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)32, depth=(int)24, red_mask=(int)65280, green_mask=(int)16711680, blue_mask=(int)-16777216, endianness=(int)4321; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)16, depth=(int)16, red_mask=(int)63488, green_mask=(int)2016, blue_mask=(int)31, endianness=(int)1234; video/x-raw-rgb, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], bpp=(int)16, depth=(int)15, red_mask=(int)31744, green_mask=(int)992, blue_mask=(int)31, endianness=(int)1234; video/x-raw-yuv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], format=(fourcc){ I420, YUY2, Y42B, YUV9, Y41B }; video/x-rle, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], layout=(string)microsoft, depth=(int)[ 1, 64 ]; video/x-svq, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], svqversion=(int)3, halfpel_flag=(int)[ 0, 1 ], thirdpel_flag=(int)[ 0, 1 ], low_delay=(int)[ 0, 1 ], unknown_svq3_flag=(int)[ 0, 1 ]; video/x-svq, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], svqversion=(int)1; video/x-theora, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-vp3, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ]; video/x-wmv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ], wmvversion=(int){ 1, 2 }
diff --git a/tests/old/testsuite/caps/compatibility.c b/tests/old/testsuite/caps/compatibility.c
deleted file mode 100644
index 9b24e7f7f9..0000000000
--- a/tests/old/testsuite/caps/compatibility.c
+++ /dev/null
@@ -1,93 +0,0 @@
-#include <gst/gst.h>
-
-/* these caps all have a non empty intersection */
-GstStaticCaps sinkcaps = GST_STATIC_CAPS ("video/mpeg, " "mpegtype=(int)[1,2]");
-
-GstStaticCaps mp1parsecaps = GST_STATIC_CAPS ("video/mpeg, " "mpegtype=(int)1");
-
-GstStaticCaps rawcaps = GST_STATIC_CAPS ("video/raw, "
- "fourcc=(fourcc){YV12,YUY2}, "
- "width=(int)[16,4096], " "height=(int)[16,4096]");
-
-GstStaticCaps rawcaps2 = GST_STATIC_CAPS ("video/raw, "
- "fourcc=(fourcc)YUY2, " "height=(int)[16,256]");
-
-GstStaticCaps rawcaps3 = GST_STATIC_CAPS ("video/raw, "
- "fourcc=(fourcc){YV12,YUY2}, " "height=(int)[16,4096]");
-
-#if 0
-/* these caps aren't used yet */
-GstStaticCaps rawcaps4 = GST_STATIC_CAPS ("video/raw, "
- "fourcc=(fourcc){\"YV12\", \"YUYV\"}, " "height=(int)[16,4096]");
-
-GstStaticCaps rawcaps4 = GST_STATIC_CAPS ("video/raw, "
- "fourcc=(fourcc){\"YUYV\", \"YUY2\"}, " "height=(int)[16,4096]");
-#endif
-
-GstStaticCaps rawcaps6 = GST_STATIC_CAPS ("video/raw, "
- "format=(fourcc)\"I420\"; " "video/raw, " "format=(fourcc)\"YUYV\"");
-
-GstStaticCaps rawcaps7 = GST_STATIC_CAPS ("video/raw, "
- "format=(fourcc)\"I420\"; " "video/raw, " "format=(fourcc)\"YV12\"");
-
-
-int
-main (int argc, char *argv[])
-{
- gboolean testret;
- gint ret = 0;
-
- gst_init (&argc, &argv);
-
- testret = gst_caps_is_always_compatible (gst_static_caps_get (&mp1parsecaps),
- gst_static_caps_get (&rawcaps));
- g_print ("4 <-> 2 == %d (invalid, wrong major type)\n", testret);
- ret = ret + (testret == FALSE) ? 0 : 1;
-
- testret = gst_caps_is_always_compatible (gst_static_caps_get (&mp1parsecaps),
- gst_static_caps_get (&sinkcaps));
- g_print ("4 <-> 1 == %d (valid, subset)\n", testret);
- ret = ret + (testret == TRUE) ? 0 : 1;
-
- testret = gst_caps_is_always_compatible (gst_static_caps_get (&sinkcaps),
- gst_static_caps_get (&mp1parsecaps));
- g_print ("1 <-> 4 == %d (invalid, superset)\n", testret);
- ret = ret + (testret == FALSE) ? 0 : 1;
-
- testret = gst_caps_is_always_compatible (gst_static_caps_get (&rawcaps),
- gst_static_caps_get (&rawcaps2));
- g_print ("2 <-> 3 == %d (invalid, ranges)\n", testret);
- ret = ret + (testret == FALSE) ? 0 : 1;
-
- testret = gst_caps_is_always_compatible (gst_static_caps_get (&rawcaps),
- gst_static_caps_get (&rawcaps3));
- g_print ("2 <-> 5 == %d (valid)\n", testret);
- ret = ret + (testret == TRUE) ? 0 : 1;
-
- testret = gst_caps_is_always_compatible (gst_static_caps_get (&rawcaps3),
- gst_static_caps_get (&rawcaps));
- g_print ("5 <-> 2 == %d (invalid)\n", testret);
- ret = ret + (testret == FALSE) ? 0 : 1;
-
- testret = gst_caps_is_always_compatible (gst_static_caps_get (&rawcaps2),
- gst_static_caps_get (&rawcaps3));
- g_print ("3 <-> 5 == %d (valid)\n", testret);
- ret = ret + (testret == TRUE) ? 0 : 1;
-
- testret = gst_caps_is_always_compatible (gst_static_caps_get (&rawcaps2),
- gst_static_caps_get (&rawcaps));
- g_print ("3 <-> 2 == %d (invalid, property missing in source)\n", testret);
- ret = ret + (testret == FALSE) ? 0 : 1;
-
- testret = gst_caps_is_always_compatible (gst_static_caps_get (&rawcaps),
- gst_static_caps_get (&rawcaps));
- g_print ("2 <-> 2 == %d (valid, same caps)\n", testret);
- ret = ret + (testret == TRUE) ? 0 : 1;
-
- testret = gst_caps_is_always_compatible (gst_static_caps_get (&rawcaps6),
- gst_static_caps_get (&rawcaps7));
- g_print ("6 <-> 7 == %d (invalid, second caps doesn't fit)\n", testret);
- ret = ret + (testret == FALSE) ? 0 : 1;
-
- return ret;
-}
diff --git a/tests/old/testsuite/caps/deserialize.c b/tests/old/testsuite/caps/deserialize.c
deleted file mode 100644
index 70e7e79e66..0000000000
--- a/tests/old/testsuite/caps/deserialize.c
+++ /dev/null
@@ -1,85 +0,0 @@
-
-#include <gst/gst.h>
-#include <string.h>
-
-/* The caps_strings file is created using:
- *
- * grep '^.caps' /home/ds/.gstreamer-0.8/registry.xml | \
- * sed 's/^.caps.\(.*\)..caps.$/\1/' | awk '{print length($ln) " " $ln; }' | \
- * sort -n | uniq | sed 's/^[^ ]* //' >caps_strings
- *
- */
-
-
-int
-main (int argc, char *argv[])
-{
- char *filename;
- char *data;
- char **list;
- int i;
- guint length;
- GstCaps *caps;
-
- gst_init (&argc, &argv);
-
- if (argc > 1) {
- filename = g_strdup (argv[1]);
- } else {
- const char *srcdir = g_getenv ("srcdir");
-
- if (srcdir) {
- filename = g_build_filename (srcdir, "caps_strings", NULL);
- } else {
- filename = g_strdup ("caps_strings");
- }
- }
-
- if (!g_file_get_contents (filename, &data, &length, NULL)) {
- g_print ("could not open file %s\n", filename);
- abort ();
- }
-
- list = g_strsplit (data, "\n", 0);
-
- for (i = 0; list[i] != NULL; i++) {
- if (list[i][0] == 0) {
- g_free (list[i]);
- continue;
- }
-
- caps = gst_caps_from_string (list[i]);
- if (caps == NULL) {
- char **list2;
- int j;
-
- g_print ("Could not parse: %s\n", list[i]);
- g_print ("Trying each structure...\n");
-
- list2 = g_strsplit (list[i], ";", 0);
-
- for (j = 0; list2[j] != NULL; j++) {
- caps = gst_caps_from_string (list2[j]);
-
- if (caps == NULL) {
- g_print ("Could not parse %s\n", list2[j]);
- abort ();
- }
-
- gst_caps_unref (caps);
- }
-
- g_print ("parsed each structure individually\n");
- abort ();
- }
-
- gst_caps_unref (caps);
- g_free (list[i]);
- }
-
- g_free (list);
- g_free (data);
- g_free (filename);
-
- return 0;
-}
diff --git a/tests/old/testsuite/caps/enumcaps.c b/tests/old/testsuite/caps/enumcaps.c
deleted file mode 100644
index ac36e7ba3a..0000000000
--- a/tests/old/testsuite/caps/enumcaps.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/* GStreamer test
- * (c) 2004 Ronald Bultje <rbultje@ronald.bitfreak.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gst/gst.h>
-
-typedef enum
-{
- TEST_YES,
- TEST_NO
-}
-TestBool;
-
-#define TEST_BOOL_TYPE (test_bool_get_type ())
-GType
-test_bool_get_type (void)
-{
- static GType etype = 0;
-
- if (etype == 0) {
- static const GEnumValue values[] = {
- {TEST_YES, "TEST_YES", "yes"},
- {TEST_NO, "TEST_NO", "no"},
- {0, NULL, NULL}
- };
-
- etype = g_enum_register_static ("TestBool", values);
- }
- return etype;
-}
-
-gint
-main (gint argc, gchar * argv[])
-{
- gchar *str;
- GstCaps *caps, *res_caps;
- GstStructure *strc;
- GValue value = { 0 };
- TestBool yes, no;
-
- /* register multichannel type */
- gst_init (&argc, &argv);
- test_bool_get_type ();
-
- /* test some caps */
- caps = gst_caps_new_simple ("application/x-gst-test", NULL);
- str = gst_caps_to_string (caps);
- g_assert (str);
- g_free (str);
-
- /* set enums in list */
- strc = gst_caps_get_structure (caps, 0);
- g_value_init (&value, TEST_BOOL_TYPE);
- g_value_set_enum (&value, TEST_YES);
- gst_structure_set_value (strc, "yes", &value);
- g_value_set_enum (&value, TEST_NO);
- gst_structure_set_value (strc, "no", &value);
- g_value_unset (&value);
-
- /* test to-/from-string conversions for enums */
- str = gst_caps_to_string (caps);
- g_assert (str);
- res_caps = gst_caps_from_string (str);
- g_free (str);
-
- /* see if all worked */
- strc = gst_caps_get_structure (res_caps, 0);
- yes = g_value_get_enum (gst_structure_get_value (strc, "yes"));
- no = g_value_get_enum (gst_structure_get_value (strc, "no"));
- g_assert (yes == TEST_YES && no == TEST_NO);
- gst_caps_unref (caps);
- gst_caps_unref (res_caps);
-
- /* yes */
- return 0;
-}
diff --git a/tests/old/testsuite/caps/eratosthenes.c b/tests/old/testsuite/caps/eratosthenes.c
deleted file mode 100644
index 85049564e9..0000000000
--- a/tests/old/testsuite/caps/eratosthenes.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2004 Benjamin Otte <in7y118@public.uni-hamburg.de>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <gst/gst.h>
-#include <stdlib.h>
-
-#define MAX_SIEVE 20
-
-static void
-eratosthenes (GValue * sieve, gboolean up, int size)
-{
- guint i, j;
- GValue temp = { 0, };
- GValue list = { 0, };
-
- g_value_init (sieve, GST_TYPE_INT_RANGE);
- gst_value_set_int_range (sieve, 2, size * size);
- for (i = up ? 2 : size; up ? (i <= size) : (i >= 2); i += up ? 1 : -1) {
- g_value_init (&list, GST_TYPE_LIST);
- for (j = 2 * i; j <= size * size; j += i) {
- GValue v = { 0, };
-
- g_value_init (&v, G_TYPE_INT);
- g_value_set_int (&v, j);
- gst_value_list_append_value (&list, &v);
- g_value_unset (&v);
- }
- gst_value_subtract (&temp, sieve, &list);
- g_value_unset (sieve);
- gst_value_init_and_copy (sieve, &temp);
- g_value_unset (&temp);
- g_value_unset (&list);
- /* g_print ("%2u: %s\n", i, gst_value_serialize (sieve)); */
- }
-
- g_print ("%s\n", gst_value_serialize (sieve));
-}
-
-gint
-main (gint argc, gchar ** argv)
-{
- GValue up = { 0, };
- GValue down = { 0, };
- guint size = MAX_SIEVE;
-
- gst_init (&argc, &argv);
-
- if (argc > 1)
- size = atol (argv[1]);
-
- eratosthenes (&up, TRUE, size);
- eratosthenes (&down, FALSE, size);
-
- g_assert (gst_value_compare (&up, &down) == GST_VALUE_EQUAL);
- return 0;
-}
diff --git a/tests/old/testsuite/caps/filtercaps.c b/tests/old/testsuite/caps/filtercaps.c
deleted file mode 100644
index 4061e3412a..0000000000
--- a/tests/old/testsuite/caps/filtercaps.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2004 Benjamin Otte <in7y118@public.uni-hamburg.de>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <gst/gst.h>
-
-gint
-main (gint argc, gchar ** argv)
-{
- GstCaps *caps;
- GstElement *sink, *identity;
- GstElement *pipeline;
-
- gst_init (&argc, &argv);
-
- pipeline = gst_pipeline_new ("pipeline");
- g_assert (pipeline);
- identity = gst_element_factory_make ("identity", NULL);
- g_assert (identity);
- sink = gst_element_factory_make ("fakesink", NULL);
- g_assert (sink);
- gst_bin_add_many (GST_BIN (pipeline), identity, sink, NULL);
- gst_element_link_filtered (identity, sink,
- gst_caps_new_simple ("audio/x-raw-int", NULL));
- caps = gst_pad_get_caps (gst_element_get_pad (identity, "sink"));
- g_print ("caps: %s\n", gst_caps_to_string (caps));
- g_assert (!gst_caps_is_any (caps));
-
- caps = gst_pad_get_allowed_caps (gst_element_get_pad (identity, "sink"));
- g_print ("allowed caps: %s\n", gst_caps_to_string (caps));
- /* get_allowed_caps doesn't mean anything if you aren't connected */
- g_assert (!caps);
-
- return 0;
-}
diff --git a/tests/old/testsuite/caps/fixed.c b/tests/old/testsuite/caps/fixed.c
deleted file mode 100644
index e0913d2ee9..0000000000
--- a/tests/old/testsuite/caps/fixed.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/* GStreamer
- * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <gst/gst.h>
-
-gint
-main (gint argc, gchar * argv[])
-{
-#if 0
- GstCaps *caps;
-
- gst_init (&argc, &argv);
-
- caps = GST_CAPS_NEW ("testcaps", "unknown/unknown", NULL);
-
- /* newly crrated caps without props is fixed */
- g_assert (GST_CAPS_IS_FIXED (caps));
-
- entry = gst_props_entry_new ("foo", GST_PROPS_INT (5));
- /* this entry is fixed */
- g_assert (gst_props_entry_is_fixed (entry));
-
- props = gst_props_empty_new ();
- /* props are fixed when created */
- g_assert (GST_PROPS_IS_FIXED (props));
-
- gst_props_add_entry (props, entry);
- /* props should still be fixed */
- g_assert (GST_PROPS_IS_FIXED (props));
-
- gst_caps_set_props (caps, props);
- /* caps should still be fixed */
- g_assert (GST_CAPS_IS_FIXED (caps));
-
- entry = gst_props_entry_new ("bar", GST_PROPS_INT_RANGE (1, 5));
- /* this entry is variable */
- g_assert (!gst_props_entry_is_fixed (entry));
-
- gst_props_add_entry (props, entry);
- /* props should be variable now */
- g_assert (!GST_PROPS_IS_FIXED (props));
- /* caps too */
- g_assert (!GST_CAPS_IS_FIXED (caps));
-
- gst_props_remove_entry_by_name (props, "bar");
- /* props should be fixed again now */
- g_assert (GST_PROPS_IS_FIXED (props));
- /* caps too */
- g_assert (GST_CAPS_IS_FIXED (caps));
-
- gst_props_set (props, "foo", GST_PROPS_INT_RANGE (1, 5));
- /* props should be variable again now */
- g_assert (!GST_PROPS_IS_FIXED (props));
- /* caps too */
- g_assert (!GST_CAPS_IS_FIXED (caps));
-
- gst_props_set (props, "foo", GST_PROPS_INT (5));
- /* props should be fixed again now */
- g_assert (GST_PROPS_IS_FIXED (props));
- /* caps too */
- g_assert (GST_CAPS_IS_FIXED (caps));
-
-#endif
-
- return 0;
-}
diff --git a/tests/old/testsuite/caps/fraction-convert.c b/tests/old/testsuite/caps/fraction-convert.c
deleted file mode 100644
index 6c30195710..0000000000
--- a/tests/old/testsuite/caps/fraction-convert.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/* GStreamer
- *
- * fraction-convert.c: test for GstFraction transform
- *
- * Copyright (C) <2004> Thomas Vander Stichele <thomas at apestaart dot org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <math.h>
-#include <gst/gst.h>
-#include <glib.h>
-
-static void
-check_from_double_convert (gdouble value, gint num, gint denom, gdouble prec)
-{
- GValue value1 = { 0 };
- GValue value2 = { 0 };
- gdouble check;
- gint res_num, res_denom;
-
- g_value_init (&value1, G_TYPE_DOUBLE);
- g_value_init (&value2, GST_TYPE_FRACTION);
-
- g_value_set_double (&value1, value);
- g_value_transform (&value1, &value2);
- g_print ("%s = %s ? (expected: %d/%d )\n",
- gst_value_serialize (&value1), gst_value_serialize (&value2), num, denom);
-
- res_num = gst_value_get_fraction_numerator (&value2);
- res_denom = gst_value_get_fraction_denominator (&value2);
- if (res_num == num && res_denom == denom) {
- g_print ("best conversion.\n");
- } else {
- if (fabs (value - res_num / (gdouble) res_denom) <= prec) {
- g_print ("acceptable suboptimal conversion.\n");
- } else {
- g_print ("unacceptable suboptimal conversion.\n");
- g_assert_not_reached ();
- }
- }
- g_value_transform (&value2, &value1);
- g_print ("%s = %s\n",
- gst_value_serialize (&value2), gst_value_serialize (&value1));
- check = g_value_get_double (&value1);
- g_assert (fabs (value - check) <= prec);
-}
-
-static void
-check_from_fraction_convert (gint num, gint denom, gdouble prec)
-{
- GValue value1 = { 0 };
- GValue value2 = { 0 };
- gdouble value;
- gint res_num, res_denom;
-
- g_value_init (&value1, GST_TYPE_FRACTION);
- g_value_init (&value2, G_TYPE_DOUBLE);
-
- gst_value_set_fraction (&value1, num, denom);
- g_value_transform (&value1, &value2);
-
- value = g_value_get_double (&value2);
- g_assert (fabs (value - ((gdouble) num) / denom) < prec);
-
- g_print ("%s = %s, %2.50lf as double\n",
- gst_value_serialize (&value1), gst_value_serialize (&value2), value);
-
- g_value_transform (&value2, &value1);
- g_print ("%s = %s ? (expected: %d/%d )\n",
- gst_value_serialize (&value2), gst_value_serialize (&value1), num, denom);
- value = g_value_get_double (&value2);
-
- res_num = gst_value_get_fraction_numerator (&value1);
- res_denom = gst_value_get_fraction_denominator (&value1);
- if (res_num == num && res_denom == denom) {
- g_print ("best conversion.\n");
- } else {
- if (fabs (value - res_num / (gdouble) res_denom) <= prec) {
- g_print ("acceptable suboptimal conversion.\n");
- } else {
- g_print ("unacceptable suboptimal conversion.\n");
- g_assert_not_reached ();
- }
- }
-
- g_value_unset (&value2);
- g_value_unset (&value1);
-}
-
-static void
-transform_test (void)
-{
- check_from_fraction_convert (30000, 1001, 1.0e-9);
- check_from_fraction_convert (1, G_MAXINT, 1.0e-9);
- check_from_fraction_convert (G_MAXINT, 1, 1.0e-9);
-
- check_from_double_convert (0.0, 0, 1, 1.0e-9);
- check_from_double_convert (1.0, 1, 1, 1.0e-9);
- check_from_double_convert (-1.0, -1, 1, 1.0e-9);
- check_from_double_convert (M_PI, 1881244168, 598818617, 1.0e-9);
- check_from_double_convert (-M_PI, -1881244168, 598818617, 1.0e-9);
-
- check_from_double_convert (G_MAXDOUBLE, G_MAXINT, 1, G_MAXDOUBLE);
- check_from_double_convert (G_MINDOUBLE, 0, 1, G_MAXDOUBLE);
- check_from_double_convert (-G_MAXDOUBLE, -G_MAXINT, 1, G_MAXDOUBLE);
- check_from_double_convert (-G_MINDOUBLE, 0, 1, G_MAXDOUBLE);
-
- check_from_double_convert (((gdouble) G_MAXINT) + 1, G_MAXINT, 1,
- G_MAXDOUBLE);
- check_from_double_convert (((gdouble) G_MININT) - 1, G_MININT + 1, 1,
- G_MAXDOUBLE);
-
- check_from_double_convert (G_MAXINT - 1, G_MAXINT - 1, 1, 0);
- check_from_double_convert (G_MININT + 1, G_MININT + 1, 1, 0);
-}
-
-int
-main (int argc, char *argv[])
-{
- gst_init (&argc, &argv);
-
- transform_test ();
-
- return 0;
-}
diff --git a/tests/old/testsuite/caps/fraction-multiply-and-zero.c b/tests/old/testsuite/caps/fraction-multiply-and-zero.c
deleted file mode 100644
index 50c0a53e75..0000000000
--- a/tests/old/testsuite/caps/fraction-multiply-and-zero.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/* GStreamer
- *
- * fraction.c: test for all GstFraction operations
- *
- * Copyright (C) <2004> Thomas Vander Stichele <thomas at apestaart dot org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <gst/gst.h>
-#include <glib.h>
-
-static void
-check_multiplication (int num1, int den1, int num2, int den2, int num_result,
- int den_result)
-{
- GValue value1 = { 0 };
- GValue value2 = { 0 };
- GValue value3 = { 0 };
-
- g_value_init (&value1, GST_TYPE_FRACTION);
- g_value_init (&value2, GST_TYPE_FRACTION);
- g_value_init (&value3, GST_TYPE_FRACTION);
-
- gst_value_set_fraction (&value1, num1, den1);
- gst_value_set_fraction (&value2, num2, den2);
- g_print ("%d/%d * %d/%d = ", num1, den1, num2, den2);
- gst_value_fraction_multiply (&value3, &value1, &value2);
- g_print ("%d/%d (should be %d/%d)\n",
- gst_value_get_fraction_numerator (&value3),
- gst_value_get_fraction_denominator (&value3), num_result, den_result);
- g_assert (gst_value_get_fraction_numerator (&value3) == num_result);
- g_assert (gst_value_get_fraction_denominator (&value3) == den_result);
-
- g_value_unset (&value1);
- g_value_unset (&value2);
- g_value_unset (&value3);
-}
-
-static void
-check_equal (int num1, int den1, int num2, int den2)
-{
- GValue value1 = { 0 };
- GValue value2 = { 0 };
-
- g_value_init (&value1, GST_TYPE_FRACTION);
- g_value_init (&value2, GST_TYPE_FRACTION);
-
- gst_value_set_fraction (&value1, num1, den1);
- gst_value_set_fraction (&value2, num2, den2);
- g_print ("%d/%d == %d/%d ? ", num1, den1, num2, den2);
- g_assert (gst_value_compare (&value1, &value2) == GST_VALUE_EQUAL);
- g_print ("yes\n");
-
- g_value_unset (&value1);
- g_value_unset (&value2);
-}
-
-static void
-zero_test (void)
-{
- GValue value1 = { 0 };
-
- g_value_init (&value1, GST_TYPE_FRACTION);
-
- /* fractions are initialized at 0 */
- g_assert (gst_value_get_fraction_numerator (&value1) == 0);
- g_assert (gst_value_get_fraction_denominator (&value1) == 1);
-
- /* every zero value is set to 0/1 */
- gst_value_set_fraction (&value1, 0, 235);
- g_assert (gst_value_get_fraction_numerator (&value1) == 0);
- g_assert (gst_value_get_fraction_denominator (&value1) == 1);
- gst_value_set_fraction (&value1, 0, -G_MAXINT);
- g_assert (gst_value_get_fraction_numerator (&value1) == 0);
- g_assert (gst_value_get_fraction_denominator (&value1) == 1);
-
- g_value_unset (&value1);
-}
-
-int
-main (int argc, char *argv[])
-{
- GValue value1 = { 0 };
- GValue value2 = { 0 };
- GValue value3 = { 0 };
-
- gst_init (&argc, &argv);
-
- g_value_init (&value1, GST_TYPE_FRACTION);
- g_value_init (&value2, GST_TYPE_FRACTION);
- g_value_init (&value3, GST_TYPE_FRACTION);
-
- /*** zeroes ***/
-
- /* basic zero tests */
- zero_test ();
-
- /* check all zeroes are zeroes */
- check_equal (0, 1, 0, 12345);
- check_equal (0, 1, 0, -1);
-
- /* check multiplying with zeroes results in zeroes */
- check_multiplication (0, 1, 17, 18, 0, 1);
- check_multiplication (0, -13, -G_MAXINT, 2736, 0, 1);
-
- /*** large numbers ***/
-
- /* check multiplying large numbers works */
- check_multiplication (G_MAXINT, 1, G_MAXINT - 1, G_MAXINT, G_MAXINT - 1, 1);
- check_multiplication (-G_MAXINT, 1, -G_MAXINT + 1, -G_MAXINT, -G_MAXINT + 1,
- 1);
- check_multiplication (G_MAXINT / 28, 459, -28, -G_MAXINT / 459,
- G_MAXINT / 28 * 28, G_MAXINT / 459 * 459);
- check_multiplication (3117 * 13, -17, 3117 * 17, 13, -3117 * 3117, 1);
-
- return 0;
-}
diff --git a/tests/old/testsuite/caps/intersect2.c b/tests/old/testsuite/caps/intersect2.c
deleted file mode 100644
index d240993faf..0000000000
--- a/tests/old/testsuite/caps/intersect2.c
+++ /dev/null
@@ -1,121 +0,0 @@
-#include <gst/gst.h>
-
-GstStaticCaps rawcaps1 = GST_STATIC_CAPS ("video/x-raw-yuv, "
- "fourcc:fourcc=\"YUYV\", "
- "height:int=640, "
- "width:int=480, "
- "framerate:float=30.0; "
- "video/x-raw-yuv, "
- "fourcc:fourcc=\"I420\", "
- "height:int=640, " "width:int=480, " "framerate:float=30.0");
-
-GstStaticCaps rawcaps2 = GST_STATIC_CAPS ("video/x-raw-yuv");
-
-GstStaticCaps rawcaps3 =
-GST_STATIC_CAPS ("video/x-raw-yuv, height=(int) [ 0, MAX ]");
-
-GstStaticCaps rawcaps4 =
- GST_STATIC_CAPS
- ("video/x-raw-yuv, format=(fourcc)YUY2; video/x-raw-yuv, format=(fourcc)UYVY");
-
-GstStaticCaps rawcaps5 =
- GST_STATIC_CAPS
- ("video/x-raw-yuv, format=(fourcc)YUY2, framerate=(double)[0,1.79769e+308], width=(int)[0,2147483647], height=(int)[0,2147483647]; video/x-raw-yuv, format=(fourcc)UYVY, framerate=(double)[0,1.79769e+308], width=(int)[0,2147483647], height=(int)[0,2147483647]");
-
-GstStaticCaps rawcaps6 =
- GST_STATIC_CAPS
- ("video/x-raw-yuv, format=(fourcc)YUY2, width=(int)320, height=(int)240");
-
-GstStaticCaps rawcaps7 =
- GST_STATIC_CAPS
- ("video/x-raw-yuv, format=(fourcc)YUY2, width=(int)[0,2147483647], height=(int)[0,2147483647], framerate=(double)[0,1.79769e+308]");
-
-GstStaticCaps rawcaps8 =
- GST_STATIC_CAPS
- ("video/x-raw-yuv, format=(fourcc)YUY2, width=(int)320, height=(int)240");
-
-GstStaticCaps rawcaps9 =
- GST_STATIC_CAPS
- ("audio/x-raw-float, "
- "channel-positions=(int)< "
- "{ 1, 2, 3, 4, 5, 6 }, "
- "{ 1, 2 }, "
- "{ 1, 2, 3, 4, 5, 6 }, " "{ 1, 2, 3, 4, 5, 6 }, " "{ 4, 5, 6 }, " "6 >");
-
-GstStaticCaps rawcaps10 =
- GST_STATIC_CAPS
- ("audio/x-raw-float, "
- "channel-positions=(int)< 1, { 2, 3, 4, 5, 6 }, 3, 4, {4, 5, 6 }, "
- "{ 4, 5, 6 } >");
-
-
-int
-main (int argc, char *argv[])
-{
- GstCaps *caps1;
- GstCaps *caps2;
- GstCaps *caps3;
- GstCaps *caps4;
- GstCaps *caps;
-
- gst_init (&argc, &argv);
-
- caps1 = gst_caps_copy (gst_static_caps_get (&rawcaps1));
- caps2 =
- gst_caps_new_full (gst_structure_copy (gst_caps_get_structure
- (gst_static_caps_get (&rawcaps1), 0)), NULL);
-
-#if 0
- gst_caps_set (caps1, "height", GST_PROPS_INT (640));
- gst_caps_set (caps1, "width", GST_PROPS_INT (480));
- gst_caps_set (caps1, "framerate", GST_PROPS_FLOAT (30.0));
-#endif
-
- caps = gst_caps_intersect (caps1, caps2);
- g_print ("caps %s\n", gst_caps_to_string (caps));
- if (gst_caps_is_empty (caps))
- return 1;
- gst_caps_unref (caps1);
- gst_caps_unref (caps2);
-
- caps1 = gst_caps_copy (gst_static_caps_get (&rawcaps2));
- caps2 = gst_caps_copy (gst_static_caps_get (&rawcaps3));
- caps = gst_caps_intersect (caps1, caps2);
- g_print ("caps %s\n", gst_caps_to_string (caps));
- if (gst_caps_is_empty (caps))
- return 1;
- gst_caps_unref (caps1);
- gst_caps_unref (caps2);
-
- caps1 = gst_caps_copy (gst_static_caps_get (&rawcaps4));
- caps2 = gst_caps_copy (gst_static_caps_get (&rawcaps5));
- caps3 = gst_caps_copy (gst_static_caps_get (&rawcaps6));
- caps4 = gst_caps_intersect (caps1, caps2);
- caps = gst_caps_intersect (caps3, caps4);
- g_print ("caps4 %s\n", gst_caps_to_string (caps4));
- g_print ("caps %s\n", gst_caps_to_string (caps));
- gst_caps_unref (caps1);
- gst_caps_unref (caps2);
- gst_caps_unref (caps3);
- gst_caps_unref (caps4);
-
- caps1 = gst_caps_copy (gst_static_caps_get (&rawcaps7));
- caps2 = gst_caps_copy (gst_static_caps_get (&rawcaps8));
- caps = gst_caps_intersect (caps1, caps2);
- g_print ("caps %s\n", gst_caps_to_string (caps));
- if (gst_caps_is_empty (caps))
- return 1;
- gst_caps_unref (caps1);
- gst_caps_unref (caps2);
-
- caps1 = gst_caps_copy (gst_static_caps_get (&rawcaps9));
- caps2 = gst_caps_copy (gst_static_caps_get (&rawcaps10));
- caps = gst_caps_intersect (caps1, caps2);
- g_print ("caps %s\n", gst_caps_to_string (caps));
- if (gst_caps_is_empty (caps))
- return 1;
- gst_caps_unref (caps1);
- gst_caps_unref (caps2);
-
- return 0;
-}
diff --git a/tests/old/testsuite/caps/intersection.c b/tests/old/testsuite/caps/intersection.c
deleted file mode 100644
index f4eee86208..0000000000
--- a/tests/old/testsuite/caps/intersection.c
+++ /dev/null
@@ -1,109 +0,0 @@
-#include <gst/gst.h>
-
-/* these caps all have a non empty intersection */
-GstStaticCaps sinkcaps = GST_STATIC_CAPS ("video/mpeg, "
- "mpegtype=(int)1, "
- "foo1=(int)[20,40], " "foo2=(int)[20,40], " "foo3=(int)[10,20]");
-
-GstStaticCaps mp1parsecaps = GST_STATIC_CAPS ("video/mpeg, "
- "mpegtype=(int)1, "
- "foo1=(int)30, " "foo2=(int)[20,30], " "foo3=(int)[20,30]");
-
-
-
-GstStaticCaps rawcaps = GST_STATIC_CAPS ("video/raw, "
- "width=(int)[16,4096], " "height=(int)[16,4096]");
-
-GstStaticCaps rawcaps2 = GST_STATIC_CAPS ("video/raw, "
- "height=(int)[16,256], " "depth=(int)16");
-
-GstStaticCaps rawcaps3 = GST_STATIC_CAPS ("video/raw, "
- "fourcc=(fourcc){\"YUY2\", \"YV12\" }, " "height=(int)[16,4096]");
-
-GstStaticCaps rawcaps4 = GST_STATIC_CAPS ("video/raw, "
- "fourcc=(fourcc){\"YUY2\",\"YV12\",\"YUYV\" }, " "height=(int)[16,4096]");
-
-GstStaticCaps rawcaps5 = GST_STATIC_CAPS ("video/raw, "
- "fourcc=(fourcc){\"YUYV\",\"YUY2\"}, " "height=(int)[16,4096]");
-
-GstStaticCaps rawcaps6 = GST_STATIC_CAPS ("video/raw, "
- "fourcc=(fourcc)\"YUYV\", "
- "height=(int)640, "
- "width=(int)480, "
- "framerate=(double)30.0; "
- "video/raw, "
- "fourcc=(fourcc)\"I420\", "
- "height=(int)640, " "width=(int)480, " "framerate=(double)30.0");
-
-GstStaticCaps rawcaps7 =
- GST_STATIC_CAPS
- ("video/x-raw-yuv, format=(fourcc)YUY2, width=(int)[1,2147483647], height=(int)[1,2147483647], framerate=(double)[0,1.79769e+308]");
-
-GstStaticCaps rawcaps8 =
- GST_STATIC_CAPS
- ("video/x-raw-yuv, format=(fourcc){ I420, YV12, YUY2 }, width=(int)[16,4096], height=(int)[16,4096], framerate=(double)[0,1.79769e+308]");
-
-int
-main (int argc, char *argv[])
-{
- xmlDocPtr doc;
- xmlNodePtr parent;
- GstCaps *caps;
-
- gst_init (&argc, &argv);
-
- doc = xmlNewDoc ((const xmlChar *) "1.0");
- doc->xmlRootNode =
- xmlNewDocNode (doc, NULL, (const xmlChar *) "Capabilities", NULL);
-
- /*
- for (i = 0; i<100000; i++) {
- caps = gst_caps_intersect (gst_static_caps_get (rawcaps3), GST_CAPS_GET (rawcaps4));
- gst_caps_unref (caps);
- }
- */
-
- caps = gst_caps_intersect (gst_static_caps_get (&sinkcaps),
- gst_static_caps_get (&mp1parsecaps));
- parent =
- xmlNewChild (doc->xmlRootNode, NULL, (const xmlChar *) "Capabilities1",
- NULL);
- gst_caps_save_thyself (caps, parent);
-
- caps = gst_caps_intersect (gst_static_caps_get (&rawcaps),
- gst_static_caps_get (&rawcaps2));
- parent =
- xmlNewChild (doc->xmlRootNode, NULL, (const xmlChar *) "Capabilities2",
- NULL);
- gst_caps_save_thyself (caps, parent);
-
- caps = gst_caps_intersect (gst_static_caps_get (&rawcaps3),
- gst_static_caps_get (&rawcaps4));
- parent =
- xmlNewChild (doc->xmlRootNode, NULL, (const xmlChar *) "Capabilities3",
- NULL);
- gst_caps_save_thyself (caps, parent);
-
- caps = gst_caps_intersect (gst_static_caps_get (&rawcaps3),
- gst_static_caps_get (&rawcaps5));
- parent =
- xmlNewChild (doc->xmlRootNode, NULL, (const xmlChar *) "Capabilities4",
- NULL);
- gst_caps_save_thyself (caps, parent);
-
- caps = gst_caps_intersect (gst_static_caps_get (&rawcaps6),
- gst_caps_new_full (gst_structure_copy (gst_caps_get_structure
- (gst_static_caps_get (&rawcaps6), 0)), NULL));
- parent =
- xmlNewChild (doc->xmlRootNode, NULL, (const xmlChar *) "Capabilities5",
- NULL);
- gst_caps_save_thyself (caps, parent);
-
- caps = gst_caps_intersect (gst_static_caps_get (&rawcaps7),
- gst_static_caps_get (&rawcaps8));
- g_print ("intersection: %s\n", gst_caps_to_string (caps));
-
- xmlDocDump (stdout, doc);
-
- return 0;
-}
diff --git a/tests/old/testsuite/caps/normalisation.c b/tests/old/testsuite/caps/normalisation.c
deleted file mode 100644
index 48dc8b25c1..0000000000
--- a/tests/old/testsuite/caps/normalisation.c
+++ /dev/null
@@ -1,85 +0,0 @@
-#include <gst/gst.h>
-
-/* these caps all have a non empty intersection */
-GstStaticCaps sinkcaps = GST_STATIC_CAPS ("video/mpeg, "
- "fourcc=(fourcc){\"YV12\",\"YUY2\"}, "
- "foo1=(int)[20,40], " "foo2=(int)[20,40], " "foo3=(int)[10,20]");
-
-GstStaticCaps mp1parsecaps = GST_STATIC_CAPS ("video/mpeg, "
- "fourcc=(fourcc){\"YV12\",\"YUY2\"}, " "foo4=(fourcc){\"YV12\",\"YUY2\"}");
-
-GstStaticCaps rawcaps = GST_STATIC_CAPS ("video/raw, "
- "width=(int)[16,4096], "
- "height=(int)[16,4096], " "fourcc=(fourcc){\"YV12\",\"YUY2\"}");
-
-GstStaticCaps rawcaps2 = GST_STATIC_CAPS ("video/raw, "
- "width=(int)[16,256], "
- "height=(int)16; " "video/raw, " "width=(int)[16,256], " "height=(int)16");
-
-GstStaticCaps rawcaps3 = GST_STATIC_CAPS ("video/raw, "
- "width=(int)[16,256], "
- "height=(int)16; "
- "video/raw, "
- "width=(int)[16,256], "
- "height=(int)16; "
- "video/raw, "
- "fourcc=(fourcc){\"YV12\",\"YUY2\"}, " "height=(int)[16,4096]");
-
-GstStaticCaps rawcaps4 = GST_STATIC_CAPS ("x, "
- "y=(int){1,2}, " "z=(int){3,4}; " "a, " "b=(int){5,6}, " "c=(int){7,8}");
-
-/* defined, not used
-GST_CAPS_FACTORY (rawcaps4,
- GST_CAPS_NEW (
- "raw2_sink_caps",
- "video/raw",
- "fourcc", GST_PROPS_LIST (
- GST_PROPS_FOURCC (GST_STR_FOURCC ("YUY2")),
- GST_PROPS_FOURCC (GST_STR_FOURCC ("YV12")),
- GST_PROPS_FOURCC (GST_STR_FOURCC ("YUYV"))
- ),
- "height", GST_PROPS_INT_RANGE (16, 4096)
- )
-);
-
-GST_CAPS_FACTORY (rawcaps5,
- GST_CAPS_NEW (
- "raw2_sink_caps",
- "video/raw",
- "fourcc", GST_PROPS_LIST (
- GST_PROPS_FOURCC (GST_STR_FOURCC ("YUYV")),
- GST_PROPS_FOURCC (GST_STR_FOURCC ("YUY2"))
- ),
- "height", GST_PROPS_INT_RANGE (16, 4096)
- )
-);
-*/
-
-int
-main (int argc, char *argv[])
-{
- GstCaps *caps;
-
- gst_init (&argc, &argv);
-
- caps = gst_caps_normalize (gst_static_caps_get (&sinkcaps));
- g_print ("\n%s\n", gst_caps_to_string (caps));
-
- caps = gst_caps_normalize (gst_static_caps_get (&mp1parsecaps));
- g_print ("\n%s\n", gst_caps_to_string (caps));
-
- caps = gst_caps_normalize (gst_static_caps_get (&rawcaps));
- g_print ("\n%s\n", gst_caps_to_string (caps));
-
- caps = gst_caps_normalize (gst_static_caps_get (&rawcaps2));
- g_print ("\n%s\n", gst_caps_to_string (caps));
-
- caps = gst_caps_normalize (gst_static_caps_get (&rawcaps3));
- g_print ("\n%s\n", gst_caps_to_string (caps));
-
- caps = gst_caps_normalize (gst_static_caps_get (&rawcaps4));
- g_assert (gst_caps_get_size (caps) == 8);
- g_print ("\n%s\n", gst_caps_to_string (caps));
-
- return 0;
-}
diff --git a/tests/old/testsuite/caps/random.c b/tests/old/testsuite/caps/random.c
deleted file mode 100644
index e95b01cb40..0000000000
--- a/tests/old/testsuite/caps/random.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/* GStreamer
- * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <gst/gst.h>
-
-void
-assert_on_error (GstDebugCategory * category, GstDebugLevel level,
- const gchar * file, const gchar * function, gint line, GObject * object,
- GstDebugMessage * message, gpointer data)
-{
- g_assert (level != GST_LEVEL_ERROR);
-}
-
-gint
-main (gint argc, gchar * argv[])
-{
- /* this file contains random tests for stuff that went wrong in some version
- * and should be tested so we're sure it works right now
- * Please add what exactly the code tests for in your test */
-
- gst_init (&argc, &argv);
-
- /* TEST 1:
- * gstcaps.c 1.120 used a code path that caused a GST_ERROR for the tested
- * caps when simplifying even though that is absolutely valid */
- {
- GstCaps *caps =
- gst_caps_from_string
- ("some/type, a=(int)2, b=(int)3, c=bla; some/type, a=(int)2, c=bla");
- gst_debug_add_log_function (assert_on_error, NULL);
- gst_caps_do_simplify (caps);
- gst_debug_remove_log_function (assert_on_error);
- gst_caps_unref (caps);
- }
-
- /* TEST 2:
- * gstvalue.c 1.34 had a broken comparison function for int ranges that
- * returned GST_VALUE_EQUAL even though the range end was different */
- {
- GValue v1 = { 0, };
- GValue v2 = { 0, };
-
- g_value_init (&v1, GST_TYPE_INT_RANGE);
- g_value_init (&v2, GST_TYPE_INT_RANGE);
- gst_value_set_int_range (&v1, 1, 2);
- gst_value_set_int_range (&v2, 1, 3);
- g_assert (gst_value_compare (&v1, &v2) != GST_VALUE_EQUAL);
- g_value_unset (&v1);
- g_value_unset (&v2);
- }
-
- return 0;
-}
diff --git a/tests/old/testsuite/caps/renegotiate.c b/tests/old/testsuite/caps/renegotiate.c
deleted file mode 100644
index 7ff14b2872..0000000000
--- a/tests/old/testsuite/caps/renegotiate.c
+++ /dev/null
@@ -1,150 +0,0 @@
-
-#include <gst/gst.h>
-#include <string.h>
-#include <unistd.h>
-
-
-static GstPad *sinesrcpad;
-
-static GstStaticCaps caps1 = GST_STATIC_CAPS ("audio/x-raw-int, "
- "endianness=(int)1234, "
- "signed=(boolean)true, "
- "width=(int)16, " "depth=(int)16, " "rate=(int)48000, " "channels=(int)1");
-static GstStaticCaps caps2 = GST_STATIC_CAPS ("audio/x-raw-int, "
- "endianness=(int)1234, "
- "signed=(boolean)true, "
- "width=(int)16, " "depth=(int)16, " "rate=(int)44100, " "channels=(int)1");
-
-int stage = 0;
-
-static GstCaps *
-my_fixate (GstPad * pad, GstCaps * caps, gpointer user_data)
-{
- const char *element_name;
- const char *pad_name;
-
- element_name = gst_element_get_name (gst_pad_get_parent (pad));
- pad_name = gst_pad_get_name (pad);
-
- g_print ("%s:%s: %s\n", element_name, pad_name, gst_caps_to_string (caps));
-
- if (strcmp (element_name, "sinesrc0") == 0 && strcmp (pad_name, "src") == 0) {
- GstCaps *icaps;
- const GstCaps *mycaps;
- int rate;
-
- sinesrcpad = pad;
-
- if (stage == 0) {
- mycaps = gst_static_caps_get (&caps1);
- rate = 48000;
- } else {
- mycaps = gst_static_caps_get (&caps2);
- rate = 44100;
- }
- icaps = gst_caps_intersect (caps, mycaps);
- if (!gst_caps_is_empty (icaps)) {
- gst_caps_unref (icaps);
- g_print ("returning %d\n", rate);
- return gst_caps_copy (mycaps);
- }
- gst_caps_unref (icaps);
- }
-
- return NULL;
-}
-
-int
-main (int argc, char *argv[])
-{
- GstElement *pipeline;
- GError *error = NULL;
- GstIterator *iter1, *iter2;
- gint done1 = FALSE, done2 = FALSE;
- gpointer element;
-
- gst_init (&argc, &argv);
-
- /* change sinesrk to sinesrc once gst_parse_launch is fixed */
- pipeline = gst_parse_launch ("sinesrc ! audioconvert ! "
- "audio/x-raw-int, channels=2, rate=48000;"
- "audio/x-raw-int, channels=1, rate=44100 !" "fakesink", &error);
-
- if (error != NULL) {
- g_print
- ("oops, couldn't build pipeline. You probably don't have audioconvert or sinesrc\n"
- "the error was: %s\n", error->message);
- g_error_free (error);
- exit (0);
- }
-
- iter1 = gst_bin_iterate_elements (GST_BIN (pipeline));
- while (!done1) {
- switch (gst_iterator_next (iter1, &element)) {
- case GST_ITERATOR_OK:
- {
- gpointer pad;
-
- iter2 = gst_element_iterate_pads (element);
- while (!done2) {
- switch (gst_iterator_next (iter2, &pad)) {
- case GST_ITERATOR_OK:
- if (gst_pad_get_direction (pad) == GST_PAD_SRC) {
- g_signal_connect (G_OBJECT (pad), "fixate",
- G_CALLBACK (my_fixate), NULL);
- }
- gst_object_unref (pad);
- break;
- case GST_ITERATOR_DONE:
- done2 = TRUE;
- break;
- case GST_ITERATOR_RESYNC:
- case GST_ITERATOR_ERROR:
- exit (1);
- break;
- }
- }
- gst_iterator_free (iter2);
-
- gst_object_unref (element);
- break;
- }
- case GST_ITERATOR_DONE:
- done1 = TRUE;
- break;
- case GST_ITERATOR_RESYNC:
- case GST_ITERATOR_ERROR:
- exit (1);
- break;
- }
- }
- gst_iterator_free (iter1);
-
- /*g_signal_connect (pipeline, "deep_notify",
- G_CALLBACK (gst_element_default_deep_notify), NULL); */
-
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
-
- /*
- i = 0;
- while (1) {
- gst_bin_iterate (GST_BIN (pipeline));
- i++;
- if (i == 10) {
- stage = 1;
- g_print ("10 iterations\n");
- ret = gst_pad_renegotiate (sinesrcpad);
- g_print ("negotiation returned %d\n", ret);
- }
- if (i == 20) {
- g_print ("20 iterations\n");
- exit (0);
- }
- }
- */
- /* Like totally not sure how to do this in THREADED. Punting for now! */
-
- sleep (5);
-
- return 0;
-}
diff --git a/tests/old/testsuite/caps/sets.c b/tests/old/testsuite/caps/sets.c
deleted file mode 100644
index e279427f07..0000000000
--- a/tests/old/testsuite/caps/sets.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2004 Benjamin Otte <in7y118@public.uni-hamburg.de>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <gst/gst.h>
-#include <string.h>
-#include "caps.h"
-
-static void
-check_caps (const gchar * eins, const gchar * zwei)
-{
- GstCaps *one, *two, *test, *test2, *test3, *test4;
-
- one = gst_caps_from_string (eins);
- two = gst_caps_from_string (zwei);
- g_print (" A = %u\n", strlen (eins));
- g_print (" B = %u\n", strlen (zwei));
-
- test = gst_caps_intersect (one, two);
- if (gst_caps_is_equal (one, two)) {
- g_print (" EQUAL\n\n");
- g_assert (gst_caps_is_equal (one, test));
- g_assert (gst_caps_is_equal (two, test));
- } else if (!gst_caps_is_any (one) || gst_caps_is_empty (two)) {
- test2 = gst_caps_subtract (one, test);
- g_print (" A - B = %u\n", strlen (gst_caps_to_string (test2)));
- /* test2 = one - (one A two) = one - two */
- test3 = gst_caps_intersect (test2, two);
- g_print (" empty = %s\n", gst_caps_to_string (test3));
- g_assert (gst_caps_is_empty (test3));
- gst_caps_unref (test3);
- test3 = gst_caps_union (test2, two);
- g_print (" A + B = %u\n", strlen (gst_caps_to_string (test3)));
- /* test3 = one - two + two = one + two */
- g_print (" A + B = %s\n", gst_caps_to_string (gst_caps_subtract (one,
- test3)));
- g_assert (gst_caps_is_subset (one, test3));
- test4 = gst_caps_union (one, two);
- g_assert (gst_caps_is_equal (test3, test4));
- g_print (" NOT EQUAL\n\n");
- gst_caps_unref (test2);
- gst_caps_unref (test3);
- gst_caps_unref (test4);
- } else {
- g_print (" ANY CAPS\n\n");
- }
- gst_caps_unref (test);
- gst_caps_unref (two);
- gst_caps_unref (one);
-}
-
-gint
-main (gint argc, gchar ** argv)
-{
- guint i, j;
-
- gst_init (&argc, &argv);
-
- for (i = 0; i < G_N_ELEMENTS (caps_list); i++) {
- for (j = 0; j < G_N_ELEMENTS (caps_list); j++) {
- g_print ("%u - %u\n", i, j);
- check_caps (caps_list[i], caps_list[j]);
- }
- }
-
- return 0;
-}
diff --git a/tests/old/testsuite/caps/simplify.c b/tests/old/testsuite/caps/simplify.c
deleted file mode 100644
index 6adb65ce3e..0000000000
--- a/tests/old/testsuite/caps/simplify.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (C) 2004 Benjamin Otte <in7y118@public.uni-hamburg.de>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <gst/gst.h>
-#include <string.h>
-#include "caps.h"
-
-/* statistics junkie!!! */
-static guint size_before = 0, size_after = 0;
-static guint length_before = 0, length_after = 0;
-static guint impossible = 0, success = 0, failure = 0;
-
-static void
-check_caps (GstCaps * caps)
-{
- gchar *before, *after;
- GstCaps *old;
-
- before = gst_caps_to_string (caps);
- old = gst_caps_copy (caps);
- gst_caps_do_simplify (caps);
- after = gst_caps_to_string (caps);
- g_assert (gst_caps_get_size (caps) <= gst_caps_get_size (old));
- if (gst_caps_get_size (caps) == gst_caps_get_size (old))
- g_assert (strlen (after) <= strlen (before));
- g_assert (gst_caps_is_equal (caps, old));
- g_print ("%s %2u/%-4u => %2u/%-4u\n",
- gst_caps_get_size (caps) < gst_caps_get_size (old) ||
- strlen (after) < strlen (before) ? "REDUCED" :
- (gst_caps_get_size (old) < 2 ? " --- " : " "),
- gst_caps_get_size (old), strlen (before),
- gst_caps_get_size (caps), strlen (after));
-
- size_before += gst_caps_get_size (old);
- size_after += gst_caps_get_size (caps);
- length_before += strlen (before);
- length_after += strlen (after);
- if (gst_caps_get_size (old) < 2) {
- impossible++;
- } else if (gst_caps_get_size (caps) < gst_caps_get_size (old) ||
- strlen (after) < strlen (before)) {
- success++;
- } else {
- failure++;
- }
-
- g_free (before);
- g_free (after);
- gst_caps_unref (old);
-}
-
-gint
-main (gint argc, gchar ** argv)
-{
- guint i, j;
-
- gst_init (&argc, &argv);
-
- for (i = 0; i < G_N_ELEMENTS (caps_list); i++) {
- GstCaps *caps = gst_caps_from_string (caps_list[i]);
-
- g_print (" %2u ", i);
- check_caps (caps);
- if (!gst_caps_is_any (caps)) {
- for (j = 0; j < G_N_ELEMENTS (caps_list); j++) {
- GstCaps *temp, *temp2;
- GstCaps *caps2 = gst_caps_from_string (caps_list[j]);
-
- /* subtraction */
- temp = gst_caps_subtract (caps, caps2);
-
- g_print ("%2u - %2u ", i, j);
- check_caps (temp);
- gst_caps_unref (temp);
- /* union */
- temp = gst_caps_union (caps, caps2);
- g_print ("%2u + %2u ", i, j);
- check_caps (temp);
- if (i == j)
- g_assert (gst_caps_get_size (caps) == gst_caps_get_size (temp));
- g_assert (gst_caps_is_subset (caps, temp));
- g_assert (gst_caps_is_subset (caps2, temp));
- /* appending (union without simplifying) */
- temp2 = gst_caps_copy (caps);
- gst_caps_append (temp2, caps2);
- g_assert (gst_caps_is_equal (temp, temp2));
- gst_caps_unref (temp2);
- gst_caps_unref (temp);
- }
- }
- gst_caps_unref (caps);
- }
- g_print ("\n\nSTATISTICS:\n");
- g_print ("\nOf all caps tried\n");
- g_print ("%3u (%02.4g%%) caps were already at minimum size.\n", impossible,
- 100.0 * ((double) impossible) / (impossible + success + failure));
- g_print ("%3u (%02.4g%%) caps were successfully reduced.\n", success,
- 100.0 * ((double) success) / (impossible + success + failure));
- g_print ("%3u (%02.4g%%) caps could not be reduced.\n", failure,
- 100.0 * ((double) failure) / (impossible + success + failure));
- g_print ("\nOf all caps that could possibly be reduced\n");
- g_print ("%02.4g%% were reduced\n",
- 100.0 * ((double) success) / (success + failure));
- g_print ("%02.4g%% average reduction in caps structure amount\n",
- 100.0 * (1.0 - ((double) size_after) / size_before));
- g_print ("%02.4g%% average reduction in caps serialization length\n",
- 100.0 * (1.0 - ((double) length_after) / length_before));
-
- return 0;
-}
diff --git a/tests/old/testsuite/caps/string-conversions.c b/tests/old/testsuite/caps/string-conversions.c
deleted file mode 100644
index e28c3bdd1a..0000000000
--- a/tests/old/testsuite/caps/string-conversions.c
+++ /dev/null
@@ -1,205 +0,0 @@
-#include <gst/gst.h>
-#include <string.h>
-
-GstStaticCaps caps1 = GST_STATIC_CAPS ("video/mpeg, " "mpegtype=(int){1,2}");
-
-GstStaticCaps caps2 = GST_STATIC_CAPS ("video/mpeg, " "mpegtype=(int){1}");
-
-GstStaticCaps caps3 = GST_STATIC_CAPS ("video/raw, "
- "fourcc=(fourcc){\"YV12\",\"YUY2\"}, "
- "width=(int)[16,4096], " "height=(int)[16,4096]");
-
-GstStaticCaps caps4 = GST_STATIC_CAPS ("video/raw, "
- "fourcc=(fourcc)\"YV12\", " "height=(int)[16,256]");
-
-GstStaticCaps caps5 = GST_STATIC_CAPS ("video/raw, "
- "fourcc=(fourcc){\"YV12\",\"YUY2\"}, " "height=(int)[16,4096]");
-
-GstStaticCaps caps6 = GST_STATIC_CAPS ("video/raw, "
- "fourcc=(fourcc){\"YV12\",\"YUYV\"}, " "height=(int)[16,4096]");
-
-GstStaticCaps caps7 = GST_STATIC_CAPS ("video/raw, "
- "fourcc=(fourcc){\"YVYV\",\"YUY2\"}, " "height=(int)[16,4096],"
- "pixel-aspect-ratio=(fraction)16/15");
-
-GstStaticCaps caps8 = GST_STATIC_CAPS ("video/raw, "
- "format=(fourcc)\"I420\"; " "video/raw, " "format=(fourcc)\"YUYV\"");
-
-GstStaticCaps caps9 = GST_STATIC_CAPS ("video/raw, "
- "format=(fourcc)\"I420\"; " "video/raw, " "format=(fourcc)\"YV12\"");
-
-static gint test = 0;
-static gint failures = 0;
-
-#define TEST_START g_print ("%3d, START\n", ++test)
-#define TEST_FAIL g_print ("%3d, FAIL : failure %d\n", test, ++failures)
-#define TEST_SUCCESS g_print ("%3d, SUCCESS\n", test)
-#define TEST_END(result) G_STMT_START{ \
- if (result) { \
- TEST_SUCCESS; \
- } else { \
- TEST_FAIL; \
- } \
-}G_STMT_END
-static void
-test_caps_func (const GstCaps * caps)
-{
- gchar *str1, *str2;
- gboolean ret = FALSE;
-
- str1 = gst_caps_to_string (caps);
- caps = gst_caps_from_string (str1);
- if (!caps) {
- g_print ("%3d, INFO : no caps from %s\n", test, str1);
- TEST_END (ret);
- return;
- }
- str2 = gst_caps_to_string (caps);
- g_print ("%3d, INFO : %s <==> %s\n", test, str1, str2);
- ret = strcmp (str1, str2) == 0;
- g_free (str1);
- g_free (str2);
- TEST_END (ret);
-}
-static void
-test_caps (const GstCaps * caps)
-{
- TEST_START;
- test_caps_func (caps);
-}
-static void
-test_string (gchar * str)
-{
- GstCaps *caps;
-
- TEST_START;
- g_print ("%3d, INFO : checking %s\n", test, str);
- caps = gst_caps_from_string (str);
- if (!caps) {
- g_print ("%3d, INFO : no caps from %s\n", test, str);
- TEST_FAIL;
- return;
- }
- test_caps_func (caps);
-}
-static void
-test_string_fail (gchar * str)
-{
- GstCaps *caps;
-
- TEST_START;
- g_print ("%3d, INFO : checking %s for failure\n", test, str);
- caps = gst_caps_from_string (str);
- g_print ("got %p\n", caps);
- TEST_END (caps == NULL);
-}
-
-int
-main (int argc, char *argv[])
-{
- gst_init (&argc, &argv);
- goto bla;
-bla:
- /* stupidity tests */
- test_caps (gst_caps_new_simple ("audio/raw", NULL));
-
- /* all sorts of caps */
- test_caps (gst_static_caps_get (&caps1));
- test_caps (gst_static_caps_get (&caps2));
- test_caps (gst_static_caps_get (&caps3));
- test_caps (gst_static_caps_get (&caps4));
- test_caps (gst_static_caps_get (&caps5));
- test_caps (gst_static_caps_get (&caps6));
- test_caps (gst_static_caps_get (&caps7));
- test_caps (gst_static_caps_get (&caps8));
- test_caps (gst_static_caps_get (&caps9));
-
- /* mime types */
- test_string ("audio/raw");
- test_string ("\"audio/raw\"");
-
- /* fixed props entries */
- test_string ("audio/raw ,test=(int)1");
- test_string ("audio/raw ,test=(double) 1");
- test_string ("audio/raw, test=(fourcc )1");
- test_string ("audio/raw ,test=(i)1");
- test_string ("audio/raw ,test=(d) 1");
- test_string ("audio/raw, test=(4 )1");
- test_string ("audio/raw,test=( fourcc ) 0x0000001");
- test_string ("audio/raw,test =(fourcc) \"RGB \"");
- test_string ("audio/raw , test=( string)1");
- test_string ("audio/raw,test= 1");
- test_string ("audio/raw,test = 1.0");
- test_string ("audio/raw ,test= \"1.0\"");
- test_string ("audio/raw,test=( str) \"1\"");
- test_string ("audio/raw ,test=(b)False");
- test_string ("audio/raw ,test =(bool) trUE");
- test_string ("audio/raw ,test=(b ) yes");
- test_string ("audio/raw ,test =( boolean)no");
- test_string ("audio/raw ,test = < 1, 2, 3 >");
- test_string ("video/raw ,test =( fraction)9/8");
-
- /* buffers */
- test_string ("audio/raw ,test=(buffer)0123456789abcdef");
- test_string ("audio/raw ,test= < (buffer)0123, (buffer)4567 >");
-
- /* unfixed props entries */
- test_string ("audio/raw, test= [ 1, 2 ]");
- test_string_fail ("audio/raw, test= [ 1.0 , 2]");
- test_string_fail ("audio/raw, test = [1, 2.5 ]");
- test_string ("audio/raw, test= [1.3, 2.1 ]");
- test_string ("audio/raw, test =(int ) [1,2]");
- test_string ("audio/raw, test =(double ) [1,2]");
- test_string ("audio/raw, test= [(int) 1, 2 ]");
- test_string ("audio/raw, test=(d) [ (double)1.0 , 2]");
- test_string ("audio/raw, test=(double) [1.3, (double)2.1 ]");
- test_string ("audio/raw, test =(i) [(int)1,2]");
- test_string ("audio/raw, test={(int)1,2}");
- test_string
- ("audio/raw, test= {(int)1 ,2,3 ,(int) 4 , 5 ,6 , (int )7 ,8 , (int ) 9, 10}");
- test_string ("audio/raw, test= {1.0}");
- test_string ("audio/raw, test= {\"hi\", \"i dig ya\", dude}");
- test_string ("audio/raw, test= {(int)1,2}");
- test_string ("audio/raw, test= {(int)1,2}");
-
- /* prop concatenations */
- test_string ("audio/raw, test=(double) [1.3, (double)2.1 ], test2= [ 1, 2 ]");
- test_string ("audio/raw , test=(fourcc) \"RGB \",test2=(int)1");
- test_string
- ("audio/raw, test= [(int ) 1, 2 ] ,test2 =(fourcc) \"RGB \"");
- test_string ("audio/raw, test= [1.3, 2.1 ] , test2= {1.0}");
- test_string
- ("audio/raw, test= {(int)1 ,2,3 ,(int) 4 , 5 ,6 , (int )7 ,8 , (int ) 9, 10}, test2 = [1.0, 2.5 ] , test3= (string)1 ,test4=(i)1");
-
- /* caps concatenations */
- test_string
- ("audio/raw, test= [(int ) 1, 2 ] ,test2 =(fourcc) \"RGB \";\"audio/raw\"");
- test_string
- ("audio/raw, test =(double ) [1,2] ; audio/raw, test=(fourcc )1 ;audio/raw, test= {\"hi\", \"i dig ya\", dude}");
- test_string
- ("audio/raw, test=(double) [1.3, (double)2.1 ];audio/raw, test =(i) [(int)1,2]");
-
-
- /* mimes */
- test_string_fail ("audio/raw\\");
- test_string_fail ("'audio/raw");
- test_string_fail ("'audio/raw\"");
- /* wrong type */
- test_string_fail ("audio/raw, test=(int) [1.0,2]");
- test_string_fail ("audio/raw, test=(int) [1 ,0.2]");
- test_string_fail ("audio/raw, test=(int) [1.0, 2.000]");
- test_string_fail ("audio/raw, test=(int) <1.0, 2.000>");
- /* unmatched */
- test_string_fail ("audio/raw, test=(int = [");
- test_string_fail ("audio/raw, test= {");
- test_string_fail ("audio/raw, test= <");
- test_string_fail ("audio/raw, test = \"dood'");
- test_string_fail ("audio/raw, test= '");
-
- if (failures) {
- g_print ("\n FAILURES : %d\n", failures);
- } else {
- g_print ("\n DONE\n");
- }
- return failures;
-}
diff --git a/tests/old/testsuite/caps/structure.c b/tests/old/testsuite/caps/structure.c
deleted file mode 100644
index 84c607e454..0000000000
--- a/tests/old/testsuite/caps/structure.c
+++ /dev/null
@@ -1,25 +0,0 @@
-
-#include <gst/gst.h>
-
-
-void
-test1 (void)
-{
- GstStructure *structure;
-
- g_print ("type is %d\n", (int) gst_structure_get_type ());
-
- structure = gst_structure_empty_new ("moo");
- g_assert (structure != NULL);
- g_assert (GST_IS_STRUCTURE (structure));
-}
-
-int
-main (int argc, char *argv[])
-{
- gst_init (&argc, &argv);
-
- test1 ();
-
- return 0;
-}
diff --git a/tests/old/testsuite/caps/subtract.c b/tests/old/testsuite/caps/subtract.c
deleted file mode 100644
index 9d1053ca6a..0000000000
--- a/tests/old/testsuite/caps/subtract.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2004 Benjamin Otte <in7y118@public.uni-hamburg.de>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <gst/gst.h>
-
-static void
-check_caps (const gchar * set, const gchar * subset)
-{
- GstCaps *one, *two, *test, *test2;
-
- g_print (" A = %s\n", set);
- one = gst_caps_from_string (set);
- g_print (" B = %s\n", subset);
- two = gst_caps_from_string (subset);
- /* basics */
- test = gst_caps_subtract (one, one);
- g_assert (gst_caps_is_empty (test));
- gst_caps_unref (test);
- test = gst_caps_subtract (two, two);
- g_assert (gst_caps_is_empty (test));
- gst_caps_unref (test);
- test = gst_caps_subtract (two, one);
- g_assert (gst_caps_is_empty (test));
- gst_caps_unref (test);
- /* now the nice part */
- test = gst_caps_subtract (one, two);
- g_assert (!gst_caps_is_empty (test));
- g_print (" A - B = %s\n", gst_caps_to_string (test));
- test2 = gst_caps_union (test, two);
- g_print ("A - B + B = %s\n", gst_caps_to_string (test2));
- gst_caps_unref (test);
- test = gst_caps_subtract (test2, one);
- g_assert (gst_caps_is_empty (test));
- gst_caps_unref (test);
-}
-
-gint
-main (gint argc, gchar ** argv)
-{
- gst_init (&argc, &argv);
-
- check_caps ("some/mime, _int = [ 1, 2 ], list = { \"A\", \"B\", \"C\" }",
- "some/mime, _int = 1, list = \"A\"");
- check_caps ("some/mime, _double = (double) 1.0; other/mime, _int = { 1, 2 }",
- "some/mime, _double = (double) 1.0");
-
- return 0;
-}
diff --git a/tests/old/testsuite/caps/union.c b/tests/old/testsuite/caps/union.c
deleted file mode 100644
index 798f6faa2a..0000000000
--- a/tests/old/testsuite/caps/union.c
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <gst/gst.h>
-
-/* these caps all have a non empty intersection */
-GstStaticCaps sinkcaps = GST_STATIC_CAPS ("video/mpeg, "
- "mpegtype:int=1, "
- "foo1:int=[20,40], " "foo2:int=[20,40], " "foo3:int=[10,20]");
-
-GstStaticCaps mp1parsecaps = GST_STATIC_CAPS ("video/mpeg, "
- "mpegtype:int=1, " "foo1:int=30, " "foo2:int=[20,30], " "foo3:int=[20,30]");
-
-int
-main (int argc, char *argv[])
-{
- xmlDocPtr doc;
- xmlNodePtr parent;
- GstCaps *caps;
-
- gst_init (&argc, &argv);
-
- doc = xmlNewDoc ((const xmlChar *) "1.0");
- doc->xmlRootNode =
- xmlNewDocNode (doc, NULL, (const xmlChar *) "Capabilities", NULL);
-
- caps = gst_caps_union (gst_static_caps_get (&sinkcaps),
- gst_static_caps_get (&mp1parsecaps));
- parent =
- xmlNewChild (doc->xmlRootNode, NULL, (const xmlChar *) "Capabilities1",
- NULL);
- gst_caps_save_thyself (caps, parent);
-
- xmlDocDump (stdout, doc);
-
- return 0;
-}
diff --git a/tests/old/testsuite/debug/.gitignore b/tests/old/testsuite/debug/.gitignore
deleted file mode 100644
index 592d5994d7..0000000000
--- a/tests/old/testsuite/debug/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-category
-commandline
-global
-output
-printf_extension
diff --git a/tests/old/testsuite/debug/Makefile.am b/tests/old/testsuite/debug/Makefile.am
deleted file mode 100644
index b38ca39daf..0000000000
--- a/tests/old/testsuite/debug/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-include ../Rules
-
-tests_pass = commandline category output printf_extension
-tests_fail =
-tests_ignore = global
diff --git a/tests/old/testsuite/debug/category.c b/tests/old/testsuite/debug/category.c
deleted file mode 100644
index 350dfa41da..0000000000
--- a/tests/old/testsuite/debug/category.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
- *
- * category.c: test the categories
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <gst/gst.h>
-#include <string.h>
-
-GST_DEBUG_CATEGORY (cat);
-#define GST_CAT_DEFAULT cat
-GST_DEBUG_CATEGORY_STATIC (cat_static);
-
-gint
-main (gint argc, gchar * argv[])
-{
- GSList *before, *after;
-
- unsetenv ("GST_DEBUG");
- gst_init (&argc, &argv);
-
- before = gst_debug_get_all_categories ();
- GST_DEBUG_CATEGORY_INIT (cat, "cat", GST_DEBUG_FG_GREEN,
- "default category for this test");
- GST_DEBUG_CATEGORY_INIT (cat_static, "cat_static",
- GST_DEBUG_BOLD | GST_DEBUG_FG_BLUE | GST_DEBUG_BG_RED,
- "static category for this test");
- after = gst_debug_get_all_categories ();
-
- g_print ("removing default log function\n");
-#ifdef GST_DISABLE_GST_DEBUG
- g_assert (gst_debug_remove_log_function (gst_debug_log_default) == 0);
-#else
- g_assert (gst_debug_remove_log_function (gst_debug_log_default) == 1);
- g_print
- ("checking, if the two new categories are put into the category list correctly...\n");
- g_assert (g_slist_length (after) - g_slist_length (before) == 2);
- /* check the _get stuff */
- g_print
- ("checking, if the gst_debug_category_get_* stuff works with the categories...\n");
- g_assert (strcmp (gst_debug_category_get_name (cat), "cat") == 0);
- g_assert (gst_debug_category_get_color (cat) == GST_DEBUG_FG_GREEN);
- g_assert (strcmp (gst_debug_category_get_description (cat),
- "default category for this test") == 0);
- g_assert (gst_debug_category_get_threshold (cat) ==
- gst_debug_get_default_threshold ());
- g_assert (strcmp (gst_debug_category_get_name (cat_static),
- "cat_static") == 0);
- g_assert (gst_debug_category_get_color (cat_static) | GST_DEBUG_FG_GREEN);
- g_assert (gst_debug_category_get_color (cat_static) | GST_DEBUG_BG_RED);
- g_assert (gst_debug_category_get_color (cat_static) | GST_DEBUG_BOLD);
- g_assert (strcmp (gst_debug_category_get_description (cat_static),
- "static category for this test") == 0);
- g_assert (gst_debug_category_get_threshold (cat_static) ==
- gst_debug_get_default_threshold ());
- /* check if setting levels for names work */
- g_print
- ("checking if changing threshold for names affects existing categories...\n");
- gst_debug_set_threshold_for_name ("cat", GST_LEVEL_DEBUG);
- g_assert (gst_debug_category_get_threshold (cat) == GST_LEVEL_DEBUG);
- g_assert (gst_debug_category_get_threshold (cat_static) ==
- gst_debug_get_default_threshold ());
- gst_debug_set_threshold_for_name ("cat_static", GST_LEVEL_INFO);
- g_assert (gst_debug_category_get_threshold (cat) == GST_LEVEL_DEBUG);
- g_assert (gst_debug_category_get_threshold (cat_static) == GST_LEVEL_INFO);
-#endif
-
- g_print ("everything ok.\n");
- return 0;
-}
diff --git a/tests/old/testsuite/debug/commandline.c b/tests/old/testsuite/debug/commandline.c
deleted file mode 100644
index fbfafe7949..0000000000
--- a/tests/old/testsuite/debug/commandline.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
- *
- * commandline.c: Test if the command line arguments work
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <gst/gst.h>
-
-GST_DEBUG_CATEGORY (cat);
-GST_DEBUG_CATEGORY_STATIC (cat_static);
-
-#ifndef GST_DISABLE_GST_DEBUG
-static const gchar *lines[] = {
- "--gst-debug-disable",
- "--gst-debug-no-color",
- "--gst-debug-level=4",
- "--gst-debug=cat:4,cat_*:3",
- "--gst-debug-level=4 --gst-debug=cat_*:5"
-};
-
-static void
-debug_not_reached (GstDebugCategory * category, GstDebugLevel level,
- const gchar * file, const gchar * function, gint line, GObject * object,
- GstDebugMessage * message, gpointer thread)
-{
- g_assert_not_reached ();
-}
-#endif
-
-gint
-main (gint argc, gchar * argv[])
-{
- if (argc == 1) {
- /* this is the main run that calls the others */
-
- unsetenv ("GST_DEBUG");
- gst_init (&argc, &argv);
-#ifndef GST_DISABLE_GST_DEBUG
- {
- gint i, runs, exit;
- gchar *command;
-
- runs = G_N_ELEMENTS (lines);
- for (i = 0; i < runs; i++) {
- int ret;
-
- command = g_strdup_printf ("./commandline %s %d", lines[i], i);
- g_print ("running \"%s\"\n", command);
- ret = g_spawn_command_line_sync (command, NULL, NULL, &exit, NULL);
- g_assert (ret == TRUE);
- g_assert (exit == 0);
- g_print ("\"%s\" worked as expected.\n", command);
- g_free (command);
- }
- }
-#endif
-
- return 0;
- } else {
- gst_init (&argc, &argv);
- if (argc != 2) {
- g_print
- ("something funny happened to the command line arguments, aborting.\n");
- return 1;
- }
-#ifndef GST_DISABLE_GST_DEBUG
- g_assert (gst_debug_remove_log_function (gst_debug_log_default) == 1);
-#endif
- GST_DEBUG_CATEGORY_INIT (cat, "cat", 0, "non-static category");
- GST_DEBUG_CATEGORY_INIT (cat_static, "cat_static", 0, "static category");
- switch (argv[1][0]) {
- case '0':
- g_assert (gst_debug_is_active () == FALSE);
-#ifndef GST_DISABLE_GST_DEBUG
- gst_debug_add_log_function (debug_not_reached, NULL);
-#endif
- GST_ERROR ("This will not be seen");
- return 0;
- case '1':
- return gst_debug_is_colored ()? 1 : 0;
- case '2':
- g_assert (gst_debug_get_default_threshold () == 4);
- g_assert (gst_debug_category_get_threshold (cat) == 4);
- return 0;
- case '3':
- g_assert (gst_debug_get_default_threshold () == GST_LEVEL_DEFAULT);
- g_assert (gst_debug_category_get_threshold (cat) == 4);
- g_assert (gst_debug_category_get_threshold (cat_static) == 3);
- return 0;
- case '4':
- g_assert (gst_debug_get_default_threshold () == 4);
- g_assert (gst_debug_category_get_threshold (cat) == 4);
- g_assert (gst_debug_category_get_threshold (cat_static) == 5);
- return 0;
- default:
- g_print ("usupported command, aborting...\n");
- return -1;
- }
- }
- g_assert_not_reached ();
-}
diff --git a/tests/old/testsuite/debug/global.c b/tests/old/testsuite/debug/global.c
deleted file mode 100644
index 6d931a09fe..0000000000
--- a/tests/old/testsuite/debug/global.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
- *
- * global.c: Test global parameter setting/getting
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gst/gst.h>
-
-#define THREAD_COUNT 5
-#define ITERATIONS 20
-
-/* stupid logging functions */
-static void
-gst_debug_log_one (GstDebugCategory * category,
- GstDebugLevel level,
- const gchar * file,
- const gchar * function,
- gint line, GObject * object, GstDebugMessage * message, gpointer data)
- G_GNUC_NO_INSTRUMENT;
- static void gst_debug_log_two (GstDebugCategory * category,
- GstDebugLevel level,
- const gchar * file,
- const gchar * function,
- gint line, GObject * object, GstDebugMessage * message, gpointer thread)
- G_GNUC_NO_INSTRUMENT;
-
- static void
- gst_debug_log_one (GstDebugCategory * category, GstDebugLevel level,
- const gchar * file, const gchar * function, gint line, GObject * object,
- GstDebugMessage * message, gpointer data)
-{
-}
-static void
-gst_debug_log_two (GstDebugCategory * category, GstDebugLevel level,
- const gchar * file, const gchar * function, gint line, GObject * object,
- GstDebugMessage * message, gpointer data)
-{
-}
-
-static gpointer
-thread_main (gpointer threadnum)
-{
- gint num;
- gint i;
-
- num = GPOINTER_TO_INT (threadnum);
- for (i = 0; i < ITERATIONS; i++) {
- g_print ("iteration %d of thread %d starting\n", i, num);
- /* do some stuff with global settings */
- gst_debug_set_default_threshold (GST_LEVEL_DEBUG);
- gst_debug_add_log_function (gst_debug_log_one, g_thread_self ());
- gst_debug_add_log_function (gst_debug_log_two, NULL);
-
- /* reset all the stuff we did */
- gst_debug_set_default_threshold (GST_LEVEL_DEFAULT);
- g_assert (gst_debug_remove_log_function_by_data (g_thread_self ()) == 1);
- }
-
- g_print ("Thread %d is done.\n", num);
- return threadnum;
-}
-
-gint
-main (gint argc, gchar * argv[])
-{
- gint i;
- GThread *threads[THREAD_COUNT];
-
- g_print ("initializing GStreamer\n");
- gst_init (&argc, &argv);
- g_assert (gst_debug_remove_log_function (gst_debug_log_default) == 1);
-
- /* some checks for defaults */
- g_print ("Doing startup checks\n");
- g_assert (gst_debug_get_default_threshold () == GST_LEVEL_DEFAULT);
-
- g_print ("creating %d threads\n", THREAD_COUNT);
- for (i = 0; i < THREAD_COUNT; i++) {
- g_assert ((threads[i] =
- g_thread_create (thread_main, GINT_TO_POINTER (i), TRUE, NULL)));
- }
- g_print ("joining %d threads\n", THREAD_COUNT);
- for (i = 0; i < THREAD_COUNT; i++) {
- g_assert (GPOINTER_TO_INT (g_thread_join (threads[i])) == i);
- }
-
- /* some checks if everything worked */
- g_print ("Doing shutdown checks\n");
- g_assert (gst_debug_get_default_threshold () == GST_LEVEL_DEFAULT);
- g_assert (gst_debug_remove_log_function (gst_debug_log_two) ==
- THREAD_COUNT * ITERATIONS);
-
- return 0;
-}
diff --git a/tests/old/testsuite/debug/output.c b/tests/old/testsuite/debug/output.c
deleted file mode 100644
index 8360322418..0000000000
--- a/tests/old/testsuite/debug/output.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
- *
- * output.c: Test if the debugging output macros work
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <gst/gst.h>
-
-GST_DEBUG_CATEGORY_STATIC (cat_default);
-#define GST_CAT_DEFAULT cat_default
-GST_DEBUG_CATEGORY_STATIC (cat2);
-
-static gint count = -1;
-static GstElement *pipeline;
-
-#ifndef GST_DISABLE_GST_DEBUG
-static void
-check_message (GstDebugCategory * category, GstDebugLevel level,
- const gchar * file, const gchar * function, gint line, GObject * object,
- GstDebugMessage * message, gpointer unused)
-{
- gint temp;
-
- /* these checks require count to be set right. So the order in the main
- funtion is actually important. */
- /* <0 means no checks */
- if (count < 0)
- return;
-
- g_print ("expecting \"%s\"...", (gchar *) message);
- /* level */
- temp = (count % 5) + 1;
- g_assert (level == temp);
- /* category */
- temp = (count % 10) / 5;
- g_assert (category == (temp ? cat2 : cat_default));
- /* object */
- temp = (count % 20) / 10;
- g_assert (object == (GObject *) (temp ? pipeline : NULL));
- g_print ("[OK]\n");
-}
-#endif
-
-gint
-main (gint argc, gchar * argv[])
-{
-
- gst_init (&argc, &argv);
-
- GST_DEBUG_CATEGORY_INIT (cat_default, "GST_Check_default", 0,
- "default category for this test");
- GST_DEBUG_CATEGORY_INIT (cat2, "GST_Check_2", 0,
- "second category for this test");
-#ifndef GST_DISABLE_GST_DEBUG
- g_assert (gst_debug_remove_log_function (gst_debug_log_default) == 1);
-#endif
- gst_debug_add_log_function (check_message, NULL);
-
- count = 0;
- GST_ERROR ("This is an error.");
- ++count;
- GST_WARNING ("This is a warning.");
- ++count;
- GST_INFO ("This is an info message.");
- ++count;
- GST_DEBUG ("This is a debug message.");
- ++count;
- GST_LOG ("This is a log message.");
- ++count;
- GST_CAT_ERROR (cat2, "This is an error with category.");
- ++count;
- GST_CAT_WARNING (cat2, "This is a warning with category.");
- ++count;
- GST_CAT_INFO (cat2, "This is an info message with category.");
- ++count;
- GST_CAT_DEBUG (cat2, "This is a debug message with category.");
- ++count;
- GST_CAT_LOG (cat2, "This is a log message with category.");
- count = -1;
- pipeline = gst_element_factory_make ("pipeline", "testelement");
- count = 10;
- GST_ERROR_OBJECT (pipeline, "This is an error with object.");
- ++count;
- GST_WARNING_OBJECT (pipeline, "This is a warning with object.");
- ++count;
- GST_INFO_OBJECT (pipeline, "This is an info message with object.");
- ++count;
- GST_DEBUG_OBJECT (pipeline, "This is a debug message with object.");
- ++count;
- GST_LOG_OBJECT (pipeline, "This is a log message with object.");
- ++count;
- GST_CAT_ERROR_OBJECT (cat2, pipeline,
- "This is an error with category and object.");
- ++count;
- GST_CAT_WARNING_OBJECT (cat2, pipeline,
- "This is a warning with category and object.");
- ++count;
- GST_CAT_INFO_OBJECT (cat2, pipeline,
- "This is an info message with category and object.");
- ++count;
- GST_CAT_DEBUG_OBJECT (cat2, pipeline,
- "This is a debug message with category and object.");
- ++count;
- GST_CAT_LOG_OBJECT (cat2, pipeline,
- "This is a log message with category and object.");
- count = -1;
-
-#ifndef GST_DISABLE_GST_DEBUG
- g_assert (gst_debug_remove_log_function (check_message) == 1);
-#endif
-
- return 0;
-}
diff --git a/tests/old/testsuite/debug/printf_extension.c b/tests/old/testsuite/debug/printf_extension.c
deleted file mode 100644
index 67e9d3ce46..0000000000
--- a/tests/old/testsuite/debug/printf_extension.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2004 David A. Schleef <ds@schleef.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <gst/gst.h>
-
-gint
-main (gint argc, gchar * argv[])
-{
- GstCaps *caps;
- GstElement *element;
- G_GNUC_UNUSED gpointer null = NULL;
-
- /* G_GNUC_UNUSED int zero = 0; */
-
- gst_init (&argc, &argv);
-
- caps = gst_caps_from_string ("audio/x-raw-int, rate=44100");
-
- element = gst_element_factory_make ("identity", NULL);
-
- GST_ERROR ("This should print caps: %" GST_PTR_FORMAT, caps);
- GST_ERROR ("This should print an object: %" GST_PTR_FORMAT, element);
- GST_ERROR ("This should print null: %" GST_PTR_FORMAT, NULL);
- GST_ERROR ("This should print a pointer: %" GST_PTR_FORMAT, &null);
- /* 64 bit address to a 32 bit int will cause the GObject interpretation
- * to segfault; since GST_PTR_FORMAT only works on stuff with
- * sizeof(gpointer) */
- /* GST_ERROR ("This should print a pointer: %" GST_PTR_FORMAT, &zero); */
-
- /* GST_ERROR ("This should print a pointer: %" GST_PTR_FORMAT, (void *)1); */
-
- return 0;
-}
diff --git a/tests/old/testsuite/dlopen/.gitignore b/tests/old/testsuite/dlopen/.gitignore
deleted file mode 100644
index 3f9346b8de..0000000000
--- a/tests/old/testsuite/dlopen/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-dlopen_gst
diff --git a/tests/old/testsuite/dlopen/Makefile.am b/tests/old/testsuite/dlopen/Makefile.am
deleted file mode 100644
index 646d3a7fcf..0000000000
--- a/tests/old/testsuite/dlopen/Makefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-# ../Rules is not included because we specifically don't want the normal
-# AM_CFLAGS, etc.
-
-plugin_LTLIBRARIES = libloadgst.la
-
-tests_pass = dlopen_gst
-tests_fail =
-tests_ignore =
-
-libloadgst_la_SOURCES = loadgst.c
-libloadgst_la_CFLAGS = $(GST_OBJ_CFLAGS)
-libloadgst_la_LDFLAGS = -module -avoid-version $(GST_OBJ_LIBS)
-
-dlopen_gst_CFLAGS = $(GLIB_CFLAGS)
-dlopen_gst_LDFLAGS = $(GLIB_LIBS)
-
-TESTS_ENVIRONMENT= \
- G_DEBUG=fatal_warnings \
- GST_PLUGIN_PATH=$(top_builddir)/gst:. \
- GST_REGISTRY=$(top_builddir)/testsuite/test-registry.xml
-
-check_PROGRAMS = $(tests_pass) $(tests_fail) $(tests_ignore)
-
-# make all tests depend on the versioned gst-register
-$(tests_pass) $(tests_fail): $(top_builddir)/tools/gst-register-@GST_MAJORMINOR@
-
-# rebuild gst-register-@GST_MAJORMINOR@ if needed
-# the EXEEXT is because am 1.6 complained about overrides
-$(top_builddir)/tools/gst-register-@GST_MAJORMINOR@$(EXEEXT):
- cd $(top_builddir)/tools && make
-
-TESTS = $(top_builddir)/tools/gst-register-@GST_MAJORMINOR@ \
- $(tests_pass) $(tests_fail)
-XFAIL_TESTS = $(tests_fail)
-
-# override to _not_ install the test plugins
-install-pluginLTLIBRARIES:
-
-# This rule is here so make distcheck works on machines where core
-# dumps have PIDs appended
-CLEANFILES = core.*
diff --git a/tests/old/testsuite/dlopen/dlopen_gst.c b/tests/old/testsuite/dlopen/dlopen_gst.c
deleted file mode 100644
index 2aa4008d4a..0000000000
--- a/tests/old/testsuite/dlopen/dlopen_gst.c
+++ /dev/null
@@ -1,28 +0,0 @@
-
-#include <gmodule.h>
-
-
-int
-main (int argc, char *argv[])
-{
- GModule *module;
- void (*symbol) (void);
- gboolean ret;
-
- module = g_module_open (".libs/libloadgst.so",
-#ifdef HAVE_G_MODULE_BIND_LOCAL
- G_MODULE_BIND_LOCAL |
-#endif
- G_MODULE_BIND_LAZY);
- g_assert (module != NULL);
-
- ret = g_module_symbol (module, "gst_init", (gpointer *) & symbol);
- g_print ("'gst_init' is %s\n", ret ? "visible" : "not visible");
-
- ret = g_module_symbol (module, "do_test", (gpointer *) & symbol);
- g_assert (ret);
-
- symbol ();
-
- exit (0);
-}
diff --git a/tests/old/testsuite/dlopen/loadgst.c b/tests/old/testsuite/dlopen/loadgst.c
deleted file mode 100644
index 54bfe694b0..0000000000
--- a/tests/old/testsuite/dlopen/loadgst.c
+++ /dev/null
@@ -1,26 +0,0 @@
-
-#include <gst/gst.h>
-
-
-void
-do_test (void)
-{
- GstElement *pipeline;
- int i;
-
- gst_init (NULL, NULL);
-
- pipeline = gst_parse_launch ("fakesrc ! fakesink", NULL);
- g_assert (pipeline != NULL);
-
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
-
- for (i = 0; i < 100; i++) {
- g_usleep (1000);
- g_print ("%s", (i & 1) ? "+" : "-");
- }
- g_print ("\n");
-
- gst_element_set_state (pipeline, GST_STATE_NULL);
- gst_object_unref (pipeline);
-}
diff --git a/tests/old/testsuite/elements/.gitignore b/tests/old/testsuite/elements/.gitignore
deleted file mode 100644
index 24f01829e8..0000000000
--- a/tests/old/testsuite/elements/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-Makefile
-Makefile.in
-*.o
-*.lo
-*.la
-.deps
-.libs
-
-fake
-name
-property
-tee
-gst-inspect-check
-gst-compprep-check
-static
-struct_size
diff --git a/tests/old/testsuite/elements/Makefile.am b/tests/old/testsuite/elements/Makefile.am
deleted file mode 100644
index 1f6e48148e..0000000000
--- a/tests/old/testsuite/elements/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-include ../Rules
-
-tests_pass = gst-inspect-check struct_size
-tests_fail =
-tests_ignore =
-
-noinst_HEADERS = struct_i386.h
-
-gst_inspect_check_SOURCES =
-gst-inspect-check$(EXEEXT): $(srcdir)/gst-inspect-check.in
- sed s/@[G]ST_MAJORMINOR@/@GST_MAJORMINOR@/ \
- $(srcdir)/gst-inspect-check.in >gst-inspect-check$(EXEEXT)
- chmod +x gst-inspect-check$(EXEEXT)
-
-EXTRA_DIST = gst-inspect-check.in
diff --git a/tests/old/testsuite/elements/gst-inspect-check.in b/tests/old/testsuite/elements/gst-inspect-check.in
deleted file mode 100755
index 55b5cdb1ac..0000000000
--- a/tests/old/testsuite/elements/gst-inspect-check.in
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/usr/bin/perl -w
-
-# checks all built plugins by running gst-inspect on each element
-# and checking for warnings on stderr
-
-### packages
-
-use File::Basename;
-
-print " _______\n";
-print " (__) / \\\n";
-print " (oo) ( M O O )\n";
-print " /-------\\/ --'\\_______/\n";
-print " / | ||\n";
-print "* ||----||\n";
-print " ^^ ^^\n";
-
-my $num_warnings = 0;
-my $path = `dirname $0`;
-chomp $path;
-$path = "../../tools";
-
-$gst_inspect = "$path/gst-inspect-@GST_MAJORMINOR@";
-
-sub check_all_elements
-{
- #send stderr to /dev/null
- my $command = "$gst_inspect 2>/dev/null";
- my @lines = `$command`;
-
- if (!@lines) {
- print ("gst-inspect returned nothing\n");
- return -1;
- }
- while ($_ = shift(@lines)){
- my @matches = m/^\w+:\s+(\w+):/;
- if(@matches){
- check_element($matches[0]);
- }
- }
- if ($num_warnings > 0){
- print("there are $num_warnings warnings to be fixed\n");
- return -1;
- }
- return 0;
-}
-
-sub check_element($)
-{
- my ($element) = @_;
- print "running inspect on $element\n";
-
- # capture stderr, send stdout to /dev/null
- my $command = "$gst_inspect $element 2>&1 1>/dev/null";
-
- my @lines = `$command`;
-
- while ($_ = shift(@lines)){
- # ignore INFO lines, they are ok
- if (! /INFO/){
- print $_;
-
- # do this to ignore empty lines
- if (length > 1){
- $num_warnings++;
- }
- }
- }
- system("$gst_inspect $element 2>/dev/null 1>/dev/null");
- if ($? != 0){
- my $exit_value = $? >> 8;
- my $signal_num = $? & 127;
- my $dumped_core = $? & 128;
- if ($exit_value){
- print("error value on exit: $exit_value\n");
- }
- if ($signal_num){
- print("signal caused exit: $signal_num\n");
- }
- if ($dumped_core){
- print("dumped core: $dumped_core\n");
- }
- $num_warnings++
- }
-}
-
-### main
-
-exit check_all_elements ();
-
diff --git a/tests/old/testsuite/elements/struct_i386.h b/tests/old/testsuite/elements/struct_i386.h
deleted file mode 100644
index 0ffa5bb631..0000000000
--- a/tests/old/testsuite/elements/struct_i386.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/* Generated by GStreamer-0.8.4.1 */
-Struct list[] = {
- {"GstPoptOption", sizeof (GstPoptOption), 28}
- ,
- {"GstBuffer", sizeof (GstBuffer), 108}
- ,
- {"GstCaps", sizeof (GstCaps), 28}
- ,
- {"GstStaticCaps", sizeof (GstStaticCaps), 48}
- ,
- {"GstClockEntry", sizeof (GstClockEntry), 36}
- ,
- {"GstClock", sizeof (GstClock), 128}
- ,
- {"GstClockClass", sizeof (GstClockClass), 172}
- ,
- {"GstData", sizeof (GstData), 40}
- ,
- {"GstElementDetails", sizeof (GstElementDetails), 32}
- ,
- {"GstElementFactory", sizeof (GstElementFactory), 112}
- ,
- {"GstElementFactoryClass", sizeof (GstElementFactoryClass), 104}
- ,
- {"GstFormatDefinition", sizeof (GstFormatDefinition), 12}
- ,
- {"GstIndexEntry", sizeof (GstIndexEntry), 20}
- ,
- {"GstIndexGroup", sizeof (GstIndexGroup), 16}
- ,
- {"GstIndex", sizeof (GstIndex), 100}
- ,
- {"GstIndexClass", sizeof (GstIndexClass), 156}
- ,
- {"GstIndexAssociation", sizeof (GstIndexAssociation), 12}
- ,
- {"GstIndexFactory", sizeof (GstIndexFactory), 64}
- ,
- {"GstIndexFactoryClass", sizeof (GstIndexFactoryClass), 104}
- ,
- {"GstDebugCategory", sizeof (GstDebugCategory), 16}
- ,
- {"GstRealPad", sizeof (GstRealPad), 196}
- ,
- {"GstRealPadClass", sizeof (GstRealPadClass), 168}
- ,
- {"GstGhostPad", sizeof (GstGhostPad), 88}
- ,
- {"GstGhostPadClass", sizeof (GstGhostPadClass), 152}
- ,
- {"GstStaticPadTemplate", sizeof (GstStaticPadTemplate), 60}
- ,
- {"GstPipeline", sizeof (GstPipeline), 180}
- ,
- {"GstPipelineClass", sizeof (GstPipelineClass), 328}
- ,
- {"GstPlugin", sizeof (GstPlugin), 92}
- ,
- {"GstPluginDesc", sizeof (GstPluginDesc), 56}
- ,
- {"GstPluginFeature", sizeof (GstPluginFeature), 40}
- ,
- {"GstPluginFeatureClass", sizeof (GstPluginFeatureClass), 88}
- ,
- {"GstProbe", sizeof (GstProbe), 12}
- ,
- {"GstProbeDispatcher", sizeof (GstProbeDispatcher), 8}
- ,
- {"GstQueryTypeDefinition", sizeof (GstQueryTypeDefinition), 12}
- ,
- {"GstQueue", sizeof (GstQueue), 252}
- ,
- {"GstQueueSize", sizeof (GstQueueSize), 16}
- ,
- {"GstQueueClass", sizeof (GstQueueClass), 300}
- ,
- {"GstRegistry", sizeof (GstRegistry), 56}
- ,
- {"GstRegistryClass", sizeof (GstRegistryClass), 116}
- ,
- {"GstSchedulerFactory", sizeof (GstSchedulerFactory), 64}
- ,
- {"GstSchedulerFactoryClass", sizeof (GstSchedulerFactoryClass), 104}
- ,
- {"GstStructure", sizeof (GstStructure), 28}
- ,
- {"GstSystemClock", sizeof (GstSystemClock), 152}
- ,
- {"GstSystemClockClass", sizeof (GstSystemClockClass), 188}
- ,
- {"GstTagSetterIFace", sizeof (GstTagSetterIFace), 8}
- ,
- {"GstThread", sizeof (GstThread), 196}
- ,
- {"GstThreadClass", sizeof (GstThreadClass), 332}
- ,
- {"GstTrace", sizeof (GstTrace), 20}
- ,
- {"GstTraceEntry", sizeof (GstTraceEntry), 128}
- ,
- {"GstAllocTrace", sizeof (GstAllocTrace), 16}
- ,
- {"GstTrashStack", sizeof (GstTrashStack), 12}
- ,
- {"GstTrashStackElement", sizeof (GstTrashStackElement), 4}
- ,
- {"GstTypeFind", sizeof (GstTypeFind), 32}
- ,
- {"GstTypeFindFactory", sizeof (GstTypeFindFactory), 72}
- ,
- {"GstTypeFindFactoryClass", sizeof (GstTypeFindFactoryClass), 104}
- ,
- {"GstObject", sizeof (GstObject), 44}
- ,
- {"GstObjectClass", sizeof (GstObjectClass), 120}
- ,
- {"GstPad", sizeof (GstPad), 68}
- ,
- {"GstPadClass", sizeof (GstPadClass), 136}
- ,
- {"GstPadTemplate", sizeof (GstPadTemplate), 76}
- ,
- {"GstPadTemplateClass", sizeof (GstPadTemplateClass), 140}
- ,
- {"GstElement", sizeof (GstElement), 124}
- ,
- {"GstElementClass", sizeof (GstElementClass), 272}
- ,
- {"GstBin", sizeof (GstBin), 164}
- ,
- {"GstBinClass", sizeof (GstBinClass), 312}
- ,
- {"GstScheduler", sizeof (GstScheduler), 92}
- ,
- {"GstSchedulerClass", sizeof (GstSchedulerClass), 216}
- ,
- {"GstEvent", sizeof (GstEvent), 176}
- ,
- {"GstURIHandlerInterface", sizeof (GstURIHandlerInterface), 44}
- ,
- {"GstValueTable", sizeof (GstValueTable), 32}
- ,
- {"GstXML", sizeof (GstXML), 68}
- ,
- {"GstXMLClass", sizeof (GstXMLClass), 144}
- ,
- {NULL, 0, 0}
-};
diff --git a/tests/old/testsuite/elements/struct_size.c b/tests/old/testsuite/elements/struct_size.c
deleted file mode 100644
index 1343125c02..0000000000
--- a/tests/old/testsuite/elements/struct_size.c
+++ /dev/null
@@ -1,69 +0,0 @@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gst/gst.h>
-#include <gst/gstqueue.h>
-#include <gst/gsttrashstack.h>
-#include <stdlib.h>
-
-typedef struct
-{
- char *name;
- int size;
- int abi_size;
-}
-Struct;
-
-#ifdef HAVE_CPU_I386
-#include "struct_i386.h"
-#define HAVE_ABI_SIZES
-#else
-/* in case someone wants to generate a new arch */
-#include "struct_i386.h"
-#endif
-
-int
-main (int argc, char *argv[])
-{
- int i;
-
- if (argc > 1) {
- g_print ("/* Generated by GStreamer-%s */\n", GST_VERSION);
- g_print ("Struct list[] = {\n");
- for (i = 0; list[i].name; i++) {
- g_print (" { \"%s\", sizeof (%s), %d },\n",
- list[i].name, list[i].name, list[i].size);
- }
- g_print (" { NULL, 0, 0}\n");
- g_print ("};\n");
- } else {
- g_print ("Run './struct_size regen' to regenerate structs.h\n");
-
-#ifdef HAVE_ABI_SIZES
- {
- gboolean ok = TRUE;
-
- for (i = 0; list[i].name; i++) {
- if (list[i].size != list[i].abi_size) {
- ok = FALSE;
- g_print ("sizeof(%s) is %d, expected %d\n",
- list[i].name, list[i].size, list[i].abi_size);
- }
- }
- if (ok) {
- g_print ("All structures expected size\n");
- } else {
- g_print ("failed\n");
- exit (1);
- }
- }
-#else
- g_print ("No structure size list was generated for this architecture\n");
- g_print ("ignoring\n");
-#endif
- }
-
- exit (0);
-}
diff --git a/tests/old/testsuite/indexers/.gitignore b/tests/old/testsuite/indexers/.gitignore
deleted file mode 100644
index 2b7e86e5ab..0000000000
--- a/tests/old/testsuite/indexers/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-Makefile
-Makefile.in
-*.o
-*.lo
-*.la
-.deps
-.libs
-indexdump
-cache1
diff --git a/tests/old/testsuite/indexers/Makefile.am b/tests/old/testsuite/indexers/Makefile.am
deleted file mode 100644
index 829c2fd4e6..0000000000
--- a/tests/old/testsuite/indexers/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-include ../Rules
-
-tests_pass = cache1 indexdump
-tests_fail =
-tests_ignore =
diff --git a/tests/old/testsuite/indexers/cache1.c b/tests/old/testsuite/indexers/cache1.c
deleted file mode 100644
index cd04851230..0000000000
--- a/tests/old/testsuite/indexers/cache1.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/* GStreamer
- * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <gst/gst.h>
-
-static void
-lookup (GstIndex * index, GstIndexLookupMethod method,
- GstFormat src_format, gint64 src_value,
- GstFormat dest_format, gint64 expecting)
-{
- GstIndexEntry *entry;
- gint64 result;
-
- entry = gst_index_get_assoc_entry (index, 0, method, 0,
- src_format, src_value);
- if (entry) {
- gst_index_entry_assoc_map (entry, dest_format, &result);
-
- if (result == expecting) {
- g_print ("OK (%" G_GINT64_FORMAT ")\n", result);
- } else {
- g_print ("FAIL - expecting %" G_GINT64_FORMAT ", got %" G_GINT64_FORMAT
- "\n", expecting, result);
- }
- } else {
- const GstFormatDefinition *def = gst_format_get_details (src_format);
-
- if (expecting == -1)
- g_print ("OK (not found)\n");
- else
- g_print ("FAIL - no index entry found for %" G_GINT64_FORMAT
- " %s, expecting %" G_GINT64_FORMAT "\n", src_value, def->nick,
- expecting);
- }
-}
-
-typedef struct _GstIndexTestCase
-{
- GstIndexLookupMethod method;
- GstFormat src_format;
- gint64 src_value;
- GstFormat dest_format;
- gint64 expecting;
-} GstIndexTestCase;
-
-const static GstIndexTestCase cases[] = {
- {GST_INDEX_LOOKUP_EXACT, GST_FORMAT_BYTES, 3, GST_FORMAT_TIME, 3000},
- {GST_INDEX_LOOKUP_EXACT, GST_FORMAT_TIME, 5000, GST_FORMAT_BYTES, 5},
- {GST_INDEX_LOOKUP_EXACT, GST_FORMAT_TIME, 5010, GST_FORMAT_BYTES, -1},
- {GST_INDEX_LOOKUP_BEFORE, GST_FORMAT_TIME, 5010, GST_FORMAT_BYTES, 5},
- {GST_INDEX_LOOKUP_AFTER, GST_FORMAT_TIME, 5010, GST_FORMAT_BYTES, 6},
- {GST_INDEX_LOOKUP_BEFORE, GST_FORMAT_TIME, 0, GST_FORMAT_BYTES, 0},
- {GST_INDEX_LOOKUP_AFTER, GST_FORMAT_TIME, G_MAXINT64, GST_FORMAT_BYTES, -1},
- {GST_INDEX_LOOKUP_AFTER, GST_FORMAT_TIME, 0, GST_FORMAT_BYTES, 0},
- {GST_INDEX_LOOKUP_BEFORE, GST_FORMAT_TIME, -1, GST_FORMAT_BYTES, -1},
- {GST_INDEX_LOOKUP_BEFORE, GST_FORMAT_TIME, G_MAXINT64, GST_FORMAT_BYTES,
- 99999},
- {GST_INDEX_LOOKUP_AFTER, GST_FORMAT_TIME, G_MAXINT64, GST_FORMAT_BYTES, -1},
-};
-
-gint
-main (gint argc, gchar * argv[])
-{
- GstIndex *index;
- GstElement *element;
- gint i, id;
-
- gst_init (&argc, &argv);
-
- if (argc != 2) {
- g_print ("usage: cache1 (memindex | fileindex)\n");
- exit (0);
- }
-
- index = gst_index_factory_make (argv[1]);
- g_assert (index != NULL);
-
- element = gst_element_factory_make ("identity", "element");
- g_assert (element != NULL);
-
- gst_index_get_writer_id (index, GST_OBJECT (element), &id);
-
- g_print ("Building index...\n");
-
- for (i = 0; i < 100000; i++) {
- gst_index_add_association (index, 0, 0, GST_FORMAT_BYTES, (gint64) i,
- GST_FORMAT_TIME, (gint64) (i * 1000), 0);
- }
-
- g_print ("Testing index...\n");
-
- for (i = 0; i < (sizeof (cases) / sizeof (GstIndexTestCase)); i++) {
- lookup (index, cases[i].method, cases[i].src_format, cases[i].src_value,
- cases[i].dest_format, cases[i].expecting);
- }
-
- return 0;
-}
diff --git a/tests/old/testsuite/indexers/indexdump.c b/tests/old/testsuite/indexers/indexdump.c
deleted file mode 100644
index a8c48969b5..0000000000
--- a/tests/old/testsuite/indexers/indexdump.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/* GStreamer
- * Copyright (C) 2003 Erik Walthinsen <omega@cse.ogi.edu>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <gst/gst.h>
-
-static void
-my_resolver (GstIndex * index, GstObject * _ign, gchar ** writer_string,
- gpointer user_data)
-{
- *writer_string = user_data;
-}
-
-gint
-main (gint argc, gchar * argv[])
-{
- GstIndex *index;
- GstObject *identity;
- gint id;
- gint64 cur;
-
- gst_init (&argc, &argv);
-
- if (argc != 3) {
- g_print ("usage: dumpfileindex /path/to/fileindex writer_id\n");
- exit (0);
- }
-
- index = gst_index_factory_make ("fileindex");
- g_assert (index != NULL);
-
- g_object_set (index, "location", argv[1], NULL);
- gst_index_set_resolver (index, (GstIndexResolver) my_resolver, argv[2]);
-
- identity = (GstObject *) gst_element_factory_make ("identity", "element");
- g_assert (identity);
- gst_index_get_writer_id (index, identity, &id);
-
- cur = 0;
- while (1) {
- gint fx;
- GstIndexEntry *entry =
- gst_index_get_assoc_entry (index, id, GST_INDEX_LOOKUP_AFTER, 0,
- GST_FORMAT_TIME, cur);
-
- if (!entry)
- break;
-
- g_print ("%x", GST_INDEX_ASSOC_FLAGS (entry));
- for (fx = 0; fx < GST_INDEX_NASSOCS (entry); fx++) {
- GstFormat fmt = GST_INDEX_ASSOC_FORMAT (entry, fx);
- const GstFormatDefinition *def = gst_format_get_details (fmt);
-
- if (fmt == GST_FORMAT_TIME) {
- cur = GST_INDEX_ASSOC_VALUE (entry, fx) + 1;
- g_print (" time %.4f",
- GST_INDEX_ASSOC_VALUE (entry, fx) / (double) GST_SECOND);
- } else
- g_print (" %s %" G_GINT64_FORMAT, def->nick,
- GST_INDEX_ASSOC_VALUE (entry, fx));
- }
- g_print ("\n");
- }
-
- return 0;
-}
diff --git a/tests/old/testsuite/parse/.gitignore b/tests/old/testsuite/parse/.gitignore
deleted file mode 100644
index 5dbe8a305a..0000000000
--- a/tests/old/testsuite/parse/.gitignore
+++ /dev/null
@@ -1,9 +0,0 @@
-Makefile
-Makefile.in
-*.o
-*.lo
-*.la
-.deps
-.libs
-parse1
-parse2
diff --git a/tests/old/testsuite/parse/Makefile.am b/tests/old/testsuite/parse/Makefile.am
deleted file mode 100644
index 0b71559a49..0000000000
--- a/tests/old/testsuite/parse/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-include ../Rules
-
-tests_pass = parse1 parse2
-tests_fail =
-tests_ignore =
diff --git a/tests/old/testsuite/parse/parse1.c b/tests/old/testsuite/parse/parse1.c
deleted file mode 100644
index d5b618a252..0000000000
--- a/tests/old/testsuite/parse/parse1.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
- *
- * parse1.c: Test various parsing stuff
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <gst/gst.h>
-
-#include <string.h>
-#include <unistd.h>
-
-/* variables used by the TEST_* macros */
-static gint test = 0;
-static guint iterations;
-static GstElement *cur = NULL;
-static GError *error = NULL;
-
-/* variables needed for checking */
-static gint i;
-static gboolean b;
-static gchar *s;
-
-#define TEST_CHECK_FAIL(condition) G_STMT_START{ \
- if (condition) { \
- g_print ("TEST %2d line %3d OK\n", test, __LINE__); \
- } else { \
- g_print ("TEST %2d line %3d FAILED : %s\n", test, __LINE__, \
- #condition); \
- return -test; \
- } \
-}G_STMT_END
-
-#define TEST_START(pipeline) G_STMT_START{ \
- g_print ("TEST %2d line %3d START : %s\n", ++test, __LINE__, \
- pipeline); \
- cur = gst_parse_launch (pipeline, &error); \
- if (error == NULL) { \
- g_print ("TEST %2d line %3d CREATED\n", test, __LINE__); \
- } else { \
- g_print ("TEST %2d line %3d FAILED : %s\n", test, __LINE__, \
- error->message); \
- g_error_free (error); \
- return -test; \
- } \
-}G_STMT_END
-
-#define TEST_OK G_STMT_START{ \
- gst_object_unref (cur); \
- cur = NULL; \
- g_print ("TEST %2d line %3d COMPLETE\n", test, __LINE__); \
-}G_STMT_END
-
-#define TEST_RUN G_STMT_START{ \
- alarm(10); \
- g_print ("TEST %2d line %3d RUN\n", test, __LINE__); \
- if (gst_element_set_state (cur, GST_STATE_PLAYING) \
- == GST_STATE_CHANGE_FAILURE) { \
- g_print ("TEST %2d line %3d FAILED : " \
- "pipeline could not be set to PLAYING\n", test, __LINE__); \
- return -test; \
- } \
- iterations = 0; \
- while (gst_bin_iterate (GST_BIN (cur))) iterations++; \
- if (gst_element_set_state (cur, GST_STATE_NULL) \
- == GST_STATE_CHANGE_FAILURE) { \
- g_print ("TEST %2d line %3d FAILED : " \
- "pipeline could not be reset to state NULL\n", test, __LINE__); \
- return -test; \
- } \
- g_print ("TEST %2d line %3d STOPPED : %u iterations\n", \
- test, __LINE__, iterations); \
- alarm(0); \
-}G_STMT_END
-
-#define PIPELINE1 "fakesrc"
-#define PIPELINE2 "fakesrc name=donald num-buffers= 27 silent =TruE sizetype = 3 eos = falSe data= Subbuffer\\ data"
-#define PIPELINE3 "fakesrc identity fakesink"
-#define PIPELINE4 "fakesrc num-buffers=4 .src ! identity !.sink identity .src ! .sink fakesink"
-#define PIPELINE5 "fakesrc num-buffers=4 name=src identity name=id1 identity name = id2 fakesink name =sink src. ! id1. id1.! id2.sink id2.src!sink.sink"
-#define PIPELINE6 "pipeline.(name=\"john\" fakesrc num-buffers=4 ( thread. ( ! queue ! identity !{ queue ! fakesink }) ))"
-#define PIPELINE7 "fakesrc num-buffers=4 ! tee name=tee .src%d! fakesink tee.src%d ! fakesink fakesink name =\"foo\" tee.src%d ! foo."
-/* aggregator is borked
-#define PIPELINE8 "fakesrc num-buffers=4 ! tee name=tee1 .src0,src1 ! .sink0, sink1 aggregator ! fakesink"
-*/
-#define PIPELINE8 "fakesrc num-buffers=4 ! fakesink"
-#define PIPELINE9 "fakesrc num-buffers=4 ! test. fakesink name=test"
-#define PIPELINE10 "( fakesrc num-buffers=\"4\" ! ) identity ! fakesink"
-#define PIPELINE11 "fakesink name = sink identity name=id ( fakesrc num-buffers=\"4\" ! id. ) id. ! sink."
-#define PIPELINE12 "fakesrc num-buffers=4 name=a:b a:b. ! fakesink"
-
-gint
-main (gint argc, gchar * argv[])
-{
- gst_init (&argc, &argv);
-
- /**
- * checks:
- * - specifying an element works :)
- * - if only 1 element is requested, no bin is returned, but the element
- */
- TEST_START (PIPELINE1);
- TEST_CHECK_FAIL (G_OBJECT_TYPE (cur) == g_type_from_name ("GstFakeSrc"));
- TEST_OK;
-
- /**
- * checks:
- * - properties works
- * - string, int, boolean and enums can be properly set
- * (note: eos should be false)
- * - first test of escaping strings
- */
- TEST_START (PIPELINE2);
- g_object_get (G_OBJECT (cur), "name", &s, "num-buffers", &i, "silent", &b,
- NULL);
- TEST_CHECK_FAIL (strcmp (s, "donald") == 0);
- TEST_CHECK_FAIL (i == 27);
- TEST_CHECK_FAIL (b == TRUE);
- g_object_get (G_OBJECT (cur), "eos", &b, "sizetype", &i, NULL);
- TEST_CHECK_FAIL (i == 3);
- TEST_CHECK_FAIL (b == FALSE);
- g_object_get (G_OBJECT (cur), "data", &i, NULL);
- TEST_CHECK_FAIL (i == 2);
- TEST_OK;
-
- /**
- * checks:
- * - specifying multiple elements without links works
- * - if multiple toplevel elements exist, a pipeline is returned
- */
- TEST_START (PIPELINE3);
- TEST_CHECK_FAIL (GST_BIN (cur)->numchildren == 3); /* a bit hacky here */
- TEST_CHECK_FAIL (GST_IS_PIPELINE (cur));
- TEST_OK;
-
- /**
- * checks:
- * - test default link "!"
- * - test if specifying pads on links works
- */
- TEST_START (PIPELINE4);
- TEST_RUN;
- TEST_OK;
-
- /**
- * checks:
- * - test if appending the links works, too
- * - check if the pipeline constructed works the same as the one before (how?)
- */
- TEST_START (PIPELINE5);
- TEST_RUN;
- TEST_OK;
-
- /**
- * checks:
- * - test various types of bins
- * - test if linking across bins works
- * - test if escaping strings works
- */
- TEST_START (PIPELINE6);
- TEST_CHECK_FAIL (GST_IS_PIPELINE (cur));
- g_object_get (G_OBJECT (cur), "name", &s, NULL);
- TEST_CHECK_FAIL (strcmp (s, "john") == 0);
- TEST_RUN;
- TEST_OK;
-
- /**
- * checks:
- * - test request pads
- */
- TEST_START (PIPELINE7);
- TEST_RUN;
- TEST_OK;
-
- /**
- * checks:
- * - multiple pads on 1 link
- */
- TEST_START (PIPELINE8);
- TEST_RUN;
- TEST_OK;
-
- /**
- * checks:
- * - failed in grammar.y cvs version 1.17
- */
- TEST_START (PIPELINE9);
- TEST_RUN;
- TEST_OK;
-
- /**
- * checks:
- * - failed in grammar.y cvs version 1.17
- */
- TEST_START (PIPELINE10);
- TEST_RUN;
- TEST_OK;
-
- /**
- * checks:
- * - failed in grammar.y cvs version 1.18
- */
- TEST_START (PIPELINE11);
- TEST_RUN;
- TEST_OK;
-
- /**
- * checks:
- * - fails because a:b. is not a valid element reference in parse.l cvs rev 1.29
- */
- TEST_START (PIPELINE12);
- TEST_RUN;
- TEST_OK;
-
- return 0;
-}
diff --git a/tests/old/testsuite/parse/parse2.c b/tests/old/testsuite/parse/parse2.c
deleted file mode 100644
index 60e3323cd8..0000000000
--- a/tests/old/testsuite/parse/parse2.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
- *
- * parse1.c: Test common pipelines (need various plugins)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <gst/gst.h>
-
-#include <string.h>
-
-/* variables used by the TEST_* macros */
-static gint test = 0;
-static guint iterations;
-static GstElement *cur = NULL;
-static GError *error = NULL;
-static char *audio_file = NULL;
-static char *video_file = NULL;
-
-/* variables needed for checking */
-
-#define TEST_CHECK_FAIL(condition) G_STMT_START{ \
- if (condition) { \
- g_print ("TEST %2d line %3d OK\n", test, __LINE__); \
- } else { \
- g_print ("TEST %2d line %3d FAILED : %s\n", test, __LINE__, #condition); \
- return -test; \
- } \
-}G_STMT_END
-#ifdef G_HAVE_ISO_VARARGS
-#define TEST_START(...) G_STMT_START{ \
- gchar *pipeline = g_strdup_printf (__VA_ARGS__); \
- g_print ("TEST %2d line %3d START : %s\n", ++test, __LINE__, pipeline); \
- cur = gst_parse_launch (pipeline, &error); \
- if (error == NULL) { \
- g_print ("TEST %2d line %3d CREATED\n", test, __LINE__); \
- } else { \
- g_print ("TEST %2d line %3d FAILED : %s\n", test, __LINE__, error->message); \
- g_error_free (error); \
- return -test; \
- } \
- g_free (pipeline); \
-}G_STMT_END
-#elif defined(G_HAVE_GNUC_VARARGS)
-#define TEST_START(pipe...) G_STMT_START{ \
- gchar *pipeline = g_strdup_printf ( ## pipe ); \
- g_print ("TEST %2d line %3d START : %s\n", ++test, __LINE__, pipeline); \
- cur = gst_parse_launch (pipeline, &error); \
- if (error == NULL) { \
- g_print ("TEST %2d line %3d CREATED\n", test, __LINE__); \
- } else { \
- g_print ("TEST %2d line %3d FAILED : %s\n", test, __LINE__, error->message); \
- g_error_free (error); \
- return -test; \
- } \
- g_free (pipeline); \
-}G_STMT_END
-#else
-#error Please fix this macro here
-#define TEST_START(pipe...) G_STMT_START{ \
- gchar *pipeline = g_strdup_printf (__VA_ARGS__); \
- g_print ("TEST %2d line %3d START : %s\n", ++test, __LINE__, pipeline); \
- cur = gst_parse_launch (pipeline, &error); \
- if (error == NULL) { \
- g_print ("TEST %2d line %3d CREATED\n", test, __LINE__); \
- } else { \
- g_print ("TEST %2d line %3d FAILED : %s\n", test, __LINE__, error->message); \
- g_error_free (error); \
- return -test; \
- } \
- g_free (pipeline); \
-}G_STMT_END
-#endif
-#define TEST_OK G_STMT_START{ \
- gst_object_unref (cur); \
- cur = NULL; \
- g_print ("TEST %2d line %3d COMPLETE\n", test, __LINE__); \
-}G_STMT_END
-#define TEST_RUN(iters) G_STMT_START{ \
- gint it = iters; \
- g_print ("TEST %2d line %3d RUN\n", test, __LINE__); \
- if (gst_element_set_state (cur, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) { \
- g_print ("TEST %2d line %3d FAILED : pipeline could not be set to state PLAYING\n", test, __LINE__); \
- return -test; \
- } \
- iterations = 0; \
- while (gst_bin_iterate (GST_BIN (cur)) && it != 0) { \
- iterations++; \
- it--; \
- } \
- if (gst_element_set_state (cur, GST_STATE_NULL) == GST_STATE_CHANGE_FAILURE) { \
- g_print ("TEST %2d line %3d FAILED : pipeline could not be reset to state NULL\n", test, __LINE__); \
- return -test; \
- } \
- g_print ("TEST %2d line %3d STOPPED : %u iterations\n", test, __LINE__, iterations); \
-}G_STMT_END
-#define TEST_FINISH G_STMT_START{ \
- g_print("\n"); \
- g_print("To run this test there are things required that you do not have. (see above)\n"); \
- g_print("Please correct the above mentioned problem if you want to run this test.\n"); \
- g_print("Currently the following tests will be ignored.\n"); \
- g_print("\n"); \
- exit (0); \
-}G_STMT_END
-#define TEST_REQUIRE(condition, error) G_STMT_START{ \
- if (condition) { \
- g_print ("REQUIRE line %3d OK\n", __LINE__); \
- } else { \
- g_print ("REQUIRE line %3d EXIT : %s\n", __LINE__, (error)); \
- TEST_FINISH; \
- } \
-}G_STMT_END
-#define TEST_REQUIRE_ELEMENT(element_name) G_STMT_START{ \
- GstElement *element = gst_element_factory_make ((element_name), NULL); \
- if (element) { \
- g_print ("REQUIRE line %3d OK\n", __LINE__); \
- gst_object_unref (element); \
- } else { \
- g_print ("REQUIRE line %3d EXIT : No element of type \"%s\" available. Exiting.\n", __LINE__, (element_name)); \
- TEST_FINISH; \
- } \
-}G_STMT_END
-
-#define PIPELINE1 "filesrc blocksize =8192 location=%s ! mad ! osssink"
-#define PIPELINE2 "filesrc location=%s ! mpegdemux ! mpeg2dec ! xvimagesink"
-#define PIPELINE3 "filesrc location=%s ! mpegdemux name = demux ! mpeg2dec ! { queue ! xvimagesink } demux.audio_00 ! mad ! osssink"
-#define PIPELINE4 "pipeline. ( { filesrc location=%s ! spider name=spider ! { queue ! volume ! ( tee name=tee ! { queue ! ( goom ) ! colorspace ! ( xvimagesink ) } tee. ! { queue ! ( osssink ) } ) } spider. ! { queue ! colorspace ( xvimagesink ) } } )"
-#define PIPELINE5 "pipeline. ( { filesrc location=%s ! spider name=spider ! ( tee name=tee ! { queue ! spider ! ( goom ) ! colorspace ! ( xvimagesink ) } tee. ! { queue ! volume ! ( osssink ) } ) spider. ! { queue! colorspace ( xvimagesink ) } } )"
-
-/* FIXME: Should this run, too?
-#define PIPELINE3 "filesrc location=%s ! mpegdemux name = demux ! mpeg2dec ! { queue ! xvimagesink } demux.audio_%%02d ! mad ! osssink"
-*/
-
-gint
-main (gint argc, gchar * argv[])
-{
- gst_init (&argc, &argv);
-
- goto here;
-here:
-
- /**
- * checks:
- * - default playback pipeline
- * - unsigned parameters
- */
- audio_file = g_build_filename (g_get_home_dir (), "music.mp3", NULL);
- TEST_REQUIRE (g_file_test (audio_file, G_FILE_TEST_EXISTS),
- "The following tests requires a valid mp3 file music.mp3 in your home directory.");
- TEST_REQUIRE_ELEMENT ("mad");
- TEST_REQUIRE_ELEMENT ("osssink");
- TEST_START (PIPELINE1, audio_file);
- TEST_RUN (10);
- TEST_OK;
-
- /**
- * checks:
- * - default video playback pipeline (without audio)
- * - SOMETIMES pads
- */
- video_file = g_build_filename (g_get_home_dir (), "video.mpeg", NULL);
- TEST_REQUIRE (g_file_test (video_file, G_FILE_TEST_EXISTS),
- "The following tests requires a valid mpeg file video.mpeg in your home directory.");
- TEST_REQUIRE_ELEMENT ("mpegdemux");
- TEST_REQUIRE_ELEMENT ("mpeg2dec");
- TEST_REQUIRE_ELEMENT ("xvimagesink");
- TEST_START (PIPELINE2, video_file);
- TEST_RUN (50);
- TEST_OK;
-
- /**
- * checks:
- * - default video playback pipeline (with audio)
- * - more SOMETIMES pads
- */
- TEST_START (PIPELINE3, video_file);
- TEST_RUN (200);
- TEST_OK;
-
- /**
- * checks:
- * - default new gst-player pipeline
- */
- TEST_START (PIPELINE4, video_file);
- TEST_RUN (500);
- TEST_OK;
-
- /**
- * checks:
- * - default old gst-player pipeline
- */
- TEST_START (PIPELINE5, video_file);
- TEST_RUN (500);
- TEST_OK;
-
- g_free (audio_file);
- g_free (video_file);
- return 0;
-}
diff --git a/tests/old/testsuite/plugin/.gitignore b/tests/old/testsuite/plugin/.gitignore
deleted file mode 100644
index bd44ca109e..0000000000
--- a/tests/old/testsuite/plugin/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-Makefile
-Makefile.in
-*.o
-*.lo
-*.la
-.deps
-.libs
-dynamic
-linked
-loading
-registry
-static
-static2
-*.bb
-*.bbg
-*.da
diff --git a/tests/old/testsuite/plugin/Makefile.am b/tests/old/testsuite/plugin/Makefile.am
deleted file mode 100644
index 803c3841c8..0000000000
--- a/tests/old/testsuite/plugin/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-include ../Rules
-
-plugin_LTLIBRARIES = libtestplugin.la libtestplugin2.la
-
-tests_pass = dynamic linked loading registry static static2
-tests_fail =
-tests_ignore =
-
-libtestplugin_la_SOURCES = testplugin.c
-libtestplugin_la_CFLAGS = $(GST_OBJ_CFLAGS)
-libtestplugin_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libtestplugin2_la_SOURCES = testplugin2.c
-libtestplugin2_la_CFLAGS = $(GST_OBJ_CFLAGS)
-libtestplugin2_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-
-linked_LIBS = libtestplugin.la libtestplugin2.la
diff --git a/tests/old/testsuite/plugin/README b/tests/old/testsuite/plugin/README
deleted file mode 100644
index f8898c59d0..0000000000
--- a/tests/old/testsuite/plugin/README
+++ /dev/null
@@ -1,59 +0,0 @@
-The following plugin modes are supported:
-
-1) registry based
------------------
-
-All known plugins are listed in the registry file.
-
- gst_plugin_find ("pluginname");
-
-Works right after gst_init (), along with the elements in it.
-dynamic loading of the plugin is performed when a feature inside
-it is requested.
-
-example: registry.c. (You might want to run gstreamer-register with
-the --gst-plugin-path=. to added the test dir to the plugin path so
-that the testplugins can be found)
-
-
-2) non registry based, dynmic loading
--------------------------------------
-
-Plugins are know after a gst_plugin_load ("pluginname"). This
-function will scan de plugin paths, so you might want to perform
-a gst_plugin_add_path ("path").
-
-After the gst_plugin_load(), the features are available without any
-further actions.
-
-example: dynamic.c
-
-
-3) non registry based, shared linking
--------------------------------------
-
-You can add the plugin .so (or equivalent) file to the LDFLAGS at
-compile time. The plugin will be known after the gst_init() without
-any further actions.
-
-example: linked.c
-
-
-4) non registry based, static linking
--------------------------------------
-
-Plugin compiled with the GST_PLUGIN_STATIC defined can be statically
-linked to the executable. The plugin is available after gst_init ()
-without any further actions.
-
-example: static.c (plugins are statically linked from another file)
- static2.c (plugins are included in the main file)
-
-
-Any combination of the above is possible too, for example, you can use
-a registry, have some plugins load dynamically and have another few
-linked in as a shared lib.
-
-You cannot statically link multiple plugins that are compiled without the
-GST_PLUGIN_STATIC symbol defined (this will cause multiple defined at link
-time for obvious reasons)
diff --git a/tests/old/testsuite/plugin/dynamic.c b/tests/old/testsuite/plugin/dynamic.c
deleted file mode 100644
index 27b173aa41..0000000000
--- a/tests/old/testsuite/plugin/dynamic.c
+++ /dev/null
@@ -1,23 +0,0 @@
-
-#include <gst/gst.h>
-
-int
-main (int argc, char *argv[])
-{
- GstPlugin *plugin;
- GError *error = NULL;
-
- gst_init (&argc, &argv);
-
- plugin = gst_plugin_load_file (".libs/libtestplugin.so", &error);
- if (error) {
- g_print ("ERROR loading plug-in: %s\n", error->message);
- g_free (error);
- return 1;
- }
- g_assert (plugin != NULL);
-
- g_print ("testplugin: %s\n", gst_plugin_get_name (plugin));
-
- return 0;
-}
diff --git a/tests/old/testsuite/plugin/linked.c b/tests/old/testsuite/plugin/linked.c
deleted file mode 100644
index 368d3415c5..0000000000
--- a/tests/old/testsuite/plugin/linked.c
+++ /dev/null
@@ -1,22 +0,0 @@
-
-#include <gst/gst.h>
-
-int
-main (int argc, char *argv[])
-{
- GstPlugin *plugin;
-
- gst_init (&argc, &argv);
-
- plugin = gst_registry_pool_find_plugin ("testplugin");
- g_assert (plugin != NULL);
-
- g_print ("testplugin: %p %s\n", plugin, gst_plugin_get_name (plugin));
-
- plugin = gst_registry_pool_find_plugin ("testplugin2");
- g_assert (plugin != NULL);
-
- g_print ("testplugin2: %p %s\n", plugin, gst_plugin_get_name (plugin));
-
- return 0;
-}
diff --git a/tests/old/testsuite/plugin/loading.c b/tests/old/testsuite/plugin/loading.c
deleted file mode 100644
index 4a6fdfc2de..0000000000
--- a/tests/old/testsuite/plugin/loading.c
+++ /dev/null
@@ -1,55 +0,0 @@
-
-#include <gst/gst.h>
-
-int
-main (int argc, char *argv[])
-{
- GstPlugin *plugin;
- gboolean loaded = FALSE;
- gint numplugins;
-
- gst_init (&argc, &argv);
-
- numplugins = g_list_length (gst_registry_pool_plugin_list ());
- g_print ("%d plugins loaded\n", numplugins);
-
- plugin = gst_registry_pool_find_plugin ("testplugin");
- g_assert (plugin != NULL);
-
- g_print ("%d features in plugin\n",
- g_list_length (gst_plugin_get_feature_list (plugin)));
-
-
- g_print ("testplugin: %p loaded: %s\n", plugin,
- (gst_plugin_is_loaded (plugin) ? "true" : "false"));
-
- loaded = gst_plugin_load (gst_plugin_get_name (plugin));
- g_assert (loaded == TRUE);
-
- numplugins = g_list_length (gst_registry_pool_plugin_list ());
- g_print ("%d plugins loaded\n", numplugins);
-
- plugin = gst_registry_pool_find_plugin ("testplugin");
- g_assert (plugin != NULL);
- g_print ("testplugin: %p loaded: %s\n", plugin,
- (gst_plugin_is_loaded (plugin) ? "true" : "false"));
-
- g_print ("%d features in plugin\n",
- g_list_length (gst_plugin_get_feature_list (plugin)));
-
- loaded = gst_plugin_load (gst_plugin_get_name (plugin));
- g_assert (loaded == TRUE);
-
- numplugins = g_list_length (gst_registry_pool_plugin_list ());
- g_print ("%d plugins loaded\n", numplugins);
-
- g_print ("%d features in plugin\n",
- g_list_length (gst_plugin_get_feature_list (plugin)));
-
- plugin = gst_registry_pool_find_plugin ("testplugin");
- g_assert (plugin != NULL);
- g_print ("testplugin: %p loaded: %s\n", plugin,
- (gst_plugin_is_loaded (plugin) ? "true" : "false"));
-
- return 0;
-}
diff --git a/tests/old/testsuite/plugin/registry.c b/tests/old/testsuite/plugin/registry.c
deleted file mode 100644
index 85a76e2f8c..0000000000
--- a/tests/old/testsuite/plugin/registry.c
+++ /dev/null
@@ -1,17 +0,0 @@
-
-#include <gst/gst.h>
-
-int
-main (int argc, char *argv[])
-{
- GstPlugin *plugin;
-
- gst_init (&argc, &argv);
-
- plugin = gst_registry_pool_find_plugin ("testplugin");
- g_assert (plugin != NULL);
-
- g_print ("testplugin: %s\n", gst_plugin_get_name (plugin));
-
- return 0;
-}
diff --git a/tests/old/testsuite/plugin/static.c b/tests/old/testsuite/plugin/static.c
deleted file mode 100644
index 368d3415c5..0000000000
--- a/tests/old/testsuite/plugin/static.c
+++ /dev/null
@@ -1,22 +0,0 @@
-
-#include <gst/gst.h>
-
-int
-main (int argc, char *argv[])
-{
- GstPlugin *plugin;
-
- gst_init (&argc, &argv);
-
- plugin = gst_registry_pool_find_plugin ("testplugin");
- g_assert (plugin != NULL);
-
- g_print ("testplugin: %p %s\n", plugin, gst_plugin_get_name (plugin));
-
- plugin = gst_registry_pool_find_plugin ("testplugin2");
- g_assert (plugin != NULL);
-
- g_print ("testplugin2: %p %s\n", plugin, gst_plugin_get_name (plugin));
-
- return 0;
-}
diff --git a/tests/old/testsuite/plugin/static2.c b/tests/old/testsuite/plugin/static2.c
deleted file mode 100644
index 1ab30d0f36..0000000000
--- a/tests/old/testsuite/plugin/static2.c
+++ /dev/null
@@ -1,49 +0,0 @@
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <gst/gst.h>
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
- return TRUE;
-}
-
-GST_PLUGIN_DEFINE_STATIC (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "testplugin",
- "a plugin for testing",
- plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN);
-
-static gboolean
-plugin2_init (GstPlugin * plugin)
-{
- return TRUE;
-}
-
-GST_PLUGIN_DEFINE_STATIC (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "testplugin2",
- "a second plugin for testing",
- plugin2_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN);
-
-int
-main (int argc, char *argv[])
-{
- GstPlugin *plugin;
-
- gst_init (&argc, &argv);
-
- plugin = gst_registry_pool_find_plugin ("testplugin");
- g_assert (plugin != NULL);
-
- g_print ("testplugin: %p %s\n", plugin, gst_plugin_get_name (plugin));
-
- plugin = gst_registry_pool_find_plugin ("testplugin2");
- g_assert (plugin != NULL);
-
- g_print ("testplugin2: %p %s\n", plugin, gst_plugin_get_name (plugin));
-
- return 0;
-}
diff --git a/tests/old/testsuite/plugin/testplugin.c b/tests/old/testsuite/plugin/testplugin.c
deleted file mode 100644
index d2ee604b96..0000000000
--- a/tests/old/testsuite/plugin/testplugin.c
+++ /dev/null
@@ -1,18 +0,0 @@
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <gst/gst.h>
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
- return TRUE;
-}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "testplugin",
- "a plugin for testing",
- plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN);
diff --git a/tests/old/testsuite/plugin/testplugin2.c b/tests/old/testsuite/plugin/testplugin2.c
deleted file mode 100644
index 47d2ad37d3..0000000000
--- a/tests/old/testsuite/plugin/testplugin2.c
+++ /dev/null
@@ -1,18 +0,0 @@
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <gst/gst.h>
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
- return TRUE;
-}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "testplugin2",
- "another testplugin for testing",
- plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN);
diff --git a/tests/old/testsuite/plugin/testplugin2_s.c b/tests/old/testsuite/plugin/testplugin2_s.c
deleted file mode 100644
index 00c47d8f8d..0000000000
--- a/tests/old/testsuite/plugin/testplugin2_s.c
+++ /dev/null
@@ -1,18 +0,0 @@
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <gst/gst.h>
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
- return TRUE;
-}
-
-GST_PLUGIN_DEFINE_STATIC (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "testplugin2",
- "another testplugin for testing",
- plugin_init, VERSION, GST_LICENSE, GST_COPYRIGHT, GST_PACKAGE, GST_ORIGIN);
diff --git a/tests/old/testsuite/plugin/testplugin_s.c b/tests/old/testsuite/plugin/testplugin_s.c
deleted file mode 100644
index b17605d5be..0000000000
--- a/tests/old/testsuite/plugin/testplugin_s.c
+++ /dev/null
@@ -1,18 +0,0 @@
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <gst/gst.h>
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
- return TRUE;
-}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "testplugin",
- "a plugin for testing",
- plugin_init, VERSION, GST_LICENSE, GST_COPYRIGHT, GST_PACKAGE, GST_ORIGIN);
diff --git a/tests/old/testsuite/refcounting/.gitignore b/tests/old/testsuite/refcounting/.gitignore
deleted file mode 100644
index 85d236abb2..0000000000
--- a/tests/old/testsuite/refcounting/.gitignore
+++ /dev/null
@@ -1,14 +0,0 @@
-Makefile
-Makefile.in
-*.o
-*.lo
-*.la
-.deps
-.libs
-
-bin
-element
-element_pad
-pad
-mainloop
-sched
diff --git a/tests/old/testsuite/refcounting/Makefile.am b/tests/old/testsuite/refcounting/Makefile.am
deleted file mode 100644
index 0a0ed82441..0000000000
--- a/tests/old/testsuite/refcounting/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-include ../Rules
-
-tests_pass = bin element mainloop pad element_pad
-tests_fail =
-tests_ignore = sched
-
-element_SOURCES = element.c mem.c
-pad_SOURCES = pad.c mem.c
-element_pad_SOURCES = element_pad.c mem.c
-bin_SOURCES = bin.c mem.c
-
-EXTRA_DIST = thread.c object.c
-
-noinst_HEADERS = mem.h
diff --git a/tests/old/testsuite/refcounting/bin.c b/tests/old/testsuite/refcounting/bin.c
deleted file mode 100644
index 7d31a3bcb3..0000000000
--- a/tests/old/testsuite/refcounting/bin.c
+++ /dev/null
@@ -1,318 +0,0 @@
-#include <gst/gst.h>
-
-#define ITERS 100
-#include <stdlib.h>
-
-static GstElement *
-create_bin (void)
-{
- GstElement *bin;
- GstElement *element;
-
- bin = gst_bin_new ("testbin");
- g_assert (GST_IS_BIN (bin));
- element = gst_element_factory_make ("fakesrc", NULL);
- g_assert (GST_IS_ELEMENT (element));
- gst_element_set_name (element, "test1");
- gst_bin_add (GST_BIN (bin), element);
- element = gst_element_factory_make ("fakesrc", NULL);
- g_assert (GST_IS_ELEMENT (element));
- gst_element_set_name (element, "test2");
- gst_bin_add (GST_BIN (bin), element);
-
- return bin;
-}
-
-static GstElement *
-create_bin_ghostpads (void)
-{
- GstElement *bin;
- GstElement *element1, *element2;
-
- bin = gst_bin_new ("testbin");
- element1 = gst_element_factory_make ("identity", NULL);
- gst_bin_add (GST_BIN (bin), element1);
- element2 = gst_element_factory_make ("fakesink", NULL);
- gst_bin_add (GST_BIN (bin), element2);
- gst_element_link_pads (element1, "src", element2, "sink");
- gst_element_add_ghost_pad (bin, gst_element_get_pad (element1, "sink"),
- "ghost_sink");
-
- return bin;
-}
-
-static void
-add_remove_test1 (void)
-{
- GstElement *bin;
- GstElement *element;
-
- bin = gst_bin_new ("testbin");
- element = gst_element_factory_make ("fakesrc", NULL);
- gst_element_set_name (element, "test1");
- g_assert (GST_OBJECT_IS_FLOATING (element));
- gst_bin_add (GST_BIN (bin), element);
- g_assert (!GST_OBJECT_IS_FLOATING (element));
- gst_bin_remove (GST_BIN (bin), element);
-
- gst_object_unref (bin);
-}
-
-static void
-add_remove_test2 (void)
-{
- GstElement *bin;
- GstElement *element;
-
- bin = gst_bin_new ("testbin");
- element = gst_element_factory_make ("fakesrc", NULL);
- gst_element_set_name (element, "test1");
- gst_object_ref (element);
- g_assert (GST_OBJECT_IS_FLOATING (element));
- gst_bin_add (GST_BIN (bin), element);
- g_assert (!GST_OBJECT_IS_FLOATING (element));
- gst_bin_remove (GST_BIN (bin), element);
- g_assert (!GST_OBJECT_IS_FLOATING (element));
- g_assert (!GST_OBJECT_IS_DESTROYED (element));
-
- gst_object_unref (element);
-#if 0
- g_assert (GST_OBJECT_IS_DESTROYED (element));
- gst_object_unref (element);
-#endif
-
- gst_object_unref (bin);
-}
-
-#if 0
-/* This code is bogus */
-static void
-add_remove_test3 (void)
-{
- GstElement *bin;
- GstElement *element;
-
- bin = gst_bin_new ("testbin");
- element = gst_element_factory_make ("fakesrc", NULL);
- gst_element_set_name (element, "test1");
- g_assert (GST_OBJECT_FLOATING (element));
- gst_bin_add (GST_BIN (bin), element);
- g_assert (!GST_OBJECT_FLOATING (element));
-
- gst_object_unref (element);
- g_assert (gst_bin_get_by_name (GST_BIN (bin), "test1") == NULL);
-
- gst_object_unref (bin);
-}
-#endif
-
-#if 0
-/* This code is bogus */
-static void
-add_remove_test4 (void)
-{
- GstElement *bin, *bin2;
- GstElement *element;
-
- bin = gst_bin_new ("testbin");
- element = gst_element_factory_make ("fakesrc", NULL);
- gst_element_set_name (element, "test1");
- g_assert (GST_OBJECT_FLOATING (element));
- gst_bin_add (GST_BIN (bin), element);
- g_assert (!GST_OBJECT_FLOATING (element));
-
- bin2 = create_bin ();
- g_assert (GST_OBJECT_FLOATING (bin2));
- gst_bin_add (GST_BIN (bin), bin2);
- g_assert (!GST_OBJECT_FLOATING (bin2));
-
- gst_object_unref (bin2);
- g_assert (gst_bin_get_by_name (GST_BIN (bin), "testbin") == NULL);
- gst_object_unref (element);
- g_assert (gst_bin_get_by_name (GST_BIN (bin), "test1") == NULL);
-
- gst_object_unref (bin);
-}
-#endif
-
-int
-main (int argc, gchar * argv[])
-{
- GstElement *bin;
- int usage1;
- gint i, iters;
-
- gst_alloc_trace_set_flags_all (GST_ALLOC_TRACE_LIVE);
-
- gst_init (&argc, &argv);
-
- if (argc == 2)
- iters = atoi (argv[1]);
- else
- iters = ITERS;
-
-
- g_print ("starting test\n");
-
- usage1 = gst_alloc_trace_live_all ();
- //gst_alloc_trace_print_all ();
-
- bin = gst_bin_new ("somebin");
- gst_object_unref (bin);
- g_print ("create/unref new bin %d\n", gst_alloc_trace_live_all () - usage1);
-
- for (i = 0; i < iters; i++) {
- bin = gst_bin_new ("somebin");
- gst_object_unref (bin);
- }
- g_print ("create/unref %d bins %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-
- bin = gst_bin_new ("somebin");
- g_assert (GST_OBJECT_IS_FLOATING (bin));
- gst_object_ref (bin);
- gst_object_sink (GST_OBJECT (bin));
- g_assert (!GST_OBJECT_IS_FLOATING (bin));
- gst_object_unref (bin);
- g_print ("create/ref/sink/unref new bin %d\n",
- gst_alloc_trace_live_all () - usage1);
-
-
- for (i = 0; i < iters; i++) {
- bin = gst_bin_new ("somebin");
- gst_object_ref (bin);
- gst_object_sink (GST_OBJECT (bin));
- gst_object_unref (bin);
- }
- g_print ("create/ref/sink/unref %d bins %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-
- bin = gst_bin_new ("somebin");
- g_assert (!GST_OBJECT_IS_DESTROYED (bin));
- gst_object_unref (bin);
-#if 0
- g_assert (GST_OBJECT_IS_DESTROYED (bin));
- gst_object_unref (bin);
-#endif
- g_print ("create/destroy/unref new bin %d\n",
- gst_alloc_trace_live_all () - usage1);
-
- for (i = 0; i < iters; i++) {
- bin = gst_bin_new ("somebin");
- gst_object_unref (bin);
-#if 0
- gst_object_unref (bin);
-#endif
- }
- g_print ("create/destroy/unref %d bin %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-
- bin = gst_bin_new ("somebin");
- gst_object_ref (bin);
- gst_object_unref (bin);
- gst_object_unref (bin);
- g_print ("create/ref/unref/unref new bin %d\n",
- gst_alloc_trace_live_all () - usage1);
-
- for (i = 0; i < iters; i++) {
- bin = gst_bin_new ("somebin");
- gst_object_ref (bin);
- gst_object_unref (bin);
- gst_object_unref (bin);
- }
- g_print ("create/ref/unref/unref %d bin %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-
- bin = gst_bin_new ("somebin");
- gst_object_ref (bin);
- gst_object_unref (bin);
- gst_object_unref (bin);
-#if 0
- gst_object_unref (bin);
-#endif
- g_print ("craete/ref/destroy/unref/unref new bin %d\n",
- gst_alloc_trace_live_all () - usage1);
-
- for (i = 0; i < iters; i++) {
- bin = gst_bin_new ("somebin");
- gst_object_ref (bin);
- gst_object_unref (bin);
- gst_object_unref (bin);
-#if 0
- gst_object_unref (bin);
-#endif
- }
- g_print ("craete/ref/destroy/unref/unref %d bins %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-
- for (i = 0; i < iters; i++) {
- bin = gst_bin_new ("somebin");
- gst_object_ref (bin);
- gst_element_set_name (bin, "testing123");
- gst_object_unref (bin);
- gst_element_set_name (bin, "testing123");
- gst_object_unref (bin);
-#if 0
- gst_object_unref (bin);
-#endif
- }
- g_print ("craete/ref/destroy/unref/unref %d bins with name %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-
- bin = gst_bin_new ("somebin");
- for (i = 0; i < iters; i++) {
- gst_element_set_name (bin, "testing");
- }
- gst_object_unref (bin);
- g_print ("set name %d times %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-
- for (i = 0; i < iters; i++) {
- bin = create_bin ();
- gst_object_unref (bin);
- }
- g_print ("create/unref %d bin with children %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-
- for (i = 0; i < iters / 2; i++) {
- bin = create_bin_ghostpads ();
- gst_object_unref (bin);
- }
- g_print ("create/unref %d bin with children and ghostpads %d\n", iters / 2,
- gst_alloc_trace_live_all () - usage1);
-
- for (i = 0; i < iters; i++) {
- add_remove_test1 ();
- }
- g_print ("add/remove test1 %d in bin %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-
- for (i = 0; i < iters; i++) {
- add_remove_test2 ();
- }
- g_print ("add/remove test2 %d in bin %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-
-#if 0
- for (i = 0; i < iters; i++) {
- add_remove_test3 ();
- }
- g_print ("add/destroy/remove test3 %d in bin %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-#endif
-
-#if 0
- for (i = 0; i < iters; i++) {
- add_remove_test4 ();
- }
- g_print ("add/destroy/remove test4 %d in bin %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-#endif
-
- g_print ("leaked: %d\n", gst_alloc_trace_live_all () - usage1);
-
- //gst_alloc_trace_print_all ();
-
- //return (gst_alloc_trace_live_all () - usage1 ? -1 : 0);
- return 0;
-}
diff --git a/tests/old/testsuite/refcounting/element.c b/tests/old/testsuite/refcounting/element.c
deleted file mode 100644
index da0f54130e..0000000000
--- a/tests/old/testsuite/refcounting/element.c
+++ /dev/null
@@ -1,139 +0,0 @@
-#include <gst/gst.h>
-
-#define ITERS 100
-#include <stdlib.h>
-
-int
-main (int argc, gchar * argv[])
-{
- GstElement *element;
- int usage1;
- gint i, iters;
-
- gst_init (&argc, &argv);
-
- if (argc == 2)
- iters = atoi (argv[1]);
- else
- iters = ITERS;
-
- g_print ("starting test\n");
-
- usage1 = gst_alloc_trace_live_all ();
- //gst_alloc_trace_print_all ();
-
- element = gst_element_factory_make ("fakesrc", NULL);
- gst_object_unref (element);
- g_print ("create/unref new element %d\n",
- gst_alloc_trace_live_all () - usage1);
-
- for (i = 0; i < iters; i++) {
- element = gst_element_factory_make ("fakesrc", NULL);
- gst_object_unref (element);
- }
- g_print ("create/unref %d elements %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-
- element = gst_element_factory_make ("fakesrc", NULL);
- g_assert (GST_OBJECT_IS_FLOATING (element));
- gst_object_ref (element);
- gst_object_sink (GST_OBJECT (element));
- g_assert (!GST_OBJECT_IS_FLOATING (element));
- gst_object_unref (element);
- g_print ("create/ref/sink/unref new element %d\n",
- gst_alloc_trace_live_all () - usage1);
-
-
- for (i = 0; i < iters; i++) {
- element = gst_element_factory_make ("fakesrc", NULL);
- gst_object_ref (element);
- gst_object_sink (GST_OBJECT (element));
- gst_object_unref (element);
- }
- g_print ("create/ref/sink/unref %d elements %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-
-#if 0
- element = gst_element_factory_make ("fakesrc", NULL);
- g_assert (!GST_OBJECT_IS_DESTROYED (element));
- gst_object_unref (element);
- g_assert (GST_OBJECT_IS_DESTROYED (element));
- gst_object_unref (element);
- g_print ("create/destroy/unref new element %d\n",
- gst_alloc_trace_live_all () - usage1);
-#endif
-
-#if 0
- for (i = 0; i < iters; i++) {
- element = gst_element_factory_make ("fakesrc", NULL);
- gst_object_unref (element);
- gst_object_unref (element);
- }
- g_print ("create/destroy/unref %d element %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-#endif
-
- element = gst_element_factory_make ("fakesrc", NULL);
- gst_object_ref (element);
- gst_object_unref (element);
- gst_object_unref (element);
- g_print ("create/ref/unref/unref new element %d\n",
- gst_alloc_trace_live_all () - usage1);
-
- for (i = 0; i < iters; i++) {
- element = gst_element_factory_make ("fakesrc", NULL);
- gst_object_ref (element);
- gst_object_unref (element);
- gst_object_unref (element);
- }
- g_print ("create/ref/unref/unref %d element %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-
-#if 0
- element = gst_element_factory_make ("fakesrc", NULL);
- gst_object_ref (element);
- gst_object_unref (element);
- gst_object_unref (element);
- gst_object_unref (element);
- g_print ("craete/ref/destroy/unref/unref new element %d\n",
- gst_alloc_trace_live_all () - usage1);
-#endif
-
-#if 0
- for (i = 0; i < iters; i++) {
- element = gst_element_factory_make ("fakesrc", NULL);
- gst_object_ref (element);
- gst_object_unref (element);
- gst_object_unref (element);
- gst_object_unref (element);
- }
- g_print ("craete/ref/destroy/unref/unref %d elements %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-#endif
-
-#if 0
- for (i = 0; i < iters; i++) {
- element = gst_element_factory_make ("fakesrc", NULL);
- gst_object_ref (element);
- gst_element_set_name (element, "testing123");
- gst_object_unref (element);
- gst_element_set_name (element, "testing123");
- gst_object_unref (element);
- gst_object_unref (element);
- }
- g_print ("craete/ref/destroy/unref/unref %d elements with name %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-#endif
-
- element = gst_element_factory_make ("fakesrc", NULL);
- for (i = 0; i < iters; i++) {
- gst_element_set_name (element, "testing");
- }
- gst_object_unref (element);
- g_print ("set name %d times %d\n", iters,
- gst_alloc_trace_live_all () - usage1);
-
- g_print ("leaked: %d\n", gst_alloc_trace_live_all () - usage1);
-
- return (gst_alloc_trace_live_all () - usage1 ? -1 : 0);
-}
diff --git a/tests/old/testsuite/refcounting/element_pad.c b/tests/old/testsuite/refcounting/element_pad.c
deleted file mode 100644
index 5220801530..0000000000
--- a/tests/old/testsuite/refcounting/element_pad.c
+++ /dev/null
@@ -1,115 +0,0 @@
-#include <gst/gst.h>
-
-#define ITERS 100
-#include <stdlib.h>
-#include "mem.h"
-
-int
-main (int argc, gchar * argv[])
-{
- GstElement *element;
- GstElement *element2;
- GstPad *pad;
- long usage1;
- gint i, iters;
-
- gst_init (&argc, &argv);
-
- if (argc == 2)
- iters = atoi (argv[1]);
- else
- iters = ITERS;
-
- g_print ("starting element with pad test with %d iterations\n", iters);
- usage1 = vmsize ();
-
- element = gst_element_factory_make ("fakesink", NULL);;
- g_assert (GST_IS_ELEMENT (element));
- pad = gst_element_get_pad (element, "sink");
- g_assert (GST_IS_PAD (pad));
- g_assert (GST_OBJECT_IS_FLOATING (element));
- g_assert (!GST_OBJECT_IS_FLOATING (pad));
- g_assert (gst_pad_get_parent (pad) == element);
- gst_object_unref (element);
- g_print ("create/addpad/unref 1 new element: %ld\n", vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- element = gst_element_factory_make ("fakesink", NULL);;
- g_assert (GST_IS_ELEMENT (element));
- gst_object_unref (element);
- }
- g_print ("create/unref %d elements: %ld\n", iters, vmsize () - usage1);
-
- for (i = 0; i < iters / 2; i++) {
- element = gst_element_factory_make ("fakesink", NULL);
- g_assert (GST_IS_ELEMENT (element));
- element2 = gst_element_factory_make ("fakesrc", NULL);
- g_assert (GST_IS_ELEMENT (element2));
- gst_element_link_pads (element2, "src", element, "sink");
- g_assert (GST_PAD_IS_LINKED (gst_element_get_pad (element2, "src")));
- g_assert (GST_PAD_IS_LINKED (gst_element_get_pad (element, "sink")));
- gst_object_unref (element);
- g_assert (!GST_PAD_IS_LINKED (gst_element_get_pad (element2, "src")));
- gst_object_unref (element2);
- }
- g_print ("create/link/unref %d element duos: %ld\n", iters / 2,
- vmsize () - usage1);
-
- element = gst_element_factory_make ("fakesink", NULL);;
- g_assert (GST_IS_ELEMENT (element));
- pad = gst_element_get_pad (element, "sink");
- g_assert (GST_IS_PAD (pad));
- gst_element_remove_pad (element, pad);
- g_assert (gst_element_get_pad (element, "sink") == NULL);
- gst_object_unref (element);
-
- g_print ("pad removal on one element: %ld\n", vmsize () - usage1);
-
- for (i = 0; i < iters / 2; i++) {
- element = gst_element_factory_make ("fakesink", NULL);;
- g_assert (GST_IS_ELEMENT (element));
- pad = gst_element_get_pad (element, "sink");
- g_assert (GST_IS_PAD (pad));
- gst_element_remove_pad (element, pad);
- g_assert (gst_element_get_pad (element, "sink") == NULL);
- gst_object_unref (element);
- }
- g_print ("pad removal loop on %d elements: %ld\n", iters / 2,
- vmsize () - usage1);
-
- for (i = 0; i < iters / 2; i++) {
- element = gst_element_factory_make ("fakesink", NULL);;
- g_assert (GST_IS_ELEMENT (element));
- pad = gst_element_get_pad (element, "sink");
- g_assert (GST_IS_PAD (pad));
- gst_object_ref (pad);
- gst_element_remove_pad (element, pad);
- g_assert (gst_pad_get_parent (pad) == NULL);
- gst_object_unref (pad);
- gst_object_unref (element);
- }
- g_print ("pad ref/removal/test loop on %d elements: %ld\n", iters / 2,
- vmsize () - usage1);
-
- element = gst_element_factory_make ("fakesink", NULL);;
- g_assert (GST_IS_ELEMENT (element));
- pad = gst_element_get_pad (element, "sink");
- g_assert (GST_IS_PAD (pad));
- gst_object_unref (element);
-
- g_print ("pad unref on one element: %ld\n", vmsize () - usage1);
-
- for (i = 0; i < iters / 2; i++) {
- element = gst_element_factory_make ("fakesink", NULL);
- g_assert (GST_IS_ELEMENT (element));
- pad = gst_element_get_pad (element, "sink");
- g_assert (GST_IS_PAD (pad));
- gst_object_unref (element);
- }
- g_print ("pad unref loop on %d elements: %ld\n", iters / 2,
- vmsize () - usage1);
-
- g_print ("leaked: %ld\n", vmsize () - usage1);
-
- return 0;
-}
diff --git a/tests/old/testsuite/refcounting/mainloop.c b/tests/old/testsuite/refcounting/mainloop.c
deleted file mode 100644
index 0e14a92ef3..0000000000
--- a/tests/old/testsuite/refcounting/mainloop.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <gst/gst.h>
-
-/* test to make sure that we can do gst_main and gst_main_quit in succession */
-/* FIXME: use mutexes */
-
-gboolean mainloop = FALSE;
-
-static gboolean
-quit_main (gpointer data)
-{
- if (mainloop) {
- mainloop = FALSE;
- g_print ("-");
- gst_main_quit ();
- }
- return TRUE;
-}
-
-int
-main (int argc, gchar * argv[])
-{
- int i;
-
- g_timeout_add (1, quit_main, NULL);
- for (i = 0; i < 1000; ++i) {
- mainloop = TRUE;
- g_print ("+");
- gst_main ();
- }
- g_print ("\n");
- return 0;
-}
diff --git a/tests/old/testsuite/refcounting/mem.c b/tests/old/testsuite/refcounting/mem.c
deleted file mode 100644
index 5911dc61de..0000000000
--- a/tests/old/testsuite/refcounting/mem.c
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-int
-vmsize ()
-{
- int pid, fd, size, i, mem;
- char filename[17], buf[256], *ptr, *end;
-
- pid = getpid ();
- snprintf (filename, 17, "/proc/%d/stat", pid);
- fd = open (filename, O_RDONLY);
- if (fd == -1) {
- fprintf (stderr, "warning: could not open %s\n", filename);
- return -1;
- }
- size = read (fd, buf, 240);
- if (size == -1)
- return -1;
- ptr = buf;
- for (i = 0; i < 22; i++)
- ptr = (char *) strchr (ptr, ' ') + 1;
- end = (char *) strchr (ptr, ' ');
- *end = 0;
- sscanf (ptr, "%d", &mem);
- close (fd);
- return mem;
-}
diff --git a/tests/old/testsuite/refcounting/mem.h b/tests/old/testsuite/refcounting/mem.h
deleted file mode 100644
index 28999db2c3..0000000000
--- a/tests/old/testsuite/refcounting/mem.h
+++ /dev/null
@@ -1 +0,0 @@
-int vmsize();
diff --git a/tests/old/testsuite/refcounting/object.c b/tests/old/testsuite/refcounting/object.c
deleted file mode 100644
index 5646f71ef1..0000000000
--- a/tests/old/testsuite/refcounting/object.c
+++ /dev/null
@@ -1,160 +0,0 @@
-#include <gst/gst.h>
-
-#define ITERS 100000
-#include <stdlib.h>
-#include "mem.h"
-
-int
-main (int argc, gchar * argv[])
-{
- GstObject *object, *object2;
- long usage1;
- gint i, iters;
-
- gst_init (&argc, &argv);
-
- if (argc == 2)
- iters = atoi (argv[1]);
- else
- iters = ITERS;
-
- g_print ("starting test with %d iterations\n", iters);
- usage1 = vmsize ();
- object = gst_object_new ();
- gst_object_unref (object);
- g_print ("create/unref new object %ld\n", vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- object = gst_object_new ();
- gst_object_unref (object);
-
- }
- g_print ("create/unref %d object %ld\n", iters, vmsize () - usage1);
-
- object = gst_object_new ();
- g_assert (GST_OBJECT_FLOATING (object));
- gst_object_ref (object);
- gst_object_sink (object);
- g_assert (!GST_OBJECT_FLOATING (object));
- gst_object_unref (object);
- g_print ("create/ref/sink/unref new object %ld\n", vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- object = gst_object_new ();
- gst_object_ref (object);
- gst_object_sink (object);
- gst_object_unref (object);
- }
- g_print ("create/ref/sink/unref %d object %ld\n", iters, vmsize () - usage1);
-
- object = gst_object_new ();
- g_assert (!GST_OBJECT_DESTROYED (object));
- gst_object_unref (object);
- g_assert (GST_OBJECT_DESTROYED (object));
- gst_object_unref (object);
- g_print ("create/destroy/unref new object %ld\n", vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- object = gst_object_new ();
- gst_object_unref (object);
- gst_object_unref (object);
- }
- g_print ("destroy/unref %d object %ld\n", iters, vmsize () - usage1);
-
- object = gst_object_new ();
- gst_object_ref (object);
- gst_object_unref (object);
- gst_object_unref (object);
- g_print ("create/ref/unref/unref new object %ld\n", vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- object = gst_object_new ();
- gst_object_ref (object);
- gst_object_unref (object);
- gst_object_unref (object);
- }
- g_print ("create/ref/unref/unref %d object %ld\n", iters, vmsize () - usage1);
-
- object = gst_object_new ();
- gst_object_ref (object);
- gst_object_unref (object);
- gst_object_unref (object);
- gst_object_unref (object);
- g_print ("create/ref/destroy/unref/unref new object %ld\n",
- vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- object = gst_object_new ();
- gst_object_ref (object);
- gst_object_unref (object);
- gst_object_unref (object);
- gst_object_unref (object);
- }
- g_print ("create/ref/destroy/unref/unref %d object %ld\n", iters,
- vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- object = gst_object_new ();
- gst_object_ref (object);
- gst_object_set_name (object, "testing123");
- gst_object_unref (object);
- gst_object_set_name (object, "testing123");
- gst_object_unref (object);
- gst_object_unref (object);
- }
- g_print ("create/ref/destroy/unref/unref %d object with name %ld\n", iters,
- vmsize () - usage1);
-
- object = gst_object_new ();
- for (i = 0; i < iters; i++) {
- gst_object_set_name (object, "testing");
- }
- gst_object_unref (object);
- g_print ("create/set name/unref %d object %ld\n", iters, vmsize () - usage1);
-
- object = gst_object_new ();
- object2 = gst_object_new ();
- g_assert (GST_OBJECT_FLOATING (object));
- g_assert (GST_OBJECT_FLOATING (object2));
-
- gst_object_set_parent (object, object2);
- g_assert (GST_OBJECT_FLOATING (object2));
- g_assert (!GST_OBJECT_FLOATING (object));
-
- g_print ("parentage flags set_parent ok %ld\n", vmsize () - usage1);
-
- gst_object_ref (object);
- gst_object_unparent (object);
- g_assert (GST_OBJECT_FLOATING (object2));
- g_assert (!GST_OBJECT_FLOATING (object));
- g_assert (gst_object_get_parent (object) == NULL);
-
- g_print ("parentage flags unparent ok %ld\n", vmsize () - usage1);
-
- gst_object_set_parent (object, object2);
- g_assert (GST_OBJECT_FLOATING (object2));
- g_assert (!GST_OBJECT_FLOATING (object));
- g_assert (gst_object_get_parent (object) == object2);
-
- gst_object_unref (object);
- g_assert (GST_OBJECT_DESTROYED (object));
- g_assert (!GST_OBJECT_FLOATING (object));
- g_assert (gst_object_get_parent (object) == NULL);
- gst_object_unref (object);
-
- g_print ("parentage flags destroy ok %ld\n", vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- object = gst_object_new ();
- object2 = gst_object_new ();
- gst_object_set_parent (object2, object);
- gst_object_unref (object);
- gst_object_unref (object2);
- }
- g_print ("create/unref %d 2 parented objects %ld\n", iters,
- vmsize () - usage1);
-
- g_print ("leaked: %ld\n", vmsize () - usage1);
-
- return (vmsize () - usage1 ? -1 : 0);
-}
diff --git a/tests/old/testsuite/refcounting/pad.c b/tests/old/testsuite/refcounting/pad.c
deleted file mode 100644
index 0c0eac65bb..0000000000
--- a/tests/old/testsuite/refcounting/pad.c
+++ /dev/null
@@ -1,153 +0,0 @@
-#include <gst/gst.h>
-
-#define ITERS 100
-#include <stdlib.h>
-#include "mem.h"
-
-GstStaticPadTemplate templ = GST_STATIC_PAD_TEMPLATE ("default",
- GST_PAD_SINK,
- GST_PAD_ALWAYS,
- GST_STATIC_CAPS_ANY);
-
-int
-main (int argc, gchar * argv[])
-{
- GstPad *pad;
- GstPadTemplate *padtempl;
- long usage1;
- gint i, iters;
-
- gst_alloc_trace_set_flags_all (GST_ALLOC_TRACE_LIVE);
-
- gst_init (&argc, &argv);
-
- g_mem_profile ();
-
- if (argc == 2)
- iters = atoi (argv[1]);
- else
- iters = ITERS;
-
- //gst_alloc_trace_print_all ();
-
- g_print ("starting pad test\n");
- usage1 = vmsize ();
-
- g_print ("DEBUG: creating new pad with name padname\n");
- pad =
- gst_pad_new_from_template (gst_static_pad_template_get (&templ),
- "padname");
- g_print ("DEBUG: unreffing new pad with name padname\n");
- gst_object_unref (pad);
- g_print ("create/unref new pad %ld\n", vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- pad =
- gst_pad_new_from_template (gst_static_pad_template_get (&templ),
- "padname");
- gst_object_unref (pad);
- }
- g_print ("create/unref %d pads %ld\n", iters, vmsize () - usage1);
-
- pad =
- gst_pad_new_from_template (gst_static_pad_template_get (&templ),
- "padname");
- g_assert (GST_OBJECT_IS_FLOATING (pad));
- gst_object_ref (pad);
- gst_object_sink (GST_OBJECT (pad));
- g_assert (!GST_OBJECT_IS_FLOATING (pad));
- gst_object_unref (pad);
- g_print ("create/ref/sink/unref new pad %ld\n", vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- pad =
- gst_pad_new_from_template (gst_static_pad_template_get (&templ),
- "padname");
- gst_object_ref (pad);
- gst_object_sink (GST_OBJECT (pad));
- gst_object_unref (pad);
- }
- g_print ("create/ref/sink/unref %d pads %ld\n", iters, vmsize () - usage1);
-
- pad =
- gst_pad_new_from_template (gst_static_pad_template_get (&templ),
- "padname");
- gst_object_ref (pad);
- gst_object_unref (pad);
- gst_object_unref (pad);
- g_print ("create/ref/unref/unref pad %ld\n", vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- pad =
- gst_pad_new_from_template (gst_static_pad_template_get (&templ),
- "padname");
- gst_object_ref (pad);
- gst_object_unref (pad);
- gst_object_unref (pad);
- }
- g_print ("create/ref/unref/unref %d pads %ld\n", iters, vmsize () - usage1);
-
- pad =
- gst_pad_new_from_template (gst_static_pad_template_get (&templ),
- "padname");
- gst_object_ref (pad);
- gst_object_unref (pad);
- gst_object_unref (pad);
- g_print ("create/ref/unref/unref pad %ld\n", vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- pad =
- gst_pad_new_from_template (gst_static_pad_template_get (&templ),
- "padname");
- gst_object_ref (pad);
- gst_object_unref (pad);
- gst_object_unref (pad);
- }
- g_print ("create/ref/unref/unref %d pads %ld\n", iters, vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- pad =
- gst_pad_new_from_template (gst_static_pad_template_get (&templ),
- "padname");
- gst_object_ref (pad);
- gst_pad_set_name (pad, "testing123");
- gst_object_unref (pad);
- gst_pad_set_name (pad, "testing123");
- gst_object_unref (pad);
- }
- g_print ("create/ref/unref/unref %d pads %ld with name\n", iters,
- vmsize () - usage1);
-
- pad =
- gst_pad_new_from_template (gst_static_pad_template_get (&templ),
- "padname");
- for (i = 0; i < iters; i++) {
- gst_pad_set_name (pad, "testing");
- }
- gst_object_unref (pad);
- g_print ("set name %d times %ld\n", iters, vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- padtempl =
- gst_pad_template_new ("sink%d", GST_PAD_SINK, GST_PAD_SOMETIMES,
- gst_caps_new_any ());
- gst_object_unref (padtempl);
- }
- g_print ("%d padtemplates create/unref %ld\n", iters, vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- padtempl =
- gst_pad_template_new ("sink%d", GST_PAD_SINK, GST_PAD_SOMETIMES,
- gst_caps_new_any ());
- pad = gst_pad_new_from_template (padtempl, "sink1");
- gst_object_unref (pad);
- }
- g_print ("%d pads create/unref from padtemplate %ld\n", iters,
- vmsize () - usage1);
-
- g_print ("leaked: %ld\n", vmsize () - usage1);
-
- //gst_alloc_trace_print_all ();
-
- return 0;
-}
diff --git a/tests/old/testsuite/refcounting/sched.c b/tests/old/testsuite/refcounting/sched.c
deleted file mode 100644
index f9fcb85ff1..0000000000
--- a/tests/old/testsuite/refcounting/sched.c
+++ /dev/null
@@ -1,77 +0,0 @@
-#include <gst/gst.h>
-
-gint i = 0;
-GstElement *pipeline;
-GstPadChainFunction oss_chain;
-
-static GstElement *
-make_and_check_element (gchar * type, gchar * name)
-{
- GstElement *element = gst_element_factory_make (type, name);
-
- if (element == NULL) {
- g_warning
- ("Could not run test, because element type \"%s\" is not installed. Please retry when it is. Assuming it works for now...",
- type);
- exit (1);
- }
-
- return element;
-}
-
-static void
-create_pipeline (void)
-{
- GstElement *src;
- GstElement *sink;
- GstElement *id;
-
- pipeline = gst_pipeline_new ("pipeline");
- src = make_and_check_element ("sinesrc", "src");
- /**
- * You need a sink with a loop-based element in here, if you want to kill opt, too.
- * Osssink (chain-based) only breaks the basic scheduler.
- */
- sink = make_and_check_element ("alsasink", "sink");
-
-
- gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL);
- gst_element_link (src, sink);
-
- /**
- * now make the bug appear
- * I believe it has something to do with 2 chains being created in the scheduler
- * but I haven't looked at it yet
- * If you comment out the next 4 lines, everything works fine.
- * And no, it's not because of identity, you may use any other element.
- */
- gst_element_unlink (src, sink);
- id = make_and_check_element ("identity", "id");
- gst_bin_add (GST_BIN (pipeline), id);
- gst_element_link_many (src, id, sink, NULL);
-
- /* This pipeline will not be removed properly once we unref it */
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
-}
-
-gint
-main (gint argc, gchar * argv[])
-{
- gst_init (&argc, &argv);
- create_pipeline ();
-
- while (i < 300) {
- /**
- * only inc i when it works, so the program hangs when _iterate returns false,
- * which it does after the first pipeline isn't unref'd properly and the next
- * osssink refuses to work.
- */
- if (gst_bin_iterate (GST_BIN (pipeline)))
- i++;
- if (i % 50 == 0) {
- gst_object_unref (pipeline);
- create_pipeline ();
- }
- }
- return 0;
-}
diff --git a/tests/old/testsuite/refcounting/thread.c b/tests/old/testsuite/refcounting/thread.c
deleted file mode 100644
index a2294c610e..0000000000
--- a/tests/old/testsuite/refcounting/thread.c
+++ /dev/null
@@ -1,304 +0,0 @@
-#include <gst/gst.h>
-
-#define ITERS 100000
-#include <stdlib.h>
-#include "mem.h"
-
-GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
- GST_PAD_SRC,
- GST_PAD_ALWAYS,
- GST_STATIC_CAPS_ANY);
-
-GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
- GST_PAD_SINK,
- GST_PAD_ALWAYS,
- GST_STATIC_CAPS_ANY);
-
-static GstElement *
-create_thread (void)
-{
- GstElement *thread;
- GstElement *element;
-
- thread = gst_thread_new ("testthread");
- element = gst_element_new ();
- gst_element_set_name (element, "test1");
- gst_bin_add (GST_BIN (thread), element);
- element = gst_element_new ();
- gst_element_set_name (element, "test2");
- gst_bin_add (GST_BIN (thread), element);
-
- return thread;
-}
-
-static GstElement *
-create_thread_ghostpads (void)
-{
- GstElement *thread;
- GstElement *element1, *element2;
-
- thread = gst_thread_new ("testthread");
- element1 = gst_element_new ();
- gst_element_set_name (element1, "test1");
- gst_element_add_pad (element1,
- gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
- "src1"));
- gst_bin_add (GST_BIN (thread), element1);
- element2 = gst_element_new ();
- gst_element_set_name (element2, "test2");
- gst_element_add_pad (element1,
- gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
- "sink1"));
- gst_bin_add (GST_BIN (thread), element2);
- gst_element_link (element1, "src1", element2, "sink1");
- gst_element_add_ghost_pad (thread, gst_element_get_pad (element2, "sink1"),
- "sink1");
-
- return thread;
-}
-
-static void
-add_remove_test1 (void)
-{
- GstElement *thread;
- GstElement *element;
-
- thread = gst_thread_new ("testthread");
- element = gst_element_new ();
- gst_element_set_name (element, "test1");
- g_assert (GST_OBJECT_FLOATING (element));
- gst_bin_add (GST_BIN (thread), element);
- g_assert (!GST_OBJECT_FLOATING (element));
- gst_bin_remove (GST_BIN (thread), element);
-
- gst_object_unref (thread);
-}
-
-static void
-add_remove_test2 (void)
-{
- GstElement *thread;
- GstElement *element;
-
- thread = gst_thread_new ("testthread");
- element = gst_element_new ();
- gst_element_set_name (element, "test1");
- gst_object_ref (element);
- g_assert (GST_OBJECT_FLOATING (element));
- gst_bin_add (GST_BIN (thread), element);
- g_assert (!GST_OBJECT_FLOATING (element));
- gst_bin_remove (GST_BIN (thread), element);
- g_assert (!GST_OBJECT_FLOATING (element));
- g_assert (!GST_OBJECT_DESTROYED (element));
-
- gst_object_unref (element);
- g_assert (GST_OBJECT_DESTROYED (element));
- gst_object_unref (element);
-
- gst_object_unref (thread);
-}
-
-static void
-add_remove_test3 (void)
-{
- GstElement *thread;
- GstElement *element;
-
- thread = gst_thread_new ("testthread");
- element = gst_element_new ();
- gst_element_set_name (element, "test1");
- g_assert (GST_OBJECT_FLOATING (element));
- gst_bin_add (GST_BIN (thread), element);
- g_assert (!GST_OBJECT_FLOATING (element));
-
- gst_object_unref (element);
- g_assert (gst_bin_get_by_name (GST_BIN (thread), "test1") == NULL);
-
- gst_object_unref (thread);
-}
-
-static void
-add_remove_test4 (void)
-{
- GstElement *thread, *thread2;
- GstElement *element;
-
- thread = gst_thread_new ("testthread");
- element = gst_element_new ();
- gst_element_set_name (element, "test1");
- g_assert (GST_OBJECT_FLOATING (element));
- gst_bin_add (GST_BIN (thread), element);
- g_assert (!GST_OBJECT_FLOATING (element));
-
- thread2 = create_thread ();
- g_assert (GST_OBJECT_FLOATING (thread2));
- gst_bin_add (GST_BIN (thread), thread2);
- g_assert (!GST_OBJECT_FLOATING (thread2));
-
- gst_object_unref (thread2);
- g_assert (gst_bin_get_by_name (GST_BIN (thread), "testthread") == NULL);
- gst_object_unref (element);
- g_assert (gst_bin_get_by_name (GST_BIN (thread), "test1") == NULL);
-
- gst_object_unref (thread);
-}
-
-int
-main (int argc, gchar * argv[])
-{
- GstElement *thread, *element;
- long usage1;
- gint i, iters;
-
- gst_init (&argc, &argv);
-
- if (argc == 2)
- iters = atoi (argv[1]);
- else
- iters = ITERS;
-
- g_print ("starting test\n");
- usage1 = vmsize ();
-
- thread = gst_thread_new ("somethread");
- gst_object_unref (thread);
- g_print ("create/unref new thread %ld\n", vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- thread = gst_thread_new ("somethread");
- gst_object_unref (thread);
- }
- g_print ("create/unref %d threads %ld\n", iters, vmsize () - usage1);
-
- thread = gst_thread_new ("somethread");
- g_assert (GST_OBJECT_FLOATING (thread));
- gst_object_ref (thread);
- gst_object_sink (GST_OBJECT (thread));
- g_assert (!GST_OBJECT_FLOATING (thread));
- gst_object_unref (thread);
- g_print ("create/ref/sink/unref new thread %ld\n", vmsize () - usage1);
-
-
- for (i = 0; i < iters; i++) {
- thread = gst_thread_new ("somethread");
- gst_object_ref (thread);
- gst_object_sink (GST_OBJECT (thread));
- gst_object_unref (thread);
- }
- g_print ("create/ref/sink/unref %d threads %ld\n", iters, vmsize () - usage1);
-
- thread = gst_thread_new ("somethread");
- g_assert (!GST_OBJECT_DESTROYED (thread));
- gst_object_unref (thread);
- g_assert (GST_OBJECT_DESTROYED (thread));
- gst_object_unref (thread);
- g_print ("create/destroy/unref new thread %ld\n", vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- thread = gst_thread_new ("somethread");
- gst_object_unref (thread);
- gst_object_unref (thread);
- }
- g_print ("create/destroy/unref %d thread %ld\n", iters, vmsize () - usage1);
-
- thread = gst_thread_new ("somethread");
- gst_object_ref (thread);
- gst_object_unref (thread);
- gst_object_unref (thread);
- g_print ("create/ref/unref/unref new thread %ld\n", vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- thread = gst_thread_new ("somethread");
- gst_object_ref (thread);
- gst_object_unref (thread);
- gst_object_unref (thread);
- }
- g_print ("create/ref/unref/unref %d thread %ld\n", iters, vmsize () - usage1);
-
- thread = gst_thread_new ("somethread");
- gst_object_ref (thread);
- gst_object_unref (thread);
- gst_object_unref (thread);
- gst_object_unref (thread);
- g_print ("craete/ref/destroy/unref/unref new thread %ld\n",
- vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- thread = gst_thread_new ("somethread");
- gst_object_ref (thread);
- gst_object_unref (thread);
- gst_object_unref (thread);
- gst_object_unref (thread);
- }
- g_print ("craete/ref/destroy/unref/unref %d threads %ld\n", iters,
- vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- thread = gst_thread_new ("somethread");
- gst_object_ref (thread);
- gst_element_set_name (thread, "testing123");
- gst_object_unref (thread);
- gst_element_set_name (thread, "testing123");
- gst_object_unref (thread);
- gst_object_unref (thread);
- }
- g_print ("craete/ref/destroy/unref/unref %d threads with name %ld\n", iters,
- vmsize () - usage1);
-
- thread = gst_thread_new ("somethread");
- for (i = 0; i < iters; i++) {
- gst_element_set_name (thread, "testing");
- }
- gst_object_unref (thread);
- g_print ("set name %d times %ld\n", iters, vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- thread = gst_thread_new ("somethread");
- element = gst_element_new ();
- gst_element_set_name (element, "test1");
- gst_bin_add (GST_BIN (thread), element);
- gst_object_unref (thread);
- }
- g_print ("create/unref %d thread with one element %ld\n", iters,
- vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- thread = create_thread ();
- gst_object_unref (thread);
- }
- g_print ("create/unref %d thread with children %ld\n", iters,
- vmsize () - usage1);
-
- for (i = 0; i < iters / 2; i++) {
- thread = create_thread_ghostpads ();
- gst_object_unref (thread);
- }
- g_print ("create/unref %d thread with children and ghostpads %ld\n",
- iters / 2, vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- add_remove_test1 ();
- }
- g_print ("add/remove test1 %d in thread %ld\n", iters, vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- add_remove_test2 ();
- }
- g_print ("add/remove test2 %d in thread %ld\n", iters, vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- add_remove_test3 ();
- }
- g_print ("add/destroy/remove test3 %d in thread %ld\n", iters,
- vmsize () - usage1);
-
- for (i = 0; i < iters; i++) {
- add_remove_test4 ();
- }
- g_print ("add/destroy/remove test4 %d in thread %ld\n", iters,
- vmsize () - usage1);
-
- g_print ("leaked: %ld\n", vmsize () - usage1);
-
- return (vmsize () - usage1 ? -1 : 0);
-}
diff --git a/tests/old/testsuite/states/.gitignore b/tests/old/testsuite/states/.gitignore
deleted file mode 100644
index 9d274cca42..0000000000
--- a/tests/old/testsuite/states/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-Makefile
-Makefile.in
-*.o
-*.lo
-*.la
-.deps
-.libs
-
-bin
-locked
-parent
diff --git a/tests/old/testsuite/states/Makefile.am b/tests/old/testsuite/states/Makefile.am
deleted file mode 100644
index 2a01e7553e..0000000000
--- a/tests/old/testsuite/states/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-include ../Rules
-
-tests_pass = locked parent
-tests_fail =
-tests_ignore = bin
diff --git a/tests/old/testsuite/states/bin.c b/tests/old/testsuite/states/bin.c
deleted file mode 100644
index a62b0a78ff..0000000000
--- a/tests/old/testsuite/states/bin.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/* GStreamer
- * Copyright (C) <2004> Benjamin Otte <otte@gnome.org>
- *
- * bin.c:
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <gst/gst.h>
-
-#define RETURN_NAME(x) ((x) == GST_STATE_CHANGE_SUCCESS ? "GST_STATE_CHANGE_SUCCESS" : \
- (x) == GST_STATE_CHANGE_ASYNC ? "GST_STATE_CHANGE_ASYNC" : "GST_STATE_CHANGE_FAILURE")
-static void
-assert_state (GstElement * element, GstState state)
-{
- GstState current, pending;
-
- gst_element_get_state (element, &current, &pending, NULL);
- if (current != state) {
- g_printerr ("%s: state is %s instead of %s",
- GST_OBJECT_NAME (element),
- gst_element_state_get_name (GST_STATE (element)),
- gst_element_state_get_name (state));
- g_assert_not_reached ();
- }
-}
-
-static void
-assert_state_change (GstElement * element, GstState new_state,
- GstStateChangeReturn result, GstState result_state)
-{
- GstStateChangeReturn ret = gst_element_set_state (element, new_state);
-
- if (ret != result) {
- g_printerr ("%s: change state to %s returned %s instead of %s",
- GST_OBJECT_NAME (element), gst_element_state_get_name (new_state),
- RETURN_NAME (ret), RETURN_NAME (result));
- g_assert_not_reached ();
- }
- assert_state (element, result_state);
-}
-
-static void
-empty_bin (gchar * bin_name)
-{
- /* Test the behaviour of empty bins. Since a bin's state is always the state
- * of its highest child, nothing should change in here
- * Return values when no error occured but the state didn't change should be
- * GST_STATE_CHANGE_ASYNC */
- GstElement *bin = gst_element_factory_make (bin_name, NULL);
-
- g_assert (bin);
- /* obvious */
- assert_state (bin, GST_STATE_NULL);
- /* see above */
- assert_state_change (bin, GST_STATE_READY, GST_STATE_CHANGE_SUCCESS,
- GST_STATE_READY);
- assert_state_change (bin, GST_STATE_PAUSED, GST_STATE_CHANGE_SUCCESS,
- GST_STATE_PAUSED);
- assert_state_change (bin, GST_STATE_PLAYING, GST_STATE_CHANGE_SUCCESS,
- GST_STATE_PLAYING);
-}
-
-static void
-test_adding_one_element (GstElement * bin)
-{
- /* Tests behaviour of adding/removing elements to/from bins. It makes sure the
- * state of the bin is always the highest of all contained children. */
- GstState test_states[] = { GST_STATE_READY, GST_STATE_PAUSED,
- GST_STATE_PLAYING, GST_STATE_PAUSED, GST_STATE_READY, GST_STATE_NULL
- };
- GstElement *test = gst_element_factory_make ("identity", NULL);
- GstState bin_state;
- gint i;
-
- gst_element_get_state (bin, &bin_state, NULL, NULL);
- g_assert (test);
- gst_object_ref (test);
- assert_state (test, GST_STATE_NULL);
- gst_bin_add (GST_BIN (bin), test);
- assert_state (bin, MAX (bin_state, GST_STATE_NULL));
- for (i = 0; i < G_N_ELEMENTS (test_states); i++) {
- GstState test_state = test_states[i];
-
- assert_state_change (test, test_state, GST_STATE_CHANGE_SUCCESS,
- test_state);
- assert_state (test, test_state);
- assert_state (bin, MAX (bin_state, test_state));
- gst_bin_remove (GST_BIN (bin), test);
- assert_state (bin, bin_state);
- gst_bin_add (GST_BIN (bin), test);
- assert_state (test, test_state);
- assert_state (bin, MAX (bin_state, test_state));
- }
- gst_bin_remove (GST_BIN (bin), test);
- gst_object_unref (test);
- assert_state (bin, bin_state);
-}
-
-static void
-test_element_in_bin (gchar * bin_name)
-{
- gint i;
- GstState test_states[] = { GST_STATE_NULL, GST_STATE_READY,
- GST_STATE_PAUSED, GST_STATE_PLAYING
- };
- GstElement *id, *bin = gst_element_factory_make (bin_name, NULL);
-
- g_assert (bin);
-
- /* test correct behaviour in empty bins */
- test_adding_one_element (bin);
-
- id = gst_element_factory_make ("identity", NULL);
- g_assert (id);
- assert_state (id, GST_STATE_NULL);
- gst_bin_add (GST_BIN (bin), id);
- /* test correct behaviour in bins which contain elements in various states */
- for (i = 0; i < G_N_ELEMENTS (test_states); i++) {
- GstState test_state = test_states[i];
-
- assert_state_change (bin, test_state, GST_STATE_CHANGE_SUCCESS, test_state);
- assert_state (id, test_state);
- test_adding_one_element (bin);
- }
-
- gst_object_unref (bin);
-}
-
-gint
-main (gint argc, gchar * argv[])
-{
- gst_init (&argc, &argv);
-
- /* test behaviour of empty bins */
- empty_bin ("bin");
- empty_bin ("pipeline");
-
- g_print ("how far\n");
- /* test behaviour of adding/removing elements to/from all core bin types */
- test_element_in_bin ("bin");
- test_element_in_bin ("pipeline");
-
- return 0;
-}
diff --git a/tests/old/testsuite/states/locked.c b/tests/old/testsuite/states/locked.c
deleted file mode 100644
index aa4a7a719d..0000000000
--- a/tests/old/testsuite/states/locked.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/* GStreamer
- * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "unistd.h"
-
-#include <gst/gst.h>
-
-static GMainLoop *loop;
-
-static gboolean
-message_received (GstBus * bus, GstMessage * message, GstPipeline * pipeline)
-{
- g_print ("message %p\n", message);
-
- if (message->type == GST_MESSAGE_EOS) {
- g_print ("EOS!!\n");
- if (g_main_loop_is_running (loop))
- g_main_loop_quit (loop);
- }
- gst_message_unref (message);
-
- return TRUE;
-}
-
-gint
-main (gint argc, gchar * argv[])
-{
- GstElement *pipeline;
- GstElement *fakesrc1, *fakesink1;
- GstElement *fakesrc2, *fakesink2;
- GstBus *bus;
-
- gst_init (&argc, &argv);
-
- pipeline = gst_pipeline_new ("pipeline");
-
- loop = g_main_loop_new (NULL, FALSE);
- bus = gst_element_get_bus (pipeline);
- gst_bus_add_watch (bus, GST_MESSAGE_EOS, (GstBusFunc) message_received,
- (gpointer) pipeline);
- gst_object_unref (bus);
-
- fakesrc1 = gst_element_factory_make ("fakesrc", "fakesrc1");
- g_object_set (G_OBJECT (fakesrc1), "num_buffers", 5, NULL);
- fakesink1 = gst_element_factory_make ("fakesink", "fakesink1");
-
- gst_bin_add (GST_BIN (pipeline), fakesrc1);
- gst_bin_add (GST_BIN (pipeline), fakesink1);
- gst_pad_link (gst_element_get_pad (fakesrc1, "src"),
- gst_element_get_pad (fakesink1, "sink"));
-
- fakesrc2 = gst_element_factory_make ("fakesrc", "fakesrc2");
- g_object_set (G_OBJECT (fakesrc2), "num_buffers", 5, NULL);
- fakesink2 = gst_element_factory_make ("fakesink", "fakesink2");
-
- gst_bin_add (GST_BIN (pipeline), fakesrc2);
- gst_bin_add (GST_BIN (pipeline), fakesink2);
- gst_pad_link (gst_element_get_pad (fakesrc2, "src"),
- gst_element_get_pad (fakesink2, "sink"));
-
- g_signal_connect (G_OBJECT (pipeline), "deep_notify",
- G_CALLBACK (gst_object_default_deep_notify), NULL);
-
- GST_OBJECT_FLAG_SET (fakesrc2, GST_ELEMENT_LOCKED_STATE);
- GST_OBJECT_FLAG_SET (fakesink2, GST_ELEMENT_LOCKED_STATE);
-
- g_print ("play..\n");
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
-
- g_main_loop_run (loop);
-
- g_object_set (G_OBJECT (fakesrc1), "num_buffers", 5, NULL);
-
- gst_element_set_state (pipeline, GST_STATE_READY);
-
- GST_OBJECT_FLAG_UNSET (fakesrc2, GST_ELEMENT_LOCKED_STATE);
- GST_OBJECT_FLAG_UNSET (fakesink2, GST_ELEMENT_LOCKED_STATE);
-
- g_print ("play..\n");
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
-
- g_main_loop_run (loop);
-
- gst_element_set_state (pipeline, GST_STATE_NULL);
-
- gst_object_unref (pipeline);
-
- return 0;
-}
diff --git a/tests/old/testsuite/states/parent.c b/tests/old/testsuite/states/parent.c
deleted file mode 100644
index fe8b2441c6..0000000000
--- a/tests/old/testsuite/states/parent.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/* GStreamer
- *
- * parent.c: test to check that setting state on a parent sets same state
- * recursively on children
- *
- * Copyright (C) <2004> Thomas Vander Stichele <thomas at apestaart dot org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <gst/gst.h>
-
-gint
-main (gint argc, gchar * argv[])
-{
- GstElement *pipeline;
- GstElement *bin1, *bin2;
- GstElement *fakesrc, *identity, *fakesink;
-
- gst_init (&argc, &argv);
-
- /*
- * +-pipeline----------------------------------------+
- * | +-bin2----------------------------------------+ |
- * | | +-bin1-----------------------+ | |
- * | | | +---------+ +----------+ | +----------+ | |
- * | | | | fakesrc |---| identity |---| fakesink | | |
- * | | | +---------+ +----------- | +----------+ | |
- * | | +----------------------------+ | |
- * | +---------------------------------------------+ |
- * +-------------------------------------------------+
- */
-
- pipeline = gst_pipeline_new ("pipeline");
- g_assert (pipeline);
- bin1 = gst_bin_new ("bin1");
- g_assert (bin1);
- bin2 = gst_bin_new ("bin2");
- g_assert (bin2);
-
- fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
- g_assert (fakesrc);
- g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
- identity = gst_element_factory_make ("identity", "identity");
- g_assert (identity);
- fakesink = gst_element_factory_make ("fakesink", "fakesink");
- g_assert (fakesink);
-
- gst_bin_add_many (GST_BIN (bin1), fakesrc, identity, NULL);
- g_assert (gst_element_link (fakesrc, identity));
-
- gst_bin_add_many (GST_BIN (bin2), bin1, fakesink, NULL);
- g_assert (gst_element_link (identity, fakesink));
-
- gst_bin_add (GST_BIN (pipeline), bin2);
- g_signal_connect (G_OBJECT (pipeline), "deep_notify",
- G_CALLBACK (gst_object_default_deep_notify), NULL);
-
- /* setting pipeline to READY should bring in all children to READY */
- gst_element_set_state (pipeline, GST_STATE_READY);
- g_assert (GST_STATE (bin1) == GST_STATE_READY);
- g_assert (GST_STATE (bin2) == GST_STATE_READY);
- g_assert (GST_STATE (fakesrc) == GST_STATE_READY);
- g_assert (GST_STATE (identity) == GST_STATE_READY);
- g_assert (GST_STATE (fakesink) == GST_STATE_READY);
-
- /* setting fakesink to PAUSED should not affect pipeline and bin2 */
- gst_element_set_state (fakesink, GST_STATE_PAUSED);
- g_assert (GST_STATE (bin1) == GST_STATE_READY);
- g_assert (GST_STATE (bin2) == GST_STATE_READY);
- g_assert (GST_STATE (fakesrc) == GST_STATE_READY);
- g_assert (GST_STATE (identity) == GST_STATE_READY);
- g_assert (GST_STATE (fakesink) == GST_STATE_READY);
-
- /* setting fakesrc to PAUSED should not affect bin1 */
- gst_element_set_state (fakesrc, GST_STATE_PAUSED);
- g_assert (GST_STATE (bin1) == GST_STATE_READY);
- g_assert (GST_STATE (bin2) == GST_STATE_READY);
- g_assert (GST_STATE (fakesrc) == GST_STATE_PAUSED);
- g_assert (GST_STATE (identity) == GST_STATE_READY);
- g_assert (GST_STATE (fakesink) == GST_STATE_READY);
-
- /* setting bin1 to PAUSED, even though it is already, should set
- * identity to PAUSED as well */
- gst_element_set_state (bin1, GST_STATE_PAUSED);
- gst_element_get_state (bin2, NULL, NULL, NULL);
- g_assert (GST_STATE (bin1) == GST_STATE_PAUSED);
- g_assert (GST_STATE (bin2) == GST_STATE_READY);
- g_assert (GST_STATE (fakesrc) == GST_STATE_PAUSED);
- g_assert (GST_STATE (identity) == GST_STATE_PAUSED);
- g_assert (GST_STATE (fakesink) == GST_STATE_PAUSED);
-
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
- g_usleep (1000000);
-
- g_print ("passed.\n");
- return 0;
-}
diff --git a/tests/old/testsuite/threads/.gitignore b/tests/old/testsuite/threads/.gitignore
deleted file mode 100644
index 1c2a290b69..0000000000
--- a/tests/old/testsuite/threads/.gitignore
+++ /dev/null
@@ -1,19 +0,0 @@
-threada
-threadb
-threadc
-threadd
-threade
-threadf
-threadg
-thread1
-thread2
-thread3
-thread4
-thread5
-queue
-staticrec
-signal3
-signal2
-signal1
-159852
-159566
diff --git a/tests/old/testsuite/threads/159566.c b/tests/old/testsuite/threads/159566.c
deleted file mode 100644
index 000bae8c66..0000000000
--- a/tests/old/testsuite/threads/159566.c
+++ /dev/null
@@ -1,96 +0,0 @@
-#include <string.h>
-#include <unistd.h>
-#include <gst/gst.h>
-
-static GstElement *src1, *sink1;
-static gboolean need_src1 = TRUE;
-static gint iter = 0;
-
-static void
-object_deep_notify (GObject * object, GstObject * orig,
- GParamSpec * pspec, gchar ** excluded_props)
-{
- GValue value = { 0, }; /* the important thing is that value.type = 0 */
- gchar *str = NULL;
-
- if (strcmp (pspec->name, "last-message") != 0)
- return;
-
- if (GST_ELEMENT (orig) != src1 && GST_ELEMENT (orig) != sink1)
- return;
-
- g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
- g_object_get_property (G_OBJECT (orig), pspec->name, &value);
-
- str = g_strdup_value_contents (&value);
- g_value_unset (&value);
-
- if (strstr (str, "E (type:") != NULL) {
- g_free (str);
- return;
- }
-
- if (iter++ == 100) {
- g_print (".");
- iter = 0;
- }
- g_free (str);
- if (need_src1 && GST_ELEMENT (orig) != src1) {
- g_assert_not_reached ();
- } else if (!need_src1 && GST_ELEMENT (orig) != sink1) {
- g_assert_not_reached ();
- }
- need_src1 = !need_src1;
-}
-
-
-int
-main (int argc, char **argv)
-{
- GstElement *thread1, *thread2, *pipeline;
- GstElement *src2, *sink2;
-
- gst_init (&argc, &argv);
-
- pipeline = gst_element_factory_make ("pipeline", "pipeline");
- thread1 = gst_element_factory_make ("thread", "thread1");
- g_assert (thread1);
-
- src1 = gst_element_factory_make ("fakesrc", "src1");
- g_assert (src1);
- sink1 = gst_element_factory_make ("fakesink", "sink1");
- g_assert (sink1);
-
- thread2 = gst_element_factory_make ("thread", "thread2");
- g_assert (thread2);
-
- src2 = gst_element_factory_make ("fakesrc", "src2");
- g_assert (src2);
- sink2 = gst_element_factory_make ("fakesink", "sink2");
- g_assert (sink2);
-
- gst_bin_add_many (GST_BIN (thread1), src1, sink1, NULL);
- gst_bin_add_many (GST_BIN (thread2), src2, sink2, NULL);
-
- gst_bin_add (GST_BIN (pipeline), thread1);
- gst_bin_add (GST_BIN (pipeline), thread2);
-
- g_signal_connect (G_OBJECT (pipeline), "deep_notify",
- G_CALLBACK (object_deep_notify), NULL);
-
- if (!gst_element_link_many (src1, sink1, NULL))
- g_assert_not_reached ();
-
- if (!gst_element_link_many (src2, sink2, NULL))
- g_assert_not_reached ();
-
- /* run a bit */
- if (gst_element_set_state (pipeline,
- GST_STATE_PLAYING) != GST_STATE_CHANGE_SUCCESS)
- g_assert_not_reached ();
-
- sleep (10000);
- g_print ("done\n");
-
- return 0;
-}
diff --git a/tests/old/testsuite/threads/159852.c b/tests/old/testsuite/threads/159852.c
deleted file mode 100644
index a69b152f8b..0000000000
--- a/tests/old/testsuite/threads/159852.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <unistd.h>
-#include <gst/gst.h>
-
-
-
-static gpointer
-iterate_bin (GstBin * bin)
-{
- while (TRUE) {
- gst_bin_iterate (bin);
- }
- return NULL;
-}
-
-int
-main (int argc, char **argv)
-{
- gint i;
- GstElement *bin;
-
- gst_init (&argc, &argv);
-
- for (i = 0; i < 20; i++) {
- bin = gst_element_factory_make ("bin", "bin");
- gst_scheduler_factory_make (NULL, GST_ELEMENT (bin));
-
- g_thread_create ((GThreadFunc) iterate_bin, bin, TRUE, NULL);
- }
-
- sleep (5);
-
- return 0;
-}
diff --git a/tests/old/testsuite/threads/Makefile.am b/tests/old/testsuite/threads/Makefile.am
deleted file mode 100644
index 0ca822d921..0000000000
--- a/tests/old/testsuite/threads/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-include ../Rules
-
-tests_pass = thread1 thread2 thread3 thread4 thread5 threade threadf signal1 159852 threadg threadi-123775
-tests_fail = 159566 signal2 signal3
-
-# threadh
-
-tests_ignore = queue threadb threadc threadd staticrec threadi-nfy1 threadi-nfy2
-
-thread1_SOURCES = thread.c
-thread1_CFLAGS = -DTESTNUM=1 $(AM_CFLAGS)
-thread2_SOURCES = thread.c
-thread2_CFLAGS = -DTESTNUM=2 $(AM_CFLAGS)
-thread3_SOURCES = thread.c
-thread3_CFLAGS = -DTESTNUM=3 $(AM_CFLAGS)
-thread4_SOURCES = thread.c
-thread4_CFLAGS = -DTESTNUM=4 $(AM_CFLAGS)
-thread5_SOURCES = thread.c
-thread5_CFLAGS = -DTESTNUM=5 $(AM_CFLAGS)
-
-signal1_SOURCES = signals.c
-signal1_CFLAGS = -DTESTNUM=1 $(AM_CFLAGS)
-signal2_SOURCES = signals.c
-signal2_CFLAGS = -DTESTNUM=2 $(AM_CFLAGS)
-signal3_SOURCES = signals.c
-signal3_CFLAGS = -DTESTNUM=3 $(AM_CFLAGS)
-
-threadi_123775_SOURCES = threadi.c
-threadi_123775_CFLAGS = -DTESTNUM=123775 $(AM_CFLAGS)
-threadi_nfy1_SOURCES = threadi.c
-threadi_nfy1_CFLAGS = -DTESTNUM=999998 $(AM_CFLAGS)
-threadi_nfy2_SOURCES = threadi.c
-threadi_nfy2_CFLAGS = -DTESTNUM=999999 $(AM_CFLAGS)
diff --git a/tests/old/testsuite/threads/queue.c b/tests/old/testsuite/threads/queue.c
deleted file mode 100644
index a7048d47fb..0000000000
--- a/tests/old/testsuite/threads/queue.c
+++ /dev/null
@@ -1,89 +0,0 @@
-#include <gst/gst.h>
-
-#include <unistd.h>
-
-/*
- * queue test code
- * starts a fakesrc num_buffers=50 ! { queue ! fakesink } thread
- * by first setting the output thread to play, then the whole pipeline
- */
-
-static volatile gint handoff_count = 0;
-
-/* handoff callback */
-static void
-handoff (GstElement * element, gpointer data)
-{
- ++handoff_count;
- g_print ("handoff (%d) ", handoff_count);
-}
-
-static void
-construct_pipeline (GstElement * pipeline, GstElement * thread)
-{
- GstElement *src, *sink, *queue;
-
- src = gst_element_factory_make ("fakesrc", NULL);
- sink = gst_element_factory_make ("fakesink", "sink");
- queue = gst_element_factory_make ("queue", NULL);
-
- gst_bin_add_many (GST_BIN (thread), queue, sink, NULL);
- gst_bin_add_many (GST_BIN (pipeline), src, thread, NULL);
-
- gst_element_link_many (src, queue, sink, NULL);
-
- g_object_set (G_OBJECT (src), "num_buffers", 50, NULL);
-
- g_object_set (G_OBJECT (sink), "signal-handoffs", TRUE, NULL);
- g_signal_connect (G_OBJECT (sink), "handoff", G_CALLBACK (handoff), NULL);
-}
-
-void
-change_state (GstElement * element, GstBuffer * buf, GstElement * pipeline)
-{
- gst_element_set_state (pipeline, GST_STATE_NULL);
-}
-
-int
-main (gint argc, gchar * argv[])
-{
- GstElement *pipeline;
- GstElement *thread = NULL;
-
- gst_init (&argc, &argv);
-
- pipeline = gst_thread_new ("main_pipeline");
- thread = gst_element_factory_make ("thread", NULL);
- construct_pipeline (pipeline, thread);
-
- g_print ("First run: to show the pipeline works\n");
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
- g_print ("SLEEPING 1 sec\n");
- sleep (1);
-
- g_print ("Pipeline done. Resetting to NULL.\n");
- gst_element_set_state (pipeline, GST_STATE_NULL);
-
- if (handoff_count == 0) {
- g_print ("ERROR: no buffers have passed\n");
- return -1;
- }
-
- handoff_count = 0;
-
- g_print
- ("Second run: setting consumer thread to playing, then complete pipeline\n");
- gst_element_set_state (thread, GST_STATE_PLAYING);
- g_print ("SLEEPING 1 sec\n");
- sleep (1);
- gst_element_set_state (pipeline, gst_element_get_state (pipeline));
- g_print ("SLEEPING 2 sec\n");
- sleep (2);
-
- if (handoff_count == 0) {
- g_print ("ERROR: no buffers have passed\n");
- return -1;
- }
-
- return 0;
-}
diff --git a/tests/old/testsuite/threads/signals.c b/tests/old/testsuite/threads/signals.c
deleted file mode 100644
index bb69eba6b1..0000000000
--- a/tests/old/testsuite/threads/signals.c
+++ /dev/null
@@ -1,231 +0,0 @@
-#include <unistd.h>
-#include <gst/gst.h>
-
-#define GST_TYPE_TEST (gst_test_get_type ())
-#define GST_TEST(test) (G_TYPE_CHECK_INSTANCE_CAST ((test), GST_TYPE_TEST, GstTest))
-#define GST_IS_TEST(test) (G_TYPE_CHECK_INSTANCE_TYPE ((test), GST_TYPE_TEST))
-#define GST_TEST_CLASS(tclass) (G_TYPE_CHECK_CLASS_CAST ((tclass), GST_TYPE_TEST, GstTestClass))
-#define GST_IS_TEST_CLASS(tclass) (G_TYPE_CHECK_CLASS_TYPE ((tclass), GST_TYPE_TEST))
-#define GST_TEST_GET_CLASS(test) (G_TYPE_INSTANCE_GET_CLASS ((test), GST_TYPE_TEST, GstTestClass))
-
-typedef struct _GstTest GstTest;
-typedef struct _GstTestClass GstTestClass;
-
-struct _GstTest
-{
- GstObject object;
-};
-
-struct _GstTestClass
-{
- GstObjectClass parent_class;
-
- void (*test_signal1) (GstTest * test, gint an_int);
- void (*test_signal2) (GstTest * test, gint an_int);
-};
-
-static GType gst_test_get_type (void);
-
-/* Element signals and args */
-enum
-{
- TEST_SIGNAL1,
- TEST_SIGNAL2,
- /* add more above */
- LAST_SIGNAL
-};
-
-enum
-{
- ARG_0,
- ARG_TEST_PROP
-};
-
-static void gst_test_class_init (GstTestClass * klass);
-static void gst_test_init (GstTest * test);
-static void gst_test_dispose (GObject * object);
-
-static void signal2_handler (GstTest * test, gint anint);
-
-static void gst_test_set_property (GObject * object, guint prop_id,
- const GValue * value, GParamSpec * pspec);
-static void gst_test_get_property (GObject * object, guint prop_id,
- GValue * value, GParamSpec * pspec);
-
-static GstObjectClass *parent_class = NULL;
-
-static guint gst_test_signals[LAST_SIGNAL] = { 0 };
-
-static GType
-gst_test_get_type (void)
-{
- static GType test_type = 0;
-
- if (!test_type) {
- static const GTypeInfo test_info = {
- sizeof (GstTestClass),
- NULL,
- NULL,
- (GClassInitFunc) gst_test_class_init,
- NULL,
- NULL,
- sizeof (GstTest),
- 0,
- (GInstanceInitFunc) gst_test_init,
- NULL
- };
-
- test_type = g_type_register_static (GST_TYPE_OBJECT, "GstTest",
- &test_info, 0);
- }
- return test_type;
-}
-
-static void
-gst_test_class_init (GstTestClass * klass)
-{
- GObjectClass *gobject_class;
- GstObjectClass *gstobject_class;
-
- gobject_class = G_OBJECT_CLASS (klass);
- gstobject_class = GST_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- if (!g_thread_supported ())
- g_thread_init (NULL);
-
- gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_test_dispose);
- gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_test_set_property);
- gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_test_get_property);
-
- gst_test_signals[TEST_SIGNAL1] =
- g_signal_new ("test-signal1", G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstTestClass, test_signal1), NULL,
- NULL, gst_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
- gst_test_signals[TEST_SIGNAL2] =
- g_signal_new ("test-signal2", G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstTestClass, test_signal2), NULL,
- NULL, gst_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
-
- g_object_class_install_property (gobject_class, ARG_TEST_PROP,
- g_param_spec_int ("test-prop", "Test Prop", "Test property",
- 0, 1, 0, G_PARAM_READWRITE));
-
- klass->test_signal2 = signal2_handler;
-}
-
-static void
-gst_test_init (GstTest * test)
-{
-}
-
-static void
-gst_test_dispose (GObject * object)
-{
- GstTest *test;
-
- test = GST_TEST (object);
-
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-gst_test_set_property (GObject * object, guint prop_id,
- const GValue * value, GParamSpec * pspec)
-{
- GstTest *test;
-
- test = GST_TEST (object);
-
- switch (prop_id) {
- case ARG_TEST_PROP:
- g_value_get_int (value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gst_test_get_property (GObject * object, guint prop_id,
- GValue * value, GParamSpec * pspec)
-{
- GstTest *test;
-
- test = GST_TEST (object);
-
- switch (prop_id) {
- case ARG_TEST_PROP:
- g_value_set_int (value, 0);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gst_test_do_signal1 (GstTest * test)
-{
- g_signal_emit (G_OBJECT (test), gst_test_signals[TEST_SIGNAL1], 0, 0);
-}
-
-static void
-signal2_handler (GstTest * test, gint anint)
-{
-}
-
-static void
-gst_test_do_signal2 (GstTest * test)
-{
- g_signal_emit (G_OBJECT (test), gst_test_signals[TEST_SIGNAL2], 0, 0);
-}
-
-static void
-gst_test_do_prop (GstTest * test)
-{
- g_object_notify (G_OBJECT (test), "test-prop");
-}
-
-static gpointer
-run_thread (GstTest * test)
-{
- gint i = 0;
-
- while (TRUE) {
- if (TESTNUM == 1)
- gst_test_do_signal1 (test);
- if (TESTNUM == 2)
- gst_test_do_signal2 (test);
- if (TESTNUM == 3)
- gst_test_do_prop (test);
- if ((i++ % 10000) == 0) {
- g_print (".");
- g_usleep (1); /* context switch */
- }
- }
-
- return NULL;
-}
-
-int
-main (int argc, char **argv)
-{
- gint i;
- GstTest *test1, *test2;
-
- gst_init (&argc, &argv);
-
- test1 = g_object_new (GST_TYPE_TEST, NULL);
- test2 = g_object_new (GST_TYPE_TEST, NULL);
-
- for (i = 0; i < 20; i++) {
- g_thread_create ((GThreadFunc) run_thread, test1, TRUE, NULL);
- g_thread_create ((GThreadFunc) run_thread, test2, TRUE, NULL);
- }
- sleep (5);
-
- return 0;
-}
diff --git a/tests/old/testsuite/threads/staticrec.c b/tests/old/testsuite/threads/staticrec.c
deleted file mode 100644
index c77dff8a90..0000000000
--- a/tests/old/testsuite/threads/staticrec.c
+++ /dev/null
@@ -1,49 +0,0 @@
-#include <glib.h>
-
-GStaticRecMutex mutex = G_STATIC_REC_MUTEX_INIT;
-
-static void *
-thread1 (void *t)
-{
- gint i = 0;
-
- while (TRUE) {
- g_static_rec_mutex_lock (&mutex);
- if (i++ % 100000 == 0)
- g_print ("*");
- g_static_rec_mutex_unlock (&mutex);
- if (i++ % 100000 == 0)
- g_print ("*");
- }
- return NULL;
-}
-
-static void *
-thread2 (void *t)
-{
- gint i = 0;
-
- while (TRUE) {
- g_static_rec_mutex_lock (&mutex);
- if (i++ % 100000 == 0)
- g_print (".");
- g_static_rec_mutex_unlock (&mutex);
- if (i++ % 100000 == 0)
- g_print (".");
- }
- return NULL;
-}
-
-int
-main (gint argc, gchar * argv[])
-{
- g_thread_init (NULL);
- g_thread_create_full (thread1,
- NULL, 0x200000, FALSE, TRUE, G_THREAD_PRIORITY_NORMAL, NULL);
- g_thread_create_full (thread2,
- NULL, 0x200000, FALSE, TRUE, G_THREAD_PRIORITY_NORMAL, NULL);
-
- g_usleep (G_MAXLONG);
-
- return 0;
-}
diff --git a/tests/old/testsuite/threads/thread.c b/tests/old/testsuite/threads/thread.c
deleted file mode 100644
index 4614c414a4..0000000000
--- a/tests/old/testsuite/threads/thread.c
+++ /dev/null
@@ -1,128 +0,0 @@
-#include <gst/gst.h>
-
-/*
- * FIXME:
- * these tests should have a maximum run length, so that they get killed
- * if they lock up, which they're bound to do.
- */
-
-void
-usage (void)
-{
- g_print ("compile this test with TESTNUM defined.\n"
- " available TESTNUMs: \n"
- " 1: stress test state change \n"
- " 2: iterate once \n"
- " 3: iterate twice \n"
- " 4: state change while running \n"
- " 5: state change in thread context\n");
-}
-
-static void
-construct_pipeline (GstElement * pipeline)
-{
- GstElement *src, *sink, *queue, *identity, *thread;
-
- src = gst_element_factory_make ("fakesrc", NULL);
- sink = gst_element_factory_make ("fakesink", "sink");
- identity = gst_element_factory_make ("identity", NULL);
- queue = gst_element_factory_make ("queue", NULL);
- thread = gst_element_factory_make ("thread", NULL);
-
- gst_element_link_many (src, queue, identity, sink, NULL);
-
- gst_bin_add_many (GST_BIN (pipeline), src, queue, thread, NULL);
- gst_bin_add_many (GST_BIN (thread), identity, sink, NULL);
-
- g_object_set (G_OBJECT (src), "num_buffers", 5, NULL);
- //g_object_set (sink, "signal-handoffs", TRUE, NULL);
-}
-
-void
-change_state (GstElement * element, GstBuffer * buf, GstPad * pad,
- GstElement * pipeline)
-{
- gst_element_set_state (pipeline, GST_STATE_NULL);
-}
-
-int
-main (gint argc, gchar * argv[])
-{
- GstElement *pipeline;
-
- gst_init (&argc, &argv);
-
-#ifndef TESTNUM
- usage ();
- return -1;
-#endif
-
- pipeline = gst_pipeline_new ("main_pipeline");
- construct_pipeline (pipeline);
-
- if (TESTNUM == 1) {
- g_print ("thread test 1: stress test state changes...\n");
-
- g_print ("NULL\n");
- gst_element_set_state (pipeline, GST_STATE_NULL);
- g_print ("READY\n");
- gst_element_set_state (pipeline, GST_STATE_READY);
- g_print ("NULL\n");
- gst_element_set_state (pipeline, GST_STATE_NULL);
- g_print ("PAUSED\n");
- gst_element_set_state (pipeline, GST_STATE_PAUSED);
- g_print ("READY\n");
- gst_element_set_state (pipeline, GST_STATE_READY);
- g_print ("PAUSED\n");
- gst_element_set_state (pipeline, GST_STATE_PAUSED);
- g_print ("PLAYING\n");
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
- /* element likely hits EOS and does a state transition to PAUSED */
- g_print ("READY\n");
- gst_element_set_state (pipeline, GST_STATE_READY);
- g_print ("NULL\n");
- gst_element_set_state (pipeline, GST_STATE_NULL);
- }
-
- if (TESTNUM == 2 || TESTNUM == 3) {
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
- g_print ("running ...\n");
- while (gst_bin_iterate (GST_BIN (pipeline)));
- g_print ("done ...\n");
- gst_element_set_state (pipeline, GST_STATE_NULL);
- }
- if (TESTNUM == 3) {
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
- g_print ("running ...\n");
- while (gst_bin_iterate (GST_BIN (pipeline)));
- g_print ("done ...\n");
- gst_element_set_state (pipeline, GST_STATE_NULL);
- }
- if (TESTNUM == 4) {
- gint run;
-
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
- g_print ("running ...\n");
- for (run = 0; run < 3; run++) {
- gst_bin_iterate (GST_BIN (pipeline));
- }
- gst_element_set_state (pipeline, GST_STATE_NULL);
- }
- if (TESTNUM == 5) {
- /* I don't think this test is supposed to work */
- GstElement *sink;
-
- sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink");
- g_assert (sink);
-
- g_signal_connect (G_OBJECT (sink), "handoff",
- G_CALLBACK (change_state), pipeline);
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
- g_print ("running ...\n");
- while (gst_bin_iterate (GST_BIN (pipeline)));
- g_print ("stopping ...\n");
- gst_element_set_state (pipeline, GST_STATE_NULL);
- }
-
- return 0;
-}
diff --git a/tests/old/testsuite/threads/threadb.c b/tests/old/testsuite/threads/threadb.c
deleted file mode 100644
index 11daa85311..0000000000
--- a/tests/old/testsuite/threads/threadb.c
+++ /dev/null
@@ -1,80 +0,0 @@
-#include <gst/gst.h>
-
-/* threadb.c
- * this tests if we can make a GstThread, put some stuff in it,
- * dispatch it, and let it run from a main gst loop
- * we repeat the main loop a hundred times to test thread reuse
- * underneath GstThread
- */
-
-gboolean running = FALSE;
-
-static void
-construct_pipeline (GstElement * pipeline)
-{
- GstElement *src, *sink, *identity;
-
- src = gst_element_factory_make ("fakesrc", NULL);
- identity = gst_element_factory_make ("identity", NULL);
- sink = gst_element_factory_make ("fakesink", NULL);
- g_assert (src);
- g_assert (identity);
- g_assert (sink);
-
- gst_element_link_many (src, identity, sink, NULL);
-
- gst_bin_add_many (GST_BIN (pipeline), src, identity, sink, NULL);
-
- g_object_set (G_OBJECT (src), "num_buffers", 5, NULL);
-}
-
-void
-state_changed (GstElement * el, gint arg1, gint arg2, gpointer user_data)
-{
- GstState state = gst_element_get_state (el);
-
- g_print ("element %s has changed state to %s\n",
- GST_ELEMENT_NAME (el), gst_element_state_get_name (state));
- if (state == GST_STATE_PLAYING)
- running = TRUE;
- /* if we move from PLAYING to PAUSED, we're done */
- if (state == GST_STATE_PAUSED && running) {
- running = FALSE;
- gst_main_quit ();
- }
-}
-
-int
-main (gint argc, gchar * argv[])
-{
- int runs = 100;
- int i;
- gulong id;
- GstElement *thread;
-
- gst_init (&argc, &argv);
-
- for (i = 0; i < runs; ++i) {
- thread = gst_thread_new ("main_thread");
- g_assert (thread);
-
- /* connect state change signal */
- id = g_signal_connect (G_OBJECT (thread), "state_change",
- G_CALLBACK (state_changed), NULL);
- construct_pipeline (thread);
-
- g_print ("Setting thread to play\n");
- gst_element_set_state (thread, GST_STATE_PLAYING);
-
- g_print ("Going into the main GStreamer loop\n");
- gst_main ();
- g_print ("Coming out of the main GStreamer loop\n");
- g_signal_handler_disconnect (G_OBJECT (thread), id);
- gst_element_set_state (thread, GST_STATE_NULL);
- g_print ("Unreffing thread\n");
- g_object_unref (G_OBJECT (thread));
- running = FALSE;
- }
-
- return 0;
-}
diff --git a/tests/old/testsuite/threads/threadc.c b/tests/old/testsuite/threads/threadc.c
deleted file mode 100644
index a3885a663f..0000000000
--- a/tests/old/testsuite/threads/threadc.c
+++ /dev/null
@@ -1,93 +0,0 @@
-#include <gst/gst.h>
-
-/* threadc.c
- * this tests if we can make a GstThread, with enough cothreads to stress it
- */
-
-gboolean running = FALSE;
-gboolean can_quit = FALSE;
-
-static void
-construct_pipeline (GstElement * pipeline, gint identities)
-{
- GstElement *src, *sink;
- GstElement *identity = NULL;
- GstElement *from;
- int i;
-
- identity = NULL;
- src = gst_element_factory_make ("fakesrc", NULL);
- sink = gst_element_factory_make ("fakesink", NULL);
- g_assert (src);
- g_assert (sink);
- gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL);
- from = src;
-
- for (i = 0; i < identities; ++i) {
- identity = gst_element_factory_make ("identity", NULL);
- g_assert (identity);
- gst_bin_add (GST_BIN (pipeline), identity);
- gst_element_link (from, identity);
- from = identity;
- }
- gst_element_link (identity, sink);
-
- g_object_set (G_OBJECT (src), "num_buffers", 10, "sizetype", 3, NULL);
-}
-
-void
-state_changed (GstElement * el, gint arg1, gint arg2, gpointer user_data)
-{
- GstState state = gst_element_get_state (el);
-
- g_print ("element %s has changed state to %s\n",
- GST_ELEMENT_NAME (el), gst_element_state_get_name (state));
- if (state == GST_STATE_PLAYING)
- running = TRUE;
- /* if we move from PLAYING to PAUSED, we're done */
- if (state == GST_STATE_PAUSED && running) {
- while (!can_quit);
- can_quit = FALSE;
- g_print ("quitting main loop\n");
- gst_main_quit ();
- }
-}
-
-int
-main (gint argc, gchar * argv[])
-{
- int runs = 290;
- int i;
- gulong id;
- GstElement *thread;
-
- gst_init (&argc, &argv);
-
- for (i = 90; i < runs; ++i) {
- thread = gst_thread_new ("main_thread");
- g_assert (thread);
-
- /* connect state change signal */
- id = g_signal_connect (G_OBJECT (thread), "state_change",
- G_CALLBACK (state_changed), NULL);
- construct_pipeline (thread, i / 10 + 1);
-
- g_print ("Setting thread to play with %d identities\n", i / 10 + 1);
- if (gst_element_set_state (thread,
- GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
- g_error ("Failed setting thread to play\n");
- } else {
- g_print ("Going into the main GStreamer loop\n");
- can_quit = TRUE; /* we don't want gst_main_quit called before gst_main */
- gst_main ();
- }
- running = FALSE;
- g_print ("Coming out of the main GStreamer loop\n");
- g_signal_handler_disconnect (G_OBJECT (thread), id);
- gst_element_set_state (thread, GST_STATE_NULL);
- g_print ("Unreffing thread\n");
- g_object_unref (G_OBJECT (thread));
- }
-
- return 0;
-}
diff --git a/tests/old/testsuite/threads/threadd.c b/tests/old/testsuite/threads/threadd.c
deleted file mode 100644
index 6343af9ce9..0000000000
--- a/tests/old/testsuite/threads/threadd.c
+++ /dev/null
@@ -1,95 +0,0 @@
-#include <gst/gst.h>
-#include <unistd.h>
-
-/* threadc.c
- * this tests if we can make a GstThread, with enough cothreads to stress it
- */
-
-#define MAX_IDENTITIES 29
-#define RUNS_PER_IDENTITY 5
-
-volatile gboolean running = FALSE;
-
-/* must be volatile, we're going to fool the compiler */
-volatile gboolean done = FALSE;
-
-static void
-construct_pipeline (GstElement * pipeline, gint identities)
-{
- GstElement *src, *sink, *identity = NULL;
- GstElement *from;
- int i;
-
- src = gst_element_factory_make ("fakesrc", NULL);
- sink = gst_element_factory_make ("fakesink", NULL);
- g_assert (src);
- g_assert (sink);
- gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL);
- from = src;
-
- for (i = 0; i < identities; ++i) {
- identity = gst_element_factory_make ("identity", NULL);
- g_assert (identity);
- gst_bin_add (GST_BIN (pipeline), identity);
- gst_element_link (from, identity);
- from = identity;
- }
- gst_element_link (identity, sink);
-
- g_object_set (G_OBJECT (src), "num_buffers", 10, "sizetype", 3, NULL);
-}
-
-void
-state_changed (GstElement * el, gint arg1, gint arg2, gpointer user_data)
-{
- GstState state = gst_element_get_state (el);
-
- g_print ("element %s has changed state to %s\n",
- GST_ELEMENT_NAME (el), gst_element_state_get_name (state));
- if (state == GST_STATE_PLAYING)
- running = TRUE;
- /* if we move from PLAYING to PAUSED, we're done */
- if (state == GST_STATE_PAUSED && running)
- done = TRUE;
-}
-
-int
-main (gint argc, gchar * argv[])
-{
- int runs = MAX_IDENTITIES * RUNS_PER_IDENTITY;
- int i;
- gulong id;
- GstElement *thread;
-
- gst_init (&argc, &argv);
-
- for (i = 0; i < runs; ++i) {
- thread = gst_thread_new ("main_thread");
- g_assert (thread);
-
- /* connect state change signal */
- id = g_signal_connect (G_OBJECT (thread), "state_change",
- G_CALLBACK (state_changed), NULL);
- construct_pipeline (thread, i / RUNS_PER_IDENTITY + 1);
-
- g_print ("Setting thread to play with %d identities\n",
- i / RUNS_PER_IDENTITY + 1);
- done = FALSE;
- if (gst_element_set_state (thread,
- GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
- g_warning ("failed to go to PLAYING");
- } else {
- g_print ("Waiting for thread PLAYING->PAUSED\n");
- while (!done) /* do nothing */
- ;
- }
- running = FALSE;
- g_print ("Coming out of the main GStreamer loop\n");
- g_signal_handler_disconnect (G_OBJECT (thread), id);
- gst_element_set_state (thread, GST_STATE_NULL);
- g_print ("Unreffing thread\n");
- g_object_unref (G_OBJECT (thread));
- }
-
- return 0;
-}
diff --git a/tests/old/testsuite/threads/threade.c b/tests/old/testsuite/threads/threade.c
deleted file mode 100644
index fbdb530f31..0000000000
--- a/tests/old/testsuite/threads/threade.c
+++ /dev/null
@@ -1,81 +0,0 @@
-#include <gst/gst.h>
-#include <unistd.h>
-
-/* threadc.c
- * this tests if we can make a GstBin and iterate it inside a GThread
- */
-
-#define MAX_IDENTITIES 29
-#define RUNS_PER_IDENTITY 5
-
-volatile gboolean running = FALSE;
-volatile gboolean done = FALSE;
-
-static void
-construct_pipeline (GstElement * pipeline, gint identities)
-{
- GstElement *src, *sink, *identity = NULL;
- GstElement *from;
- int i;
-
- src = gst_element_factory_make ("fakesrc", NULL);
- sink = gst_element_factory_make ("fakesink", NULL);
- g_assert (src);
- g_assert (sink);
- gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL);
- from = src;
-
- for (i = 0; i < identities; ++i) {
- identity = gst_element_factory_make ("identity", NULL);
- g_assert (identity);
- gst_bin_add (GST_BIN (pipeline), identity);
- gst_element_link (from, identity);
- from = identity;
- }
- gst_element_link (identity, sink);
-
- g_object_set (G_OBJECT (src), "num_buffers", 10, "sizetype", 3, NULL);
-}
-
-static void
-iterator (GstElement * bin)
-{
- gst_element_set_state (bin, GST_STATE_PLAYING);
- while (gst_bin_iterate (GST_BIN (bin)))
- g_print ("+");
- gst_element_set_state (bin, GST_STATE_NULL);
- g_print ("\n");
- done = TRUE;
-}
-
-int
-main (gint argc, gchar * argv[])
-{
- int runs = MAX_IDENTITIES * RUNS_PER_IDENTITY;
- int i;
- GstElement *pipeline;
-
- g_thread_init (NULL);
- gst_init (&argc, &argv);
-
- for (i = 0; i < runs; ++i) {
- pipeline = gst_pipeline_new ("main_pipeline");
- g_assert (pipeline);
-
- /* connect state change signal */
- construct_pipeline (pipeline, i / RUNS_PER_IDENTITY + 1);
-
- done = FALSE;
- g_thread_create ((GThreadFunc) iterator, pipeline, FALSE, NULL);
- g_print ("Created GThread\n");
-
- g_print ("Waiting for thread PLAYING->PAUSED\n");
- while (!done) /* do nothing */
- ;
- running = FALSE;
- g_print ("Unreffing pipeline\n");
- g_object_unref (G_OBJECT (pipeline));
- }
-
- return 0;
-}
diff --git a/tests/old/testsuite/threads/threadf.c b/tests/old/testsuite/threads/threadf.c
deleted file mode 100644
index fd5eeb4e89..0000000000
--- a/tests/old/testsuite/threads/threadf.c
+++ /dev/null
@@ -1,83 +0,0 @@
-#include <gst/gst.h>
-
-/* threadf.c
- * this tests if we can make a GThread and construct and interate a pipeline
- * inside it
- * used to fail because of cothread ctx key not being reset on context
- * destroy
- */
-
-#define MAX_IDENTITIES 29
-#define RUNS_PER_IDENTITY 5
-
-volatile gboolean running = FALSE;
-volatile gboolean done = FALSE;
-
-static void
-construct_pipeline (GstElement * pipeline, gint identities)
-{
- GstElement *src, *sink;
- GstElement *identity = NULL;
- GstElement *from;
- int i;
-
- identity = NULL;
- src = gst_element_factory_make ("fakesrc", NULL);
- sink = gst_element_factory_make ("fakesink", NULL);
- g_assert (src);
- g_assert (sink);
- gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL);
- from = src;
-
- for (i = 0; i < identities; ++i) {
- identity = gst_element_factory_make ("identity", NULL);
- g_assert (identity);
- gst_bin_add (GST_BIN (pipeline), identity);
- if (!(gst_element_link (from, identity)))
- g_print ("Warning: can't link identity with previous element\n");
- from = identity;
- }
- gst_element_link (identity, sink);
-
- g_object_set (G_OBJECT (src), "num_buffers", 10, "sizetype", 3, NULL);
-}
-
-static void
-thread (void)
-{
- int runs = MAX_IDENTITIES * RUNS_PER_IDENTITY;
- int i;
- GstElement *pipeline;
-
- for (i = 30; i < runs; ++i) {
- pipeline = gst_pipeline_new ("main_pipeline");
- g_assert (pipeline);
-
- g_print ("Run %d, using %d identities\n", i, i / RUNS_PER_IDENTITY + 1);
- construct_pipeline (pipeline, i / RUNS_PER_IDENTITY + 1);
- if (!gst_element_set_state (pipeline, GST_STATE_PLAYING))
- g_print ("WARNING: can't set pipeline to play\n");
- while (gst_bin_iterate (GST_BIN (pipeline)))
- g_print ("+");
- g_print ("\n");
- g_print ("Unreffing pipeline\n");
- g_object_unref (G_OBJECT (pipeline));
- }
- done = TRUE;
-}
-
-int
-main (gint argc, gchar * argv[])
-{
- done = FALSE;
-
- g_thread_init (NULL);
- gst_init (&argc, &argv);
-
- g_thread_create ((GThreadFunc) thread, NULL, FALSE, NULL);
- g_print ("main: created GThread\n");
- while (!done)
- g_usleep (G_USEC_PER_SEC);
- g_print ("main: done\n");
- return 0;
-}
diff --git a/tests/old/testsuite/threads/threadg.c b/tests/old/testsuite/threads/threadg.c
deleted file mode 100644
index bdf2264abc..0000000000
--- a/tests/old/testsuite/threads/threadg.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* this tests if the GstThread is ok after removing all elements from it
- * in PAUSED rather than NULL state. Currently it crashes with a mutex
- * error
- */
-
-#include <gst/gst.h>
-
-int
-main (int argc, char **argv)
-{
- GstElement *thread, *pipeline;
- GstElement *src, *sink, *queue;
- int i;
-
- gst_init (&argc, &argv);
-
- pipeline = gst_element_factory_make ("pipeline", "pipeline");
-
- src = gst_element_factory_make ("fakesrc", "src");
- g_assert (src);
-
- gst_bin_add (GST_BIN (pipeline), src);
-
- thread = gst_element_factory_make ("thread", "thread");
- g_assert (thread);
- sink = gst_element_factory_make ("fakesink", "sink");
- g_assert (sink);
- queue = gst_element_factory_make ("queue", "queue");
- g_assert (queue);
-
- gst_bin_add_many (GST_BIN (thread), queue, sink, NULL);
-
- gst_bin_add (GST_BIN (pipeline), thread);
-
- if (!gst_element_link_many (src, queue, sink, NULL))
- g_assert_not_reached ();
-
-
- if (gst_element_set_state (pipeline,
- GST_STATE_PLAYING) != GST_STATE_CHANGE_SUCCESS)
- g_assert_not_reached ();
-
- for (i = 0; i < 100; i++) {
- if (!gst_bin_iterate (GST_BIN (pipeline)))
- g_assert_not_reached ();
- g_print ("%d\n", i);
- }
-
- if (gst_element_set_state (pipeline,
- GST_STATE_PAUSED) != GST_STATE_CHANGE_SUCCESS)
- g_assert_not_reached ();
-
- gst_bin_remove_many (GST_BIN (thread), queue, sink, NULL);
-
- if (gst_element_set_state (thread,
- GST_STATE_NULL) != GST_STATE_CHANGE_SUCCESS)
- g_assert_not_reached ();
-
- gst_bin_remove (GST_BIN (pipeline), thread);
-
- if (gst_element_set_state (pipeline,
- GST_STATE_PLAYING) != GST_STATE_CHANGE_SUCCESS)
- g_assert_not_reached ();
-
-
- return 0;
-}
diff --git a/tests/old/testsuite/threads/threadh.c b/tests/old/testsuite/threads/threadh.c
deleted file mode 100644
index a2d6462228..0000000000
--- a/tests/old/testsuite/threads/threadh.c
+++ /dev/null
@@ -1,53 +0,0 @@
-#include <unistd.h>
-#include <gst/gst.h>
-
-static GstElement *thread, *pipeline;
-static GstElement *src, *sink;
-
-static void
-handoff_src (GstElement * element)
-{
- g_print ("identity handoff\n");
-
- if (gst_element_set_state (thread,
- GST_STATE_PAUSED) != GST_STATE_CHANGE_SUCCESS)
- g_assert_not_reached ();
-
- if (gst_element_set_state (sink, GST_STATE_READY) != GST_STATE_CHANGE_SUCCESS)
- g_assert_not_reached ();
-
- gst_bin_remove (GST_BIN (thread), src);
-}
-
-int
-main (int argc, char **argv)
-{
- gst_init (&argc, &argv);
-
- pipeline = gst_element_factory_make ("pipeline", "pipeline");
-
- thread = gst_element_factory_make ("thread", "thread");
- g_assert (thread);
-
- src = gst_element_factory_make ("fakesrc", "src");
- g_assert (src);
- g_signal_connect (G_OBJECT (src), "handoff", (GCallback) handoff_src, NULL);
- g_object_set (G_OBJECT (src), "signal-handoffs", TRUE, NULL);
- sink = gst_element_factory_make ("fakesink", "sink");
- g_assert (sink);
-
- gst_bin_add (GST_BIN (pipeline), thread);
-
- gst_bin_add_many (GST_BIN (thread), src, sink, NULL);
- if (!gst_element_link_many (src, sink, NULL))
- g_assert_not_reached ();
-
- /* run a bit */
- if (gst_element_set_state (pipeline,
- GST_STATE_PLAYING) != GST_STATE_CHANGE_SUCCESS)
- g_assert_not_reached ();
-
- sleep (2);
-
- return 0;
-}
diff --git a/tests/old/testsuite/threads/threadi.c b/tests/old/testsuite/threads/threadi.c
deleted file mode 100644
index a8edf2b30c..0000000000
--- a/tests/old/testsuite/threads/threadi.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Test three ways of going non-lineairly to PLAYING. Both tests have a
- * thread containing a fakesrc/sink.
- *
- * Test1 tests by adding fakesrc/fakesink, setting fakesrc to PLAYING
- * (which should increment the container state) and then synchronizing
- * state and see if the bin iterates. This reflects bug #123775.
- *
- * Test2 does the same, but emits EOS directly. This will (in case of
- * race conditions) sometimes lead to a state-change before the previous
- * one succeeded. This bug is not fixed yet (999998).
- *
- * Test3 tests by adding fakesrc, putting thread to PLAYING, adding
- * fakesink, syncing state and see if it iterates. The group is sometimes
- * activated before fakesink is added to the bin, which is a bug in opt
- * and a race in core that is not fixed yet (999999).
- */
-
-#include <gst/gst.h>
-
-static GstElement *pipeline, *fakesrc, *fakesink;
-
-static gboolean
-cb_timeout (gpointer data)
-{
- g_assert_not_reached ();
-
- return FALSE;
-}
-
-static gboolean
-cb_quit (gpointer data)
-{
- gst_main_quit ();
-
- g_print ("Quit mainloop\n");
-
- /* once */
- return FALSE;
-}
-
-#if TESTNUM != 123775
-static void
-cb_eos (gpointer data)
-{
- g_print ("Received EOS\n");
-
- g_idle_add ((GSourceFunc) cb_quit, NULL);
-}
-#else
-static void
-cb_data (gpointer data)
-{
- static gboolean first = TRUE;
-
- g_print ("Received data\n");
-
- if (first) {
- first = FALSE;
- g_idle_add ((GSourceFunc) cb_quit, NULL);
- }
-}
-#endif
-
-static void
-cb_state (GstElement * element, GstState old_state,
- GstState new_state, gpointer data)
-{
- g_print ("Changed state from %d to %d\n", old_state, new_state);
-}
-
-static gboolean
-cb_play (gpointer data)
-{
- GstStateChangeReturn res;
-
-#if TESTNUM != 999999
- g_print ("Setting state on fakesrc\n");
- gst_element_set_state (fakesrc, GST_STATE_PLAYING);
- g_print ("Done\n");
-#else
- g_print ("Setting state on pipeline w/o fakesink\n");
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
- g_print ("Adding fakesink\n");
- gst_bin_add (GST_BIN (pipeline), fakesink);
- g_print ("Done\n");
-#endif
- g_print ("Syncing state in pipeline\n");
- res = gst_bin_sync_children_state (GST_BIN (data));
- g_assert (res == GST_STATE_CHANGE_SUCCESS);
- g_print ("Set to playing correctly: %d\n", GST_STATE (pipeline));
-
- /* once */
- return FALSE;
-}
-
-gint
-main (gint argc, gchar * argv[])
-{
- gint id;
-
- gst_init (&argc, &argv);
-
- g_print ("Will do a test to see if bug %d is fixed\n", TESTNUM);
-
- pipeline = gst_thread_new ("p");
- g_signal_connect (pipeline, "state-change", G_CALLBACK (cb_state), NULL);
- fakesrc = gst_element_factory_make ("fakesrc", "src");
- fakesink = gst_element_factory_make ("fakesink", "sink");
-#if TESTNUM != 123775
- g_object_set (G_OBJECT (fakesrc), "num-buffers", 0, NULL);
- g_signal_connect (pipeline, "eos", G_CALLBACK (cb_eos), NULL);
-#else
- g_object_set (G_OBJECT (fakesink), "signal-handoffs", TRUE, NULL);
- g_signal_connect (fakesink, "handoff", G_CALLBACK (cb_data), NULL);
-#endif
-
-#if TESTNUM != 999999
- gst_bin_add_many (GST_BIN (pipeline), fakesrc, fakesink, NULL);
-#else
- gst_bin_add (GST_BIN (pipeline), fakesrc);
-#endif
-
- gst_element_link (fakesrc, fakesink);
- g_idle_add ((GSourceFunc) cb_play, pipeline);
-
- /* give 5 seconds */
- id = g_timeout_add (5000, (GSourceFunc) cb_timeout, NULL);
- g_print ("Enter mainloop\n");
- gst_main ();
- g_source_remove (id);
-
- gst_element_set_state (pipeline, GST_STATE_NULL);
- gst_object_unref (pipeline);
-
- g_print ("Done with test to show bug %d, fixed correctly\n", TESTNUM);
-
- return 0;
-}