-
Notifications
You must be signed in to change notification settings - Fork 8
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
av_rpi_zc_get_buffer2 is declared but it has no implementation #1
Comments
@jc-kynesim can you advise? |
OK - sorry to change stuff on you - I admit I thought I & kodi were the only ones using that interface. However these days life should, in fact, be easier for you - you don't need to call zc_init at all and the rpi hwaccel will allocate stuff correctly anyway. The zc_init functions are now only provided for applications that want to control allocation outside ffmpeg. I should have removed the av_rpi_zc_get_buffer defn from the header but I obviously forgot. |
Thank you, that explains a lot. In my attempts to get anything in AVFrame.buf[0], I first added the zc_init calls and then added codec_context->refcounted_frames = 1; so I assumed that both were necessary. |
Ah - yes - you are right - sorry. My apps that need that (vlc) are managing their own buffers and so have the info in their hands which also allows them to bind the DRM handle to the buffer more permanently and the current code has an API that makes that easier (and I can explain that and give examples if you want to go down that route - the built in ZC allocator uses it). In any case I'll build you av_rpi_zc_vcsm_handle() but it will take a few days to work its way through the system. Going forward we will have a V4L2 HEVC decoder (it exists now but needs linux >= 5.4) which uses dmabufs natively and so the whole ZC thing will go away - it is something of a kludge anyway 'cos I didn't really understand how the ffmpeg hwaccel framework is meant to work (and I'll admit that whilst I understand it a bit better now it still confuses me on a regular basis). |
I managed to use hevc hardware support via rpi_zc in my application by adding the following to my get_format2:
In addition I had to copy the declarations of struct AVZcEnv and struct ZcOldCtxVals from rpi_zc.c. av_rpi_zc_get_buffer2 is declared in rpi_zc.h, but it has no implementation. The implementation is called zc_get_buffer2 in rpi_zc.c, but it is not exported. So my hack seems the only way to use rpi_zc. In a previous version of the hevc patch, av_rpi_zc_init that required no parameters, was available.
The text was updated successfully, but these errors were encountered: