From ca58a609e07d26da31c7c7cc63e196943e626838 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 13 Dec 2003 19:12:19 +0000 Subject: [PATCH] remove autoplug tests as GstAutoplug doesn't exist anymore Original commit message from CVS: remove autoplug tests as GstAutoplug doesn't exist anymore --- testsuite/autoplug/.gitignore | 4 -- testsuite/autoplug/Makefile.am | 10 ---- testsuite/autoplug/autoplug.c | 46 --------------- testsuite/autoplug/autoplug2.c | 87 ---------------------------- testsuite/autoplug/autoplug3.c | 50 ---------------- testsuite/autoplug/autoplug4.c | 102 --------------------------------- 6 files changed, 299 deletions(-) delete mode 100644 testsuite/autoplug/.gitignore delete mode 100644 testsuite/autoplug/Makefile.am delete mode 100644 testsuite/autoplug/autoplug.c delete mode 100644 testsuite/autoplug/autoplug2.c delete mode 100644 testsuite/autoplug/autoplug3.c delete mode 100644 testsuite/autoplug/autoplug4.c diff --git a/testsuite/autoplug/.gitignore b/testsuite/autoplug/.gitignore deleted file mode 100644 index 46e2b37670..0000000000 --- a/testsuite/autoplug/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -autoplug -autoplug2 -autoplug3 -autoplug4 diff --git a/testsuite/autoplug/Makefile.am b/testsuite/autoplug/Makefile.am deleted file mode 100644 index a0b79c63e9..0000000000 --- a/testsuite/autoplug/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ - -# none work currently -TESTS = - -check_PROGRAMS = autoplug autoplug2 autoplug3 autoplug4 - -# we have nothing but apps here, we can do this safely -LIBS = $(GST_LIBS) -AM_CFLAGS = $(GST_CFLAGS) - diff --git a/testsuite/autoplug/autoplug.c b/testsuite/autoplug/autoplug.c deleted file mode 100644 index 2adca30369..0000000000 --- a/testsuite/autoplug/autoplug.c +++ /dev/null @@ -1,46 +0,0 @@ -#include - -/* FIXME: add a description of what this test does */ -static void -new_object_added (GstAutoplug *autoplug, GstObject *object) -{ - g_print ("added new object \"%s\"\n", gst_object_get_name (object)); -} - -int -main (int argc, char *argv[]) -{ - GstElement *element; - GstElement *videosink, *osssink; - GstAutoplug *autoplugger; - GstCaps *testcaps; - - gst_init(&argc,&argv); - - osssink = gst_element_factory_make ("osssink", "osssink"); - g_assert (osssink != NULL); - videosink = gst_element_factory_make ("xvideosink", "videosink"); - g_assert (videosink != NULL); - - testcaps = gst_caps_new ("test_caps", - "video/mpeg", - gst_props_new ( - "mpegversion", GST_PROPS_INT (1), - "systemstream", GST_PROPS_BOOLEAN (TRUE), - NULL)); - - autoplugger = gst_autoplug_factory_make ("static"); - - g_signal_connect (G_OBJECT (autoplugger), "new_object", - G_CALLBACK (new_object_added), NULL); - - element = gst_autoplug_to_caps (autoplugger, testcaps, - gst_pad_get_caps (gst_element_get_pad (osssink, "sink")), - gst_pad_get_caps (gst_element_get_pad (videosink, "sink")), - NULL); - g_assert (element != NULL); - - xmlDocDump (stdout, gst_xml_write (element)); - - exit (0); -} diff --git a/testsuite/autoplug/autoplug2.c b/testsuite/autoplug/autoplug2.c deleted file mode 100644 index e046a4c7a5..0000000000 --- a/testsuite/autoplug/autoplug2.c +++ /dev/null @@ -1,87 +0,0 @@ -#include - -static GstElement* -autoplug_caps (GstAutoplug *autoplug, gchar *mime1, gchar *mime2) -{ - GstCaps *caps1, *caps2; - - caps1 = gst_caps_new ("tescaps1", mime1, NULL); - caps2 = gst_caps_new ("tescaps2", mime2, NULL); - - return gst_autoplug_to_caps (autoplug, caps1, caps2, NULL); -} - -int -main (int argc, char *argv[]) -{ - GstElement *element; - GstAutoplug *autoplug; - - gst_init(&argc,&argv); - - autoplug = gst_autoplug_factory_make ("static"); - - g_print ("Autoplugging between audio/x-mp3 and audio/raw ...\n"); - if ((element = autoplug_caps (autoplug, "audio/x-mp3", "audio/raw")) == NULL) - g_print ("Could not autoplug between audio/x-mp3 and audio/raw !\n"); - xmlSaveFile ("autoplug2_1.gst", gst_xml_write (element)); - - g_print ("Autoplugging between video/mpeg and audio/raw ...\n"); - if ((element = autoplug_caps (autoplug, "video/mpeg", "audio/raw")) == NULL) - g_print ("Could not autoplug between video/mpeg and audio/raw !\n"); - else - xmlSaveFile ("autoplug2_2.gst", gst_xml_write (element)); - - if ((element = gst_autoplug_to_caps (autoplug, - gst_caps_new( - "testcaps3", - "video/mpeg", - gst_props_new ( - "mpegversion", GST_PROPS_INT (1), - "systemstream", GST_PROPS_BOOLEAN (TRUE), - NULL)), - gst_caps_new("testcaps4","audio/raw", NULL), - NULL)) == NULL) - g_print ("Could not autoplug between video/mpeg system stream and audio/raw !\n"); - else - xmlSaveFile ("autoplug2_3.gst", gst_xml_write (element)); - - element = gst_autoplug_to_caps (autoplug, - gst_caps_new( - "testcaps5", - "video/mpeg", - gst_props_new ( - "mpegversion", GST_PROPS_INT (1), - "systemstream", GST_PROPS_BOOLEAN (FALSE), - NULL)), - gst_caps_new("testcaps6", "video/raw", NULL), - NULL); - g_assert (GST_IS_ELEMENT (element)); - xmlSaveFile ("autoplug2_4.gst", gst_xml_write (element)); - - element = gst_autoplug_to_caps (autoplug, - gst_caps_new( - "testcaps7", - "video/x-msvideo", NULL), - gst_caps_new("testcaps8", "video/raw", NULL), - gst_caps_new("testcaps9", "audio/raw", NULL), - NULL); - g_assert (GST_IS_ELEMENT (element)); - xmlSaveFile ("autoplug2_5.gst", gst_xml_write (element)); - - element = gst_autoplug_to_caps (autoplug, - gst_caps_new( - "testcaps10", - "video/mpeg", - gst_props_new ( - "mpegversion", GST_PROPS_INT (1), - "systemstream", GST_PROPS_BOOLEAN (TRUE), - NULL)), - gst_caps_new("testcaps10", "video/raw", NULL), - gst_caps_new("testcaps11", "audio/raw", NULL), - NULL); - g_assert (GST_IS_ELEMENT (element)); - xmlSaveFile ("autoplug2_6.gst", gst_xml_write (element)); - - exit (0); -} diff --git a/testsuite/autoplug/autoplug3.c b/testsuite/autoplug/autoplug3.c deleted file mode 100644 index a332053abc..0000000000 --- a/testsuite/autoplug/autoplug3.c +++ /dev/null @@ -1,50 +0,0 @@ -#include - -int -main (int argc, char *argv[]) -{ - GstAutoplug *autoplug; - GstElement *element; - GstElement *sink; - GstElement *pipeline; - GstElement *filesrc; - - gst_init(&argc,&argv); - - sink = gst_element_factory_make ("osssink", "osssink"); - g_assert (sink != NULL); - - autoplug = gst_autoplug_factory_make ("staticrender"); - g_assert (autoplug != NULL); - - element = gst_autoplug_to_renderers (autoplug, - gst_caps_new ( - "mp3caps", - "audio/x-mp3", - NULL - ), - sink, - NULL); - g_assert (element != NULL); - - pipeline = gst_pipeline_new ("main_pipeline"); - g_assert (pipeline != NULL); - - filesrc = gst_element_factory_make ("filesrc", "disk_reader"); - g_assert (filesrc != NULL); - - gst_bin_add (GST_BIN (pipeline), filesrc); - gst_bin_add (GST_BIN (pipeline), element); - - gst_element_link_pads (filesrc, "src", element, "sink"); - - g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); - - gst_element_set_state (pipeline, GST_STATE_PLAYING); - - while (gst_bin_iterate (GST_BIN (pipeline))); - - gst_element_set_state (pipeline, GST_STATE_NULL); - - exit (0); -} diff --git a/testsuite/autoplug/autoplug4.c b/testsuite/autoplug/autoplug4.c deleted file mode 100644 index b7f3f34fcd..0000000000 --- a/testsuite/autoplug/autoplug4.c +++ /dev/null @@ -1,102 +0,0 @@ -#include - -int -main (int argc, char *argv[]) -{ - GstElement *element; - GstElement *sink1, *sink2; - GstAutoplug *autoplug; - GstAutoplug *autoplug2; - - gst_init(&argc,&argv); - - sink1 = gst_element_factory_make ("videosink", "videosink"); - sink2 = gst_element_factory_make ("osssink", "osssink"); - - autoplug = gst_autoplug_factory_make ("staticrender"); - autoplug2 = gst_autoplug_factory_make ("static"); - - element = gst_autoplug_to_renderers (autoplug, - gst_caps_new ("mp3caps", "audio/x-mp3", NULL), sink2, NULL); - xmlSaveFile ("autoplug3_1.gst", gst_xml_write (element)); - - element = gst_autoplug_to_renderers (autoplug, - gst_caps_new ("mpeg1caps", "video/mpeg", NULL), sink1, NULL); - if (element) { - xmlSaveFile ("autoplug3_2.gst", gst_xml_write (element)); - } - - element = gst_autoplug_to_caps (autoplug2, - gst_caps_new( - "testcaps3", - "video/mpeg", - gst_props_new ( - "mpegversion", GST_PROPS_INT (1), - "systemstream", GST_PROPS_BOOLEAN (TRUE), - NULL)), - gst_caps_new("testcaps4","audio/raw", NULL), - NULL); - if (element) { - xmlSaveFile ("autoplug3_3.gst", gst_xml_write (element)); - } - - element = gst_autoplug_to_caps (autoplug2, - gst_caps_new( - "testcaps5", - "video/mpeg", - gst_props_new ( - "mpegversion", GST_PROPS_INT (1), - "systemstream", GST_PROPS_BOOLEAN (FALSE), - NULL)), - gst_caps_new("testcaps6", "video/raw", NULL), - NULL); - if (element) { - xmlSaveFile ("autoplug3_4.gst", gst_xml_write (element)); - } - - element = gst_autoplug_to_caps (autoplug2, - gst_caps_new( - "testcaps7", - "video/x-msvideo", NULL), - gst_caps_new("testcaps8", "video/raw", NULL), - gst_caps_new("testcaps9", "audio/raw", NULL), - NULL); - if (element) { - xmlSaveFile ("autoplug3_5.gst", gst_xml_write (element)); - } - - element = gst_autoplug_to_caps (autoplug2, - gst_caps_new( - "testcaps10", - "video/mpeg", - gst_props_new ( - "mpegversion", GST_PROPS_INT (1), - "systemstream", GST_PROPS_BOOLEAN (TRUE), - NULL)), - gst_caps_new("testcaps10", "video/raw", NULL), - gst_caps_new("testcaps11", "audio/raw", NULL), - NULL); - if (element) { - xmlSaveFile ("autoplug3_6.gst", gst_xml_write (element)); - } - - sink1 = gst_element_factory_make ("videosink", "videosink"); - sink2 = gst_element_factory_make ("osssink", "osssink"); - - element = gst_autoplug_to_renderers (autoplug, - gst_caps_new( - "testcaps10", - "video/mpeg", - gst_props_new ( - "mpegversion", GST_PROPS_INT (1), - "systemstream", GST_PROPS_BOOLEAN (TRUE), - NULL)), - sink1, - sink2, - NULL); - if (element) { - xmlSaveFile ("autoplug3_7.gst", gst_xml_write (element)); - } - - exit (0); -}