remove autoplug tests as GstAutoplug doesn't exist anymore

Original commit message from CVS:
remove autoplug tests as GstAutoplug doesn't exist anymore
This commit is contained in:
Benjamin Otte 2003-12-13 19:12:19 +00:00
parent b3b069344d
commit ca58a609e0
6 changed files with 0 additions and 299 deletions

View file

@ -1,4 +0,0 @@
autoplug
autoplug2
autoplug3
autoplug4

View file

@ -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)

View file

@ -1,46 +0,0 @@
#include <gst/gst.h>
/* 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);
}

View file

@ -1,87 +0,0 @@
#include <gst/gst.h>
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);
}

View file

@ -1,50 +0,0 @@
#include <gst/gst.h>
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);
}

View file

@ -1,102 +0,0 @@
#include <gst/gst.h>
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);
}