GNOME Bugzilla – Bug 792652
Putting custom bin inside gstreamer pipeline doesn't work
Last modified: 2018-11-03 12:44:37 UTC
1) gst-launch-1.0 -v flvmux name=mux ! custombin audiotestsrc samplesperbuffer=44100 ! voaacenc ! mux. videotestsrc num-buffers=250 ! video/x-raw,framerate=25/1 ! x264enc ! mux. I constructed above bin in a gstreamer c pipeline code and tried to put below custombin inside above bin . Then tried to connect them together as below : 2) I created below bin using gst_parse_bin_from_description() in c language as below: GstElement * broadcasting_pipeline = gst_parse_bin_from_description ("decodebin name=demux ! queue ! videorate ! video/x-raw,framerate=30/1 ! vaapipostproc name=postproc brightness=0.5 ! vaapih264enc dct8x8=true cabac=true rate-control=cbr bitrate=8192 keyframe-period=60 max-bframes=0 ! flvmux name=mux ! rtmpsink sync=true async=true location="rtmp://urlXXXXX" demux. ! queue ! progressreport ! audioconvert ! audiorate ! audioresample ! faac bitrate=128000 ! audio/mpeg,mpegversion=4,stream-format=raw ! mux.", TRUE, &error) if (!broadcasting_pipeline) { fprintf (stderr, "Parse error: %s\n", error->message); exit (1); } gst_bin_add(GST_BIN (pipeline), broadcasting_pipeline); //pipeline already has all the element added from (1) and I am just putting the new bin inside that pipeline here. // Linking both "broadcasting_pipeline" bin with actual pipeline: GstElement * decodebin_demux = NULL; decodebin_demux = gst_bin_get_by_name(GST_BIN(broadcasting_pipeline), "demux"); if (decodebin_demux == NULL) { fprintf(stderr, "unable to find decodebin demux element in broadcasting pipeline\n"); exit(1); } decodebin_sinkpad = gst_element_get_static_pad(decodebin_demux, "sink"); ghostpad_for_decodebin_sinkpad = gst_ghost_pad_new ("tapas_sinkpad", decodebin_sinkpad); gst_pad_set_active (ghostpad_for_decodebin_sinkpad, TRUE); gst_element_add_pad (broadcasting_pipeline, ghostpad_for_decodebin_sinkpad); gst_object_unref (decodebin_sinkpad); flvmux_srcpad = gst_element_get_static_pad(flvmux, "src"); if (flvmux_srcpad == NULL) { fprintf(stderr, "unable to get flvmux_srcpad \n"); exit(1); } if (ghostpad_for_decodebin_sinkpad == NULL) { fprintf(stderr, "unable to get ghostpad_for_decodebin_sinkpad \n"); exit(1); } But this is giving below ERROR. Any idea what I am missing ? 0:00:02.791367612 21427 0x7fd51820ac50 WARN GST_PADS gstghostpad.c:881:gst_ghost_pad_set_target:<'':decodepad0> could not link internal and target, reason:was linked 0:00:02.798777143 21427 0x7fd51820ac50 WARN GST_PADS gstghostpad.c:881:gst_ghost_pad_set_target:<'':decodepad0> could not link internal and target, reason:was linked 0:00:02.799171581 21427 0x7fd51820ac50 WARN decodebin gstdecodebin2.c:2306:connect_pad: Link failed on pad flvdemux0:sink 0:00:02.799346269 21427 0x7fd51820ac50 WARN decodebin gstdecodebin2.c:4565:gst_decode_bin_expose: error: no suitable plugins found: Link failed on pad flvdemux0:sink debug from errorlog: gstdecodebin2.c(4565): gst_decode_bin_expose (): /GstPipeline:recording pipeline/GstBin:bin0/GstDecodeBin:demux: no suitable plugins found: Link failed on pad flvdemux0:sink
This sounds more like a request for support. For this, please go to the gstreamer-devel mailing list instead. It fails with 'reason: was linked'. This sounds more like something going wrong with your logic.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/272.