1
/*****************************************************************************
3
*****************************************************************************/
5
/*****************************************************************************
6
* File name: buffer.h *
7
* Created: 2003-04-08 by Hampa Hug <hampa@hampa.ch> *
8
* Last modified: 2003-04-08 by Hampa Hug <hampa@hampa.ch> *
9
* Copyright: (C) 2003 by Hampa Hug <hampa@hampa.ch> *
10
*****************************************************************************/
12
/*****************************************************************************
13
* This program is free software. You can redistribute it and / or modify it *
14
* under the terms of the GNU General Public License version 2 as published *
15
* by the Free Software Foundation. *
17
* This program is distributed in the hope that it will be useful, but *
18
* WITHOUT ANY WARRANTY, without even the implied warranty of *
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
20
* Public License for more details. *
21
*****************************************************************************/
23
/* $Id: buffer.h 67 2004-01-02 18:20:15Z hampa $ */
25
// The code has been modified to use file descriptors instead of FILE streams.
26
// Only functionality needed in MediaTomb remains, all extra features are
29
#ifndef MPEGDEMUX_BUFFER_H
30
#define MPEGDEMUX_BUFFER_H 1
33
#include "mpeg_parse.h"
44
void mpeg_buf_init (mpeg_buffer_t *buf);
45
void mpeg_buf_free (mpeg_buffer_t *buf);
46
void mpeg_buf_clear (mpeg_buffer_t *buf);
47
int mpeg_buf_set_max (mpeg_buffer_t *buf, unsigned max);
48
int mpeg_buf_set_cnt (mpeg_buffer_t *buf, unsigned cnt);
49
int mpeg_buf_read (mpeg_buffer_t *buf, mpeg_demux_t *mpeg, unsigned cnt);
50
int mpeg_buf_write (mpeg_buffer_t *buf, int fd);
51
int mpeg_buf_write_clear (mpeg_buffer_t *buf, int fd);