Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gst pipeline closes (-5) without waiting for hardware trigger #704

Closed
lc-spxl opened this issue Aug 11, 2022 · 3 comments
Closed

gst pipeline closes (-5) without waiting for hardware trigger #704

lc-spxl opened this issue Aug 11, 2022 · 3 comments

Comments

@lc-spxl
Copy link

lc-spxl commented Aug 11, 2022

Describe the bug
gst pipeline fails with error

[14:43:29.379] 🅸 device> [GvDevice::new] Device endianness = big
[14:43:29.379] 🅸 device> [GvDevice::new] Packet resend     = yes
[14:43:29.379] 🅸 device> [GvDevice::new] Write memory      = yes
[14:43:29.379] 🅸 device> [GvDevice::new] Legacy endianness handling = yes
[14:43:29.604] 🅸 device> [GvDevice::create_stream] Number of stream channels = 1
[14:43:29.625] 🅸 device> [GvDevice::auto_packet_size] Current packet size check successfull (1400 bytes)
[14:43:29.633] 🅸 device> [GvStream::stream_new] Packet size = 1400 byte(s)
[14:43:29.637] 🅸 stream> [GvStream::stream_new] Destination stream port = 55890
[14:43:29.637] 🅸 stream> [GvStream::stream_new] Source stream port = 49153
[14:43:29.671] 🅸 stream> [GvStream::loop] Packet socket method
[14:43:30.379] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[14:43:31.381] 🅳 device> [GvDevice::Heartbeat] Ack value = 2

ERROR: from element /GstPipeline:pipeline0/GstAravis:aravis0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstAravis:aravis0:
streaming stopped, reason error (-5)

[14:43:31.811] 🅸 stream>     bins    ;frame_retent; packet_time;inter_packet
                                    0;           0;           0;           0
                         -------------
                         >=      2000;           0;           0;           0
                         <          0;           0;           0;           0
                         min         :         n/a;         n/a;         n/a
                         max         :         n/a;         n/a;         n/a
                         last max at :           0;           0;           0
                         counter     :           0:           0:           0

To Reproduce

The pipeline is the following (I also tested it with a Hikrobot-MV-CA032-10GC)

aravissrc camera-name="FLIR-Blackfly S BFS-PGE-23S3C-20136026" features="TriggerSelector=FrameBurstStart TriggerSource=Line0 TriggerMode=On" ! video/x-raw, format=RGB,width=960,height=600,framerate=15/1 ! jpegenc idct-method=2 quality=100 ! multipartmux boundary="myboundary" ! tcpserversink sync=false host=0.0.0.0 port=8000

However, removing the features property it run properly

aravissrc camera-name="Hikrobot-MV-CA032-10GC-02K32049763" ! video/x-raw,framerate=15/1,fps=15/1,width=960,height=600,format=RGB ! jpegenc idct-method=2 quality=100 ! multipartmux boundary="myboundary" ! tcpserversink sync=false host=0.0.0.0 port=8000

Expected behavior

Pipeline should wait until the trigger is activated

Camera description:

Camera 1

  • HIKROBOT
  • MV-CA032-10GC
  • eth

Camera 2

  • HIKROBOT
  • MV-CA032-10GC
  • eth

Platform description:

  • Aravis version: built from commit 97fcd70
  • OS: Ubuntu 22.04
  • Hardware x86_64

Additional context

I would point to #528 but I have no clarity on how the associated PR is solving the issue

@lc-spxl lc-spxl closed this as completed Aug 11, 2022
@lc-spxl lc-spxl reopened this Aug 11, 2022
@lc-spxl
Copy link
Author

lc-spxl commented Aug 12, 2022

From the logs seems I am hitting the timeout of 2s as defined here

GST_DEBUG_OBJECT (gst_aravis, "Buffer timeout = %" G_GUINT64_FORMAT " µs", gst_aravis->buffer_timeout_us);

0:00:00.411558950 11896 0x55ccb7514de0 DEBUG              aravissrc gstaravis.c:298:gst_aravis_set_caps:<aravis0> Buffer timeout = 2000000 µs

This then fails on timeout

aravis/gst/gstaravis.c

Lines 555 to 561 in 43b3ea4

do {
if (arv_buffer) arv_stream_push_buffer (gst_aravis->stream, arv_buffer);
arv_buffer = arv_stream_timeout_pop_buffer (gst_aravis->stream, gst_aravis->buffer_timeout_us);
} while (arv_buffer != NULL && arv_buffer_get_status (arv_buffer) != ARV_BUFFER_STATUS_SUCCESS);
if (arv_buffer == NULL)
goto error;

I would say #686 is not addressing it or maybe not solving it directly.

If the trigger is set I would skip the timeout completely, what do you think ?

For reference, this repository implements Flir camera plugin based on spinnaker SDK

https://github.com/thompd27/gst-plugin-spinnaker/blob/master/src/gstspinnaker.c#L1053

@EmmanuelP
Copy link
Contributor

Closing as duplicate of #528

@EmmanuelP
Copy link
Contributor

Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants