gst-python: How to register metadata using python bindings i.e. Gst.meta_register()
Gst.meta_register() requires 6 arguments where last 3 arguments are Gst.MetaInitFunction, Gst.MetaFreeFunction and Gst.MetaTransformFunction respectively. I am not able to pass those 3 arguments in python. It throws ValueError: GType Invalid. I have tried to send it as:
- Regular python function: Throws ValueError
- Using ctypes functype wrapper on regular python function: Unable to implement because Gst.Buffer do not have ctypes structure.
- Wrapping them in Gst.MetaInitFunction and alike: Throws NotImplementedError
I want to register my custom metadata with python so that I can take advantage of python dynamic data types. My meta changes on run time and hence I want to register my metadata every time it encounters a new metadata format. This is not possible to write in C as I cannot define this dynamic ctype Structures in C. I must call Gst.meta_register() from python to achieve this.
Any help would be appreciated.
Thanks, Himanshu Mittal