Mercurial > audlegacy-plugins
annotate src/filewriter/filewriter.h @ 2874:11ef2164d90b
re-written format conversion using libSAD;
please test this on Big Endian system
author | Andrew O. Shadoura <bugzilla@tut.by> |
---|---|
date | Thu, 07 Aug 2008 04:16:17 +0300 |
parents | 31d6c44ffef2 |
children | dcd8d93ba781 |
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 | |
1441
1b52e7eacd4c
filewriter: new tuple API
William Pitcock <nenolod@atheme-project.org>
parents:
1011
diff
changeset
|
32 #include <audacious/main.h> |
984 | 33 #include <audacious/plugin.h> |
1011
4a693f5b7054
[svn] - replace xmms_remote_*() with playlist functions.
yaz
parents:
984
diff
changeset
|
34 #include <audacious/playlist.h> |
984 | 35 #include <audacious/configdb.h> |
36 #include <audacious/i18n.h> | |
37 #include <audacious/util.h> | |
38 #include <audacious/vfs.h> | |
39 | |
2874
11ef2164d90b
re-written format conversion using libSAD;
Andrew O. Shadoura <bugzilla@tut.by>
parents:
2873
diff
changeset
|
40 #include <libSAD/libSAD.h> |
11ef2164d90b
re-written format conversion using libSAD;
Andrew O. Shadoura <bugzilla@tut.by>
parents:
2873
diff
changeset
|
41 |
984 | 42 struct format_info { |
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 written; | |
52 extern guint64 offset; | |
1441
1b52e7eacd4c
filewriter: new tuple API
William Pitcock <nenolod@atheme-project.org>
parents:
1011
diff
changeset
|
53 extern Tuple *tuple; |
984 | 54 |
55 typedef struct _FileWriter FileWriter; | |
56 | |
2766
6d08e3120615
make some file filewriter backends use callbacks instead of calling VFS directly
Andrew O. Shadoura <bugzilla@tut.by>
parents:
1569
diff
changeset
|
57 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
|
58 |
984 | 59 struct _FileWriter |
60 { | |
2766
6d08e3120615
make some file filewriter backends use callbacks instead of calling VFS directly
Andrew O. Shadoura <bugzilla@tut.by>
parents:
1569
diff
changeset
|
61 void (*init)(write_output_callback write_output_func); |
984 | 62 void (*configure)(void); |
63 gint (*open)(void); | |
64 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
|
65 void (*flush)(void); |
984 | 66 void (*close)(void); |
67 gint (*free)(void); | |
68 gint (*playing)(void); | |
69 gint (*get_written_time)(void); | |
2873
31d6c44ffef2
most of encoder backends require GINT16_NE;
Andrew O. Shadoura <bugzilla@tut.by>
parents:
2835
diff
changeset
|
70 AFormat format_required; |
984 | 71 }; |
72 | |
73 #endif |