Skip to content

Gst aravissrc receive buffer size too small #1037

@kohtala

Description

@kohtala

Describe the bug

GStreamer aravissrc object creates new streams when it receives new caps. The new stream defaults with socket-buffer of fixed. Therefore the aravissrc relies on the default receive buffer size instead of asking the operating system for full frame sized receive buffer.

To Reproduce
Check the default receive buffer and permitted maximum receive buffer:

$ sysctl net.core.rmem_default net.core.rmem_max
net.core.rmem_default = 212992
net.core.rmem_max = 16777216

Connect a GigE camera (or start arv-fake-gv-camera-0.8) needing a larger buffer and launch

$ arv-tool-0.8 values PayloadSize
Aravis-Fake-GV01 (127.0.0.1)
        IntSwissKnife: 'PayloadSize' = 262144
$ gst-launch-1.0 aravissrc ! testsink

While it is getting frames, check the socket receive buffers for the gst-launch-1.0

$ ss -aumOp
State  Recv-Q Send-Q       Local Address:Port   Peer Address:Port  Process
...
UNCONN 0      0               10.224.0.1:57135       0.0.0.0:*      users:(("gst-launch-1.0",pid=2270720,fd=10)) skmem:(r0,rb212992,t0,tb212992,f4096,w0,o0,bl0,d0)
UNCONN 0      0               10.224.0.1:43286       0.0.0.0:*      users:(("gst-launch-1.0",pid=2270720,fd=13)) skmem:(r0,rb212992,t0,tb212992,f4096,w0,o0,bl0,d0)

The skmem value after rb is the receive buffer size. Here 212992 which is less than 262144 and net.core.rmem_max.

(Would it cause some problem to connect the UDP socket to receive only from the camera for easier finding of the socket for that camera?)

Expected behavior
Seeing rb212992 of at least the PayloadSize. I think it is currently larger to accommodate headers.

Camera description:
N/A

Platform description:

  • Aravis version 0.8.34
  • OS: Debian 11, 13
  • Hardware x86_64

Additional context
Since 0.8.32 the stream object can be received from the aravissrc through stream property notification for modification. However this is difficult in a GStreamer pipeline and not available from gst-launch-1.0.

It is also possible to work around this with larger net.core.rmem_default, but it may affect other protocols on the host and not available without root access on the host.

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. EnhancementIssues that propose improvements to existing features5. GigeIssue in the GigEVision implementation5. GstreamerIssue in GStreamer plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions