xine-lib 1.2.13-20230125hg15249
lrb.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2001-2009 the xine project
3 *
4 * This file is part of xine, a free video player.
5 *
6 * xine is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * xine 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 General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19 *
20 * lrb : limited ring buffer
21 * used for temporal buffer, limited to n elements
22 */
23
24#ifndef HAVE_LRB_H
25#define HAVE_LRB_H
26
27#include <xine/buffer.h>
28
29typedef struct {
30
33
36
37} lrb_t;
38
39
40lrb_t *lrb_new (int max_num_entries,
41 fifo_buffer_t *fifo) ;
42
43void lrb_drop (lrb_t *this) ;
44
45void lrb_add (lrb_t *this, buf_element_t *buf) ;
46
47void lrb_feedback (lrb_t *this, fifo_buffer_t *fifo) ;
48
49void lrb_flush (lrb_t *this) ;
50
51#endif
void lrb_drop(lrb_t *this)
Definition lrb.c:44
void lrb_add(lrb_t *this, buf_element_t *buf)
Definition lrb.c:58
void lrb_feedback(lrb_t *this, fifo_buffer_t *fifo)
Definition lrb.c:83
void lrb_flush(lrb_t *this)
Definition lrb.c:116
lrb_t * lrb_new(int max_num_entries, fifo_buffer_t *fifo)
Definition lrb.c:28
Definition buffer.h:338
Definition buffer.h:593
Definition lrb.h:29
int cur_num_entries
Definition lrb.h:32
int max_num_entries
Definition lrb.h:31
fifo_buffer_t * fifo
Definition lrb.h:35
buf_element_t * newest
Definition lrb.h:34