我想将“Open_Buffer_Continue”函数添加到 MediaInfoDLL.py ctypes 包装器中,绑定在这里,MediaInfoDLL.cs C# 绑定已经实现了这个函数,所以它是可能的。
我如何通过以下内容:
file = open('./file.avi', 'rb')
到 mediainfo cpp Open_Buffer_Continue期望:
( const ZenLib::int8u * Buffer,
size_t Buffer_Size
)
?
这是我到目前为止所拥有的:
MediaInfo_Open_Buffer_Init = MediaInfoDLL_Handler.MediaInfo_Open_Buffer_Init
MediaInfo_Open_Buffer_Init.argtype = [c_size_t, c_size_t]
MediaInfo_Open_Buffer_Init.restype = None
MediaInfo_Open_Buffer_Continue = MediaInfoDLL_Handler.MediaInfo_Open_Buffer_Continue
MediaInfo_Open_Buffer_Continue.argtype = [c_size_t, c_size_t] # NOT SURE HERE var 1
MediaInfo_Open_Buffer_Continue.restype = c_size_t
MediaInfo_Open_Buffer_Finalize = MediaInfoDLL_Handler.MediaInfo_Open_Buffer_Finalize
MediaInfo_Open_Buffer_Finalize.argtype = [c_void_p]
MediaInfo_Open_Buffer_Finalize.restype = None