• Tim-Philipp Müller's avatar
    buffer: store sequence number for metas · f62ee975
    Tim-Philipp Müller authored
    For metas where order might be significant if multiple metas are
    attached to the same buffer, so store a sequence number with the
    meta when adding it to the buffer. This allows users of the meta
    to make sure metas are processed in the right order.
    
    We need a 64-bit integer for the sequence number here in the API,
    a 32-bit one might overflow too easily with high packet/buffer
    rates. We could do it rtp-seqnum style of course, but that's a
    bit of a pain.
    
    We could also make it so that gst_buffer_add_meta() just keeps metas in
    order or rely on the order we add the metas in, but that seems too
    fragile overall, when buffers (incl. metas) get merged or split.
    
    Also add a compare function for easier sorting.
    
    We store the seqnum in the MetaItem struct here and not in the
    GstMeta struct since there's no padding in the GstMeta struct.
    We could add a private struct to GstMeta before the start of
    GstMeta, but that's what MetaItem effectively is implementation-
    wise. We can still change this later if we want, since it's all
    private.
    
    Fixes #262
    f62ee975
Name
Last commit
Last update
common @ 59cb6781 Loading commit data...
data Loading commit data...
docs Loading commit data...
gst Loading commit data...
hooks Loading commit data...
libs Loading commit data...
m4 Loading commit data...
pkgconfig Loading commit data...
plugins Loading commit data...
po Loading commit data...
scripts Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.gitmodules Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
MAINTAINERS Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
README.static-linking Loading commit data...
RELEASE Loading commit data...
TODO Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
gst-element-check-1.0.m4 Loading commit data...
gstreamer.doap Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...
stamp.h.in Loading commit data...