1

i am creating a player which uses playbin2 to create pipeline. in my code I'm using the following line to create the pipeline.

pipeline = gst_parse_launch("playbin2", &error);

so pipeline will get created and the player is working. Now I wish to alter the pipeline created. Is there any api in Gstreamer which helps to view and edit the pipeline created using playbin2 ?

Also I wish to print the pipeline created using gst_parse_launch. How to print the pipeline using GstElement returned from gst_parse_launch ?

jithin
  • 637
  • 2
  • 14
  • 26

1 Answers1

2

I don't think it is possible to alter the pipeline created by playbin, it has internal code to auto manage this pipeline and manually modifying it will lead to unexpected results. You can update it using the given properties and signals, though.

You can use gst_bin_iterate_elements or gst_bin_iterate_recurse to iterate over elements of the pipeline to print them. It is also possible to use http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstInfo.html#GST-DEBUG-BIN-TO-DOT-FILE:CAPS to have a .dot file created. The dot file is a graph representation of the pipeline and can be converted into an image using the dot application. This way you have the full pipeline drawn into an easily understandable image.

It is hard to give you further advice as I don't know what you are trying to do by altering playbin2's pipeline, you can try looking at lower level elements, like uridecodebin or decodebin2, and look at the autoplugging signals to control what is automatically added by those elements. IIRC this can be also done from playbin2's level.

It seems that you are still using gstreamer 0.10, it is no longer developed. If you have no reasons to stick to 0.10, please move on to 1.0

thiagoss
  • 2,034
  • 13
  • 8