Python API: Using AppSink

If I use an AppSink in Python the buffer that is received is an NVVM structure. How can the frame data be extracted from this buffer. For example for a 1080 x 1920 RBGA frame it is telling me the buffer size is 64.

Any ideas?

It may not be possible in python. It is supported in C code. You can access the buffers through NvBuffer APIs. There is a sample and please check

If I understand correctly the functions in nvbuf_utils.h have not been exposed in the Python API. So until then it isn’t possible to extract the standard GstBuffer for the frame from the NvBuffer?

Any idea when this will be made available? And how do the other standard sinks (for example filesink) work if special handling of the buffer is needed.

I believe that I have solved it by using a nvideoconvert.

nvideoconvert ! video/x-raw, format=RGBA ! appsink

With that I get the proper sized buffer that can be read on the CPU.