Mercurial > audlegacy-plugins
annotate src/filewriter/filewriter.h @ 3047:4434b4c4a715
ported EsounD plugin
author | Andrew O. Shadoura <bugzilla@tut.by> |
---|---|
date | Fri, 17 Apr 2009 16:17:10 +0300 |
parents | 3134a0987162 |
children |
rev | line source |
---|---|
984 | 1 /* FileWriter-Plugin |
2 * (C) copyright 2007 merging of Disk Writer and Out-Lame by Michael Färber | |
3 * | |
4 * Original Out-Lame-Plugin: | |
5 * (C) copyright 2002 Lars Siebold <khandha5@gmx.net> | |
6 * (C) copyright 2006-2007 porting to audacious by Yoshiki Yazawa <yaz@cc.rim.or.jp> | |
7 * | |
8 * This program is free software; you can redistribute it and/or modify | |
9 * it under the terms of the GNU General Public License as published by | |
10 * the Free Software Foundation; either version 2 of the License, or | |
11 * (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, | |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 * GNU General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License | |
19 * along with this program; if not, write to the Free Software | |
2835 | 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
984 | 21 */ |
22 | |
23 #ifndef FILEWRITER_H | |
24 #define FILEWRITER_H | |
25 | |
26 #include "config.h" | |
27 | |
28 #include <gtk/gtk.h> | |
29 #include <stdio.h> | |
30 #include <string.h> | |
31 | |
2971
3134a0987162
- changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2950
diff
changeset
|
32 #include <audlegacy/main.h> |
3134a0987162
- changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2950
diff
changeset
|
33 #include <audlegacy/plugin.h> |
3134a0987162
- changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2950
diff
changeset
|
34 #include <audlegacy/playlist.h> |
3134a0987162
- changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2950
diff
changeset
|
35 #include <audlegacy/configdb.h> |
3134a0987162
- changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2950
diff
changeset
|
36 #include <audlegacy/i18n.h> |
3134a0987162
- changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2950
diff
changeset
|
37 #include <audlegacy/util.h> |
3134a0987162
- changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2950
diff
changeset
|
38 #include <audlegacy/vfs.h> |
984 | 39 |
2971
3134a0987162
- changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2950
diff
changeset
|
40 #include <audlegacy/libSAD.h> |
2874
11ef2164d90b
re-written format conversion using libSAD;
Andrew O. Shadoura <bugzilla@tut.by>
parents:
2873
diff
changeset
|
41 |
2950
dcd8d93ba781
- mp3: adapted to lame-3.98. now filewriter writes valid TLEN.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2874
diff
changeset
|
42 struct format_info { |
984 | 43 AFormat format; |
44 int frequency; | |
45 int channels; | |
1569
25ea2127eefa
filewriter: fix symbol collisions
William Pitcock <nenolod@atheme.org>
parents:
1441
diff
changeset
|
46 }; |
25ea2127eefa
filewriter: fix symbol collisions
William Pitcock <nenolod@atheme.org>
parents:
1441
diff
changeset
|
47 |
25ea2127eefa
filewriter: fix symbol collisions
William Pitcock <nenolod@atheme.org>
parents:
1441
diff
changeset
|
48 extern struct format_info input; |
984 | 49 |
50 extern VFSFile *output_file; | |
51 extern guint64 offset; | |
1441
1b52e7eacd4c
filewriter: new tuple API
William Pitcock <nenolod@atheme-project.org>
parents:
1011
diff
changeset
|
52 extern Tuple *tuple; |
984 | 53 |
2766
6d08e3120615
make some file filewriter backends use callbacks instead of calling VFS directly
Andrew O. Shadoura <bugzilla@tut.by>
parents:
1569
diff
changeset
|
54 typedef gint (*write_output_callback)(void *ptr, gint length); |
6d08e3120615
make some file filewriter backends use callbacks instead of calling VFS directly
Andrew O. Shadoura <bugzilla@tut.by>
parents:
1569
diff
changeset
|
55 |
2950
dcd8d93ba781
- mp3: adapted to lame-3.98. now filewriter writes valid TLEN.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2874
diff
changeset
|
56 typedef struct _FileWriter |
984 | 57 { |
2766
6d08e3120615
make some file filewriter backends use callbacks instead of calling VFS directly
Andrew O. Shadoura <bugzilla@tut.by>
parents:
1569
diff
changeset
|
58 void (*init)(write_output_callback write_output_func); |
984 | 59 void (*configure)(void); |
60 gint (*open)(void); | |
61 void (*write)(void *ptr, gint length); | |
2774
f1f7ee810de8
add metadata to stream + flush() should do a real flush at least with mp3
Andrew O. Shadoura <bugzilla@tut.by>
parents:
2766
diff
changeset
|
62 void (*flush)(void); |
984 | 63 void (*close)(void); |
64 gint (*free)(void); | |
65 gint (*playing)(void); | |
66 gint (*get_written_time)(void); | |
2873
31d6c44ffef2
most of encoder backends require GINT16_NE;
Andrew O. Shadoura <bugzilla@tut.by>
parents:
2835
diff
changeset
|
67 AFormat format_required; |
2950
dcd8d93ba781
- mp3: adapted to lame-3.98. now filewriter writes valid TLEN.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2874
diff
changeset
|
68 } FileWriter; |
984 | 69 |
70 #endif |