diff options
Diffstat (limited to 'src/demuxers/demux_wav.c')
-rw-r--r-- | src/demuxers/demux_wav.c | 69 |
1 files changed, 17 insertions, 52 deletions
diff --git a/src/demuxers/demux_wav.c b/src/demuxers/demux_wav.c index 1e46d8526..b8f0d0194 100644 --- a/src/demuxers/demux_wav.c +++ b/src/demuxers/demux_wav.c @@ -15,14 +15,12 @@ * * 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 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA */ /* * MS WAV File Demuxer by Mike Melanson (melanson@pcisys.net) * based on WAV specs that are available far and wide - * - * $Id: demux_wav.c,v 1.65 2007/03/17 20:57:04 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -36,10 +34,10 @@ #include <stdlib.h> #include <ctype.h> -#include "xine_internal.h" -#include "xineutils.h" -#include "demux.h" -#include "buffer.h" +#include <xine/xine_internal.h> +#include <xine/xineutils.h> +#include <xine/demux.h> +#include <xine/buffer.h> #include "bswap.h" #include "group_audio.h" @@ -123,8 +121,8 @@ static int open_wav_file(demux_wav_t *this) { free (this->wave); return 0; } - chunk_tag = LE_32(&chunk_preamble[0]); - chunk_size = LE_32(&chunk_preamble[4]); + chunk_tag = _X_LE_32(&chunk_preamble[0]); + chunk_size = _X_LE_32(&chunk_preamble[4]); if (chunk_tag == data_TAG) { this->data_start = this->input->get_current_pos(this->input); @@ -353,19 +351,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case METHOD_BY_EXTENSION: { - const char *extensions, *mrl; - - mrl = input->get_mrl (input); - extensions = class_gen->get_extensions (class_gen); - - if (!_x_demux_check_extension (mrl, extensions)) { - free (this); - return NULL; - } - } - /* falling through is intended */ - + case METHOD_BY_MRL: case METHOD_BY_CONTENT: case METHOD_EXPLICIT: @@ -393,42 +379,21 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return &this->demux_plugin; } -static const char *get_description (demux_class_t *this_gen) { - return "WAV file demux plugin"; -} - -static const char *get_identifier (demux_class_t *this_gen) { - return "WAV"; -} - -static const char *get_extensions (demux_class_t *this_gen) { - return "wav"; -} - -static const char *get_mimetypes (demux_class_t *this_gen) { - return "audio/x-wav: wav: WAV audio;" - "audio/wav: wav: WAV audio;" - "audio/x-pn-wav: wav: WAV audio;" - "audio/x-pn-windows-acm: wav: WAV audio;"; -} - -static void class_dispose (demux_class_t *this_gen) { - demux_wav_class_t *this = (demux_wav_class_t *) this_gen; - - free (this); -} - void *demux_wav_init_plugin (xine_t *xine, void *data) { demux_wav_class_t *this; this = xine_xmalloc (sizeof (demux_wav_class_t)); this->demux_class.open_plugin = open_plugin; - this->demux_class.get_description = get_description; - this->demux_class.get_identifier = get_identifier; - this->demux_class.get_mimetypes = get_mimetypes; - this->demux_class.get_extensions = get_extensions; - this->demux_class.dispose = class_dispose; + this->demux_class.description = N_("WAV file demux plugin"); + this->demux_class.identifier = "WAV"; + this->demux_class.mimetypes = + "audio/x-wav: wav: WAV audio;" + "audio/wav: wav: WAV audio;" + "audio/x-pn-wav: wav: WAV audio;" + "audio/x-pn-windows-acm: wav: WAV audio;"; + this->demux_class.extensions = "wav"; + this->demux_class.dispose = default_demux_class_dispose; return this; } |