AppSink with pull_sample issue

Hi,

I’m trying to add following appsink into gstreamer pipeline and get the video out from the gst-meet. But pull_sample method not get frames. Could you please tell me what’s wrong in this code?

  let bin = gstreamer::Bin::new(None);
  let sink_video = gstreamer::ElementFactory::make("appsink", None)?;
  bin.add(&sink_video)?;
  conference.add_bin(&bin).await?;

  let appsink_video: gstreamer_app::AppSink = sink_video
    .dynamic_cast::<gstreamer_app::AppSink>()
    .expect("Sink element is expected to be an appsink!");

  if let Some(video_element) = bin.by_name("video") {
    println!("Add remote sink element");
    conference
    .set_remote_participant_video_sink_element(Some(video_element))
    .await;
  }
  
  thread::spawn(move || {
      loop {
        if let sample = appsink_video.pull_sample().map_err(|_| gstreamer::FlowError::Eos) {
          println!("appsink => {:?}",sample);
        }
      }
  });

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.