<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Hello,</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I'm trying to use Python to create a Gst.Buffer filled with some data, and push it to a Gstreamer pipeline via appsrc. I'm using GStreamer 1.0.7 under Debian (amd64, package name is gir1.2-gstreamer-1.0_1.0.7-1_amd64.deb), python 2.7.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">My implementation is available here: <a href="https://gist.github.com/alumae/5627250#file-test_buffer-py" target="_blank">https://gist.github.com/alumae/5627250#file-test_buffer-py</a></div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">The problem is that the data that is pushed to the Gstreamer pipeline and that is finally dumped by the filesink, is not exactly what I'm trying to push. Namely, the actual data seems to be prepended by 36 bytes of "garbage". </div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">More, exactly, I'm trying to push the string:</div><div style="font-family:arial,sans-serif;font-size:13px">
123412341234123412341234123412341234123412341234<br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">What is actually pushed:</div><div style="font-family:arial,sans-serif;font-size:13px">
<36 bytes of garbage>123412341234<br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><div>It seems that the fill method is actually using the reference to the python object, not the actual array, and the 36 bytes is just the Python object header.</div>
<div><br></div></div><div style="font-family:arial,sans-serif;font-size:13px">Is there some other way (perhaps via MapInfo?) to set the Gst.Buffer data in Python? </div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">Thanks in advance.</div></div>