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",
"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(
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("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/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);
GstElement *element;
GstElement *sink;
GstElement *pipeline;
- GstElement *disksrc;
+ GstElement *filesrc;
gst_init(&argc,&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);