Decodebin2 output type of type GStreamer

I am trying to write a C program that replicates a pipeline:

gst-launch -v filesrc location="bbb.mp4" ! decodebin2 ! ffmpegcolorspace ! autovideosink 

DecodeBin2 has a dynamic notepad, and I hooked up a callback to create it. I cannot associate it with ffmpegcolorspace because the pad function is always video / quicktime. I would like it to be video / x -raw-yuv or something else that is compatible with ffmpegcolorspace.

Is it possible to force / select the output type decodebin2?

Thanks.

EDIT: Please do not recommend playbin. I am trying to learn how to make pipelines.

+3
source share
2 answers
 Is this possible to force/select the output type of decodebin2? 

No, you cannot force or select the type of source panel.

decoderbin2 select the corresponding demuxer element and this demuxer element will analyze this multimedia file and depending on the elementary stream codec in this media file it creates caps / output type / Source pad.so that the decoder type can communicate with it and pipelines.

all this happens in gstremer-plugin code

therefore, if you want this, you need to write the plugin yourself. !!

+2
source

You can try the playbin plugin instead of creating your pipeline manually.

Take a look at https://code.google.com/p/gstmultimedialialib/source/browse/trunk/gstmultimedialib/Multimedia/Multimedia/FilterGraph/PlaybinFilterGraph.h from my gstmultimedialib project.

Good luck !!!

-1
source

Source: https://habr.com/ru/post/900803/


All Articles