Debian Codegraph @

mpglib/mpglib.h

raw
1 /*
2 * Copyright (C) 1999-2010 The L.A.M.E. project
3 *
4 * Initially written by Michael Hipp, see also AUTHORS and README.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library 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 GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21 #ifndef _MPGLIB_H_
22 #define _MPGLIB_H_
23
24 #ifdef HAVE_CONFIG_H
25 # include <config.h>
26 #endif
27
28 #include "lame.h"
29
30 #ifdef HAVE_MPG123
31 #include <mpg123.h>
32 #ifndef MPG123_API_VERSION
33 #error "Seems like you got the wrong mpg123 header. No MPG123_API_VERSION defined."
34 #endif
35 #if (MPG123_API_VERSION < 45)
36 #error "Need mpg123 API >= 45."
37 #endif
38 #endif
39
40 #ifndef plotting_data_defined
41 #define plotting_data_defined
42 struct plotting_data;
43 typedef struct plotting_data plotting_data;
44 #endif
45
46
47 extern void lame_report_fnc(lame_report_function f, const char *format, ...);
48
49 #ifdef HAVE_MPGLIB
50 struct buf {
51 unsigned char *pnt;
52 long size;
53 long pos;
54 struct buf *next;
55 struct buf *prev;
56 };
57
58 struct framebuf {
59 struct buf *buf;
60 long pos;
61 struct frame *next;
62 struct frame *prev;
63 };
64
65 #endif
66
67 typedef struct mpstr_tag {
68 #ifdef HAVE_MPG123
69 mpg123_handle *mh;
70 struct mpg123_moreinfo mi;
71 #endif
72 plotting_data *pinfo;
73
74 lame_report_function report_msg;
75 lame_report_function report_dbg;
76 lame_report_function report_err;
77 } MPSTR, *PMPSTR;
78
79 #ifdef HAVE_MPGLIB
80 #define MP3_ERR -1
81 #define MP3_OK 0
82 #define MP3_NEED_MORE 1
83 #endif
84
85
86 #endif /* _MPGLIB_H_ */