Login
You're viewing the techdon.dev public feed.
  • Jul 5, 2025, 12:28 PM

    @pavel Not sure what you mean. GStreamer is internally multi-threaded, but its API is thread-safe and there's only one thread in this code. Of course any kind of production-quality code will use some mainloop and enqueue buffers based on callbacks rather than while(!processed){} loop, but it's not exactly rocket science.

    💬 1🔄 0⭐ 0

Replies

  • Jul 5, 2025, 1:20 PM
    @dos There are at least two threads in this code: main one, and whatever runs "on_buffer_released". I don't yet know what causes the segfaults, but I suspect gstreamer.
    💬 0🔄 0⭐ 0
  • Jul 5, 2025, 1:33 PM

    @pavel That one line is the only thing that runs from another thread and it's neither scary nor requires any locking 😁

    But there are several other smelly things in this code and lots of missing error handling, so I'd rather start with that when looking for suspects.

    💬 1🔄 0⭐ 0
  • Jul 5, 2025, 8:17 PM

    @pavel Passing the right buffer size to gst_dmabuf_allocator_alloc helps it to not crash and not have garbage at the end of the frame 😂

    💬 0🔄 0⭐ 0