TheImagingSource / tiscamera

The Linux SDK for The Imaging Source cameras.

Home Page:https://www.theimagingsource.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stuck setting pipeline state to ready - pipeline.set_state(Gst.State.READY) due to TriggerMode

Niv-R opened this issue · comments

commented

Describe the bug
When "TriggerMode" is set to "On", restarting the pipeline gets stuck at pipeline.set_state(Gst.State.READY)

To Reproduce

  1. Set "TriggerMode" to "On"
  2. Attempt to start pipeline and set it to READY

computer used (please complete the following information):

  • OS: Ubuntu 22.04
  • Architecture/Platform: amd64 Desktop
  • Camera: DMK 39GX265-Z20-TI
  • tiscamera version:
    Tcam: 1.1.1_HEAD/ee45fcf_rev_1
    Aravis: 0.8_version_e977fa4
    Modules: gst_aravis_arvu3v_v4l2_libusb_tools_doc

Additional context
The pipeline string contains valve before the sink
tcamsrc serial=... name=source ! video/x-raw,format=GRAY12p,width=1920,height=1080,framerate=8192/225 ! valve name=valve ! appsink name=sink

Changing "TriggerMode" to "Off" between Gst.State.READY and Gst.State.PLAYING helped as a workaround.

Hello

The "valve" wont become ready, if there are no images. That is the blocking part.
It even can happen, if the "valve" is "closed", that following modules do not get ready.

[Edit]
I would avoid the "valve" and use a flag inside the appsink callback, which controls, whether frames are handled or not.
You may also set the appsink properties "drop" and number buffers, so you do not get too much buffers. I would at least pull each buffer in the appsink callback and if not handled, drop then.

Stefan

commented

I've tried removing the "valve" from the pipeline, but the issue still reproduced.

commented

What is your current pipeline?

Set the environment variable GST_DEBUG=*:3,tcam*:5.
This will give you a log of what the elements in your pipeline are doing and if images are received/pushed into the pipeline.