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

how to get the file descriptor of the memory object? #6

Open
blueardour opened this issue Jun 25, 2018 · 1 comment
Open

how to get the file descriptor of the memory object? #6

blueardour opened this issue Jun 25, 2018 · 1 comment

Comments

@blueardour
Copy link

I emloyed:
private_handle_t * gralloc_handle = reinterpret_cast<private_handle_t*>(const_cast<native_handle*>(graphicbuffer->getNativeBuffer()->handle)); int fd = gralloc_handle->fd;
to get the file descriptor

But it seemed to be wrong and always returned 0x00

@sergeivolodin
Copy link
Contributor

Are all previous calls successful? Just from the code, it's hard to understand which part failed. I would check pointers for graphicbuffer then for graphicbuffer->getNativeBuffer() and then for graphicbuffer->getNativeBuffer()->handle

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

No branches or pull requests

2 participants