How to get Pipeline created by playbin in textual format in Gstreamer?

浪尽此生 提交于 2019-12-09 18:43:32

问题


I'm playing a transport stream file (*.ts) using the following pipeline:

gst-launch-0.10 playbin2 uri=file:///c:/bbb.ts

But I need to convert that into a pipeline myself. I'm not sure how to achieve this.

So far I have tried: (works fine)

gst-launch-0.10 -v filesrc location=c:/bbb.ts ! tsdemux ! audio/x-ac3 ! fakesink

But if i replace fakesink with autoaudiosink it fails with a not-linked error.

And even the fakesink doesn't work for video:

gst-launch-0.10 -v filesrc location=c:/bbb.ts ! tsdemux ! video/x-mpeg2 ! fakesink

So I have two questions:

  1. How to find out pipeline created by playbin element.
  2. How to play mpeg2-ts file using gstreamer pipeline.

回答1:


Answer to question 1 -

There is a way to get the graphs of the pipeline created mentioned in documentation of basic tutorial-11.

A brief from the page

Getting pipeline graphs

For those cases where your pipeline starts to grow too large and you lose track of what is connected with what, GStreamer has the capability to output graph files. These are .dot files, readable with free programs like GraphViz, that describe the topology of your pipeline, along with the caps negotiated in each link.

This is also very handy when using all-in-one elements like playbin2 or uridecodebin, which instantiate several elements inside them.

I hope this resolves what you want



来源:https://stackoverflow.com/questions/17987422/how-to-get-pipeline-created-by-playbin-in-textual-format-in-gstreamer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!