vlc_picture_fifo.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * vlc_picture_fifo.h: picture fifo definitions
00003  *****************************************************************************
00004  * Copyright (C) 2009 VLC authors and VideoLAN
00005  * $Id: 73d1b20c279f628cf94bc7cfc83b2548878bcc07 $
00006  *
00007  * Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
00008  *
00009  * This program is free software; you can redistribute it and/or modify it
00010  * under the terms of the GNU Lesser General Public License as published by
00011  * the Free Software Foundation; either version 2.1 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00017  * GNU Lesser General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU Lesser General Public License
00020  * along with this program; if not, write to the Free Software Foundation,
00021  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00022  *****************************************************************************/
00023 
00024 #ifndef VLC_PICTURE_FIFO_H
00025 #define VLC_PICTURE_FIFO_H 1
00026 
00027 /**
00028  * \file
00029  * This file defines picture fifo structures and functions in vlc
00030  */
00031 
00032 #include <vlc_picture.h>
00033 
00034 /**
00035  * Picture fifo handle
00036  *
00037  * It is thread safe (push/pop).
00038  */
00039 typedef struct picture_fifo_t picture_fifo_t;
00040 
00041 /**
00042  * It creates an empty picture_fifo_t.
00043  */
00044 VLC_API picture_fifo_t * picture_fifo_New( void ) VLC_USED;
00045 
00046 /**
00047  * It destroys a fifo created by picture_fifo_New.
00048  *
00049  * All pictures inside the fifo will be released by picture_Release.
00050  */
00051 VLC_API void picture_fifo_Delete( picture_fifo_t * );
00052 
00053 /**
00054  * It retreives a picture_t from the fifo.
00055  *
00056  * If the fifo is empty, it return NULL without waiting.
00057  */
00058 VLC_API picture_t * picture_fifo_Pop( picture_fifo_t * ) VLC_USED;
00059 
00060 /**
00061  * It returns the first picture_t pointer from the fifo but does not
00062  * remove it. The picture returned has been hold for you so you
00063  * must call picture_Release on it.
00064  *
00065  * If the fifo is empty, it return NULL without waiting.
00066  */
00067 VLC_API picture_t * picture_fifo_Peek( picture_fifo_t * ) VLC_USED;
00068 
00069 /**
00070  * It saves a picture_t into the fifo.
00071  */
00072 VLC_API void picture_fifo_Push( picture_fifo_t *, picture_t * );
00073 
00074 /**
00075  * It release all picture inside the fifo that have a lower or equal date
00076  * if flush_before or higher or equal to if not flush_before than the given one.
00077  *
00078  * All pictures inside the fifo will be released by picture_Release.
00079  */
00080 VLC_API void picture_fifo_Flush( picture_fifo_t *, mtime_t date, bool flush_before );
00081 
00082 /**
00083  * It applies a delta on all the picture timestamp.
00084  */
00085 VLC_API void picture_fifo_OffsetDate( picture_fifo_t *, mtime_t delta );
00086 
00087 
00088 #endif /* VLC_PICTURE_FIFO_H */
00089 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines