Pipeline going to playing, playsink don't display any frame, setting state to null never returns

Hi,
After moking up quite useful video-only pipelines with unixfd ! fallbacksrc ! ...h264 ! flv ! rtmp, I started to add audio and got hangs before the first video frame is shown on a playsink used as monitor feedback. I may not understood an important concept around live / async-handling but I can’t really find which one. I managed to to have a small rust example that show the hanging, hopefully with all the necessary environnement informations needed to reproduce it and got 3 dot graphs of it and a full gstreamer log (and a console log).

The 3 dot graphs:

The rust code:

/* This code tries to make
    - element: "playsink name=monitor"
    - chain of elements: audiotestsrc name=mainaudiosrc is-live=true num-buffers=250 ! (audio_capsfilter_raw) ! audioconvert ! audioresample
    - chain of elements: videotestsrc name=mainvideosrc is-live=true num-buffers=250 ! (video_capsfilter_raw) ! queue
    - 2 links from those chains last sink the playsink element

   For me it hangs : not image displayed in the XvVideoSink, setting state to null never returns control to this program.
   Tried on debian testing (up to date on 2024-10-24, gstreamer1.0-plugins-base:amd64 version 1.24.8-1)

   Needs some Cargo.toml [dependancies] :
    anyhow = "*"
    gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", branch = "0.23", version = "0.23" }

   May be run with: $ GST_DEBUG_FILE=gst.log GST_DEBUG=7 GST_DEBUG_DUMP_DOT_DIR=. cargo run --example hanging 2>&1 | tee console.log
   dot conversion:  $ for f in *.dot; do dot -Tpng -o ${f%.dot}.png < $f; done
 */

use anyhow::{anyhow, Context};
use gst::prelude::*;

// For main() return type, see:
// - https://doc.rust-lang.org/std/process/trait.Termination.html
// - https://docs.rs/anyhow/latest/anyhow/
fn main() -> Result<(), anyhow::Error> {
    gst::init()?;

    let audio_channels = 2; // stereo
    let audio_samplerate = 48000; // Hz
    let video_width = 320; // px
    let video_height = 240; // px
    let video_framerate = 30; // FPS

    let audio_caps_raw = gst_audio::AudioCapsBuilder::new()
        .format(gst_audio::AudioFormat::F32le)
        .rate(audio_samplerate)
        .channels(audio_channels)
        //.channel_mask(3) //XXX https://gstreamer.freedesktop.org/documentation/audio/gstaudiochannels.html?gi-language=c#gst_audio_channel_positions_to_mask
        //.layout(gst_audio::AudioLayout::Interleaved)
        .build();
    let video_caps_raw = gst_video::VideoCapsBuilder::new()
        .format(gst_video::VideoFormat::Nv12)
        .width(video_width)
        .height(video_height)
        .framerate(gst::Fraction::from_integer(video_framerate))
        .build();

    let mainaudiosrc = gst::ElementFactory::make("audiotestsrc")
        .name("mainaudiosrc")
        //.property("wave", "ticks")
        .property("num-buffers", 250)
        .property("is-live", true)
        .build()?;
    let audio_capsfilter_raw = gst::ElementFactory::make("capsfilter")
        .name("audio_capsfilter_raw")
        .property("caps", &audio_caps_raw)
        .build()?;
    /*
    let audioconvert = gst::ElementFactory::make("audioconvert")
        .name("audioconvert")
        .build()?;
    let audioresample = gst::ElementFactory::make("audioresample")
        .name("audioresample")
        .build()?;
    */
    let mainvideosrc = gst::ElementFactory::make("videotestsrc")
        .name("mainvideosrc")
        //.property("pattern", "ball")
        //.property("flip", true)
        .property("num-buffers", 250)
        .property("is-live", true)
        .build()?;
    let video_capsfilter_raw = gst::ElementFactory::make("capsfilter")
        .name("video_capsfilter_raw")
        .property("caps", &video_caps_raw)
        .build()?;
    /*
    let videoconvert = gst::ElementFactory::make("queue")
        .name("videoconvert")
        .build()?;
    let videoqueue = gst::ElementFactory::make("queue")
        .name("videoqueue")
        .build()?;
    */
    let playsink = gst::ElementFactory::make("playsink")
        .name("monitor")
        //.property("async-handling", true)
        .build()?;

    let pipeline = gst::Pipeline::with_name("hanging");
    pipeline.add_many([&mainaudiosrc, &audio_capsfilter_raw])?;
    gst::Element::link_many([&mainaudiosrc, &audio_capsfilter_raw])?;

    pipeline.add_many([&mainvideosrc, &video_capsfilter_raw])?;
    gst::Element::link_many([&mainvideosrc, &video_capsfilter_raw])?;

    pipeline.add_many([&playsink])?;

    let mainaudiopad = audio_capsfilter_raw.static_pad("src").unwrap();
    let playsink_audio_raw_sink_pad = playsink.request_pad_simple("audio_raw_sink").unwrap();
    mainaudiopad.link(&playsink_audio_raw_sink_pad)?;

    let mainvideopad = video_capsfilter_raw.static_pad("src").unwrap();
    let playsink_video_raw_sink_pad = playsink.request_pad_simple("video_raw_sink").unwrap();
    mainvideopad.link(&playsink_video_raw_sink_pad)?;

    let bus = pipeline.bus().ok_or(anyhow!(
        "pipeline without bus, may be invalid or incomplete"
    ))?;

    println!("before PLAYING");
    pipeline.debug_to_dot_file_with_ts(gst::DebugGraphDetails::all(), "pipeline-before-play");

    pipeline
        .set_state(gst::State::Playing)
        .context("Failed to set_state Playing on pipeline")?;
    println!("started PLAYING");

    pipeline.debug_to_dot_file_with_ts(gst::DebugGraphDetails::all(), "pipeline-playing");
    println!("dumped PLAYING");

    for msg in bus.iter_timed(3*gst::ClockTime::SECOND) {
        match msg.view() {
            gst::MessageView::Eos(eos) => {
                println!("End Of Stream received {eos:?}");
                break;
            }
            gst::MessageView::Error(err) => {
                println!(
                    "Error from {:?}: {} ({:?})",
                    err.src().map(|s| s.path_string()),
                    err.error(),
                    err.debug()
                );
                break;
            }
            _ => {
                println!("{msg:?}");
            }
        }
    }
    println!("after bus msg loop");

    // Gracefull stop
    pipeline.debug_to_dot_file_with_ts(gst::DebugGraphDetails::all(), "pipeline-before-stop");
    println!("before NULL");
    pipeline
        .set_state(gst::State::Null)
        .context("Failed to stop the pipeline")?;
    println!("after NULL");

    Ok(())
}

The gstreamer log: gst-ansifiltered.log

The console log :

   Compiling hello-bevy v0.1.0 (/home/ludolpif/git/hello-bevy)
    Finished `dev` profile [optimized + debuginfo] target(s) in 0.91s
     Running `/home/ludolpif/git/hello-bevy/target/debug/examples/hanging`
before PLAYING
started PLAYING
dumped PLAYING
Message { ptr: 0x55de107b8590, type: "state-changed", seqnum: 9, src: Some("audiotee"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_PAUSED) }) }
Message { ptr: 0x55de10534cd0, type: "state-changed", seqnum: 10, src: Some("audiotee"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_READY), new-state: (GstState) ((GstState) GST_STATE_PAUSED), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x55de107bad80, type: "state-changed", seqnum: 18, src: Some("streamsynchronizer0"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x55de107b9210, type: "state-changed", seqnum: 19, src: Some("monitor"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x55de107bb5b0, type: "state-changed", seqnum: 20, src: Some("audio_capsfilter_raw"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x55de107bc3c0, type: "state-changed", seqnum: 21, src: Some("video_capsfilter_raw"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x55de107bc760, type: "state-changed", seqnum: 22, src: Some("mainaudiosrc"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x55de107bcbc0, type: "state-changed", seqnum: 23, src: Some("mainvideosrc"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x55de107bd020, type: "state-changed", seqnum: 24, src: Some("hanging"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_PLAYING) }) }
Message { ptr: 0x55de107bdfd0, type: "state-changed", seqnum: 27, src: Some("streamsynchronizer0"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_READY), new-state: (GstState) ((GstState) GST_STATE_PAUSED), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x55de107bd490, type: "state-changed", seqnum: 28, src: Some("audio_capsfilter_raw"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_READY), new-state: (GstState) ((GstState) GST_STATE_PAUSED), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x55de107be8e0, type: "state-changed", seqnum: 29, src: Some("video_capsfilter_raw"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_READY), new-state: (GstState) ((GstState) GST_STATE_PAUSED), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x55de107b32b0, type: "stream-status", seqnum: 32, src: Some("src"), structure: Some(GstMessageStreamStatus { type: (GstStreamStatusType) ((GstStreamStatusType) GST_STREAM_STATUS_TYPE_CREATE), owner: (GstElement) (GstAudioTestSrc) mainaudiosrc, object: (GstTask) (GstTask) mainaudiosrc:src }) }
Message { ptr: 0x55de107bee90, type: "state-changed", seqnum: 33, src: Some("mainaudiosrc"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_READY), new-state: (GstState) ((GstState) GST_STATE_PAUSED), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x55de107bfa50, type: "stream-status", seqnum: 36, src: Some("src"), structure: Some(GstMessageStreamStatus { type: (GstStreamStatusType) ((GstStreamStatusType) GST_STREAM_STATUS_TYPE_CREATE), owner: (GstElement) (GstVideoTestSrc) mainvideosrc, object: (GstTask) (GstTask) mainvideosrc:src }) }
Message { ptr: 0x7f5b300010a0, type: "stream-status", seqnum: 37, src: Some("src"), structure: Some(GstMessageStreamStatus { type: (GstStreamStatusType) ((GstStreamStatusType) GST_STREAM_STATUS_TYPE_ENTER), owner: (GstElement) (GstAudioTestSrc) mainaudiosrc, object: (GstTask) (GstTask) mainaudiosrc:src }) }
Message { ptr: 0x55de107c08d0, type: "state-changed", seqnum: 38, src: Some("mainvideosrc"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_READY), new-state: (GstState) ((GstState) GST_STATE_PAUSED), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x55de107c11e0, type: "state-changed", seqnum: 41, src: Some("hanging"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_READY), new-state: (GstState) ((GstState) GST_STATE_PAUSED), pending-state: (GstState) ((GstState) GST_STATE_PLAYING) }) }
Message { ptr: 0x55de107b9bc0, type: "new-clock", seqnum: 42, src: Some("hanging"), structure: Some(GstMessageNewClock { clock: (GstClock) (GstSystemClock) GstSystemClock }) }
Message { ptr: 0x7f5b2c0010a0, type: "stream-status", seqnum: 39, src: Some("src"), structure: Some(GstMessageStreamStatus { type: (GstStreamStatusType) ((GstStreamStatusType) GST_STREAM_STATUS_TYPE_ENTER), owner: (GstElement) (GstVideoTestSrc) mainvideosrc, object: (GstTask) (GstTask) mainvideosrc:src }) }
Message { ptr: 0x55de107bef20, type: "state-changed", seqnum: 45, src: Some("audio_capsfilter_raw"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_PAUSED), new-state: (GstState) ((GstState) GST_STATE_PLAYING), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x55de107c3dc0, type: "state-changed", seqnum: 46, src: Some("video_capsfilter_raw"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_PAUSED), new-state: (GstState) ((GstState) GST_STATE_PLAYING), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x55de107c4790, type: "state-changed", seqnum: 47, src: Some("mainaudiosrc"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_PAUSED), new-state: (GstState) ((GstState) GST_STATE_PLAYING), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x55de107c5830, type: "state-changed", seqnum: 48, src: Some("mainvideosrc"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_PAUSED), new-state: (GstState) ((GstState) GST_STATE_PLAYING), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c0227c0, type: "state-changed", seqnum: 54, src: Some("videosink-actual-sink-xvimage"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c023430, type: "state-changed", seqnum: 55, src: Some("videosink"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c03dc20, type: "state-changed", seqnum: 67, src: Some("scale"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c03e3b0, type: "state-changed", seqnum: 68, src: Some("conv"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c03e630, type: "state-changed", seqnum: 69, src: Some("identity"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c03d980, type: "state-changed", seqnum: 70, src: Some("vconv"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c045e50, type: "state-changed", seqnum: 71, src: Some("vqueue"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c046eb0, type: "state-changed", seqnum: 72, src: Some("vbin"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_PAUSED) }) }
Message { ptr: 0x7f5b2c03fb10, type: "state-changed", seqnum: 81, src: Some("scale"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_READY), new-state: (GstState) ((GstState) GST_STATE_PAUSED), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c040070, type: "state-changed", seqnum: 82, src: Some("conv"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_READY), new-state: (GstState) ((GstState) GST_STATE_PAUSED), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c04b660, type: "state-changed", seqnum: 83, src: Some("identity"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_READY), new-state: (GstState) ((GstState) GST_STATE_PAUSED), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c04c010, type: "state-changed", seqnum: 84, src: Some("vconv"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_READY), new-state: (GstState) ((GstState) GST_STATE_PAUSED), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c04c150, type: "stream-status", seqnum: 85, src: Some("src"), structure: Some(GstMessageStreamStatus { type: (GstStreamStatusType) ((GstStreamStatusType) GST_STREAM_STATUS_TYPE_CREATE), owner: (GstElement) (GstQueue) vqueue, object: (GstTask) (GstTask) vqueue:src }) }
Message { ptr: 0x7f5b2c04c660, type: "state-changed", seqnum: 86, src: Some("vqueue"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_READY), new-state: (GstState) ((GstState) GST_STATE_PAUSED), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b200010a0, type: "stream-status", seqnum: 87, src: Some("src"), structure: Some(GstMessageStreamStatus { type: (GstStreamStatusType) ((GstStreamStatusType) GST_STREAM_STATUS_TYPE_ENTER), owner: (GstElement) (GstQueue) vqueue, object: (GstTask) (GstTask) vqueue:src }) }
Message { ptr: 0x7f5b2c05e950, type: "state-changed", seqnum: 96, src: Some("audiosink-actual-sink-pulse"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c05b660, type: "state-changed", seqnum: 97, src: Some("audiosink"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c05c930, type: "state-changed", seqnum: 110, src: Some("resample"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c076380, type: "state-changed", seqnum: 111, src: Some("conv"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c077560, type: "state-changed", seqnum: 112, src: Some("identity"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c05c9c0, type: "state-changed", seqnum: 113, src: Some("aconv"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c070e90, type: "state-changed", seqnum: 114, src: Some("aqueue"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c0779b0, type: "state-changed", seqnum: 115, src: Some("abin"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_NULL), new-state: (GstState) ((GstState) GST_STATE_READY), pending-state: (GstState) ((GstState) GST_STATE_PAUSED) }) }
Message { ptr: 0x7f5b2c076410, type: "state-changed", seqnum: 125, src: Some("resample"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_READY), new-state: (GstState) ((GstState) GST_STATE_PAUSED), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c078700, type: "state-changed", seqnum: 126, src: Some("conv"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_READY), new-state: (GstState) ((GstState) GST_STATE_PAUSED), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c03f2c0, type: "state-changed", seqnum: 127, src: Some("identity"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_READY), new-state: (GstState) ((GstState) GST_STATE_PAUSED), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c077da0, type: "state-changed", seqnum: 128, src: Some("aconv"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_READY), new-state: (GstState) ((GstState) GST_STATE_PAUSED), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b2c06a6d0, type: "stream-status", seqnum: 129, src: Some("src"), structure: Some(GstMessageStreamStatus { type: (GstStreamStatusType) ((GstStreamStatusType) GST_STREAM_STATUS_TYPE_CREATE), owner: (GstElement) (GstQueue) aqueue, object: (GstTask) (GstTask) aqueue:src }) }
Message { ptr: 0x7f5b2c074020, type: "state-changed", seqnum: 130, src: Some("aqueue"), structure: Some(GstMessageStateChanged { old-state: (GstState) ((GstState) GST_STATE_READY), new-state: (GstState) ((GstState) GST_STATE_PAUSED), pending-state: (GstState) ((GstState) GST_STATE_VOID_PENDING) }) }
Message { ptr: 0x7f5b140010a0, type: "stream-status", seqnum: 131, src: Some("src"), structure: Some(GstMessageStreamStatus { type: (GstStreamStatusType) ((GstStreamStatusType) GST_STREAM_STATUS_TYPE_ENTER), owner: (GstElement) (GstQueue) aqueue, object: (GstTask) (GstTask) aqueue:src }) }
Message { ptr: 0x7f5b20006ff0, type: "element", seqnum: 173, src: Some("monitor"), structure: Some(prepare-window-handle) }
Message { ptr: 0x7f5b2000abd0, type: "element", seqnum: 175, src: Some("videosink-actual-sink-xvimage"), structure: Some(have-window-handle { window-handle: (guint64) 81788930 }) }
Message { ptr: 0x7f5b1400d8f0, type: "latency", seqnum: 178, src: Some("audiosink-actual-sink-pulse"), structure: None }
after bus msg loop
before NULL
[here it stalls indefinitely, I pressed Ctrl+C after a while]

(I was limited to 1 image and 1 link, I will make other files available in the same web folder as the log, including html syntax-highlighted line-numbered rust code, and full-resolution png dot files).

And worth to mention : adding audioconvert ! audioresample and videoconvert ! queue shows the same hangs for me.

Don’t use playsink. It requires interactive handling

Just use autoaudiosink and autovideosink (or the specific sinks if you know them).

Thanks for your reply !

  • May I ask where I have missed to read this information in my RTFM journey ?
  • What is exactly “interactive handling” ?
  • (Why audio only or video only works with playsink in the previous code example ?)
  • In a more general manner, how to recognize elements that needs some specificities from inspect or doc ?

I seek for an autoplugger element/bin that can be plugged to a raw audio+video streams and also, in an other run or temporality, plugged to an flvmux’ed stream to allow me to monitor/probe what is flowing in a non trivial pipeline without handcrafting all decoding steps needed. I was understanding that playbin[3] can’t help, and hoping playsink could.

Thanks again,