1 /*****************************************************************************
2 * vlc_picture_fifo.h: picture fifo definitions
3 *****************************************************************************
4 * Copyright (C) 2009 VLC authors and VideoLAN
6 * Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
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.
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.
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 *****************************************************************************/
23 #ifndef VLC_PICTURE_FIFO_H
24 #define VLC_PICTURE_FIFO_H 1
28 * This file defines picture fifo structures and functions in vlc
31 #include <vlc_picture.h>
36 * It is thread safe (push/pop).
38 typedef struct picture_fifo_t picture_fifo_t
;
41 * It creates an empty picture_fifo_t.
43 VLC_API picture_fifo_t
* picture_fifo_New( void ) VLC_USED
;
46 * It destroys a fifo created by picture_fifo_New.
48 * All pictures inside the fifo will be released by picture_Release.
50 VLC_API
void picture_fifo_Delete( picture_fifo_t
* );
53 * It retreives a picture_t from the fifo.
55 * If the fifo is empty, it return NULL without waiting.
57 VLC_API picture_t
* picture_fifo_Pop( picture_fifo_t
* ) VLC_USED
;
60 * It returns whether the fifo is empty or not.
62 VLC_API
bool picture_fifo_IsEmpty( picture_fifo_t
* );
65 * It saves a picture_t into the fifo.
67 VLC_API
void picture_fifo_Push( picture_fifo_t
*, picture_t
* );
70 * It release all picture inside the fifo that have a lower or equal date
71 * if flush_before or higher or equal to if not flush_before than the given one.
72 * Passing VLC_TICK_INVALID on the date releases all the pictures.
74 * All pictures inside the fifo will be released by picture_Release.
76 VLC_API
void picture_fifo_Flush( picture_fifo_t
*, vlc_tick_t date
, bool flush_before
);
78 #endif /* VLC_PICTURE_FIFO_H */