Correspondence between appsrc input and appsink output buffers

Sebastian Dröge sebastian at centricular.com
Mon Nov 7 09:36:22 UTC 2016


On Sun, 2016-11-06 at 02:35 +0100, benjamin.hepp at posteo.de wrote:
> Hi everyone,
> 
> I'm new to gstreamer (it's great!) so I very much appreciate any help.
> 
> I basically have the following setup:
> Custom video-source -> appsrc -> encoding -> appsink -> send over 
> network together with other information that corresponds to each frame 
> (e.g. GPS).
> On the server I receive buffer and associated information -> appsrc -> 
> decoding -> appsink.
> 
> Now in both cases I push a buffer into an appsrc that has some 
> associated information. Is there any way to link this information again 
> to a buffer coming out of the appsink?
> 
> I now that theoretically there is no guarantee that one buffer out of 
> the appsink is one frame, but in my case it is. So on the client side I 
> can just assume that no frame is ever dropped (assuming I never hit any 
> buffer limit).
> However, on the receiving side the decoder sometimes needs to drop some 
> frame until it can start decoding and I don't know how many it drops. So 
> I'm in the situation that I cannot link the information to the buffers 
> coming out of the appsink.
> Unfortunately I can't use the buffer offset or PTS information because 
> this is just reset by the encoder/decoder.
> 
> Is there any other way to establish these correspondences?

You could mark buffers with a GstMeta (make sure to use new enough
GStreamer, and a GstMeta that has no tags) or use serialized events
between each buffer as markers (not very efficient).

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161107/2bc23867/attachment.sig>


More information about the gstreamer-devel mailing list