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

queue/qbuf: add QBufferWeak for stateless decoders #36

Closed
wants to merge 1 commit into from

Conversation

semigle
Copy link
Contributor

@semigle semigle commented Jul 2, 2024

This commit provides the weak version QBuffer without strong reference to its queue. It is espcially usefull for the frame based stateless decoder when processing farmes with mutliple slices in the output direction.

This commit provides the weak version QBuffer without strong reference
to its queue. It is espcially usefull for the frame based stateless decoder
when processing farmes with mutliple slices in the output direction.
@Gnurou
Copy link
Owner

Gnurou commented Oct 6, 2024

I have changed the way QBuffer works in 2c56d1f, d4af16d and a32642f. These change make it such that when obtaining a QBuffer from a Queue that is behind a reference-counter pointer (such as Rc or Arc), the obtained QBuffer clones the smart pointer instead of taking a direct reference to the Queue, thus removing the lifetime constraint that QBuffer originally had.

It is not a weak reference per-se, but should provide the same level of functionality as this PR while using the existing code. Let me close this PR.

@Gnurou Gnurou closed this Oct 6, 2024
@stevecho321
Copy link

Slawomir, this part was confusing for me.

So the initial plan for you was to merge this PR add QBufferWeak to v4l2r for v4l2 stateless usage in cros-codecs.

But Alex made above changes, so this PR was decided not to be merged.

It stopped here, so QBufferWeak related change in cros-codecs still remains as it is.

Is this correct understanding of the status?

@stevecho321
Copy link

Checked that above patches from Alex merged to master.

2c56d1f , d4af16d and a32642f

@semigle
Copy link
Contributor Author

semigle commented Nov 4, 2024

Slawomir, this part was confusing for me.

So the initial plan for you was to merge this PR add QBufferWeak to v4l2r for v4l2 stateless usage in cros-codecs.

But Alex made above changes, so this PR was decided not to be merged.

It stopped here, so QBufferWeak related change in cros-codecs still remains as it is.

Is this correct understanding of the status?

I'd introduced QBufferWeak as a workaround for static lifetime constraints to integrate v4l2 with cros-codecs. Since Alex changed the original implementation of QBuffer you should probably be able to simply use QBuffer instead of QBufferWeak in cros-codecs.

@stevecho321
Copy link

Slawomir, this part was confusing for me.
So the initial plan for you was to merge this PR add QBufferWeak to v4l2r for v4l2 stateless usage in cros-codecs.
But Alex made above changes, so this PR was decided not to be merged.
It stopped here, so QBufferWeak related change in cros-codecs still remains as it is.
Is this correct understanding of the status?

I'd introduced QBufferWeak as a workaround for static lifetime constraints to integrate v4l2 with cros-codecs. Since Alex changed the original implementation of QBuffer you should probably be able to simply use QBuffer instead of QBufferWeak in cros-codecs.

Thank you Slawomir for the clarification!

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