VLC 4.0.0-dev
Loading...
Searching...
No Matches
vlc_picture_fifo.h
Go to the documentation of this file.
1/*****************************************************************************
2 * vlc_picture_fifo.h: picture fifo definitions
3 *****************************************************************************
4 * Copyright (C) 2009 VLC authors and VideoLAN
5 *
6 * Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation; either version 2.1 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
22
23#ifndef VLC_PICTURE_FIFO_H
24#define VLC_PICTURE_FIFO_H 1
25
26/**
27 * \file
28 * This file defines picture fifo structures and functions in vlc
29 */
30
31#include <vlc_picture.h>
32
33/**
34 * Picture fifo handle
35 *
36 * It is thread safe (push/pop).
37 */
38typedef struct picture_fifo_t picture_fifo_t;
40/**
41 * It creates an empty picture_fifo_t.
42 */
44
45/**
46 * It destroys a fifo created by picture_fifo_New.
47 *
48 * All pictures inside the fifo will be released by picture_Release.
49 */
51
52/**
53 * Lock the picture_fifo
54 *
55 * All picture_fifo_t functions, except picture_fifo_Delete(), need to be
56 * called with the lock held.
57 */
59
60/**
61 * Unlock the picture_fifo
62 */
64
65/**
66 * It retrieves a picture_t from the fifo.
67 *
68 * If the fifo is empty, it return NULL without waiting.
69 */
71
72/**
73 * It returns whether the fifo is empty or not.
74 */
76
77/**
78 * It returns the number of pictures queued
79 */
81
82/**
83 * It saves a picture_t into the fifo.
84 */
86
87/**
88 * It release all picture inside the fifo that have a lower or equal date
89 * if flush_before or higher or equal to if not flush_before than the given one.
90 * Passing VLC_TICK_INVALID on the date releases all the pictures.
91 *
92 * All pictures inside the fifo will be released by picture_Release.
93 */
94VLC_API void picture_fifo_Flush( picture_fifo_t *, vlc_tick_t date, bool flush_before );
95
96#endif /* VLC_PICTURE_FIFO_H */
97
#define VLC_USED
Definition fourcc_gen.c:32
#define VLC_API
Definition fourcc_gen.c:31
Definition picture_fifo.c:40
Video picture.
Definition vlc_picture.h:128
This file is a collection of common definitions and types.
This file defines picture structures and functions in vlc.
void picture_fifo_Unlock(picture_fifo_t *)
Unlock the picture_fifo.
Definition picture_fifo.c:135
bool picture_fifo_IsEmpty(picture_fifo_t *)
It returns whether the fifo is empty or not.
Definition picture_fifo.c:82
picture_fifo_t * picture_fifo_New(void)
It creates an empty picture_fifo_t.
Definition picture_fifo.c:58
void picture_fifo_Delete(picture_fifo_t *)
It destroys a fifo created by picture_fifo_New.
Definition picture_fifo.c:122
size_t picture_fifo_GetCount(picture_fifo_t *)
It returns the number of pictures queued.
Definition picture_fifo.c:87
picture_t * picture_fifo_Pop(picture_fifo_t *)
It retrieves a picture_t from the fifo.
Definition picture_fifo.c:74
void picture_fifo_Flush(picture_fifo_t *, vlc_tick_t date, bool flush_before)
It release all picture inside the fifo that have a lower or equal date if flush_before or higher or e...
Definition picture_fifo.c:92
void picture_fifo_Lock(picture_fifo_t *)
Lock the picture_fifo.
Definition picture_fifo.c:130
void picture_fifo_Push(picture_fifo_t *, picture_t *)
It saves a picture_t into the fifo.
Definition picture_fifo.c:69
int64_t vlc_tick_t
High precision date or time interval.
Definition vlc_tick.h:48