some more commenting autoplug2 has a problem, I suspect the problem is...

some more commenting autoplug2 has a problem, I suspect the problem is actually with the mpeg type plugins, mpeg2type...

Original commit message from CVS:
some more commenting
autoplug2 has a problem, I suspect the problem is actually with the
mpeg type plugins, mpeg2types for example has a (null)
Could someone take a look at it ?
parent f93e629e
testprogs = autoplug autoplug2 autoplug3 autoplug4
testprogs = autoplug autoplug3 autoplug4 # autoplug2
TESTS = $(testprogs)
......
......@@ -21,13 +21,18 @@ main (int argc, char *argv[])
autoplug = gst_autoplugfactory_make ("static");
element = autoplug_caps (autoplug, "audio/mp3", "audio/raw");
g_print ("Autoplugging between audio/mp3 and audio/raw ...\n");
if ((element = autoplug_caps (autoplug, "audio/mp3", "audio/raw")) == NULL)
g_print ("Could not autoplug between audio/mp3 and audio/raw !\n");
xmlSaveFile ("autoplug2_1.gst", gst_xml_write (element));
element = autoplug_caps (autoplug, "video/mpeg", "audio/raw");
xmlSaveFile ("autoplug2_2.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));
element = gst_autoplug_to_caps (autoplug,
if ((element = gst_autoplug_to_caps (autoplug,
gst_caps_new(
"testcaps3",
"video/mpeg",
......@@ -36,8 +41,10 @@ main (int argc, char *argv[])
"systemstream", GST_PROPS_BOOLEAN (TRUE),
NULL)),
gst_caps_new("testcaps4","audio/raw", NULL),
NULL);
xmlSaveFile ("autoplug2_3.gst", gst_xml_write (element));
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(
......@@ -49,6 +56,7 @@ main (int argc, char *argv[])
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,
......@@ -58,6 +66,7 @@ main (int argc, char *argv[])
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,
......@@ -71,6 +80,7 @@ main (int argc, char *argv[])
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);
......
......@@ -7,7 +7,7 @@ main (int argc, char *argv[])
GstElement *element;
GstElement *sink;
GstElement *pipeline;
GstElement *disksrc;
GstElement *filesrc;
gst_init(&argc,&argv);
......@@ -30,15 +30,15 @@ main (int argc, char *argv[])
pipeline = gst_pipeline_new ("main_pipeline");
g_assert (pipeline != NULL);
disksrc = gst_elementfactory_make ("disksrc", "disk_reader");
g_assert (disksrc != NULL);
filesrc = gst_elementfactory_make ("filesrc", "disk_reader");
g_assert (filesrc != NULL);
gst_bin_add (GST_BIN (pipeline), disksrc);
gst_bin_add (GST_BIN (pipeline), filesrc);
gst_bin_add (GST_BIN (pipeline), element);
gst_element_connect (disksrc, "src", element, "sink");
gst_element_connect (filesrc, "src", element, "sink");
g_object_set (G_OBJECT (disksrc), "location", argv[1], NULL);
g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment