Changing buffer PTS/DTS in Python

Marianna Smidth Buschle msb at qtec.com
Tue Oct 5 07:43:46 UTC 2021


Hi,

I need to manipulate some buffer timestamps in python.

But the Gst.Buffer.make_writable() function does not exist: 
https://gitlab.freedesktop.org/gstreamer/gst-python/-/issues/18

So I don't suppose it is safe to do: "buf.pts = Gst.CLOCK_TIME_NONE"?


Are there any workarounds?


I have been trying to cook a solution using ctypes.

But I can't seem to make the C pointer to GstBuffer* I receive back into 
a python Gst.Buffer.

It seems like Gst.Buffer is not compatible with ctypes: 
https://gitlab.freedesktop.org/gstreamer/gst-python/-/issues/46


So I started trying to duplicate the GstBuffer* in python as a ctypes 
compatible class/struct.

But then I also need to implement the GstMiniObject the same way, and 
I'm afraid I will find even more dependencies in the mini object.


-- 
Best regards / Med venlig hilsen
“Marianna Smidth Buschle”



More information about the gstreamer-devel mailing list