Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8360719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:32:05+00:00 2026-06-09T11:32:05+00:00

I’m trying to add some processing logic to a program that chugs away on

  • 0

I’m trying to add some processing logic to a program that chugs away on a local video file, but I’m having some trouble understanding how to translate the following (successfull) gst-launch command into code (and supply it with a “pad-added” callback):

gst-launch filesrc location=/path/to/my/video.avi ! decodebin2 ! autovideosink

I’ve tried my hand at gstreamer’s basic-tutorial-3, using decodebin2 in place of audioconvert:

data.source = gst_element_factory_make("filesrc", "source");
data.convert = gst_element_factory_make("decodebin2", "uridecoder");
data.sink = gst_element_factory_make("autovideosink", "autodetect");

However, I am never able to link data.convert to data.sink, as it is outlined in the example; the gst_element_link(data.convert, data.sink) always fails. I suspect there’s some special treatment for decodebin2. Some gstreamer users have metioned using ghostpads and seperate bins, which after a swift attempt, also yielded no success:

data.bin = gst_bin_new("processing-bin");
gst_bin_add_many(GST_BIN(data.bin), data.decoder, data.sink, NULL);
gst_element_add_pad(data.bin, 
                    gst_ghost_pad_new("bin_sink",
                                      gst_element_get_static_pad(data.decoder,"sink")));

I’m a little confused as how to continue debugging. Does anyone else have any pointers?

Here is a boiled down gist of the current code: (gist)

====

Update: My callback is now firing, I think it was because I had an incorrect filename for the filesrc location (whoops)

Now, after following the advice below, I am able to confirm that I’m getting audio and video caps types and check against them in the pad-added callback. However, I’m now getting the following “not-linked” error after one frame of pad processing:

Debugging information: gstavidemux.c(5187): gst_avi_demux_loop (): /GstPipeline:gstreamer-test/GstBin:processing-bin/GstDecodeBin2:uridecoder/GstAviDemux:avidemux0:
streaming stopped, reason not-linked
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T11:32:07+00:00Added an answer on June 9, 2026 at 11:32 am

    I think the main issue I was running into is that I was listening to the decoder for new pads, when I should’ve been getting the static pad from the video sink. I’ve updated the gist with my callback function to illustrate the difference.

    Basically, it boiled down to this change:

    I changed

    GstPad *sink_pad = gst_element_get_static_pad(data->decoder, "sink");  
    

    to the following

    GstPad *sink_pad = gst_element_get_static_pad(data->sink, "sink");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to render a haml file in a javascript response like so:
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
That's pretty much it. I'm using Nokogiri to scrape a web page what has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.