Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gstreamer gstreamer
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 675
    • Issues 675
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 355
    • Merge requests 355
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamer
  • gstreamergstreamer
  • Issues
  • #272

Closed
Open
Created Jan 18, 2018 by Bugzilla Migration User@bugzilla-migration

Putting custom bin inside gstreamer pipeline doesn't work

Submitted by Tapas Kumar Kundu

Link to original bug (#792652)

Description

  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 :

  1. 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

Version: 1.x
Edited Mar 04, 2022 by Nicolas Dufresne
Assignee
Assign to
Time tracking