VLC 4.0.0-dev
Loading...
Searching...
No Matches
ancillary.h
Go to the documentation of this file.
1/*****************************************************************************
2 * ancillary.h: helpers to manage ancillaries from a frame or a picture
3 *****************************************************************************
4 * Copyright (C) 2021 VLC authors and VideoLAN
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19 *****************************************************************************/
20
21#ifndef VLC_ANCILLARY_INTERNAL_H
22#define VLC_ANCILLARY_INTERNAL_H 1
23
24#include <vlc_ancillary.h>
25
26/*
27 * A NULL terminated array of struct vlc_ancillary *. We don't use a
28 * vlc_vector here in orer to gain few bytes (2 * size_t) for each
29 * ancillary users (each vlc_frame_t/picture_t). Users will likely have one
30 * or zero ancillary so the optimisations of the vlc_vector are not
31 * important here.
32 */
33
34static inline void
36{
37 *array = NULL;
38}
39
40void
42
43int
44vlc_ancillary_array_Dup(struct vlc_ancillary ***dst_array,
45 struct vlc_ancillary ** const*src_array);
46
47int
49 struct vlc_ancillary *ancillary);
50
51struct vlc_ancillary *
52vlc_ancillary_array_Get(struct vlc_ancillary ** const*array,
54
55#endif /* VLC_ANCILLARY_INTERNAL_H */
int vlc_ancillary_array_Dup(struct vlc_ancillary ***dst_array, struct vlc_ancillary **const *src_array)
Definition ancillary.c:111
int vlc_ancillary_array_Insert(struct vlc_ancillary ***array, struct vlc_ancillary *ancillary)
Definition ancillary.c:140
static void vlc_ancillary_array_Init(struct vlc_ancillary ***array)
Definition ancillary.h:35
struct vlc_ancillary * vlc_ancillary_array_Get(struct vlc_ancillary **const *array, vlc_ancillary_id id)
Definition ancillary.c:187
void vlc_ancillary_array_Clear(struct vlc_ancillary ***array)
Definition ancillary.c:82
uint32_t vlc_ancillary_id
ID of an ancillary.
Definition vlc_ancillary.h:68
Definition ancillary.c:31
Ancillary definition and functions.