2001-03-07 21:52:56 +00:00
|
|
|
#include <gst/gst.h>
|
|
|
|
|
|
|
|
static GstElement*
|
|
|
|
autoplug_caps (GstAutoplug *autoplug, gchar *mime1, gchar *mime2)
|
|
|
|
{
|
2001-04-14 18:56:37 +00:00
|
|
|
GstCaps *caps1, *caps2;
|
2001-03-07 21:52:56 +00:00
|
|
|
|
2001-04-14 18:56:37 +00:00
|
|
|
caps1 = gst_caps_new ("tescaps1", mime1, NULL);
|
|
|
|
caps2 = gst_caps_new ("tescaps2", mime2, NULL);
|
2001-03-07 21:52:56 +00:00
|
|
|
|
|
|
|
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_autoplugfactory_make ("static");
|
|
|
|
|
|
|
|
element = autoplug_caps (autoplug, "audio/mp3", "audio/raw");
|
|
|
|
xmlSaveFile ("autoplug2_1.gst", gst_xml_write (element));
|
|
|
|
|
|
|
|
element = autoplug_caps (autoplug, "video/mpeg", "audio/raw");
|
|
|
|
xmlSaveFile ("autoplug2_2.gst", gst_xml_write (element));
|
|
|
|
|
|
|
|
element = gst_autoplug_to_caps (autoplug,
|
2001-04-14 18:56:37 +00:00
|
|
|
gst_caps_new(
|
2001-03-07 21:52:56 +00:00
|
|
|
"testcaps3",
|
|
|
|
"video/mpeg",
|
|
|
|
gst_props_new (
|
|
|
|
"mpegversion", GST_PROPS_INT (1),
|
|
|
|
"systemstream", GST_PROPS_BOOLEAN (TRUE),
|
2001-04-14 18:56:37 +00:00
|
|
|
NULL)),
|
|
|
|
gst_caps_new("testcaps4","audio/raw", NULL),
|
2001-03-07 21:52:56 +00:00
|
|
|
NULL);
|
|
|
|
xmlSaveFile ("autoplug2_3.gst", gst_xml_write (element));
|
|
|
|
|
|
|
|
element = gst_autoplug_to_caps (autoplug,
|
2001-04-14 18:56:37 +00:00
|
|
|
gst_caps_new(
|
2001-03-07 21:52:56 +00:00
|
|
|
"testcaps5",
|
|
|
|
"video/mpeg",
|
|
|
|
gst_props_new (
|
|
|
|
"mpegversion", GST_PROPS_INT (1),
|
|
|
|
"systemstream", GST_PROPS_BOOLEAN (FALSE),
|
2001-04-14 18:56:37 +00:00
|
|
|
NULL)),
|
|
|
|
gst_caps_new("testcaps6", "video/raw", NULL),
|
2001-03-07 21:52:56 +00:00
|
|
|
NULL);
|
|
|
|
xmlSaveFile ("autoplug2_4.gst", gst_xml_write (element));
|
|
|
|
|
|
|
|
element = gst_autoplug_to_caps (autoplug,
|
2001-04-14 18:56:37 +00:00
|
|
|
gst_caps_new(
|
2001-03-07 21:52:56 +00:00
|
|
|
"testcaps7",
|
2001-04-14 18:56:37 +00:00
|
|
|
"video/avi", NULL),
|
|
|
|
gst_caps_new("testcaps8", "video/raw", NULL),
|
|
|
|
gst_caps_new("testcaps9", "audio/raw", NULL),
|
2001-03-07 21:52:56 +00:00
|
|
|
NULL);
|
|
|
|
xmlSaveFile ("autoplug2_5.gst", gst_xml_write (element));
|
|
|
|
|
|
|
|
element = gst_autoplug_to_caps (autoplug,
|
2001-04-14 18:56:37 +00:00
|
|
|
gst_caps_new(
|
2001-03-07 21:52:56 +00:00
|
|
|
"testcaps10",
|
|
|
|
"video/mpeg",
|
|
|
|
gst_props_new (
|
|
|
|
"mpegversion", GST_PROPS_INT (1),
|
|
|
|
"systemstream", GST_PROPS_BOOLEAN (TRUE),
|
2001-04-14 18:56:37 +00:00
|
|
|
NULL)),
|
|
|
|
gst_caps_new("testcaps10", "video/raw", NULL),
|
|
|
|
gst_caps_new("testcaps11", "audio/raw", NULL),
|
2001-03-07 21:52:56 +00:00
|
|
|
NULL);
|
|
|
|
xmlSaveFile ("autoplug2_6.gst", gst_xml_write (element));
|
|
|
|
|
|
|
|
exit (0);
|
|
|
|
exit (0);
|
|
|
|
}
|