hi I am working on the streaming stuff, we are trying to transfer the frame object to our web site and display to user. we have created the callback function for h264_frame_cb, it get the memory by the pointer and the size which provided by the callback. however, how can I convert it to a frame object? thanks!
attached my code snippet
def H264_frame_cb(h264_frame):
pt = h264_frame.as_ctypes_pointer()[0]
size = h264_frame.as_ctypes_pointer()[1]
new_pt = ctypes.cast(pt, ctypes.POINTER(ctypes.c_byte * size))
frame = new_pt.contents()
The frame is only able to get the byte array, can I make it to frame object instead.
This topic was automatically closed after 30 days. New replies are no longer allowed.