From bf6b1747ae4bad46dbbf5fa2189a18b45c1d6b38 Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Mon, 13 Oct 2003 11:47:11 +0000 Subject: Add vcdx plugin(CVS) and dependent libs(no CVS, broken API). Ability to use external libs (--with-external-vcdnav), disable vcdx build and build old vcd instead (--disable-vcdx). This last feature is useful since vcdx take /hours/ to start playback, that can help people who don't want vcd navigation. Remove all .la files, even in subdirs (eg: post) CVS patchset: 5505 CVS date: 2003/10/13 11:47:11 --- src/input/vcd/libvcd/stream.h | 123 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 src/input/vcd/libvcd/stream.h (limited to 'src/input/vcd/libvcd/stream.h') diff --git a/src/input/vcd/libvcd/stream.h b/src/input/vcd/libvcd/stream.h new file mode 100644 index 000000000..dcee55ac4 --- /dev/null +++ b/src/input/vcd/libvcd/stream.h @@ -0,0 +1,123 @@ +/* + $Id: stream.h,v 1.1 2003/10/13 11:47:12 f1rmb Exp $ + + Copyright (C) 2000 Herbert Valerio Riedel + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + + +#ifndef __VCD_STREAM_H__ +#define __VCD_STREAM_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* typedef'ed IO functions prototypes */ + +typedef int(*vcd_data_open_t)(void *user_data); + +typedef long(*vcd_data_read_t)(void *user_data, void *buf, long count); + +typedef long(*vcd_data_write_t)(void *user_data, const void *buf, + long count); + +typedef long(*vcd_data_seek_t)(void *user_data, long offset); + +typedef long(*vcd_data_stat_t)(void *user_data); + +typedef int(*vcd_data_close_t)(void *user_data); + +typedef void(*vcd_data_free_t)(void *user_data); + + +/* abstract data sink */ + +typedef struct _VcdDataSink VcdDataSink; + +typedef struct { + vcd_data_open_t open; + vcd_data_seek_t seek; + vcd_data_write_t write; + vcd_data_close_t close; + vcd_data_free_t free; +} vcd_data_sink_io_functions; + +VcdDataSink* +vcd_data_sink_new(void *user_data, const vcd_data_sink_io_functions *funcs); + +long +vcd_data_sink_write(VcdDataSink* obj, const void *ptr, long size, long nmemb); + +long +vcd_data_sink_printf (VcdDataSink *obj, const char format[], ...) GNUC_PRINTF(2, 3); + +long +vcd_data_sink_seek(VcdDataSink* obj, long offset); + +void +vcd_data_sink_destroy(VcdDataSink* obj); + +void +vcd_data_sink_close(VcdDataSink* obj); + +/* abstract data source */ + +typedef struct _VcdDataSource VcdDataSource; + +typedef struct { + vcd_data_open_t open; + vcd_data_seek_t seek; + vcd_data_stat_t stat; + vcd_data_read_t read; + vcd_data_close_t close; + vcd_data_free_t free; +} vcd_data_source_io_functions; + +VcdDataSource* +vcd_data_source_new(void *user_data, const vcd_data_source_io_functions *funcs); + +long +vcd_data_source_read(VcdDataSource* obj, void *ptr, long size, long nmemb); + +long +vcd_data_source_seek(VcdDataSource* obj, long offset); + +long +vcd_data_source_stat(VcdDataSource* obj); + +void +vcd_data_source_destroy(VcdDataSource* obj); + +void +vcd_data_source_close(VcdDataSource* obj); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __VCD_STREAM_H__ */ + + +/* + * Local variables: + * c-file-style: "gnu" + * tab-width: 8 + * indent-tabs-mode: nil + * End: + */ -- cgit v1.2.3