Skip to content

Make kp::Algorithm and kp::Sequence internals protected for subclassing#452

Merged
axsaucedo merged 1 commit intoKomputeProject:masterfrom
troelsy:master
Apr 7, 2026
Merged

Make kp::Algorithm and kp::Sequence internals protected for subclassing#452
axsaucedo merged 1 commit intoKomputeProject:masterfrom
troelsy:master

Conversation

@troelsy
Copy link
Copy Markdown
Contributor

@troelsy troelsy commented Apr 1, 2026

At Veo Technologies, we are prototyping Kompute integration in a GStreamer pipeline so our custom GStreamer elements can leverage Vulkan in a simple and efficient way.

In order to make GStreamer and Kompute work together, we have to modify the Sequence and Algorithm classes a bit. For kp::Algorithm we need to change the input and output buffers on our Algorithm for each execution, as GStreamer gives us new buffers with every call. In order to do this, we changed the member variables from private to protected and created a new Algorithm subclass that inherits from kp::Algorithm.

For kp::Sequence we did the same thing, making the member variables protected. GStreamer implements a mutex lock you need to acquire before calling vk::Queue::submit, so our child class of kp::Sequence will acquire and release the lock before submitting to the queue.

This PR only changes private to protected for member variables. If you think others may benefit from our locking/unlocking, I can make a separate PR for that too.

@axsaucedo
Copy link
Copy Markdown
Member

Super interesting. This sounds quite interesting. WOuld be keen to learn more about other nuances here. To be honest we have also explored also ways to access the internal components, so we can integrate / extend.

If you sign DCO we can merge.

Signed-off-by: Troels Ynddal <troels@ynddal.dk>
@troelsy
Copy link
Copy Markdown
Contributor Author

troelsy commented Apr 7, 2026

Tried another rebase, let's see if that fixes the DCO

Copy link
Copy Markdown
Member

@axsaucedo axsaucedo left a comment

Choose a reason for hiding this comment

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

Great - it did, thanks - LGTM

@axsaucedo axsaucedo merged commit 6e5380d into KomputeProject:master Apr 7, 2026
9 checks passed
@ahem
Copy link
Copy Markdown

ahem commented Apr 7, 2026

@axsaucedo I added an issue with some more detail here: #454

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.

3 participants