2 * Copyright 2004-2005 Timo Hirvonen
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
29 /* system error (error code in errno) */
31 /* file type not supported */
32 IP_ERROR_UNRECOGNIZED_FILE_TYPE
,
33 /* function not supported (usually seek) */
34 IP_ERROR_FUNCTION_NOT_SUPPORTED
,
35 /* input plugin detected corrupted file */
39 /* sample format not supported */
40 IP_ERROR_SAMPLE_FORMAT
,
41 /* error parsing response line / headers */
42 IP_ERROR_HTTP_RESPONSE
,
49 struct input_plugin_data
{
50 /* filled by ip-layer */
54 unsigned int remote
: 1;
55 unsigned int metadata_changed
: 1;
62 /* filled by plugin */
67 struct input_plugin_ops
{
68 int (*open
)(struct input_plugin_data
*ip_data
);
69 int (*close
)(struct input_plugin_data
*ip_data
);
70 int (*read
)(struct input_plugin_data
*ip_data
, char *buffer
, int count
);
71 int (*seek
)(struct input_plugin_data
*ip_data
, double offset
);
72 int (*read_comments
)(struct input_plugin_data
*ip_data
,
73 struct keyval
**comments
);
74 int (*duration
)(struct input_plugin_data
*ip_data
);