GstBuffer metadata across shmsink/shmsrc

Crane, Matthew matthew.crane at carrier.com
Thu Mar 11 16:09:53 UTC 2021


Hi,

I'm currently working on a project where we are passing data between GStreamer pipelines in separate processes using shmsink/shmsrc.  Our current pipelines looks something like the following:

Process 1 pipeline:
rtspsrc ! rtph264depay ! h264parse ! custom_ts_element ! gdppay ! shmsink

Process 2 pipeline:
shmsrc ! gdpdepay ! appsink

The custom_ts_element attaches a reference timestamp metadata item to the buffers that pass through (based on UTC time). We need to be able to get the reference timestamp for the buffers in Process 2.  In preliminary testing we have discovered that our buffer metadata is not making it across the shm interface to the pipeline in Process 2. Here is the buffer logging output of a test run with shmsrc ! gdpdepay ! fakesink that shows "meta: none":

/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = chain   ******* (fakesink0:sink) (16756 bytes, dts: 0:01:10.277195667, pts: 0:01:07.872940835, duration: 0:00:00.100000000, offset: 11793417, offset_end: -1, flags: 00002000 delta-unit , meta: none) 0x5648824925a0

I examined some of the shmsink code and saw a spot where the element iterates through the GstMeta objects attached to the buffer and copies them in preparation for copying the buffer to shared memory and expected the metadata to be available in the buffers from shmsrc.  I also ran a test where I removed the gdppay / gdpdepay elements to see if that serialization was removing the metadata, but that didn't change anything.

Is this a bug in shmsink/shmsrc? Or is it functioning as designed?

-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210311/f6162887/attachment-0001.htm>


More information about the gstreamer-devel mailing list