From 36b6f72e271737a87464c34e5a123d22f1ed09be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 24 Jan 2007 04:57:26 +0000 Subject: Create a new wavpack plugin with both the old demuxer and a new decoder. To simplify categorising, I've created a new combined directory to put plugins like wavpack (or libflac) that carries both a demuxer and a decoder in a single bundle -- I expect it being used more in the future. CVS patchset: 8551 CVS date: 2007/01/24 04:57:26 --- src/combined/combined_wavpack.c | 48 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/combined/combined_wavpack.c (limited to 'src/combined/combined_wavpack.c') diff --git a/src/combined/combined_wavpack.c b/src/combined/combined_wavpack.c new file mode 100644 index 000000000..00a1ba85f --- /dev/null +++ b/src/combined/combined_wavpack.c @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2007 the xine project + * + * This file is part of xine, a free video player. + * + * xine 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. + * + * xine 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 + * + * xine interface to libwavpack by Diego Pettenò + * + * $Id: combined_wavpack.c,v 1.1 2007/01/24 04:57:26 dgp85 Exp $ + */ + +#include "xine_internal.h" + +extern void *demux_wv_init_plugin (xine_t *const xine, void *const data); +extern void *decoder_wavpack_init_plugin (xine_t *xine, void *data); + +static const demuxer_info_t demux_info_wv = { + 0 /* priority */ +}; + +static uint32_t audio_types[] = { + BUF_AUDIO_WAVPACK, 0 + }; + +static const decoder_info_t decoder_info_wv = { + audio_types, /* supported types */ + 7 /* priority */ +}; + +const plugin_info_t xine_plugin_info[] EXPORTED = { + /* type, API, "name", version, special_info, init_function */ + { PLUGIN_DEMUX, 26, "wavpack", XINE_VERSION_CODE, &demux_info_wv, demux_wv_init_plugin }, + { PLUGIN_AUDIO_DECODER, 15, "wavpackdec", XINE_VERSION_CODE, &decoder_info_wv, decoder_wavpack_init_plugin }, + { PLUGIN_NONE, 0, NULL, 0, NULL, NULL } +}; -- cgit v1.2.3