Skip to content

Replace custom ringbuffer in cFilterThread by std function - #43

Merged
rellla merged 4 commits into
rellla:drm-atomic-glesfrom
fwolter:replace-rigbuffer-queue
Oct 9, 2025
Merged

Replace custom ringbuffer in cFilterThread by std function#43
rellla merged 4 commits into
rellla:drm-atomic-glesfrom
fwolter:replace-rigbuffer-queue

Conversation

@fwolter

@fwolter fwolter commented Oct 9, 2025

Copy link
Copy Markdown

I created a thread-safe FIFO buffer, which is essentially a ring buffer, but simply based on std::deque. The goal is to re-use it for the other custom made ringbuffers, too. But there needs to be some preparation done at the other places, because there is some weird stuff going on.

The queue could potentially also made synchronous to eliminate the millisecond polling sleeps for thread synchronization.

@rellla

rellla commented Oct 9, 2025

Copy link
Copy Markdown
Owner

Nice. That would help us to drop the individual ringbuffers used all over the code. Do you want to add your copyright to the files if that is your own work? Did you test that already?

@fwolter

fwolter commented Oct 9, 2025

Copy link
Copy Markdown
Author

I don't care whether my name appears in the source files. The code is from me and the documentation comments are from Claude Code. I tested playback, fast forward and skipping with h264.

@rellla rellla left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work.
cVideoRender::m_framesRb and cVideoStream::m_packetRb should also be converted ;)

not sure, if the audio ringbuffer could also be done with that...

Comment thread Makefile
Comment thread queue.cpp
Comment thread queue.cpp
Comment thread queue.cpp
Comment thread queue.h
@rellla
rellla merged commit f6c521c into rellla:drm-atomic-gles Oct 9, 2025
2 checks passed
@fwolter
fwolter deleted the replace-rigbuffer-queue branch October 9, 2025 16:34
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

Successfully merging this pull request may close these issues.

2 participants