~vanvugt/ubuntu/oneiric/mediatomb/fix-770964-784431

« back to all changes in this revision

Viewing changes to src/mpegdemux/buffer.h

  • Committer: Bazaar Package Importer
  • Author(s): Andres Mejia
  • Date: 2009-04-22 21:39:19 UTC
  • mto: (4.2.1 sid)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20090422213919-52m015y6gcpv1m1g
Tags: upstream-0.12.0~svn2018
ImportĀ upstreamĀ versionĀ 0.12.0~svn2018

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************
 
2
 * mpegdemux                                                                 *
 
3
 *****************************************************************************/
 
4
 
 
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
 *****************************************************************************/
 
11
 
 
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.                                          *
 
16
 *                                                                           *
 
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
 *****************************************************************************/
 
22
 
 
23
/* $Id: buffer.h 67 2004-01-02 18:20:15Z hampa $ */
 
24
 
 
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
 
27
// stripped out.
 
28
 
 
29
#ifndef MPEGDEMUX_BUFFER_H
 
30
#define MPEGDEMUX_BUFFER_H 1
 
31
 
 
32
 
 
33
#include "mpeg_parse.h"
 
34
 
 
35
 
 
36
typedef struct {
 
37
  unsigned char *buf;
 
38
  unsigned      cnt;
 
39
  unsigned      max;
 
40
} mpeg_buffer_t;
 
41
 
 
42
 
 
43
 
 
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);
 
52
 
 
53
 
 
54
#endif